aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2010-10-18 14:04:39 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-20 05:27:59 -0400
commite6484930d7c73d324bccda7d43d131088da697b9 (patch)
treeafa528185a8f679730275722cbd19f660101af50 /include/linux/netdevice.h
parentbd25fa7ba59cd26094319dfba0011b48465f7355 (diff)
net: allocate tx queues in register_netdevice
This patch introduces netif_alloc_netdev_queues which is called from register_device instead of alloc_netdev_mq. This makes TX queue allocation symmetric with RX allocation. Also, queue locks allocation is done in netdev_init_one_queue. Change set_real_num_tx_queues to fail if requested number < 1 or greater than number of allocated queues. Signed-off-by: Tom Herbert <therbert@google.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 14fbb04c459d..880d56565828 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1696,8 +1696,8 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
1696 return dev->num_tx_queues > 1; 1696 return dev->num_tx_queues > 1;
1697} 1697}
1698 1698
1699extern void netif_set_real_num_tx_queues(struct net_device *dev, 1699extern int netif_set_real_num_tx_queues(struct net_device *dev,
1700 unsigned int txq); 1700 unsigned int txq);
1701 1701
1702#ifdef CONFIG_RPS 1702#ifdef CONFIG_RPS
1703extern int netif_set_real_num_rx_queues(struct net_device *dev, 1703extern int netif_set_real_num_rx_queues(struct net_device *dev,