From: Artem Lytkin <iprintercanon@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>, Kuniyuki Iwashima <kuniyu@google.com>
Cc: Eric Dumazet <edumazet@google.com>, Ren Wei <weir@nebusec.ai>,
Zixuan Chai <petalzu987@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net v2 1/1] ip6_tunnel: snapshot encap in xmit
Date: Mon, 24 Aug 2026 22:47:40 +0300 [thread overview]
Message-ID: <20260824194741.215979-1-iprintercanon@gmail.com> (raw)
In-Reply-To: <20260809123335.GA2443083@shredder>
On Sun, Aug 09, 2026 at 03:33:35PM +0300, Ido Schimmel wrote:
> It's on my TODO list since last week, but I don't have the time to work
> on it right now. It's a very large change (see the geneve change) that
> is needed across all the IP tunnels, not something that I consider
> suitable for net.
I'd like to pick this up for net-next, unless you have already started.
The shape I have in mind follows the geneve conversion: a separately
allocated config struct hanging off the tunnel under an __rcu pointer,
holding encap together with encap_hlen, tun_hlen and hlen. xmit
dereferences it once and passes the pointer down to ip6_tnl_encap() and
the header length helpers. changelink builds a new one, validates it,
and only then publishes it with rcu_assign_pointer(). That also stops a
rejected changelink from leaving the encap half applied, which is what
happens today when ip6_tnl_encap_setup() runs before the collect_md and
duplicate checks.
The synchronize_net() in ip6_tnl_update() and its siblings is a
separate question. It is there for hash coherence: ip6_tnl_lookup()
matches on parms.laddr, raddr and link while walking the bucket. It
does nothing for the header geometry xmit reads, so it can only go once
parms is in the config as well and the lookups dereference it.
Two things I'd settle before writing code. Header geometry only in a
first series, with parms following, or everything at once? And the
order: ip6_tunnel first, since that is where the report landed and
ip6_gre builds on it, then ip_tunnel.c for ipip and gre, and sit's own
copy in net/ipv6/sit.c after that. vti has no encap and no hlen, so it
needs nothing.
If you have notes or a half-done branch I'd gladly build on them.
Artem
next prev parent reply other threads:[~2026-08-24 19:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-08 8:40 [PATCH net v2 0/1] ip6_tunnel: snapshot encap in xmit Ren Wei
2026-08-08 8:40 ` [PATCH net v2 1/1] " Ren Wei
2026-08-08 19:38 ` Kuniyuki Iwashima
2026-08-09 12:33 ` Ido Schimmel
2026-08-24 19:47 ` Artem Lytkin [this message]
2026-08-25 7:23 ` Zixuan Chai
2026-08-25 9:08 ` Artem Lytkin
2026-08-09 13:46 ` Ido Schimmel
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=20260824194741.215979-1-iprintercanon@gmail.com \
--to=iprintercanon@gmail.com \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=petalzu987@gmail.com \
--cc=weir@nebusec.ai \
/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