Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Specifying names for tap interfaces
On 21.06.2012 17:10, Manuel Bouyer wrote:
> On Thu, Jun 21, 2012 at 12:16:17PM +0100, Roger Pau Monne wrote:
>> As I said on a previous email, how can you guarantee that the name
>> you chose and pass to Qemu will not be taken by someone else while
>> you are calling Qemu?
>>
>> You might even be launching several guests at the same time, which
>> will lead you to a race.
>
> This is a problem with name, but not if you use the fd-type setup:
> - xl opens /dev/tap, which creates the tap device (so xl knows the name) and
> a file descriptor (which I'll call n)
> - fork and exec qemu with: -net tap,vlan=0,fd=n
> - the xl parent process closes n.
>
> in this setup, qemu reuses the already-existing tape device and doesn't
> create a new one, so no race condition possible here.
> This should fix the problem.
I like this idea, I did not know we could pass down a fdes to Qemu.
I would recommend this if it works. That gives us some time to think
about interfaces/devices xaliases instead of rushing it for
Qemu-upstream support.
--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost
Home |
Main Index |
Thread Index |
Old Index