[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] adding `replace_listener` function to Mirage_net.S
On Wed, 19 Jun 2019 at 14:27, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote: > > On 18 Jun 2019, at 19:08, Hannes Mehnert <hannes@xxxxxxxxxxx> wrote: > > > > 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? > > Agreed; fixing mirage-net-xen sounds better here. It might become a > new interface (with a different vif number), but that shouldn't matter > to the unikernel I think. You pass the vif ID to `connect`, so that shouldn't change. I think disconnect on Xen devices should put them back the way they were before the connect, so connecting multiple times should be allowed (i.e. the current code is wrong). Calling `disconnect` should stop the listener somehow, but it doesn't look like the current code does that. But I vaguely recall that there are some problems closing event channels on Xen (e.g. a local listener doesn't get woken up when that happens). -- talex5 (GitHub/Twitter) http://roscidus.com/blog/ GPG: 5DD5 8D70 899C 454A 966D 6A51 7513 3C8F 94F6 E0CC _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |