From: Alyssa Ross <hi@alyssa.is>
To: Yureka Lilian <yureka@cyberchaos.dev>
Cc: Demi Marie Obenour <demiobenour@gmail.com>, devel@spectrum-os.org
Subject: Re: [PATCH v4 2/5] tools: add xdp-forwarder
Date: Tue, 23 Sep 2025 17:16:44 +0200 [thread overview]
Message-ID: <87zfalkxlv.fsf@alyssa.is> (raw)
In-Reply-To: <20250923132012.28013-3-yureka@cyberchaos.dev>
[-- Attachment #1: Type: text/plain, Size: 2585 bytes --]
Yureka Lilian <yureka@cyberchaos.dev> writes:
> The xdp-forwarder's purpose is implementing the functionality needed
> within the net-vm (a VM running the Linux drivers for any physical
> interfaces on the spectrum system).
>
> In the future, the net-vm will load the included XDP programs on the
> passed-through physical interfaces as well as the downstream virtio
> interface going into the router (recognized by its special MAC address).
>
> The net-vm needs to multiplex between the physical interfaces, as there
> might be several interfaces in the same IOMMU-group.
>
> For this, the XDP program loaded on the physical interfaces
> (`prog_physical.o`) applies a VLAN tag corresponding to the interface id
> and redirects the packets to the router interface (identified by the
> `router_iface` bpf map). In the other direction the XDP program loaded on
> the router interface (`prog_router.o`) removes one layer of VLAN tagging
> and redirects the packets to the interface read from the VLAN tag.
>
> The helper program `set_router_iface` is used to update the `router_iface`
> bpf map to point to the interface passed as argument to the program.
>
> Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
> Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
> ---
> pkgs/default.nix | 4 +
> release/checks/pkg-tests.nix | 1 +
> tools/default.nix | 15 +-
> tools/meson.build | 4 +
> tools/meson_options.txt | 3 +
> tools/xdp-forwarder/include/parsing_helpers.h | 274 ++++++++++++++++++
> tools/xdp-forwarder/include/rewrite_helpers.h | 146 ++++++++++
> tools/xdp-forwarder/meson.build | 48 +++
> tools/xdp-forwarder/prog_physical.c | 39 +++
> tools/xdp-forwarder/prog_router.c | 43 +++
> tools/xdp-forwarder/set_router_iface.c | 30 ++
> 11 files changed, 604 insertions(+), 3 deletions(-)
> create mode 100644 tools/xdp-forwarder/include/parsing_helpers.h
> create mode 100644 tools/xdp-forwarder/include/rewrite_helpers.h
> create mode 100644 tools/xdp-forwarder/meson.build
> create mode 100644 tools/xdp-forwarder/prog_physical.c
> create mode 100644 tools/xdp-forwarder/prog_router.c
> create mode 100644 tools/xdp-forwarder/set_router_iface.c
release/checks/pkg-tests.nix fails with this patch applied, because
clang-tidy can't find headers. I'm happy to look into why that is, but
if you feel like having a look or already know what's happening, please
let me know!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2025-09-23 15:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 13:19 [PATCH v4 0/5] Yureka Lilian
2025-09-23 13:19 ` [PATCH v4 1/5] tools: rename guestSupport -> appSupport Yureka Lilian
2025-09-23 15:00 ` Alyssa Ross
2025-09-23 15:12 ` Yureka
2025-09-23 15:19 ` Alyssa Ross
2025-09-23 13:20 ` [PATCH v4 2/5] tools: add xdp-forwarder Yureka Lilian
2025-09-23 13:58 ` Alyssa Ross
2025-09-23 15:14 ` Alyssa Ross
[not found] ` <3b730bf9-15f7-43c9-8ea7-4ebd20e9d3e5@yuka.dev>
2025-09-23 15:31 ` Alyssa Ross
2025-09-23 15:50 ` Yureka
2025-09-23 16:17 ` Alyssa Ross
2025-09-23 15:16 ` Alyssa Ross [this message]
2025-09-24 9:52 ` Yureka
2025-09-23 13:20 ` [PATCH v4 3/5] docs/architecture: add paragraph about networking Yureka Lilian
2025-09-23 13:20 ` [PATCH v4 4/5] vm/sys/net: build against pkgsMusl Yureka Lilian
2025-09-23 15:20 ` Alyssa Ross
2025-09-23 13:20 ` [PATCH RFC v4 5/5] vm/sys/net: integrate xdp-forwarder Yureka Lilian
2025-09-23 15:24 ` Alyssa Ross
2025-09-23 15:24 ` Yureka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zfalkxlv.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=demiobenour@gmail.com \
--cc=devel@spectrum-os.org \
--cc=yureka@cyberchaos.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).