net: dsa: mv88e6xxx: egress floods all DSA ports
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 5 Dec 2017 20:34:09 +0000 (15:34 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Dec 2017 23:01:33 +0000 (18:01 -0500)
commit3ee50cbf3a8e0846a12b3fdf8aa9397668981c16
tree81cccdb611deb1bf6cb3ba6ec7c8a1ab85d88e38
parent9382a5067ea503069a0bd250d5488a85ce9c9c36
net: dsa: mv88e6xxx: egress floods all DSA ports

The mv88e6xxx driver currently assumes a single CPU port in the fabric
and thus floods frames with unknown DA on a single DSA port, the one
that is one hop closer to the CPU port.

With multiple CPU ports in mind, this isn't true anymore because CPU
ports could be found behind both DSA ports of a device in-between
others.

For example in a A <-> B <-> C fabric, both A and C having CPU ports,
device B will have to flood such frame to its two DSA ports.

This patch considers both CPU and DSA ports of a device as upstream
ports, where to flood frames with unknown DA addresses.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c