tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing tap(4) behaviour



In article <20081129214115.GY25486%shaak.vert-toit.net@localhost>,
Quentin Garnier  <cube%cubidou.net@localhost> wrote:
>-=-=-=-=-=-
>
>On Sat, Nov 29, 2008 at 03:55:49PM -0500, Arnaud Lacombe wrote:
>> On Sat, Nov 29, 2008 at 3:21 PM, Quentin Garnier 
>> <cube%cubidou.net@localhost> wrote:
>> > On Sat, Nov 29, 2008 at 03:05:46PM -0500, Arnaud Lacombe wrote:
>> >> Hi Folks,
>> >>
>> >> People currently using qemu(1) need to use a dirty static fd-based
>> >> trick to link the created interface to qemu(1). This is due to the
>> >> fact that 1) qemu doesn't check the return value of the stat(2)
>> >> syscall and 2) our tap(4) cloner device provide nothing to know the
>> >> created interface's unit. I fixed this by making the cloner device
>> >
>> > That's not true.  You should have read tap(4)'s manual page.
>> true, my bad.
>> 
>> > Besides,
>> > I have always told people how qemu was supposed to do that, and I think
>> > that someone had actually made a patch for qemu at some point but I
>> > guess it was lost.
>> >
>> Only FreeBSD and us have implemented TAPGIFNAME.
>
>I don't know what others do.  When I did tap(4), Linux, FreeBSD and
>OpenBSD already had three very different interfaces.
>
>> Beside that, this do not solve the problem of the behavior of the
>> stat(2) syscall on a cloner device.
>
>Right.  I was pointing out that the premise for the work was incorrect,
>which doesn't mean the work itself isn't useful.  One thing to note,
>though, is that it is a bad idea to derive the name of the interface
>from the unit number, because we might want to make it possible to
>change interface names in the future, which means the network interface
>name and the device name might differ.  Which is why TAPGIFNAME takes an
>ifreq, which is something you can actually feed to a socket ioctl
>afterwards.
>
>Now, if your git stuff could provide an easy way to get a diff...  But I
>might have missed something in your initial mail.

Yes, this git interface is annoying and does not work at all on IE.

christos



Home | Main Index | Thread Index | Old Index