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

Re: [MirageOS-devel] tuntap on linux

On 6 Jun 2015, at 15:49, Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx> wrote:

On Jun 6, 2015 4:56 PM, "Anil Madhavapeddy" <anil@xxxxxxxxxx> wrote:
> I'm just testing out tuntap.1.3 for release on Linux, and am having some trouble getting it to work.  Just wanted to check if others are using it ok.  I've done:
>     $ sudo tunctl
>     $ sudo ifconfig tap0 netmask up
>     $ sudo ./_build/test/nonblock_read.native tap0
>     read: 0
>     read: 0
>     ...
> This results in a stream of 0 byte reads.
> If I change the Lwt_unix.of_unix_file_descr in mirage-net-unix to be blocking:true instead of blocking:false, then it works as expected on Linux, and all the tap networking is ok.  Tracing through the Lwt code shows that blocking:false should work, but for some reason the tap device on Linux is always readable and so EWOULDBLOCK never happens.
> Anyone else having this problem on Linux, or is it just me? I don't often use tap networking there, so I don't want to apply the above workaround without understanding it.

I had what sounds like the same problem with tap devices and rump kernel.

I haven't yet filed a bug but I think there is one... 0 length reads should not happen. I am not sure if it changed in recent versions but I think it may have. Planning to investigate. If you do the first open with nonblock it seems to work but fcntl does not

Tracked it down -- looks like a Linux 3.19 regression:


MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.