From: Ido Schimmel <idosch@nvidia.com>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: weir@nebusec.ai, davem@davemloft.net, dsahern@kernel.org,
edumazet@google.com, horms@kernel.org, kuba@kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com, petalzu987@gmail.com,
tom@herbertland.com, vega@nebusec.ai
Subject: Re: [PATCH net v2 1/1] ip6_tunnel: snapshot encap in xmit
Date: Sun, 9 Aug 2026 15:33:35 +0300 [thread overview]
Message-ID: <20260809123335.GA2443083@shredder> (raw)
In-Reply-To: <20260808194001.853434-1-kuniyu@google.com>
On Sat, Aug 08, 2026 at 07:38:52PM +0000, Kuniyuki Iwashima wrote:
> From: Ren Wei <weir@nebusec.ai>
> Date: Sat, 8 Aug 2026 16:40:49 +0800
> > From: Zixuan Chai <petalzu987@gmail.com>
> >
> > ip6_tnl_changelink() can update encapsulation parameters while the
> > netdevice is transmitting packets. ip6_tnl_xmit() can calculate packet
> > headroom with t->encap_hlen and later build an encapsulation header from
> > the live t->encap. A concurrent update can change the encapsulation
> > header between these accesses and make skb_push() underflow the skb head.
> >
> > Take a local snapshot of t->encap before calculating the encapsulation
> > header length.
>
> This intorduce per-skb cost in the fast path for unlikely changelink.
Assuming the common case where the tunnel doesn't use fou / gue
encapsulation, the added cost is one compare and a copy of 8 bytes.
>
> Right approach is to convert it to RCU pointer (and remove
> synchronize_net() there).
>
> 0ba269933f73 geneve: convert config to RCU-protected pointer
> 777434f53e77 geneve: pass geneve_config pointer to helper functions
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.
What are you proposing for net?
next prev parent reply other threads:[~2026-08-09 12:33 UTC|newest]
Thread overview: 5+ 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 [this message]
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=20260809123335.GA2443083@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petalzu987@gmail.com \
--cc=tom@herbertland.com \
--cc=vega@nebusec.ai \
--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 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.