[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100115053117.31513.82775.sendpatchset@krkumar2.in.ibm.com>
Date: Fri, 15 Jan 2010 11:01:17 +0530
From: Krishna Kumar <krkumar2@...ibm.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, jeffrey.t.kirsher@...el.com,
Krishna Kumar <krkumar2@...ibm.com>
Subject: ixgbe: [RFC] [PATCH] 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@...ibm.com>
---
drivers/net/ixgbe/ixgbe_main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff -ruNp org/drivers/net/ixgbe/ixgbe_main.c new/drivers/net/ixgbe/ixgbe_main.c
--- org/drivers/net/ixgbe/ixgbe_main.c 2010-01-12 11:50:24.000000000 +0530
+++ new/drivers/net/ixgbe/ixgbe_main.c 2010-01-12 11:50:44.000000000 +0530
@@ -5514,8 +5514,11 @@ static u16 ixgbe_select_queue(struct net
struct ixgbe_adapter *adapter = netdev_priv(dev);
int txq = smp_processor_id();
- if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
+ if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
+ while (unlikely(txq >= dev->real_num_tx_queues))
+ txq -= dev->real_num_tx_queues;
return txq;
+ }
#ifdef IXGBE_FCOE
if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists