hotdata.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. #ifndef _NET_HOTDATA_H
  3. #define _NET_HOTDATA_H
  4. #include <linux/types.h>
  5. #include <linux/netdevice.h>
  6. #include <net/protocol.h>
  7. /* Read mostly data used in network fast paths. */
  8. struct net_hotdata {
  9. #if IS_ENABLED(CONFIG_INET)
  10. struct packet_offload ip_packet_offload;
  11. struct net_offload tcpv4_offload;
  12. struct net_protocol tcp_protocol;
  13. struct net_offload udpv4_offload;
  14. struct net_protocol udp_protocol;
  15. struct packet_offload ipv6_packet_offload;
  16. struct net_offload tcpv6_offload;
  17. #if IS_ENABLED(CONFIG_IPV6)
  18. struct inet6_protocol tcpv6_protocol;
  19. struct inet6_protocol udpv6_protocol;
  20. #endif
  21. struct net_offload udpv6_offload;
  22. #endif
  23. struct list_head offload_base;
  24. struct list_head ptype_all;
  25. struct kmem_cache *skbuff_cache;
  26. struct kmem_cache *skbuff_fclone_cache;
  27. struct kmem_cache *skb_small_head_cache;
  28. #ifdef CONFIG_RPS
  29. struct rps_sock_flow_table __rcu *rps_sock_flow_table;
  30. u32 rps_cpu_mask;
  31. #endif
  32. int gro_normal_batch;
  33. int netdev_budget;
  34. int netdev_budget_usecs;
  35. int tstamp_prequeue;
  36. int max_backlog;
  37. int dev_tx_weight;
  38. int dev_rx_weight;
  39. int sysctl_max_skb_frags;
  40. int sysctl_skb_defer_max;
  41. int sysctl_mem_pcpu_rsv;
  42. };
  43. #define inet_ehash_secret net_hotdata.tcp_protocol.secret
  44. #define udp_ehash_secret net_hotdata.udp_protocol.secret
  45. #define inet6_ehash_secret net_hotdata.tcpv6_protocol.secret
  46. #define tcp_ipv6_hash_secret net_hotdata.tcpv6_offload.secret
  47. #define udp6_ehash_secret net_hotdata.udpv6_protocol.secret
  48. #define udp_ipv6_hash_secret net_hotdata.udpv6_offload.secret
  49. extern struct net_hotdata net_hotdata;
  50. #endif /* _NET_HOTDATA_H */