OpenCloudOS-Kernel/drivers/net
Petr Machata af641713e9 mlxsw: spectrum_router: Onload conflicting tunnels
The approach for offloading IP tunnels implemented currently by mlxsw
doesn't allow two tunnels that have the same local IP address in the
same (underlay) VRF. Previously, offloads were introduced on demand as
encap routes were formed. When such a route was created that would cause
offload of a conflicting tunnel, mlxsw_sp_ipip_entry_create() would
detect it and return -EEXIST, which would propagate up and cause FIB
abort.

Now however IPIP entries are created as soon as an offloadable netdevice
is created, and the failure prevents creation of such device.
Furthermore, if the driver is installed at the point where such
conflicting tunnels exist, the failure actually prevents successful
modprobe.

Furthermore, follow-up patches implement handling of NETDEV_CHANGE due
to the local address change. However, NETDEV_CHANGE can't be vetoed. The
failure merely means that the offloads weren't updated, but the change
in Linux configuration is not rolled back. It is thus desirable to have
a robust way of handling these conflicts, which can later be reused for
handling NETDEV_CHANGE as well.

To fix this, when a conflicting tunnel is created, instead of failing,
simply pull the old tunnel to slow path and reject offloading the
new one.

Introduce two functions: mlxsw_sp_ipip_entry_demote_tunnel() and
mlxsw_sp_ipip_demote_tunnel_by_saddr() to handle this. Make them both
public, because they will be useful later on in this patchset.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-04 09:15:18 +09:00
..
appletalk drivers/net: appletalk/cops: Convert timers to use timer_setup() 2017-10-28 19:09:49 +09:00
arcnet drivers/net: arcnet: Convert timers to use timer_setup() 2017-10-27 12:09:16 +09:00
bonding bonding: remove rtmsg_ifinfo called in bond_master_upper_dev_link 2017-10-25 10:54:39 +09:00
caif drivers: net: caif: use setup_timer() helper. 2017-09-21 11:44:43 -07:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-30 21:09:24 +09:00
cris
dsa net: dsa: lan9303: Add STP ALR entry on port 0 2017-11-01 21:30:24 +09:00
ethernet mlxsw: spectrum_router: Onload conflicting tunnels 2017-11-04 09:15:18 +09:00
fddi net: defxx: constify eisa_device_id 2017-08-19 17:13:41 -07:00
fjes
hamradio mkiss: remove redundant assignment of len to ax->mtu 2017-11-01 12:09:45 +09:00
hippi drivers/net: hippi: Convert timers to use timer_setup() 2017-10-27 12:09:15 +09:00
hyperv hv_netvsc: Set tx_table to equal weight after subchannels open 2017-10-29 12:09:23 +09:00
ieee802154 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2017-10-21 02:22:19 +01:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-30 21:09:24 +09:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-02 15:23:39 +09:00
plip
ppp ppp: Destroy the mutex when cleanup 2017-11-01 21:21:02 +09:00
slip drivers: net: slip: use setup_timer() helper. 2017-09-21 11:44:40 -07:00
team net: Add extack to upper device linking 2017-10-04 21:39:33 -07:00
usb net: hso: remove redundant unused variable dev 2017-11-01 21:23:56 +09:00
vmxnet3
wan wan: wanxl: remove redundant assignment to stat 2017-11-02 15:48:16 +09:00
wimax wimax/i2400m: Remove VLAIS 2017-10-10 12:35:05 -07:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-02 15:23:39 +09:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-22 13:39:14 +01:00
Kconfig net: Add support for networking over Thunderbolt cable 2017-10-02 11:24:42 -07:00
LICENSE.SRC
Makefile net: Add support for networking over Thunderbolt cable 2017-10-02 11:24:42 -07:00
Space.c
dummy.c net: remove MTU limits for dummy and ifb device 2017-09-25 16:26:09 -07:00
eql.c drivers: net: eql: use setup_timer() helper. 2017-09-21 11:44:42 -07:00
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-22 13:39:14 +01:00
gtp.c
ifb.c net: remove MTU limits for dummy and ifb device 2017-09-25 16:26:09 -07:00
loopback.c
macsec.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-22 13:39:14 +01:00
macvlan.c macvlan/macvtap: Add support for L2 forwarding offloads with macvtap 2017-10-19 12:43:59 +01:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-30 21:09:24 +09:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c drivers/net: ntb_netdev: Convert timers to use timer_setup() 2017-11-01 12:38:45 +09:00
rionet.c
sb1000.c
sungem_phy.c
tap.c tun/tap: sanitize TUNSETSNDBUF input 2017-11-01 20:52:36 +09:00
thunderbolt.c thunderbolt: Right shifting to zero bug in tbnet_handle_packet() 2017-10-19 13:04:32 +01:00
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-02 15:23:39 +09:00
veth.c
virtio_net. virtio-net: support XDP_REDIRECT 2017-09-20 14:27:52 -07:00
virtio_net.c bpf: add meta pointer for direct access 2017-09-26 13:36:44 -07:00
vrf.c net: vrf: Add extack messages for enslave errors 2017-10-04 21:39:33 -07:00
vsockmon.c
vxlan.c vxlan: factor out VXLAN-GPE next protocol 2017-08-29 15:16:52 -07:00
xen-netfront.c xen-netfront, xen-netback: Use correct minimum MTU values 2017-10-16 16:00:44 -04:00