patch 'common/cnxk: fix inline CTX write' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Mon Nov 11 07:27:24 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=06df4e3ae1eaaabc9d325cd40ab792a75d2ae3ba

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 06df4e3ae1eaaabc9d325cd40ab792a75d2ae3ba Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram at marvell.com>
Date: Tue, 1 Oct 2024 11:30:47 +0530
Subject: [PATCH] common/cnxk: fix inline CTX write
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 6c3de40af8362d2d7eede3b4fd12075fce964f4d ]

Reading a CPT_LF_CTX_ERR csr will ensure writes for
FLUSH are complete and also tell whether flush is
complete or not.

Fixes: 71213a8b773c ("common/cnxk: support CPT CTX write through microcode op")

Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
---
 drivers/common/cnxk/roc_nix_inl.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index bc9cc2f429..ba51ddd8c8 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -1669,6 +1669,7 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
 	struct nix_inl_dev *inl_dev = NULL;
 	struct roc_cpt_lf *outb_lf = NULL;
 	union cpt_lf_ctx_flush flush;
+	union cpt_lf_ctx_err err;
 	bool get_inl_lf = true;
 	uintptr_t rbase;
 	struct nix *nix;
@@ -1710,6 +1711,13 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
 		flush.s.cptr = ((uintptr_t)sa_cptr) >> 7;
 		plt_write64(flush.u, rbase + CPT_LF_CTX_FLUSH);

+		plt_atomic_thread_fence(__ATOMIC_ACQ_REL);
+
+		/* Read a CSR to ensure that the FLUSH operation is complete */
+		err.u = plt_read64(rbase + CPT_LF_CTX_ERR);
+
+		if (err.s.flush_st_flt)
+			plt_warn("CTX flush could not complete");
 		return 0;
 	}
 	plt_nix_dbg("Could not get CPT LF for CTX write");
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-11 14:23:06.989298502 +0800
+++ 0038-common-cnxk-fix-inline-CTX-write.patch	2024-11-11 14:23:05.102192840 +0800
@@ -1 +1 @@
-From 6c3de40af8362d2d7eede3b4fd12075fce964f4d Mon Sep 17 00:00:00 2001
+From 06df4e3ae1eaaabc9d325cd40ab792a75d2ae3ba Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6c3de40af8362d2d7eede3b4fd12075fce964f4d ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index a984ac56d9..d0328921a7 100644
+index bc9cc2f429..ba51ddd8c8 100644
@@ -22 +24 @@
-@@ -1748,6 +1748,7 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
+@@ -1669,6 +1669,7 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
@@ -30 +32 @@
-@@ -1789,6 +1790,13 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
+@@ -1710,6 +1711,13 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,


More information about the stable mailing list