← Documents Documentation/networking/net_cachelines/tcp_sock.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

tcp_sock struct fast path usage breakdown

tcp_sock의 sequence, RTT, congestion, queue와 recovery field별 fast-path 접근 표입니다.

Source pathDocumentation/networking/net_cachelines/tcp_sock.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

tcp_sock.rst:1-170

TCP 양방향 hot path의 sequence·window·timestamp·RTT·congestion·ECN·recovery field 159개를 kernel function 좌표와 함께 구조화했습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2 .. Copyright (C) 2023 Google LLC
3
4 =========================================
5 tcp_sock struct fast path usage breakdown
6 =========================================
7
8 ============================= ======================= =================== =================== ==================================================================================================================================================================================================================
9 Type Name fastpath_tx_access fastpath_rx_access Comments
10 ============================= ======================= =================== =================== ==================================================================================================================================================================================================================
11 struct inet_connection_sock inet_conn
12 u16 tcp_header_len read_mostly read_mostly tcp_bound_to_half_wnd,tcp_current_mss(tx);tcp_rcv_established(rx)
13 u16 gso_segs read_mostly tcp_xmit_size_goal
14 __be32 pred_flags read_write read_mostly tcp_select_window(tx);tcp_rcv_established(rx)
15 u64 bytes_received read_write tcp_rcv_nxt_update(rx)
16 u32 segs_in read_write tcp_v6_rcv(rx)
17 u32 data_segs_in read_write tcp_v6_rcv(rx)
18 u32 rcv_nxt read_mostly read_write tcp_cleanup_rbuf,tcp_send_ack,tcp_inq_hint,tcp_transmit_skb,tcp_receive_window(tx);tcp_v6_do_rcv,tcp_rcv_established,tcp_data_queue,tcp_receive_window,tcp_rcv_nxt_update(write)(rx)
19 u32 copied_seq read_mostly tcp_cleanup_rbuf,tcp_rcv_space_adjust,tcp_inq_hint
20 u32 rcv_wup read_write __tcp_cleanup_rbuf,tcp_receive_window,tcp_receive_established
21 u32 snd_nxt read_write read_mostly tcp_rate_check_app_limited,__tcp_transmit_skb,tcp_event_new_data_sent(write)(tx);tcp_rcv_established,tcp_ack,tcp_clean_rtx_queue(rx)
22 u32 segs_out read_write __tcp_transmit_skb
23 u32 data_segs_out read_write __tcp_transmit_skb,tcp_update_skb_after_send
24 u64 bytes_sent read_write __tcp_transmit_skb
25 u64 bytes_acked read_write tcp_snd_una_update/tcp_ack
26 u32 dsack_dups
27 u32 snd_una read_mostly read_write tcp_wnd_end,tcp_urg_mode,tcp_minshall_check,tcp_cwnd_validate(tx);tcp_ack,tcp_may_update_window,tcp_clean_rtx_queue(write),tcp_ack_tstamp(rx)
28 u32 snd_sml read_write tcp_minshall_check,tcp_minshall_update
29 u32 rcv_tstamp read_write read_write tcp_ack
30 void * tcp_clean_acked read_mostly tcp_ack
31 u32 lsndtime read_write tcp_slow_start_after_idle_check,tcp_event_data_sent
32 u32 last_oow_ack_time
33 u32 compressed_ack_rcv_nxt
34 u32 tsoffset read_mostly read_mostly tcp_established_options(tx);tcp_fast_parse_options(rx)
35 struct list_head tsq_node
36 struct list_head tsorted_sent_queue read_write tcp_update_skb_after_send
37 u32 snd_wl1 read_mostly tcp_may_update_window
38 u32 snd_wnd read_mostly read_mostly tcp_wnd_end,tcp_tso_should_defer(tx);tcp_fast_path_on(rx)
39 u32 max_window read_mostly tcp_bound_to_half_wnd,forced_push
40 u32 mss_cache read_mostly read_mostly tcp_rate_check_app_limited,tcp_current_mss,tcp_sync_mss,tcp_sndbuf_expand,tcp_tso_should_defer(tx);tcp_update_pacing_rate,tcp_clean_rtx_queue(rx)
41 u32 window_clamp read_mostly read_write tcp_rcv_space_adjust,__tcp_select_window
42 u32 rcv_ssthresh read_mostly __tcp_select_window
43 u8 scaling_ratio read_mostly read_mostly tcp_win_from_space
44 struct tcp_rack
45 u16 advmss read_mostly tcp_rcv_space_adjust
46 u8 compressed_ack
47 u8:2 dup_ack_counter
48 u8:1 tlp_retrans
49 u8:1 tcp_usec_ts read_mostly read_mostly
50 u32 chrono_start read_write tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
51 u32[3] chrono_stat read_write tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
52 u8:2 chrono_type read_write tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
53 u8:1 rate_app_limited read_write tcp_rate_gen
54 u8:1 fastopen_connect
55 u8:1 fastopen_no_cookie
56 u8:1 is_sack_reneg read_mostly tcp_skb_entail,tcp_ack
57 u8:2 fastopen_client_fail
58 u8:4 nonagle read_write tcp_skb_entail,tcp_push_pending_frames
59 u8:1 thin_lto
60 u8:1 recvmsg_inq read_mostly tcp_recvmsg
61 u8:1 repair read_mostly tcp_write_xmit
62 u8:1 frto
63 u8 repair_queue
64 u8:2 save_syn
65 u8:1 syn_data
66 u8:1 syn_fastopen
67 u8:1 syn_fastopen_exp
68 u8:1 syn_fastopen_ch
69 u8:1 syn_data_acked
70 u8:1 is_cwnd_limited read_mostly tcp_cwnd_validate,tcp_is_cwnd_limited
71 u32 tlp_high_seq read_mostly tcp_ack
72 u32 tcp_tx_delay
73 u64 tcp_wstamp_ns read_write tcp_pacing_check,tcp_tso_should_defer,tcp_update_skb_after_send
74 u64 tcp_clock_cache read_write read_write tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust),__tcp_transmit_skb,tcp_tso_should_defer;timer
75 u64 tcp_mstamp read_write read_write tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust)(tx);tcp_rcv_space_adjust,tcp_rate_gen,tcp_clean_rtx_queue,tcp_ack_update_rtt/tcp_time_stamp(rx);timer
76 u32 srtt_us read_mostly read_write tcp_tso_should_defer(tx);tcp_update_pacing_rate,__tcp_set_rto,tcp_rtt_estimator(rx)
77 u32 mdev_us read_write tcp_rtt_estimator
78 u32 mdev_max_us
79 u32 rttvar_us read_mostly __tcp_set_rto
80 u32 rtt_seq read_write tcp_rtt_estimator
81 struct minmax rtt_min read_mostly tcp_min_rtt/tcp_rate_gen,tcp_min_rtttcp_update_rtt_min
82 u32 packets_out read_write read_write tcp_packets_in_flight(tx/rx);tcp_slow_start_after_idle_check,tcp_nagle_check,tcp_rate_skb_sent,tcp_event_new_data_sent,tcp_cwnd_validate,tcp_write_xmit(tx);tcp_ack,tcp_clean_rtx_queue,tcp_update_pacing_rate(rx)
83 u32 retrans_out read_mostly tcp_packets_in_flight,tcp_rate_check_app_limited
84 u32 max_packets_out read_write tcp_cwnd_validate
85 u32 cwnd_usage_seq read_write tcp_cwnd_validate
86 u16 urg_data read_mostly tcp_fast_path_check
87 u8 ecn_flags read_write tcp_ecn_send
88 u8 keepalive_probes
89 u32 reordering read_mostly tcp_sndbuf_expand
90 u32 reord_seen
91 u32 snd_up read_write read_mostly tcp_mark_urg,tcp_urg_mode,__tcp_transmit_skb(tx);tcp_clean_rtx_queue(rx)
92 struct tcp_options_received rx_opt read_mostly read_write tcp_established_options(tx);tcp_fast_path_on,tcp_ack_update_window,tcp_is_sack,tcp_data_queue,tcp_rcv_established,tcp_ack_update_rtt(rx)
93 u32 snd_ssthresh read_mostly tcp_update_pacing_rate
94 u32 snd_cwnd read_mostly read_mostly tcp_snd_cwnd,tcp_rate_check_app_limited,tcp_tso_should_defer(tx);tcp_update_pacing_rate
95 u32 snd_cwnd_cnt
96 u32 snd_cwnd_clamp
97 u32 snd_cwnd_used
98 u32 snd_cwnd_stamp
99 u32 prior_cwnd
100 u32 prr_delivered
101 u32 prr_out read_mostly read_mostly tcp_rate_skb_sent,tcp_newly_delivered(tx);tcp_ack,tcp_rate_gen,tcp_clean_rtx_queue(rx)
102 u32 delivered read_mostly read_write tcp_rate_skb_sent, tcp_newly_delivered(tx);tcp_ack, tcp_rate_gen, tcp_clean_rtx_queue (rx)
103 u32 delivered_ce read_mostly read_write tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
104 u32 received_ce read_mostly read_write
105 u32[3] received_ecn_bytes read_mostly read_write
106 u8:4 received_ce_pending read_mostly read_write
107 u32[3] delivered_ecn_bytes read_write
108 u8:2 syn_ect_snt write_mostly read_write
109 u8:2 syn_ect_rcv read_mostly read_write
110 u8:2 accecn_minlen write_mostly read_write
111 u8:2 est_ecnfield read_write
112 u8:2 accecn_opt_demand read_mostly read_write
113 u8:2 prev_ecnfield read_write
114 u64 accecn_opt_tstamp read_write
115 u8:4 accecn_fail_mode
116 u32 lost read_mostly tcp_ack
117 u32 app_limited read_write read_mostly tcp_rate_check_app_limited,tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
118 u64 first_tx_mstamp read_write tcp_rate_skb_sent
119 u64 delivered_mstamp read_write tcp_rate_skb_sent
120 u32 rate_delivered read_mostly tcp_rate_gen
121 u32 rate_interval_us read_mostly rate_delivered,rate_app_limited
122 u32 rcv_wnd read_write read_mostly tcp_select_window,tcp_receive_window,tcp_fast_path_check
123 u32 write_seq read_write tcp_rate_check_app_limited,tcp_write_queue_empty,tcp_skb_entail,forced_push,tcp_mark_push
124 u32 notsent_lowat read_mostly tcp_stream_memory_free
125 u32 pushed_seq read_write tcp_mark_push,forced_push
126 u32 lost_out read_mostly read_mostly tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_rate_check_app_limited(rx)
127 u32 sacked_out read_mostly read_mostly tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_clean_rtx_queue(rx)
128 struct hrtimer pacing_timer
129 struct hrtimer compressed_ack_timer
130 struct sk_buff* retransmit_skb_hint read_mostly tcp_clean_rtx_queue
131 struct rb_root out_of_order_queue read_mostly tcp_data_queue,tcp_fast_path_check
132 struct sk_buff* ooo_last_skb
133 struct tcp_sack_block[1] duplicate_sack
134 struct tcp_sack_block[4] selective_acks
135 struct tcp_sack_block[4] recv_sack_cache
136 struct sk_buff* highest_sack read_write tcp_event_new_data_sent
137 u32 prior_ssthresh
138 u32 high_seq
139 u32 retrans_stamp
140 u32 undo_marker
141 int undo_retrans
142 u64 bytes_retrans
143 u32 total_retrans
144 u32 rto_stamp
145 u16 total_rto
146 u16 total_rto_recoveries
147 u32 total_rto_time
148 u32 urg_seq
149 unsigned_int keepalive_time
150 unsigned_int keepalive_intvl
151 int linger2
152 u8 bpf_sock_ops_cb_flags
153 u8:1 bpf_chg_cc_inprogress
154 u16 timeout_rehash
155 u32 rcv_ooopack
156 u32 rcv_rtt_last_tsecr
157 struct rcv_rtt_est read_write tcp_rcv_space_adjust,tcp_rcv_established
158 struct rcvq_space read_write tcp_rcv_space_adjust
159 struct mtu_probe
160 u32 plb_rehash
161 u32 mtu_info
162 bool is_mptcp
163 bool smc_hs_congested
164 bool syn_smc
165 struct tcp_sock_af_ops* af_specific
166 struct tcp_md5sig_info* md5sig_info
167 struct tcp_fastopen_request* fastopen_req
168 struct request_sock* fastopen_rsk
169 struct saved_syn* saved_syn
170 ============================= ======================= =================== =================== ==================================================================================================================================================================================================================
171

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Header·sequence·window·timestamp field

1-60

`struct tcp_sock` 표는 TCP의 핵심 sequence, window와 timing field를 TX/RX hotness와 실제 function으로 연결합니다. `tcp_header_len`, `pred_flags`, `rcv_nxt`, `snd_nxt`, `snd_una`, timestamp offset, send window와 MSS cache가 양방향 fast path에서 반복적으로 접근됩니다.

TX는 bytes·segment sent, transmit sequence, Minshall state, chrono와 sent queue를 갱신합니다. RX는 bytes received·acked, receive next와 copied sequence, receive window update를 다룹니다. `rcv_tstamp`, `snd_wnd`, `mss_cache`, `window_clamp`, scaling ratio는 window 계산과 fast path prediction에 직접 연결됩니다.

Fast Open, SACK reneging, Nagle mode, repair와 receive queue option 같은 bit field도 원문 layout 순서로 보존합니다.

tcp_sock sequence·window field
TypeNameTX fast pathRX fast path참조 function·설명
struct inet_connection_sockinet_conn
u16tcp_header_lenread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_bound_to_half_wnd,tcp_current_mss(tx);tcp_rcv_established(rx)
u16gso_segsread_mostly (주로 읽기)tcp_xmit_size_goal
__be32pred_flagsread_write (읽기·쓰기)read_mostly (주로 읽기)tcp_select_window(tx);tcp_rcv_established(rx)
u64bytes_receivedread_write (읽기·쓰기)tcp_rcv_nxt_update(rx)
u32segs_inread_write (읽기·쓰기)tcp_v6_rcv(rx)
u32data_segs_inread_write (읽기·쓰기)tcp_v6_rcv(rx)
u32rcv_nxtread_mostly (주로 읽기)read_write (읽기·쓰기)tcp_cleanup_rbuf,tcp_send_ack,tcp_inq_hint,tcp_transmit_skb,tcp_receive_window(tx);tcp_v6_do_rcv,tcp_rcv_established,tcp_data_queue,tcp_receive_window,tcp_rcv_nxt_update(write)(rx)
u32copied_seqread_mostly (주로 읽기)tcp_cleanup_rbuf,tcp_rcv_space_adjust,tcp_inq_hint
u32rcv_wupread_write (읽기·쓰기)__tcp_cleanup_rbuf,tcp_receive_window,tcp_receive_established
u32snd_nxtread_write (읽기·쓰기)read_mostly (주로 읽기)tcp_rate_check_app_limited,__tcp_transmit_skb,tcp_event_new_data_sent(write)(tx);tcp_rcv_established,tcp_ack,tcp_clean_rtx_queue(rx)
u32segs_outread_write (읽기·쓰기)__tcp_transmit_skb
u32data_segs_outread_write (읽기·쓰기)__tcp_transmit_skb,tcp_update_skb_after_send
u64bytes_sentread_write (읽기·쓰기)__tcp_transmit_skb
u64bytes_ackedread_write (읽기·쓰기)tcp_snd_una_update/tcp_ack
u32dsack_dups
u32snd_unaread_mostly (주로 읽기)read_write (읽기·쓰기)tcp_wnd_end,tcp_urg_mode,tcp_minshall_check,tcp_cwnd_validate(tx);tcp_ack,tcp_may_update_window,tcp_clean_rtx_queue(write),tcp_ack_tstamp(rx)
u32snd_smlread_write (읽기·쓰기)tcp_minshall_check,tcp_minshall_update
u32rcv_tstampread_write (읽기·쓰기)read_write (읽기·쓰기)tcp_ack
void *tcp_clean_ackedread_mostly (주로 읽기)tcp_ack
u32lsndtimeread_write (읽기·쓰기)tcp_slow_start_after_idle_check,tcp_event_data_sent
u32last_oow_ack_time
u32compressed_ack_rcv_nxt
u32tsoffsetread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_established_options(tx);tcp_fast_parse_options(rx)
struct list_headtsq_node
struct list_headtsorted_sent_queueread_write (읽기·쓰기)tcp_update_skb_after_send
u32snd_wl1read_mostly (주로 읽기)tcp_may_update_window
u32snd_wndread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_wnd_end,tcp_tso_should_defer(tx);tcp_fast_path_on(rx)
u32max_windowread_mostly (주로 읽기)tcp_bound_to_half_wnd,forced_push
u32mss_cacheread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_rate_check_app_limited,tcp_current_mss,tcp_sync_mss,tcp_sndbuf_expand,tcp_tso_should_defer(tx);tcp_update_pacing_rate,tcp_clean_rtx_queue(rx)
u32window_clampread_mostly (주로 읽기)read_write (읽기·쓰기)tcp_rcv_space_adjust,__tcp_select_window
u32rcv_ssthreshread_mostly (주로 읽기)__tcp_select_window
u8scaling_ratioread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_win_from_space
structtcp_rack
u16advmssread_mostly (주로 읽기)tcp_rcv_space_adjust
u8compressed_ack
u8:2dup_ack_counter
u8:1tlp_retrans
u8:1tcp_usec_tsread_mostly (주로 읽기)read_mostly (주로 읽기)
u32chrono_startread_write (읽기·쓰기)tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
u32[3]chrono_statread_write (읽기·쓰기)tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
u8:2chrono_typeread_write (읽기·쓰기)tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
u8:1rate_app_limitedread_write (읽기·쓰기)tcp_rate_gen
u8:1fastopen_connect
u8:1fastopen_no_cookie
u8:1is_sack_renegread_mostly (주로 읽기)tcp_skb_entail,tcp_ack
u8:2fastopen_client_fail
u8:4nonagleread_write (읽기·쓰기)tcp_skb_entail,tcp_push_pending_frames
u8:1thin_lto
u8:1recvmsg_inqread_mostly (주로 읽기)tcp_recvmsg

원문 11~60행을 구조화했습니다.

.. SPDX-License-Identifier: GPL-2.0
.. Copyright (C) 2023 Google LLC

=========================================
tcp_sock struct fast path usage breakdown
=========================================

============================= ======================= =================== =================== ==================================================================================================================================================================================================================
Type                          Name                    fastpath_tx_access  fastpath_rx_access  Comments
============================= ======================= =================== =================== ==================================================================================================================================================================================================================
struct inet_connection_sock   inet_conn
u16                           tcp_header_len          read_mostly         read_mostly         tcp_bound_to_half_wnd,tcp_current_mss(tx);tcp_rcv_established(rx)
u16                           gso_segs                read_mostly                             tcp_xmit_size_goal
__be32                        pred_flags              read_write          read_mostly         tcp_select_window(tx);tcp_rcv_established(rx)
u64                           bytes_received                              read_write          tcp_rcv_nxt_update(rx)
u32                           segs_in                                     read_write          tcp_v6_rcv(rx)
u32                           data_segs_in                                read_write          tcp_v6_rcv(rx)
u32                           rcv_nxt                 read_mostly         read_write          tcp_cleanup_rbuf,tcp_send_ack,tcp_inq_hint,tcp_transmit_skb,tcp_receive_window(tx);tcp_v6_do_rcv,tcp_rcv_established,tcp_data_queue,tcp_receive_window,tcp_rcv_nxt_update(write)(rx)
u32                           copied_seq                                  read_mostly         tcp_cleanup_rbuf,tcp_rcv_space_adjust,tcp_inq_hint
u32                           rcv_wup                                     read_write          __tcp_cleanup_rbuf,tcp_receive_window,tcp_receive_established
u32                           snd_nxt                 read_write          read_mostly         tcp_rate_check_app_limited,__tcp_transmit_skb,tcp_event_new_data_sent(write)(tx);tcp_rcv_established,tcp_ack,tcp_clean_rtx_queue(rx)
u32                           segs_out                read_write                              __tcp_transmit_skb
u32                           data_segs_out           read_write                              __tcp_transmit_skb,tcp_update_skb_after_send
u64                           bytes_sent              read_write                              __tcp_transmit_skb
u64                           bytes_acked                                 read_write          tcp_snd_una_update/tcp_ack
u32                           dsack_dups
u32                           snd_una                 read_mostly         read_write          tcp_wnd_end,tcp_urg_mode,tcp_minshall_check,tcp_cwnd_validate(tx);tcp_ack,tcp_may_update_window,tcp_clean_rtx_queue(write),tcp_ack_tstamp(rx)
u32                           snd_sml                 read_write                              tcp_minshall_check,tcp_minshall_update
u32                           rcv_tstamp              read_write          read_write          tcp_ack
void *                        tcp_clean_acked         read_mostly                             tcp_ack
u32                           lsndtime                read_write                              tcp_slow_start_after_idle_check,tcp_event_data_sent
u32                           last_oow_ack_time
u32                           compressed_ack_rcv_nxt
u32                           tsoffset                read_mostly         read_mostly         tcp_established_options(tx);tcp_fast_parse_options(rx)
struct list_head              tsq_node
struct list_head              tsorted_sent_queue      read_write                              tcp_update_skb_after_send
u32                           snd_wl1                                     read_mostly         tcp_may_update_window
u32                           snd_wnd                 read_mostly         read_mostly         tcp_wnd_end,tcp_tso_should_defer(tx);tcp_fast_path_on(rx)
u32                           max_window              read_mostly                             tcp_bound_to_half_wnd,forced_push
u32                           mss_cache               read_mostly         read_mostly         tcp_rate_check_app_limited,tcp_current_mss,tcp_sync_mss,tcp_sndbuf_expand,tcp_tso_should_defer(tx);tcp_update_pacing_rate,tcp_clean_rtx_queue(rx)
u32                           window_clamp            read_mostly         read_write          tcp_rcv_space_adjust,__tcp_select_window
u32                           rcv_ssthresh            read_mostly                             __tcp_select_window
u8                            scaling_ratio           read_mostly         read_mostly         tcp_win_from_space
struct                        tcp_rack
u16                           advmss                                      read_mostly         tcp_rcv_space_adjust
u8                            compressed_ack
u8:2                          dup_ack_counter
u8:1                          tlp_retrans
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)
u8:1                          rate_app_limited                            read_write          tcp_rate_gen
u8:1                          fastopen_connect
u8:1                          fastopen_no_cookie
u8:1                          is_sack_reneg                               read_mostly         tcp_skb_entail,tcp_ack
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                                 read_mostly         tcp_recvmsg

Pacing·RTT·congestion·ECN field

61-115

중간 영역은 repair와 SYN 상태 뒤 pacing timestamp, cached clock, RTT estimator, in-flight packet accounting, urgent data, ECN, reordering과 received TCP option을 포함합니다.

`tcp_clock_cache`와 `tcp_mstamp`는 TX와 RX 모두 read/write되며 pacing, receive-space 조정, rate generation과 RTT update의 기준입니다. `srtt_us`는 TX에서 주로 읽고 RX RTT estimator가 갱신합니다. `packets_out`도 양방향에서 in-flight packet 계산과 ACK cleanup에 사용됩니다.

Congestion window와 PRR delivery, delivered data 및 ECN/AccECN byte·state field는 송신 rate sample과 수신 ACK 처리 사이에서 공유됩니다. 각 access 분류와 function 목록을 줄이지 않고 표로 제공합니다.

tcp_sock RTT·congestion·ECN field
TypeNameTX fast pathRX fast path참조 function·설명
u8:1repairread_mostly (주로 읽기)tcp_write_xmit
u8:1frto
u8repair_queue
u8:2save_syn
u8:1syn_data
u8:1syn_fastopen
u8:1syn_fastopen_exp
u8:1syn_fastopen_ch
u8:1syn_data_acked
u8:1is_cwnd_limitedread_mostly (주로 읽기)tcp_cwnd_validate,tcp_is_cwnd_limited
u32tlp_high_seqread_mostly (주로 읽기)tcp_ack
u32tcp_tx_delay
u64tcp_wstamp_nsread_write (읽기·쓰기)tcp_pacing_check,tcp_tso_should_defer,tcp_update_skb_after_send
u64tcp_clock_cacheread_write (읽기·쓰기)read_write (읽기·쓰기)tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust),__tcp_transmit_skb,tcp_tso_should_defer;timer
u64tcp_mstampread_write (읽기·쓰기)read_write (읽기·쓰기)tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust)(tx);tcp_rcv_space_adjust,tcp_rate_gen,tcp_clean_rtx_queue,tcp_ack_update_rtt/tcp_time_stamp(rx);timer
u32srtt_usread_mostly (주로 읽기)read_write (읽기·쓰기)tcp_tso_should_defer(tx);tcp_update_pacing_rate,__tcp_set_rto,tcp_rtt_estimator(rx)
u32mdev_usread_write (읽기·쓰기)tcp_rtt_estimator
u32mdev_max_us
u32rttvar_usread_mostly (주로 읽기)__tcp_set_rto
u32rtt_seqread_write (읽기·쓰기)tcp_rtt_estimator
struct minmaxrtt_minread_mostly (주로 읽기)tcp_min_rtt/tcp_rate_gen,tcp_min_rtttcp_update_rtt_min
u32packets_outread_write (읽기·쓰기)read_write (읽기·쓰기)tcp_packets_in_flight(tx/rx);tcp_slow_start_after_idle_check,tcp_nagle_check,tcp_rate_skb_sent,tcp_event_new_data_sent,tcp_cwnd_validate,tcp_write_xmit(tx);tcp_ack,tcp_clean_rtx_queue,tcp_update_pacing_rate(rx)
u32retrans_outread_mostly (주로 읽기)tcp_packets_in_flight,tcp_rate_check_app_limited
u32max_packets_outread_write (읽기·쓰기)tcp_cwnd_validate
u32cwnd_usage_seqread_write (읽기·쓰기)tcp_cwnd_validate
u16urg_dataread_mostly (주로 읽기)tcp_fast_path_check
u8ecn_flagsread_write (읽기·쓰기)tcp_ecn_send
u8keepalive_probes
u32reorderingread_mostly (주로 읽기)tcp_sndbuf_expand
u32reord_seen
u32snd_upread_write (읽기·쓰기)read_mostly (주로 읽기)tcp_mark_urg,tcp_urg_mode,__tcp_transmit_skb(tx);tcp_clean_rtx_queue(rx)
struct tcp_options_receivedrx_optread_mostly (주로 읽기)read_write (읽기·쓰기)tcp_established_options(tx);tcp_fast_path_on,tcp_ack_update_window,tcp_is_sack,tcp_data_queue,tcp_rcv_established,tcp_ack_update_rtt(rx)
u32snd_ssthreshread_mostly (주로 읽기)tcp_update_pacing_rate
u32snd_cwndread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_snd_cwnd,tcp_rate_check_app_limited,tcp_tso_should_defer(tx);tcp_update_pacing_rate
u32snd_cwnd_cnt
u32snd_cwnd_clamp
u32snd_cwnd_used
u32snd_cwnd_stamp
u32prior_cwnd
u32prr_delivered
u32prr_outread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_rate_skb_sent,tcp_newly_delivered(tx);tcp_ack,tcp_rate_gen,tcp_clean_rtx_queue(rx)
u32deliveredread_mostly (주로 읽기)read_write (읽기·쓰기)tcp_rate_skb_sent, tcp_newly_delivered(tx);tcp_ack, tcp_rate_gen, tcp_clean_rtx_queue (rx)
u32delivered_ceread_mostly (주로 읽기)read_write (읽기·쓰기)tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
u32received_ceread_mostly (주로 읽기)read_write (읽기·쓰기)
u32[3]received_ecn_bytesread_mostly (주로 읽기)read_write (읽기·쓰기)
u8:4received_ce_pendingread_mostly (주로 읽기)read_write (읽기·쓰기)
u32[3]delivered_ecn_bytesread_write (읽기·쓰기)
u8:2syn_ect_sntwrite_mostly (주로 쓰기)read_write (읽기·쓰기)
u8:2syn_ect_rcvread_mostly (주로 읽기)read_write (읽기·쓰기)
u8:2accecn_minlenwrite_mostly (주로 쓰기)read_write (읽기·쓰기)
u8:2est_ecnfieldread_write (읽기·쓰기)
u8:2accecn_opt_demandread_mostly (주로 읽기)read_write (읽기·쓰기)
u8:2prev_ecnfieldread_write (읽기·쓰기)
u64accecn_opt_tstampread_write (읽기·쓰기)
u8:4accecn_fail_mode

원문 61~115행을 구조화했습니다.

u8:1                          repair                  read_mostly                             tcp_write_xmit
u8:1                          frto
u8                            repair_queue
u8:2                          save_syn
u8:1                          syn_data
u8:1                          syn_fastopen
u8:1                          syn_fastopen_exp
u8:1                          syn_fastopen_ch
u8:1                          syn_data_acked
u8:1                          is_cwnd_limited         read_mostly                             tcp_cwnd_validate,tcp_is_cwnd_limited
u32                           tlp_high_seq                                read_mostly         tcp_ack
u32                           tcp_tx_delay
u64                           tcp_wstamp_ns           read_write                              tcp_pacing_check,tcp_tso_should_defer,tcp_update_skb_after_send
u64                           tcp_clock_cache         read_write          read_write          tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust),__tcp_transmit_skb,tcp_tso_should_defer;timer
u64                           tcp_mstamp              read_write          read_write          tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust)(tx);tcp_rcv_space_adjust,tcp_rate_gen,tcp_clean_rtx_queue,tcp_ack_update_rtt/tcp_time_stamp(rx);timer
u32                           srtt_us                 read_mostly         read_write          tcp_tso_should_defer(tx);tcp_update_pacing_rate,__tcp_set_rto,tcp_rtt_estimator(rx)
u32                           mdev_us                 read_write                              tcp_rtt_estimator
u32                           mdev_max_us
u32                           rttvar_us                                   read_mostly         __tcp_set_rto
u32                           rtt_seq                 read_write                              tcp_rtt_estimator
struct minmax                 rtt_min                                     read_mostly         tcp_min_rtt/tcp_rate_gen,tcp_min_rtttcp_update_rtt_min
u32                           packets_out             read_write          read_write          tcp_packets_in_flight(tx/rx);tcp_slow_start_after_idle_check,tcp_nagle_check,tcp_rate_skb_sent,tcp_event_new_data_sent,tcp_cwnd_validate,tcp_write_xmit(tx);tcp_ack,tcp_clean_rtx_queue,tcp_update_pacing_rate(rx)
u32                           retrans_out                                 read_mostly         tcp_packets_in_flight,tcp_rate_check_app_limited
u32                           max_packets_out                             read_write          tcp_cwnd_validate
u32                           cwnd_usage_seq                              read_write          tcp_cwnd_validate
u16                           urg_data                                    read_mostly         tcp_fast_path_check
u8                            ecn_flags               read_write                              tcp_ecn_send
u8                            keepalive_probes
u32                           reordering              read_mostly                             tcp_sndbuf_expand
u32                           reord_seen
u32                           snd_up                  read_write          read_mostly         tcp_mark_urg,tcp_urg_mode,__tcp_transmit_skb(tx);tcp_clean_rtx_queue(rx)
struct tcp_options_received   rx_opt                  read_mostly         read_write          tcp_established_options(tx);tcp_fast_path_on,tcp_ack_update_window,tcp_is_sack,tcp_data_queue,tcp_rcv_established,tcp_ack_update_rtt(rx)
u32                           snd_ssthresh                                read_mostly         tcp_update_pacing_rate
u32                           snd_cwnd                read_mostly         read_mostly         tcp_snd_cwnd,tcp_rate_check_app_limited,tcp_tso_should_defer(tx);tcp_update_pacing_rate
u32                           snd_cwnd_cnt
u32                           snd_cwnd_clamp
u32                           snd_cwnd_used
u32                           snd_cwnd_stamp
u32                           prior_cwnd
u32                           prr_delivered
u32                           prr_out                 read_mostly         read_mostly         tcp_rate_skb_sent,tcp_newly_delivered(tx);tcp_ack,tcp_rate_gen,tcp_clean_rtx_queue(rx)
u32                           delivered               read_mostly         read_write          tcp_rate_skb_sent, tcp_newly_delivered(tx);tcp_ack, tcp_rate_gen, tcp_clean_rtx_queue (rx)
u32                           delivered_ce            read_mostly         read_write          tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
u32                           received_ce             read_mostly         read_write
u32[3]                        received_ecn_bytes      read_mostly         read_write
u8:4                          received_ce_pending     read_mostly         read_write
u32[3]                        delivered_ecn_bytes                         read_write
u8:2                          syn_ect_snt             write_mostly        read_write
u8:2                          syn_ect_rcv             read_mostly         read_write
u8:2                          accecn_minlen           write_mostly        read_write
u8:2                          est_ecnfield                                read_write
u8:2                          accecn_opt_demand       read_mostly         read_write
u8:2                          prev_ecnfield                               read_write
u64                           accecn_opt_tstamp       read_write
u8:4                          accecn_fail_mode

Rate sample·queue·recovery·protocol tail

116-170

후반부에는 loss와 application-limited state, delivery timestamp와 rate sample, receive window, write/push sequence, outstanding loss·SACK count, pacing timer와 out-of-order queue가 있습니다. `lost_out`과 `sacked_out`은 TX/RX 모두 in-flight packet 계산에서 주로 읽습니다.

Retransmit hint와 SACK block cache, undo/recovery marker, RTO와 keepalive 설정, BPF socket operation, receive RTT/queue-space estimator와 MTU probe가 이어집니다. Tail의 `is_mptcp`, SMC handshake state, address-family operation, MD5 signature, Fast Open request와 saved SYN pointer도 보존합니다.

이 표는 field의 의미 사전이 아니라 fast path cacheline 분석 자료이므로 type과 symbol, hotness 및 참조 function을 원문 그대로 찾을 수 있게 구성했습니다.

tcp_sock queue·recovery tail
TypeNameTX fast pathRX fast path참조 function·설명
u32lostread_mostly (주로 읽기)tcp_ack
u32app_limitedread_write (읽기·쓰기)read_mostly (주로 읽기)tcp_rate_check_app_limited,tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
u64first_tx_mstampread_write (읽기·쓰기)tcp_rate_skb_sent
u64delivered_mstampread_write (읽기·쓰기)tcp_rate_skb_sent
u32rate_deliveredread_mostly (주로 읽기)tcp_rate_gen
u32rate_interval_usread_mostly (주로 읽기)rate_delivered,rate_app_limited
u32rcv_wndread_write (읽기·쓰기)read_mostly (주로 읽기)tcp_select_window,tcp_receive_window,tcp_fast_path_check
u32write_seqread_write (읽기·쓰기)tcp_rate_check_app_limited,tcp_write_queue_empty,tcp_skb_entail,forced_push,tcp_mark_push
u32notsent_lowatread_mostly (주로 읽기)tcp_stream_memory_free
u32pushed_seqread_write (읽기·쓰기)tcp_mark_push,forced_push
u32lost_outread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_rate_check_app_limited(rx)
u32sacked_outread_mostly (주로 읽기)read_mostly (주로 읽기)tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_clean_rtx_queue(rx)
struct hrtimerpacing_timer
struct hrtimercompressed_ack_timer
struct sk_buff*retransmit_skb_hintread_mostly (주로 읽기)tcp_clean_rtx_queue
struct rb_rootout_of_order_queueread_mostly (주로 읽기)tcp_data_queue,tcp_fast_path_check
struct sk_buff*ooo_last_skb
struct tcp_sack_block[1]duplicate_sack
struct tcp_sack_block[4]selective_acks
struct tcp_sack_block[4]recv_sack_cache
struct sk_buff*highest_sackread_write (읽기·쓰기)tcp_event_new_data_sent
u32prior_ssthresh
u32high_seq
u32retrans_stamp
u32undo_marker
intundo_retrans
u64bytes_retrans
u32total_retrans
u32rto_stamp
u16total_rto
u16total_rto_recoveries
u32total_rto_time
u32urg_seq
unsigned_intkeepalive_time
unsigned_intkeepalive_intvl
intlinger2
u8bpf_sock_ops_cb_flags
u8:1bpf_chg_cc_inprogress
u16timeout_rehash
u32rcv_ooopack
u32rcv_rtt_last_tsecr
structrcv_rtt_estread_write (읽기·쓰기)tcp_rcv_space_adjust,tcp_rcv_established
structrcvq_spaceread_write (읽기·쓰기)tcp_rcv_space_adjust
structmtu_probe
u32plb_rehash
u32mtu_info
boolis_mptcp
boolsmc_hs_congested
boolsyn_smc
struct tcp_sock_af_ops*af_specific
struct tcp_md5sig_info*md5sig_info
struct tcp_fastopen_request*fastopen_req
struct request_sock*fastopen_rsk
struct saved_syn*saved_syn

원문 116~169행을 구조화했습니다.

u32                           lost                                        read_mostly         tcp_ack
u32                           app_limited             read_write          read_mostly         tcp_rate_check_app_limited,tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
u64                           first_tx_mstamp         read_write                              tcp_rate_skb_sent
u64                           delivered_mstamp        read_write                              tcp_rate_skb_sent
u32                           rate_delivered                              read_mostly         tcp_rate_gen
u32                           rate_interval_us                            read_mostly         rate_delivered,rate_app_limited
u32                           rcv_wnd                 read_write          read_mostly         tcp_select_window,tcp_receive_window,tcp_fast_path_check
u32                           write_seq               read_write                              tcp_rate_check_app_limited,tcp_write_queue_empty,tcp_skb_entail,forced_push,tcp_mark_push
u32                           notsent_lowat           read_mostly                             tcp_stream_memory_free
u32                           pushed_seq              read_write                              tcp_mark_push,forced_push
u32                           lost_out                read_mostly         read_mostly         tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_rate_check_app_limited(rx)
u32                           sacked_out              read_mostly         read_mostly         tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_clean_rtx_queue(rx)
struct hrtimer                pacing_timer
struct hrtimer                compressed_ack_timer
struct sk_buff*               retransmit_skb_hint     read_mostly                             tcp_clean_rtx_queue
struct rb_root                out_of_order_queue                          read_mostly         tcp_data_queue,tcp_fast_path_check
struct sk_buff*               ooo_last_skb
struct tcp_sack_block[1]      duplicate_sack
struct tcp_sack_block[4]      selective_acks
struct tcp_sack_block[4]      recv_sack_cache
struct sk_buff*               highest_sack            read_write                              tcp_event_new_data_sent
u32                           prior_ssthresh
u32                           high_seq
u32                           retrans_stamp
u32                           undo_marker
int                           undo_retrans
u64                           bytes_retrans
u32                           total_retrans
u32                           rto_stamp
u16                           total_rto
u16                           total_rto_recoveries
u32                           total_rto_time
u32                           urg_seq
unsigned_int                  keepalive_time
unsigned_int                  keepalive_intvl
int                           linger2
u8                            bpf_sock_ops_cb_flags
u8:1                          bpf_chg_cc_inprogress
u16                           timeout_rehash
u32                           rcv_ooopack
u32                           rcv_rtt_last_tsecr
struct                        rcv_rtt_est                                 read_write          tcp_rcv_space_adjust,tcp_rcv_established
struct                        rcvq_space                                  read_write          tcp_rcv_space_adjust
struct                        mtu_probe
u32                           plb_rehash
u32                           mtu_info
bool                          is_mptcp
bool                          smc_hs_congested
bool                          syn_smc
struct tcp_sock_af_ops*       af_specific
struct tcp_md5sig_info*       md5sig_info
struct tcp_fastopen_request*  fastopen_req
struct request_sock*          fastopen_rsk
struct saved_syn*             saved_syn
============================= ======================= =================== =================== ==================================================================================================================================================================================================================