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

Linux 6.18.37 · Networking

net_device struct fast path usage breakdown

net_device의 core, queue, protocol과 offload field별 TX·RX cacheline 접근 표입니다.

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

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

1. 요약·해설

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

요약·해설

net_device.rst:1-193

Device state와 feature부터 RX/TX queue, namespace, statistics와 offload tail까지 182개 field의 type·symbol·hotness·function을 구조화해 보존했습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2 .. Copyright (C) 2023 Google LLC
3
4 ===========================================
5 net_device struct fast path usage breakdown
6 ===========================================
7
8 =================================== =========================== =================== =================== ===================================================================================
9 Type Name fastpath_tx_access fastpath_rx_access Comments
10 =================================== =========================== =================== =================== ===================================================================================
11 unsigned_long:32 priv_flags read_mostly __dev_queue_xmit(tx)
12 unsigned_long:1 lltx read_mostly HARD_TX_LOCK,HARD_TX_TRYLOCK,HARD_TX_UNLOCK(tx)
13 unsigned long:1 netmem_tx:1; read_mostly
14 char name[16]
15 struct netdev_name_node* name_node
16 struct dev_ifalias* ifalias
17 unsigned_long mem_end
18 unsigned_long mem_start
19 unsigned_long base_addr
20 unsigned_long state read_mostly read_mostly netif_running(dev)
21 struct list_head dev_list
22 struct list_head napi_list
23 struct list_head unreg_list
24 struct list_head close_list
25 struct list_head ptype_all read_mostly dev_nit_active(tx)
26 struct list_head ptype_specific read_mostly deliver_ptype_list_skb/__netif_receive_skb_core(rx)
27 struct adj_list
28 unsigned_int flags read_mostly read_mostly __dev_queue_xmit,__dev_xmit_skb,ip6_output,__ip6_finish_output(tx);ip6_rcv_core(rx)
29 xdp_features_t xdp_features
30 struct net_device_ops* netdev_ops read_mostly netdev_core_pick_tx,netdev_start_xmit(tx)
31 struct xdp_metadata_ops* xdp_metadata_ops
32 int ifindex read_mostly ip6_rcv_core
33 unsigned_short gflags
34 unsigned_short hard_header_len read_mostly read_mostly ip6_xmit(tx);gro_list_prepare(rx)
35 unsigned_int mtu read_mostly ip_finish_output2
36 unsigned_short needed_headroom read_mostly LL_RESERVED_SPACE/ip_finish_output2
37 unsigned_short needed_tailroom
38 netdev_features_t features read_mostly read_mostly HARD_TX_LOCK,netif_skb_features,sk_setup_caps(tx);netif_elide_gro(rx)
39 netdev_features_t hw_features
40 netdev_features_t wanted_features
41 netdev_features_t vlan_features
42 netdev_features_t hw_enc_features netif_skb_features
43 netdev_features_t mpls_features
44 netdev_features_t gso_partial_features read_mostly gso_features_check
45 unsigned_int min_mtu
46 unsigned_int max_mtu
47 unsigned_short type
48 unsigned_char min_header_len
49 unsigned_char name_assign_type
50 int group
51 struct net_device_stats stats
52 struct net_device_core_stats* core_stats
53 atomic_t carrier_up_count
54 atomic_t carrier_down_count
55 struct iw_handler_def* wireless_handlers
56 struct ethtool_ops* ethtool_ops
57 struct l3mdev_ops* l3mdev_ops
58 struct ndisc_ops* ndisc_ops
59 struct xfrmdev_ops* xfrmdev_ops
60 struct tlsdev_ops* tlsdev_ops
61 struct header_ops* header_ops read_mostly ip_finish_output2,ip6_finish_output2(tx)
62 unsigned_char operstate
63 unsigned_char link_mode
64 unsigned_char if_port
65 unsigned_char dma
66 unsigned_char perm_addr[32]
67 unsigned_char addr_assign_type
68 unsigned_char addr_len
69 unsigned_char upper_level
70 unsigned_char lower_level
71 u8 threaded napi_poll(napi_enable,netif_set_threaded)
72 unsigned_short neigh_priv_len
73 unsigned_short padded
74 unsigned_short dev_id
75 unsigned_short dev_port
76 spinlock_t addr_list_lock
77 int irq
78 struct netdev_hw_addr_list uc
79 struct netdev_hw_addr_list mc
80 struct netdev_hw_addr_list dev_addrs
81 struct kset* queues_kset
82 struct list_head unlink_list
83 unsigned_int promiscuity
84 unsigned_int allmulti
85 bool uc_promisc
86 unsigned_char nested_level
87 struct in_device* ip_ptr read_mostly read_mostly __in_dev_get
88 struct hlist_head fib_nh_head
89 struct inet6_dev* ip6_ptr read_mostly read_mostly __in6_dev_get
90 struct vlan_info* vlan_info
91 struct dsa_port* dsa_ptr
92 struct tipc_bearer* tipc_ptr
93 void* atalk_ptr
94 void* ax25_ptr
95 struct wireless_dev* ieee80211_ptr
96 struct wpan_dev* ieee802154_ptr
97 struct mpls_dev* mpls_ptr
98 struct mctp_dev* mctp_ptr
99 unsigned_char* dev_addr
100 struct netdev_queue* _rx read_mostly netdev_get_rx_queue(rx)
101 unsigned_int num_rx_queues
102 unsigned_int real_num_rx_queues read_mostly get_rps_cpu
103 struct bpf_prog* xdp_prog read_mostly netif_elide_gro()
104 unsigned_long gro_flush_timeout read_mostly napi_complete_done
105 u32 napi_defer_hard_irqs read_mostly napi_complete_done
106 unsigned_int gro_max_size read_mostly skb_gro_receive
107 unsigned_int gro_ipv4_max_size read_mostly skb_gro_receive
108 rx_handler_func_t* rx_handler read_mostly __netif_receive_skb_core
109 void* rx_handler_data read_mostly
110 struct netdev_queue* ingress_queue read_mostly
111 struct bpf_mprog_entry tcx_ingress read_mostly sch_handle_ingress
112 struct nf_hook_entries* nf_hooks_ingress
113 unsigned_char broadcast[32]
114 struct cpu_rmap* rx_cpu_rmap
115 struct hlist_node index_hlist
116 struct netdev_queue* _tx read_mostly netdev_get_tx_queue(tx)
117 unsigned_int num_tx_queues
118 unsigned_int real_num_tx_queues read_mostly skb_tx_hash,netdev_core_pick_tx(tx)
119 unsigned_int tx_queue_len
120 spinlock_t tx_global_lock
121 struct xdp_dev_bulk_queue__percpu* xdp_bulkq
122 struct xps_dev_maps* xps_maps[2] read_mostly __netif_set_xps_queue
123 struct bpf_mprog_entry tcx_egress read_mostly sch_handle_egress
124 struct nf_hook_entries* nf_hooks_egress read_mostly
125 struct hlist_head qdisc_hash[16]
126 struct timer_list watchdog_timer
127 int watchdog_timeo
128 u32 proto_down_reason
129 struct list_head todo_list
130 int__percpu* pcpu_refcnt
131 refcount_t dev_refcnt
132 struct ref_tracker_dir refcnt_tracker
133 struct list_head link_watch_list
134 enum:8 reg_state
135 bool dismantle
136 bool rtnl_link_initilizing
137 bool needs_free_netdev
138 void*priv_destructor struct net_device
139 struct netpoll_info* npinfo read_mostly napi_poll/napi_poll_lock
140 possible_net_t nd_net read_mostly (dev_net)napi_busy_loop,tcp_v(4/6)_rcv,ip(v6)_rcv,ip(6)_input,ip(6)_input_finish
141 void* ml_priv
142 enum_netdev_ml_priv_type ml_priv_type
143 struct pcpu_lstats__percpu* lstats read_mostly dev_lstats_add()
144 struct pcpu_sw_netstats__percpu* tstats read_mostly dev_sw_netstats_tx_add()
145 struct pcpu_dstats__percpu* dstats
146 struct garp_port* garp_port
147 struct mrp_port* mrp_port
148 struct dm_hw_stat_delta* dm_private
149 struct device dev
150 struct attribute_group* sysfs_groups[4]
151 struct attribute_group* sysfs_rx_queue_group
152 struct rtnl_link_ops* rtnl_link_ops
153 unsigned_int gso_max_size read_mostly sk_dst_gso_max_size
154 unsigned_int tso_max_size
155 u16 gso_max_segs read_mostly gso_max_segs
156 u16 tso_max_segs
157 unsigned_int gso_ipv4_max_size read_mostly sk_dst_gso_max_size
158 struct dcbnl_rtnl_ops* dcbnl_ops
159 s16 num_tc read_mostly skb_tx_hash
160 struct netdev_tc_txq tc_to_txq[16] read_mostly skb_tx_hash
161 u8 prio_tc_map[16]
162 unsigned_int fcoe_ddp_xid
163 struct netprio_map* priomap
164 struct phy_device* phydev
165 struct sfp_bus* sfp_bus
166 struct lock_class_key* qdisc_tx_busylock
167 bool proto_down
168 unsigned:1 wol_enabled
169 unsigned_long:1 see_all_hwtstamp_requests
170 unsigned_long:1 change_proto_down
171 unsigned_long:1 netns_immutable
172 unsigned_long:1 fcoe_mtu
173 struct list_head net_notifier_list
174 struct macsec_ops* macsec_ops
175 struct udp_tunnel_nic_info* udp_tunnel_nic_info
176 struct udp_tunnel_nic* udp_tunnel_nic
177 unsigned_int xdp_zc_max_segs
178 struct bpf_xdp_entity xdp_state[3]
179 u8 dev_addr_shadow[32]
180 netdevice_tracker linkwatch_dev_tracker
181 netdevice_tracker watchdog_dev_tracker
182 netdevice_tracker dev_registered_tracker
183 struct rtnl_hw_stats64* offload_xstats_l3
184 struct devlink_port* devlink_port
185 struct dpll_pin* dpll_pin
186 struct hlist_head page_pools
187 struct dim_irq_moder* irq_moder
188 u64 max_pacing_offload_horizon
189 struct_napi_config* napi_config
190 unsigned_long gro_flush_timeout
191 u32 napi_defer_hard_irqs
192 struct hlist_head neighbours[2]
193 =================================== =========================== =================== =================== ===================================================================================
194

3. 한국어 전문 번역

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

Core identity·상태·feature field

1-70

이 표는 `struct net_device` field를 type과 symbol별로 나누고 TX 및 RX fast path의 접근 성격과 대표 function을 기록합니다. `read_mostly`, `read_write`, `write_mostly` 원문 분류는 보존하고 한국어 뜻을 덧붙였습니다. 빈 칸은 해당 access나 function 좌표가 원문에서 분류되지 않았다는 뜻입니다.

앞부분의 TX hot field는 `priv_flags`, `lltx`, `state`, packet type list, `flags`, `netdev_ops`, header 길이와 MTU, headroom, feature mask와 `header_ops`입니다. `state`, `flags`, `hard_header_len`, `features`는 RX도 자주 읽어 두 방향 fast path가 같은 cacheline data를 공유할 가능성이 큽니다.

Device 이름, memory와 base address, 통계·carrier count, wireless·ethtool·L3·NDISC·XFRM·TLS operation pointer와 permanent address 등 hotness가 표시되지 않은 field도 빠짐없이 표에 남깁니다.

net_device core field
TypeNameTX fast pathRX fast path참조 function·설명
unsigned_long:32priv_flagsread_mostly (주로 읽기)__dev_queue_xmit(tx)
unsigned_long:1lltxread_mostly (주로 읽기)HARD_TX_LOCK,HARD_TX_TRYLOCK,HARD_TX_UNLOCK(tx)
unsigned long:1netmem_tx:1;read_mostly (주로 읽기)
charname[16]
struct netdev_name_node*name_node
struct dev_ifalias*ifalias
unsigned_longmem_end
unsigned_longmem_start
unsigned_longbase_addr
unsigned_longstateread_mostly (주로 읽기)read_mostly (주로 읽기)netif_running(dev)
struct list_headdev_list
struct list_headnapi_list
struct list_headunreg_list
struct list_headclose_list
struct list_headptype_allread_mostly (주로 읽기)dev_nit_active(tx)
struct list_headptype_specificread_mostly (주로 읽기)deliver_ptype_list_skb/__netif_receive_skb_core(rx)
structadj_list
unsigned_intflagsread_mostly (주로 읽기)read_mostly (주로 읽기)__dev_queue_xmit,__dev_xmit_skb,ip6_output,__ip6_finish_output(tx);ip6_rcv_core(rx)
xdp_features_txdp_features
struct net_device_ops*netdev_opsread_mostly (주로 읽기)netdev_core_pick_tx,netdev_start_xmit(tx)
struct xdp_metadata_ops*xdp_metadata_ops
intifindexread_mostly (주로 읽기)ip6_rcv_core
unsigned_shortgflags
unsigned_shorthard_header_lenread_mostly (주로 읽기)read_mostly (주로 읽기)ip6_xmit(tx);gro_list_prepare(rx)
unsigned_intmturead_mostly (주로 읽기)ip_finish_output2
unsigned_shortneeded_headroomread_mostly (주로 읽기)LL_RESERVED_SPACE/ip_finish_output2
unsigned_shortneeded_tailroom
netdev_features_tfeaturesread_mostly (주로 읽기)read_mostly (주로 읽기)HARD_TX_LOCK,netif_skb_features,sk_setup_caps(tx);netif_elide_gro(rx)
netdev_features_thw_features
netdev_features_twanted_features
netdev_features_tvlan_features
netdev_features_thw_enc_featuresnetif_skb_features
netdev_features_tmpls_features
netdev_features_tgso_partial_featuresread_mostly (주로 읽기)gso_features_check
unsigned_intmin_mtu
unsigned_intmax_mtu
unsigned_shorttype
unsigned_charmin_header_len
unsigned_charname_assign_type
intgroup
struct net_device_statsstats
struct net_device_core_stats*core_stats
atomic_tcarrier_up_count
atomic_tcarrier_down_count
struct iw_handler_def*wireless_handlers
struct ethtool_ops*ethtool_ops
struct l3mdev_ops*l3mdev_ops
struct ndisc_ops*ndisc_ops
struct xfrmdev_ops*xfrmdev_ops
struct tlsdev_ops*tlsdev_ops
struct header_ops*header_opsread_mostly (주로 읽기)ip_finish_output2,ip6_finish_output2(tx)
unsigned_charoperstate
unsigned_charlink_mode
unsigned_charif_port
unsigned_chardma
unsigned_charperm_addr[32]
unsigned_charaddr_assign_type
unsigned_charaddr_len
unsigned_charupper_level
unsigned_charlower_level

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

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

===========================================
net_device struct fast path usage breakdown
===========================================

=================================== =========================== =================== =================== ===================================================================================
Type                                Name                        fastpath_tx_access  fastpath_rx_access  Comments
=================================== =========================== =================== =================== ===================================================================================
unsigned_long:32                    priv_flags                  read_mostly                             __dev_queue_xmit(tx)
unsigned_long:1                     lltx                        read_mostly                             HARD_TX_LOCK,HARD_TX_TRYLOCK,HARD_TX_UNLOCK(tx)
unsigned long:1                     netmem_tx:1;                read_mostly
char                                name[16]
struct netdev_name_node*            name_node
struct dev_ifalias*                 ifalias
unsigned_long                       mem_end
unsigned_long                       mem_start
unsigned_long                       base_addr
unsigned_long                       state                       read_mostly         read_mostly         netif_running(dev)
struct list_head                    dev_list
struct list_head                    napi_list
struct list_head                    unreg_list
struct list_head                    close_list
struct list_head                    ptype_all                   read_mostly                             dev_nit_active(tx)
struct list_head                    ptype_specific                                  read_mostly         deliver_ptype_list_skb/__netif_receive_skb_core(rx)
struct                              adj_list
unsigned_int                        flags                       read_mostly         read_mostly         __dev_queue_xmit,__dev_xmit_skb,ip6_output,__ip6_finish_output(tx);ip6_rcv_core(rx)
xdp_features_t                      xdp_features
struct net_device_ops*              netdev_ops                  read_mostly                             netdev_core_pick_tx,netdev_start_xmit(tx)
struct xdp_metadata_ops*            xdp_metadata_ops
int                                 ifindex                                         read_mostly         ip6_rcv_core
unsigned_short                      gflags
unsigned_short                      hard_header_len             read_mostly         read_mostly         ip6_xmit(tx);gro_list_prepare(rx)
unsigned_int                        mtu                         read_mostly                             ip_finish_output2
unsigned_short                      needed_headroom             read_mostly                             LL_RESERVED_SPACE/ip_finish_output2
unsigned_short                      needed_tailroom
netdev_features_t                   features                    read_mostly         read_mostly         HARD_TX_LOCK,netif_skb_features,sk_setup_caps(tx);netif_elide_gro(rx)
netdev_features_t                   hw_features
netdev_features_t                   wanted_features
netdev_features_t                   vlan_features
netdev_features_t                   hw_enc_features                                                     netif_skb_features
netdev_features_t                   mpls_features
netdev_features_t                   gso_partial_features        read_mostly                             gso_features_check
unsigned_int                        min_mtu
unsigned_int                        max_mtu
unsigned_short                      type
unsigned_char                       min_header_len
unsigned_char                       name_assign_type
int                                 group
struct net_device_stats             stats
struct net_device_core_stats*       core_stats
atomic_t                            carrier_up_count
atomic_t                            carrier_down_count
struct iw_handler_def*              wireless_handlers
struct ethtool_ops*                 ethtool_ops
struct l3mdev_ops*                  l3mdev_ops
struct ndisc_ops*                   ndisc_ops
struct xfrmdev_ops*                 xfrmdev_ops
struct tlsdev_ops*                  tlsdev_ops
struct header_ops*                  header_ops                  read_mostly                             ip_finish_output2,ip6_finish_output2(tx)
unsigned_char                       operstate
unsigned_char                       link_mode
unsigned_char                       if_port
unsigned_char                       dma
unsigned_char                       perm_addr[32]
unsigned_char                       addr_assign_type
unsigned_char                       addr_len
unsigned_char                       upper_level
unsigned_char                       lower_level

Protocol pointer와 RX·TX queue path

71-130

중간 영역은 address list, IPv4·IPv6 protocol pointer, VLAN·DSA·TIPC·MPLS·MCTP 연결과 RX/TX queue를 담습니다. `ip_ptr`와 `ip6_ptr`는 두 fast path에서 주로 읽고 `_rx`, `real_num_rx_queues`, XDP program, GRO timeout·size, ingress handler와 TCX ingress가 receive path에 관여합니다.

송신 쪽에서는 `_tx`, `real_num_tx_queues`, XPS map, TCX와 netfilter egress가 hot합니다. `real_num_tx_queues`는 `skb_tx_hash`와 `netdev_core_pick_tx`, `xps_maps`는 `__netif_set_xps_queue`에서 읽힙니다. 원문의 `_rx` access 표기가 TX column에 위치한 경우도 교정하지 않고 source table 좌표를 그대로 보존했습니다.

Promiscuity, multicast·unicast address, queue kset, NAPI/GRO, RX handler, qdisc hash와 watchdog 및 reference count 관련 field까지 전체 layout을 함께 보여 줍니다.

net_device protocol·queue field
TypeNameTX fast pathRX fast path참조 function·설명
u8threadednapi_poll(napi_enable,netif_set_threaded)
unsigned_shortneigh_priv_len
unsigned_shortpadded
unsigned_shortdev_id
unsigned_shortdev_port
spinlock_taddr_list_lock
intirq
struct netdev_hw_addr_listuc
struct netdev_hw_addr_listmc
struct netdev_hw_addr_listdev_addrs
struct kset*queues_kset
struct list_headunlink_list
unsigned_intpromiscuity
unsigned_intallmulti
booluc_promisc
unsigned_charnested_level
struct in_device*ip_ptrread_mostly (주로 읽기)read_mostly (주로 읽기)__in_dev_get
struct hlist_headfib_nh_head
struct inet6_dev*ip6_ptrread_mostly (주로 읽기)read_mostly (주로 읽기)__in6_dev_get
struct vlan_info*vlan_info
struct dsa_port*dsa_ptr
struct tipc_bearer*tipc_ptr
void*atalk_ptr
void*ax25_ptr
struct wireless_dev*ieee80211_ptr
struct wpan_dev*ieee802154_ptr
struct mpls_dev*mpls_ptr
struct mctp_dev*mctp_ptr
unsigned_char*dev_addr
struct netdev_queue*_rxread_mostly (주로 읽기)netdev_get_rx_queue(rx)
unsigned_intnum_rx_queues
unsigned_intreal_num_rx_queuesread_mostly (주로 읽기)get_rps_cpu
struct bpf_prog*xdp_progread_mostly (주로 읽기)netif_elide_gro()
unsigned_longgro_flush_timeoutread_mostly (주로 읽기)napi_complete_done
u32napi_defer_hard_irqsread_mostly (주로 읽기)napi_complete_done
unsigned_intgro_max_sizeread_mostly (주로 읽기)skb_gro_receive
unsigned_intgro_ipv4_max_sizeread_mostly (주로 읽기)skb_gro_receive
rx_handler_func_t*rx_handlerread_mostly (주로 읽기)__netif_receive_skb_core
void*rx_handler_dataread_mostly (주로 읽기)
struct netdev_queue*ingress_queueread_mostly (주로 읽기)
struct bpf_mprog_entrytcx_ingressread_mostly (주로 읽기)sch_handle_ingress
struct nf_hook_entries*nf_hooks_ingress
unsigned_charbroadcast[32]
struct cpu_rmap*rx_cpu_rmap
struct hlist_nodeindex_hlist
struct netdev_queue*_txread_mostly (주로 읽기)netdev_get_tx_queue(tx)
unsigned_intnum_tx_queues
unsigned_intreal_num_tx_queuesread_mostly (주로 읽기)skb_tx_hash,netdev_core_pick_tx(tx)
unsigned_inttx_queue_len
spinlock_ttx_global_lock
struct xdp_dev_bulk_queue__percpu*xdp_bulkq
struct xps_dev_maps*xps_maps[2]read_mostly (주로 읽기)__netif_set_xps_queue
struct bpf_mprog_entrytcx_egressread_mostly (주로 읽기)sch_handle_egress
struct nf_hook_entries*nf_hooks_egressread_mostly (주로 읽기)
struct hlist_headqdisc_hash[16]
struct timer_listwatchdog_timer
intwatchdog_timeo
u32proto_down_reason
struct list_headtodo_list
int__percpu*pcpu_refcnt

원문 71~130행을 구조화했습니다.

u8                                  threaded                                                            napi_poll(napi_enable,netif_set_threaded)
unsigned_short                      neigh_priv_len
unsigned_short                      padded
unsigned_short                      dev_id
unsigned_short                      dev_port
spinlock_t                          addr_list_lock
int                                 irq
struct netdev_hw_addr_list          uc
struct netdev_hw_addr_list          mc
struct netdev_hw_addr_list          dev_addrs
struct kset*                        queues_kset
struct list_head                    unlink_list
unsigned_int                        promiscuity
unsigned_int                        allmulti
bool                                uc_promisc
unsigned_char                       nested_level
struct in_device*                   ip_ptr                      read_mostly         read_mostly         __in_dev_get
struct hlist_head                   fib_nh_head
struct inet6_dev*                   ip6_ptr                     read_mostly         read_mostly         __in6_dev_get
struct vlan_info*                   vlan_info
struct dsa_port*                    dsa_ptr
struct tipc_bearer*                 tipc_ptr
void*                               atalk_ptr
void*                               ax25_ptr
struct wireless_dev*                ieee80211_ptr
struct wpan_dev*                    ieee802154_ptr
struct mpls_dev*                    mpls_ptr
struct mctp_dev*                    mctp_ptr
unsigned_char*                      dev_addr
struct netdev_queue*                _rx                         read_mostly                             netdev_get_rx_queue(rx)
unsigned_int                        num_rx_queues
unsigned_int                        real_num_rx_queues                              read_mostly         get_rps_cpu
struct bpf_prog*                    xdp_prog                                        read_mostly         netif_elide_gro()
unsigned_long                       gro_flush_timeout                               read_mostly         napi_complete_done
u32                                 napi_defer_hard_irqs                            read_mostly         napi_complete_done
unsigned_int                        gro_max_size                                    read_mostly         skb_gro_receive
unsigned_int                        gro_ipv4_max_size                               read_mostly         skb_gro_receive
rx_handler_func_t*                  rx_handler                  read_mostly                             __netif_receive_skb_core
void*                               rx_handler_data             read_mostly
struct netdev_queue*                ingress_queue               read_mostly
struct bpf_mprog_entry              tcx_ingress                                     read_mostly         sch_handle_ingress
struct nf_hook_entries*             nf_hooks_ingress
unsigned_char                       broadcast[32]
struct cpu_rmap*                    rx_cpu_rmap
struct hlist_node                   index_hlist
struct netdev_queue*                _tx                         read_mostly                             netdev_get_tx_queue(tx)
unsigned_int                        num_tx_queues
unsigned_int                        real_num_tx_queues          read_mostly                             skb_tx_hash,netdev_core_pick_tx(tx)
unsigned_int                        tx_queue_len
spinlock_t                          tx_global_lock
struct xdp_dev_bulk_queue__percpu*  xdp_bulkq
struct xps_dev_maps*                xps_maps[2]                 read_mostly                             __netif_set_xps_queue
struct bpf_mprog_entry              tcx_egress                  read_mostly                             sch_handle_egress
struct nf_hook_entries*             nf_hooks_egress             read_mostly
struct hlist_head                   qdisc_hash[16]
struct timer_list                   watchdog_timer
int                                 watchdog_timeo
u32                                 proto_down_reason
struct list_head                    todo_list
int__percpu*                        pcpu_refcnt

Lifecycle·statistics·offload tail

131-193

후반부는 device reference와 등록 상태, namespace, per-CPU statistics, sysfs와 rtnl link, GSO/TSO limit, traffic class mapping 및 hardware integration pointer를 다룹니다. RX는 `npinfo`와 `nd_net`을 주로 읽고 TX는 `lstats`, `tstats`, GSO limit, `num_tc`, `tc_to_txq`를 자주 읽습니다.

`nd_net`은 NAPI busy loop와 TCP/IP receive 경로에서 namespace를 찾는 데 사용됩니다. `gso_max_size`, `gso_ipv4_max_size`, `gso_max_segs`는 segmentation limit을, `num_tc`와 `tc_to_txq`는 `skb_tx_hash`의 traffic class별 queue 선택을 지원합니다.

PHY·SFP·MACsec·UDP tunnel·XDP state, devlink와 DPLL, page pool, DIM IRQ moderation, pacing offload horizon 및 NAPI configuration 등 최신 tail field와 final neighbour hash도 원문 순서로 보존합니다.

net_device lifecycle·offload field
TypeNameTX fast pathRX fast path참조 function·설명
refcount_tdev_refcnt
struct ref_tracker_dirrefcnt_tracker
struct list_headlink_watch_list
enum:8reg_state
booldismantle
boolrtnl_link_initilizing
boolneeds_free_netdev
void*priv_destructorstruct net_device
struct netpoll_info*npinforead_mostly (주로 읽기)napi_poll/napi_poll_lock
possible_net_tnd_netread_mostly (주로 읽기)(dev_net)napi_busy_loop,tcp_v(4/6)_rcv,ip(v6)_rcv,ip(6)_input,ip(6)_input_finish
void*ml_priv
enum_netdev_ml_priv_typeml_priv_type
struct pcpu_lstats__percpu*lstatsread_mostly (주로 읽기)dev_lstats_add()
struct pcpu_sw_netstats__percpu*tstatsread_mostly (주로 읽기)dev_sw_netstats_tx_add()
struct pcpu_dstats__percpu*dstats
struct garp_port*garp_port
struct mrp_port*mrp_port
struct dm_hw_stat_delta*dm_private
struct devicedev
struct attribute_group*sysfs_groups[4]
struct attribute_group*sysfs_rx_queue_group
struct rtnl_link_ops*rtnl_link_ops
unsigned_intgso_max_sizeread_mostly (주로 읽기)sk_dst_gso_max_size
unsigned_inttso_max_size
u16gso_max_segsread_mostly (주로 읽기)gso_max_segs
u16tso_max_segs
unsigned_intgso_ipv4_max_sizeread_mostly (주로 읽기)sk_dst_gso_max_size
struct dcbnl_rtnl_ops*dcbnl_ops
s16num_tcread_mostly (주로 읽기)skb_tx_hash
struct netdev_tc_txqtc_to_txq[16]read_mostly (주로 읽기)skb_tx_hash
u8prio_tc_map[16]
unsigned_intfcoe_ddp_xid
struct netprio_map*priomap
struct phy_device*phydev
struct sfp_bus*sfp_bus
struct lock_class_key*qdisc_tx_busylock
boolproto_down
unsigned:1wol_enabled
unsigned_long:1see_all_hwtstamp_requests
unsigned_long:1change_proto_down
unsigned_long:1netns_immutable
unsigned_long:1fcoe_mtu
struct list_headnet_notifier_list
struct macsec_ops*macsec_ops
struct udp_tunnel_nic_info*udp_tunnel_nic_info
struct udp_tunnel_nic*udp_tunnel_nic
unsigned_intxdp_zc_max_segs
struct bpf_xdp_entityxdp_state[3]
u8dev_addr_shadow[32]
netdevice_trackerlinkwatch_dev_tracker
netdevice_trackerwatchdog_dev_tracker
netdevice_trackerdev_registered_tracker
struct rtnl_hw_stats64*offload_xstats_l3
struct devlink_port*devlink_port
struct dpll_pin*dpll_pin
struct hlist_headpage_pools
struct dim_irq_moder*irq_moder
u64max_pacing_offload_horizon
struct_napi_config*napi_config
unsigned_longgro_flush_timeout
u32napi_defer_hard_irqs
struct hlist_headneighbours[2]

원문 131~192행을 구조화했습니다.

refcount_t                          dev_refcnt
struct ref_tracker_dir              refcnt_tracker
struct list_head                    link_watch_list
enum:8                              reg_state
bool                                dismantle
bool                                rtnl_link_initilizing
bool                                needs_free_netdev
void*priv_destructor                struct net_device
struct netpoll_info*                npinfo                                          read_mostly         napi_poll/napi_poll_lock
possible_net_t                      nd_net                                          read_mostly         (dev_net)napi_busy_loop,tcp_v(4/6)_rcv,ip(v6)_rcv,ip(6)_input,ip(6)_input_finish
void*                               ml_priv
enum_netdev_ml_priv_type            ml_priv_type
struct pcpu_lstats__percpu*         lstats                      read_mostly                             dev_lstats_add()
struct pcpu_sw_netstats__percpu*    tstats                      read_mostly                             dev_sw_netstats_tx_add()
struct pcpu_dstats__percpu*         dstats
struct garp_port*                   garp_port
struct mrp_port*                    mrp_port
struct dm_hw_stat_delta*            dm_private
struct device                       dev
struct attribute_group*             sysfs_groups[4]
struct attribute_group*             sysfs_rx_queue_group
struct rtnl_link_ops*               rtnl_link_ops
unsigned_int                        gso_max_size                read_mostly                             sk_dst_gso_max_size
unsigned_int                        tso_max_size
u16                                 gso_max_segs                read_mostly                             gso_max_segs
u16                                 tso_max_segs
unsigned_int                        gso_ipv4_max_size           read_mostly                             sk_dst_gso_max_size
struct dcbnl_rtnl_ops*              dcbnl_ops
s16                                 num_tc                      read_mostly                             skb_tx_hash
struct netdev_tc_txq                tc_to_txq[16]               read_mostly                             skb_tx_hash
u8                                  prio_tc_map[16]
unsigned_int                        fcoe_ddp_xid
struct netprio_map*                 priomap
struct phy_device*                  phydev
struct sfp_bus*                     sfp_bus
struct lock_class_key*              qdisc_tx_busylock
bool                                proto_down
unsigned:1                          wol_enabled
unsigned_long:1                     see_all_hwtstamp_requests
unsigned_long:1                     change_proto_down
unsigned_long:1                     netns_immutable
unsigned_long:1                     fcoe_mtu
struct list_head                    net_notifier_list
struct macsec_ops*                  macsec_ops
struct udp_tunnel_nic_info*         udp_tunnel_nic_info
struct udp_tunnel_nic*              udp_tunnel_nic
unsigned_int                        xdp_zc_max_segs
struct bpf_xdp_entity               xdp_state[3]
u8                                  dev_addr_shadow[32]
netdevice_tracker                   linkwatch_dev_tracker
netdevice_tracker                   watchdog_dev_tracker
netdevice_tracker                   dev_registered_tracker
struct rtnl_hw_stats64*             offload_xstats_l3
struct devlink_port*                devlink_port
struct dpll_pin*                    dpll_pin
struct hlist_head                   page_pools
struct dim_irq_moder*               irq_moder
u64                                 max_pacing_offload_horizon
struct_napi_config*                 napi_config
unsigned_long                       gro_flush_timeout
u32                                 napi_defer_hard_irqs
struct hlist_head                   neighbours[2]
=================================== =========================== =================== =================== ===================================================================================