[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Current state of the UNIX backend
On 26/05/2013 10:51, Anil Madhavapeddy wrote: So a much easier way to debug this sort of issue is to build a unit test that expresses the desired behaviour first. I put a small packet dumper for tuntap in: https://github.com/avsm/ocaml-tuntap/blob/master/test/nonblock_read.ml You can build this without any other dependencies by: $ make $ ocamlbuild _build/test/nonblock_read.native $ sudo ./_build/test/nonblock_read.native The second command does not work for me, I’m going to try anyway.Note that in your test you always use opentun instead of opentap, normally this would create a level3 interface instead of a lever2 one. and if you ping the new interface, you should see hexdump packets on the console. I do see these on both MacOS X and Linux successfully. If Mort does too, I'll be convinced it actually works :-) And now the question is why the Mirage libraries are different. I'm guessing it's to do with setting the non-blocking flag, which is done via a stub at the moment. If you make the behaviour of Ethif match that of my test case, then it should spot the problem. PS: I also noticed that the netmask on the tap0 when you ifconfig is "0xff000000", which isn't the same as the "0xffffff00" I was trying to set it to. It didn't matter for this test, but should be fixed too or else risk network routing heisenbugs... I’m going to investigate more. Thanks for the tip, I’m going to try to isolate more problems instead of trying to fix them in the code, indeed. Vincent
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |