net/mlx5: fix wrong Flow Tag decompression
PATCH 1/1 net/mlx5: fix wrong Flow Tag decompression
Packets can get a wrong Flow Tag on x86 architecture with the Flow Tag compression format (rxq_cqe_comp_en=2) enabled inside the SSE Rx burst. The shuffle mask that extracts a Flow Tag from the pair of compressed CQEs is reversed. This leads to the wrong Flow Tag assignment. Correct the shuffle mask to get proper bytes for a Flow Tag from miniCQEs.
--- drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_rxtx_vec_sse.h +2 -2
@@ -197,8 +197,8 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,const __m128i flow_mark_adj =_mm_set_epi32 (-1 ,-1 ,-1 ,-1 );const __m128i flow_mark_shuf = -_mm_set_epi8 (-1 ,1 ,0 ,4 , --1 ,9 ,8 ,12 , +_mm_set_epi8 (-1 ,9 ,8 ,12 , +-1 ,1 ,0 ,4 ,-1 ,-1 ,-1 ,-1 ,-1 ,-1 ,-1 ,-1 ); const __m128i ft_mask =
Signature · 1 line
2.24.1
Quoted 14 lines
-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Thursday, January 14, 2021 23:32
To: [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH] net/mlx5: fix wrong Flow Tag decompressionPackets can get a wrong Flow Tag on x86 architecture with the Flow Tag compression format (rxq_cqe_comp_en=2) enabled inside the SSE Rx burst. The shuffle mask that extracts a Flow Tag from the pair of compressed CQEs is reversed. This leads to the wrong Flow Tag assignment.
Correct the shuffle mask to get proper bytes for a Flow Tag from miniCQEs.
Quoted 5 lines
Fixes 54c2d46b160 ("net/mlx5: support flow tag and packet headerminiCQEs")
Cc: [email protected]Signed-off-by Alexander Kozyrev <[email protected]>
Hi,
Quoted 14 lines
-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Thursday, January 14, 2021 11:32 PM
To: [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH] net/mlx5: fix wrong Flow Tag decompressionPackets can get a wrong Flow Tag on x86 architecture with the Flow Tag compression format (rxq_cqe_comp_en=2) enabled inside the SSE Rx burst. The shuffle mask that extracts a Flow Tag from the pair of compressed CQEs is reversed. This leads to the wrong Flow Tag assignment. Correct the shuffle mask to get proper bytes for a Flow Tag from miniCQEs.
Quoted 6 lines
Fixes 54c2d46b160 ("net/mlx5: support flow tag and packet headerminiCQEs")
Cc: [email protected]Signed-off-by Alexander Kozyrev <[email protected]>---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh