On Sun, Dec 16, 2007 at 07:55:55PM +0200, Meelis Roos ([EMAIL PROTECTED]) wrote:
> Just got this trace from current 2.6.24-rc5+git running on 32-bit ppc 
> (PReP subarch, tulip NIC's) during apt-get update (logged in via ssh so 
> also ssh traffic):
> 
> ------------[ cut here ]------------
> Badness at net/core/dev.c:2199

Please test attached patch.
If I understood ltulip correctly, it is posible, that number of entries
can be higher than requested budget. When work_done is equal to
budget-1, the last skb has to be processed, after 154'th line
work_done will become equal to budget and thus loop has to break,
check on the same 154 line will become false, but work_done will be
increased nevertheless, which will make work_done being equal to
budget+1 at exit, which will fire warning you saw.

Signed-off-by: Evgeniy Polyakov <[EMAIL PROTECTED]>

diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
index 3653314..9e0e97a 100644
--- a/drivers/net/tulip/interrupt.c
+++ b/drivers/net/tulip/interrupt.c
@@ -151,8 +151,9 @@ int tulip_poll(struct napi_struct *napi, int budget)
                        if (tulip_debug > 5)
                                printk(KERN_DEBUG "%s: In tulip_rx(), entry %d 
%8.8x.\n",
                                       dev->name, entry, status);
-                      if (work_done++ >= budget)
+                      if (work_done >= budget)
                                goto not_done;
+                      work_done++;
 
                        if ((status & 0x38008300) != 0x0300) {
                                if ((status & 0x38000300) != 0x0300) {


-- 
        Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to