提交 6a9863a6 编写于 作者: I Ido Schimmel 提交者: David S. Miller

mlxsw: spectrum: Set STP state when leaving 802.1D bridge

When a VLAN device leaves a bridge its STP state is set to DISABLED,
which causes the hardware to discard any packets coming through the port
with this VLAN.

Fix that by setting STP state to FORWARDING when the device leaves its
bridge and allow traffic to be directed to CPU.

Fixes: 26f0e7fb ("mlxsw: spectrum: Add support for VLAN devices bridging")
Reported-by: NElad Raz <eladr@mellanox.com>
Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
Signed-off-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1e5ad30c
...@@ -2746,6 +2746,13 @@ static int mlxsw_sp_vport_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_vport, ...@@ -2746,6 +2746,13 @@ static int mlxsw_sp_vport_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_vport,
goto err_vport_flood_set; goto err_vport_flood_set;
} }
err = mlxsw_sp_port_stp_state_set(mlxsw_sp_vport, vid,
MLXSW_REG_SPMS_STATE_FORWARDING);
if (err) {
netdev_err(dev, "Failed to set STP state\n");
goto err_port_stp_state_set;
}
if (flush_fdb && mlxsw_sp_vport_fdb_flush(mlxsw_sp_vport)) if (flush_fdb && mlxsw_sp_vport_fdb_flush(mlxsw_sp_vport))
netdev_err(dev, "Failed to flush FDB\n"); netdev_err(dev, "Failed to flush FDB\n");
...@@ -2763,6 +2770,7 @@ static int mlxsw_sp_vport_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_vport, ...@@ -2763,6 +2770,7 @@ static int mlxsw_sp_vport_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_vport,
return 0; return 0;
err_port_stp_state_set:
err_vport_flood_set: err_vport_flood_set:
err_port_vid_learning_set: err_port_vid_learning_set:
err_port_vid_to_fid_validate: err_port_vid_to_fid_validate:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册