]> git.proxmox.com Git - qemu.git/commit
net: notify peer about link status change
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 9 Feb 2011 16:45:04 +0000 (18:45 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 20 Feb 2011 17:05:48 +0000 (18:05 +0100)
commitab1cbe1c6df3c1f11db42148f929113ad9608ba1
treeeacd3f0b0c238313d589a4b4bdc7112fbdfbc71e
parentf45a11088b9971470218e156f8c78a5fce33adb5
net: notify peer about link status change

qemu makes it possible to disable link at tap which is not communicated
to the guest but causes all packets to be dropped.

This works for virtio userspace, as qemu stops giving it packets, but
not for virtio-net connected to vhost-net as that does not get notified
about this change.

Notify peer when this happens, which will then be used by the follow-up
patch to stop/start vhost-net.

Note: it might be a good idea to make peer link status match tap in this
case, so the guest gets an event and updates the carrier state. For now
stay bug for bug compatible with what we used to have in userspace.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reported-by: pradeep <psuriset@linux.vnet.ibm.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
net.c