요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
.. Copyright (C) 2023 Google LLC
==========================================
inet_sock struct fast path usage breakdown
==========================================
======================== ===================== =================== =================== ======================================================================================================
Type Name fastpath_tx_access fastpath_rx_access comment
======================== ===================== =================== =================== ======================================================================================================
struct sock sk read_mostly read_mostly tcp_init_buffer_space,tcp_init_transfer,tcp_finish_connect,tcp_connect,tcp_send_rcvq,tcp_send_syn_data
struct ipv6_pinfo* pinet6
struct ipv6_fl_socklist* ipv6_fl_list read_mostly tcp_v6_connect,__ip6_datagram_connect,udpv6_sendmsg,rawv6_sendmsg
be16 inet_sport read_mostly __tcp_transmit_skb
be32 inet_daddr read_mostly ip_select_ident_segs
be32 inet_rcv_saddr
be16 inet_dport read_mostly __tcp_transmit_skb
u16 inet_num
be32 inet_saddr
s16 uc_ttl read_mostly __ip_queue_xmit/ip_select_ttl
u16 cmsg_flags
struct ip_options_rcu* inet_opt read_mostly __ip_queue_xmit
u16 inet_id read_mostly ip_select_ident_segs
u8 tos read_mostly ip_queue_xmit
u8 min_ttl
u8 mc_ttl
u8 pmtudisc
u8:1 recverr
u8:1 is_icsk
u8:1 freebind
u8:1 hdrincl
u8:1 mc_loop
u8:1 transparent
u8:1 mc_all
u8:1 nodefrag
u8:1 bind_address_no_port
u8:1 recverr_rfc4884
u8:1 defer_connect read_mostly tcp_sendmsg_fastopen
u8 rcv_tos
u8 convert_csum
int uc_index
int mc_index
be32 mc_addr
struct ip_mc_socklist* mc_list
struct inet_cork_full cork read_mostly __tcp_transmit_skb
struct local_port_range
======================== ===================== =================== =================== ======================================================================================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Field별 TX·RX access
1-47표는 `struct inet_sock`의 field type과 symbol, TX/RX fast path access 성격, 대표 참조 function을 보여 줍니다. `read_mostly`, `read_write`, `write_mostly`는 원문 symbol을 유지하면서 한국어 뜻을 함께 표시했습니다. 빈 access 또는 comment는 원문에서 분류나 function 좌표가 제시되지 않은 경우입니다.
Fast TX에서 자주 읽는 값에는 source/destination port와 destination address, unicast TTL, IP option, ID, TOS, `defer_connect`, cork가 있습니다. Base `struct sock sk`는 TX와 RX 모두에서 주로 읽으며 `tcp_init_buffer_space`, connect와 send 관련 경로가 참조합니다.
원문 표를 구조화해 모든 field와 symbol을 보존했습니다.
.. SPDX-License-Identifier: GPL-2.0
.. Copyright (C) 2023 Google LLC
==========================================
inet_sock struct fast path usage breakdown
==========================================
======================== ===================== =================== =================== ======================================================================================================
Type Name fastpath_tx_access fastpath_rx_access comment
======================== ===================== =================== =================== ======================================================================================================
struct sock sk read_mostly read_mostly tcp_init_buffer_space,tcp_init_transfer,tcp_finish_connect,tcp_connect,tcp_send_rcvq,tcp_send_syn_data
struct ipv6_pinfo* pinet6
struct ipv6_fl_socklist* ipv6_fl_list read_mostly tcp_v6_connect,__ip6_datagram_connect,udpv6_sendmsg,rawv6_sendmsg
be16 inet_sport read_mostly __tcp_transmit_skb
be32 inet_daddr read_mostly ip_select_ident_segs
be32 inet_rcv_saddr
be16 inet_dport read_mostly __tcp_transmit_skb
u16 inet_num
be32 inet_saddr
s16 uc_ttl read_mostly __ip_queue_xmit/ip_select_ttl
u16 cmsg_flags
struct ip_options_rcu* inet_opt read_mostly __ip_queue_xmit
u16 inet_id read_mostly ip_select_ident_segs
u8 tos read_mostly ip_queue_xmit
u8 min_ttl
u8 mc_ttl
u8 pmtudisc
u8:1 recverr
u8:1 is_icsk
u8:1 freebind
u8:1 hdrincl
u8:1 mc_loop
u8:1 transparent
u8:1 mc_all
u8:1 nodefrag
u8:1 bind_address_no_port
u8:1 recverr_rfc4884
u8:1 defer_connect read_mostly tcp_sendmsg_fastopen
u8 rcv_tos
u8 convert_csum
int uc_index
int mc_index
be32 mc_addr
struct ip_mc_socklist* mc_list
struct inet_cork_full cork read_mostly __tcp_transmit_skb
struct local_port_range
======================== ===================== =================== =================== ======================================================================================================
요약·해설
inet_sock.rst:1-47Address, port, TTL, IP option과 cork 등 송신 hot field를 포함한 `inet_sock` layout 사용 정보를 표로 제공합니다. Type과 kernel symbol 및 function 목록을 보존했습니다.