[dpdk-dev] [PATCH] net/virtio: fix link status always being up
yuanhan.liu at linux.intel.com
Wed Apr 19 04:08:00 CEST 2017
On Fri, Apr 14, 2017 at 02:36:45PM +0800, Yuanhan Liu wrote:
> 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
> 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 at dpdk.org
> Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Applied to dpdk-next-virtio.
More information about the dev