patch 'common/mlx5: use just sufficient barrier for Arm' has been queued to stable release 20.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Mar 22 01:41:52 CET 2023


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 <honnappa.nagarahalli at arm.com>
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 <honnappa.nagarahalli at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 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 at 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 @@
++


More information about the stable mailing list