2024-03-06 16:00:14 +00:00
/* SPDX-License-Identifier: GPL-2.0-or-later */
# ifndef _NET_HOTDATA_H
# define _NET_HOTDATA_H
# include <linux/types.h>
2024-03-06 16:00:19 +00:00
# include <linux/netdevice.h>
2024-03-06 16:00:20 +00:00
# include <net/protocol.h>
2024-03-06 16:00:14 +00:00
/* Read mostly data used in network fast paths. */
struct net_hotdata {
2024-03-06 16:00:19 +00:00
# if IS_ENABLED(CONFIG_INET)
struct packet_offload ip_packet_offload ;
2024-03-06 16:00:20 +00:00
struct net_offload tcpv4_offload ;
2024-03-06 16:00:26 +00:00
struct net_protocol tcp_protocol ;
2024-03-06 16:00:24 +00:00
struct net_offload udpv4_offload ;
2024-03-06 16:00:26 +00:00
struct net_protocol udp_protocol ;
2024-03-06 16:00:19 +00:00
struct packet_offload ipv6_packet_offload ;
2024-03-06 16:00:20 +00:00
struct net_offload tcpv6_offload ;
2024-03-06 16:00:25 +00:00
# if IS_ENABLED(CONFIG_IPV6)
struct inet6_protocol tcpv6_protocol ;
struct inet6_protocol udpv6_protocol ;
# endif
2024-03-06 16:00:24 +00:00
struct net_offload udpv6_offload ;
2024-03-06 16:00:19 +00:00
# endif
2024-03-06 16:00:14 +00:00
struct list_head offload_base ;
2024-03-06 16:00:17 +00:00
struct list_head ptype_all ;
2024-03-06 16:00:23 +00:00
struct kmem_cache * skbuff_cache ;
struct kmem_cache * skbuff_fclone_cache ;
struct kmem_cache * skb_small_head_cache ;
2024-03-06 16:00:31 +00:00
# ifdef CONFIG_RPS
struct rps_sock_flow_table __rcu * rps_sock_flow_table ;
u32 rps_cpu_mask ;
# endif
2024-03-06 16:00:14 +00:00
int gro_normal_batch ;
2024-03-06 16:00:15 +00:00
int netdev_budget ;
int netdev_budget_usecs ;
2024-03-06 16:00:16 +00:00
int tstamp_prequeue ;
2024-03-06 16:00:18 +00:00
int max_backlog ;
2024-03-06 16:00:21 +00:00
int dev_tx_weight ;
2024-03-06 16:00:22 +00:00
int dev_rx_weight ;
2024-03-06 16:00:14 +00:00
} ;
2024-03-06 16:00:27 +00:00
# define inet_ehash_secret net_hotdata.tcp_protocol.secret
# define udp_ehash_secret net_hotdata.udp_protocol.secret
2024-03-06 16:00:28 +00:00
# define inet6_ehash_secret net_hotdata.tcpv6_protocol.secret
2024-03-06 16:00:29 +00:00
# define tcp_ipv6_hash_secret net_hotdata.tcpv6_offload.secret
2024-03-06 16:00:28 +00:00
# define udp6_ehash_secret net_hotdata.udpv6_protocol.secret
2024-03-06 16:00:29 +00:00
# define udp_ipv6_hash_secret net_hotdata.udpv6_offload.secret
2024-03-06 16:00:27 +00:00
2024-03-06 16:00:14 +00:00
extern struct net_hotdata net_hotdata ;
# endif /* _NET_HOTDATA_H */