Skip to content

Commit

Permalink
tcp: move tp->tcp_usec_ts to tcp_sock_read_txrx group
Browse files Browse the repository at this point in the history
tp->tcp_usec_ts is a read mostly field, used in rx and tx fast paths.

Fixes: d5fed5a ("tcp: reorganize tcp_sock fast path variables")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Coco Li <[email protected]>
Cc: Wei Wang <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Feb 12, 2024
1 parent 119ff04 commit 666a877
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/networking/net_cachelines/tcp_sock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ u16 advmss - read_m
u8 compressed_ack
u8:2 dup_ack_counter
u8:1 tlp_retrans
u8:1 tcp_usec_ts
u8:1 tcp_usec_ts read_mostly read_mostly
u32 chrono_start read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
u32[3] chrono_stat read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
u8:2 chrono_type read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
Expand Down
4 changes: 2 additions & 2 deletions include/linux/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ struct tcp_sock {
u8 scaling_ratio; /* see tcp_win_from_space() */
u8 chrono_type : 2, /* current chronograph type */
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? */
__cacheline_group_end(tcp_sock_read_txrx);
Expand Down Expand Up @@ -368,8 +369,7 @@ struct tcp_sock {
u8 compressed_ack;
u8 dup_ack_counter:2,
tlp_retrans:1, /* TLP is a retransmission */
tcp_usec_ts:1, /* TSval values in usec */
unused:4;
unused:5;
u8 thin_lto : 1,/* Use linear timeouts for thin streams */
recvmsg_inq : 1,/* Indicate # of bytes in queue upon recvmsg */
fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */
Expand Down

0 comments on commit 666a877

Please sign in to comment.