public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH rdma-core] librdmacm: Print correct error message from rdma_getaddrinfo
Date: Thu, 9 Nov 2017 09:02:02 -0700	[thread overview]
Message-ID: <20171109160202.GH7063@ziepe.ca> (raw)
In-Reply-To: <20171109080424.4900-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

On Thu, Nov 09, 2017 at 10:04:24AM +0200, Yuval Shaia wrote:

>  	ret = get_rdma_addr(src_addr, dst_addr, port, &hints, &test.rai);
>  	if (ret) {
> -		printf("cmatose: getrdmaaddr error: %s\n", gai_strerror(ret));
> +		printf("cmatose: getrdmaaddr error: %s\n", errno ?
> +		       strerror(errno) : gai_strerror(ret));

No, you have to check for errno == EAI_SYSTEM

You probably also need to patch librdmacm to return EAI_SYSTEM when required.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2017-11-09 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09  8:04 [PATCH rdma-core] librdmacm: Print correct error message from rdma_getaddrinfo Yuval Shaia
     [not found] ` <20171109080424.4900-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-11-09 16:02   ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171109160202.GH7063@ziepe.ca \
    --to=jgg-uk2m96/98pc@public.gmane.org \
    --cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox