diff options
author | Ido Schimmel <idosch@mellanox.com> | 2016-09-01 10:37:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-01 09:44:56 -0700 |
commit | f1de7a28d53cfde8fa290d6c535eb690a4e1b5d5 (patch) | |
tree | 74d834716cb0a157e76b2a0bb6a39cf2cc6a92a4 /drivers/net/ethernet | |
parent | e73226384948e9b35823150cadd9a3ea4ca9fc97 (diff) | |
download | talos-op-linux-f1de7a28d53cfde8fa290d6c535eb690a4e1b5d5.tar.gz talos-op-linux-f1de7a28d53cfde8fa290d6c535eb690a4e1b5d5.zip |
mlxsw: spectrum: Don't take multiple references on a FID
In commit 14d39461b3f4 ("mlxsw: spectrum: Use per-FID struct for the
VLAN-aware bridge") I added a per-FID struct, which member ports can
take a reference on upon VLAN membership configuration.
However, sometimes only the VLAN flags (e.g. egress untagged) are
toggled without changing the VLAN membership. In these cases we
shouldn't take another reference on the FID.
Fixes: 14d39461b3f4 ("mlxsw: spectrum: Use per-FID struct for the VLAN-aware bridge")
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index d1b59cdfacc1..e0d95c419634 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c @@ -460,6 +460,9 @@ static int __mlxsw_sp_port_fid_join(struct mlxsw_sp_port *mlxsw_sp_port, { struct mlxsw_sp_fid *f; + if (test_bit(fid, mlxsw_sp_port->active_vlans)) + return 0; + f = mlxsw_sp_fid_find(mlxsw_sp_port->mlxsw_sp, fid); if (!f) { f = mlxsw_sp_fid_create(mlxsw_sp_port->mlxsw_sp, fid); |