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:	Tue, 11 Nov 2008 15:58:03 -0500
From:	Neil Horman <nhorman@...driver.com>
To:	Michael Chan <mchan@...adcom.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"jgarzik@...ox.com" <jgarzik@...ox.com>,
	"'davem@...emloft.net'" <davem@...emloft.net>
Subject: Re: [PATCH] bnx2: fix poll_controller method so that proper
	structures are passed and all rx queues are checked

On Tue, Nov 11, 2008 at 09:59:24AM -0800, Michael Chan wrote:
> 
> On Tue, 2008-11-11 at 09:37 -0800, Neil Horman wrote:
> > Copy that.  Here you go, followon patch to change how we pass the irq vector to
> > bnx2_interrupt.  Doesn't do anything super-usefull, but good for the sake of
> > correctness
> 
> Sorry, I missed something earlier.  After looking at this more closely,
> we should also move disable_irq() into the loop and call it with the
> same vector values from irq_tbl.
> 

Oops your right, new comprehensive patch, replacing the previous 2.

Fix bnx2 so that netpoll works properly.  Specifically:

1) Fix parameters to bnx2_interrupt to be a struct bnx2_napi rather than a
struct net_device

2) Fix poll_controller method to check every queue in the rx case so frames
aren't missed

Signed-off-by: Neil Horman <nhorman@...driver.com>


 bnx2.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 430d430..d07e3f1 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7204,10 +7204,13 @@ static void
 poll_bnx2(struct net_device *dev)
 {
 	struct bnx2 *bp = netdev_priv(dev);
+	int i;
 
-	disable_irq(bp->pdev->irq);
-	bnx2_interrupt(bp->pdev->irq, dev);
-	enable_irq(bp->pdev->irq);
+	for (i = 0; i < bp->irq_nvecs; i++) {
+		disable_irq(bp->irq_tbl[i].vector);
+		bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]);
+		enable_irq(bp->irq_tbl[i].vector);
+	}
 }
 #endif
 
-- 
/****************************************************
 * Neil Horman <nhorman@...driver.com>
 * Software Engineer, Red Hat
 ****************************************************/
--
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