Skip to contentSkip to conversation

nvme-rdma, nvme-tcp: include max reconnects for failed reconnect logging

PATCH Superseded Tokunori Ikegami 2 participants 3 messages May 5, 2024 NVMe

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-rdma, nvme-tcp: include max reconnects for failed reconnect logging

Makes clear max reconnects translated by ctrl loss tmo and reconnect delay.

---
 drivers/nvme/host/rdma.c | 4 ++--
 drivers/nvme/host/tcp.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/nvme/host/rdma.c +2 -2
index 366f0bb4ebfc..fc33f16f9f0e 100644
@@ -1118,8 +1118,8 @@ static void nvme_rdma_reconnect_ctrl_work(struct work_struct *work)
 	return;
 
 requeue:
-	dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d\n",
-			ctrl->ctrl.nr_reconnects);
+	dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d of %d\n",
+		 ctrl->ctrl.nr_reconnects, ctrl->ctrl.opts->max_reconnects);
 	nvme_rdma_reconnect_or_remove(ctrl);
 }
 
drivers/nvme/host/tcp.c +2 -2
index 28bc2f373cfa..4c4c363d2025 100644
@@ -2272,8 +2272,8 @@ static void nvme_tcp_reconnect_ctrl_work(struct work_struct *work)
 	return;
 
 requeue:
-	dev_info(ctrl->device, "Failed reconnect attempt %d\n",
-			ctrl->nr_reconnects);
+	dev_info(ctrl->device, "Failed reconnect attempt %d of %d\n",
+		 ctrl->nr_reconnects, ctrl->opts->max_reconnects);
 	nvme_tcp_reconnect_or_remove(ctrl);
 }
 
Signature · 1 line
2.43.0
maintainer
#1 lore raw

drivers/nvme/host/rdma.c static void nvme_rdma_reconnect_ctrl_work(struct work_struct *work) · line 1122

Quoted 5 lines

requeue:

drivers/nvme/host/rdma.c +2 -2
-	dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d\n",
-			ctrl->ctrl.nr_reconnects);
+	dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d of %d\n",
+		 ctrl->ctrl.nr_reconnects, ctrl->ctrl.opts->max_reconnects);

How about we do:
"Failed reconnect attempt %d/%d\n"

And the same for the successful reconnect:
"Successfully reconnected (attempt %d/%d)\n"

#2 lore raw
Quoted 11 lines · Sagi Grimberg
Quoted 5 lines

  requeue:
-    dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d\n", -            ctrl->ctrl.nr_reconnects);
+    dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d of %d\n", +         ctrl->ctrl.nr_reconnects, ctrl->ctrl.opts->max_reconnects);

How about we do:
"Failed reconnect attempt %d/%d\n"

And the same for the successful reconnect:
"Successfully reconnected (attempt %d/%d)\n"

Thanks for your suggestion. Looks good so just sent the version 2 patch as mentioned.