[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aJ4Ep13RwUSdJZfb@mini-arch>
Date: Thu, 14 Aug 2025 08:45:43 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Stanislav Fomichev <sdf@...ichev.me>, netdev@...r.kernel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
ayush.sawal@...lsio.com, andrew+netdev@...n.ch,
gregkh@...uxfoundation.org, horms@...nel.org, dsahern@...nel.org,
pablo@...filter.org, kadlec@...filter.org,
steffen.klassert@...unet.com, mhal@...x.co,
abhishektamboli9@...il.com, linux-kernel@...r.kernel.org,
linux-staging@...ts.linux.dev, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, herbert@...dor.apana.org.au
Subject: Re: [PATCH net-next 1/7] net: Add skb_dst_reset and skb_dst_restore
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!
Powered by blists - more mailing lists