include/net/netns/ipv4.h

Source file repositories/reference/linux-study-clean/include/net/netns/ipv4.h

File Facts

System
Linux kernel
Corpus path
include/net/netns/ipv4.h
Extension
.h
Size
8023 bytes
Lines
304
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: implementation source
Status
source implementation candidate

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

struct local_ports {
	u32		range;	/* high << 16 | low */
	bool		warned;
};

struct ping_group_range {
	seqlock_t	lock;
	kgid_t		range[2];
};

struct inet_hashinfo;

struct inet_timewait_death_row {
	refcount_t		tw_refcount;

	/* Padding to avoid false sharing, tw_refcount can be often written */
	struct inet_hashinfo 	*hashinfo ____cacheline_aligned_in_smp;
	int			sysctl_max_tw_buckets;
};

struct tcp_fastopen_context;

#ifdef CONFIG_IP_ROUTE_MULTIPATH
struct sysctl_fib_multipath_hash_seed {
	u32 user_seed;
	u32 mp_seed;
};
#endif

struct udp_tunnel_gro {
	struct sock __rcu *sk;
	struct hlist_head list;
};

struct netns_ipv4 {
	/* Cacheline organization can be found documented in
	 * Documentation/networking/net_cachelines/netns_ipv4_sysctl.rst.
	 * Please update the document when adding new fields.
	 */

	/* TX readonly hotpath cache lines */
	__cacheline_group_begin(netns_ipv4_read_tx);
	u8 sysctl_tcp_early_retrans;
	u8 sysctl_tcp_tso_win_divisor;
	u8 sysctl_tcp_tso_rtt_log;
	u8 sysctl_tcp_autocorking;
	int sysctl_tcp_min_snd_mss;
	unsigned int sysctl_tcp_notsent_lowat;
	int sysctl_tcp_limit_output_bytes;
	int sysctl_tcp_min_rtt_wlen;
	int sysctl_tcp_wmem[3];
	u8 sysctl_ip_fwd_use_pmtu;
	__cacheline_group_end(netns_ipv4_read_tx);

	/* TXRX readonly hotpath cache lines */
	__cacheline_group_begin(netns_ipv4_read_txrx);
	u8		sysctl_tcp_shrink_window;
	__cacheline_group_end(netns_ipv4_read_txrx);

	/* RX readonly hotpath cache line */
	__cacheline_group_begin(netns_ipv4_read_rx);
	u8 sysctl_tcp_moderate_rcvbuf;
	u8 sysctl_ip_early_demux;
	u8 sysctl_tcp_early_demux;
	u8 sysctl_tcp_l3mdev_accept;
	/* 3 bytes hole, try to pack */
	int sysctl_tcp_reordering;
	int sysctl_tcp_rmem[3];
	int sysctl_tcp_rcvbuf_low_rtt;
	__cacheline_group_end(netns_ipv4_read_rx);

	/* ICMP rate limiter hot cache line. */
	__cacheline_group_begin_aligned(icmp);
	atomic_t	icmp_global_credit;
	u32		icmp_global_stamp;
	__cacheline_group_end_aligned(icmp);

	struct inet_timewait_death_row tcp_death_row;
	struct udp_table *udp_table;

#if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
	/* Not in a pernet subsys because need to be available at GRO stage */
	struct udp_tunnel_gro udp_tunnel_gro[2];
#endif

#ifdef CONFIG_SYSCTL
	struct ctl_table_header	*forw_hdr;
	struct ctl_table_header	*frags_hdr;
	struct ctl_table_header	*ipv4_hdr;
	struct ctl_table_header *route_hdr;

Annotation

Implementation Notes