rps: allocate rx queues in register_netdevice only
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 23 Sep 2010 17:26:35 +0000 (17:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2010 02:04:07 +0000 (19:04 -0700)
commit1b4bf461f05d56ced6d6b8f3b4831adc7076f565
tree632708e37f7f9ccdef2a774b38904c5dfd6a8ecc
parent7a91b434e2bad554b709265db7603b1aa52dd92e
rps: allocate rx queues in register_netdevice only

Instead of having two places were we allocate dev->_rx, introduce
netif_alloc_rx_queues() helper and call it only from
register_netdevice(), not from alloc_netdev_mq()

Goal is to let drivers change dev->num_rx_queues after allocating netdev
and before registering it.

This also removes a lot of ifdefs in net/core/dev.c

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c