From: Marek Mietus <mmietus97@yahoo.com>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: Antonio Quartulli <antonio@openvpn.net>,
netdev@vger.kernel.org, openvpn-devel@lists.sourceforge.net
Subject: Re: [PATCH net-next 0/3] net: tunnel: introduce noref xmit flows for tunnels
Date: Thu, 18 Sep 2025 18:31:01 +0200 [thread overview]
Message-ID: <c17df80c-35ba-4671-8cf2-e54e72da2374@yahoo.com> (raw)
In-Reply-To: <aMk_U3zeHviJC1GI@krikkit>
W dniu 9/16/25 o 12:43, Sabrina Dubroca pisze:
> 2025-09-09, 16:43:01 +0200, Marek Mietus wrote:
>> W dniu 9/9/25 o 13:17, Antonio Quartulli pisze:
>>> On 09/09/2025 07:43, Marek Mietus wrote:
>>>> Currently, all xmit flows use dst_cache in a way that references
>>>> its dst_entry for each xmitted packet. These atomic operations
>>>> are redundant in some flows.
>>>
>>> Can you elaborate on the current limits/drawbacks and explain what we gain with this new approach?
>>>
>>> It may be obvious for some, but it's not for me.
>>>
>>
>> The only difference with the new approach is that we avoid taking an unnecessary
>> reference on dst_entry. This is possible since the entire flow is protected by RCU.
>> This change reduces an atomic write operation on every xmit, resulting in a performance
>> improvement.
>
> It would be nice to incorporate this information into the cover
> letter, and to provide numbers showing the performance
> improvement. That way, it's available to other reviewers and gets
> recorded in the git log. Are you doing crypto with some accelerator?
> Otherwise I'd imagine skipping a few atomic operations is not really
> noticeable.
>
>> There are other flows in the kernel where a similar approach is used (e.g. __ip_queue_xmit
>> uses skb_dst_set_noref).
>>
>>> Also it sounded as if more tunnels were affected, but in the end only ovpn is being changed.
>>> Does it mean all other tunnels don't need this?
>>>
>>
>> More tunneling code can be updated to utilize these new helpers. I only worked
>> on OpenVPN, as I am more familiar with it. It was very easy to implement the
>> changes in OpenVPN because it doesn't use the udp_tunnel_dst_lookup helper
>> that adds some complexity.
>>
>> I hope to incorporate these changes in more tunnels in the future.
>
> It would also be good to add this to the cover letter. Something like
> "For now, only ovpn is updated <for $reason>, but other tunnels could
> also take advantage of this."
>
Noted, will add in the next revision.
prev parent reply other threads:[~2025-09-18 16:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250909054333.12572-1-mmietus97.ref@yahoo.com>
2025-09-09 5:43 ` [PATCH net-next 0/3] net: tunnel: introduce noref xmit flows for tunnels Marek Mietus
2025-09-09 5:43 ` [PATCH net-next 1/3] net: dst_cache: implement RCU variants for dst_cache helpers Marek Mietus
2025-09-12 1:01 ` Jakub Kicinski
2025-09-09 5:43 ` [PATCH net-next 2/3] net: tunnel: implement noref flows in udp_tunnel_xmit_skb Marek Mietus
2025-09-09 5:43 ` [PATCH net-next 3/3] net: ovpn: use new noref xmit flow in ovpn_udp4_output Marek Mietus
2025-09-09 11:17 ` [PATCH net-next 0/3] net: tunnel: introduce noref xmit flows for tunnels Antonio Quartulli
2025-09-09 14:43 ` Marek Mietus
2025-09-16 10:43 ` Sabrina Dubroca
2025-09-18 16:31 ` Marek Mietus [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=c17df80c-35ba-4671-8cf2-e54e72da2374@yahoo.com \
--to=mmietus97@yahoo.com \
--cc=antonio@openvpn.net \
--cc=netdev@vger.kernel.org \
--cc=openvpn-devel@lists.sourceforge.net \
--cc=sd@queasysnail.net \
/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.