diff options
author | Eric Dumazet <edumazet@google.com> | 2021-10-25 19:48:22 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-26 04:02:13 +0300 |
commit | 790eb67374d43f66102a80821d22188b6a0bc3bb (patch) | |
tree | 0f6306b5f3870c87d9075ca3738cbe636703affc /include/net | |
parent | cc17c3c8e8b5beb4072c0e8e53aeb77bcf4517c2 (diff) | |
download | linux-790eb67374d43f66102a80821d22188b6a0bc3bb.tar.xz |
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ipv6.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index f2d0ecc257bb..c19bf51ded1d 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -1092,6 +1092,7 @@ struct in6_addr *fl6_update_dst(struct flowi6 *fl6, /* * socket options (ipv6_sockglue.c) */ +DECLARE_STATIC_KEY_FALSE(ip6_min_hopcount); int ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen); |