From 7ab816640c923f6e91beddcc196b1cad81cda524 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 7 May 2021 17:08:18 +0800 Subject: [PATCH] net/hns3: fix querying flow director counter for out param 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 Signed-off-by: Min Hu (Connor) --- 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 65c7f6ed88..82810e00e8 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.20.1