summaryrefslogtreecommitdiff
path: root/hw/virtio-net.c
diff options
context:
space:
mode:
authorDustin Kirkland <kirkland@canonical.com>2009-10-29 10:34:15 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-09 08:43:03 -0600
commit184bd0484533b725194fa517ddc271ffd74da7c9 (patch)
tree172e102c943918eb19fd96ecd732b690a52cc294 /hw/virtio-net.c
parent9f56640c8536a8dfb78fc05a39c1bf9921483b12 (diff)
downloadqemu-184bd0484533b725194fa517ddc271ffd74da7c9.tar.gz
whitelist host virtio networking features
This patch is a followup to 8eca6b1bc770982595db2f7207c65051572436cb, fixing crashes when guests with 2.6.25 virtio drivers have saturated virtio network connections. https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/458521 That patch should have been whitelisting *_HOST_* rather than the the *_GUEST_* features. I tested this by running an Ubuntu 8.04 Hardy guest (2.6.24 kernel + 2.6.25-virtio driver). I saturated both the incoming, and outgoing network connection with nc, seeing sustained 6MB/s up and 6MB/s down bitrates for ~20 minutes. Previously, this crashed immediately. Now, the guest does not crash and maintains network connectivity throughout the test. Signed-off-by: Dustin Kirkland <kirkland@canonical.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-net.c')
-rw-r--r--hw/virtio-net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 4b09a930ef..2f147e5226 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -187,10 +187,10 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev)
/* Linux kernel 2.6.25. It understood MAC (as everyone must),
* but also these: */
features |= (1 << VIRTIO_NET_F_MAC);
- features |= (1 << VIRTIO_NET_F_GUEST_CSUM);
- features |= (1 << VIRTIO_NET_F_GUEST_TSO4);
- features |= (1 << VIRTIO_NET_F_GUEST_TSO6);
- features |= (1 << VIRTIO_NET_F_GUEST_ECN);
+ features |= (1 << VIRTIO_NET_F_CSUM);
+ features |= (1 << VIRTIO_NET_F_HOST_TSO4);
+ features |= (1 << VIRTIO_NET_F_HOST_TSO6);
+ features |= (1 << VIRTIO_NET_F_HOST_ECN);
return features & virtio_net_get_features(vdev);
}