aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-09-19 20:48:49 +0000
committerJakub Kicinski <kuba@kernel.org>2025-09-22 17:55:24 -0700
commit17b14d235f58155a05cd9371e4559361ca3c67da (patch)
tree10700c5d852eac1628a931213220f02d03d294dc /include
parentMerge branch 'add-more-functionality-to-bnge' (diff)
downloadlinux-17b14d235f58155a05cd9371e4559361ca3c67da.tar.gz
linux-17b14d235f58155a05cd9371e4559361ca3c67da.zip
net: move sk_uid and sk_protocol to sock_read_tx
sk_uid and sk_protocol are read from inet6_csk_route_socket() for each TCP transmit. Also read from udpv6_sendmsg(), udp_sendmsg() and others. Move them to sock_read_tx for better cache locality. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250919204856.2977245-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index ee95081b0c0b..66c2f396b57d 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -492,6 +492,9 @@ struct sock {
long sk_sndtimeo;
u32 sk_priority;
u32 sk_mark;
+ kuid_t sk_uid;
+ u16 sk_protocol;
+ u16 sk_type;
struct dst_entry __rcu *sk_dst_cache;
netdev_features_t sk_route_caps;
#ifdef CONFIG_SOCK_VALIDATE_XMIT
@@ -517,15 +520,12 @@ struct sock {
sk_no_check_tx : 1,
sk_no_check_rx : 1;
u8 sk_shutdown;
- u16 sk_type;
- u16 sk_protocol;
unsigned long sk_lingertime;
struct proto *sk_prot_creator;
rwlock_t sk_callback_lock;
int sk_err_soft;
u32 sk_ack_backlog;
u32 sk_max_ack_backlog;
- kuid_t sk_uid;
unsigned long sk_ino;
spinlock_t sk_peer_lock;
int sk_bind_phc;