These structures are used in GRO and GSO paths. Move them to net_hodata for better cache locality. v2: udpv6_offload definition depends on CONFIG_INET=y Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240306160031.874438-12-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
36 lines
923 B
C
36 lines
923 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef _NET_HOTDATA_H
|
|
#define _NET_HOTDATA_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/netdevice.h>
|
|
#include <net/protocol.h>
|
|
|
|
/* Read mostly data used in network fast paths. */
|
|
struct net_hotdata {
|
|
#if IS_ENABLED(CONFIG_INET)
|
|
struct packet_offload ip_packet_offload;
|
|
struct net_offload tcpv4_offload;
|
|
struct net_offload udpv4_offload;
|
|
struct packet_offload ipv6_packet_offload;
|
|
struct net_offload tcpv6_offload;
|
|
struct net_offload udpv6_offload;
|
|
#endif
|
|
struct list_head offload_base;
|
|
struct list_head ptype_all;
|
|
struct kmem_cache *skbuff_cache;
|
|
struct kmem_cache *skbuff_fclone_cache;
|
|
struct kmem_cache *skb_small_head_cache;
|
|
int gro_normal_batch;
|
|
int netdev_budget;
|
|
int netdev_budget_usecs;
|
|
int tstamp_prequeue;
|
|
int max_backlog;
|
|
int dev_tx_weight;
|
|
int dev_rx_weight;
|
|
};
|
|
|
|
extern struct net_hotdata net_hotdata;
|
|
|
|
#endif /* _NET_HOTDATA_H */
|