netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ixgbe: [RFC] [PATCH] Fix return of invalid txq
@ 2010-01-15  5:31 Krishna Kumar
  2010-01-15  7:58 ` Waskiewicz Jr, Peter P
  2010-01-15  8:43 ` David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Krishna Kumar @ 2010-01-15  5:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, jeffrey.t.kirsher, Krishna Kumar

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>
---
 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) &&

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-02-12 20:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15  5:31 ixgbe: [RFC] [PATCH] Fix return of invalid txq Krishna Kumar
2010-01-15  7:58 ` Waskiewicz Jr, Peter P
2010-01-15  8:44   ` David Miller
2010-01-15  9:00     ` Peter P Waskiewicz Jr
2010-01-15  9:06       ` David Miller
2010-01-16 10:53         ` Waskiewicz Jr, Peter P
2010-02-12 19:55           ` David Miller
2010-02-12 20:12             ` Peter P Waskiewicz Jr
2010-01-15  8:43 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).