Commit 969904dc authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

tcp: move recvmsg_inq to tcp_sock_read_txrx



Fill a hole in tcp_sock_read_txrx, instead of possibly wasting
a cache line.

Note that tcp_recvmsg_locked() is also reading tp->repair,
so this removes one cache line miss in tcp recvmsg().

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250919204856.2977245-6-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1b44d700
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ u8:1 is_sack_reneg read_m
u8:2                          fastopen_client_fail
u8:4                          nonagle                 read_write                              tcp_skb_entail,tcp_push_pending_frames
u8:1                          thin_lto
u8:1                          recvmsg_inq
u8:1                          recvmsg_inq                                 read_mostly         tcp_recvmsg
u8:1                          repair                  read_mostly                             tcp_write_xmit
u8:1                          frto
u8                            repair_queue
+2 −2
Original line number Diff line number Diff line
@@ -232,7 +232,8 @@ struct tcp_sock {
		repair      : 1,
		tcp_usec_ts : 1, /* TSval values in usec */
		is_sack_reneg:1,    /* in recovery from loss with SACK reneg? */
		is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */
		is_cwnd_limited:1,/* forward progress limited by snd_cwnd? */
		recvmsg_inq : 1;/* Indicate # of bytes in queue upon recvmsg */
	__cacheline_group_end(tcp_sock_read_txrx);

	/* RX read-mostly hotpath cache lines */
@@ -252,7 +253,6 @@ struct tcp_sock {
#if defined(CONFIG_TLS_DEVICE)
	void (*tcp_clean_acked)(struct sock *sk, u32 acked_seq);
#endif
	u8	recvmsg_inq : 1;/* Indicate # of bytes in queue upon recvmsg */
	__cacheline_group_end(tcp_sock_read_rx);

	/* TX read-write hotpath cache lines */