All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: "Yang Huajian(杨华健)" <huajianyang@asrmicro.com>
Cc: Florian Westphal <fw@strlen.de>,
	"pablo@netfilter.org" <pablo@netfilter.org>,
	"kadlec@netfilter.org" <kadlec@netfilter.org>,
	"razor@blackwall.org" <razor@blackwall.org>,
	"idosch@nvidia.com" <idosch@nvidia.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"dsahern@kernel.org" <dsahern@kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>,
	"coreteam@netfilter.org" <coreteam@netfilter.org>,
	"bridge@lists.linux.dev" <bridge@lists.linux.dev>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 答复: [PATCH] net: Expand headroom to send fragmented packets in bridge fragment forward
Date: Wed, 9 Apr 2025 12:45:25 +0200	[thread overview]
Message-ID: <20250409104525.GC17911@breakpoint.cc> (raw)
In-Reply-To: <0a711412f54c4dc6a7d58f4fa391dc0f@exch03.asrmicro.com>

Yang Huajian(杨华健) <huajianyang@asrmicro.com> wrote:
> > if (skb_headroom(skb) < ll_rs)
> >	goto expand_headroom;
> 
> > ... but I'm not sure what the actual problem is.
> 
> Yes, your guess is correct!
> 
> Actual problem: I think it is unreasonable to directly drop skb with insufficient headroom.
> 
> > Why does this need to make a full skb copy?
> > Should that be using skb_expand_head()?
> 
> Using skb_expand_head has the same effect.
 
> > Actually, can't you just (re)use the slowpath for the skb_headroom < ll_rs case instead of adding headroom expansion?
> 
> I tested it just now, reuse the slowpath will successed.
> But maybe this change cannot resolve all cases if the netdevice really needs this headroom.

The slowpath considers headroom requirements, see ip_frag_next():

        skb2 = alloc_skb(len + state->hlen + state->ll_rs, GFP_ATOMIC);

You should wait for more feedback and then send a v2 tomorrow.

Thanks!

      reply	other threads:[~2025-04-09 10:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09  7:33 [PATCH] net: Expand headroom to send fragmented packets in bridge fragment forward Huajian Yang
2025-04-09  9:18 ` Florian Westphal
2025-04-09 10:27   ` 答复: " Yang Huajian(杨华健)
2025-04-09 10:45     ` Florian Westphal [this message]

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=20250409104525.GC17911@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=bridge@lists.linux.dev \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=huajianyang@asrmicro.com \
    --cc=idosch@nvidia.com \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=razor@blackwall.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.