patch 'net/cnxk: fix aged flow query' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:47:45 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.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/31/24. 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=23.11-staging

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 01c5db8d99fd3dc101cf9e6ebacbb6c150467529 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh at marvell.com>
Date: Fri, 2 Feb 2024 10:51:37 +0530
Subject: [PATCH] net/cnxk: fix aged flow query
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 4ebef525d40d74ca66b8d444ff154739ecc0908d ]

After all aged flows are destroyed, the aged_flows bitmap
is free-ed. Querying aged flows tries to access this bitmap
resulting in a segmentation fault. Fixing this by not accessing
the bitmap if no aged flows are present.

Fixes: 357f5ebc8a24 ("common/cnxk: support flow aging")

Signed-off-by: Satheesh Paul <psatheesh at marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark at marvell.com>
---
 drivers/common/cnxk/roc_npc_aging.c | 4 ++++
 drivers/net/cnxk/cnxk_flow.c        | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/common/cnxk/roc_npc_aging.c b/drivers/common/cnxk/roc_npc_aging.c
index 254dd2139b..e0f2dc2291 100644
--- a/drivers/common/cnxk/roc_npc_aging.c
+++ b/drivers/common/cnxk/roc_npc_aging.c
@@ -234,8 +234,11 @@ npc_age_flow_list_entry_delete(struct roc_npc *roc_npc,
 {
 	struct npc *npc = roc_npc_to_npc_priv(roc_npc);
 	struct npc_age_flow_list_head *list;
+	struct roc_npc_flow_age *flow_age;
 	struct npc_age_flow_entry *curr;

+	flow_age = &roc_npc->flow_age;
+
 	list = &npc->age_flow_list;
 	curr = TAILQ_FIRST(list);

@@ -244,6 +247,7 @@ npc_age_flow_list_entry_delete(struct roc_npc *roc_npc,

 	while (curr) {
 		if (flow->mcam_id == curr->flow->mcam_id) {
+			plt_bitmap_clear(flow_age->aged_flows, flow->mcam_id);
 			TAILQ_REMOVE(list, curr, next);
 			plt_free(curr);
 			break;
diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index 800ae5d1df..be0330fa04 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -508,6 +508,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context,

 	flow_age = &roc_npc->flow_age;

+	if (!flow_age->age_flow_refcnt)
+		return 0;
+
 	do {
 		sn = plt_seqcount_read_begin(&flow_age->seq_cnt);

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.689993023 +0800
+++ 0124-net-cnxk-fix-aged-flow-query.patch	2024-03-05 17:39:30.963566499 +0800
@@ -1 +1 @@
-From 4ebef525d40d74ca66b8d444ff154739ecc0908d Mon Sep 17 00:00:00 2001
+From 01c5db8d99fd3dc101cf9e6ebacbb6c150467529 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4ebef525d40d74ca66b8d444ff154739ecc0908d ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -46 +48 @@
-index a92b61c332..4deccd1a67 100644
+index 800ae5d1df..be0330fa04 100644
@@ -49 +51 @@
-@@ -616,6 +616,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context,
+@@ -508,6 +508,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context,


More information about the stable mailing list