diff options
Diffstat (limited to 'hw/virtio-net.c')
-rw-r--r-- | hw/virtio-net.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 064ec2e609..bfe1366c5e 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -157,6 +157,11 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) features |= (1 << VIRTIO_NET_F_GUEST_TSO4); features |= (1 << VIRTIO_NET_F_GUEST_TSO6); features |= (1 << VIRTIO_NET_F_GUEST_ECN); + + if (tap_has_ufo(n->vc->peer)) { + features |= (1 << VIRTIO_NET_F_GUEST_UFO); + features |= (1 << VIRTIO_NET_F_HOST_UFO); + } } return features; @@ -188,7 +193,8 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) (features >> VIRTIO_NET_F_GUEST_CSUM) & 1, (features >> VIRTIO_NET_F_GUEST_TSO4) & 1, (features >> VIRTIO_NET_F_GUEST_TSO6) & 1, - (features >> VIRTIO_NET_F_GUEST_ECN) & 1); + (features >> VIRTIO_NET_F_GUEST_ECN) & 1, + (features >> VIRTIO_NET_F_GUEST_UFO) & 1); } } @@ -748,7 +754,8 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) (n->vdev.features >> VIRTIO_NET_F_GUEST_CSUM) & 1, (n->vdev.features >> VIRTIO_NET_F_GUEST_TSO4) & 1, (n->vdev.features >> VIRTIO_NET_F_GUEST_TSO6) & 1, - (n->vdev.features >> VIRTIO_NET_F_GUEST_ECN) & 1); + (n->vdev.features >> VIRTIO_NET_F_GUEST_ECN) & 1, + (n->vdev.features >> VIRTIO_NET_F_GUEST_UFO) & 1); } } |