Subject: Re: user space virtio-net exits with "truncating packet" error

From: Or Gerlitz <[email-masked]>
Date: Tue, 19 May 2009 13:00:27 +0300

Michael Tokarev wrote:
> A trap which I've seen before. When compiling kvm userspace, ensure your kernel headers installed in
> /usr/include has the latest if_tun.h bits, in particular the TUNSETOFFLOAD
> and IFF_VNET_HDR definitions.

OKay, this seems to be part of my problems... the kvm-85 userspace build uses the header from /usr/include
where <linux/if_tun.h> is dated back to 2001 such that its way different from the 2.6.29.1 one, such that 
TUNSETOFFLOAD and IFF_VNET_HDR are not defined. This means that the qemu code doesn't attempt to issue TUNSETOFFLOAD, and doesn't include <linux/virtio_net.h> which has plus probably more implications. 

> One solution to this is just to copy that file from kernel-2.6.29.  Or
> maybe it's easier to add some -I flags to kvm compile commandline.

This would not be enough since it needs also the virtio_net header and I'm not clear what version, the kernel one  on the one that comes with qemu... Now, all this comes into play only with the qemu provided by kvm releases since the savannah one doesn't have the code that uses TUNSETOFFLOAD, IFF_VNET_HDR etc.

Avi - do you guys have some writeup / guidelines how to make all this work?
 
Or.