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

Re: Mirage vs. FreeBSD Networking



On Thu, Aug 8, 2013 at 2:24 PM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
> This should be possible in the Mirari autogenerated portion -- you
> just need to use the (brand new) ocaml-ipaddr library to generate a
> local MAC and ensure that it's attached to the VIF.

Sounds good -- I am currently experimenting with dummy "virtual" MAC
addresses, but I will switch to this library once the problem is
solved.

> The details really depend on the kFreeBSD OS.Netif module -- right
> now, we only have ones for Xen and UNIX (tuntap).  Do you have an
> implementation in the kFreeBSD branch at all?

Sure, I have.  You can find (almost) the latest code I use in my git
repository [1].  Though, it is missing the part I am currently working
with, but I have extracted a work-in-progress version of it for you
[2].

> We'd need a device bus and interrupts/Activations before we could hook up a 
> full Netif
> though.

In the kFreeBSD backend, I am just sitting on top of the ether_input()
and ether_output() functions to receive and send frames, and then I
have those caml_get_mbufs() and caml_put_mbufs() functions to
translate between cstructs and mbuf(9)s.  (And the former is polled in
certain intervals.)  I am not sure if there should be more.

Well, this experimental implementation above is able to answer ARP
requests but it is stuck at receiving ARP replies at the moment.  When
pinging, it tries to figure out who to send the frame back, and issues
an ARP probe with the target's IP address, but apparently does not
receive an answer.


[1] https://github.com/pgj/mirage-platform/blob/master/kfreebsd/lib/netif.ml
[2] 
http://people.freebsd.org/~pgj/paste/mirage-platform-kfreebsd-wip-20130808.diff



 


Rackspace

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