Yuanhan Liu
aa9f060617
net/virtio: fix link status always being up
The virtio port link status will always be UP, even the port is stopped: testpmd> port stop 0 Stopping ports... Checking link statuses... Port 0 Link Up - speed 10000 Mbps - full-duplex Done The link status is queried by link_update callback when LSC is disabled. Which in turn queries the "status" field. However, the "status" is read-only. I couldn't think of some proper ways to change the status without doing device reset. Instead of doing (the heavy) reset at stop, this patch introduced a flag, which is set to 1 and 0 on start and stop, respectively. When it's set to 0, the link status is set to DOWN unconditionally. Fixes: a85786dc816f ("virtio: fix states handling during initialization") Cc: stable@dpdk.org Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.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 license for the core libraries and drivers. The kernel components are GPLv2 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%