* [PATCH] net/bonding: fix query-count flags not set
@ 2024-01-03 11:10 Mário Kuka
2024-02-08 22:27 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Mário Kuka @ 2024-01-03 11:10 UTC (permalink / raw)
To: Chas Williams, Min Hu (Connor), Declan Doherty, Matan Azrad
Cc: dev, Mário Kuka, matan
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")
Cc: matan@mellanox.com
Signed-off-by: Mário Kuka <kuka@cesnet.cz>
---
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 71a91675f7..5d0be5caf5 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(&member_count, count, sizeof(member_count));
for (i = 0; i < internals->member_count; i++) {
ret = rte_flow_query(internals->members[i].port_id,
@@ -192,8 +194,12 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow,
}
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;
}
return 0;
}
--
2.39.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/bonding: fix query-count flags not set
2024-01-03 11:10 [PATCH] net/bonding: fix query-count flags not set Mário Kuka
@ 2024-02-08 22:27 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2024-02-08 22:27 UTC (permalink / raw)
To: Mário Kuka, Chas Williams, Min Hu (Connor),
Declan Doherty, Matan Azrad
Cc: dev, matan
On 1/3/2024 11:10 AM, Mário Kuka wrote:
> 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")
> Cc: matan@mellanox.com
>
> Signed-off-by: Mário Kuka <kuka@cesnet.cz>
>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-08 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-03 11:10 [PATCH] net/bonding: fix query-count flags not set Mário Kuka
2024-02-08 22:27 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).