From: Stanislav Fomichev <stfomichev@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Stanislav Fomichev <sdf@fomichev.me>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, ayush.sawal@chelsio.com,
andrew+netdev@lunn.ch, gregkh@linuxfoundation.org,
horms@kernel.org, dsahern@kernel.org, pablo@netfilter.org,
kadlec@netfilter.org, steffen.klassert@secunet.com, mhal@rbox.co,
abhishektamboli9@gmail.com, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, herbert@gondor.apana.org.au
Subject: Re: [PATCH net-next 1/7] net: Add skb_dst_reset and skb_dst_restore
Date: Thu, 14 Aug 2025 08:45:43 -0700 [thread overview]
Message-ID: <aJ4Ep13RwUSdJZfb@mini-arch> (raw)
In-Reply-To: <20250813180313.284432a8@kicinski-fedora-PF5CM1Y0>
On 08/13, Jakub Kicinski wrote:
> On Wed, 13 Aug 2025 17:57:40 -0700 Jakub Kicinski wrote:
> > On Tue, 12 Aug 2025 08:52:39 -0700 Stanislav Fomichev wrote:
> > > +/**
> > > + * skb_dst_reset() - return current dst_entry value and clear it
> > > + * @skb: buffer
> > > + *
> > > + * Resets skb dst_entry without adjusting its reference count. Useful in
> > > + * cases where dst_entry needs to be temporarily reset and restored.
> > > + * Note that the returned value cannot be used directly because it
> > > + * might contain SKB_DST_NOREF bit.
> > > + *
> > > + * When in doubt, prefer skb_dst_drop() over skb_dst_reset() to correctly
> > > + * handle dst_entry reference counting.
> >
> > thoughts on prefixing these two new helpers with __ to hint that
> > they are low level and best avoided?
>
> Looking at the uses -- maybe skb_dstref_steal() or skb_steal_dstref()
> would be a better name? We have skb_steal_sock() (et.al.) already,
> same semantics.
Sure, will rename and address the rest of your feedback. Thanks for
the review!
next prev parent reply other threads:[~2025-08-14 15:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 15:52 [PATCH net-next 0/7] net: Convert to skb_dst_reset and skb_dst_restore Stanislav Fomichev
2025-08-12 15:52 ` [PATCH net-next 1/7] net: Add " Stanislav Fomichev
2025-08-14 0:57 ` Jakub Kicinski
2025-08-14 1:03 ` Jakub Kicinski
2025-08-14 15:45 ` Stanislav Fomichev [this message]
2025-08-12 15:52 ` [PATCH net-next 2/7] xfrm: Switch to skb_dst_reset to clear dst_entry Stanislav Fomichev
2025-08-12 15:52 ` [PATCH net-next 3/7] netfilter: " Stanislav Fomichev
2025-08-13 6:43 ` Florian Westphal
2025-08-12 15:52 ` [PATCH net-next 4/7] net: Switch to skb_dst_reset/skb_dst_restore for ip_route_input callers Stanislav Fomichev
2025-08-12 15:52 ` [PATCH net-next 5/7] staging: octeon: Convert to skb_dst_drop Stanislav Fomichev
2025-08-13 14:20 ` Greg KH
2025-08-12 15:52 ` [PATCH net-next 6/7] chtls: Convert to skb_dst_reset Stanislav Fomichev
2025-08-12 15:52 ` [PATCH net-next 7/7] net: Add skb_dst_check_unset Stanislav Fomichev
2025-08-13 7:57 ` [syzbot ci] Re: net: Convert to skb_dst_reset and skb_dst_restore syzbot ci
2025-08-13 10:01 ` Florian Westphal
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=aJ4Ep13RwUSdJZfb@mini-arch \
--to=stfomichev@gmail.com \
--cc=abhishektamboli9@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=ayush.sawal@chelsio.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mhal@rbox.co \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=sdf@fomichev.me \
--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;
as well as URLs for NNTP newsgroup(s).