[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250409104525.GC17911@breakpoint.cc>
Date: Wed, 9 Apr 2025 12:45:25 +0200
From: Florian Westphal <fw@...len.de>
To: Yang Huajian(杨华健) <huajianyang@...micro.com>
Cc: Florian Westphal <fw@...len.de>,
"pablo@...filter.org" <pablo@...filter.org>,
"kadlec@...filter.org" <kadlec@...filter.org>,
"razor@...ckwall.org" <razor@...ckwall.org>,
"idosch@...dia.com" <idosch@...dia.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"dsahern@...nel.org" <dsahern@...nel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"horms@...nel.org" <horms@...nel.org>,
"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
"coreteam@...filter.org" <coreteam@...filter.org>,
"bridge@...ts.linux.dev" <bridge@...ts.linux.dev>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: 答复: [PATCH] net: Expand headroom to send fragmented packets in
bridge fragment forward
Yang Huajian(杨华健) <huajianyang@...micro.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!
Powered by blists - more mailing lists