net/hns3: fix flow counter value
authorChengwen Feng <fengchengwen@huawei.com>
Wed, 31 Mar 2021 10:01:40 +0000 (18:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 8 Apr 2021 16:57:09 +0000 (18:57 +0200)
commita06c3b0e9f0a4807ee8ac145f58284ec49f2f33d
tree44fd82224ccfff219b84534813409fb335cd0653
parentf1c555219fee71fe76cc53955cd0c052c88b2848
net/hns3: fix flow counter value

User could create flow rules with specified counter by the action of
RTE_FLOW_ACTION_TYPE_COUNT, but the counter may retain the original
value when create.

This patch fix the bug by read the counter when creating the rule
because the counter is read-clear.

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