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] [day] [month] [year] [list]
Message-ID: <IA3PR11MB8986F22AAC964A8C8D085DA3E53DA@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Fri, 22 Aug 2025 19:42:15 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, "Karlsson, Magnus"
	<magnus.karlsson@...el.com>, "Fijalkowski, Maciej"
	<maciej.fijalkowski@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net] i40e: remove redundant memory
 barrier when cleaning Tx descs



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Maciej Fijalkowski
> Sent: Friday, August 22, 2025 5:16 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>; Karlsson, Magnus
> <magnus.karlsson@...el.com>; Fijalkowski, Maciej
> <maciej.fijalkowski@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net] i40e: remove redundant
> memory barrier when cleaning Tx descs
> 
> i40e has a feature which writes to memory location last descriptor
> successfully sent. Memory barrier in i40e_clean_tx_irq() was used to
> avoid forward-reading descriptor fields in case DD bit was not set.
> Having mentioned feature in place implies that such situation will not
> happen as we know in advance how many descriptors HW has dealt with.
> 
> Besides, this barrier placement was wrong. Idea is to have this
> protection *after* reading DD bit from HW descriptor, not before.
> Digging through git history showed me that indeed barrier was before
> DD bit check, anyways the commit introducing i40e_get_head() should
> have wiped it out altogether.
> 
> Also, there was one commit doing s/read_barrier_depends/smp_rmb when
> get head feature was already in place, but it was only theoretical
> based on ixgbe experiences, which is different in these terms as that
> driver has to read DD bit from HW descriptor.
> 
> Fixes: 1943d8ba9507 ("i40e/i40evf: enable hardware feature head write
> back")
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>

> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index 048c33039130..b194eae03208 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -948,9 +948,6 @@ static bool i40e_clean_tx_irq(struct i40e_vsi
> *vsi,
>  		if (!eop_desc)
>  			break;
> 
> -		/* prevent any other reads prior to eop_desc */
> -		smp_rmb();
> -
>  		i40e_trace(clean_tx_irq, tx_ring, tx_desc, tx_buf);
>  		/* we have caught up to head, no work left to do */
>  		if (tx_head == tx_desc)
> --
> 2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ