net: virtio-net discards TX data after link down
commit283e2c2adcb80148c7f67d71d52134af80d2fbae
authorYuri Benditovich <yuri.benditovich@daynix.com>
Tue, 13 Dec 2016 08:12:08 +0000 (13 10:12 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 10 Jan 2017 05:02:53 +0000 (10 07:02 +0200)
tree8947518e597f5d5f8eb370dd95718754406c6de4
parent54e17709ac2d2ea8275101655fe746bba7ae0064
net: virtio-net discards TX data after link down

https://bugzilla.redhat.com/show_bug.cgi?id=1295637
Upon set_link monitor command or upon netdev deletion
virtio-net sends link down indication to the guest
and stops vhost if one is used.
Guest driver can still submit data for TX until it
recognizes link loss. If these packets not returned by
the host, the Windows guest will never be able to finish
disable/removal/shutdown.
Now each packet sent by guest after NIC indicated link
down will be completed immediately.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c