lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Jan 2010 23:58:17 -0800
From:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
To:	Krishna Kumar <krkumar2@...ibm.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
Subject: RE: ixgbe: [RFC] [PATCH] Fix return of invalid txq

>-----Original Message-----
>From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org]
>On Behalf Of Krishna Kumar
>Sent: Thursday, January 14, 2010 9:31 PM
>To: davem@...emloft.net
>Cc: netdev@...r.kernel.org; Kirsher, Jeffrey T; Krishna Kumar
>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@...ts.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>

This looks reasonable to me.  I've been trying to find time to add something like igb has, with a tiny Tx lookup table that maps CPUs into a smaller set of Tx queues, but I like this simple approach to fix the current bug.

We'll want to pull this in for a quick set of regression tests, but again I think this will work well.

Thanks Krishna,

-PJ

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ