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>,
	Rahul Bhansali <rbhansali@marvell.com>
Cc: <jerinj@marvell.com>
Subject: [PATCH v2 4/6] common/cnxk: fix inbound CPT LF ID
Date: Fri, 23 May 2025 21:23:45 +0530	[thread overview]
Message-ID: <20250523155347.1156891-4-rbhansali@marvell.com> (raw)
In-Reply-To: <20250523155347.1156891-1-rbhansali@marvell.com>

Inbound CPT LF ID was fixed to 0th index,
It fixes to update relative LF ID for Rx inline
config.

Fixes: fc9a711b5c8f ("common/cnxk: add NIX inline reassembly profile config")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
Changes in v2: updated the commit message.

 drivers/common/cnxk/roc_nix_inl.c      | 10 +++++++++-
 drivers/common/cnxk/roc_nix_inl_dev.c  |  4 +---
 drivers/common/cnxk/roc_nix_inl_priv.h |  2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 7e47151eee..bee8e25c7c 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -495,7 +495,7 @@ nix_inl_inb_ipsec_sa_tbl_setup(struct roc_nix *roc_nix)
 			if (!inl_dev->nb_inb_cptlfs)
 				def_cptq = 0;
 			else
-				def_cptq = inl_dev->nix_inb_qids[0];
+				def_cptq = inl_dev->nix_inb_qids[inl_dev->inb_cpt_lf_id];
 		}

 		res_addr_offset = (uint64_t)(inl_dev->res_addr_offset & 0xFF) << 48;
@@ -1997,6 +1997,14 @@ roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool enable)

 		inl_dev = idev->nix_inl_dev;

+		if (!roc_model_is_cn10k()) {
+			if (inl_rq->spb_ena) {
+				rc = -EINVAL;
+				plt_err("inline RQ enable is not supported rc=%d", rc);
+				return rc;
+			}
+		}
+
 		rc = nix_rq_ena_dis(&inl_dev->dev, inl_rq, enable);
 		if (rc)
 			return rc;
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
index 1f071df8ea..75d03c1077 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -385,7 +385,6 @@ nix_inl_nix_ipsec_cfg(struct nix_inl_dev *inl_dev, bool ena)
 			goto exit;
 		}

-		/*TODO default cptq */
 		if (!inl_dev->nb_inb_cptlfs)
 			def_cptq = 0;
 		else
@@ -646,11 +645,10 @@ nix_inl_nix_profile_config(struct nix_inl_dev *inl_dev, uint8_t profile_id)
 	sa_w = plt_log2_u32(max_sa);
 	sa_pow2_sz = plt_log2_u32(inb_sa_sz);

-	/*TODO default cptq, Assuming Reassembly cpt lf ID at inl_dev->inb_cpt_lf_id + 1 */
 	if (!inl_dev->nb_inb_cptlfs)
 		def_cptq = 0;
 	else
-		def_cptq = inl_dev->nix_inb_qids[inl_dev->inb_cpt_lf_id + 1];
+		def_cptq = inl_dev->nix_inb_qids[inl_dev->inb_cpt_lf_id];

 	res_addr_offset = (uint64_t)(inl_dev->res_addr_offset & 0xFF) << 48;
 	if (res_addr_offset)
diff --git a/drivers/common/cnxk/roc_nix_inl_priv.h b/drivers/common/cnxk/roc_nix_inl_priv.h
index 33073b2f34..5c12fb1160 100644
--- a/drivers/common/cnxk/roc_nix_inl_priv.h
+++ b/drivers/common/cnxk/roc_nix_inl_priv.h
@@ -134,7 +134,7 @@ struct nix_inl_dev {

 #define NIX_INL_REASS_GEN_CFG                                                                      \
 	(BIT_ULL(51) | (ROC_CPT_DFLT_ENG_GRP_SE << 48) |                                           \
-	 (ROC_IE_OW_MAJOR_OP_PROCESS_INBOUND_REASS << 32))
+	 (ROC_IE_OW_MAJOR_OP_PROCESS_INBOUND_REASS << 32 | ROC_IE_OW_INPLACE_BIT << 32))

 int nix_inl_sso_register_irqs(struct nix_inl_dev *inl_dev);
 void nix_inl_sso_unregister_irqs(struct nix_inl_dev *inl_dev);
--
2.25.1


  parent reply	other threads:[~2025-05-23 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 12:54 [PATCH 1/6] common/cnxk: config of CPT result address offset Rahul Bhansali
2025-05-19 12:54 ` [PATCH 2/6] common/cnxk: config CPT result address for cn20k Rahul Bhansali
2025-05-19 12:54 ` [PATCH 3/6] common/cnxk: update CPT parse header for O20 Rahul Bhansali
2025-05-19 12:54 ` [PATCH 4/6] common/cnxk: update inbound CPT LF ID Rahul Bhansali
2025-05-19 12:54 ` [PATCH 5/6] net/cnxk: update frag offset calculation Rahul Bhansali
2025-05-19 12:54 ` [PATCH 6/6] net/cnxk: update bufsize in lookup memory Rahul Bhansali
2025-05-23 15:53 ` [PATCH v2 1/6] common/cnxk: config of CPT result address offset Rahul Bhansali
2025-05-23 15:53   ` [PATCH v2 2/6] common/cnxk: config CPT result address for cn20k Rahul Bhansali
2025-05-23 15:53   ` [PATCH v2 3/6] common/cnxk: update CPT parse header for CN20k Rahul Bhansali
2025-05-23 15:53   ` Rahul Bhansali [this message]
2025-05-23 15:53   ` [PATCH v2 5/6] net/cnxk: update frag offset calculation Rahul Bhansali
2025-05-23 15:53   ` [PATCH v2 6/6] net/cnxk: fix bufsize in lookup memory Rahul Bhansali

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=20250523155347.1156891-4-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).