[libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

Laine Stump laine at laine.org
Fri Dec 5 18:43:10 UTC 2014


On 12/05/2014 06:12 AM, Michal Privoznik wrote:
> @@ -7374,7 +7399,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
>      }
>  
>      if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
> -        actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) {
> +        actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
> +        actualType == VIR_DOMAIN_NET_TYPE_ETHERNET) {
>          tapfdSize = net->driver.virtio.queues;
>          if (!tapfdSize)
>              tapfdSize = 1;

So this patch causes libvirt to *always* create a tap device in the
traditional manner for type='ethernet'. I wonder if we can safely do
this without unknowingly breaking some strange functionality. In
particular, what if someone is using type='ethernet' and a script to
create some *other* kind of device that outwardly appears to be a tap
device, but is created in a different manner - currently you can do this
by using type='ethernet' and calling your strange "create my
Franken-tap" command from the script. Once this patch is in, you'll no
longer be able to do this.

(As a matter of fact, I'm getting some sort of phantom memory about
someone doing that for some different kind of virtual switch, or
possibly some piece of hardware. I can't remember the details though,
and it's possible that I'm mistaken - maybe they *were* just creating a
standard tap device, but then doing strange things to it.)




More information about the libvir-list mailing list