patch 'common/cnxk: fix SDP channel mask' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:38 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/13/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=a998d657f505d103e382eb9aaafca202a287cd9b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From a998d657f505d103e382eb9aaafca202a287cd9b Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh at marvell.com>
Date: Tue, 7 Nov 2023 12:10:09 +0530
Subject: [PATCH] common/cnxk: fix SDP channel mask
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit fd4934607097604db949ba1fab30f16861438949 ]

Channel mask field is incorrectly for SDP interface and it
is returning as 16 bits. Fixing it by truncating to 12 bits.

Fixes: 2703f1fa3200 ("common/cnxk: fix setting channel mask for SDP interfaces")

Signed-off-by: Satheesh Paul <psatheesh at marvell.com>
---
 drivers/common/cnxk/roc_npc.c   | 5 +++--
 drivers/common/cnxk/roc_npc.h   | 2 ++
 drivers/common/cnxk/version.map | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index bb478ec55b..a5b5f95dec 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -1264,7 +1264,7 @@ npc_vtag_action_program(struct roc_npc *roc_npc,
 	return 0;
 }
 
-static void
+void
 roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base, uint16_t *chan_mask)
 {
 	struct roc_nix *roc_nix = roc_npc->roc_nix;
@@ -1279,8 +1279,9 @@ roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base, uint16_t *
 		num_bits = (sizeof(uint32_t) * 8) - __builtin_clz(range) - 1;
 		/* Set mask for (15 - numbits) MSB bits */
 		*chan_mask = (uint16_t)~GENMASK(num_bits, 0);
+		*chan_mask &= 0xFFF;
 	} else {
-		*chan_mask = (uint16_t)GENMASK(15, 0);
+		*chan_mask = (uint16_t)GENMASK(11, 0);
 	}
 
 	mask = (uint16_t)GENMASK(num_bits, 0);
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 60f9c5d634..25e916ce08 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -385,4 +385,6 @@ int __roc_api roc_npc_mcam_init(struct roc_npc *roc_npc,
 				struct roc_npc_flow *flow, int mcam_id);
 int __roc_api roc_npc_mcam_move(struct roc_npc *roc_npc, uint16_t old_ent,
 				uint16_t new_ent);
+void __roc_api roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base,
+				       uint16_t *chan_mask);
 #endif /* _ROC_NPC_H_ */
diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map
index 17f0ec6b48..ae9eaf360c 100644
--- a/drivers/common/cnxk/version.map
+++ b/drivers/common/cnxk/version.map
@@ -353,6 +353,7 @@ INTERNAL {
 	roc_npc_mcam_write_entry;
 	roc_npc_mcam_read_counter;
 	roc_npc_profile_name_get;
+	roc_npc_sdp_channel_get;
 	roc_npc_validate_portid_action;
 	roc_ot_ipsec_inb_sa_init;
 	roc_ot_ipsec_outb_sa_init;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:25.451236900 +0800
+++ 0073-common-cnxk-fix-SDP-channel-mask.patch	2023-12-11 17:56:23.077652300 +0800
@@ -1 +1 @@
-From fd4934607097604db949ba1fab30f16861438949 Mon Sep 17 00:00:00 2001
+From a998d657f505d103e382eb9aaafca202a287cd9b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit fd4934607097604db949ba1fab30f16861438949 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index f2cf4d8a28..a0d88c0743 100644
+index bb478ec55b..a5b5f95dec 100644
@@ -23,2 +25,2 @@
-@@ -1422,7 +1422,7 @@ npc_inline_dev_ipsec_action_free(struct npc *npc, struct roc_npc_flow *flow)
- 	return 1;
+@@ -1264,7 +1264,7 @@ npc_vtag_action_program(struct roc_npc *roc_npc,
+ 	return 0;
@@ -32,2 +34,2 @@
-@@ -1437,8 +1437,9 @@ roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base, uint16_t *
- 		num_bits = (sizeof(uint32_t) * 8) - plt_clz32(range) - 1;
+@@ -1279,8 +1279,9 @@ roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base, uint16_t *
+ 		num_bits = (sizeof(uint32_t) * 8) - __builtin_clz(range) - 1;
@@ -44 +46 @@
-index 4b387f2a6b..b71ddd1578 100644
+index 60f9c5d634..25e916ce08 100644
@@ -47,4 +49,4 @@
-@@ -440,4 +440,6 @@ int __roc_api roc_npc_validate_portid_action(struct roc_npc *roc_npc_src,
- int __roc_api roc_npc_mcam_init(struct roc_npc *roc_npc, struct roc_npc_flow *flow, int mcam_id);
- int __roc_api roc_npc_mcam_move(struct roc_npc *roc_npc, uint16_t old_ent, uint16_t new_ent);
- void *__roc_api roc_npc_aged_flow_ctx_get(struct roc_npc *roc_npc, uint32_t mcam_id);
+@@ -385,4 +385,6 @@ int __roc_api roc_npc_mcam_init(struct roc_npc *roc_npc,
+ 				struct roc_npc_flow *flow, int mcam_id);
+ int __roc_api roc_npc_mcam_move(struct roc_npc *roc_npc, uint16_t old_ent,
+ 				uint16_t new_ent);
@@ -55 +57 @@
-index fffd2064be..aa884a8fe2 100644
+index 17f0ec6b48..ae9eaf360c 100644
@@ -58 +60,2 @@
-@@ -459,6 +459,7 @@ INTERNAL {
+@@ -353,6 +353,7 @@ INTERNAL {
+ 	roc_npc_mcam_write_entry;
@@ -60 +62,0 @@
- 	roc_npc_inl_mcam_read_counter;


More information about the stable mailing list