WSL2-Linux-Kernel/net/ipv4
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
..
bpfilter net: bpfilter: disallow to remove bpfilter module while being used 2019-01-11 18:05:41 -08:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-29 21:18:54 -08:00
Kconfig
Makefile
af_inet.c
ah4.c
arp.c
cipso_ipv4.c
datagram.c
devinet.c net: introduce a knob to control whether to inherit devconf config 2019-01-22 11:07:21 -08:00
esp4.c
esp4_offload.c
fib_frontend.c net: ipv4: Fix memory leak in network namespace dismantle 2019-01-15 13:33:44 -08:00
fib_lookup.h
fib_notifier.c
fib_rules.c ipv4: fib_rules: Fix possible infinite loop in fib_empty_table 2018-12-30 12:57:04 -08:00
fib_semantics.c ipv4: fib: use struct_size() in kzalloc() 2019-02-01 15:12:29 -08:00
fib_trie.c net: ipv4: Fix memory leak in network namespace dismantle 2019-01-15 13:33:44 -08:00
fou.c fou, fou6: do not assume linear skbs 2019-01-15 22:01:31 -08:00
gre_demux.c net: ip_gre: use erspan key field for tunnel lookup 2019-01-22 11:52:17 -08:00
gre_offload.c
icmp.c
igmp.c net: Fix ip_mc_{dec,inc}_group allocation context 2019-02-03 12:11:12 -08:00
inet_connection_sock.c
inet_diag.c tcp: fix a race in inet_diag_dump_icsk() 2018-12-20 19:23:22 -08:00
inet_fragment.c net: IP defrag: encapsulate rbtree defrag code into callable functions 2019-01-25 21:37:11 -08:00
inet_hashtables.c net: dccp: fix kernel crash on module load 2018-12-24 15:27:56 -08:00
inet_timewait_sock.c
inetpeer.c
ip_forward.c
ip_fragment.c net: IP defrag: encapsulate rbtree defrag code into callable functions 2019-01-25 21:37:11 -08:00
ip_gre.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-27 10:43:17 -08:00
ip_input.c net: ipv4: ip_input: fix blank line coding style issues 2019-01-27 13:27:50 -08:00
ip_options.c
ip_output.c
ip_sockglue.c ip: on queued skb use skb_header_pointer instead of pskb_may_pull 2019-01-10 09:27:20 -05:00
ip_tunnel.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-27 10:43:17 -08:00
ip_tunnel_core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-24 16:19:56 -08:00
ip_vti.c vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel 2019-01-09 14:00:37 +01:00
ipcomp.c
ipconfig.c ipconfig: add carrier_timeout kernel parameter 2019-02-01 15:24:13 -08:00
ipip.c ip_tunnel: Add tnl_update_pmtu in ip_md_tunnel_xmit 2019-01-26 09:43:03 -08:00
ipmr.c net: Introduce ndo_get_port_parent_id() 2019-02-06 14:16:11 -08:00
ipmr_base.c
metrics.c
netfilter.c netfilter: ipv4: remove useless export_symbol 2019-01-28 11:32:58 +01:00
netlink.c
ping.c
proc.c
protocol.c
raw.c
raw_diag.c
route.c ipv4/igmp: Don't drop IGMP pkt with zeros src addr 2019-02-03 09:54:05 -08:00
syncookies.c
sysctl_net_ipv4.c
tcp.c socket: Add SO_TIMESTAMPING_NEW 2019-02-03 11:17:31 -08:00
tcp_bbr.c tcp_bbr: adapt cwnd based on ack aggregation estimation 2019-01-24 22:27:27 -08:00
tcp_bic.c
tcp_bpf.c bpf: sk_msg, sock{map|hash} redirect through ULP 2018-12-20 23:47:09 +01:00
tcp_cdg.c
tcp_cong.c
tcp_cubic.c
tcp_dctcp.c
tcp_dctcp.h
tcp_diag.c
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: Refactor pingpong code 2019-01-27 13:29:43 -08:00
tcp_ipv4.c tcp: Refactor pingpong code 2019-01-27 13:29:43 -08:00
tcp_lp.c
tcp_metrics.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
tcp_minisocks.c tcp: move rx_opt & syn_data_acked init to tcp_disconnect() 2019-01-17 22:19:05 -08:00
tcp_nv.c
tcp_offload.c
tcp_output.c tcp: change pingpong threshold to 3 2019-01-27 13:29:43 -08:00
tcp_rate.c
tcp_recovery.c
tcp_scalable.c
tcp_timer.c tcp: Refactor pingpong code 2019-01-27 13:29:43 -08:00
tcp_ulp.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c udp: add missing rehash callback to udplite 2019-01-17 15:01:08 -08:00
udp_diag.c
udp_impl.h udp: add missing rehash callback to udplite 2019-01-17 15:01:08 -08:00
udp_offload.c
udp_tunnel.c net/ipv4/udp_tunnel: prefer SO_BINDTOIFINDEX over SO_BINDTODEVICE 2019-01-17 14:55:52 -08:00
udplite.c udp: add missing rehash callback to udplite 2019-01-17 15:01:08 -08:00
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