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 E5E23179BF; Mon, 01 Sep 2025 14:17:24 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id C48E2179B5; Mon, 01 Sep 2025 14:17:22 +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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) by atuin.qyliss.net (Postfix) with ESMTPS id 470971796B for ; Mon, 01 Sep 2025 14:17:17 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 6A1D8EC03A2; Mon, 1 Sep 2025 10:17:16 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 01 Sep 2025 10:17:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1756736236; x=1756822636; bh=O6VeT97LJB Y5u1Y4V3mH6yCUQ5yN8uUOElSEAjhfr2A=; b=hRkYkzUHSJ/XjdD4u9VUObt520 jKC/0T3IUm0KZ3A/6ChmSgsXtDmHJ2SuBVqApkBnKGh8nxXM4YMnk7s+9G7xnGn+ 1WJ9Xc1J8hMjsLxp0fVyeDwXZUuCcTZfD9fCLOeUTMfROt8eRZORx5qWkFOAHXSU Eh8tTWjniI/G4WGgbjvX+xjh84yi/A44pwz4+itQ9yWW0x4289BuokQWzGSpGz5T CJkFP5wPhe9Fx9ZgAM7ISGYXa0EvgQ/uoDNvR3cwc9sCEZAtLp+aC+6/CK/8A+kE 8l9SnjRUnoBYTPhAaoLXsEzuAcFEwtC7QAs/6AGBJxd2AwpdsWazYsI/dZsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1756736236; x=1756822636; bh=O6VeT97LJBY5u1Y4V3mH6yCUQ5yN8uUOElS EAjhfr2A=; b=MwJacC1OUIJwlmWOwvtROxDLQA65pVlvnwfc6yA1RnKwTQHlMZH 8R3IObUmhSVeQCA3rdPzu7uE3YQtfd782G82W5JbCVPBTWtKZhNbwPIbyExBx2S4 cM68FFlOc6kmkRVlJ7U9SQIn/BqJ+uXyYSTbi6/ZnL2lK8pHo+jaK0TIIRIS3nIs peHE+RJddKoqoEcotSrPgYwQc/S+P7mhcsZnsxwCdcFUrIDxYLRM1f7JPnctEjxE Ou4qK/zneAMyHs6YOfta4F8JEGCrAYoGN5u3syTUtX2P0ON+rhiXj14nP7uDk+bs 8pj8l9R0R8jPFSyBLA0cmAUTt1BgQSC3aTw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduledvfeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvfevufgjfhffkfggtgesghdtreertd dttdenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhisheq necuggftrfgrthhtvghrnhepieduffeuieelgfetgfdttddtkeekheekgfehkedufeevte egfeeiffetvdetueevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhephhhisegrlhihshhsrgdrihhspdhnsggprhgtphhtthhopedvpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopeguvghvvghlsehsphgvtghtrhhumhdqohhsrdho rhhgpdhrtghpthhtohephihukhgrseihuhhkrgdruggvvh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Sep 2025 10:17:15 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id DCC6D15EFC08; Mon, 01 Sep 2025 16:17:09 +0200 (CEST) From: Alyssa Ross To: Yureka Subject: Re: [DO_NOT_APPLY v2 1/3] add xdp-forwarder In-Reply-To: <269cfb05-8422-418a-a04e-ce1e6dd3da50@yuka.dev> References: <20250831205808.3962245-1-yureka@cyberchaos.dev> <20250831205808.3962245-2-yureka@cyberchaos.dev> <87ldmyp8vo.fsf@alyssa.is> <269cfb05-8422-418a-a04e-ce1e6dd3da50@yuka.dev> Date: Mon, 01 Sep 2025 16:17:05 +0200 Message-ID: <87frd6p89q.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: 5I2ZTMSMSDP5VZFGPB6LR4KX3PYLEFX3 X-Message-ID-Hash: 5I2ZTMSMSDP5VZFGPB6LR4KX3PYLEFX3 X-MailFrom: hi@alyssa.is 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: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Yureka writes: > Maybe. Calling clang with the right flags is tricky. I have never=20 > written a meson recipe from scratch, and this doesn't seem like a good=20 > first meson project for me, and it feels like the abstractions from=20 > meson would make it more complicated rather than easier. Could we just copy what systemd does? It builds BPF programs with Meson. I can take a look if you prefer, though. > 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 ?=3D gcc >>> +CLANG ?=3D clang >>> +prefix ?=3D /usr/local >>> +bindir ?=3D $(prefix)/bin >>> +xdpdir ?=3D $(prefix)/lib/xdp >>> + >>> +TOOLS =3D set_router_iface >>> +PROGS =3D 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaLWq4wAKCRBbRZGEIw/w opgBAQDosbT+PjjCUzHfD26vNdg2Nwbs6aaPw/112bEWHFLkygD/cop9NPUgw7G5 vzvw1CfFh1r97oP9o97CRF4nKCPEgQY= =8eyy -----END PGP SIGNATURE----- --=-=-=--