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: ma...@mellanox.com Signed-off-by: Mário Kuka <k...@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