From: Jakub Sitnicki <jakub@cloudflare.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Michael Chan <michael.chan@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
Mark Bloch <mbloch@nvidia.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>,
intel-wired-lan@lists.osuosl.org, bpf@vger.kernel.org,
kernel-team@cloudflare.com
Subject: Re: [PATCH net-next 00/10] Call skb_metadata_set when skb->data points past metadata
Date: Tue, 13 Jan 2026 13:33:02 +0100 [thread overview]
Message-ID: <87bjixwv41.fsf@cloudflare.com> (raw)
In-Reply-To: <20260112190856.3ff91f8d@kernel.org> (Jakub Kicinski's message of "Mon, 12 Jan 2026 19:08:56 -0800")
On Mon, Jan 12, 2026 at 07:08 PM -08, Jakub Kicinski wrote:
> On Sat, 10 Jan 2026 22:05:14 +0100 Jakub Sitnicki wrote:
>> This series is split out of [1] following discussion with Jakub.
>>
>> To copy XDP metadata into an skb extension when skb_metadata_set() is
>> called, we need to locate the metadata contents.
>
> "When skb_metadata_set() is called"? I think that may cause perf
> regressions unless we merge major optimizations at the same time?
> Should we defer touching the drivers until we have a PoC and some
> idea whether allocating the extension right away is manageable or
> we are better off doing it via a kfunc in TC (after GRO)?
> To be clear putting the metadata in an extension right away would
> indeed be much cleaner, just not sure how much of the perf hit we
> can optimize away..
Good point. I'm hoping we don't have to allocate from
skb_metadata_set(), which does sound prohibitively expensive. Instead
we'd allocate the extension together with the skb if we know upfront
that metadata will be used.
Things took an unexpected turn and I'm figuring this out as I go.
Please bear with me :-)
Here are my thoughts:
1) The driver changes do clean up the interface, but you're right that
it's premature churn if the approach changes. If the skb extension
approach doesn't pan out, we're ready to fall back to headroom-based
storage.
2) How do we handle CONFIG_SKB_EXTENSIONS=n? Without extensions,
reliable metadata access after L2 encap/decap would require patching
skb_push/pull call sites—or we declare the feature unsupported
without CONFIG_SKB_EXTENSIONS=y.
3) When skb extensions are enabled, asking users to attach TC BPF progs
to call a kfunc to all devices the skb goes through before L2
encap/decap is impractical. The extension alloc/move needs to be
baked into the stack.
I'll focus on getting a PoC together next. Stay tuned.
Thanks,
-jkbs
next prev parent reply other threads:[~2026-01-13 12:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-10 21:05 [PATCH net-next 00/10] Call skb_metadata_set when skb->data points past metadata Jakub Sitnicki
2026-01-10 21:05 ` [PATCH net-next 01/10] net: Document skb_metadata_set contract with the drivers Jakub Sitnicki
2026-01-12 11:28 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 02/10] bnxt_en: Call skb_metadata_set when skb->data points past metadata Jakub Sitnicki
2026-01-12 11:29 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 03/10] i40e: " Jakub Sitnicki
2026-01-12 11:30 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 04/10] igb: " Jakub Sitnicki
2026-01-12 11:31 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 05/10] igc: " Jakub Sitnicki
2026-01-12 11:31 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 06/10] ixgbe: " Jakub Sitnicki
2026-01-12 11:32 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 07/10] mlx5e: " Jakub Sitnicki
2026-01-12 11:32 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-13 6:08 ` Tariq Toukan
2026-01-13 12:52 ` Jakub Sitnicki
2026-01-10 21:05 ` [PATCH net-next 08/10] veth: " Jakub Sitnicki
2026-01-12 11:33 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 09/10] xsk: " Jakub Sitnicki
2026-01-12 11:33 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-10 21:05 ` [PATCH net-next 10/10] xdp: " Jakub Sitnicki
2026-01-12 11:33 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-01-13 3:08 ` [PATCH net-next 00/10] " Jakub Kicinski
2026-01-13 12:09 ` Paolo Abeni
2026-01-13 12:40 ` [Intel-wired-lan] " Jakub Sitnicki
2026-01-13 18:52 ` Jesper Dangaard Brouer
2026-01-13 20:22 ` [Intel-wired-lan] " Jakub Sitnicki
2026-01-14 11:49 ` Toke Høiland-Jørgensen
2026-01-14 12:33 ` Jakub Sitnicki
2026-01-13 12:33 ` Jakub Sitnicki [this message]
2026-01-22 20:21 ` Martin KaFai Lau
2026-01-25 19:15 ` Jakub Sitnicki
2026-01-27 19:33 ` Martin KaFai Lau
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=87bjixwv41.fsf@cloudflare.com \
--to=jakub@cloudflare.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@cloudflare.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=mbloch@nvidia.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=tariqt@nvidia.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox