patch 'net/bonding: fix flow count query' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:31:35 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

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/09/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/32bf2f21f5f63399e5d67e2550ecf8daec3c063f

Thanks.

Luca Boccassi

---
>From 32bf2f21f5f63399e5d67e2550ecf8daec3c063f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A1rio=20Kuka?= <kuka at cesnet.cz>
Date: Wed, 3 Jan 2024 12:10:35 +0100
Subject: [PATCH] net/bonding: fix flow count query
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ]

The rte_flow_query_count structure returned from the bonding driver
always indicates that hits and bytes are invalid (bytes_set and
hits_set flags are zero) because bond_flow_query_count() from the
net/bonding driver does not set the bytes_set and hits_set flags.

Fixes: 49dad9028e2a ("net/bonding: support flow API")

Signed-off-by: Mário Kuka <kuka at cesnet.cz>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/bonding/rte_eth_bond_flow.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_flow.c b/drivers/net/bonding/rte_eth_bond_flow.c
index 65b77faae7..b38a9f89d0 100644
--- a/drivers/net/bonding/rte_eth_bond_flow.c
+++ b/drivers/net/bonding/rte_eth_bond_flow.c
@@ -180,6 +180,8 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow,
 
 	count->bytes = 0;
 	count->hits = 0;
+	count->bytes_set = 0;
+	count->hits_set = 0;
 	rte_memcpy(&slave_count, count, sizeof(slave_count));
 	for (i = 0; i < internals->slave_count; i++) {
 		ret = rte_flow_query(internals->slaves[i].port_id,
@@ -192,8 +194,12 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow,
 		}
 		count->bytes += slave_count.bytes;
 		count->hits += slave_count.hits;
+		count->bytes_set |= slave_count.bytes_set;
+		count->hits_set |= slave_count.hits_set;
 		slave_count.bytes = 0;
 		slave_count.hits = 0;
+		slave_count.bytes_set = 0;
+		slave_count.hits_set = 0;
 	}
 	return 0;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.418516355 +0000
+++ 0078-net-bonding-fix-flow-count-query.patch	2024-03-07 01:05:34.930942818 +0000
@@ -1 +1 @@
-From 02a2accb5f54183d448edf35902b71023ab908ac Mon Sep 17 00:00:00 2001
+From 32bf2f21f5f63399e5d67e2550ecf8daec3c063f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 71a91675f7..5d0be5caf5 100644
+index 65b77faae7..b38a9f89d0 100644
@@ -33,3 +34,3 @@
- 	rte_memcpy(&member_count, count, sizeof(member_count));
- 	for (i = 0; i < internals->member_count; i++) {
- 		ret = rte_flow_query(internals->members[i].port_id,
+ 	rte_memcpy(&slave_count, count, sizeof(slave_count));
+ 	for (i = 0; i < internals->slave_count; i++) {
+ 		ret = rte_flow_query(internals->slaves[i].port_id,
@@ -38,8 +39,8 @@
- 		count->bytes += member_count.bytes;
- 		count->hits += member_count.hits;
-+		count->bytes_set |= member_count.bytes_set;
-+		count->hits_set |= member_count.hits_set;
- 		member_count.bytes = 0;
- 		member_count.hits = 0;
-+		member_count.bytes_set = 0;
-+		member_count.hits_set = 0;
+ 		count->bytes += slave_count.bytes;
+ 		count->hits += slave_count.hits;
++		count->bytes_set |= slave_count.bytes_set;
++		count->hits_set |= slave_count.hits_set;
+ 		slave_count.bytes = 0;
+ 		slave_count.hits = 0;
++		slave_count.bytes_set = 0;
++		slave_count.hits_set = 0;


More information about the stable mailing list