linux_dsm_epyc7002/net/ipv4
Eric W. Biederman 0c5c9fb551 net: Introduce possible_net_t
Having to say
> #ifdef CONFIG_NET_NS
> 	struct net *net;
> #endif

in structures is a little bit wordy and a little bit error prone.

Instead it is possible to say:
> typedef struct {
> #ifdef CONFIG_NET_NS
>       struct net *net;
> #endif
> } possible_net_t;

And then in a header say:

> 	possible_net_t net;

Which is cleaner and easier to use and easier to test, as the
possible_net_t is always there no matter what the compile options.

Further this allows read_pnet and write_pnet to be functions in all
cases which is better at catching typos.

This change adds possible_net_t, updates the definitions of read_pnet
and write_pnet, updates optional struct net * variables that
write_pnet uses on to have the type possible_net_t, and finally fixes
up the b0rked users of read_pnet and write_pnet.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-12 14:39:40 -04:00
..
netfilter
af_inet.c
ah4.c
arp.c
cipso_ipv4.c
datagram.c
devinet.c
esp4.c
fib_frontend.c fib_trie: Fix uninitialized variable warning 2015-03-11 17:33:44 -04:00
fib_lookup.h ipv4: FIB Local/MAIN table collapse 2015-03-11 16:22:14 -04:00
fib_rules.c ipv4: FIB Local/MAIN table collapse 2015-03-11 16:22:14 -04:00
fib_semantics.c net: Kill hold_net release_net 2015-03-12 14:39:40 -04:00
fib_trie.c fib_trie: Only display main table in /proc/net/route 2015-03-11 21:24:32 -04:00
fou.c
geneve.c
gre_demux.c
gre_offload.c
icmp.c
igmp.c
inet_connection_sock.c net: add real socket cookies 2015-03-11 21:55:28 -04:00
inet_diag.c net: add real socket cookies 2015-03-11 21:55:28 -04:00
inet_fragment.c
inet_hashtables.c net: Kill hold_net release_net 2015-03-12 14:39:40 -04:00
inet_lro.c
inet_timewait_sock.c net: Kill hold_net release_net 2015-03-12 14:39:40 -04:00
inetpeer.c
ip_forward.c
ip_fragment.c
ip_gre.c
ip_input.c
ip_options.c
ip_output.c
ip_sockglue.c
ip_tunnel_core.c
ip_tunnel.c
ip_vti.c
ipcomp.c
ipconfig.c
ipip.c
ipmr.c net: Introduce possible_net_t 2015-03-12 14:39:40 -04:00
Kconfig
Makefile
netfilter.c
ping.c
proc.c
protocol.c
raw.c
route.c
syncookies.c net: fix CONFIG_NET_NS=n compilation 2015-03-11 23:28:49 -04:00
sysctl_net_ipv4.c
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_dctcp.c
tcp_diag.c inet_diag: add const to inet_diag_req_v2 2015-03-10 13:45:28 -04:00
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c net: fix CONFIG_NET_NS=n compilation 2015-03-11 23:28:49 -04:00
tcp_ipv4.c
tcp_lp.c
tcp_memcontrol.c
tcp_metrics.c
tcp_minisocks.c
tcp_offload.c
tcp_output.c
tcp_probe.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c
tunnel4.c
udp_diag.c inet_diag: add const to inet_diag_req_v2 2015-03-10 13:45:28 -04:00
udp_impl.h
udp_offload.c
udp_tunnel.c
udp.c
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c