alistair23-linux/drivers/net/ethernet/ti
Grygorii Strashko 5e5add172e net: ethernet: ti: cpsw: fix packet leaking in dual_mac mode
In dual_mac mode packets arrived on one port should not be forwarded by
switch hw to another port. Only Linux Host can forward packets between
ports. The below test case (reported in [1]) shows that packet arrived on
one port can be leaked to anoter (reproducible with dual port evms):
 - connect port 1 (eth0) to linux Host 0 and run tcpdump or Wireshark
 - connect port 2 (eth1) to linux Host 1 with vlan 1 configured
 - ping <IPx> from Host 1 through vlan 1 interface.
ARP packets will be seen on Host 0.

Issue happens because dual_mac mode is implemnted using two vlans: 1 (Port
1+Port 0) and 2 (Port 2+Port 0), so there are vlan records created for for
each vlan. By default, the ALE will find valid vlan record in its table
when vlan 1 tagged packet arrived on Port 2 and so forwards packet to all
ports which are vlan 1 members (like Port.

To avoid such behaviorr the ALE VLAN ID Ingress Check need to be enabled
for each external CPSW port (ALE_PORTCTLn.VID_INGRESS_CHECK) so ALE will
drop ingress packets if Rx port is not VLAN member.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-02 11:08:23 -04:00
..
cpmac.c cpmac: remove hopeless #warning 2017-01-16 11:54:36 -05:00
cpsw-common.c net: ti: cpsw-common: dont print error if ti_cm_get_macid() fails 2017-08-30 10:05:07 -07:00
cpsw-phy-sel.c drivers: net: cpsw-phy-sel: Clear RGMII_IDMODE on "rgmii" links 2016-12-07 13:12:17 -05:00
cpsw.c net: ethernet: ti: cpsw: fix packet leaking in dual_mac mode 2018-05-02 11:08:23 -04:00
cpsw.h net: ethernet: ti: cpsw: move mac_hi/lo defines in cpsw.h 2017-12-01 16:36:32 -05:00
cpsw_ale.c net: ethernet: ti: ale: fix port check in cpsw_ale_control_set/get 2017-12-01 16:36:33 -05:00
cpsw_ale.h net: ethernet: ti: ale: use devm_kzalloc in cpsw_ale_create() 2017-12-01 16:36:32 -05:00
cpts.c net: ethernet: make ptp_clock_info const 2017-08-22 11:04:51 -07:00
cpts.h net: ethernet: ti: cpts: fix tx timestamping timeout 2017-08-01 15:22:55 -07:00
davinci_cpdma.c net: ethernet: ti: cpsw: enable vlan rx vlan offload 2018-03-17 19:51:01 -04:00
davinci_cpdma.h net: ethernet: ti: cpsw: enable vlan rx vlan offload 2018-03-17 19:51:01 -04:00
davinci_emac.c net: ethernet: ti: cpdma: correct error handling for chan create 2017-12-13 15:49:53 -05:00
davinci_mdio.c drivers: net: davinci_mdio: print bus frequency 2017-08-11 14:23:59 -07:00
Kconfig cpsw/netcp: refine cpts dependency 2017-04-28 15:55:14 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netcp.h net: netcp: use hw capability to remove FCS word from rx packets 2017-01-07 21:03:50 -05:00
netcp_core.c Net: ethernet: ti: netcp: Fix inbound ping crash if MTU size is greater than 1500 2018-01-17 16:19:37 -05:00
netcp_ethss.c net: ethernet: ti: ale: use devm_kzalloc in cpsw_ale_create() 2017-12-01 16:36:32 -05:00
netcp_sgmii.c net: netcp: Fixes SGMII reset on network interface shutdown 2015-07-27 01:14:26 -07:00
netcp_xgbepcsr.c net: netcp: Enhance GBE driver to support 10G Ethernet 2015-01-19 15:07:39 -05:00
tlan.c net: Spelling s/stucture/structure/ 2018-03-27 09:51:23 +02:00
tlan.h tlan: Don't scream if no link 2014-07-07 17:06:52 -07:00