[Slirp] gvisor netstack as an alternative to slirp

Marc-André Lureau marcandre.lureau at gmail.com
Wed Jan 29 13:32:58 UTC 2020


Hi

On Tue, Jan 21, 2020 at 4:57 PM Marek Majkowski <majek04 at gmail.com> wrote:
>
> On Fri, Jan 3, 2020 at 9:00 AM Marc-André Lureau
> <marcandre.lureau at gmail.com> wrote:
> > This looks very promising!
> >
> > (my PoC/hack using smoltcp was much more complicated:
> > https://gitlab.freedesktop.org/elmarco/smolirp/blob/master/src/slirp.rs
> > - beware it is quite broken as is)
> >
> > > Let me know what you think.
> >
> > Could you give some instructions on how to build it? (fwiw, qemu and
> > podman don't use TUN/TAP, but via fd, I'll try to adapt the code)
> >
> > I think you should make it a standalone go project with a repo.
>
> It took me a while, but here it is:
> https://github.com/majek/slirpnetstack
>
> I tried to get major feature parity with slirp4netns, just to prove if
> gvisor/netstack is sufficient. It seems to be. This code supports
> ipv6.
>

This is great and it seems to work like a charm!

I have added a simple -fd option to allow to run with qemu -net
socket,fd=: https://github.com/elmarco/slirpnetstack/tree/qemu (see
qemu-run.py)

It would be good to have a simple dhcp server built-in. TFTP/bootp
would also be nice. That way, we could more easily replace libslirp
for qemu. Do you think we should rely entirely on external processes
for that or any idea what to use in go?

I have started a simple specification to allow external helper
processes: https://gitlab.freedesktop.org/slirp/libslirp-rs/blob/master/src/bin/README.rst
libvirt is learning to make use of it. But I could use help to better
define this specification and make an official release.

Maybe we can discuss it on IRC first #slirp on oftc?. Also are you
coming to FOSDEM? (I am already in Brussels fwiw)

cheers


-- 
Marc-André Lureau


More information about the Slirp mailing list