aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-08-10 02:09:44 -0400
committerDavid S. Miller <davem@davemloft.net>2011-08-11 10:44:38 -0400
commitd5da4510a742bb85182dcab8a47f63baaebb5ec3 (patch)
treeaf7172c9cbd42e4b3715f6e47b95f116cca99784 /drivers/net/bonding/bond_main.c
parent5098af0abf3c1ed454159e081e75cf7cfc6ddf60 (diff)
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 <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c9
1 files changed, 9 insertions, 0 deletions
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[])
4828 return 0; 4828 return 0;
4829} 4829}
4830 4830
4831static int bond_get_tx_queues(struct net *net, struct nlattr *tb[],
4832 unsigned int *num_queues,
4833 unsigned int *real_num_queues)
4834{
4835 *num_queues = tx_queues;
4836 return 0;
4837}
4838
4831static struct rtnl_link_ops bond_link_ops __read_mostly = { 4839static struct rtnl_link_ops bond_link_ops __read_mostly = {
4832 .kind = "bond", 4840 .kind = "bond",
4833 .priv_size = sizeof(struct bonding), 4841 .priv_size = sizeof(struct bonding),
4834 .setup = bond_setup, 4842 .setup = bond_setup,
4835 .validate = bond_validate, 4843 .validate = bond_validate,
4844 .get_tx_queues = bond_get_tx_queues,
4836}; 4845};
4837 4846
4838/* Create a new bond based on the specified name and bonding parameters. 4847/* Create a new bond based on the specified name and bonding parameters.