From patchwork Thu Jan 14 21:32:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 86643 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22061A0A02; Thu, 14 Jan 2021 22:32:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CFFA8140E30; Thu, 14 Jan 2021 22:32:23 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 36EA9140E22 for ; Thu, 14 Jan 2021 22:32:22 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from akozyrev@nvidia.com) with SMTP; 14 Jan 2021 23:32:20 +0200 Received: from nvidia.com (pegasus02.mtr.labs.mlnx [10.210.16.122]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 10ELWKIw017599; Thu, 14 Jan 2021 23:32:20 +0200 From: Alexander Kozyrev To: dev@dpdk.org Cc: stable@dpdk.org, rasland@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com Date: Thu, 14 Jan 2021 21:32:19 +0000 Message-Id: <20210114213219.30593-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] net/mlx5: fix wrong Flow Tag decompression X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Packets can get a wrong Flow Tag on x86 architecture with the Flow Tag compression format (rxq_cqe_comp_en=2) enabled inside the SSE Rx burst. The shuffle mask that extracts a Flow Tag from the pair of compressed CQEs is reversed. This leads to the wrong Flow Tag assignment. Correct the shuffle mask to get proper bytes for a Flow Tag from miniCQEs. Fixes: 54c2d46b160 ("net/mlx5: support flow tag and packet header miniCQEs") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h index d4df9816aa..0b3f240e10 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h @@ -197,8 +197,8 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, const __m128i flow_mark_adj = _mm_set_epi32(-1, -1, -1, -1); const __m128i flow_mark_shuf = - _mm_set_epi8(-1, 1, 0, 4, - -1, 9, 8, 12, + _mm_set_epi8(-1, 9, 8, 12, + -1, 1, 0, 4, -1, -1, -1, -1, -1, -1, -1, -1); const __m128i ft_mask =