DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] common/cnxk: optimize ethdev teardown time
@ 2023-12-05 10:00 Rakesh Kudurumalla
  2023-12-05 10:00 ` [PATCH 2/3] common/cnxk: added new API to enable disable SQ Rakesh Kudurumalla
  2023-12-05 10:00 ` [PATCH 3/3] net/cnxk: reduce Tx queue release time Rakesh Kudurumalla
  0 siblings, 2 replies; 4+ messages in thread
From: Rakesh Kudurumalla @ 2023-12-05 10:00 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: dev, jerinj, Rakesh Kudurumalla

API mbox_alloc_msg_npa_aq_enq() mbox is called if SQ needs
to be updated from mbox response else mbox call to kernel
is bypassed reducing the time taken to complete
roc_nix_tm_sq_aura_fc() function.This reduces ethdev
teardown time by 20%.

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/common/cnxk/roc_nix_tm_ops.c | 29 ++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index e1cef7a670..2c53472047 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -51,25 +51,26 @@ roc_nix_tm_sq_aura_fc(struct roc_nix_sq *sq, bool enable)
 		goto exit;
 
 	/* Read back npa aura ctx */
-	req = mbox_alloc_msg_npa_aq_enq(mbox);
-	if (req == NULL) {
-		rc = -ENOSPC;
-		goto exit;
-	}
+	if (enable) {
+		req = mbox_alloc_msg_npa_aq_enq(mbox);
+		if (req == NULL) {
+			rc = -ENOSPC;
+			goto exit;
+		}
 
-	req->aura_id = roc_npa_aura_handle_to_aura(aura_handle);
-	req->ctype = NPA_AQ_CTYPE_AURA;
-	req->op = NPA_AQ_INSTOP_READ;
+		req->aura_id = roc_npa_aura_handle_to_aura(aura_handle);
+		req->ctype = NPA_AQ_CTYPE_AURA;
+		req->op = NPA_AQ_INSTOP_READ;
 
-	rc = mbox_process_msg(mbox, (void *)&rsp);
-	if (rc)
-		goto exit;
+		rc = mbox_process_msg(mbox, (void *)&rsp);
+		if (rc)
+			goto exit;
 
-	/* Init when enabled as there might be no triggers */
-	if (enable)
+		/* Init when enabled as there might be no triggers */
 		*(volatile uint64_t *)sq->fc = rsp->aura.count;
-	else
+	} else {
 		*(volatile uint64_t *)sq->fc = sq->aura_sqb_bufs;
+	}
 	/* Sync write barrier */
 	plt_wmb();
 	rc = 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-07  6:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 10:00 [PATCH 1/3] common/cnxk: optimize ethdev teardown time Rakesh Kudurumalla
2023-12-05 10:00 ` [PATCH 2/3] common/cnxk: added new API to enable disable SQ Rakesh Kudurumalla
2023-12-05 10:00 ` [PATCH 3/3] net/cnxk: reduce Tx queue release time Rakesh Kudurumalla
2023-12-07  6:15   ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).