net_device.rst 13 KB

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