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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/mirageos-devel

Reply via email to