linux_dsm_epyc7002/drivers/net/ethernet
Ido Schimmel 32fd4b49a3 mlxsw: spectrum_router: Do not destroy RIFs based on FID's reference count
Currently, when a RIF is constructed on top of a FID, the RIF increments
the FID's reference count and the RIF is destroyed when the FID's
reference count drops to 1. This effectively means that when no local
ports are member in the FID, the FID is destroyed regardless if the
router port is a member in the FID or not.

The above can lead to the unexpected behavior in which routes using a
VLAN interface as their nexthop device are no longer offloaded after the
last local port leaves the corresponding VLAN (FID).

Example:
# ip -4 route show dev br0.10
192.0.2.0/24 proto kernel scope link src 192.0.2.1 offload
# bridge vlan del vid 10 dev swp3
# ip -4 route show dev br0.10
192.0.2.0/24 proto kernel scope link src 192.0.2.1

After the patch, the route is offloaded before and after the VLAN is
removed from local port 'swp3', as the RIF corresponding to 'br0.10'
continues to exists.

In order to remove RIFs' reliance on the underlying FID's reference
count, we need to add a reference count to sub-port RIFs, which are RIFs
that correspond to physical ports and their uppers (e.g., LAG devices).

In this case, each {Port, VID} ('struct mlxsw_sp_port_vlan') needs to
hold a reference on the RIF. For example:

                       bond0.10
                          |
                        bond0
                          |
                      +-------+
                      |       |
                    swp1    swp2

Both {Port 1, VID 10} and {Port 2, VID 10} will hold a reference on the
RIF corresponding to 'bond0.10'. When the last reference is dropped, the
RIF will be destroyed.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-19 12:28:07 -08:00
..
3com net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
8390
adaptec
aeroflex net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
agere
alacritech net: ethernet: slicoss: remove duplicated include from slic.h 2018-09-18 19:57:40 -07:00
allwinner
alteon
altera
amazon net: ena: update driver version from 2.0.1 to 2.0.2 2018-11-19 15:13:00 -08:00
amd net: ethernet: don't set phylib state CHANGELINK in drivers 2018-12-18 22:07:20 -08:00
apm net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
apple net: apple: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
arc net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
atheros net: alx: make alx_drv_name static 2018-11-05 17:12:58 -08:00
aurora
broadcom bnxt_en: query force speeds before disabling autoneg mode. 2018-12-17 23:08:53 -08:00
brocade bna: Remove unnecessary self assignment 2018-09-21 19:02:05 -07:00
cadence net: cadence: switch to using nvmem_get_mac_address() 2018-12-03 15:40:30 -08:00
calxeda
cavium Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
chelsio cxgb4: remove DEFINE_SIMPLE_DEBUGFS_FILE() 2018-12-15 11:21:22 -08:00
cirrus net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
cisco net: core: dev: Add extack argument to dev_open() 2018-12-06 13:26:06 -08:00
cortina net: gemini: Fix copy/paste error 2018-11-23 22:35:38 -08:00
davicom net: ethernet: davicom: dm9000: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
dec net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
dlink net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
emulex net: ndo_bridge_setlink: Add extack 2018-12-12 16:34:21 -08:00
ezchip
faraday net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts 2018-11-21 16:57:39 -08:00
freescale dpaa2-eth: Add QBMAN related stats 2018-12-19 10:37:22 -08:00
fujitsu
hisilicon net: hns3: fix a SSU buffer checking bug 2018-12-18 12:01:01 -08:00
hp
huawei hinic: optmize rx refill buffer mechanism 2018-12-11 22:52:56 -08:00
i825xx net: i825xx: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
ibm net/ibmvnic: Remove tests of member address 2018-12-14 13:36:38 -08:00
intel xfrm: prefer secpath_set over secpath_dup 2018-12-19 11:21:38 -08:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
mediatek net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
mellanox mlxsw: spectrum_router: Do not destroy RIFs based on FID's reference count 2018-12-19 12:28:07 -08:00
micrel net: micrel: fix return type of ndo_start_xmit function 2018-09-21 19:11:39 -07:00
microchip lan743x: Enable driver to work with LAN7431 2018-11-27 16:32:07 -08:00
moxa
mscc net: switchdev: Add extack to switchdev_handle_port_obj_add() callback 2018-12-12 16:34:22 -08:00
myricom drivers: net: remove <net/busy_poll.h> inclusion when not needed 2018-10-25 16:20:02 -07:00
natsemi
neterion net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
netronome nfp: flower: fix cb_ident duplicate in indirect block register 2018-12-17 23:34:12 -08:00
ni net: nixge: Address compiler warnings when building for i386 2018-10-01 22:48:08 -07:00
nuvoton
nvidia
nxp net: lpc_eth: fix trivial comment typo 2018-11-21 16:17:32 -08:00
oki-semi
packetengines
pasemi
qlogic qlcnic: remove set but not used variables 'op, cmd_op' 2018-12-18 15:49:46 -08:00
qualcomm net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE 2018-12-03 17:33:43 -08:00
rdc
realtek r8169: improve spurious interrupt detection 2018-12-15 11:22:48 -08:00
renesas ravb: Clean up duplex handling 2018-11-23 11:14:47 -08:00
rocker rocker, dsa, ethsw: Don't filter VLAN events on bridge itself 2018-11-23 18:02:24 -08:00
samsung
seeq net: seeq: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
sfc net: core: dev: Add extack argument to dev_open() 2018-12-06 13:26:06 -08:00
sgi net: sgi: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
silan
sis
smsc net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
socionext net: socionext: remove mmio reads on Tx 2018-12-15 13:15:19 -08:00
stmicro net-next: stmmac: dwmac-mediatek: add module license info 2018-12-12 21:42:55 -08:00
sun net: Use of_node_name_eq for node name comparisons 2018-12-05 20:51:05 -08:00
synopsys
tehuti
ti net: ethernet: don't set phylib state CHANGELINK in drivers 2018-12-18 22:07:20 -08:00
toshiba net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
tundra
via net: via: via-velocity: fix spelling mistake "alignement" -> "alignment" 2018-11-27 16:22:23 -08:00
wiznet net: ethernet: wiznet: w5300: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
xilinx net: xilinx: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Fix returned value in case of error in 'xrx200_probe()' 2018-11-16 19:46:49 -08:00
Makefile
netx-eth.c