* [patch net-next-2.6 0/2] bonding: create same number of queues on all creations
@ 2011-08-10 16:09 Jiri Pirko
2011-08-10 16:09 ` [patch net-next-2.6 1/2] bonding: implement get_tx_queues rtnk_link_op Jiri Pirko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jiri Pirko @ 2011-08-10 16:09 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, fubar, andy, tgraf, ebiederm
When bonding device is created via /sys/class/net/bonding_masters,
correct number of queues is created. But if bonding device is created via rtnl,
default single queue is created. This little patchset makes it behaves the same.
Jiri Pirko (2):
bonding: implement get_tx_queues rtnk_link_op
rtnetlink: remove initialization of dev->real_num_tx_queues
drivers/net/bonding/bond_main.c | 9 +++++++++
net/core/rtnetlink.c | 1 -
2 files changed, 9 insertions(+), 1 deletions(-)
--
1.7.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch net-next-2.6 1/2] bonding: implement get_tx_queues rtnk_link_op
2011-08-10 16:09 [patch net-next-2.6 0/2] bonding: create same number of queues on all creations Jiri Pirko
@ 2011-08-10 16:09 ` Jiri Pirko
2011-08-10 16:09 ` [patch net-next-2.6 2/2] rtnetlink: remove initialization of dev->real_num_tx_queues Jiri Pirko
2011-08-11 14:44 ` [patch net-next-2.6 0/2] bonding: create same number of queues on all creations David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2011-08-10 16:09 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, fubar, andy, tgraf, ebiederm
If vonding 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>
---
drivers/net/bonding/bond_main.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 38a83ac..854aa8d 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.
--
1.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch net-next-2.6 2/2] rtnetlink: remove initialization of dev->real_num_tx_queues
2011-08-10 16:09 [patch net-next-2.6 0/2] bonding: create same number of queues on all creations Jiri Pirko
2011-08-10 16:09 ` [patch net-next-2.6 1/2] bonding: implement get_tx_queues rtnk_link_op Jiri Pirko
@ 2011-08-10 16:09 ` Jiri Pirko
2011-08-11 14:44 ` [patch net-next-2.6 0/2] bonding: create same number of queues on all creations David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2011-08-10 16:09 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, fubar, andy, tgraf, ebiederm
dev->real_num_tx_queues is correctly set already in alloc_netdev_mqs.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
net/core/rtnetlink.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 99d9e95..39f8dd6 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1604,7 +1604,6 @@ struct net_device *rtnl_create_link(struct net *src_net, struct net *net,
dev_net_set(dev, net);
dev->rtnl_link_ops = ops;
dev->rtnl_link_state = RTNL_LINK_INITIALIZING;
- dev->real_num_tx_queues = real_num_queues;
if (tb[IFLA_MTU])
dev->mtu = nla_get_u32(tb[IFLA_MTU]);
--
1.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch net-next-2.6 0/2] bonding: create same number of queues on all creations
2011-08-10 16:09 [patch net-next-2.6 0/2] bonding: create same number of queues on all creations Jiri Pirko
2011-08-10 16:09 ` [patch net-next-2.6 1/2] bonding: implement get_tx_queues rtnk_link_op Jiri Pirko
2011-08-10 16:09 ` [patch net-next-2.6 2/2] rtnetlink: remove initialization of dev->real_num_tx_queues Jiri Pirko
@ 2011-08-11 14:44 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-08-11 14:44 UTC (permalink / raw)
To: jpirko; +Cc: netdev, eric.dumazet, fubar, andy, tgraf, ebiederm
From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 10 Aug 2011 18:09:43 +0200
> When bonding device is created via /sys/class/net/bonding_masters,
> correct number of queues is created. But if bonding device is created via rtnl,
> default single queue is created. This little patchset makes it behaves the same.
>
> Jiri Pirko (2):
> bonding: implement get_tx_queues rtnk_link_op
> rtnetlink: remove initialization of dev->real_num_tx_queues
Both applied, thanks Jiri.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-11 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-10 16:09 [patch net-next-2.6 0/2] bonding: create same number of queues on all creations Jiri Pirko
2011-08-10 16:09 ` [patch net-next-2.6 1/2] bonding: implement get_tx_queues rtnk_link_op Jiri Pirko
2011-08-10 16:09 ` [patch net-next-2.6 2/2] rtnetlink: remove initialization of dev->real_num_tx_queues Jiri Pirko
2011-08-11 14:44 ` [patch net-next-2.6 0/2] bonding: create same number of queues on all creations David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).