Skip to content

Commit

Permalink
net/iavf: fix VLAN offload with AVX512
Browse files Browse the repository at this point in the history
[ upstream commit 32aa88de4dd03b24afeb83195ffe6141b253f7c4 ]

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: 4b64ccb ("net/iavf: fix VLAN extraction in AVX512 path")

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
  • Loading branch information
michich authored and kevintraynor committed Jul 12, 2023
1 parent 21e4c85 commit 820df28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/iavf/iavf_rxtx_vec_avx512.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,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,
Expand Down

0 comments on commit 820df28

Please sign in to comment.