All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: xsk: dpaa2: avoid repeatedly updating the global consumer
@ 2025-06-23 12:01 Jason Xing
  2025-06-24 19:12 ` Maciej Fijalkowski
  2025-06-25  1:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Xing @ 2025-06-23 12:01 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, bjorn, magnus.karlsson,
	maciej.fijalkowski, jonathan.lemon, sdf, ast, daniel, hawk,
	john.fastabend, willemdebruijn.kernel, ioana.ciornei
  Cc: netdev, Jason Xing

From: Jason Xing <kernelxing@tencent.com>

This patch avoids another update of the consumer at the end of
dpaa2_xsk_tx().

In the zero copy xmit path, two versions (batched and non-batched)
regarding how the consumer of tx ring changes are implemented in
xsk_tx_peek_release_desc_batch() that eventually updates the local
consumer to the global consumer in either of the following call trace:
1) batched mode:
   xsk_tx_peek_release_desc_batch()
       __xskq_cons_release()
2) non-batched mode:
   xsk_tx_peek_release_desc_batch()
       xsk_tx_peek_release_fallback()
           xsk_tx_release()

As we can see, dpaa2_xsk_tx() doesn't need to call extra release function
to handle the sync of consumer itself.

Signed-off-by: Jason Xing <kernelxing@tencent.com>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c
index a466c2379146..4b0ae7d9af92 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c
@@ -448,7 +448,5 @@ bool dpaa2_xsk_tx(struct dpaa2_eth_priv *priv,
 		percpu_stats->tx_errors++;
 	}
 
-	xsk_tx_release(ch->xsk_pool);
-
 	return total_enqueued == budget;
 }
-- 
2.43.5


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

end of thread, other threads:[~2025-06-25  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 12:01 [PATCH net-next] net: xsk: dpaa2: avoid repeatedly updating the global consumer Jason Xing
2025-06-24 19:12 ` Maciej Fijalkowski
2025-06-25  1:10 ` patchwork-bot+netdevbpf

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.