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>, Rakesh Kudurumalla <rkudurumalla@marvell.com>
Subject: [PATCH v2 16/18] common/cnxk: initialize CPT LF for CQ config
Date: Tue, 17 Feb 2026 11:13:43 +0530 [thread overview]
Message-ID: <20260217054345.2759687-16-rbhansali@marvell.com> (raw)
In-Reply-To: <20260217054345.2759687-1-rbhansali@marvell.com>
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Initialize inline outbound CPT LF for CPT CQ
configurations.
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
Changes in v2: No change.
drivers/common/cnxk/roc_nix_inl.c | 42 +++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 8 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 917c2c669a..86d571c6e2 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -1573,8 +1573,18 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
lf->msixoff = nix->cpt_msixoff[i];
lf->pci_dev = nix->pci_dev;
+ if (roc_feature_nix_has_cpt_cq_support()) {
+ if (inl_dev && inl_dev->cpt_cq_ena) {
+ lf->dq_ack_ena = true;
+ lf->cpt_cq_ena = true;
+ lf->cq_entry_size = 0;
+ lf->cq_all = 0;
+ lf->cq_size = lf->nb_desc;
+ }
+ }
+
/* Setup CPT LF instruction queue */
- rc = cpt_lf_init(lf, false);
+ rc = cpt_lf_init(lf, lf->cpt_cq_ena);
if (rc) {
plt_err("Failed to initialize CPT LF, rc=%d", rc);
goto lf_fini;
@@ -1591,6 +1601,13 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
/* Enable IQ */
roc_cpt_iq_enable(lf);
+ /* Enable CQ */
+ if (lf->cpt_cq_ena) {
+ rc = cpt_lf_register_irqs(lf, cpt_lf_misc_irq, nix_inl_cpt_done_irq);
+ if (rc)
+ goto lf_fini;
+ roc_cpt_cq_enable(lf);
+ }
}
if (!roc_nix->ipsec_out_max_sa)
@@ -1635,6 +1652,9 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
nix->outb_se_ring_base =
roc_nix->port_id * ROC_NIX_SOFT_EXP_PER_PORT_MAX_RINGS;
+ /* Fetch engine capabilities */
+ nix_inl_eng_caps_get(nix);
+
if (inl_dev == NULL || !inl_dev->set_soft_exp_poll) {
nix->outb_se_ring_cnt = 0;
return 0;
@@ -1658,13 +1678,15 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
}
}
- /* Fetch engine capabilities */
- nix_inl_eng_caps_get(nix);
return 0;
lf_fini:
- for (j = i - 1; j >= 0; j--)
- cpt_lf_fini(&lf_base[j], false);
+ for (j = i - 1; j >= 0; j--) {
+ lf = &lf_base[j];
+ cpt_lf_fini(lf, lf->cpt_cq_ena);
+ if (lf->cpt_cq_ena)
+ cpt_lf_unregister_irqs(lf, cpt_lf_misc_irq, nix_inl_cpt_done_irq);
+ }
plt_free(lf_base);
lf_free:
rc |= cpt_lfs_free(dev);
@@ -1681,6 +1703,7 @@ roc_nix_inl_outb_fini(struct roc_nix *roc_nix)
struct idev_cfg *idev = idev_get_cfg();
struct dev *dev = &nix->dev;
struct nix_inl_dev *inl_dev;
+ struct roc_cpt_lf *lf;
uint64_t *ring_base;
int i, rc, ret = 0;
@@ -1690,9 +1713,12 @@ roc_nix_inl_outb_fini(struct roc_nix *roc_nix)
nix->inl_outb_ena = false;
/* Cleanup CPT LF instruction queue */
- for (i = 0; i < nix->nb_cpt_lf; i++)
- cpt_lf_fini(&lf_base[i], false);
-
+ for (i = 0; i < nix->nb_cpt_lf; i++) {
+ lf = &lf_base[i];
+ cpt_lf_fini(lf, lf->cpt_cq_ena);
+ if (lf->cpt_cq_ena)
+ cpt_lf_unregister_irqs(lf, cpt_lf_misc_irq, nix_inl_cpt_done_irq);
+ }
/* Free LF resources */
rc = cpt_lfs_free(dev);
if (rc)
--
2.34.1
next prev parent reply other threads:[~2026-02-17 5:45 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 6:02 [PATCH 01/18] common/cnxk: fix engine capabilities fetch logic Rahul Bhansali
2026-01-28 6:03 ` [PATCH 02/18] common/cnxk: remove dependency on cryptodev for RXC Rahul Bhansali
2026-01-28 6:03 ` [PATCH 03/18] common/cnxk: support inbound pdb configuration Rahul Bhansali
2026-01-28 6:03 ` [PATCH 04/18] common/cnxk: update CPT RXC structures Rahul Bhansali
2026-01-28 6:03 ` [PATCH 05/18] common/cnxk: update inline profile ID for cn20k Rahul Bhansali
2026-01-28 6:03 ` [PATCH 06/18] common/cnxk: update inline RQ mask Rahul Bhansali
2026-01-28 6:03 ` [PATCH 07/18] net/cnxk: avoid security flag for custom inbound SA Rahul Bhansali
2026-01-28 6:03 ` [PATCH 08/18] net/cnxk: add CPT code check for soft expiry Rahul Bhansali
2026-01-28 6:03 ` [PATCH 09/18] net/cnxk: skip write SA for cn20k Rahul Bhansali
2026-01-28 6:03 ` [PATCH 10/18] net/cnxk: update NIX reassembly fast path Rahul Bhansali
2026-01-28 6:03 ` [PATCH 11/18] net/cnxk: update aura batch free Rahul Bhansali
2026-01-28 6:03 ` [PATCH 12/18] net/cnxk: update fastpath function for OOP Rahul Bhansali
2026-01-28 6:03 ` [PATCH 13/18] event/cnxk: " Rahul Bhansali
2026-01-28 6:03 ` [PATCH 14/18] common/cnxk: flow rule config for non-inplace Rahul Bhansali
2026-01-28 6:03 ` [PATCH 15/18] net/cnxk: enable PDB in IPsec outbound path Rahul Bhansali
2026-01-28 6:03 ` [PATCH 16/18] common/cnxk: initialize CPT LF for CQ config Rahul Bhansali
2026-01-28 6:03 ` [PATCH 17/18] common/cnxk: fix CPT CQ roll over handling Rahul Bhansali
2026-01-28 6:03 ` [PATCH 18/18] common/cnxk: fix duplicate branch compiler warning Rahul Bhansali
2026-01-28 17:52 ` [REVIEW] " Stephen Hemminger
2026-02-11 8:13 ` [PATCH 18/18] " Jerin Jacob
2026-02-17 5:43 ` [PATCH v2 01/18] common/cnxk: fix engine capabilities fetch logic Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 02/18] common/cnxk: remove dependency on cryptodev for RXC Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 03/18] common/cnxk: support inbound pdb configuration Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 04/18] common/cnxk: update CPT RXC structures Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 05/18] common/cnxk: update inline profile ID for cn20k Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 06/18] common/cnxk: update inline RQ mask configuration Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 07/18] net/cnxk: fix security flag for custom inbound SA Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 08/18] net/cnxk: add CPT code check for soft expiry Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 09/18] net/cnxk: skip write SA for cn20k Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 10/18] net/cnxk: update NIX reassembly fast path Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 11/18] net/cnxk: update aura batch free Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 12/18] net/cnxk: support out of place (OOP) in fastpath Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 13/18] event/cnxk: " Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 14/18] common/cnxk: flow rule config for non-inplace Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 15/18] net/cnxk: enable PDB in IPsec outbound path Rahul Bhansali
2026-02-17 5:43 ` Rahul Bhansali [this message]
2026-02-17 5:43 ` [PATCH v2 17/18] common/cnxk: fix CPT CQ roll over handling Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 18/18] common/cnxk: fix duplicate branch compiler warning Rahul Bhansali
2026-02-17 17:20 ` 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=20260217054345.2759687-16-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=rkudurumalla@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