lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFr4uy54zgtgXmTq@boxer>
Date: Tue, 24 Jun 2025 21:12:59 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: Jason Xing <kerneljasonxing@...il.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <bjorn@...nel.org>, <magnus.karlsson@...el.com>,
	<jonathan.lemon@...il.com>, <sdf@...ichev.me>, <ast@...nel.org>,
	<daniel@...earbox.net>, <hawk@...nel.org>, <john.fastabend@...il.com>,
	<willemdebruijn.kernel@...il.com>, <ioana.ciornei@....com>,
	<netdev@...r.kernel.org>, Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next] net: xsk: dpaa2: avoid repeatedly updating the
 global consumer

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

> 
> Signed-off-by: Jason Xing <kernelxing@...cent.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ