linux-stable/drivers/net/ethernet/marvell
Maxime Chevallier 56beda3db6 net: mvpp2: Add hardware offloading for VLAN filtering
Marvell PPv2 controller allows for generic packet filtering. This commit
adds entries to implement VLAN filtering. The approach taken is :

 - Filter entries that would match on the presence of the VLAN tag
   (existing VLAN detection, DSA / EDSA detection) will set the next
   lookup ID to be for the VID.

 - For each VLAN existing on a given port, we add an entry that matches
   this specific VID. If the incoming packet matches the VID entry, it is
   set for the next lookup in the chain (LU_L2).

 - A Guard entry is added for each port, that will match if the incoming
   packet didn't match any of the above VID entries. This entry tags the
   packet to be dropped.

Due to this design, and the fact that the total 256 filter entries are
also used for other purposes, we have a limit of 10 VLANs per port. To
accommodate the case where we would need more VLANS on one port, this
patch implements the ndo_set_features to allow for disabling of VLAN
filtering using ethtool.

The default config has VLAN filtering disabled.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-28 12:04:30 -05:00
..
Kconfig net: mvneta: convert to phylink 2018-01-03 10:38:53 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mv643xx_eth.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mvmdio.c net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case 2017-12-07 13:40:23 -05:00
mvneta.c net: mvneta: add module EEPROM reading support 2018-01-03 10:38:54 -05:00
mvneta_bm.c
mvneta_bm.h
mvpp2.c net: mvpp2: Add hardware offloading for VLAN filtering 2018-02-28 12:04:30 -05:00
pxa168_eth.c net: pxa168_eth: add netconsole support 2018-02-01 14:58:37 -05:00
skge.c skge: remove redundunt free_irq under spinlock 2017-12-13 15:47:00 -05:00
skge.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sky2.c sky2: Replace mdelay with msleep in sky2_vpd_wait 2018-01-02 12:27:33 -05:00
sky2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00