]> git.ipfire.org Git - thirdparty/qemu.git/commit - hw/net/virtio-net.c
virtio-net: add vnet_hdr support
authorMark McLoughlin <markmc@redhat.com>
Thu, 22 Oct 2009 16:43:45 +0000 (17:43 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 27 Oct 2009 17:29:01 +0000 (12:29 -0500)
commit3a330134b3effa3494051763b38f12a24715d53a
tree028e208ec6392cf19a801e25c464e6178f95d05a
parent2596774ad27bbe478829343702e896bea4c621cb
virtio-net: add vnet_hdr support

With '-netdev tap,id=foo -nic model=virtio,netdev=foo' virtio-net can
detect that its peer (i.e. the tap backend) supports vnet headers
and advertise to the guest that it can send packets with partial
checksums and/or TSO packets.

One complication is that if we're migrating and the source host
supports IFF_VNET_HDR but the destination host doesn't, we can't then
stop the guest from using those features. In this scenario, we just
fail the migration.

[v2:
 - add has_vnet_hdr uint32_t field for ease of vmstate conversion
 - use qemu_error()
]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-net.c