]> git.baikalelectronics.ru Git - kernel.git/commit
[BNX2]: Fix RX packet rot.
authorMichael Chan <mchan@broadcom.com>
Tue, 11 Dec 2007 01:18:37 +0000 (17:18 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 11 Dec 2007 10:45:30 +0000 (02:45 -0800)
commit3b28282999c213e836610274c08f4f755cf3ac53
tree14941c7d5c49bbfa3e2b2a3d61cba274baea6b05
parent6c2893aa37518d002c012e0a80ac57920eab2aa3
[BNX2]: Fix RX packet rot.

Packets can be left in the RX ring if the NAPI budget is reached.
This is caused by storing the latest rx index at the beginning of
bnx2_rx_int().  We may not process all the work up to this index
if the budget is reached and so some packets in the RX ring may rot
when we later check for more work using this stored rx index.

The fix is to not store this latest hw index and only store the
processed rx index.  We use a new function bnx2_get_hw_rx_cons()
to fetch the latest hw rx index.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c
drivers/net/bnx2.h