linux-bl808/net/core
Florian Fainelli d6abc59694 net: Introduce ndo_get_port_parent_id()
In preparation for getting rid of switchdev_ops, create a dedicated NDO
operation for getting the port's parent identifier. There are
essentially two classes of drivers that need to implement getting the
port's parent ID which are VF/PF drivers with a built-in switch, and
pure switchdev drivers such as mlxsw, ocelot, dsa etc.

We introduce a helper function: dev_get_port_parent_id() which supports
recursion into the lower devices to obtain the first port's parent ID.

Convert the bridge, core and ipv4 multicast routing code to check for
such ndo_get_port_parent_id() and call the helper function when valid
before falling back to switchdev_port_attr_get(). This will allow us to
convert all relevant drivers in one go instead of having to implement
both switchdev_port_attr_get() and ndo_get_port_parent_id() operations,
then get rid of switchdev_port_attr_get().

Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-06 14:16:11 -08:00
..
datagram.c
dev.c net: Introduce ndo_get_port_parent_id() 2019-02-06 14:16:11 -08:00
dev_addr_lists.c
dev_ioctl.c
devlink.c devlink: add hardware errors tracing facility 2019-02-06 11:05:57 -08:00
drop_monitor.c
dst.c net: add a route cache full diagnostic message 2019-01-17 15:37:25 -08:00
dst_cache.c
ethtool.c ethtool: add ethtool_rx_flow_spec to flow_rule structure translator 2019-02-06 10:38:26 -08:00
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: introduce bpf_spin_lock 2019-02-01 20:55:38 +01:00
flow_dissector.c net/flow_dissector: move bpf case into __skb_flow_bpf_dissect 2019-01-29 01:08:29 +01:00
flow_offload.c flow_offload: add flow action infrastructure 2019-02-06 10:38:25 -08:00
gen_estimator.c
gen_stats.c
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c bpf: in __bpf_redirect_no_mac pull mac only if present 2019-01-20 01:11:48 +01:00
lwtunnel.c
Makefile flow_offload: add flow_rule and flow_match structures and use them 2019-02-06 10:38:25 -08:00
neighbour.c neighbour: Do not perturb drop profiles when neigh_probe 2019-01-17 22:08:14 -08:00
net-procfs.c
net-sysfs.c net: Introduce ndo_get_port_parent_id() 2019-02-06 14:16:11 -08:00
net-sysfs.h
net-traces.c
net_namespace.c net: namespace: perform strict checks also for doit handlers 2019-01-19 10:09:58 -08:00
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
page_pool.c
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c net: Introduce ndo_get_port_parent_id() 2019-02-06 14:16:11 -08:00
scm.c socket: Add SO_TIMESTAMPING_NEW 2019-02-03 11:17:31 -08:00
secure_seq.c
skbuff.c
skmsg.c Optimize sk_msg_clone() by data merge to end dst sg entry 2019-01-17 11:42:26 -08:00
sock.c net: Fix fall through warning in y2038 tstamp changes. 2019-02-03 20:25:31 -08:00
sock_diag.c
sock_map.c
sock_reuseport.c
stream.c
sysctl_net_core.c net: introduce a knob to control whether to inherit devconf config 2019-01-22 11:07:21 -08:00
timestamping.c
tso.c
utils.c
xdp.c