kernel_optimize_test/net/bridge
Eric W. Biederman 29a26a5680 netfilter: Pass struct net into the netfilter hooks
Pass a network namespace parameter into the netfilter hooks.  At the
call site of the netfilter hooks the path a packet is taking through
the network stack is well known which allows the network namespace to
be easily and reliabily.

This allows the replacement of magic code like
"dev_net(state->in?:state->out)" that appears at the start of most
netfilter hooks with "state->net".

In almost all cases the network namespace passed in is derived
from the first network device passed in, guaranteeing those
paths will not see any changes in practice.

The exceptions are:
xfrm/xfrm_output.c:xfrm_output_resume()         xs_net(skb_dst(skb)->xfrm)
ipvs/ip_vs_xmit.c:ip_vs_nat_send_or_cont()      ip_vs_conn_net(cp)
ipvs/ip_vs_xmit.c:ip_vs_send_or_cont()          ip_vs_conn_net(cp)
ipv4/raw.c:raw_send_hdrinc()                    sock_net(sk)
ipv6/ip6_output.c:ip6_xmit()			sock_net(sk)
ipv6/ndisc.c:ndisc_send_skb()                   dev_net(skb->dev) not dev_net(dst->dev)
ipv6/raw.c:raw6_send_hdrinc()                   sock_net(sk)
br_netfilter_hooks.c:br_nf_pre_routing_finish() dev_net(skb->dev) before skb->dev is set to nf_bridge->physindev

In all cases these exceptions seem to be a better expression for the
network namespace the packet is being processed in then the historic
"dev_net(in?in:out)".  I am documenting them in case something odd
pops up and someone starts trying to track down what happened.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-17 17:18:37 -07:00
..
netfilter netfilter: reduce sparse warnings 2015-08-28 21:04:12 +02:00
br_device.c net: bridge: convert to using IFF_NO_QUEUE 2015-08-18 11:55:06 -07:00
br_fdb.c Revert "Merge branch 'mv88e6xxx-switchdev-fdb'" 2015-08-11 12:00:37 -07:00
br_forward.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
br_if.c bridge: multicast: fix handling of temp and perm entries 2015-07-20 12:49:10 -07:00
br_input.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
br_ioctl.c bridge: fix br_stp_set_bridge_priority race conditions 2015-06-18 03:29:47 -07:00
br_mdb.c bridge: mdb: fix vlan_enabled access when vlans are not configured 2015-08-03 16:20:51 -07:00
br_multicast.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
br_netfilter_hooks.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
br_netfilter_ipv6.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
br_netlink.c net: bridge: remove unnecessary switchdev include 2015-09-08 22:33:14 -07:00
br_nf_core.c net: Remove protocol from struct dst_ops 2015-03-09 16:06:10 -04:00
br_private_stp.h
br_private.h bridge: fdb: rearrange net_bridge_fdb_entry 2015-08-27 16:38:52 -07:00
br_stp_bpdu.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
br_stp_if.c bridge: stp: when using userspace stp stop kernel hello and hold timers 2015-07-28 23:33:20 -07:00
br_stp_timer.c bridge: stp: when using userspace stp stop kernel hello and hold timers 2015-07-28 23:33:20 -07:00
br_stp.c bridge: stp: when using userspace stp stop kernel hello and hold timers 2015-07-28 23:33:20 -07:00
br_sysfs_br.c
br_sysfs_if.c bridge: vlan: flush the dynamically learned entries on port vlan delete 2015-06-24 05:40:55 -07:00
br_vlan.c net: bridge: check __vlan_vid_del for error 2015-09-08 22:28:45 -07:00
br.c switchdev: s/netdev_switch_/switchdev_/ and s/NETDEV_SWITCH_/SWITCHDEV_/ 2015-05-12 18:43:52 -04:00
Kconfig
Makefile netfilter: bridge: split ipv6 code into separated file 2015-06-18 21:14:21 +02:00