linux_dsm_epyc7002/drivers/net/ethernet/mellanox/mlxsw
Ido Schimmel 99724c18fc mlxsw: spectrum: Introduce support for router interfaces
Up until now we only supported bridged interfaces. Packets ingressing
through the switch ports were either classified to FIDs (in the case of
the VLAN-aware bridge) or vFIDs (in the case of VLAN-unaware bridges).
The packets were then forwarded according to the FDB. Routing was done
entirely in slowpath, by splitting the vFID range in two and using the
lower 0.5K vFIDs as dummy bridges that simply flooded all incoming
traffic to the CPU.

Instead, allow packets to be routed in the device by creating router
interfaces (RIFs) that will direct them to the router block.
Specifically, the RIFs introduced here are Sub-port RIFs used for VLAN
devices and port netdevs. Packets ingressing from the {Port / LAG ID, VID}
with which the RIF was programmed with will be assigned to a special
kind of FIDs called rFIDs and from there directed to the router.

Create a RIF whenever the first IPv4 address was programmed on a VLAN /
LAG / port netdev. Destroy it upon removal of the last IPv4 address.
Receive these notifications by registering for the 'inetaddr'
notification chain. A non-zero (10) priority is used for the
notification block, so that RIFs will be created before routes are
offloaded via FIB code.

Note that another trigger for RIF destruction are CHANGEUPPER
notifications causing the underlying FID's reference count to go down to
zero. This can happen, for example, when a VLAN netdev with an IP address
is put under bridge. While this configuration doesn't make sense it does
cause the device and the kernel to get out of sync when the netdev is
unbridged. We intend to address this in the future, hopefully in current
cycle.

Finally, Remove the lower 0.5K vFIDs, as they are deprecated by the RIFs,
which will trap packets according to their DIP.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-04 18:25:15 -07:00
..
cmd.h mlxsw: cmd: Introduce FID-offset flooding tables 2015-10-16 07:15:10 -07:00
core_hwmon.c mlxsw: core: remove an unnecessary condition 2016-01-06 15:07:47 -05:00
core.c mlxsw: core: Remove deprecated create_workqueue 2016-06-09 23:49:43 -07:00
core.h mlxsw: core: Introduce support for asynchronous EMAD register access 2016-04-14 16:22:06 -04:00
emad.h mlxsw: Add interface to access registers and process events 2015-07-30 00:05:00 -07:00
item.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-20 06:08:27 -07:00
Kconfig mlxsw: spectrum: Introduce support for Data Center Bridging (DCB) 2016-04-06 17:24:18 -04:00
Makefile mlxsw: spectrum_router: Add basic ipv4 router initialization 2016-07-02 15:21:17 -04:00
pci.c mlxsw: pci: Implement reset done check 2016-03-13 22:30:01 -04:00
pci.h mlxsw: pci: Implement reset done check 2016-03-13 22:30:01 -04:00
port.h mlxsw: spectrum: Introduce port splitting 2016-03-01 16:07:31 -05:00
reg.h mlxsw: reg: Add Router Algorithmic LPM Unicast Entry Register definition 2016-07-04 18:25:15 -07:00
spectrum_buffers.c mlxsw: spectrum_buffers: Use MLXSW_SP_PB_UNUSED define for unused pb 2016-04-15 13:02:43 -04:00
spectrum_dcb.c mlxsw: spectrum: Add IEEE 802.1Qbb PFC support 2016-04-06 17:24:20 -04:00
spectrum_router.c mlxsw: spectrum_router: Implement fib4 add/del switchdev obj ops 2016-07-04 18:25:15 -07:00
spectrum_switchdev.c mlxsw: spectrum: Introduce support for router interfaces 2016-07-04 18:25:15 -07:00
spectrum.c mlxsw: spectrum: Introduce support for router interfaces 2016-07-04 18:25:15 -07:00
spectrum.h mlxsw: spectrum: Introduce support for router interfaces 2016-07-04 18:25:15 -07:00
switchx2.c mlxsw: switchx2: Don't count internal TX header bytes to stats 2016-06-17 21:57:53 -07:00
trap.h mlxsw: spectrum: Add traps needed for router implementation 2016-07-02 15:21:18 -04:00
txheader.h mlxsw: spectrum: Add initial support for Spectrum ASIC 2015-10-16 07:15:23 -07:00