mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
vhost: disable on tap link down
qemu makes it possible to disable link at tap which is not communicated to the guest but causes all packets to be dropped. When vhost-net is enabled, vhost needs to be aware of both the virtio link_down and the peer link_down. we switch to userspace emulation when either is down. Signed-off-by: Michael S. Tsirkin <[email protected]> Reported-by: pradeep <[email protected]> Acked-by: Alex Williamson <[email protected]> Acked-by: Jason Wang <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
This commit is contained in:
1 parent
ab1cbe1c6d
commit
3299369856
1 file changed
+2
-1
+2
-1
@@ -115,7 +115,8 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status)
|
||||
if (!tap_get_vhost_net(n->nic->nc.peer)) {
|
||||
return;
|
||||
}
|
||||
if (!!n->vhost_started == virtio_net_started(n, status)) {
|
||||
if (!!n->vhost_started == virtio_net_started(n, status) &&
|
||||
!n->nic->nc.peer->link_down) {
|
||||
return;
|
||||
}
|
||||
if (!n->vhost_started) {
|
||||
|
||||
Reference in new issue
Block a user