From: Jakub Kicinski <kuba@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: "Maciej Żenczykowski" <maze@google.com>,
davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
"Daniel Borkmann" <daniel@iogearbox.net>,
martin.lau@linux.dev, john.fastabend@gmail.com,
eddyz87@gmail.com, sdf@fomichev.me, haoluo@google.com,
willemb@google.com, william.xuanziyang@huawei.com,
alan.maguire@oracle.com, bpf@vger.kernel.org, shuah@kernel.org,
linux-kselftest@vger.kernel.org, yonghong.song@linux.dev
Subject: Re: [PATCH net v2] net: clear the dst when changing skb protocol
Date: Mon, 9 Jun 2025 15:00:37 -0700 [thread overview]
Message-ID: <20250609150037.1cc762e0@kernel.org> (raw)
In-Reply-To: <6846e6a6342c7_34e997294f9@willemb.c.googlers.com.notmuch>
On Mon, 09 Jun 2025 09:50:30 -0400 Willem de Bruijn wrote:
> > > + if (ret)
> > > + return ret;
> > > +
> > > bpf_compute_data_pointers(skb);
> > > - return ret;
>
> I wonder whether that unconditional call to bpf_compute_data_pointers
> even if ret was there for a reason.
>
> From reviewing the bpf_skb_proto_xlat error paths, it does seem safe
> to remove it. The cases where an error may be returned after the skb
> is modified only modify the skb in terms of headroom, not headlen.
I should have mentioned, I looked around and also concluded this
unconditional recompute was purely aesthetic.
next prev parent reply other threads:[~2025-06-09 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-07 20:47 [PATCH net v2] net: clear the dst when changing skb protocol Jakub Kicinski
2025-06-07 21:33 ` Maciej Żenczykowski
2025-06-09 13:50 ` Willem de Bruijn
2025-06-09 22:00 ` Jakub Kicinski [this message]
2025-06-09 21:59 ` Jakub Kicinski
2025-06-09 22:02 ` Maciej Żenczykowski
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=20250609150037.1cc762e0@kernel.org \
--to=kuba@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=william.xuanziyang@huawei.com \
--cc=yonghong.song@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).