GNU Linux-libre 6.9-gnu
[releases.git] / Documentation / networking / net_cachelines / net_device.rst
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 Type                                Name                    fastpath_tx_access  fastpath_rx_access  Comments
9 ..struct                            ..net_device                                                    
10 char                                name[16]                -                   -                   
11 struct_netdev_name_node*            name_node                                                       
12 struct_dev_ifalias*                 ifalias                                                         
13 unsigned_long                       mem_end                                                         
14 unsigned_long                       mem_start                                                       
15 unsigned_long                       base_addr                                                       
16 unsigned_long                       state                   read_mostly         read_mostly         netif_running(dev)
17 struct_list_head                    dev_list                                                        
18 struct_list_head                    napi_list                                                       
19 struct_list_head                    unreg_list                                                      
20 struct_list_head                    close_list                                                      
21 struct_list_head                    ptype_all               read_mostly         -                   dev_nit_active(tx)
22 struct_list_head                    ptype_specific                              read_mostly         deliver_ptype_list_skb/__netif_receive_skb_core(rx)
23 struct                              adj_list                                                        
24 unsigned_int                        flags                   read_mostly         read_mostly         __dev_queue_xmit,__dev_xmit_skb,ip6_output,__ip6_finish_output(tx);ip6_rcv_core(rx)
25 xdp_features_t                      xdp_features                                                    
26 unsigned_long_long                  priv_flags              read_mostly         -                   __dev_queue_xmit(tx)
27 struct_net_device_ops*              netdev_ops              read_mostly         -                   netdev_core_pick_tx,netdev_start_xmit(tx)
28 struct_xdp_metadata_ops*            xdp_metadata_ops                                                
29 int                                 ifindex                 -                   read_mostly         ip6_rcv_core
30 unsigned_short                      gflags                                                          
31 unsigned_short                      hard_header_len         read_mostly         read_mostly         ip6_xmit(tx);gro_list_prepare(rx)
32 unsigned_int                        mtu                     read_mostly         -                   ip_finish_output2
33 unsigned_short                      needed_headroom         read_mostly         -                   LL_RESERVED_SPACE/ip_finish_output2
34 unsigned_short                      needed_tailroom                                                 
35 netdev_features_t                   features                read_mostly         read_mostly         HARD_TX_LOCK,netif_skb_features,sk_setup_caps(tx);netif_elide_gro(rx)
36 netdev_features_t                   hw_features                                                     
37 netdev_features_t                   wanted_features                                                 
38 netdev_features_t                   vlan_features                                                   
39 netdev_features_t                   hw_enc_features         -                   -                   netif_skb_features
40 netdev_features_t                   mpls_features                                                   
41 netdev_features_t                   gso_partial_features    read_mostly                             gso_features_check
42 unsigned_int                        min_mtu                                                         
43 unsigned_int                        max_mtu                                                         
44 unsigned_short                      type                                                            
45 unsigned_char                       min_header_len                                                  
46 unsigned_char                       name_assign_type                                                
47 int                                 group                                                           
48 struct_net_device_stats             stats                                                           
49 struct_net_device_core_stats*       core_stats                                                      
50 atomic_t                            carrier_up_count                                                
51 atomic_t                            carrier_down_count                                              
52 struct_iw_handler_def*              wireless_handlers                                               
53 struct_iw_public_data*              wireless_data                                                   
54 struct_ethtool_ops*                 ethtool_ops                                                     
55 struct_l3mdev_ops*                  l3mdev_ops                                                      
56 struct_ndisc_ops*                   ndisc_ops                                                       
57 struct_xfrmdev_ops*                 xfrmdev_ops                                                     
58 struct_tlsdev_ops*                  tlsdev_ops                                                      
59 struct_header_ops*                  header_ops              read_mostly         -                   ip_finish_output2,ip6_finish_output2(tx)
60 unsigned_char                       operstate                                                       
61 unsigned_char                       link_mode                                                       
62 unsigned_char                       if_port                                                         
63 unsigned_char                       dma                                                             
64 unsigned_char                       perm_addr[32]                                                   
65 unsigned_char                       addr_assign_type                                                
66 unsigned_char                       addr_len                                                        
67 unsigned_char                       upper_level                                                     
68 unsigned_char                       lower_level                                                     
69 unsigned_short                      neigh_priv_len                                                  
70 unsigned_short                      padded                                                          
71 unsigned_short                      dev_id                                                          
72 unsigned_short                      dev_port                                                        
73 spinlock_t                          addr_list_lock                                                  
74 int                                 irq                                                             
75 struct_netdev_hw_addr_list          uc                                                              
76 struct_netdev_hw_addr_list          mc                                                              
77 struct_netdev_hw_addr_list          dev_addrs                                                       
78 struct_kset*                        queues_kset                                                     
79 struct_list_head                    unlink_list                                                     
80 unsigned_int                        promiscuity                                                     
81 unsigned_int                        allmulti                                                        
82 bool                                uc_promisc                                                      
83 unsigned_char                       nested_level                                                    
84 struct_in_device*                   ip_ptr                  read_mostly         read_mostly         __in_dev_get
85 struct_inet6_dev*                   ip6_ptr                 read_mostly         read_mostly         __in6_dev_get
86 struct_vlan_info*                   vlan_info                                                       
87 struct_dsa_port*                    dsa_ptr                                                         
88 struct_tipc_bearer*                 tipc_ptr                                                        
89 void*                               atalk_ptr                                                       
90 void*                               ax25_ptr                                                        
91 struct_wireless_dev*                ieee80211_ptr                                                   
92 struct_wpan_dev*                    ieee802154_ptr                                                  
93 struct_mpls_dev*                    mpls_ptr                                                        
94 struct_mctp_dev*                    mctp_ptr                                                        
95 unsigned_char*                      dev_addr                                                        
96 struct_netdev_queue*                _rx                     read_mostly         -                   netdev_get_rx_queue(rx)
97 unsigned_int                        num_rx_queues                                                   
98 unsigned_int                        real_num_rx_queues      -                   read_mostly         get_rps_cpu
99 struct_bpf_prog*                    xdp_prog                -                   read_mostly         netif_elide_gro()
100 unsigned_long                       gro_flush_timeout       -                   read_mostly         napi_complete_done
101 int                                 napi_defer_hard_irqs    -                   read_mostly         napi_complete_done
102 unsigned_int                        gro_max_size            -                   read_mostly         skb_gro_receive
103 unsigned_int                        gro_ipv4_max_size       -                   read_mostly         skb_gro_receive
104 rx_handler_func_t*                  rx_handler              read_mostly         -                   __netif_receive_skb_core
105 void*                               rx_handler_data         read_mostly         -                   
106 struct_netdev_queue*                ingress_queue           read_mostly         -                   
107 struct_bpf_mprog_entry              tcx_ingress             -                   read_mostly         sch_handle_ingress
108 struct_nf_hook_entries*             nf_hooks_ingress                                                
109 unsigned_char                       broadcast[32]                                                   
110 struct_cpu_rmap*                    rx_cpu_rmap                                                     
111 struct_hlist_node                   index_hlist                                                     
112 struct_netdev_queue*                _tx                     read_mostly         -                   netdev_get_tx_queue(tx)
113 unsigned_int                        num_tx_queues           -                   -                   
114 unsigned_int                        real_num_tx_queues      read_mostly         -                   skb_tx_hash,netdev_core_pick_tx(tx)
115 unsigned_int                        tx_queue_len                                                    
116 spinlock_t                          tx_global_lock                                                  
117 struct_xdp_dev_bulk_queue__percpu*  xdp_bulkq                                                       
118 struct_xps_dev_maps*                xps_maps[2]             read_mostly         -                   __netif_set_xps_queue
119 struct_bpf_mprog_entry              tcx_egress              read_mostly         -                   sch_handle_egress
120 struct_nf_hook_entries*             nf_hooks_egress         read_mostly         -                   
121 struct_hlist_head                   qdisc_hash[16]                                                  
122 struct_timer_list                   watchdog_timer                                                  
123 int                                 watchdog_timeo                                                  
124 u32                                 proto_down_reason                                               
125 struct_list_head                    todo_list                                                       
126 int__percpu*                        pcpu_refcnt                                                     
127 refcount_t                          dev_refcnt                                                      
128 struct_ref_tracker_dir              refcnt_tracker                                                  
129 struct_list_head                    link_watch_list                                                 
130 enum:8                              reg_state                                                       
131 bool                                dismantle                                                       
132 enum:16                             rtnl_link_state                                                 
133 bool                                needs_free_netdev                                               
134 void*priv_destructor                struct_net_device                                               
135 struct_netpoll_info*                npinfo                  -                   read_mostly         napi_poll/napi_poll_lock
136 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
137 void*                               ml_priv                                                         
138 enum_netdev_ml_priv_type            ml_priv_type                                                    
139 struct_pcpu_lstats__percpu*         lstats                  read_mostly                             dev_lstats_add()
140 struct_pcpu_sw_netstats__percpu*    tstats                  read_mostly                             dev_sw_netstats_tx_add()
141 struct_pcpu_dstats__percpu*         dstats                                                          
142 struct_garp_port*                   garp_port                                                       
143 struct_mrp_port*                    mrp_port                                                        
144 struct_dm_hw_stat_delta*            dm_private                                                      
145 struct_device                       dev                     -                   -                   
146 struct_attribute_group*             sysfs_groups[4]                                                 
147 struct_attribute_group*             sysfs_rx_queue_group                                            
148 struct_rtnl_link_ops*               rtnl_link_ops                                                   
149 unsigned_int                        gso_max_size            read_mostly         -                   sk_dst_gso_max_size
150 unsigned_int                        tso_max_size                                                    
151 u16                                 gso_max_segs            read_mostly         -                   gso_max_segs
152 u16                                 tso_max_segs                                                    
153 unsigned_int                        gso_ipv4_max_size       read_mostly         -                   sk_dst_gso_max_size
154 struct_dcbnl_rtnl_ops*              dcbnl_ops                                                       
155 s16                                 num_tc                  read_mostly         -                   skb_tx_hash
156 struct_netdev_tc_txq                tc_to_txq[16]           read_mostly         -                   skb_tx_hash
157 u8                                  prio_tc_map[16]                                                 
158 unsigned_int                        fcoe_ddp_xid                                                    
159 struct_netprio_map*                 priomap                                                         
160 struct_phy_device*                  phydev                                                          
161 struct_sfp_bus*                     sfp_bus                                                         
162 struct_lock_class_key*              qdisc_tx_busylock                                               
163 bool                                proto_down                                                      
164 unsigned:1                          wol_enabled                                                     
165 unsigned:1                          threaded                -                   -                   napi_poll(napi_enable,dev_set_threaded)
166 struct_list_head                    net_notifier_list                                               
167 struct_macsec_ops*                  macsec_ops                                                      
168 struct_udp_tunnel_nic_info*         udp_tunnel_nic_info                                             
169 struct_udp_tunnel_nic*              udp_tunnel_nic                                                  
170 unsigned_int                        xdp_zc_max_segs                                                 
171 struct_bpf_xdp_entity               xdp_state[3]                                                    
172 u8                                  dev_addr_shadow[32]                                             
173 netdevice_tracker                   linkwatch_dev_tracker                                           
174 netdevice_tracker                   watchdog_dev_tracker                                            
175 netdevice_tracker                   dev_registered_tracker                                          
176 struct_rtnl_hw_stats64*             offload_xstats_l3                                               
177 struct_devlink_port*                devlink_port                                                    
178 struct_dpll_pin*                    dpll_pin