[libvirt] [PROPOSED PATCH] Change the creation of the TAP interface for generic ethernet interfaces

Eric Blake eblake at redhat.com
Fri Jul 8 21:21:22 UTC 2011


On 07/07/2011 06:49 PM, Tyler Coumbes wrote:
> The code changes it so that the TAP interface is created by libvirt
> and then the file descriptor is passed to qemu. Much like what is done
> when using bridged networking. This is done using fd= instead of
> ifname= just like with the bridged networking.

And in general this agrees with our overall desire to use fd passing
instead of filename passing, so I'm all for seeing this patch polished
against the latest libvirt.git.

> Option 1:
> 
> Proposed change would be that if there is no script parameter it is
> assumed that fd= is used instead of ifname= and if script= is present
> then use ifname=
> 
> Would use fd= after the patch.
> <interface type='ethernet'>
>     <target dev='tap0'/>
> </interface>
> 
> Would use ifname= after patch since it has a script= parameter. If a
> script parameter is needed the work around would still need to be in
> place.
> <interface type='ethernet'>
>     <target dev='tap0'/>
>     <script path='/etc/qemu-ifup'/>
> </interface>

I prefer this.  Libvirt is allowed to use the optimal interface under
the hood - the only reason to expose to the user which interface libvirt
is using is if there is ever a reason to suspect that using an fd is not
always optimal, and that a user would want to choose an alternate method
to experiment if the alternate method really is better in their case.

> 
> I like option 1 unless anyone sees an issue with that method.

Good to here, since I liked it too!

Looking forward to patches.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110708/06d8cc07/attachment-0001.sig>


More information about the libvir-list mailing list