Skip to contentSkip to conversation

net/iavf: fix VLAN offload with AVX512

PATCH Applied Michal Schmidt 4 participants 5 messages Mar 27, 2023 – Jun 13, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix VLAN offload with AVX512

It has been observed that mbufs of some received VLAN packets had the VLAN tag correctly set in vlan_tci, but ol_flags were missing the VLAN-indicating flags.

_mm256_shuffle_epi8 operates as two independent 128-bit operations, not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags reflected in the resulting vlan_flags for all 8 rx descriptors, the input l2tag2_flags_shuf must contain the required pattern in both 128-bit halves.

This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed by commit eb24917428a1 ("net/iavf: fix VLAN offload with AVX2").

Fixes 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path")
---
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_rxtx_vec_avx512.c +4 -1
index 4fe9b972786a..bd2788121b5a 100644
@@ -1214,7 +1214,10 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 							(0, 0, 0, 0,
 							 0, 0, 0, 0,
 							 0, 0, 0, 0,
-							 0, 0, 0, 0,
+							 0, 0,
+							 RTE_MBUF_F_RX_VLAN |
+							 RTE_MBUF_F_RX_VLAN_STRIPPED,
+							 0,
 							 /* end up 128-bits */
 							 0, 0, 0, 0,
 							 0, 0, 0, 0,
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines

-----Original Message-----
From: Michal Schmidt <[email protected]>
Sent: Monday, March 27, 2023 6:08 PM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Rong, Leyi <[email protected]>; Lu, Wenzhuo <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix VLAN offload with AVX512

It has been observed that mbufs of some received VLAN packets had the VLAN tag correctly set in vlan_tci, but ol_flags were missing the VLAN-indicating flags.

_mm256_shuffle_epi8 operates as two independent 128-bit operations, not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags reflected in the resulting vlan_flags for all 8 rx descriptors, the input l2tag2_flags_shuf must contain the required pattern in both 128-bit halves.

Quoted 7 lines

This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed by commit eb24917428a1 ("net/iavf: fix VLAN offload with AVX2").

Fixes 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path")
Applied
#2 lore raw
Quoted 39 lines

-----Original Message-----
From: Lu, Wenzhuo <[email protected]>
Sent: Wednesday, March 29, 2023 9:06 AM
To: mschmidt <[email protected]>; [email protected]
Cc: Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Rong, Leyi <[email protected]>; [email protected]
Subject: RE: [PATCH] net/iavf: fix VLAN offload with AVX512

Quoted 11 lines

-----Original Message-----
From: Michal Schmidt <[email protected]>
Sent: Monday, March 27, 2023 6:08 PM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Rong, Leyi <[email protected]>; Lu, Wenzhuo <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix VLAN offload with AVX512

Quoted 8 lines

It has been observed that mbufs of some received VLAN packets had the VLAN tag correctly set in vlan_tci, but ol_flags were missing the VLAN-indicating flags.

_mm256_shuffle_epi8 operates as two independent 128-bit operations, not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags reflected in the resulting vlan_flags for all 8 rx descriptors, the input l2tag2_flags_shuf must contain the required pattern in both 128-

bit halves.

Quoted 5 lines

This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed by commit
eb24917428a1 ("net/iavf: fix VLAN offload with AVX2").

Quoted 5 lines
Quoted 4 lines
Fixes 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path")

Applied to dpdk-next-net-intel.

Thanks
Qi

#3 lore raw

03/04/2023 07:39, Zhang, Qi Z:

Quoted 14 lines
Quoted 14 lines
Quoted 8 lines

It has been observed that mbufs of some received VLAN packets had the VLAN tag correctly set in vlan_tci, but ol_flags were missing the VLAN-indicating flags.

_mm256_shuffle_epi8 operates as two independent 128-bit operations, not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags reflected in the resulting vlan_flags for all 8 rx descriptors, the input l2tag2_flags_shuf must contain the required pattern in both 128-

bit halves.

Quoted 5 lines

This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed by commit
eb24917428a1 ("net/iavf: fix VLAN offload with AVX2").

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Fixes 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path")

Applied to dpdk-next-net-intel.

I don't find this patch in your tree.
Is it lost somewhere?

#4 lore raw
Quoted 35 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, June 13, 2023 2:02 AM
To: Zhang, Qi Z <[email protected]>
Cc: Lu, Wenzhuo <[email protected]>; mschmidt <[email protected]>; [email protected]; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Rong, Leyi <[email protected]>; [email protected]; Zhang, Helin <[email protected]>; [email protected]
Subject: Re: [PATCH] net/iavf: fix VLAN offload with AVX512

03/04/2023 07:39, Zhang, Qi Z:

Quoted 19 lines
Quoted 19 lines
Quoted 9 lines

It has been observed that mbufs of some received VLAN packets had the VLAN tag correctly set in vlan_tci, but ol_flags were missing the VLAN-indicating flags.

_mm256_shuffle_epi8 operates as two independent 128-bit operations, not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags reflected in the resulting vlan_flags for all 8 rx descriptors, the input l2tag2_flags_shuf must contain the required pattern in both 128-

bit halves.

Quoted 9 lines

This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed by commit
eb24917428a1 ("net/iavf: fix VLAN offload with AVX2").

Fixes 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512

path")
Cc: [email protected]

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line

Applied to dpdk-next-net-intel.

I don't find this patch in your tree.
Is it lost somewhere?

Sorry, it is merged now.

Quoted 2 lines