[PATCH 5/6] nvme-fabrics: Print network address if address resolution fails

Sagi Grimberg sagi at grimberg.me
Thu Oct 20 00:54:38 PDT 2016


>> Signed-off-by: Bart Van Assche <bart.vanassche at sandisk.com>
>> ---
>>  drivers/nvme/host/rdma.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
>> index 5a83881..9612ea0 100644
>> --- a/drivers/nvme/host/rdma.c
>> +++ b/drivers/nvme/host/rdma.c
>> @@ -568,14 +568,16 @@ static int nvme_rdma_init_queue(struct nvme_rdma_ctrl *ctrl,
>>  			NVME_RDMA_CONNECT_TIMEOUT_MS);
>>  	if (ret) {
>>  		dev_info(ctrl->ctrl.device,
>> -			"rdma_resolve_addr failed (%d).\n", ret);
>> +			 "rdma_resolve_addr(%pISpc) failed (%d).\n",
>> +			 &ctrl->addr, ret);
>>  		goto out_destroy_cm_id;
>>  	}
>>
>>  	ret = nvme_rdma_wait_for_cm(queue);
>>  	if (ret) {
>>  		dev_info(ctrl->ctrl.device,
>> -			"rdma_resolve_addr wait failed (%d).\n", ret);
>> +			 "rdma_resolve_addr(%pISpc) wait failed (%d).\n",
>> +			 &ctrl->addr, ret);
>
> Can you skip the indentation change?  Also once have the address how
> about:
>
> 		"Failed to resolve %pISpc (instant), error %d).\n"
>
> 		"Failed to resolve %pISpc (wait), error %d.\n"

failure is nvme_rdma_wait_for_cm() does not necessarily means that
a resolution failed, but the connection establishment failed.

Maybe:
		"Failed to connect %pISpc, error %d.\n"

?

Other than that, looks fine,

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>



More information about the Linux-nvme mailing list