Skip to contentSkip to conversation

IB/mlx5: avoid excessive warning msgs when creating VFs on 2nd port

PATCH Applied Qing Huang 3 participants 3 messages Jul 23, 2018 – Jul 26, 2018

Subsystems (2)
lore
Share & tools
lore

Qing Huang

author
#0 lore raw

PATCH v2 1/1 IB/mlx5: avoid excessive warning msgs when creating VFs on 2nd port

When a CX5 device is configured in dual-port RoCE mode, after creating many VFs against port 1, creating the same number of VFs against port 2 will flood kernel/syslog with something like "mlx5_*:mlx5_ib_bind_slave_port:4266:(pid 5269): port 2 already affiliated."

So basically, when traversing mlx5_ib_dev_list, mlx5_ib_add_slave_port() repeatedly attempts to bind the new mpi structure to every device on the list until it finds an unbound device.

Change the log level from warn to dbg to avoid log flooding as the warning should be harmless.

---
v1 -> v2: change the log level instead

 drivers/infiniband/hw/mlx5/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx5/main.c +2 -2
index b3ba9a2..f57b8f7 100644
@@ -5127,8 +5127,8 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev,
 
 	spin_lock(&ibdev->port[port_num].mp.mpi_lock);
 	if (ibdev->port[port_num].mp.mpi) {
-		mlx5_ib_warn(ibdev, "port %d already affiliated.\n",
-			     port_num + 1);
+		mlx5_ib_dbg(ibdev, "port %d already affiliated.\n",
+			    port_num + 1);
 		spin_unlock(&ibdev->port[port_num].mp.mpi_lock);
 		return false;
 	}
Signature · 1 line
2.9.3
Reviewed-by on v2 1/1
#1 lore raw
Quoted 25 lines · Qing Huang

When a CX5 device is configured in dual-port RoCE mode, after creating many VFs against port 1, creating the same number of VFs against port 2 will flood kernel/syslog with something like "mlx5_*:mlx5_ib_bind_slave_port:4266:(pid 5269): port 2 already affiliated."

So basically, when traversing mlx5_ib_dev_list, mlx5_ib_add_slave_port() repeatedly attempts to bind the new mpi structure to every device on the list until it finds an unbound device.

Change the log level from warn to dbg to avoid log flooding as the warning should be harmless.

---
v1 -> v2: change the log level instead

 drivers/infiniband/hw/mlx5/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx5/main.c +0 -0
index b3ba9a2..f57b8f7 100644

drivers/infiniband/hw/mlx5/main.c static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev, · line 5134

Quoted 10 lines
drivers/infiniband/hw/mlx5/main.c +2 -2
@@ -5127,8 +5127,8 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev,
 
 	spin_lock(&ibdev->port[port_num].mp.mpi_lock);
 	if (ibdev->port[port_num].mp.mpi) {
-		mlx5_ib_warn(ibdev, "port %d already affiliated.\n",
-			     port_num + 1);
+		mlx5_ib_dbg(ibdev, "port %d already affiliated.\n",
+			    port_num + 1);
 		spin_unlock(&ibdev->port[port_num].mp.mpi_lock);
 		return false;
 	}
#2 lore raw
In reply to Qing Huang
Quoted 10 lines · Qing Huang

When a CX5 device is configured in dual-port RoCE mode, after creating many VFs against port 1, creating the same number of VFs against port 2 will flood kernel/syslog with something like "mlx5_*:mlx5_ib_bind_slave_port:4266:(pid 5269): port 2 already affiliated."

So basically, when traversing mlx5_ib_dev_list, mlx5_ib_add_slave_port() repeatedly attempts to bind the new mpi structure to every device on the list until it finds an unbound device.

Quoted 7 lines

Change the log level from warn to dbg to avoid log flooding as the warning should be harmless.

---
v1 -> v2: change the log level instead

Applied to for-next

Thanks,
Jason