[PATCH v2] net/mlx5: fix risk in Rx descriptor read in NEON vector path

Raslan Darawsheh rasland at nvidia.com
Mon Jun 19 14:13:41 CEST 2023


Hi,

> -----Original Message-----
> From: Ruifeng Wang <ruifeng.wang at arm.com>
> Sent: Tuesday, May 30, 2023 8:48 AM
> To: Raslan Darawsheh <rasland at nvidia.com>; Matan Azrad
> <matan at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>
> Cc: dev at dpdk.org; honnappa.nagarahalli at arm.com; stable at dpdk.org;
> nd at arm.com; Ruifeng Wang <ruifeng.wang at arm.com>; Ali Alnubani
> <alialnu at nvidia.com>
> Subject: [PATCH v2] net/mlx5: fix risk in Rx descriptor read in NEON vector
> path
> 
> In NEON vector PMD, vector load loads two contiguous 8B of
> descriptor data into vector register. Given vector load ensures no
> 16B atomicity, read of the word that includes op_own field could be
> reordered after read of other words. In this case, some words could
> contain invalid data.
> 
> Reloaded qword0 after read barrier to update vector register. This
> ensures that the fetched data is correct.
> 
> Testpmd single core test on N1SDP/ThunderX2 showed no performance drop.
> 
> Fixes: 1742c2d9fab0 ("net/mlx5: fix synchronization on polling Rx
> completions")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> Tested-by: Ali Alnubani <alialnu at nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
> ---
> v2: Rebased and added tags that received.
> 

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list