]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipv6: change inet6_sk_rebuild_header() to use inet->cork.fl.u.ip6
authorEric Dumazet <edumazet@google.com>
Wed, 4 Feb 2026 16:30:34 +0000 (16:30 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 17:24:10 +0000 (09:24 -0800)
commit85d05e28171240ae357a085dc689b91e0ff44f50
tree7cdc7d2858dc255a036c66180fa29931e8ce79d9
parent047c5265ec8b0ee6648211cc4ab671b48f5e87d1
ipv6: change inet6_sk_rebuild_header() to use inet->cork.fl.u.ip6

TCP v6 spends a good amount of time rebuilding a fresh fl6 at each
transmit in inet6_csk_xmit()/inet6_csk_route_socket().

TCP v4 caches the information in inet->cork.fl.u.ip4 instead.

This patch is a first step converting IPv6 to the same strategy:

Before this patch inet6_sk_rebuild_header() only validated/rebuilt
a dst. Automatic variable @fl6 content was lost.

After this patch inet6_sk_rebuild_header() also initializes
inet->cork.fl.u.ip6, which can be reused in the future.

This makes inet6_sk_rebuild_header() very similar to
inet_sk_rebuild_header().

Also remove the EXPORT_SYMBOL_GPL(), inet6_sk_rebuild_header()
is not called from any module.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260204163035.4123817-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/af_inet6.c