Netdev List
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Jason Xing <kerneljasonxing@gmail.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <bjorn@kernel.org>,
	<magnus.karlsson@intel.com>, <jonathan.lemon@gmail.com>,
	<sdf@fomichev.me>, <ast@kernel.org>, <daniel@iogearbox.net>,
	<hawk@kernel.org>, <john.fastabend@gmail.com>,
	<willemdebruijn.kernel@gmail.com>, <ioana.ciornei@nxp.com>,
	<netdev@vger.kernel.org>, Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net-next] net: xsk: dpaa2: avoid repeatedly updating the global consumer
Date: Tue, 24 Jun 2025 21:12:59 +0200	[thread overview]
Message-ID: <aFr4uy54zgtgXmTq@boxer> (raw)
In-Reply-To: <20250623120159.68374-1-kerneljasonxing@gmail.com>

On Mon, Jun 23, 2025 at 08:01:59PM +0800, Jason Xing wrote:
> 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.

Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

> 
> 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
> 

  reply	other threads:[~2025-06-24 19:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-06-25  1:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aFr4uy54zgtgXmTq@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=john.fastabend@gmail.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kerneljasonxing@gmail.com \
    --cc=kernelxing@tencent.com \
    --cc=kuba@kernel.org \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox