DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix VLAN offload with AVX512
@ 2023-03-27 10:07 Michal Schmidt
  2023-03-29  1:05 ` Lu, Wenzhuo
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Schmidt @ 2023-03-27 10:07 UTC (permalink / raw)
  To: dev
  Cc: Bruce Richardson, Konstantin Ananyev, Jingjing Wu, Beilei Xing,
	Leyi Rong, Wenzhuo Lu, stable

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")
Cc: stable@dpdk.org

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index 4fe9b972786a..bd2788121b5a 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -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,
-- 
2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-13  0:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 10:07 [PATCH] net/iavf: fix VLAN offload with AVX512 Michal Schmidt
2023-03-29  1:05 ` Lu, Wenzhuo
2023-04-03  5:39   ` Zhang, Qi Z
2023-06-12 18:02     ` Thomas Monjalon
2023-06-13  0:38       ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).