On Oct 22, 2009, at 19:43, ext Mark McLoughlin wrote:
Hey,
Over a year ago we added some code to qemu-kvm.git which takes
advantage of the recent tun/tap IFF_VNET_HDR feature in order to
allow
virtio-net to send and receive packets with partial checksums and
segmentation offloaded:
http://article.gmane.org/gmane.comp.emulators.kvm.devel/20440
"This allows us to pass larger packets and packets with
partial checkums between the guest and the host, greatly
increasing the achievable bandwidth."
Unfortunately, that implementation was quite hacky as it
made some assumptions that would break if e.g. you added another
network client to a vlan where the feature had enabled.
Now that we have the -netdev parameter, we can more safely
pair the NIC and backend, allowing us to negatiate features like
this.
What follows is a somewhat cleaned up version of the code
from qemu-kvm.git. Further cleanups are probably possible, but I
think this much is mergeable. Some points of discussion:
I think this patch set has broken the QEMU build on OS X. The reason
is that there are some definitions in tap-linux.h which only gets
included in net.c if __linux__ is defined but the other parts of
net.c
which utilize definitions from tap-linux.h get compiled in
nevertheless. It compiles if all definitions (except for the extra
includes) from tap-linux.h are included for OS X as well. I've
attached below a sample of the compiler output.