]> git.droids-corp.org - dpdk.git/commit
net/hns3: fix order of clearing imissed register in PF
authorHuisong Li <lihuisong@huawei.com>
Thu, 5 May 2022 12:27:01 +0000 (20:27 +0800)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Thu, 12 May 2022 08:28:54 +0000 (10:28 +0200)
commit1a1de9879f58b4fd202ecd481c56ae9777207fe9
tree759ef7b73d44f891a2fbced74e1d9f1bab3ca493
parent8c9e97ddbedd735f70a2e6b1d5d4ffef02a9b0b9
net/hns3: fix order of clearing imissed register in PF

Clearing imissed registers in PF hardware depends on the
'drop_stats_mode' in struct hns3_hw. The variable is initialized after
the "hns3_get_configuration". But, in current code, the clearing
operation runs before the function.
So this patch fixes this order. In addition, this patch extracts a
public function to initialize and uninitialize statistics to improve the
maintainability of these codes.

Fixes: 3e9f3042d7c8 ("net/hns3: add imissed packet stats")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev_vf.c
drivers/net/hns3/hns3_stats.c
drivers/net/hns3/hns3_stats.h