Skip to contentSkip to conversation

net: systemport: fix tx work done in TX napi poll

PATCH Applied Florian Fainelli 2 participants 2 messages Nov 12, 2014 – Nov 13, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: systemport: fix tx work done in TX napi poll

With commit d75b1ade567 ("net: less interrupt masking in NAPI") napi repoll is done only when work_done == budget. bcm_sysport_tx_poll() always returns 0 whether or not we completed the poll quantum.

Fix this by returning either 0 when we did complete the TX ring reclaim, or budget to trigger a repoll.

Fixes d75b1ade567 ("net: less interrupt masking in NAPI")
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bcmsysport.c +3 -1
index 531bb7c57531..3cb241155dac 100644
@@ -731,9 +731,11 @@ static int bcm_sysport_tx_poll(struct napi_struct *napi, int budget)
 		napi_complete(napi);
 		/* re-enable TX interrupt */
 		intrl2_1_mask_clear(ring->priv, BIT(ring->index));
+
+		return 0;
 	}
 
-	return 0;
+	return budget;
 }
 
 static void bcm_sysport_tx_reclaim_all(struct bcm_sysport_priv *priv)
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw

From: Florian Fainelli <[email protected]>
Date: Wed, 12 Nov 2014 15:40:43 -0800

Quoted 9 lines

With commit d75b1ade567 ("net: less interrupt masking in NAPI") napi repoll is done only when work_done == budget. bcm_sysport_tx_poll() always returns 0 whether or not we completed the poll quantum.

Fix this by returning either 0 when we did complete the TX ring reclaim, or budget to trigger a repoll.

Fixes d75b1ade567 ("net: less interrupt masking in NAPI")

Applied, thanks.