Skip to contentSkip to conversation

linux-next: manual merge of the net-next tree with the net tree

DISCUSSION Stephen Rothwell 3 participants 4 messages Jan 12, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c

between commit:

366ce6031529 ("mlxsw: spectrum: Add FDB lock to prevent session interleaving")

from the net tree and commit:

54a732018d8e ("mlxsw: spectrum: Adjust switchdev ops for VLAN devices")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 23 lines
Cheers,
Stephen Rothwell                    [email protected]

diff --cc drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 80e266063aee,4cdc18e72222..000000000000
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@@ -650,7 -1057,14 +1057,15 @@@ static int mlxsw_sp_port_fdb_dump(struc
  	if (!sfd_pl)
  		return -ENOMEM;
  
 +	mutex_lock(&mlxsw_sp_port->mlxsw_sp->fdb_lock);
+ 	if (mlxsw_sp_port_is_vport(mlxsw_sp_port)) {
+ 		u16 tmp;
+ 
+ 		tmp = mlxsw_sp_vport_vfid_get(mlxsw_sp_port);
+ 		vport_fid = mlxsw_sp_vfid_to_fid(tmp);
+ 		vport_vid = mlxsw_sp_vport_vid_get(mlxsw_sp_port);
+ 	}
+ 
  	mlxsw_reg_sfd_pack(sfd_pl, MLXSW_REG_SFD_OP_QUERY_DUMP, 0);
  	do {
  		mlxsw_reg_sfd_num_rec_set(sfd_pl, MLXSW_REG_SFD_REC_MAX_COUNT);
#1 lore raw

Tue, Jan 12, 2016 at 04:15:05AM IST, [email protected] wrote:

Hi Stephen,

Quoted 28 lines

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c

between commit:

366ce6031529 ("mlxsw: spectrum: Add FDB lock to prevent session interleaving")

from the net tree and commit:

54a732018d8e ("mlxsw: spectrum: Adjust switchdev ops for VLAN devices")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +0 -0
diff --cc drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 80e266063aee,4cdc18e72222..000000000000

drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c

Quoted 4 lines
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +1 -0
@@@ -650,7 -1057,14 +1057,15 @@@ static int mlxsw_sp_port_fdb_dump(struc
 	if (!sfd_pl)
 		return -ENOMEM;
 
+	mutex_lock(&mlxsw_sp_port->mlxsw_sp->fdb_lock);

The lock can be moved further down, just before mlxsw_reg_sfd_pack. Other than that everything looks fine. Thank you!

Quoted 11 lines
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +8 -0
+ 	if (mlxsw_sp_port_is_vport(mlxsw_sp_port)) {
+ 		u16 tmp;
+ 
+ 		tmp = mlxsw_sp_vport_vfid_get(mlxsw_sp_port);
+ 		vport_fid = mlxsw_sp_vfid_to_fid(tmp);
+ 		vport_vid = mlxsw_sp_vport_vid_get(mlxsw_sp_port);
+ 	}
+ 
 	mlxsw_reg_sfd_pack(sfd_pl, MLXSW_REG_SFD_OP_QUERY_DUMP, 0);
 	do {
 		mlxsw_reg_sfd_num_rec_set(sfd_pl, MLXSW_REG_SFD_REC_MAX_COUNT);
#2 lore raw

Hi Ido,

Quoted 3 lines · On Tue, 12 Jan 2016 11:11:02 +0200 Ido Schimmel <[email protected]> wrote:

The lock can be moved further down, just before mlxsw_reg_sfd_pack. Other than that everything looks fine. Thank you!

Thanks, I wasn't sure but I will do that tomorrow (unless Dave beats me to it).

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
maintainer
#3 lore raw

From: Stephen Rothwell <[email protected]>
Date: Tue, 12 Jan 2016 22:58:11 +1100

Quoted 8 lines

Hi Ido,

Quoted 3 lines · On Tue, 12 Jan 2016 11:11:02 +0200 Ido Schimmel <[email protected]> wrote:

The lock can be moved further down, just before mlxsw_reg_sfd_pack. Other than that everything looks fine. Thank you!

Thanks, I wasn't sure but I will do that tomorrow (unless Dave beats me to it).

I did the merge but did not move the locking. Feel free to send me a patch to do so.