From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 2F34F178B3; Mon, 01 Sep 2025 14:08:30 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id DBA58178AC; Mon, 01 Sep 2025 14:08:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail.cyberchaos.dev (mail.cyberchaos.dev [195.39.247.168]) by atuin.qyliss.net (Postfix) with ESMTPS id 5707D178AB for ; Mon, 01 Sep 2025 14:08:27 +0000 (UTC) Message-ID: <269cfb05-8422-418a-a04e-ce1e6dd3da50@yuka.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuka.dev; s=mail; t=1756735706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TV9wWxrJoI0w1SQjnAMIc73wsk7Nw0aSw4bjW4EkM94=; b=k/1zwc/dY/t+2tcb59R8L8+0ELn+2P7FVxxTc6UkdwLCzBosm3yMxpHF63fC2maXrKrRH2 5Fy8lwspLwCP7V5YdPZMyauybMgwA6ezhmUVDJGtBoQPN6kHKWnFwVvs1HkQgDhFMdzJaW gSGPZW/O2iOBYy06prnXg9Rpx4qsjrU= Date: Mon, 1 Sep 2025 16:08:25 +0200 MIME-Version: 1.0 From: Yureka Subject: Re: [DO_NOT_APPLY v2 1/3] add xdp-forwarder To: Alyssa Ross References: <20250831205808.3962245-1-yureka@cyberchaos.dev> <20250831205808.3962245-2-yureka@cyberchaos.dev> <87ldmyp8vo.fsf@alyssa.is> Content-Language: en-US In-Reply-To: <87ldmyp8vo.fsf@alyssa.is> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: 7JXCQNKF2J4BROH5GFSZYCQ6AYIDXLOH X-Message-ID-Hash: 7JXCQNKF2J4BROH5GFSZYCQ6AYIDXLOH X-MailFrom: yuka@yuka.dev X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: devel@spectrum-os.org X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 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.