Skip to contentSkip to conversation

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

PATCH Applied Tokunori Ikegami 2 participants 2 messages May 5, 2024 – May 7, 2024 NVMe

lore
Share & tools
lore
#0 lore raw

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

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

---
Changes since v1:
- Change the kernel message as "Failed reconnect attempt %d/%d\n".
- Change the same for the successful reconnect.

 drivers/nvme/host/rdma.c | 4 ++--
 drivers/nvme/host/tcp.c  | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/nvme/host/rdma.c +2 -2
index 366f0bb4ebfc..ea2fb7b47ad5 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/%d\n",
+		 ctrl->ctrl.nr_reconnects, ctrl->ctrl.opts->max_reconnects);
 	nvme_rdma_reconnect_or_remove(ctrl);
 }
 
drivers/nvme/host/tcp.c +4 -4
index 28bc2f373cfa..24be1b5fbb02 100644
@@ -2264,16 +2264,16 @@ static void nvme_tcp_reconnect_ctrl_work(struct work_struct *work)
 	if (nvme_tcp_setup_ctrl(ctrl, false))
 		goto requeue;
 
-	dev_info(ctrl->device, "Successfully reconnected (%d attempt)\n",
-			ctrl->nr_reconnects);
+	dev_info(ctrl->device, "Successfully reconnected (attempt %d/%d)\n",
+		 ctrl->nr_reconnects, ctrl->opts->max_reconnects);
 
 	ctrl->nr_reconnects = 0;
 
 	return;
 
 requeue:
-	dev_info(ctrl->device, "Failed reconnect attempt %d\n",
-			ctrl->nr_reconnects);
+	dev_info(ctrl->device, "Failed reconnect attempt %d/%d\n",
+		 ctrl->nr_reconnects, ctrl->opts->max_reconnects);
 	nvme_tcp_reconnect_or_remove(ctrl);
 }
 
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Tokunori Ikegami

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

Thanks, applied to nvme-6.10 with a minor merge conflict fix folded in.