From 7ac71f4f54d579c5251a79d7981fcc073be27d7c Mon Sep 17 00:00:00 2001 From: Asias He Date: Sun, 10 Jul 2011 07:58:18 +0800 Subject: [PATCH] kvm tools: Make virtio net work on older kernels Some old kernels do not support TUNSETVNETHDRSZ ioctl which modifies the virtio net header size. The default header size should work, so let's go on if the TUNSETVNETHDRSZ ioctl is not supported and just give a warnning. Reported-by: John Floren Signed-off-by: Asias He Signed-off-by: Pekka Enberg --- virtio/net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/virtio/net.c b/virtio/net.c index 3a9216d..f4ba79a 100644 --- a/virtio/net.c +++ b/virtio/net.c @@ -348,7 +348,6 @@ static bool virtio_net__tap_init(const struct virtio_net_parameters *params) hdr_len = sizeof(struct virtio_net_hdr); if (ioctl(ndev.tap_fd, TUNSETVNETHDRSZ, &hdr_len) < 0) { pr_warning("Config tap device TUNSETVNETHDRSZ error"); - goto fail; } offload = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | TUN_F_UFO;