FGS0nWDHMvbYB7gnf1p/EraN0K2ssigQjiIb+2fiuRWw8ZBPhigFe2Kees55h2HPuG76 JssA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Awv8DIrGI3H+149gY23xflspKap2W3xjFpbUA2/4mB8=; fh=aFeoUrsDWAgbeqymguiAZi9MlpQPCUhPf96aci+YuDo=; b=Xq3I7lXXUq/z49/iqlEwxE7H1ALrP8sXGuGQYIh+R1M9rXtOOyps3/2T6LNEMEuEu4 nx79Hc4Sc8CqmbydcIgCpC6TKMIMIi171Hl4nuxN+ZCRaccwcWFIbI5bkTXPa/GFrAxF ZhmkL8Ypo6qPnAj5KL8tVNa9gFWi58WcyDcyId98C6sjbUw4blojCtxLGwEKx6e7Ikkc xhTeXZguFubv0VK1YqETE4HTuB2QobAKDJEPtLv4bIpFX8mYVNFpOnL+PjqklnwZyLsZ D6ffAwW3i3qOZ49jsKfuWo4iBdRIr8zO/oBuJNB6Wf6thi7k9h8FRbBQw5mkrDFKN+ua 0DHw==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771959275; x=1772564075; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Awv8DIrGI3H+149gY23xflspKap2W3xjFpbUA2/4mB8=; b=XqEtMT1UZogTul118yxGK82rSH+IerVaL7U3kCILbA1RhWmBhFFqG7cMyJjSb7SMSQ p00tl2CLmOxDqHshEmNEWFJm+CtIe8X2nTVdypIB59pw0+mNysZeoqcbHzlOAtwNOT4B 7na4+1NXLRsiIkCCizzaWDnnB19hrI6RPe2PP+ABoFNIzVXivFWg1dz8l8F/QzgqmGPq cgr6JL3Ngl0YJ1d6m0ocnuv6vqNayzUOiZjXHTrNP7nIHRCF2FvZGutXtbnr7cvlOiya ZFiQn8snY09EBf7Z8ZaQIROcI57N+r+eJlGszk8n55tsoqRi50/Eq+jgPX16+F6f8IK9 H6gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771959275; x=1772564075; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Awv8DIrGI3H+149gY23xflspKap2W3xjFpbUA2/4mB8=; b=K0pZjjZcHhdb+mb5G3aGtXzxvH8hfaosKKQ4J7t9N4V4tTei2LmnEbAsqHhi4vEnJA Q3jep0JHCKjJQrPuwA1Fs61Xrd4RBDMfkiIPLb2zgDNmEVJsL29k/gBTnLHc1T5RchuU BHATUhYi9sEEYIk5enbG3M3KN15DASu4GS/EbyVvvFkkbt//bM5rVGmZdS/fIFr/3mXc Wf4QgalJNrXEzFdKRM0pq04+m31Xm0rVEARfWPme/8oApBACGNma/xaqseTdY5/DBAHh jBIdToQkcBjkxUBMlJ7VroKhzYMIozmLvFV6pYyMndgD6nf0ESVInyH9zTQK+k9wS5gs Dq/w== X-Forwarded-Encrypted: i=1; AJvYcCUTUawB/14LqyRrq4qXA3r48lrScvuTs+dPJ7EFlKA6CnzoBOVKX7RZC0zmKkLKSej5XcAywXjCoQ==@vger.kernel.org X-Gm-Message-State: AOJu0YyfYqYgGyzF1QQFTB3HujHvnJXQCqvIX2OmEI5kvlpboY3P351g ZEOFofrAlWCFng2YCtk2lRufmpdWRJ1OZ+NL+rmwCuQwXOw+zgdwXlrDkotB0KxkrrcnliLVPYI vhtPcTlh5kffrbIjyp3fIil57jokUDLo= X-Gm-Gg: AZuq6aLFfG8XdC5QgTelFILbZquw84QqNni/Rj8cAtW9hQGeeJHqgNGsiDpjNK37cjo Mn6IK0qE5/jMPMSNOA/2TURUOhnoQoXw6yB2QmivnbZOyfEny7+S/XYfu08Gi9tjHQHC3J0C5IX eEi+HVNhTctWPoxO4BWIdYVDIPuKNPSyPefZyRRyXGiLZzhVqd8ROjtkaEmkmzsGwfE2S0w+Fcv AuVVR/tYFPoP6THv+3Z8pu6N/4vVUSB6C6oGez4EYMxOqIm1rfFh1ZHzl75t9QfY4UTJvb1HkZY W9hcOfvOQ3gheQbzSc0Bxt2tCk+3bTyDM/9ENWbgNG11zfgyIoDFfTlmIqYQkAIsoiXi5RuyaAO y6Mm9MjF4 X-Received: by 2002:a05:600c:3516:b0:483:7783:5373 with SMTP id 5b1f17b1804b1-483a963588bmr202767075e9.23.1771959274710; Tue, 24 Feb 2026 10:54:34 -0800 (PST) Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <9c8d6af7-8546-4409-91fe-85f92a08f503@kernel.dk> In-Reply-To: From: Alexei Starovoitov Date: Tue, 24 Feb 2026 10:54:23 -0800 X-Gm-Features: AaiRm52xt7HwXOCplnwma6vUI16c-1jXs8eUh34rEsu8lfdznaOE6C0yI8ppUzM Message-ID: Subject: Re: [PATCH 0/3] extra io_uring BPF examples To: Pavel Begunkov Cc: Jens Axboe , io-uring , bpf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-DKIM: signer='gmail.com' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://docs.mxroute.com/docs/expert-spam-filtering.html --- Content analysis details: (0.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [172.234.253.10 listed in list.dnswl.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [alexei.starovoitov[at]gmail.com] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager SpamTally: Final spam score: 4 On Mon, Feb 23, 2026 at 7:06=E2=80=AFAM Pavel Begunkov wrote: > > On 2/23/26 14:39, Jens Axboe wrote: > > On 2/23/26 7:32 AM, Pavel Begunkov wrote: > >> On 2/23/26 14:14, Jens Axboe wrote: > >>> On 2/23/26 7:11 AM, Pavel Begunkov wrote: > >>>> NOT FOR INCLUSION > >>>> > >>>> Alexei asked for extra more realistic examples. This this series is > >>>> based on top of v9 of the io_uring BPF series and implemented as > >>>> selftests. There could be more, but I stopped with 3 that should > >>>> give an idea how it'll be used: > >>>> > >>>> 1. A QD=3D1 file copy program that show cases state machine handling= . > >>>> > >>>> 2. A BPF program rate-limiting the number of inflight io_uring reque= st. > >>>> That's a good example of what users asked for before but seemed= to > >>>> be too niche to be plumbed into the main io_uring path. > >>>> > >>>> 3. A toy example of how BPF can interact with registered buffers. > >>> > >>> Let's please keep examples in the liburing side, where they can be > >>> with the documentation too. > >> > >> I got you a liburing example > >> > >> https://github.com/isilence/liburing/tree/bpf-ops-example > > > > Right, but that's just the nop thing, which isn't really interesting > > outside of doing basic verification of yes indeed the kernel side works= . > > > >> but need to sync with the selftest. I think I'll rather keep the rest > >> into a separate repository instead of adding all helpers to liburing, > >> which will inevitably do similar things but deviating in API and > >> internal details. And it's simpler on dependency management instead > >> of requiring libbpf / etc. for liburing. I wanted a space for > >> misc io_uring bits that doesn't make sense to keep as core liburing > >> anyway. > > > > liburing should have support and documentation. It's not that hard to > > check for libbpf in configure and either build the support or not. Once > > various feature support ends up being fragmented in the ecosystem THAT > > is a mess for users, I'd much rather have it consolidated and deal with > > it on the liburing side. > > What kind of support do you mean? Installation, removal, other BPF > management is all on the libbpf side, e.g. skeleton open/load/etc., > and with it generating new structures for each of them, I'm not sure > how to make it into some generic API whether it's liburing or not > instead of making users to fill in the gaps, nor I think we should. > As for figuring out right helpers and abstractions for BPF program > writing, it'll be a gradual process, and I'd rather have it > separately, it's not like I can reuse liburing for that. The cp and ratelimiter examples make sense to me. The 3rd one with xor kfunc is a conversation starter. Since liburing already has "cp" in examples/ I have to agree with Jens that "cp" as bpf prog should be there as well. Spreading the examples across github and kernel tree won't work well. We learned this lesson with samples/bpf/ long ago. From - Tue Feb 24 18:59:32 2026 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id KDpeCBD1nWkm6DIAYBR5ng (envelope-from ) for ; Tue, 24 Feb 2026 18:59:28 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Tue, 24 Feb 2026 18:59:28 +0000 Received: from sea.lore.kernel.org ([172.234.253.10]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vuxd0-0000000EqbI-2w6Z for hi@josie.lol; Tue, 24 Feb 2026 18:59:27 +0000 Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 393E7301651C for ; Tue, 24 Feb 2026 18:56:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 646932DC789; Tue, 24 Feb 2026 18:56:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L0bouMI1" X-Original-To: stable@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40FE223B61E; Tue, 24 Feb 2026 18:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771959418; cv=none; b=N9k8ytPcJpDzJjtFgGfGVBdleGVyFSA1T9e6nlyYDWc8CsayxXECf09Q2EaYZMXdw8Cr7Acv49XROeaxGdRWMRa5EkhOm2VdOTZ+btT1HOqb/CHWyOFgdKFyHEBuf5E2ofjtOOFxCr4LMhNgbGAURSiQspgv0HBQaNf2nliCAV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771959418; c=relaxed/simple; bh=gWdGdty3sObst3AxSEA0asv9WiXUMqiWiXHPwha+dYY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=dlmw/X/tAkfG1e6iMM1icqRPpsbPD5NY8jAI1jnLZ4rikBWPB6K31at0yoOM5c9X4wZG9/EiJ+Qb1wVVxjrC7FpiHIe995Jk/tbxMGUIk/Hs7lnRM9MY88qg6kYBD+z4YqeDWg5zHBBhPAQekjeOVamfUWaqj+GQvT6lMxaeKxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L0bouMI1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89B70C116D0; Tue, 24 Feb 2026 18:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=177