aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2010-10-07 02:35:15 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-07 02:35:15 -0400
commit3d3211ef5cf7558d289d1a1efbef8c45595639aa (patch)
tree62673a98d0bbddd784b4d334dc9c2c7a601570c8 /net/core
parentc2dddf941409635601e56c1990c5ab0bd395742c (diff)
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 7d149550e8d..fd1b75a47e8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1593,8 +1593,6 @@ int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
1593 rxq); 1593 rxq);
1594 if (rc) 1594 if (rc)
1595 return rc; 1595 return rc;
1596 } else {
1597 dev->num_rx_queues = rxq;
1598 } 1596 }
1599 1597
1600 dev->real_num_rx_queues = rxq; 1598 dev->real_num_rx_queues = rxq;