KVM: Add auxiliary functions to handle tap devices
Add two new functions, _OpenTap and _ProbeTapVnetHdr, to hypervisors.hv_kvm. _ProbeTapVnetHdr checks if the host kernel supports the virtio net header (IFF_VNET_HDR) feature. This feature allows KVM to ask the the host kernel to perform checksumming and segmentation offload of the data passing through a guest's virtio NIC, using a special header[1] prepended to data sent through the tap interface. A qemu-kvm version later than 0.12 is required for this feature to work. _OpenTap opens a new tap device suitable for use with qemu-kvm's "-net tap,fd=n" option. It also enables vnet_hdr support if requested and safe to do so. [1] struct virtio_net_hdr in include/linux/virtio_net.h Signed-off-by:Apollon Oikonomopoulos <apollon@noc.grnet.gr> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
Loading
Please register or sign in to comment