Skip to content

Commit

Permalink
net/iavf: fix packet length parsing in AVX512
Browse files Browse the repository at this point in the history
[ upstream commit fecbc64 ]

Fix pkt_len parsing when DEV_RX_OFFLOAD_KEEP_CRC is set in AVX512 path.

Fixes: 31737f2 ("net/iavf: enable AVX512 for legacy Rx")
Fixes: 6df5870 ("net/iavf: enable AVX512 for flexible Rx")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: David Coyle <david.coyle@intel.com>
  • Loading branch information
Ninja-Mobius authored and steevenlee committed May 8, 2021
1 parent 7f8de73 commit ddb17b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/iavf/iavf_rxtx_vec_avx512.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ _iavf_recv_raw_pkts_vec_avx512(struct iavf_rx_queue *rxq,
len4_7);
__m512i mb4_7 = _mm512_shuffle_epi8(desc4_7, shuf_msk);

mb4_7 = _mm512_add_epi16(mb4_7, crc_adjust);
mb4_7 = _mm512_add_epi32(mb4_7, crc_adjust);
/**
* to get packet types, shift 64-bit values down 30 bits
* and so ptype is in lower 8-bits in each
Expand Down Expand Up @@ -411,7 +411,7 @@ _iavf_recv_raw_pkts_vec_avx512(struct iavf_rx_queue *rxq,
len0_3);
__m512i mb0_3 = _mm512_shuffle_epi8(desc0_3, shuf_msk);

mb0_3 = _mm512_add_epi16(mb0_3, crc_adjust);
mb0_3 = _mm512_add_epi32(mb0_3, crc_adjust);
/* get the packet types */
const __m512i ptypes0_3 = _mm512_srli_epi64(desc0_3, 30);
const __m256i ptypes2_3 = _mm512_extracti64x4_epi64(ptypes0_3, 1);
Expand Down Expand Up @@ -869,7 +869,7 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
*/
__m512i mb4_7 = _mm512_shuffle_epi8(raw_desc4_7, shuf_msk);

mb4_7 = _mm512_add_epi16(mb4_7, crc_adjust);
mb4_7 = _mm512_add_epi32(mb4_7, crc_adjust);
/**
* to get packet types, ptype is located in bit16-25
* of each 128bits
Expand Down Expand Up @@ -898,7 +898,7 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
*/
__m512i mb0_3 = _mm512_shuffle_epi8(raw_desc0_3, shuf_msk);

mb0_3 = _mm512_add_epi16(mb0_3, crc_adjust);
mb0_3 = _mm512_add_epi32(mb0_3, crc_adjust);
/**
* to get packet types, ptype is located in bit16-25
* of each 128bits
Expand Down

0 comments on commit ddb17b5

Please sign in to comment.