mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5676cc7bfe
commit
7ae5289017
2 changed files with 23 additions and 3 deletions
|
@ -3007,6 +3007,7 @@ struct tg3 {
|
|||
u32 rx_std_max_post;
|
||||
u32 rx_offset;
|
||||
u32 rx_pkt_map_sz;
|
||||
bool rx_refill;
|
||||
|
||||
|
||||
/* begin "everything else" cacheline(s) section */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue