[Pkg-ofed-commits] [libfabric] 42/123: prov/psm: handle duplicated addresses in fi_av_insert

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Sat Oct 22 12:28:28 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 f142c850139ecd4ba74715837c1eb7801182d870
Author: Jianxin Xiong <jianxin.xiong at intel.com>
Date:   Tue Sep 8 15:17:32 2015 -0700

    prov/psm: handle duplicated addresses in fi_av_insert
    
    When psm_ep_connect is called with duplicated addresses, all but
    one will fail with error "Endpoint not reachable". Handle such
    case so that it behaves the same as "Already connected" instead.
    
    Signed-off-by: Jianxin Xiong <jianxin.xiong at intel.com>
---
 prov/psm/src/psmx_av.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/prov/psm/src/psmx_av.c b/prov/psm/src/psmx_av.c
index ffc8bb9..c5f01c3 100644
--- a/prov/psm/src/psmx_av.c
+++ b/prov/psm/src/psmx_av.c
@@ -186,6 +186,20 @@ static int psmx_av_insert(struct fid_av *av, const void *addr, size_t count,
 						((psm_epaddr_t *) fi_addr)[i]);
 		}
 		else {
+			psm_epconn_t epconn;
+
+			/* If duplicated addresses are passed to psm_ep_connect(), all but one will fail
+			 * with error "Endpoint could not be reached". They should be treated as already
+			 * connected.
+			 */
+			if (psm_ep_epid_lookup(((psm_epid_t *) addr)[i], &epconn) == PSM_OK) {
+				epaddr_context = psm_epaddr_getctxt(epconn.addr);
+				if (epaddr_context && epaddr_context->epid  == ((psm_epid_t *) addr)[i]) {
+					((psm_epaddr_t *) fi_addr)[i] = epconn.addr;
+					continue;
+				}
+			}
+
 			FI_INFO(&psmx_prov, FI_LOG_AV,
 				"%d: psm_ep_connect returned %s. remote epid=%lx.\n",
 				i, psm_error_get_string(errors[i]),

-- 
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