]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Disable learning according to STP state
authorIdo Schimmel <idosch@mellanox.com>
Wed, 27 Jan 2016 14:20:20 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jan 2016 23:55:31 +0000 (15:55 -0800)
commita220a5983430d1e8fbaa5ec538b054fbe4baa836
tree08e802b95c9055aaa44c85f30f45f538ab6a9830
parentb1e4aae0c1d2aa69864ea15b005c892c938e0abc
mlxsw: spectrum: Disable learning according to STP state

When port is put into LISTENING state it shouldn't populate the FDB, so
set the port's STP state in hardware to DISCARDING instead of LEARNING.
It will therefore keep listening to BPDU packets, but discard other
non-control packets and won't perform any learning.

Fixes: 91747a7223b2 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c