[PATCH v2 1/3] event/cnxk: avoid reading non cached registers

pbhagavatula at marvell.com pbhagavatula at marvell.com
Wed Sep 21 08:15:56 CEST 2022


From: Pavan Nikhilesh <pbhagavatula at marvell.com>

Avoid reading non-cached registers in fastpath.
PENDSTATE need not be read before tag flush in tx enqueue
context as we have additional checks prior to check for
pending flushes.

Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
---
 Depends-on: Series-24634

 v2 Changes:
 - Rebase on next-net-mrvl

 drivers/event/cnxk/cn9k_worker.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h
index 384b428ed1..881861f348 100644
--- a/drivers/event/cnxk/cn9k_worker.h
+++ b/drivers/event/cnxk/cn9k_worker.h
@@ -156,6 +156,15 @@ cn9k_sso_hws_dual_forward_event(struct cn9k_sso_hws_dual *dws, uint64_t base,
 	}
 }

+static __rte_always_inline void
+cn9k_sso_tx_tag_flush(uint64_t base)
+{
+	if (unlikely(CNXK_TT_FROM_TAG(plt_read64(base + SSOW_LF_GWS_TAG)) ==
+		     SSO_TT_EMPTY))
+		return;
+	plt_write64(0, base + SSOW_LF_GWS_OP_SWTAG_FLUSH);
+}
+
 static __rte_always_inline void
 cn9k_wqe_to_mbuf(uint64_t wqe, const uint64_t mbuf, uint8_t port_id,
 		 const uint32_t tag, const uint32_t flags,
@@ -835,7 +844,7 @@ cn9k_sso_hws_event_tx(uint64_t base, struct rte_event *ev, uint64_t *cmd,
 			return 1;
 	}

-	cnxk_sso_hws_swtag_flush(base);
+	cn9k_sso_tx_tag_flush(base);

 	return 1;
 }
--
2.25.1



More information about the dev mailing list