DPDK patches and discussions
 help / color / mirror / Atom feed
From: <pbhagavatula@marvell.com>
To: <jerinj@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>,
	"Shijith Thotton" <sthotton@marvell.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 2/4] event/cnxk: avoid reading non cached registers
Date: Tue, 19 Jul 2022 16:41:23 +0530	[thread overview]
Message-ID: <20220719111125.8276-2-pbhagavatula@marvell.com> (raw)
In-Reply-To: <20220719111125.8276-1-pbhagavatula@marvell.com>

From: Pavan Nikhilesh <pbhagavatula@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@marvell.com>
---
 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 5782f3ed8f..653c51f616 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,
@@ -811,7 +820,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


  reply	other threads:[~2022-07-19 11:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 11:11 [PATCH 1/4] cnxk/net: add fc check in vector event Tx path pbhagavatula
2022-07-19 11:11 ` pbhagavatula [this message]
2022-09-21  6:15   ` [PATCH v2 1/3] event/cnxk: avoid reading non cached registers pbhagavatula
2022-09-21  6:15     ` [PATCH v2 2/3] event/cnxk: set dequeue mode to prefetch with wait pbhagavatula
2022-09-21  6:15     ` [PATCH v2 3/3] event/cnxk: disable timer resolution estimation pbhagavatula
2022-09-27 11:01       ` Jerin Jacob
2022-07-19 11:11 ` [PATCH 3/4] event/cnxk: set dequeue mode to prefetch with wait pbhagavatula
2022-07-19 11:11 ` [PATCH 4/4] event/cnxk: disable timer resolution estimation pbhagavatula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220719111125.8276-2-pbhagavatula@marvell.com \
    --to=pbhagavatula@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=sthotton@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).