12658b5a8SEric Dumazet /* SPDX-License-Identifier: GPL-2.0-or-later */ 22658b5a8SEric Dumazet #ifndef _NET_HOTDATA_H 32658b5a8SEric Dumazet #define _NET_HOTDATA_H 42658b5a8SEric Dumazet 52658b5a8SEric Dumazet #include <linux/types.h> 661a0be1aSEric Dumazet #include <linux/netdevice.h> 70139806eSEric Dumazet #include <net/protocol.h> 82658b5a8SEric Dumazet 92658b5a8SEric Dumazet /* Read mostly data used in network fast paths. */ 102658b5a8SEric Dumazet struct net_hotdata { 1161a0be1aSEric Dumazet #if IS_ENABLED(CONFIG_INET) 1261a0be1aSEric Dumazet struct packet_offload ip_packet_offload; 130139806eSEric Dumazet struct net_offload tcpv4_offload; 14571bf020SEric Dumazet struct net_protocol tcp_protocol; 156a55ca6bSEric Dumazet struct net_offload udpv4_offload; 16571bf020SEric Dumazet struct net_protocol udp_protocol; 1761a0be1aSEric Dumazet struct packet_offload ipv6_packet_offload; 180139806eSEric Dumazet struct net_offload tcpv6_offload; 194ea0875bSEric Dumazet #if IS_ENABLED(CONFIG_IPV6) 204ea0875bSEric Dumazet struct inet6_protocol tcpv6_protocol; 214ea0875bSEric Dumazet struct inet6_protocol udpv6_protocol; 224ea0875bSEric Dumazet #endif 236a55ca6bSEric Dumazet struct net_offload udpv6_offload; 2461a0be1aSEric Dumazet #endif 252658b5a8SEric Dumazet struct list_head offload_base; 26aa70d2d1SEric Dumazet struct kmem_cache *skbuff_cache; 27aa70d2d1SEric Dumazet struct kmem_cache *skbuff_fclone_cache; 28aa70d2d1SEric Dumazet struct kmem_cache *skb_small_head_cache; 29ce7f49abSEric Dumazet #ifdef CONFIG_RPS 30ce7f49abSEric Dumazet struct rps_sock_flow_table __rcu *rps_sock_flow_table; 31ce7f49abSEric Dumazet u32 rps_cpu_mask; 32ce7f49abSEric Dumazet #endif 332658b5a8SEric Dumazet int gro_normal_batch; 34ae6e22f7SEric Dumazet int netdev_budget; 35ae6e22f7SEric Dumazet int netdev_budget_usecs; 36f59b5416SEric Dumazet int tstamp_prequeue; 37edbc666cSEric Dumazet int max_backlog; 3826722dc7SEric Dumazet int dev_tx_weight; 3971c0de9bSEric Dumazet int dev_rx_weight; 40a86a0661SEric Dumazet int sysctl_max_skb_frags; 41d480dc76SEric Dumazet int sysctl_skb_defer_max; 42*c204fef9SEric Dumazet int sysctl_mem_pcpu_rsv; 432658b5a8SEric Dumazet }; 442658b5a8SEric Dumazet 456e073572SEric Dumazet #define inet_ehash_secret net_hotdata.tcp_protocol.secret 466e073572SEric Dumazet #define udp_ehash_secret net_hotdata.udp_protocol.secret 475af674bbSEric Dumazet #define inet6_ehash_secret net_hotdata.tcpv6_protocol.secret 48df51b845SEric Dumazet #define tcp_ipv6_hash_secret net_hotdata.tcpv6_offload.secret 495af674bbSEric Dumazet #define udp6_ehash_secret net_hotdata.udpv6_protocol.secret 50df51b845SEric Dumazet #define udp_ipv6_hash_secret net_hotdata.udpv6_offload.secret 516e073572SEric Dumazet 522658b5a8SEric Dumazet extern struct net_hotdata net_hotdata; 532658b5a8SEric Dumazet 542658b5a8SEric Dumazet #endif /* _NET_HOTDATA_H */ 55