patch 'net/nfp: store counter reset before zeroing flow query' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:58:57 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

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/01/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=375086efb5ad85cceee8ab3398125639d8544f80

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 375086efb5ad85cceee8ab3398125639d8544f80 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he at corigine.com>
Date: Fri, 9 Dec 2022 16:17:47 +0800
Subject: [PATCH] net/nfp: store counter reset before zeroing flow query
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 3fe4706ad0d8e86adcd9088939c66d74ad6d7d56 ]

The reset flag in the query structure are cleared by mistake, cause
the flow count never be reset, so the query API will always has count
value even the flow has stopped, and this will cause the flow never
been aged.

Fixes: 30ecce522732 ("net/nfp: support flow API")

Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 6f79d950db..d1d209ce13 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3809,6 +3809,7 @@ nfp_flow_stats_get(struct rte_eth_dev *dev,
 		struct rte_flow *nfp_flow,
 		void *data)
 {
+	bool reset;
 	uint32_t ctx_id;
 	struct rte_flow *flow;
 	struct nfp_flow_priv *priv;
@@ -3823,6 +3824,7 @@ nfp_flow_stats_get(struct rte_eth_dev *dev,
 	}

 	query = (struct rte_flow_query_count *)data;
+	reset = query->reset;
 	memset(query, 0, sizeof(*query));

 	ctx_id = rte_be_to_cpu_32(nfp_flow->payload.meta->host_ctx_id);
@@ -3834,7 +3836,7 @@ nfp_flow_stats_get(struct rte_eth_dev *dev,
 		query->bytes = stats->bytes;
 		query->hits_set = 1;
 		query->bytes_set = 1;
-		if (query->reset != 0) {
+		if (reset) {
 			stats->pkts = 0;
 			stats->bytes = 0;
 		}
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:41.899153400 +0800
+++ 0030-net-nfp-store-counter-reset-before-zeroing-flow-quer.patch	2023-02-27 14:08:40.739237000 +0800
@@ -1 +1 @@
-From 3fe4706ad0d8e86adcd9088939c66d74ad6d7d56 Mon Sep 17 00:00:00 2001
+From 375086efb5ad85cceee8ab3398125639d8544f80 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3fe4706ad0d8e86adcd9088939c66d74ad6d7d56 ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list