[tip:tools/kvm] kvm tools: Make virtio net work on older kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  b9b7f55729da42ed4de44935937ca715130ab9c5
Gitweb:     http://git.kernel.org/tip/b9b7f55729da42ed4de44935937ca715130ab9c5
Author:     Asias He <asias.hejun@xxxxxxxxx>
AuthorDate: Sun, 10 Jul 2011 07:58:18 +0800
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Sun, 10 Jul 2011 10:37:01 +0300

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 <john@xxxxxxxxxxx>
Signed-off-by: Asias He <asias.hejun@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/virtio/net.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c
index 3a9216d..f4ba79a 100644
--- a/tools/kvm/virtio/net.c
+++ b/tools/kvm/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;
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux