Chengchang Tang
1e28e842e0
net/hns3: fix imprecise statistics
Currently, the hns3 statistics may be inaccurate due to the following two problems: 1. Queue-level statistics are read from the firmware, and only one Rx or Tx can be read at a time. This results in a large time interval between reading multiple queues statistics in a stress scenario, such as 1280 queues used by a PF or 256 functions used at the same time. Especially when the 256 functions are used at the same time, the interval between every two firmware commands in a function can be huge, because the scheduling mechanism of the firmware is similar to RR. 2. The current statistics are read by type. The HW statistics are read first, and then the software statistics are read. Due to preceding reasons, HW reading may be time-consuming, which cause a synchronization problem between SW and HW statistics of the same queue. In this patch, queue-level statistics are directly read from the bar instead of the firmware, and all the statistics of a queue include HW and SW are read at a time to reduce inconsistency. Fixes: 8839c5e202f3 ("net/hns3: support device stats") Cc: stable@dpdk.org Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%