mlxsw: spectrum: Relax sanity checks during enslavement
authorIdo Schimmel <idosch@mellanox.com>
Mon, 25 Dec 2017 08:05:33 +0000 (09:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jan 2018 17:38:26 +0000 (12:38 -0500)
commit90045fc9c78855bdc625a0ab185d97b72a937613
treeb44c1b132e39de1dcfb03ac4d4cc29e28b476752
parent8764a8267b128405cf383157d5e9a4a3735d2409
mlxsw: spectrum: Relax sanity checks during enslavement

Since commit 25cc72a33835 ("mlxsw: spectrum: Forbid linking to devices that
have uppers") the driver forbids enslavement to netdevs that already
have uppers of their own, as this can result in various ordering
problems.

This requirement proved to be too strict for some users who need to be
able to enslave ports to a bridge that already has uppers. In this case,
we can allow the enslavement if the bridge is already known to us, as
any configuration performed on top of the bridge was already reflected
to the device.

Fixes: 25cc72a33835 ("mlxsw: spectrum: Forbid linking to devices that have uppers")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Alexander Petrovskiy <alexpe@mellanox.com>
Tested-by: Alexander Petrovskiy <alexpe@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.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c