[PATCH rfc 2/6] nvme-tcp: use nvmf_resolve_address helper

Hannes Reinecke hare at suse.de
Thu Aug 10 06:30:19 PDT 2023


On 7/24/23 11:20, Sagi Grimberg wrote:
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>   drivers/nvme/host/tcp.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 3e7dd6f91832..a47b597ace3e 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -2537,8 +2537,7 @@ static struct nvme_ctrl *nvme_tcp_create_ctrl(struct device *dev,
>   		opts->mask |= NVMF_OPT_TRSVCID;
>   	}
>   
> -	ret = inet_pton_with_scope(&init_net, AF_UNSPEC,
> -			opts->traddr, opts->trsvcid, &ctrl->addr);
> +	ret = nvmf_resolve_ip_address(opts, &ctrl->addr);
>   	if (ret) {
>   		pr_err("malformed address passed: %s:%s\n",
>   			opts->traddr, opts->trsvcid);

Merge with the first patch?
Otherwise okay.

Cheers,

Hannes




More information about the Linux-nvme mailing list