linux_dsm_epyc7002/drivers/net/ethernet/ti
Ivan Khoronzhuk 5b3a5a14f8 net: ethernet: ti: cpsw: use for mcast entries only host port
In dual-emac mode the cpsw driver sends directed packets, that means
that packets go to the directed port, but an ALE lookup is performed
to determine untagged egress only. It means that on tx side no need
to add port bit for ALE mcast entry mask, and basically ALE entry
for port identification is needed only on rx side.

So, add only host port in dual_emac mode as used directed
transmission, and no need in one more port. For single port boards
and switch mode all ports used, as usual, so no changes for them.
Also it simplifies farther changes.

In other words, mcast entries for dual-emac should behave exactly
like unicast. It also can help avoid leaking packets between ports
with same vlan on h/w level if ports could became members of same vid.

So now, for instance, if mcast address 33:33:00:00:00:01 is added then
entries in ALE table:

vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x1
vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x1

Instead of:
vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x3
vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x5

With the same considerations, set only host port for unregistered
mcast for dual-emac mode in case of IFF_ALLMULTI is set, exactly like
it's done in cpsw_ale_set_allmulti().

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-15 22:22:12 -07:00
..
cpmac.c cpmac: remove hopeless #warning 2017-01-16 11:54:36 -05:00
cpsw_ale.c net: ethernet: ti: cpsw_ale: use const for API having pointer on mac address 2018-10-15 22:21:27 -07:00
cpsw_ale.h net: ethernet: ti: cpsw_ale: use const for API having pointer on mac address 2018-10-15 22:21:27 -07: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 net: ethernet: cpsw-phy-sel: prefer phandle for phy sel 2018-09-02 13:52:13 -07:00
cpsw.c net: ethernet: ti: cpsw: use for mcast entries only host port 2018-10-15 22:22:12 -07:00
cpsw.h net: ethernet: ti: cpsw: move mac_hi/lo defines in cpsw.h 2017-12-01 16:36:32 -05:00
cpts.c net: ethernet: ti: cpts: mark expected switch fall-through 2018-08-07 17:54:21 -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: cpdma: fit rated channels in backward order 2018-07-23 20:34:36 -07: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: davinci_emac: match the mdio device against its compatible if possible 2018-06-21 10:23:48 +09:00
davinci_mdio.c net: davinci: fix building davinci mdio code without CONFIG_OF 2018-05-30 13:21:23 -04:00
Kconfig net: ethernet: ti: add missing GENERIC_ALLOCATOR dependency 2018-09-17 07:49:33 -07: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_core.c net: ethernet: Convert to using %pOFn instead of device_node.name 2018-08-29 19:41:30 -07:00
netcp_ethss.c net: ethernet: Convert to using %pOFn instead of device_node.name 2018-08-29 19:41:30 -07:00
netcp_sgmii.c
netcp_xgbepcsr.c
netcp.h net: netcp: add api to support set rx mode in netcp modules 2018-04-18 21:00:57 -04:00
tlan.c net: tlan: Mark expected switch fall-through 2018-08-07 17:54:21 -07:00
tlan.h