From: "Mário Kuka" <kuka@cesnet.cz>
To: Chas Williams <chas3@att.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Declan Doherty <declan.doherty@intel.com>,
Matan Azrad <matan@nvidia.com>
Cc: dev@dpdk.org, "Mário Kuka" <kuka@cesnet.cz>, matan@mellanox.com
Subject: [PATCH] net/bonding: fix query-count flags not set
Date: Wed, 3 Jan 2024 12:10:35 +0100 [thread overview]
Message-ID: <20240103111035.361905-1-kuka@cesnet.cz> (raw)
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
next reply other threads:[~2024-01-03 11:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 11:10 Mário Kuka [this message]
2024-02-08 22:27 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240103111035.361905-1-kuka@cesnet.cz \
--to=kuka@cesnet.cz \
--cc=chas3@att.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=humin29@huawei.com \
--cc=matan@mellanox.com \
--cc=matan@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).