]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: guard IPV6_MINHOPCOUNT with a static key
authorEric Dumazet <edumazet@google.com>
Mon, 25 Oct 2021 16:48:22 +0000 (09:48 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Oct 2021 01:02:13 +0000 (18:02 -0700)
commitc782f19ccd56595d1960d62485558406f14ba939
tree0f6306b5f3870c87d9075ca3738cbe636703affc
parent89f0a26d7e57a3374c949fc81eb552126c3afbd0
ipv6: guard IPV6_MINHOPCOUNT with a static key

RFC 5082 IPV6_MINHOPCOUNT is rarely used on hosts.

Add a static key to remove from TCP fast path useless code,
and potential cache line miss to fetch tcp_inet6_sk(sk)->min_hopcount

Note that once ip6_min_hopcount static key has been enabled,
it stays enabled until next boot.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ipv6.h
net/ipv6/ipv6_sockglue.c
net/ipv6/tcp_ipv6.c