Skip to content

Commit

Permalink
bonding: implement get_tx_queues rtnk_link_op
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Aug 11, 2011
1 parent 5098af0 commit d5da451
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d5da451

Please sign in to comment.