]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9a6dc69cb7f3716a5ad4279d499c858cd692ea23
treeb44c1b132e39de1dcfb03ac4d4cc29e28b476752
parent101a036fd184e453ee58ae61af03a9ae0cf73bd1
mlxsw: spectrum: Relax sanity checks during enslavement

Since commit 2661143fbe47 ("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: 2661143fbe47 ("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