Skip to contentSkip to conversation

net/smc and s390/ism: Improve log messages

PATCH In review Alexandra Winter 4 participants 9 messages Sep 1, 2025 – Sep 4, 2025

Subsystems (5)
lore
Share & tools
lore

Alexandra Winter

author maintainer
#0 lore raw

cover net/smc and s390/ism: Improve log messages

Separate these two improvements from the dibs layer series [1], as they are actually unrelated.

Alexandra Winter (2):
s390/ism: Log module load/unload
net/smc: Improve log message for devices w/o pnetid

 drivers/s390/net/ism_drv.c |  7 ++++++-
 net/smc/smc_ib.c           | 18 +++++++++++-------
 net/smc/smc_ism.c          | 13 +++++++++----
 3 files changed, 26 insertions(+), 12 deletions(-)
Signature · 1 line
2.48.1
author maintainer
#1 lore raw

PATCH 1/2 s390/ism: Log module load/unload

Add log messages to visualize timeline of module loads and unloads.

---
 drivers/s390/net/ism_drv.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/s390/net/ism_drv.c +6 -1
index 6cd60b174315..a543e59818bb 100644
@@ -718,8 +718,12 @@ static int __init ism_init(void)
 	debug_register_view(ism_debug_info, &debug_hex_ascii_view);
 	ret = pci_register_driver(&ism_driver);
 	if (ret)
-		debug_unregister(ism_debug_info);
+		goto err_dbg_unreg;
+	pr_info("module loaded\n");
+	return 0;
 
+err_dbg_unreg:
+	debug_unregister(ism_debug_info);
 	return ret;
 }
 
@@ -727,6 +731,7 @@ static void __exit ism_exit(void)
 {
 	pci_unregister_driver(&ism_driver);
 	debug_unregister(ism_debug_info);
+	pr_info("module unloaded\n");
 }
 
 module_init(ism_init);
Signature · 1 line
2.48.1
maintainer
#3 lore raw

Re: [PATCH net-next 1/2] s390/ism: Log module load/unload

In reply to Alexandra Winter
Quoted 1 line · On Mon, 1 Sep 2025 16:58:41 +0200 Alexandra Winter wrote:

Add log messages to visualize timeline of module loads and unloads.

How deeply do you care about this patch ? I understand the benefit when debugging "interface doesn't exist" issues with just logs at hand. OTOH seeing a litany of "hello" messages on every boot from built-in drivers, is rather annoying. Perhaps this being an s390 driver makes it a bit of a special case..

author maintainer
#4 lore raw

Re: [PATCH net-next 1/2] s390/ism: Log module load/unload

Quoted 8 lines · Jakub Kicinski
Quoted 1 line · On Mon, 1 Sep 2025 16:58:41 +0200 Alexandra Winter wrote:

Add log messages to visualize timeline of module loads and unloads.

How deeply do you care about this patch ? I understand the benefit when debugging "interface doesn't exist" issues with just logs at hand. OTOH seeing a litany of "hello" messages on every boot from built-in drivers, is rather annoying. Perhaps this being an s390 driver makes it a bit of a special case..

tl dr: I don't care very deeply

I think s390 users care a lot about debugability and are less concerned about log size. As you said, many other modules (on s390) have these 'hello' messages, so I kind of expected the ism module to show up as well. But if you want to reject it, we can live without it ;-)

maintainer
#5 lore raw

Re: [PATCH net-next 1/2] s390/ism: Log module load/unload

Quoted 10 lines · On Thu, 4 Sep 2025 09:16:27 +0200 Alexandra Winter wrote:
Quoted 8 lines · Jakub Kicinski
Quoted 1 line · On Mon, 1 Sep 2025 16:58:41 +0200 Alexandra Winter wrote:

Add log messages to visualize timeline of module loads and unloads.

How deeply do you care about this patch ? I understand the benefit when debugging "interface doesn't exist" issues with just logs at hand. OTOH seeing a litany of "hello" messages on every boot from built-in drivers, is rather annoying. Perhaps this being an s390 driver makes it a bit of a special case..

Quoted 6 lines

tl dr: I don't care very deeply

I think s390 users care a lot about debugability and are less concerned about log size. As you said, many other modules (on s390) have these 'hello' messages, so I kind of expected the ism module to show up as well. But if you want to reject it, we can live without it ;-)

Let me take only the second patch from the series, then. Thanks!

author maintainer
#6 lore raw

PATCH 2/2 net/smc: Improve log message for devices w/o pnetid

In reply to Alexandra Winter

Explicitly state in the log message, when a device has no pnetid. "with pnetid" and "has pnetid" was misleading for devices without pnetid.

---
 net/smc/smc_ib.c  | 18 +++++++++++-------
 net/smc/smc_ism.c | 13 +++++++++----
 2 files changed, 20 insertions(+), 11 deletions(-)
net/smc/smc_ib.c +11 -7
index 53828833a3f7..f2de12990b5b 100644
@@ -971,13 +971,17 @@ static int smc_ib_add_dev(struct ib_device *ibdev)
 					   smcibdev->pnetid[i]))
 			smc_pnetid_by_table_ib(smcibdev, i + 1);
 		smc_copy_netdev_ifindex(smcibdev, i);
-		pr_warn_ratelimited("smc:    ib device %s port %d has pnetid "
-				    "%.16s%s\n",
-				    smcibdev->ibdev->name, i + 1,
-				    smcibdev->pnetid[i],
-				    smcibdev->pnetid_by_user[i] ?
-				     " (user defined)" :
-				     "");
+		if (smc_pnet_is_pnetid_set(smcibdev->pnetid[i]))
+			pr_warn_ratelimited("smc:    ib device %s port %d has pnetid %.16s%s\n",
+					    smcibdev->ibdev->name, i + 1,
+					    smcibdev->pnetid[i],
+					    smcibdev->pnetid_by_user[i] ?
+						" (user defined)" :
+						"");
+		else
+			pr_warn_ratelimited("smc:    ib device %s port %d has no pnetid\n",
+					    smcibdev->ibdev->name, i + 1);
+
 	}
 	schedule_work(&smcibdev->port_event_work);
 	return 0;
net/smc/smc_ism.c +9 -4
index 84f98e18c7db..a58ffb7a0610 100644
@@ -518,10 +518,15 @@ static void smcd_register_dev(struct ism_dev *ism)
 	}
 	mutex_unlock(&smcd_dev_list.mutex);
 
-	pr_warn_ratelimited("smc: adding smcd device %s with pnetid %.16s%s\n",
-			    dev_name(&ism->dev), smcd->pnetid,
-			    smcd->pnetid_by_user ? " (user defined)" : "");
-
+	if (smc_pnet_is_pnetid_set(smcd->pnetid))
+		pr_warn_ratelimited("smc: adding smcd device %s with pnetid %.16s%s\n",
+				    dev_name(&ism->dev), smcd->pnetid,
+				    smcd->pnetid_by_user ?
+					" (user defined)" :
+					"");
+	else
+		pr_warn_ratelimited("smc: adding smcd device %s without pnetid\n",
+				    dev_name(&ism->dev));
 	return;
 }
 
Signature · 1 line
2.48.1
#8 lore raw
In reply to Alexandra Winter
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 1 Sep 2025 16:58:40 +0200 you wrote:

Separate these two improvements from the dibs layer series [1], as they are actually unrelated.

Alexandra Winter (2):
s390/ism: Log module load/unload
net/smc: Improve log message for devices w/o pnetid

[...]

Here is the summary with links:
- [net-next,1/2] s390/ism: Log module load/unload
(no matching commit)
- [net-next,2/2] net/smc: Improve log message for devices w/o pnetid

    https://git.kernel.org/netdev/net-next/c/c975e1dfcc92

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html