diff options
author | Krishna Kumar <krkumar2@in.ibm.com> | 2010-02-03 08:13:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-03 22:17:17 -0500 |
commit | fdd3d631cddad20ad9d3e1eb7dbf26825a8a121f (patch) | |
tree | 9f4b952c8cbfc2ad169a023c5321b3ff8bb2595d /drivers/net/ixgbe | |
parent | e44d38e1b72a2aa7f5e7024c5da83a879355a1cc (diff) |
ixgbe: Fix return of invalid txq
a developer had complained of getting lots of warnings:
"eth16 selects TX queue 98, but real number of TX queues is 64"
http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html
As there was no follow up on that bug, I am submitting this
patch assuming that the other return points will not return
invalid txq's, and also that this fixes the bug (not tested).
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 37e2af0a6145..7b7c8486c0bf 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5329,8 +5329,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
5329 | struct ixgbe_adapter *adapter = netdev_priv(dev); | 5329 | struct ixgbe_adapter *adapter = netdev_priv(dev); |
5330 | int txq = smp_processor_id(); | 5330 | int txq = smp_processor_id(); |
5331 | 5331 | ||
5332 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) | 5332 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) { |
5333 | while (unlikely(txq >= dev->real_num_tx_queues)) | ||
5334 | txq -= dev->real_num_tx_queues; | ||
5333 | return txq; | 5335 | return txq; |
5336 | } | ||
5334 | 5337 | ||
5335 | #ifdef IXGBE_FCOE | 5338 | #ifdef IXGBE_FCOE |
5336 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | 5339 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && |