aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2016-08-24 06:00:29 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-24 12:41:13 -0400
commit0f7a4d8a9d1c6ecd0a93f7e5feedf5cdffaafd5e (patch)
tree80ac8c3b4009471e3eb66616b96d1505988421de
parent81f77bc00689ea602e8f19ef5b6dc7b1e238187b (diff)
mlxsw: spectrum: Don't set learning when creating vPorts
Before commit 99724c18fc66 ("mlxsw: spectrum: Introduce support for router interfaces") we used to assign vFIDs to the created vPorts. Since these vPorts were used for slow path traffic we had to disable learning for them, as it doesn't make sense to have it enabled. This is no longer the case and now vPorts are either used for router interfaces (for which learning is disabled by the firmware) or bridge ports (for which learning is explicitly enabled by the driver). Therefore, we can remove the learning configuration upon vPort creation. 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>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 3820317d9a42..2713a64eae75 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -981,10 +981,6 @@ static int mlxsw_sp_port_add_vid(struct net_device *dev,
981 goto err_port_vp_mode_trans; 981 goto err_port_vp_mode_trans;
982 } 982 }
983 983
984 err = mlxsw_sp_port_vid_learning_set(mlxsw_sp_vport, vid, false);
985 if (err)
986 goto err_port_vid_learning_set;
987
988 err = mlxsw_sp_port_vlan_set(mlxsw_sp_vport, vid, vid, true, untagged); 984 err = mlxsw_sp_port_vlan_set(mlxsw_sp_vport, vid, vid, true, untagged);
989 if (err) 985 if (err)
990 goto err_port_add_vid; 986 goto err_port_add_vid;
@@ -992,8 +988,6 @@ static int mlxsw_sp_port_add_vid(struct net_device *dev,
992 return 0; 988 return 0;
993 989
994err_port_add_vid: 990err_port_add_vid:
995 mlxsw_sp_port_vid_learning_set(mlxsw_sp_vport, vid, true);
996err_port_vid_learning_set:
997 if (list_is_singular(&mlxsw_sp_port->vports_list)) 991 if (list_is_singular(&mlxsw_sp_port->vports_list))
998 mlxsw_sp_port_vlan_mode_trans(mlxsw_sp_port); 992 mlxsw_sp_port_vlan_mode_trans(mlxsw_sp_port);
999err_port_vp_mode_trans: 993err_port_vp_mode_trans:
@@ -1020,8 +1014,6 @@ static int mlxsw_sp_port_kill_vid(struct net_device *dev,
1020 1014
1021 mlxsw_sp_port_vlan_set(mlxsw_sp_vport, vid, vid, false, false); 1015 mlxsw_sp_port_vlan_set(mlxsw_sp_vport, vid, vid, false, false);
1022 1016
1023 mlxsw_sp_port_vid_learning_set(mlxsw_sp_vport, vid, true);
1024
1025 /* Drop FID reference. If this was the last reference the 1017 /* Drop FID reference. If this was the last reference the
1026 * resources will be freed. 1018 * resources will be freed.
1027 */ 1019 */