Thread (2 messages) flat view 2 messages, 2 authors, 2026-07-28
COLD30d REVIEWED: 1 (0M)

1 review trailer.

[PATCH net-next] net/mlx5e: Remove _once from PCI heuristic debug print

From: Tariq Toukan <tariqt@nvidia.com>
Date: 2026-07-23 08:18:18
Also in: linux-rdma, lkml
Subsystem: mellanox mlx5 core vpi driver, networking drivers, the rest · Maintainers: Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Gal Pressman <redacted>

The _once rate-limiting in slow_pci_heuristic() is unnecessary because
this function only runs during probe.

Worse, it interacts poorly with dynamic debug: if the first probe
happens before dynamic debug is enabled for this callsite, the _once
flag is permanently consumed and the message becomes unreachable without
reloading the module.
Additionally, only the first probed device values were printable in case
of multiple devices.

Replace with mlx5_core_dbg() which allows enabling the print via dynamic
debug at any time and observing it on the next probe.

Signed-off-by: Gal Pressman <redacted>
Reviewed-by: Alex Lazar <redacted>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
index 1f4a547917ba..5caf7820a136 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
@@ -545,8 +545,8 @@ bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
 
 	mlx5_port_max_linkspeed(mdev, &link_speed);
 	pci_bw = pcie_bandwidth_available(mdev->pdev, NULL, NULL, NULL);
-	mlx5_core_dbg_once(mdev, "Max link speed = %d, PCI BW = %d\n",
-			   link_speed, pci_bw);
+	mlx5_core_dbg(mdev, "Max link speed = %d, PCI BW = %d\n", link_speed,
+		      pci_bw);
 
 #define MLX5E_SLOW_PCI_RATIO (2)
 
base-commit: 1df10cef2d1e7f9f2fb7eddb67fc70d3abf101f9
-- 
2.44.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help