[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <419fbb1a7538b461e9f5433348e97b27248e8957.1527503302.git.petrm@mellanox.com>
Date: Mon, 28 May 2018 12:50:03 +0200
From: Petr Machata <petrm@...lanox.com>
To: netdev@...r.kernel.org, devel@...verdev.osuosl.org,
bridge@...ts.linux-foundation.org
Cc: jiri@...lanox.com, idosch@...lanox.com, davem@...emloft.net,
razvan.stefanescu@....com, gregkh@...uxfoundation.org,
stephen@...workplumber.org, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com, f.fainelli@...il.com,
nikolay@...ulusnetworks.com
Subject: [PATCH net-next v2 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN
events
Ignore VLAN events where the orig_dev is the bridge device itself.
Signed-off-by: Petr Machata <petrm@...lanox.com>
Reviewed-by: Ido Schimmel <idosch@...lanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 8c9cf8e..cbc8fab 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -1144,6 +1144,9 @@ static int mlxsw_sp_port_vlans_add(struct mlxsw_sp_port *mlxsw_sp_port,
struct mlxsw_sp_bridge_port *bridge_port;
u16 vid;
+ if (netif_is_bridge_master(orig_dev))
+ return -EOPNOTSUPP;
+
if (switchdev_trans_ph_prepare(trans))
return 0;
@@ -1741,6 +1744,9 @@ static int mlxsw_sp_port_vlans_del(struct mlxsw_sp_port *mlxsw_sp_port,
struct mlxsw_sp_bridge_port *bridge_port;
u16 vid;
+ if (netif_is_bridge_master(orig_dev))
+ return -EOPNOTSUPP;
+
bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev);
if (WARN_ON(!bridge_port))
return -EINVAL;
--
2.4.11
Powered by blists - more mailing lists