]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: xsk: dpaa2: avoid repeatedly updating the global consumer
authorJason Xing <kernelxing@tencent.com>
Mon, 23 Jun 2025 12:01:59 +0000 (20:01 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Jun 2025 00:50:04 +0000 (17:50 -0700)
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>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://patch.msgid.link/20250623120159.68374-1-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c

index a466c237914617bfda1ecd4bd4be7432e6ab72f8..4b0ae7d9af929b83e95a2dbc5ba182f9a92b9fa8 100644 (file)
@@ -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;
 }