]> git.droids-corp.org - dpdk.git/commitdiff
net/hns3: fix querying flow director counter for out param
authorChengwen Feng <fengchengwen@huawei.com>
Fri, 7 May 2021 09:08:18 +0000 (17:08 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 11 May 2021 16:29:06 +0000 (18:29 +0200)
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 <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_flow.c

index 65c7f6ed88d340cd6fc5cac2ea8d68480b5402a7..82810e00e8e188cfb79b3fea9cbabb64c5bcdf72 100644 (file)
@@ -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;
 }