]> git.baikalelectronics.ru Git - kernel.git/commit
net: netif_set_real_num_rx_queues may cap num_rx_queues at init time
authorJohn Fastabend <john.r.fastabend@intel.com>
Thu, 7 Oct 2010 06:35:15 +0000 (23:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Oct 2010 06:35:15 +0000 (23:35 -0700)
commite1e58df7f2b3d0f6878738eb9fe7eea1ede21987
tree62673a98d0bbddd784b4d334dc9c2c7a601570c8
parent9cc321135f33cdcfb9733f372071def98273e442
net: netif_set_real_num_rx_queues may cap num_rx_queues at init time

Do not set num_rx_queues in netif_set_real_num_rx_queues() some
drivers will increase the real_num_rx_queues later due to a feature
changes or available interrupts increasing. By setting num_rx_queues
here this ends up creating a cap on the number of rx queues
available.

For example the ixgbe driver sets the max number of queues it intends
to use ever then sets the current number in use with the
netif_set_num_{rx|tx}_queues calls. With the current implementation
the number of rx queues gets limited so when a feature such as DCB
or FCoE is enabled the queues are no longer available.

kobjects will only be allocated for real_num_rx_queues so the waste
in memory is minimal.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c