linux/drivers/net/ethernet
Petr Machata 663f1b26f9 mlxsw: spectrum: Prevent duplicate mirrors
The Spectrum ASIC doesn't support mirroring more than once from a single
binding point (which is a port-direction pair). Therefore detect that a
second binding of a given binding point is attempted.

To that end, extend struct mlxsw_sp_span_inspected_port to track whether
a given binding point is bound or not. Extend
mlxsw_sp_span_entry_port_find() to look for ports based on the full
unique key: port number, direction, and boundness.

Besides fixing the overt bug where configured mirrors are not offloaded,
this also fixes a more subtle bug: mlxsw_sp_span_inspected_port_del()
just defers to mlxsw_sp_span_entry_bound_port_find(), and that used to
find the first port with the right number (disregarding the type). Thus
by adding and removing egress and ingress mirrors in the right order,
one could trick the system into believing it has no egress mirrors when
in fact it did have some. That then caused that
mlxsw_sp_span_port_mtu_update() didn't update mirroring buffer when MTU
was changed.

Fixes: 763b4b70af ("mlxsw: spectrum: Add support in matchall mirror TC offloading")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-09 13:02:14 -05:00
..
3com 3c59x: fix missing dma_mapping_error check and bad ring refill logic 2018-01-03 13:44:14 -05:00
8390 ethernet: natsemi: correct spelling 2018-03-06 11:14:08 -05:00
adaptec
adi treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
aeroflex
agere treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
alacritech
allwinner
alteon net: alteon: acenic: clean up indentation issue 2017-12-15 13:28:30 -05:00
altera
amazon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
amd amd-xgbe: Restore PCI interrupt enablement setting on resume 2018-02-21 15:39:54 -05:00
apm
apple
aquantia net: aquantia: Fix error handling in aq_pci_probe() 2018-02-22 15:33:16 -05:00
arc net: arc_emac: restart stalled EMAC 2017-12-19 13:25:52 -05:00
atheros treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
aurora
broadcom tg3: APE heartbeat changes 2018-02-19 14:16:52 -05:00
brocade
cadence net: macb: Handle HRESP error 2018-01-29 14:25:47 -05:00
calxeda
cavium Revert "net: thunderx: Add support for xdp redirect" 2018-02-14 14:23:39 -05:00
chelsio cxgb4: do not set needs_free_netdev for mgmt dev's 2018-03-07 15:33:13 -05:00
cirrus m68k updates for 4.16 2018-01-29 16:37:15 -08:00
cisco enic: add wq clean up budget 2017-12-26 13:10:07 -05:00
cortina net: gemini: Depend on HAS_IOMEM 2018-01-21 18:05:30 -05:00
davicom
dec
dlink
emulex be2net: Handle transmit completion errors in Lancer 2018-02-06 11:48:33 -05:00
ezchip
faraday
freescale fsl/fman: avoid sleeping in atomic context while adding an address 2018-03-07 10:48:07 -05:00
fujitsu
hisilicon net: hns3: add int_gl_idx setup for VF 2018-01-26 10:58:30 -05:00
hp
huawei hinic: Replace PCI pool old API 2018-01-02 16:14:49 -06:00
i825xx
ibm ibmvnic: Fix early release of login buffer 2018-02-22 14:45:42 -05:00
intel e1000e: allocate ring descriptors with dma_zalloc_coherent 2018-03-05 13:34:59 -08:00
marvell mvpp2: fix multicast address filter 2018-02-11 22:37:04 -05:00
mediatek net: mediatek: Explicitly include pinctrl headers 2018-02-05 09:41:54 -08:00
mellanox mlxsw: spectrum: Prevent duplicate mirrors 2018-03-09 13:02:14 -05:00
micrel net: ks8851: Support DT-provided MAC address 2017-12-19 13:52:39 -05:00
microchip
moxa
myricom treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
natsemi ethernet: natsemi: correct spelling 2018-03-06 11:14:08 -05:00
neterion net: vxge: Fix some indentation issues 2017-11-20 11:36:30 +09:00
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2018-02-09 14:05:10 -05:00
nuvoton
nvidia forcedeth: remove duplicate structure member in rx 2018-01-23 11:11:41 -05:00
nxp
oki-semi pch_gbe: Deprecate pci_get_bus_and_slot() 2018-01-17 08:16:46 -06:00
packetengines
pasemi net: pasemi: Replace mac address parsing 2017-12-20 12:47:46 -05:00
qlogic qed: Free RoCE ILT Memory on rmmod qedr 2018-03-07 12:17:31 -05:00
qualcomm net: qcom/emac: Use proper free methods during TX 2018-03-07 12:21:03 -05:00
rdc
realtek r8169: fix RTL8168EP take too long to complete driver initialization. 2018-01-31 10:26:30 -05:00
renesas sh_eth: uninline TSU register accessors 2018-02-27 14:39:48 -05:00
rocker rocker: fix possible null pointer dereference in rocker_router_fib_event_work 2018-02-01 09:50:52 -05:00
samsung
seeq
sfc sfc: mark some unexported symbols as static 2018-01-28 21:59:18 -05:00
sgi
silan
sis
smsc net: smsc911x: Fix unload crash when link is up 2018-03-07 13:22:09 -05:00
socionext net: ethernet: ave: enable Rx drop interrupt 2018-03-09 12:00:13 -05:00
stmicro net: stmmac: remove redundant enable of PMT irq 2018-02-09 14:23:04 -05:00
sun sun: Add SPDX license tags to Sun network drivers 2018-02-07 21:51:02 -05:00
synopsys net: dwc-xlgmac: Get rid of custom hex_dump_to_buffer() 2017-12-21 15:05:33 -05:00
tehuti
ti net: ethernet: ti: cpsw: fix net watchdog timeout 2018-02-07 21:57:10 -05:00
tile
toshiba treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
tundra net: tsi108: Use DMA API properly 2018-01-17 18:04:43 -06:00
via net: via: via-rhine: use %p to format void * address instead of %x 2017-11-29 09:45:24 -05:00
wiznet
xilinx net: ethernet: xilinx: Mark XILINX_LL_TEMAC broken on 64-bit 2017-11-29 09:43:24 -05:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: remove unused initialization of 'rxdesc' 2018-02-01 14:54:28 -05:00
jme.h
Kconfig net: ethernet: Add a driver for Gemini gigabit ethernet 2018-01-15 14:38:55 -05:00
korina.c
lantiq_etop.c
Makefile net: ethernet: Add a driver for Gemini gigabit ethernet 2018-01-15 14:38:55 -05:00
netx-eth.c