linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mvneta: Fix the case where the last poll did not process all rx
@ 2020-03-16 14:56 Jisheng Zhang
  2020-03-16 22:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2020-03-16 14:56 UTC (permalink / raw)
  To: Thomas Petazzoni, David S. Miller, Gregory CLEMENT; +Cc: netdev, linux-kernel

From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>

For the case where the last mvneta_poll did not process all
RX packets, we need to xor the pp->cause_rx_tx or port->cause_rx_tx
before claculating the rx_queue.

Fixes: 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU")
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/net/ethernet/marvell/mvneta.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 98017e7d5dd0..11babc79dc6c 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3036,11 +3036,10 @@ static int mvneta_poll(struct napi_struct *napi, int budget)
 	/* For the case where the last mvneta_poll did not process all
 	 * RX packets
 	 */
-	rx_queue = fls(((cause_rx_tx >> 8) & 0xff));
-
 	cause_rx_tx |= pp->neta_armada3700 ? pp->cause_rx_tx :
 		port->cause_rx_tx;
 
+	rx_queue = fls(((cause_rx_tx >> 8) & 0xff));
 	if (rx_queue) {
 		rx_queue = rx_queue - 1;
 		if (pp->bm_priv)
-- 
2.24.0



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

* Re: [PATCH] net: mvneta: Fix the case where the last poll did not process all rx
  2020-03-16 14:56 [PATCH] net: mvneta: Fix the case where the last poll did not process all rx Jisheng Zhang
@ 2020-03-16 22:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-16 22:07 UTC (permalink / raw)
  To: jszhang3; +Cc: thomas.petazzoni, gregory.clement, netdev, linux-kernel

From: Jisheng Zhang <jszhang3@mail.ustc.edu.cn>
Date: Mon, 16 Mar 2020 22:56:36 +0800

> From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> 
> For the case where the last mvneta_poll did not process all
> RX packets, we need to xor the pp->cause_rx_tx or port->cause_rx_tx
> before claculating the rx_queue.
> 
> Fixes: 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU")
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2020-03-16 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 14:56 [PATCH] net: mvneta: Fix the case where the last poll did not process all rx Jisheng Zhang
2020-03-16 22:07 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).