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>
This commit is contained in:

committed by
David S. Miller

parent
bd25fa7ba5
commit
e6484930d7
@@ -1696,8 +1696,8 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
|
||||
return dev->num_tx_queues > 1;
|
||||
}
|
||||
|
||||
extern void netif_set_real_num_tx_queues(struct net_device *dev,
|
||||
unsigned int txq);
|
||||
extern int netif_set_real_num_tx_queues(struct net_device *dev,
|
||||
unsigned int txq);
|
||||
|
||||
#ifdef CONFIG_RPS
|
||||
extern int netif_set_real_num_rx_queues(struct net_device *dev,
|
||||
|
Reference in New Issue
Block a user