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

Linux 6.18.37 · Networking

inet_sock struct fast path usage breakdown

inet_sock field의 TX·RX fast-path access와 참조 symbol 표입니다.

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

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

1. 요약·해설

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

요약·해설

inet_sock.rst:1-47

Address, port, TTL, IP option과 cork 등 송신 hot field를 포함한 `inet_sock` layout 사용 정보를 표로 제공합니다. Type과 kernel symbol 및 function 목록을 보존했습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2 .. Copyright (C) 2023 Google LLC
3
4 ==========================================
5 inet_sock struct fast path usage breakdown
6 ==========================================
7
8 ======================== ===================== =================== =================== ======================================================================================================
9 Type Name fastpath_tx_access fastpath_rx_access comment
10 ======================== ===================== =================== =================== ======================================================================================================
11 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
12 struct ipv6_pinfo* pinet6
13 struct ipv6_fl_socklist* ipv6_fl_list read_mostly tcp_v6_connect,__ip6_datagram_connect,udpv6_sendmsg,rawv6_sendmsg
14 be16 inet_sport read_mostly __tcp_transmit_skb
15 be32 inet_daddr read_mostly ip_select_ident_segs
16 be32 inet_rcv_saddr
17 be16 inet_dport read_mostly __tcp_transmit_skb
18 u16 inet_num
19 be32 inet_saddr
20 s16 uc_ttl read_mostly __ip_queue_xmit/ip_select_ttl
21 u16 cmsg_flags
22 struct ip_options_rcu* inet_opt read_mostly __ip_queue_xmit
23 u16 inet_id read_mostly ip_select_ident_segs
24 u8 tos read_mostly ip_queue_xmit
25 u8 min_ttl
26 u8 mc_ttl
27 u8 pmtudisc
28 u8:1 recverr
29 u8:1 is_icsk
30 u8:1 freebind
31 u8:1 hdrincl
32 u8:1 mc_loop
33 u8:1 transparent
34 u8:1 mc_all
35 u8:1 nodefrag
36 u8:1 bind_address_no_port
37 u8:1 recverr_rfc4884
38 u8:1 defer_connect read_mostly tcp_sendmsg_fastopen
39 u8 rcv_tos
40 u8 convert_csum
41 int uc_index
42 int mc_index
43 be32 mc_addr
44 struct ip_mc_socklist* mc_list
45 struct inet_cork_full cork read_mostly __tcp_transmit_skb
46 struct local_port_range
47 ======================== ===================== =================== =================== ======================================================================================================
48

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 관련 경로가 참조합니다.

inet_sock fast-path field
TypeNameTX fast pathRX fast path참조 function
struct sockskread_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_listread_mostly (주로 읽기)tcp_v6_connect,__ip6_datagram_connect,udpv6_sendmsg,rawv6_sendmsg
be16inet_sportread_mostly (주로 읽기)__tcp_transmit_skb
be32inet_daddrread_mostly (주로 읽기)ip_select_ident_segs
be32inet_rcv_saddr
be16inet_dportread_mostly (주로 읽기)__tcp_transmit_skb
u16inet_num
be32inet_saddr
s16uc_ttlread_mostly (주로 읽기)__ip_queue_xmit/ip_select_ttl
u16cmsg_flags
struct ip_options_rcu*inet_optread_mostly (주로 읽기)__ip_queue_xmit
u16inet_idread_mostly (주로 읽기)ip_select_ident_segs
u8tosread_mostly (주로 읽기)ip_queue_xmit
u8min_ttl
u8mc_ttl
u8pmtudisc
u8:1recverr
u8:1is_icsk
u8:1freebind
u8:1hdrincl
u8:1mc_loop
u8:1transparent
u8:1mc_all
u8:1nodefrag
u8:1bind_address_no_port
u8:1recverr_rfc4884
u8:1defer_connectread_mostly (주로 읽기)tcp_sendmsg_fastopen
u8rcv_tos
u8convert_csum
intuc_index
intmc_index
be32mc_addr
struct ip_mc_socklist*mc_list
struct inet_cork_fullcorkread_mostly (주로 읽기)__tcp_transmit_skb
structlocal_port_range

원문 표를 구조화해 모든 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
======================== ===================== =================== =================== ======================================================================================================