linux/net/openvswitch
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
..
actions.c net: openvswitch: Support masked set actions. 2015-02-07 22:40:17 -08:00
datapath.c net: Kill hold_net release_net 2015-03-12 14:39:40 -04:00
datapath.h net: Introduce possible_net_t 2015-03-12 14:39:40 -04:00
dp_notify.c genetlink: make multicast groups const, prevent abuse 2013-11-19 16:39:06 -05:00
flow.c openvswitch: Reset key metadata for packet execution. 2015-02-11 14:40:15 -08:00
flow.h openvswitch: Add support for unique flow IDs. 2015-01-26 15:45:50 -08:00
flow_netlink.c openvswitch: Fix serialization of non-masked set actions. 2015-03-03 14:38:57 -05:00
flow_netlink.h openvswitch: Add support for unique flow IDs. 2015-01-26 15:45:50 -08:00
flow_table.c openvswitch: Initialize unmasked key and uid len 2015-02-08 00:51:14 -08:00
flow_table.h openvswitch: Add support for unique flow IDs. 2015-01-26 15:45:50 -08:00
Kconfig mpls: Fix the openvswitch select of NET_MPLS_GSO 2015-03-08 19:30:06 -04:00
Makefile ovs: Turn vports with dependencies into separate modules 2014-10-28 14:43:18 -04:00
vport-geneve.c openvswitch: Add support for checksums on UDP tunnels. 2015-01-28 23:04:15 -08:00
vport-gre.c openvswitch: Introduce ovs_tunnel_route_lookup 2015-01-14 16:32:06 -05:00
vport-internal_dev.c openvswitch: Drop packets when interdev is not up 2014-11-05 23:52:35 -08:00
vport-internal_dev.h openvswitch: introduce rtnl ops stub 2014-07-01 14:40:17 -07:00
vport-netdev.c openvswitch: Constify various function arguments 2014-11-09 18:58:44 -08:00
vport-netdev.h ovs: Turn vports with dependencies into separate modules 2014-10-28 14:43:18 -04:00
vport-vxlan.c openvswitch: Only set TUNNEL_VXLAN_OPT if VXLAN-GBP metadata is set 2015-02-09 14:25:52 -08:00
vport-vxlan.h openvswitch: Support VXLAN Group Policy extension 2015-01-15 01:11:41 -05:00
vport.c openvswitch: Introduce ovs_tunnel_route_lookup 2015-01-14 16:32:06 -05:00
vport.h openvswitch: Fix net exit. 2015-02-20 15:32:08 -05:00