]> git.droids-corp.org - dpdk.git/commit
net/hns3: fix MAC and queues HW statistics overflow
authorHuisong Li <lihuisong@huawei.com>
Thu, 5 May 2022 12:27:02 +0000 (20:27 +0800)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Thu, 12 May 2022 08:28:54 +0000 (10:28 +0200)
commita65342d9d5d25cf0a9d44388325e2251daa83eba
tree69a8896c83c27f9b90203482330c1e6ddc76ec3c
parent1a1de9879f58b4fd202ecd481c56ae9777207fe9
net/hns3: fix MAC and queues HW statistics overflow

The MAC and queues statistics are 32-bit registers in hardware. If
hardware statistics are not obtained for a long time, these statistics
will be overflow.
So PF and VF driver have to periodically obtain and save these
statistics. Since the periodical task and the stats API are in different
threads, we introduce a statistics lock to protect the statistics.

Fixes: 8839c5e202f3 ("net/hns3: support device 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.h
drivers/net/hns3/hns3_ethdev_vf.c
drivers/net/hns3/hns3_stats.c
drivers/net/hns3/hns3_stats.h