OSDN Git Service

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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Oct 2021 01:02:12 +0000 (18:02 -0700)
commit0c0a5ef809f9150e9229e7b13e43183b681b7a39
treea991c865b20f6a75c9ab89bef3304bd8b2bea28e
parentfd559a943e3ad919b47ee480e3edb230a818a6b1
tcp: move inet->rx_dst_ifindex to sk->sk_rx_dst_ifindex

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>
include/net/inet_sock.h
include/net/sock.h
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c