All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: systemport: fix tx work done in TX napi poll
@ 2014-11-12 23:40 Florian Fainelli
  2014-11-13  3:21 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2014-11-12 23:40 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet, Florian Fainelli

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")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 531bb7c57531..3cb241155dac 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -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)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: systemport: fix tx work done in TX napi poll
  2014-11-12 23:40 [PATCH net-next] net: systemport: fix tx work done in TX napi poll Florian Fainelli
@ 2014-11-13  3:21 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-13  3:21 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, edumazet

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Wed, 12 Nov 2014 15:40:43 -0800

> 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")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-13  3:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 23:40 [PATCH net-next] net: systemport: fix tx work done in TX napi poll Florian Fainelli
2014-11-13  3:21 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.