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

API changes in my tree



I've pushed some changes that firm up the device APIs in my tree, but will 
break existing code until they settle down.

The idea is to convert all the device attachments into hot plug events, and 
make the API simply call a function whenever a new device shows up. 

So for example, for networking, you now do:

Manager.create (fun mgr interface id ->
  Manager.configure interface (`IPv4 (addr, netmask, gw)) >>
  let src = (None, 8081) in
  Channel.listen mgr (
    `TCPv4 (src, fun (remote_addr, remote_port) ->
           ...

Whenever a new VIF/tap interface shows up, the callback function is called, 
which applies configuration to the interface (essential under Xen, optional 
under UNIX if the sockets mode is being used).

If (as Balraj is doing), you need two interfaces to create a dummy net, then a 
wrapper thread can be used to block until both the interfaces show up.

The reason I'm doing this is to also apply the same logic to the 
Block/Filesystem layer, which is a pre-requisite to the testing infrastructure 
I hope to have in by early next week.  Once that's done, it should be the last 
of the major changes before a preview release, and we can work on tidying up 
the TCP and Openflow code that Haris is working on.

TLDR; my tree is a bit in flux at the moment, so rollback or talk to me if you 
pull and your code suddenly breaks.

cheers
Anil


 


Rackspace

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