[libvirt PATCH] Adds e1000e/vmxnet3 Vnet_hdr suuport
Daniel P. Berrangé
berrange at redhat.com
Fri Aug 7 16:16:39 UTC 2020
On Thu, Aug 06, 2020 at 10:53:32PM -0400, Patrick Magauran wrote:
> Libvirt bases its decision about whether to apply the vnet_hdr flag to the tap interface on whether or not the selected model is VirtIO. Originally, VirtIO was the only model to support the vnet_hdr in QEMU; however, the e1000e & vmxnet3 adapters also support it(seemingly from introduction based on commits). This passes the whole packet to the host, reducing emulation overhead and improving performance.
>
> Signed-off-by: Patrick Magauran <patmagauran.j at gmail.com>
> ---
> src/conf/domain_conf.c | 8 +++++++-
> src/conf/domain_conf.h | 1 +
> src/libvirt_private.syms | 1 +
> src/qemu/qemu_interface.c | 8 ++++----
> 4 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 69e0439e7e..cb184110f7 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -30981,7 +30981,13 @@ virDomainNetIsVirtioModel(const virDomainNetDef *net)
> net->model == VIR_DOMAIN_NET_MODEL_VIRTIO_TRANSITIONAL ||
> net->model == VIR_DOMAIN_NET_MODEL_VIRTIO_NON_TRANSITIONAL);
> }
> -
> +bool
> +virDomainNetIsVnetCompatModel(const virDomainNetDef *net)
> +{
> + return (virDomainNetIsVirtioModel(net) ||
> + net->model == VIR_DOMAIN_NET_MODEL_E1000E ||
> + net->model == VIR_DOMAIN_NET_MODEL_VMXNET3);
> +}
Should really live in the qemu_inteface.c file, with
a qemuOnterfaceIsVnetCompatModel name, since the decision
is inherantly tied to QEMU, and inappropriate for other
virt drivers.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list