Skip to content

Commit 596a425

Browse files
pbrkrPaolo Abeni
authored andcommitted
net: ravb: Always process TX descriptor ring
The TX queue should be serviced each time the poll function is called, even if the full RX work budget has been consumed. This prevents starvation of the TX queue when RX bandwidth usage is high. Fixes: c156633 ("Renesas Ethernet AVB driver proper") Signed-off-by: Paul Barker <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 72076fc commit 596a425

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/net/ethernet/renesas/ravb_main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,12 +1324,12 @@ static int ravb_poll(struct napi_struct *napi, int budget)
13241324
int q = napi - priv->napi;
13251325
int mask = BIT(q);
13261326
int quota = budget;
1327+
bool unmask;
13271328

13281329
/* Processing RX Descriptor Ring */
13291330
/* Clear RX interrupt */
13301331
ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0);
1331-
if (ravb_rx(ndev, &quota, q))
1332-
goto out;
1332+
unmask = !ravb_rx(ndev, &quota, q);
13331333

13341334
/* Processing TX Descriptor Ring */
13351335
spin_lock_irqsave(&priv->lock, flags);
@@ -1339,6 +1339,9 @@ static int ravb_poll(struct napi_struct *napi, int budget)
13391339
netif_wake_subqueue(ndev, q);
13401340
spin_unlock_irqrestore(&priv->lock, flags);
13411341

1342+
if (!unmask)
1343+
goto out;
1344+
13421345
napi_complete(napi);
13431346

13441347
/* Re-enable RX/TX interrupts */

0 commit comments

Comments
 (0)