Commit 44c8ac04 authored by Ido Schimmel's avatar Ido Schimmel Committed by Kleber Sacilotto de Souza

mlxsw: spectrum: Disable learning according to STP state

BugLink: https://bugs.launchpad.net/bugs/1878232

commit 45491133 upstream.

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: 56ade8fe ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent c84eacea
...@@ -90,10 +90,10 @@ static int mlxsw_sp_port_stp_state_set(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -90,10 +90,10 @@ static int mlxsw_sp_port_stp_state_set(struct mlxsw_sp_port *mlxsw_sp_port,
case BR_STATE_FORWARDING: case BR_STATE_FORWARDING:
spms_state = MLXSW_REG_SPMS_STATE_FORWARDING; spms_state = MLXSW_REG_SPMS_STATE_FORWARDING;
break; break;
case BR_STATE_LISTENING: /* fall-through */
case BR_STATE_LEARNING: case BR_STATE_LEARNING:
spms_state = MLXSW_REG_SPMS_STATE_LEARNING; spms_state = MLXSW_REG_SPMS_STATE_LEARNING;
break; break;
case BR_STATE_LISTENING: /* fall-through */
case BR_STATE_DISABLED: /* fall-through */ case BR_STATE_DISABLED: /* fall-through */
case BR_STATE_BLOCKING: case BR_STATE_BLOCKING:
spms_state = MLXSW_REG_SPMS_STATE_DISCARDING; spms_state = MLXSW_REG_SPMS_STATE_DISCARDING;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment