From: Ingo Molnar <mingo@elte.hu>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
shemminger@linux-foundation.org
Subject: [patch] forcedeth: fix the NAPI poll function, take #2
Date: Wed, 17 Oct 2007 12:18:23 +0200 [thread overview]
Message-ID: <20071017101823.GA4573@elte.hu> (raw)
In-Reply-To: <20071017072551.GD18044@elte.hu>
> I'll send upstream today unless people scream...
albeit you forgot to merge half of my patch :-/ The (tested) patch below
fixes that.
Ingo
---------------->
Subject: forcedeth: fix rx-work condition in nv_rx_process_optimized() too
From: Ingo Molnar <mingo@elte.hu>
the merge of my previous fix to forcedeth.c lots an important hunk.
this patch fixes that.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/net/forcedeth.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: linux/drivers/net/forcedeth.c
===================================================================
--- linux.orig/drivers/net/forcedeth.c
+++ linux/drivers/net/forcedeth.c
@@ -2408,13 +2408,13 @@ static int nv_rx_process_optimized(struc
struct fe_priv *np = netdev_priv(dev);
u32 flags;
u32 vlanflags = 0;
- u32 rx_processed_cnt = 0;
+ int rx_work = 0;
struct sk_buff *skb;
int len;
while((np->get_rx.ex != np->put_rx.ex) &&
!((flags = le32_to_cpu(np->get_rx.ex->flaglen)) & NV_RX2_AVAIL) &&
- (rx_processed_cnt++ < limit)) {
+ (rx_work < limit)) {
dprintk(KERN_DEBUG "%s: nv_rx_process_optimized: flags 0x%x.\n",
dev->name, flags);
@@ -2517,9 +2517,11 @@ next_pkt:
np->get_rx.ex = np->first_rx.ex;
if (unlikely(np->get_rx_ctx++ == np->last_rx_ctx))
np->get_rx_ctx = np->first_rx_ctx;
+
+ rx_work++;
}
- return rx_processed_cnt;
+ return rx_work;
}
static void set_bufsize(struct net_device *dev)
next prev parent reply other threads:[~2007-10-17 10:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 11:24 WARNING: at net/core/dev.c:2161 net_rx_action() Ingo Molnar
2007-10-15 11:27 ` Ingo Molnar
2007-10-15 16:18 ` Ingo Molnar
2007-10-15 19:57 ` David Miller
2007-10-15 22:03 ` Ingo Molnar
2007-10-15 22:07 ` Ingo Molnar
2007-10-15 22:21 ` David Miller
2007-10-15 22:30 ` [patch] forcedeth: fix the NAPI poll function Ingo Molnar
2007-10-15 22:39 ` David Miller
2007-10-15 22:40 ` Jeff Garzik
2007-10-15 22:41 ` Jeff Garzik
2007-10-16 5:42 ` Ingo Molnar
2007-10-16 5:47 ` Jeff Garzik
2007-10-16 6:40 ` Ingo Molnar
2007-10-16 7:17 ` Jeff Garzik
2007-10-16 7:49 ` Ingo Molnar
2007-10-16 16:52 ` Jeff Garzik
2007-10-16 21:20 ` Jeff Garzik
2007-10-17 7:25 ` Ingo Molnar
2007-10-17 10:18 ` Ingo Molnar [this message]
2007-10-18 0:21 ` [patch] forcedeth: fix the NAPI poll function, take #2 Jeff Garzik
2007-10-15 22:18 ` WARNING: at net/core/dev.c:2161 net_rx_action() David Miller
2007-10-15 22:20 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071017101823.GA4573@elte.hu \
--to=mingo@elte.hu \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.