mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-05 21:21:54 +00:00
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@jfloren.net> Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user