diff options
author | Eric Dumazet <edumazet@google.com> | 2021-10-25 09:48:17 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-29 12:28:42 +0100 |
commit | 98a8e5c2002727c4de303e11e38de25777746111 (patch) | |
tree | 750f415dffc05a9b213d1df0df8d2a08b780acbd /include/net/sock.h | |
parent | 8e096cffc6d35437bc4b8a7b2d6734413675239c (diff) | |
download | linux-stable-98a8e5c2002727c4de303e11e38de25777746111.tar.gz linux-stable-98a8e5c2002727c4de303e11e38de25777746111.tar.bz2 linux-stable-98a8e5c2002727c4de303e11e38de25777746111.zip |
ipv6: move inet6_sk(sk)->rx_dst_cookie to sk->sk_rx_dst_cookie
[ Upstream commit ef57c1610dd8fba5031bf71e0db73356190de151 ]
Increase cache locality by moving rx_dst_coookie next to sk->sk_rx_dst
This removes one or two cache line misses in IPv6 early demux (TCP/UDP)
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>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 752601265a95..796f859c69dd 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -260,6 +260,7 @@ struct bpf_local_storage; * @sk_wq: sock wait queue and async head * @sk_rx_dst: receive input route used by early demux * @sk_rx_dst_ifindex: ifindex for @sk_rx_dst + * @sk_rx_dst_cookie: cookie for @sk_rx_dst * @sk_dst_cache: destination cache * @sk_dst_pending_confirm: need to confirm neighbour * @sk_policy: flow policy @@ -433,6 +434,7 @@ struct sock { #endif struct dst_entry *sk_rx_dst; int sk_rx_dst_ifindex; + u32 sk_rx_dst_cookie; struct dst_entry __rcu *sk_dst_cache; atomic_t sk_omem_alloc; |