Skip to contentSkip to conversation

Patch "mlxsw: spectrum: Disable MAC learning for ovs port" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 31, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mlxsw: spectrum: Disable MAC learning for ovs port

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mlxsw-spectrum-disable-mac-learning-for-ovs-port.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Sun Dec 31 11:12:48 CET 2017

From: Yuval Mintz <[email protected]>
Date: Fri, 15 Dec 2017 08:44:21 +0100
Subject: mlxsw: spectrum: Disable MAC learning for ovs port

From: Yuval Mintz <[email protected]>

[ Upstream commit fccff0862838908d21eaf956d57e09c6c189f7c5 ]

Learning is currently enabled for ports which are OVS slaves - even though OVS doesn't need this indication.
Since we're not associating a fid with the port, HW would continuously notify driver of learned [& aged] MACs which would be logged as errors.

Fixes 2b94e58df58c ("mlxsw: spectrum: Allow ports to work under OVS master")
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +18 -0
@@ -4164,6 +4164,7 @@ static int mlxsw_sp_port_stp_set(struct
 
 static int mlxsw_sp_port_ovs_join(struct mlxsw_sp_port *mlxsw_sp_port)
 {
+	u16 vid = 1;
 	int err;
 
 	err = mlxsw_sp_port_vp_mode_set(mlxsw_sp_port, true);
@@ -4176,8 +4177,19 @@ static int mlxsw_sp_port_ovs_join(struct
 				     true, false);
 	if (err)
 		goto err_port_vlan_set;
+
+	for (; vid <= VLAN_N_VID - 1; vid++) {
+		err = mlxsw_sp_port_vid_learning_set(mlxsw_sp_port,
+						     vid, false);
+		if (err)
+			goto err_vid_learning_set;
+	}
+
 	return 0;
 
+err_vid_learning_set:
+	for (vid--; vid >= 1; vid--)
+		mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, true);
 err_port_vlan_set:
 	mlxsw_sp_port_stp_set(mlxsw_sp_port, false);
 err_port_stp_set:
@@ -4187,6 +4199,12 @@ err_port_stp_set:
 
 static void mlxsw_sp_port_ovs_leave(struct mlxsw_sp_port *mlxsw_sp_port)
 {
+	u16 vid;
+
+	for (vid = VLAN_N_VID - 1; vid >= 1; vid--)
+		mlxsw_sp_port_vid_learning_set(mlxsw_sp_port,
+					       vid, true);
+
 	mlxsw_sp_port_vlan_set(mlxsw_sp_port, 2, VLAN_N_VID - 1,
 			       false, false);
 	mlxsw_sp_port_stp_set(mlxsw_sp_port, false);

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/mlxsw-spectrum-disable-mac-learning-for-ovs-port.patch