]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tg3: Fix RSS ring refill race condition
authorMichael Chan <mchan@broadcom.com>
Wed, 21 Mar 2012 15:38:33 +0000 (15:38 +0000)
committerJoe Jin <joe.jin@oracle.com>
Tue, 28 Aug 2012 07:23:06 +0000 (15:23 +0800)
commitdc04917784a398118bcdc04b3a21b26cd74f4a15
treee8f6026570b17ca3a194cbb4cffbf248804838af
parent5781ae76b596fafaebecee506906acabf859b10b
tg3: Fix RSS ring refill race condition

The RSS feature in tg3 hardware has only one rx producer ring for all
RSS rings.  NAPI vector 1 is special and handles the refilling of the
rx producer ring on behalf of all RSS rings.  There is a race condition
between these RSS NAPIs and the NAPI[1].  If NAPI[1] finishes checking
for refill and then another RSS ring empties the rx producer ring
before NAPI[1] exits NAPI, the chip will be completely out of SKBs in
the rx producer ring.

We fix this by adding a flag tp->rx_refill and rely on napi_schedule()/
napi_complete() to help synchronize it to close the race condition.

Update driver version to 3.123.

(cherry picked from commit 7ae5289017e5ed5514b2603d157fb54c058a3c82)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/tg3.c
drivers/net/tg3.h