Skip to content

Conversation

@johnny-mnemonic
Copy link
Contributor

@johnny-mnemonic johnny-mnemonic commented Nov 30, 2025

  • configure.ac: check for Linux TUN/TAP support
  • src/netdev.c: rearrange, fix typos, add support for Linux TUN/TAP devices

Original patch from @mikpe and available from: https://user.it.uu.se/~mpe22148/linux/patches/ia64/ski-1.3.2/ski-1.3.2-tuntap.patch

Adapted for Ski post version 1.5.0


  • configure.ac: keep "normal" Ski networking by default
  • src/netdev.c: make TAP networking work beyond Ski's host system
  • README-networking.md: Add README for networking options
mikpe and others added 4 commits November 30, 2025 16:31
* configure.ac: check for Linux TUN/TAP support * src/netdev.c: rearrange, fix typos, add support for Linux TUN/TAP devices Signed-off-by: Mikael Pettersson <mikpelinux@gmail.com> Original patch from https://user.it.uu.se/~mpe22148/linux/patches/ia64/ski-1.3.2/ski-1.3.2-tuntap.patch Adapted for Ski post version 1.5.0 Signed-off-by: Johnny Mnemonic <jm@machine-hall.org>
As we can either have "normal" Ski networking or TUN/TAP networking, enable TUN/TAP support only when configured with `--enable-tuntap` and only when networking is enabled for Ski. Signed-off-by: Johnny Mnemonic <jm@machine-hall.org>
So far communication only worked between host and ski instance with tun/tap networking. This because the MAC address of the tap interface on the host was also used identically for the emulated network interface in the Ski instance. Change the first two bytes to something familiar to correct this and that way enable communications beyond the host system. Suggested-by: naguam <naguam@cloudbsd.xyz> Signed-off-by: Johnny Mnemonic <jm@machine-hall.org>
Signed-off-by: Johnny Mnemonic <jm@machine-hall.org>
@johnny-mnemonic
Copy link
Contributor Author

This patch set allows a Ski instance to be networked similar to how it was done with QEMU in the past. I.e.:

  • a host interface for network connectivity beyond the host
  • one TAP device per simulation/emulation instance
  • a bridge connecting these interfaces at the data link layer.

It requires no additional physical network card like the older BPF based networking* but still offers the same functionality as that one. This will be especially useful for hosting multiple Ski instances on the same host, as it only requires virtual interfaces for the Ski instances. In addition a networked Ski instance can now run as ordinary user, if the used TAP device was pre-created before launching Ski.

*) At least I never found a way to make the BPF based networking work w/o an extra host interface for the Ski instance.

The support for TUN/TAP devices is not enabled by default, but only with --enable-tuntap during the configure step. A user can only select one (BPF based networking) or the other (TUN/TAP networking) currently.

Also an extra README covering the networking options was added.

@johnny-mnemonic johnny-mnemonic marked this pull request as ready for review November 30, 2025 17:36
@trofi trofi merged commit 1243168 into trofi:master Nov 30, 2025
1 check passed
@trofi
Copy link
Owner

trofi commented Nov 30, 2025

Looks good! Merged as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants