patch 'common/cnxk: fix duplicated branches' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:10:34 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/efb73d826d28d211d4c403ffd413e6deee63efd5
Thanks.
Kevin
---
>From efb73d826d28d211d4c403ffd413e6deee63efd5 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali at marvell.com>
Date: Tue, 17 Feb 2026 11:13:45 +0530
Subject: [PATCH] common/cnxk: fix duplicated branches
[ upstream commit bd2f563dbd3516bd71d749011686ce097847ad1f ]
With compiler option '-Wduplicated-branches', getting few
warnings such as "this condition has identical branches".
Macros are updated to address these warnings.
Bugzilla ID: 1811
Fixes: 0d9e323bacf0 ("common/cnxk: support for CN20K inline IPsec")
Fixes: c045d2e5cbbc ("common/cnxk: add CPT configuration")
Signed-off-by: Rahul Bhansali <rbhansali at marvell.com>
---
drivers/common/cnxk/hw/rvu.h | 2 ++
drivers/common/cnxk/roc_cpt.c | 7 +++----
drivers/common/cnxk/roc_nix_inl.c | 25 +++++++++----------------
drivers/common/cnxk/roc_nix_inl_dev.c | 6 +-----
drivers/common/cnxk/roc_nix_inl_dp.h | 3 +++
drivers/common/cnxk/roc_nix_priv.h | 4 ++--
6 files changed, 20 insertions(+), 27 deletions(-)
diff --git a/drivers/common/cnxk/hw/rvu.h b/drivers/common/cnxk/hw/rvu.h
index ed2ba996e0..6f02d1e3d2 100644
--- a/drivers/common/cnxk/hw/rvu.h
+++ b/drivers/common/cnxk/hw/rvu.h
@@ -106,4 +106,6 @@
#define RVU_VF_MSIX_PBAX(a) (0xf0000ull | (uint64_t)(a) << 3)
+#define RVU_BLOCK_ADDRX_DISC(a) RVU_PF_BLOCK_ADDRX_DISC(a)
+
/* CN20k RVU mbox registers */
#define RVU_MBOX_AF_AFPFX_TRIGX(a) (0x9000 | (a) << 3)
diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 83e0c9896b..edd73536e0 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -678,8 +678,7 @@ cpt_get_blkaddr(struct dev *dev)
* to a pffunc.
*/
- if (dev_is_vf(dev))
- off = RVU_VF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_CPT1);
- else
- off = RVU_PF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_CPT1);
+
+ /* PF and VF block address offset is same, hence using common offset */
+ off = RVU_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_CPT1);
reg = plt_read64(dev->bar2 + off);
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 683a9cc7ce..4ff2722dbe 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -20,4 +20,8 @@ PLT_STATIC_ASSERT(ROC_NIX_INL_OT_IPSEC_INB_SA_SZ == 1024);
PLT_STATIC_ASSERT(ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ ==
1UL << ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ_LOG2);
+PLT_STATIC_ASSERT(ROC_NIX_INL_OT_IPSEC_INB_SA_SZ == ROC_NIX_INL_OW_IPSEC_INB_SA_SZ);
+PLT_STATIC_ASSERT(ROC_NIX_INL_OT_IPSEC_INB_SA_SZ == ROC_NIX_INL_ON_IPSEC_INB_SA_SZ);
+PLT_STATIC_ASSERT(ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ == ROC_NIX_INL_OW_IPSEC_OUTB_SA_SZ);
+PLT_STATIC_ASSERT(ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ == ROC_NIX_INL_ON_IPSEC_OUTB_SA_SZ);
static int
@@ -422,10 +426,6 @@ nix_inl_inb_ipsec_sa_tbl_setup(struct roc_nix *roc_nix)
if (roc_nix->custom_inb_sa)
inb_sa_sz = ROC_NIX_INL_INB_CUSTOM_SA_SZ;
- else if (roc_model_is_cn9k())
- inb_sa_sz = ROC_NIX_INL_ON_IPSEC_INB_SA_SZ;
- else if (roc_model_is_cn10k())
- inb_sa_sz = ROC_NIX_INL_OT_IPSEC_INB_SA_SZ;
else
- inb_sa_sz = ROC_NIX_INL_OW_IPSEC_INB_SA_SZ;
+ inb_sa_sz = ROC_NIX_INL_IPSEC_INB_SA_SZ;
/* Alloc contiguous memory for Inbound SA's */
@@ -1212,8 +1212,7 @@ nix_inl_eng_caps_get(struct nix *nix)
inst.w4.s.opcode_major = ROC_LOADFVC_MAJOR_OP;
inst.w4.s.opcode_minor = ROC_LOADFVC_MINOR_OP;
- if (roc_model_is_cn9k() || roc_model_is_cn10k())
- inst.w7.s.egrp = ROC_LEGACY_CPT_DFLT_ENG_GRP_SE;
- else
- inst.w7.s.egrp = ROC_CPT_DFLT_ENG_GRP_SE;
+
+ /* SE engine group ID is same for all platform */
+ inst.w7.s.egrp = ROC_CPT_DFLT_ENG_GRP_SE;
/* Use 1 min timeout for the poll */
@@ -1610,11 +1609,5 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
goto skip_sa_alloc;
- /* CN9K SA size is different */
- if (roc_model_is_cn9k())
- sa_sz = ROC_NIX_INL_ON_IPSEC_OUTB_SA_SZ;
- else if (roc_model_is_cn10k())
- sa_sz = ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ;
- else
- sa_sz = ROC_NIX_INL_OW_IPSEC_OUTB_SA_SZ;
+ sa_sz = ROC_NIX_INL_IPSEC_OUTB_SA_SZ;
/* Alloc contiguous memory of outbound SA */
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
index 3a4f1ac1e7..f4f7435461 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -837,10 +837,6 @@ nix_inl_nix_setup(struct nix_inl_dev *inl_dev)
if (inl_dev->custom_inb_sa)
inb_sa_sz = ROC_NIX_INL_INB_CUSTOM_SA_SZ;
- else if (roc_model_is_cn9k())
- inb_sa_sz = ROC_NIX_INL_ON_IPSEC_INB_SA_SZ;
- else if (roc_model_is_cn10k())
+ else
inb_sa_sz = ROC_NIX_INL_OT_IPSEC_INB_SA_SZ;
- else
- inb_sa_sz = ROC_NIX_INL_OW_IPSEC_INB_SA_SZ;
/* Alloc contiguous memory for Inbound SA's */
diff --git a/drivers/common/cnxk/roc_nix_inl_dp.h b/drivers/common/cnxk/roc_nix_inl_dp.h
index eb101db179..6443770871 100644
--- a/drivers/common/cnxk/roc_nix_inl_dp.h
+++ b/drivers/common/cnxk/roc_nix_inl_dp.h
@@ -42,4 +42,7 @@
#define ROC_NIX_INL_OW_IPSEC_OUTB_SA_SZ_LOG2 9
+#define ROC_NIX_INL_IPSEC_INB_SA_SZ ROC_NIX_INL_OT_IPSEC_INB_SA_SZ
+#define ROC_NIX_INL_IPSEC_OUTB_SA_SZ ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ
+
/* Alignment of SA Base */
#define ROC_NIX_INL_SA_BASE_ALIGN BIT_ULL(16)
diff --git a/drivers/common/cnxk/roc_nix_priv.h b/drivers/common/cnxk/roc_nix_priv.h
index 308a62a70e..d4b3c7c1af 100644
--- a/drivers/common/cnxk/roc_nix_priv.h
+++ b/drivers/common/cnxk/roc_nix_priv.h
@@ -24,8 +24,8 @@
#define NIX_CQ_BP_THRESH_LEVEL_REF1 (60 * 256 / 100)
#define NIX_CQ_SEC_BP_THRESH_LEVEL_REF1 (50 * 256 / 100)
-#define NIX_CQ_LBP_THRESH_FRAC_REF1 (80 * 16 / 100)
+#define NIX_CQ_LBP_THRESH_FRAC_REF1 (80 * 16 / 100.0)
/* Apply LBP at 75% of actual BP */
-#define NIX_CQ_LBP_THRESH_FRAC (75 * 16 / 100)
+#define NIX_CQ_LBP_THRESH_FRAC (75 * 16 / 100.0)
#define NIX_CQ_FULL_ERRATA_SKID (1024ull * 256)
#define NIX_RQ_AURA_BP_THRESH(percent, limit, shift) ((((limit) * (percent)) / 100) >> (shift))
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:52.944249309 +0000
+++ 0152-common-cnxk-fix-duplicated-branches.patch 2026-02-26 10:16:47.223460426 +0000
@@ -1 +1 @@
-From bd2f563dbd3516bd71d749011686ce097847ad1f Mon Sep 17 00:00:00 2001
+From efb73d826d28d211d4c403ffd413e6deee63efd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd2f563dbd3516bd71d749011686ce097847ad1f ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -38 +39 @@
-index 132c051c94..21d5e7f2ba 100644
+index 83e0c9896b..edd73536e0 100644
@@ -54 +55 @@
-index aad2631673..a21c40acf1 100644
+index 683a9cc7ce..4ff2722dbe 100644
@@ -66 +67 @@
-@@ -428,10 +432,6 @@ nix_inl_inb_ipsec_sa_tbl_setup(struct roc_nix *roc_nix)
+@@ -422,10 +426,6 @@ nix_inl_inb_ipsec_sa_tbl_setup(struct roc_nix *roc_nix)
@@ -78 +79 @@
-@@ -1199,8 +1199,7 @@ nix_inl_eng_caps_get(struct nix *nix)
+@@ -1212,8 +1212,7 @@ nix_inl_eng_caps_get(struct nix *nix)
@@ -90 +91 @@
-@@ -1615,11 +1614,5 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
+@@ -1610,11 +1609,5 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
@@ -104 +105 @@
-index 727a2e2a81..35528efa46 100644
+index 3a4f1ac1e7..f4f7435461 100644
@@ -107 +108 @@
-@@ -838,10 +838,6 @@ nix_inl_nix_setup(struct nix_inl_dev *inl_dev)
+@@ -837,10 +837,6 @@ nix_inl_nix_setup(struct nix_inl_dev *inl_dev)
More information about the stable
mailing list