net: Allow changing number of RX queues after device allocation
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 27 Sep 2010 08:24:33 +0000 (08:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Sep 2010 05:09:49 +0000 (22:09 -0700)
commit62fe0b40abb3484413800edaef9b087a20059acf
tree1fbd745de235b3a1d97931412fa9ff3e7228fd88
parentf91ff5b9ff529be8aac2039af63b2c8ea6cd6ebe
net: Allow changing number of RX queues after device allocation

For RPS, we create a kobject for each RX queue based on the number of
queues passed to alloc_netdev_mq().  However, drivers generally do not
determine the numbers of hardware queues to use until much later, so
this usually represents the maximum number the driver may use and not
the actual number in use.

For TX queues, drivers can update the actual number using
netif_set_real_num_tx_queues().  Add a corresponding function for RX
queues, netif_set_real_num_rx_queues().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/core/net-sysfs.c
net/core/net-sysfs.h