From: Yureka <yuka@yuka.dev>
To: Alyssa Ross <hi@alyssa.is>
Cc: devel@spectrum-os.org
Subject: Re: [DO_NOT_APPLY v2 1/3] add xdp-forwarder
Date: Mon, 1 Sep 2025 16:08:25 +0200 [thread overview]
Message-ID: <269cfb05-8422-418a-a04e-ce1e6dd3da50@yuka.dev> (raw)
In-Reply-To: <87ldmyp8vo.fsf@alyssa.is>
Maybe. Calling clang with the right flags is tricky. I have never
written a meson recipe from scratch, and this doesn't seem like a good
first meson project for me, and it feels like the abstractions from
meson would make it more complicated rather than easier.
On 9/1/25 16:03, Alyssa Ross wrote:
> Yureka Lilian <yureka@cyberchaos.dev> writes:
>
>> diff --git a/tools/xdp-forwarder/Makefile b/tools/xdp-forwarder/Makefile
>> new file mode 100644
>> index 0000000..24268d9
>> --- /dev/null
>> +++ b/tools/xdp-forwarder/Makefile
>> @@ -0,0 +1,28 @@
>> +CC ?= gcc
>> +CLANG ?= clang
>> +prefix ?= /usr/local
>> +bindir ?= $(prefix)/bin
>> +xdpdir ?= $(prefix)/lib/xdp
>> +
>> +TOOLS = set_router_iface
>> +PROGS = prog_router.o prog_physical.o
>> +
>> +set_router_iface: set_router_iface.c
>> + $(CC) `pkg-config --libs --cflags libbpf` -o $@ $^
>> +
>> +prog_%.o: prog_%.c
>> + $(CLANG) $(NIX_CFLAGS_COMPILE) -target bpf -I include -g -c -o $@ $^
>> +
>> +tools: $(TOOLS)
>> +
>> +progs: $(PROGS)
>> +
>> +all: tools progs
>> +
>> +install_tools: $(TOOLS)
>> + install -Dm755 -t $(bindir) $^
>> +
>> +install_progs: $(PROGS)
>> + install -Dm755 -t $(xdpdir) $^
>> +
>> +install: install_tools install_progs
> Could we integrate this into our existing Meson build instead?
> I think we should rename the current "guest" option to "app", and add a
> new option for driver VM stuff.
next prev parent reply other threads:[~2025-09-01 14:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-31 20:57 [DO_NOT_APPLY v2 0/3] xdp-forwarder Yureka Lilian
2025-08-31 20:57 ` [DO_NOT_APPLY v2 1/3] add xdp-forwarder Yureka Lilian
2025-09-01 14:03 ` Alyssa Ross
2025-09-01 14:08 ` Yureka [this message]
2025-09-01 14:17 ` Alyssa Ross
2025-08-31 20:58 ` [DO_NOT_APPLY v2 2/3] integrate xdp-forwarder into net-vm Yureka Lilian
2025-08-31 20:58 ` [DO_NOT_APPLY v2 3/3] docs/architecture: add paragraph about networking Yureka Lilian
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=269cfb05-8422-418a-a04e-ce1e6dd3da50@yuka.dev \
--to=yuka@yuka.dev \
--cc=devel@spectrum-os.org \
--cc=hi@alyssa.is \
/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).