Skip to contentSkip to conversation

net/ice: fix incorrect ptype parsing

PATCH Applied Ting Xu 2 participants 2 messages Sep 16, 2020 Network drivers

lore
Share & tools
lore

Ting Xu

author
#0 lore raw

PATCH 1/1 net/ice: fix incorrect 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")
---
 drivers/net/ice/ice_rxtx_vec_sse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ice/ice_rxtx_vec_sse.c +4 -4
index 382ef31f3a..64df5a8bbd 100644
@@ -188,10 +188,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);
Signature · 1 line
2.17.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Xu, Ting <[email protected]>
Sent: Wednesday, September 16, 2020 11:02 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Xu, Ting <[email protected]>; [email protected]
Subject: [PATCH v1] net/ice: fix incorrect ptype parsing

Quoted 8 lines

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")

Applied to dpdk-next-net-intel.

Thanks
Qi