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 D53B142800 for ; Wed, 22 Mar 2023 01:42:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0C6140F18; Wed, 22 Mar 2023 01:42:46 +0100 (CET) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id 1A1AF40F18 for ; Wed, 22 Mar 2023 01:42:45 +0100 (CET) Received: by mail-wm1-f54.google.com with SMTP id l15-20020a05600c4f0f00b003ed58a9a15eso10464637wmq.5 for ; Tue, 21 Mar 2023 17:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679445765; 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=fcEfx08RAuBaOLAHqiHWL6G+wvhcVR4+/0ea4fA+Iug=; b=FbB9f+mHbJymG7lldYMdQYrcfGM10O6VhraQh4syfp7kraY2ejHnWmrahfNrbGIcQd fERO7ZlNUGqc41h1gTUaL04KJ+fPdywO52NQDBg1gWfu9IqAXD/FpHq99RbsolmAJpyq nwbFE9rM/gSeMdS+5O1l7P3KVyf4LrKbeTCrZxAr+6FA2cg/K0IRkx6lAZg6w1dLPfDD /UptnklwD3kE9z5GKKBDTaJqEm0I1Otz4PPvPJDA7q4UkzgM901aaJ86NfduvEoiyxGv YZlSxuzoX9Xq2Bb0nyK1GO+8I7WNGtZPgR8wiVVAr1zuPMPLR7KjX/koJ2zoMFBVJCF6 iKwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679445765; 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=fcEfx08RAuBaOLAHqiHWL6G+wvhcVR4+/0ea4fA+Iug=; b=hpbxC2D3NMT/qJNQr5Lc9AgIW8NEoBOLRC8Idncd8QrLIvKK5G3OputMALdC917DGl dkJo60/es9rM2xKXRyULOp4LYAA7X1w8QDTHYHVg8tezl6Ryd++jyMsWuna5AJJwiNcX kxUHbomsibtfyz2V4z4qEEJm+bf3WM/ZtKodwMP/NuOlx1Ddg20XC7g+4pHDKb5ZPlJr xRf+UAnQ6vNoR8E7M8+xwshOr8DQr1rFdZwGnenlHptgKZw9NPTUhmcu9PIFTYS0R3KU JYSxXVceDZ+p/8vZmV34nQ23hEBz7AFR+6qL/M92FYgGcCi07wEVa/Y+KVVp3kCITPIx Rttw== X-Gm-Message-State: AO0yUKV/WdPw/9HxnHi/ZLqNMwk5dci1u6ftjTzl7PVdqV4i717RhQOt WZqbv6c0BLLWQ0xBplvxVYWWXS2PrJE= X-Google-Smtp-Source: AK7set9ESYzjQ032XRycanNiTEJJZJGfbqtK+w3d0uF26+nHDsc4oJ5/7VNhSzr+GKN4CJ/6COlyow== X-Received: by 2002:a1c:4c19:0:b0:3ee:4dc0:d4f6 with SMTP id z25-20020a1c4c19000000b003ee4dc0d4f6mr1277502wmf.17.1679445764844; Tue, 21 Mar 2023 17:42:44 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id n5-20020a05600c4f8500b003b47b80cec3sm21263216wmq.42.2023.03.21.17.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 17:42:44 -0700 (PDT) From: luca.boccassi@gmail.com To: Honnappa Nagarahalli Cc: Ruifeng Wang , Viacheslav Ovsiienko , dpdk stable Subject: patch 'common/mlx5: use just sufficient barrier for Arm' has been queued to stable release 20.11.8 Date: Wed, 22 Mar 2023 00:41:52 +0000 Message-Id: <20230322004155.2333903-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322004155.2333903-1-luca.boccassi@gmail.com> References: <20230315224631.1025649-39-luca.boccassi@gmail.com> <20230322004155.2333903-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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/23/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/5ab007c445c4dbad16142d239285dc175566001e Thanks. Luca Boccassi --- >From 5ab007c445c4dbad16142d239285dc175566001e Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Wed, 8 Mar 2023 20:32:47 -0600 Subject: [PATCH] common/mlx5: use just sufficient barrier for Arm [ upstream commit 7be74edb90e3b8f272857001907d460f49524e41 ] cqe->op_own indicates if the CQE is owned by the NIC. The rest of the fields in CQE should be read only after op_own is read. On Arm platforms using "dmb ishld" is sufficient to enforce this. Fixes: 88c0733535d6 ("net/mlx5: extend Rx completion with error handling") Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_common.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index 86d690af09..0fa0dab386 100644 --- a/drivers/common/mlx5/mlx5_common.h +++ b/drivers/common/mlx5/mlx5_common.h @@ -199,7 +199,12 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n, if (unlikely((op_owner != (!!(idx))) || (op_code == MLX5_CQE_INVALID))) return MLX5_CQE_STATUS_HW_OWN; - rte_io_rmb(); + + /* Prevent speculative reading of other fields in CQE until + * CQE is valid. + */ + rte_atomic_thread_fence(__ATOMIC_ACQUIRE); + if (unlikely(op_code == MLX5_CQE_RESP_ERR || op_code == MLX5_CQE_REQ_ERR)) return MLX5_CQE_STATUS_ERR; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-21 21:56:37.689130872 +0000 +++ 0016-common-mlx5-use-just-sufficient-barrier-for-Arm.patch 2023-03-21 21:56:37.084807300 +0000 @@ -1 +1 @@ -From 7be74edb90e3b8f272857001907d460f49524e41 Mon Sep 17 00:00:00 2001 +From 5ab007c445c4dbad16142d239285dc175566001e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7be74edb90e3b8f272857001907d460f49524e41 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/common/mlx5/mlx5_common.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + drivers/common/mlx5/mlx5_common.h | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) @@ -21 +22 @@ -index 9fb85ddefb..42d938776a 100644 +index 86d690af09..0fa0dab386 100644 @@ -24,4 +25,4 @@ -@@ -191,7 +191,11 @@ enum mlx5_cqe_status { - static __rte_always_inline enum mlx5_cqe_status - check_cqe_error(const uint8_t op_code) - { +@@ -199,7 +199,12 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n, + + if (unlikely((op_owner != (!!(idx))) || (op_code == MLX5_CQE_INVALID))) + return MLX5_CQE_STATUS_HW_OWN; @@ -28,0 +30 @@ ++