From: Ting Xu Date: Wed, 16 Sep 2020 03:02:28 +0000 (+0800) Subject: net/ice: fix ptype parsing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0ff55924712e2a35476c0929235b21d2b77d9f97;p=dpdk.git net/ice: fix ptype parsing The ptype mask for flexible descriptor in Rx function ice_recv_pkts_vec has a reversed order, which leads to an incorrect value of the final ptype. This patch fix the mask to parse the correct ptype of RX packets. Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx") Cc: stable@dpdk.org Signed-off-by: Ting Xu Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c index 965cd8b261..c4c9a91265 100644 --- a/drivers/net/ice/ice_rxtx_vec_sse.c +++ b/drivers/net/ice/ice_rxtx_vec_sse.c @@ -237,10 +237,10 @@ static inline void ice_rx_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts, uint32_t *ptype_tbl) { - const __m128i ptype_mask = _mm_set_epi16(0, ICE_RX_FLEX_DESC_PTYPE_M, - 0, ICE_RX_FLEX_DESC_PTYPE_M, - 0, ICE_RX_FLEX_DESC_PTYPE_M, - 0, ICE_RX_FLEX_DESC_PTYPE_M); + const __m128i ptype_mask = _mm_set_epi16(ICE_RX_FLEX_DESC_PTYPE_M, 0, + ICE_RX_FLEX_DESC_PTYPE_M, 0, + ICE_RX_FLEX_DESC_PTYPE_M, 0, + ICE_RX_FLEX_DESC_PTYPE_M, 0); __m128i ptype_01 = _mm_unpacklo_epi32(descs[0], descs[1]); __m128i ptype_23 = _mm_unpacklo_epi32(descs[2], descs[3]); __m128i ptype_all = _mm_unpacklo_epi64(ptype_01, ptype_23);