Hi, On 13:31 Thu 16 Dec , Guido Trotter wrote: > On Mon, Dec 13, 2010 at 3:21 PM, Apollon Oikonomopoulos > <[email protected]> wrote: > > Add two new functions, _OpenTap and _ProbeTapVnetHdr, to hypervisors.hv_kvm. > > > > Should they be in hv_kvm or in netutils.py? I was thinking about that too, but chose to use hv_kvm since KVM is the only user of this feature right now.
> > _ProbeTapVnetHdr checks if the host side supports IFF_VNET_HDR and thus a > > qemu-kvm instance with version >= 0.12.0 and virtio-net can leverage the > > kernel's capabilities to perform GSO (see code comments). > > > > Can you explain better in the comment what this exactly is and does? Is the following explanation ok? “_ProbeTapVnetHdr checks if the host kernel supports the virtio net header (IFF_VNET_HDR) feature. This feature allows KVM to request from 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. [1] struct virtio_net_hdr in include/linux/virtio_net.h” > > > _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. > > > > Note that constants from <linux/if_tun.h> need to be embedded in the code, > > but > > that's what qemu-kvm already does anyway. > > > > > Rest looks good! :) > > Thanks, > > Guido Thanks, Apollon
