From: Yongseok Koh Date: Wed, 2 Aug 2017 17:29:52 +0000 (-0700) Subject: net/mlx5: fix offload flags in SSE Rx X-Git-Tag: spdx-start~2240 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=58db3b6fe92234bed9e2306b66b5daf4f591fb13;p=dpdk.git net/mlx5: fix offload flags in SSE Rx The pinfo variable has wrong data. This has to have merged data of two fields from Rx completion - pkt_info and hdr_type_etc. Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86") Signed-off-by: Yongseok Koh Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c index 9be48a0c9b..8a8d94c17b 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c @@ -829,8 +829,9 @@ rxq_cq_to_ptype_oflags_v(struct rxq *rxq, __m128i cqes[4], __m128i op_err, ptype = _mm_and_si128(ptype, ptype_mask); pinfo = _mm_and_si128(pinfo, pinfo_mask); pinfo = _mm_slli_epi32(pinfo, 16); - ptype = _mm_or_si128(ptype, pinfo); - ptype = _mm_srli_epi32(ptype, 10); + /* Make pinfo has merged fields for ol_flags calculation. */ + pinfo = _mm_or_si128(ptype, pinfo); + ptype = _mm_srli_epi32(pinfo, 10); ptype = _mm_packs_epi32(ptype, zero); /* Errored packets will have RTE_PTYPE_ALL_MASK. */ op_err = _mm_srli_epi16(op_err, 8);