summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2012-07-20 02:28:47 +0000
committerDavid S. Miller <davem@davemloft.net>2012-07-20 11:06:59 -0700
commitd40156aa5ecbd51fed932ed4813df82b56e5ff4d (patch)
tree34b9d6b16ab469bde1998a20c9b26b9388578bd9 /net/core
parentee6ae1a1d58c70fc864bc777a36be56b0880ebff (diff)
downloadop-kernel-dev-d40156aa5ecbd51fed932ed4813df82b56e5ff4d.zip
op-kernel-dev-d40156aa5ecbd51fed932ed4813df82b56e5ff4d.tar.gz
rtnl: allow to specify different num for rx and tx queue count
Also cut out unused function parameters and possible err in return value. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 045db8a..db5a8ad 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1624,17 +1624,17 @@ struct net_device *rtnl_create_link(struct net *src_net, struct net *net,
{
int err;
struct net_device *dev;
- unsigned int num_queues = 1;
+ unsigned int num_tx_queues = 1;
+ unsigned int num_rx_queues = 1;
- if (ops->get_tx_queues) {
- err = ops->get_tx_queues(src_net, tb);
- if (err < 0)
- goto err;
- num_queues = err;
- }
+ if (ops->get_num_tx_queues)
+ num_tx_queues = ops->get_num_tx_queues();
+ if (ops->get_num_rx_queues)
+ num_rx_queues = ops->get_num_rx_queues();
err = -ENOMEM;
- dev = alloc_netdev_mq(ops->priv_size, ifname, ops->setup, num_queues);
+ dev = alloc_netdev_mqs(ops->priv_size, ifname, ops->setup,
+ num_tx_queues, num_rx_queues);
if (!dev)
goto err;
OpenPOWER on IntegriCloud