DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] common/cnxk: enable second pass RQ in mask config
@ 2024-06-27  9:08 Rahul Bhansali
  2024-06-27  9:08 ` [PATCH 2/2] net/cnxk: avoid NPC Rx and MCAM entries disable Rahul Bhansali
  2024-07-02 14:40 ` [PATCH v2 1/2] common/cnxk: enable second pass RQ in mask config Rahul Bhansali
  0 siblings, 2 replies; 6+ messages in thread
From: Rahul Bhansali @ 2024-06-27  9:08 UTC (permalink / raw)
  To: dev, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
	Satha Rao, Harman Kalra
  Cc: jerinj, Rahul Bhansali

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


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

end of thread, other threads:[~2024-07-03  7:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-27  9:08 [PATCH 1/2] common/cnxk: enable second pass RQ in mask config Rahul Bhansali
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

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).