]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: guard IP_MINTTL with a static key
authorEric Dumazet <edumazet@google.com>
Mon, 25 Oct 2021 16:48:24 +0000 (09:48 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Oct 2021 01:02:14 +0000 (18:02 -0700)
commit5a351ac2d13e755c771757aa4cec46510b2437bd
tree34f7f3b49927f2807a6a72bd488328484a728e00
parent2c0afd7d7526dd31b6a6ed5ae528b36de1e82d19
ipv4: guard IP_MINTTL with a static key

RFC 5082 IP_MINTTL option is rarely used on hosts.

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

Note that once ip4_min_ttl 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/ip.h
net/ipv4/ip_sockglue.c
net/ipv4/tcp_ipv4.c