]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Don't forward packets when STP state is DISABLED
authorIdo Schimmel <idosch@mellanox.com>
Wed, 27 Jan 2016 14:20:19 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jan 2016 23:55:30 +0000 (15:55 -0800)
commitb1e4aae0c1d2aa69864ea15b005c892c938e0abc
tree5bbec3d7cc5e50dd8b7bd9acf932aa85ee1d568d
parent79a326ec0cf6953b6b8f6cb6b3daf8061e3a8422
mlxsw: spectrum: Don't forward packets when STP state is DISABLED

When STP state is set to DISABLED the port is assumed to be inactive, but
currently we forward packets ingressing through it.

Instead, set the port's STP state in hardware to DISCARDING, which means
it doesn't forward packets or perform any learning, but it does trap
control packets. However, these packets will be dropped by bridge code,
which results in the expected behavior.

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