Thread (16 messages) 16 messages, 4 authors, 2021-07-04

[dpdk-dev] [PATCH 5/6] net/hns3: fix out param not set when query FDIR counter

From: Min Hu (Connor) <hidden>
Date: 2021-05-07 09:08:27
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Chengwen Feng <redacted>

The hardware doesn't support counting the number of bytes that through
the fdir rule. Therefore, the corresponding out parameters (e.g.
bytes_set/bytes) is set to zero.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <redacted>
Signed-off-by: Min Hu (Connor) <redacted>
---
 drivers/net/hns3/hns3_flow.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 65c7f6e..82810e0 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -223,6 +223,8 @@ hns3_counter_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 	}
 	qc->hits_set = 1;
 	qc->hits = value;
+	qc->bytes_set = 0;
+	qc->bytes = 0;
 
 	return 0;
 }
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help