[Pkg-ofed-commits] [libfabric] 15/123: prov/verbs: Make fi_getinfo return -FI_ENODATA for errors which aren't fatal.

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Sat Oct 22 12:28:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

ana pushed a commit to annotated tag v1.1.1
in repository libfabric.

commit f573914a1521362b104061904585bd27cd50247b
Author: Arun C Ilango <arun.ilango at intel.com>
Date:   Thu Aug 27 13:55:47 2015 -0700

    prov/verbs: Make fi_getinfo return -FI_ENODATA for errors which aren't fatal.
    
    Signed-off-by: Arun C Ilango <arun.ilango at intel.com>
---
 prov/verbs/src/fi_verbs.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/prov/verbs/src/fi_verbs.c b/prov/verbs/src/fi_verbs.c
index 7d5970a..48785c9 100644
--- a/prov/verbs/src/fi_verbs.c
+++ b/prov/verbs/src/fi_verbs.c
@@ -1090,26 +1090,30 @@ static int fi_ibv_getinfo(uint32_t version, const char *node, const char *servic
 
 	ret = fi_ibv_init_info();
 	if (ret)
-		return ret;
+		goto err1;
 
 	ret = fi_ibv_create_ep(node, service, flags, hints, &rai, &id);
 	if (ret)
-		return ret;
+		goto err1;
 
 	check_info = id->verbs ? fi_ibv_search_verbs_info(NULL,
 			ibv_get_device_name(id->verbs->device)) : verbs_info;
 
 	if (!check_info) {
 		ret = -FI_ENODATA;
-		goto err;
+		goto err2;
 	}
 
 	ret = fi_ibv_get_matching_info(check_info, hints, rai, info);
 
-err:
+err2:
 	rdma_destroy_ep(id);
 	rdma_freeaddrinfo(rai);
-	return ret;
+err1:
+	if (!ret || ret == -FI_ENOMEM)
+		return ret;
+	else
+		return -FI_ENODATA;
 }
 
 static int fi_ibv_msg_ep_create_qp(struct fi_ibv_msg_ep *ep)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/libfabric.git



More information about the Pkg-ofed-commits mailing list