~ubuntu-branches/ubuntu/jaunty/kvm/jaunty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/virtio-net_disable_gso.patch

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2009-04-02 11:08:34 UTC
  • Revision ID: james.westby@ubuntu.com-20090402110834-nqkd4esz0xvasf31
Tags: 1:84+dfsg-0ubuntu10
debian/patches/virtio-net_disable_gso.patch: hardy guest kernels
do not have working gso support.  Disable it for everyone until
we have a work around, LP: #331128.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Work around broken virtio drivers in 2.6.26
 
2
 
 
3
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
 
4
 
 
5
diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
 
6
index 9bce3a0..5b615f9 100644
 
7
--- a/qemu/hw/virtio-net.c
 
8
+++ b/qemu/hw/virtio-net.c
 
9
@@ -120,6 +120,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev)
 
10
 
 
11
     if (tap_has_vnet_hdr(host)) {
 
12
         tap_using_vnet_hdr(host, 1);
 
13
+#if 0
 
14
+        /* Stop advertising advanced features until we work around the fact
 
15
+         * that this is totally broken in 2.6.26 kernels */
 
16
         features |= (1 << VIRTIO_NET_F_CSUM);
 
17
         features |= (1 << VIRTIO_NET_F_GUEST_CSUM);
 
18
         features |= (1 << VIRTIO_NET_F_GUEST_TSO4);
 
19
@@ -130,6 +133,7 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev)
 
20
         features |= (1 << VIRTIO_NET_F_HOST_ECN);
 
21
         features |= (1 << VIRTIO_NET_F_MRG_RXBUF);
 
22
         /* Kernel can't actually handle UFO in software currently. */
 
23
+#endif
 
24
     }
 
25
 #endif
 
26
 
 
27
@@ -374,8 +378,14 @@ static int receive_header(VirtIONet *n, struct iovec *iov, int iovcnt,
 
28
     struct virtio_net_hdr *hdr = iov[0].iov_base;
 
29
     int offset = 0;
 
30
 
 
31
+#if 0
 
32
     hdr->flags = 0;
 
33
     hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;
 
34
+#else
 
35
+    /* we need to clear out the whole header, including any garbage that may be
 
36
+     */
 
37
+    memset(hdr, 0, sizeof(*hdr));
 
38
+#endif
 
39
 
 
40
 #ifdef TAP_VNET_HDR
 
41
     if (tap_has_vnet_hdr(n->vc->vlan->first_client)) {