]> 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)
commitff8e2a07f0804625d6378c753469708950653864
tree0f6306b5f3870c87d9075ca3738cbe636703affc
parent6762d8040ddc345fab5f73fd8875bf73a75c64ef
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