linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] nvme-tcp: log TLS handshake failures at error level
@ 2025-07-02 14:06 Maurizio Lombardi
  2025-07-02 16:17 ` Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maurizio Lombardi @ 2025-07-02 14:06 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, kbusch, sagi, hare, mlombard

Update the nvme_tcp_start_tls() function to use dev_err()
instead of dev_dbg() when a TLS error is detected.
This ensures that handshake failures are visible by default,
aiding in debugging.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---

 v2: Hans suggests to print a dev_dbg() message
     if handshake is succesfull

 drivers/nvme/host/tcp.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index d924008c3949..9233f088fac8 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1745,9 +1745,14 @@ static int nvme_tcp_start_tls(struct nvme_ctrl *nctrl,
 			qid, ret);
 		tls_handshake_cancel(queue->sock->sk);
 	} else {
-		dev_dbg(nctrl->device,
-			"queue %d: TLS handshake complete, error %d\n",
-			qid, queue->tls_err);
+		if (queue->tls_err) {
+			dev_err(nctrl->device,
+				"queue %d: TLS handshake complete, error %d\n",
+				qid, queue->tls_err);
+		} else {
+			dev_dbg(nctrl->device,
+				"queue %d: TLS handshake complete\n", qid);
+		}
 		ret = queue->tls_err;
 	}
 	return ret;
-- 
2.47.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-03 12:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 14:06 [PATCH V2] nvme-tcp: log TLS handshake failures at error level Maurizio Lombardi
2025-07-02 16:17 ` Hannes Reinecke
2025-07-02 18:17 ` Laurence Oberman
2025-07-03 11:43 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).