Chengwen Feng
78dbb6f999
net/hns3: fix time delta calculation
Currently, driver uses gettimeofday() API to get the time, and then calculate the time delta, the delta will be used mainly in judging timeout process. But the time which gets from gettimeofday() API isn't monotonically increasing. The process may fail if the system time is changed. We use the following scheme to fix it: 1. Add hns3_clock_gettime() API which will get the monotonically increasing time. 2. Add hns3_clock_calctime_ms() API which will get the milliseconds of the monotonically increasing time. 3. Add hns3_clock_calctime_ms() API which will calc the milliseconds of a given time. Fixes: 2790c6464725 ("net/hns3: support device reset") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@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%