From bdb8f438fba689857771c63d78b89f5969981bc9 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Fri, 28 Jun 2013 16:04:39 -0700 Subject: [PATCH] Refresh of addrpre --- src/acm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/acm.c b/src/acm.c index 97e6351..4a9f7b2 100644 --- a/src/acm.c +++ b/src/acm.c @@ -2832,11 +2832,11 @@ static void acm_parse_hosts_file(struct acm_ep *ep) acm_log(0, "ERROR - %s is not IB GID\n", gid); continue; } - if (inet_pton(AF_INET, addr, &ip_addr) > 0) + if (inet_pton(AF_INET, addr, &ip_addr) > 0) { addr_type = ACM_ADDRESS_IP; - else if (inet_pton(AF_INET6, addr, &ip_addr) > 0) + } else if (inet_pton(AF_INET6, addr, &ip_addr) > 0) { addr_type = ACM_ADDRESS_IP6; - else { + } else { acm_log(0, "ERROR - %s is not IP address\n", addr); continue; } @@ -2860,6 +2860,12 @@ static void acm_parse_hosts_file(struct acm_ep *ep) dest->state = ACM_READY; acm_put_dest(gid_dest); } else { + memcpy(dest->path.dgid, &ib_addr, 16); + //ibv_query_gid(ep->port->dev->verbs, ep->port->port_num, + // 0, &dest->path.sgid); + dest->path.slid = htons(ep->port->lid); + dest->path.reversible_numpath = IBV_PATH_RECORD_REVERSIBLE; + dest->path.pkey = htons(ep->pkey); dest->state = ACM_ADDR_RESOLVED; } @@ -2955,7 +2961,7 @@ static void acm_ep_preload(struct acm_ep *ep) acm_log(0, "ERROR - failed to preload EP\n"); break; default: - return; + break; } switch (addr_preload) { -- 2.46.0