From: Jiri Pirko Date: Wed, 10 Aug 2011 06:09:44 +0000 (+0000) Subject: bonding: implement get_tx_queues rtnk_link_op X-Git-Tag: MMI-PSA29.97-13-9~18194^2~544 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d5da4510a742bb85182dcab8a47f63baaebb5ec3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git bonding: implement get_tx_queues rtnk_link_op If bonding device is created via rtnl, it is created with default number of rx/tx queues. This patch implements callback in bonding so the correct value (previously specified by bonding module param) is used. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 38a83acd502e..854aa8d3a2e0 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4828,11 +4828,20 @@ static int bond_validate(struct nlattr *tb[], struct nlattr *data[]) return 0; } +static int bond_get_tx_queues(struct net *net, struct nlattr *tb[], + unsigned int *num_queues, + unsigned int *real_num_queues) +{ + *num_queues = tx_queues; + return 0; +} + static struct rtnl_link_ops bond_link_ops __read_mostly = { .kind = "bond", .priv_size = sizeof(struct bonding), .setup = bond_setup, .validate = bond_validate, + .get_tx_queues = bond_get_tx_queues, }; /* Create a new bond based on the specified name and bonding parameters.