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

Re: [MirageOS-devel] adding `replace_listener` function to Mirage_net.S


  • To: mirageos-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Hannes Mehnert <hannes@xxxxxxxxxxx>
  • Date: Tue, 18 Jun 2019 20:08:02 +0200
  • Delivery-date: Tue, 18 Jun 2019 18:08:27 +0000
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>
  • Openpgp: id=11B5464249B5BD858FFF6328BC896588DF7C28EE

Hello,

On 18/06/2019 17:33, Mindy Preston wrote:
> In mirage_net.mli, the documentation for `val listen` says:
> "this function can be stopped by calling disconnect in the device layer".
> 
> This is the only method mentioned to stop the call to `listen`. There
> isn't any API call for replacing the callback established in `listen`. 
> In mirage-vnetif, `disconnect` just stops the listener, and we can
> continue to use the device after. This does not work for mirage-net-xen
> (and maybe solo5), because disconnect cleans up the interface and we can
> not continue using it.

As far as I can read both mirage-net-unix and mirage-net-solo5 are fine
with sequences of connect followed by disconnect calls; maybe we should
revise the documentation in mirage-net (that connect ; disconnect ;
connect should work fine) and adapt mirage-net-xen to follow that behaviour?

> It seems we need to make a new connection to change the listener, which
> needs configuration that doesn't belong in the unikernel.  We would also
> need to call all higher-level `connect` functions built on top of the
> network interface again each time this is done.
> 
> Instead, could we have an additional API call in `mirage_net.mli` which
> replaces the listener cleanly?
> 
> Yours in hax,
> yomimono (translated to human by linse)

I'm curious why you need a different listener in practise? I'm pretty
happy (in terms of getting an intuition for the behaviour of the code)
that there's only ever one listener in the lifetime of a mirage-net
interface (that is, unikernel).


best,

hannes

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/mirageos-devel

 


Rackspace

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