rootless-containers / slirp4netns

User-mode networking for unprivileged network namespaces
GNU General Public License v2.0
729 stars 82 forks source link

Support BESS protocol (for UML) #281

Closed AkihiroSuda closed 2 years ago

AkihiroSuda commented 2 years ago

BESS protocol transferrs L2 packets as AF_UNIX SOCK_SEQPACKET . BESS protocol has been used by the vector network interfaces of User Mode Linux (UML).

(terminal 1) $ slirp4netns --target-type=bess /tmp/bess.sock
(terminal 2) $ linux.uml vec0:transport=bess,dst=/tmp/bess.sock,depth=128,gro=1 root=/dev/root rootfstype=hostfs init=/bin/bash mem=2G
(terminal 2: UML)$ ip addr add 10.0.2.100/24 dev vec0
(terminal 2: UML)$ ip link set vec0 up
(terminal 2: UML)$ ip route add default via 10.0.2.2

More docs about the User Mode Linux with BESS socket transport: https://www.kernel.org/doc/html/latest/virt/uml/user_mode_linux_howto_v2.html#bess-socket-transport

AkihiroSuda commented 2 years ago

cc @giuseppe @elmarco FYI

AkihiroSuda commented 2 years ago
Step 9/19 : RUN  git pull && git checkout ${LIBSLIRP_COMMIT} && meson setup build && ninja -C build install
 ---> Running in f5c0822a3dc4
fatal: unable to access 'https://gitlab.freedesktop.org/slirp/libslirp.git/': The requested URL returned error: 504
The command '/bin/sh -c git pull && git checkout ${LIBSLIRP_COMMIT} && meson setup build && ninja -C build install' returned a non-zero code: 1

:cry: https://github.com/rootless-containers/slirp4netns/runs/4723883332?check_suite_focus=true