Netdev List
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jakub Sitnicki <jakub@cloudflare.com>
Cc: netdev@vger.kernel.org,
	Steffen Klassert <steffen.klassert@secunet.com>,
	kernel-team@cloudflare.com
Subject: Re: [PATCH RFC net-next] net: Use fixed slots for skb extensions
Date: Wed, 26 Aug 2026 23:25:54 +0200	[thread overview]
Message-ID: <ao9Z4vK-_pzu03uu@strlen.de> (raw)
In-Reply-To: <ao9UV9S7rUkyQ8jv@strlen.de>

Florian Westphal <fw@strlen.de> wrote:
> (or maybe use &= so as to flag something as active
>  that was never enabled).
> 
> Regarding skb_ext_maybe_cow() in above function: Why not ..
> 
> - Fix skb_ext_put_mctp to be safe against double-put.

Should be done in any case.  __skb_ext_del() also lacks
SKB_EXT_MCTP handling.

Once thats fixed, skb_ext_scrub() could look like this, no?

static int __skb_ext_scrub(struct sk_buff *skb, unsigned int keep)
{
	int i;

	for (i = 0; i < SKB_EXT_NUM; i++) {
		if (((i << 1) & keep) == 0)
			skb_ext_del(skb, i);
	}
}

AFAICS that handles all cases, also, doing skb_ext_del() for
all active extensions is supposed to be equal to skb_ext_reset().

  reply	other threads:[~2026-08-26 21:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25 16:01 [PATCH RFC net-next] net: Use fixed slots for skb extensions Jakub Sitnicki
2026-08-26 21:02 ` Florian Westphal
2026-08-26 21:25   ` Florian Westphal [this message]
2026-08-27  7:42   ` Paolo Abeni
2026-08-27  8:34     ` Oliver Hartkopp
2026-08-27 12:28     ` Jakub Sitnicki
2026-08-27 13:23     ` Florian Westphal
2026-08-27 12:24   ` Jakub Sitnicki

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=ao9Z4vK-_pzu03uu@strlen.de \
    --to=fw@strlen.de \
    --cc=jakub@cloudflare.com \
    --cc=kernel-team@cloudflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.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