[PATCH] nvme-tcp: log TLS handshake failures at error level

Maurizio Lombardi mlombard at bsdbackstore.eu
Wed Jul 2 05:23:43 PDT 2025


On Wed Jul 2, 2025 at 1:34 PM CEST, Hannes Reinecke wrote:
> On 6/24/25 18:39, Maurizio Lombardi wrote:
>> 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 at redhat.com>
>> ---
>>   drivers/nvme/host/tcp.c | 8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
>> index d924008c3949..26d26823a0c5 100644
>> --- a/drivers/nvme/host/tcp.c
>> +++ b/drivers/nvme/host/tcp.c
>> @@ -1745,9 +1745,11 @@ 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);
>> +		}
>>   		ret = queue->tls_err;
>>   	}
>>   	return ret;
>
> There still is a value in knowing that tlshd is complete, so maybe
> something like


Ok thanks, will submit a V2.

Maurizio




More information about the Linux-nvme mailing list