DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Bhansali <rbhansali@marvell.com>
To: <dev@dpdk.org>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Cc: <jerinj@marvell.com>, Rahul Bhansali <rbhansali@marvell.com>
Subject: [PATCH 1/2] common/cnxk: enable second pass RQ in mask config
Date: Thu, 27 Jun 2024 14:38:58 +0530	[thread overview]
Message-ID: <20240627090859.2860207-1-rbhansali@marvell.com> (raw)

This will enable second pass RQ and drop interrupt by default in
mask configuration to avoid buffer leak possibilities during dev
stop and interrupts to indicate drops if any.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/common/cnxk/roc_features.h | 6 ++++++
 drivers/common/cnxk/roc_nix_inl.c  | 9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_features.h b/drivers/common/cnxk/roc_features.h
index 3b512be132..6abb35c296 100644
--- a/drivers/common/cnxk/roc_features.h
+++ b/drivers/common/cnxk/roc_features.h
@@ -90,4 +90,10 @@ roc_feature_nix_has_rx_inject(void)
 	return (roc_model_is_cn10ka_b0() || roc_model_is_cn10kb());
 }
 
+static inline bool
+roc_feature_nix_has_second_pass_drop(void)
+{
+	return 0;
+}
+
 #endif
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 74a688abbd..a984ac56d9 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -734,6 +734,13 @@ nix_inl_rq_mask_cfg(struct roc_nix *roc_nix, bool enable)
 	msk_req->rq_set.xqe_drop_ena = 0;
 	msk_req->rq_set.spb_ena = 1;
 
+	if (!roc_feature_nix_has_second_pass_drop()) {
+		msk_req->rq_set.ena = 1;
+		msk_req->rq_set.rq_int_ena = 1;
+		msk_req->rq_mask.ena = 0;
+		msk_req->rq_mask.rq_int_ena = 0;
+	}
+
 	msk_req->rq_mask.len_ol3_dis = 0;
 	msk_req->rq_mask.len_ol4_dis = 0;
 	msk_req->rq_mask.len_il3_dis = 0;
@@ -1467,7 +1474,7 @@ roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool enable)
 	if (!idev)
 		return -EFAULT;
 
-	if (roc_feature_nix_has_inl_rq_mask()) {
+	if (roc_feature_nix_has_inl_rq_mask() && enable) {
 		rc = nix_inl_rq_mask_cfg(roc_nix, enable);
 		if (rc) {
 			plt_err("Failed to get rq mask rc=%d", rc);
-- 
2.25.1


             reply	other threads:[~2024-06-27  9:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27  9:08 Rahul Bhansali [this message]
2024-06-27  9:08 ` [PATCH 2/2] net/cnxk: avoid NPC Rx and MCAM entries disable Rahul Bhansali
2024-07-02 13:57   ` Jerin Jacob
2024-07-02 14:40 ` [PATCH v2 1/2] common/cnxk: enable second pass RQ in mask config Rahul Bhansali
2024-07-02 14:40   ` [PATCH v2 2/2] net/cnxk: fix to avoid NPC Rx and MCAM disable Rahul Bhansali
2024-07-03  7:49     ` Jerin Jacob

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=20240627090859.2860207-1-rbhansali@marvell.com \
    --to=rbhansali@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@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).