From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 60DC442D83 for ; Wed, 28 Jun 2023 16:11:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5448942D38; Wed, 28 Jun 2023 16:11:56 +0200 (CEST) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id BADD5400EF for ; Wed, 28 Jun 2023 16:11:54 +0200 (CEST) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-3fba9daf043so17571635e9.1 for ; Wed, 28 Jun 2023 07:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687961514; x=1690553514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MnWzYqqQl/GA09m96VhII6LymKh8RDepcKaz/G7pwzs=; b=fHCDHOmkfs9KIU3zc/GbtAF48odwwLAuS4pj+lyyT9cSdFChJbXx5a8lbphVRUr9Wl v6ZDi+zuM7wOwqbFzP2p+6f+6vqK6YKV+GN8HIX5s8yj6ZtPXHx0rv0dk+CW7pxYkSmZ d96wI/D4BzElqbWGZHDMCg6EU1EU/IeYV1tRCxcwLSj01QmSRBTgXU7uWc7UlaMOCjvI jb/8dKw6wWpFhmxQC8vLlHlbX5IQJxN1lPccJ7iKD3QtKyv7OSotvnv8ZPMYYJm+Ex9N 62QgvmuhQ1Hlhvviacn4TLWZA9ZLbH5ig26sjI85bzLf+rY4BthWRbA58DQ2dOW0nrKa tsNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687961514; x=1690553514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MnWzYqqQl/GA09m96VhII6LymKh8RDepcKaz/G7pwzs=; b=j/wQphXyR3Ym6dd1YdSuXSM7hFB7MpxboGPGRRaEq6r3xPGdVr6xIPIN3miin7pRzL itrDau6Q6KSILSlcHgB0N06jgahSY2R33GdoYEAYA+cVh5gSV41UnGInFzsB+sFVKkLI 800mSRkXEWLLJlfl4ur47Xa2sbKiEq5GtZ5m/gVW1IEr68gftw6btGVAlZSjcUsWVvlu f5fMDGywe7V9Z2U47Pzpe/fU/CB8V9f1rHNLqBga9o+4RVWGBx6GWpPKcbeSk5hdPv62 GbST2eWxTHv1zU2YD0UPglHCz+2h/y5K6ADBzs7XgJszI12z923uG2wIwHWxbxGhXhL7 Pm6w== X-Gm-Message-State: AC+VfDwG1XdeTA/gK7nt4oRIVXqSQ5mJFJuV50I9H4AB+ymlea3U83Cq 01dtokJICnDXQtnM3N0TlZU3WadlmEht9w== X-Google-Smtp-Source: ACHHUZ6h5OdjXR72IWN5p580PJkZ+xPdrsaOo2a6RbnnfC+KdDSYfi+uIp71vVmki0zWtJrF4NNC1w== X-Received: by 2002:a05:600c:215a:b0:3fb:b34f:6cd6 with SMTP id v26-20020a05600c215a00b003fbb34f6cd6mr1131442wml.41.1687961514362; Wed, 28 Jun 2023 07:11:54 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id 14-20020a05600c020e00b003fba92fad35sm1560963wmi.26.2023.06.28.07.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 07:11:53 -0700 (PDT) From: luca.boccassi@gmail.com To: Ruifeng Wang Cc: Ali Alnubani , Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix risk in NEON Rx descriptor read' has been queued to stable release 20.11.9 Date: Wed, 28 Jun 2023 15:10:44 +0100 Message-Id: <20230628141046.2145871-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230628141046.2145871-1-luca.boccassi@gmail.com> References: <20230615013258.1439718-63-luca.boccassi@gmail.com> <20230628141046.2145871-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/30/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/b67f1030b64f2068f98573e7d623fc24cc6cc9d6 Thanks. Luca Boccassi --- >From b67f1030b64f2068f98573e7d623fc24cc6cc9d6 Mon Sep 17 00:00:00 2001 From: Ruifeng Wang Date: Tue, 30 May 2023 13:48:04 +0800 Subject: [PATCH] net/mlx5: fix risk in NEON Rx descriptor read [ upstream commit 7ac7450b20d1e11a20c138707663867918b39403 ] In NEON vector PMD, vector load loads two contiguous 8B of descriptor data into vector register. Given vector load ensures no 16B atomicity, read of the word that includes op_own field could be reordered after read of other words. In this case, some words could contain invalid data. Reloaded qword0 after read barrier to update vector register. This ensures that the fetched data is correct. Testpmd single core test on N1SDP/ThunderX2 showed no performance drop. Fixes: 1742c2d9fab0 ("net/mlx5: fix synchronization on polling Rx completions") Signed-off-by: Ruifeng Wang Tested-by: Ali Alnubani Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h index e4b74c40d1..e3ba6fee5b 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h @@ -647,6 +647,14 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, c0 = vld1q_u64((uint64_t *)(p0 + 48)); /* Synchronize for loading the rest of blocks. */ rte_io_rmb(); + /* B.0 (CQE 3) reload lower half of the block. */ + c3 = vld1q_lane_u64((uint64_t *)(p3 + 48), c3, 0); + /* B.0 (CQE 2) reload lower half of the block. */ + c2 = vld1q_lane_u64((uint64_t *)(p2 + 48), c2, 0); + /* B.0 (CQE 1) reload lower half of the block. */ + c1 = vld1q_lane_u64((uint64_t *)(p1 + 48), c1, 0); + /* B.0 (CQE 0) reload lower half of the block. */ + c0 = vld1q_lane_u64((uint64_t *)(p0 + 48), c0, 0); /* Prefetch next 4 CQEs. */ if (pkts_n - pos >= 2 * MLX5_VPMD_DESCS_PER_LOOP) { unsigned int next = pos + MLX5_VPMD_DESCS_PER_LOOP; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-28 11:40:08.917319366 +0100 +++ 0020-net-mlx5-fix-risk-in-NEON-Rx-descriptor-read.patch 2023-06-28 11:40:08.088028165 +0100 @@ -1 +1 @@ -From 7ac7450b20d1e11a20c138707663867918b39403 Mon Sep 17 00:00:00 2001 +From b67f1030b64f2068f98573e7d623fc24cc6cc9d6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7ac7450b20d1e11a20c138707663867918b39403 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 91c85bec6d..3ed688191f 100644 +index e4b74c40d1..e3ba6fee5b 100644 @@ -31 +32 @@ -@@ -675,6 +675,14 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -647,6 +647,14 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,