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