tcp: move inet->rx_dst_ifindex to sk->sk_rx_dst_ifindex
authorEric Dumazet <edumazet@google.com>
Mon, 25 Oct 2021 16:48:16 +0000 (09:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:28:42 +0000 (12:28 +0100)
commit8e096cffc6d35437bc4b8a7b2d6734413675239c
treea9d60463f1db1d6298330f06169d30a403edeaef
parente69eacf74e15cffa4da537f538f598d13a37be96
tcp: move inet->rx_dst_ifindex to sk->sk_rx_dst_ifindex

[ Upstream commit 0c0a5ef809f9150e9229e7b13e43183b681b7a39 ]

Increase cache locality by moving rx_dst_ifindex next to sk->sk_rx_dst

This is part of an effort to reduce cache line misses in TCP fast path.

This removes one cache line miss in early demux.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/inet_sock.h
include/net/sock.h
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c