Version: 1
-Previous: 21bba68894320befa284f914c2fb56134510e157
+Previous: 0c00976adbb7cd1910089a98408332ac17aa4eb8
Head: a5f2345a60570ce44882ab083f5dcfc6fc60792e
Applied:
lmc: b355854c79a1e446e87684a41663ad5aae258b73
- xref-lid: a5f2345a60570ce44882ab083f5dcfc6fc60792e
+ lid: a5f2345a60570ce44882ab083f5dcfc6fc60792e
Unapplied:
ibacm-check-for-nodelay-on-pat: 1540687d721504ec1810aac7cc53ec7272415eb9
Hidden:
--- /dev/null
+Bottom: b2af32a606dc3c3e64f150250320dc7d52426926
+Top: a15744a4e313a55d0b2bac2e14be1aed79ec75f5
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2010-12-13 10:35:40 -0800
+
+ibacm: add support for path lookup by LID/GID
+
+Support caching path data by LID/GID. We limit data
+to one path per DLID/DGID.
+
+Signed-off-by: Sean Hefty <sean.hefty@intel.com>
+
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index e0f0b94..5da4044 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -268,8 +268,13 @@ acm_format_name(int level, char *name, size_t name_size,
+ break;
+ case ACM_EP_INFO_PATH:
+ path = (struct ibv_path_record *) addr;
+- sprintf(name, "SLID(%d) DLID(%d)",
+- ntohs(path->slid), ntohs(path->dlid));
++ if (path->dlid) {
++ sprintf(name, "SLID(%d) DLID(%d)",
++ ntohs(path->slid), ntohs(path->dlid));
++ } else {
++ acm_format_name(level, name, name_size, ACM_ADDRESS_GID,
++ &path->dgid, sizeof path->dgid);
++ }
+ break;
+ case ACM_ADDRESS_LID:
+ sprintf(name, "LID(%d)", *((uint16_t *) addr));
+@@ -280,6 +285,11 @@ acm_format_name(int level, char *name, size_t name_size,
+ }
+ }
+
++static int ib_gid_any(union ibv_gid *gid)
++{
++ return ((gid->subnet_prefix | gid->interface_id) == 0);
++}
++
+ static int acm_compare_dest(const void *dest1, const void *dest2)
+ {
+ return memcmp(dest1, dest2, ACM_MAX_ADDRESS);
+@@ -726,9 +736,23 @@ static int acm_addr_index(struct acm_ep *ep, uint8_t *addr, uint8_t addr_type)
+ static uint8_t
+ acm_record_acm_route(struct acm_ep *ep, struct acm_dest *dest)
+ {
++ int i;
+ uint8_t status;
+
+ acm_log(2, "\n");
++ for (i = 0; i < MAX_EP_ADDR; i++) {
++ if (dest->mgid == ep->mc_dest[i].mgid)
++ break;
++ }
++ if (i == MAX_EP_ADDR) {
++ acm_log(0, "ERROR - cannot match mgid\n");
++ return ACM_STATUS_EINVAL;
++ }
++
++ dest->path = ep->mc_dest[i].path;
++ dest->path.dgid = dest->av.grh.dgid;
++ dest->path.dlid = htons(dest->av.dlid);
++
+ dest->ah = ibv_create_ah(ep->port->dev->pd, &dest->av);
+ if (!dest->ah) {
+ acm_log(0, "ERROR - failed to create ah\n");
+@@ -775,8 +799,7 @@ static uint8_t acm_resolve_path(struct acm_ep *ep, struct acm_dest *dest,
+ acm_init_path_query(mad);
+
+ memcpy(mad->data, &dest->path, sizeof(dest->path));
+- mad->comp_mask = IB_COMP_MASK_PR_DGID | IB_COMP_MASK_PR_SGID |
+- IB_COMP_MASK_PR_TCLASS | IB_COMP_MASK_PR_PKEY;
++ mad->comp_mask = acm_path_comp_mask(&dest->path);
+
+ dest->state = ACM_QUERY_ROUTE;
+ acm_post_send(&ep->sa_queue, msg);
+@@ -804,16 +827,29 @@ acm_record_acm_addr(struct acm_ep *ep, struct acm_dest *dest, struct ibv_wc *wc,
+ dest->av.grh.dgid = ((struct ibv_grh *) (uintptr_t) wc->wr_id)->sgid;
+
+ dest->mgid = ep->mc_dest[index].mgid;
+-
+- dest->path = ep->mc_dest[index].path;
++ dest->path.sgid = ep->mc_dest[index].path.sgid;
+ dest->path.dgid = dest->av.grh.dgid;
+- dest->path.dlid = htons(dest->av.dlid);
++ dest->path.tclass = ep->mc_dest[index].path.tclass;
++ dest->path.pkey = ep->mc_dest[index].path.pkey;
+ dest->remote_qpn = wc->src_qp;
+
+ dest->state = ACM_ADDR_RESOLVED;
+ return ACM_STATUS_SUCCESS;
+ }
+
++static void
++acm_record_path_addr(struct acm_ep *ep, struct acm_dest *dest,
++ struct ibv_path_record *path)
++{
++ acm_log(2, "%s\n", dest->name);
++ dest->path.pkey = htons(ep->pkey);
++ dest->path.sgid = path->sgid;
++ dest->path.dgid = path->dgid;
++ dest->path.slid = path->slid;
++ dest->path.dlid = path->dlid;
++ dest->state = ACM_ADDR_RESOLVED;
++}
++
+ static uint8_t acm_validate_addr_req(struct acm_mad *mad)
+ {
+ struct acm_resolve_rec *rec;
+@@ -959,10 +995,12 @@ acm_dest_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *ma
+ if (!status) {
+ memcpy(&dest->path, sa_mad->data, sizeof(dest->path));
+ acm_init_path_av(msg->ep->port, dest);
+- dest->ah = ibv_create_ah(msg->ep->port->dev->pd, &dest->av);
+- if (!dest->ah) {
+- acm_log(0, "ERROR - failed to create ah\n");
+- status = ACM_STATUS_ENOMEM;
++ if (dest->remote_qpn) {
++ dest->ah = ibv_create_ah(msg->ep->port->dev->pd, &dest->av);
++ if (!dest->ah) {
++ acm_log(0, "ERROR - failed to create ah\n");
++ status = ACM_STATUS_ENOMEM;
++ }
+ }
+ }
+ if (!status) {
+@@ -1313,9 +1351,9 @@ static uint64_t acm_path_comp_mask(struct ibv_path_record *path)
+ acm_log(2, "\n");
+ if (path->service_id)
+ comp_mask |= IB_COMP_MASK_PR_SERVICE_ID;
+- if (path->dgid.global.interface_id || path->dgid.global.subnet_prefix)
++ if (!ib_any_gid(&path->dgid))
+ comp_mask |= IB_COMP_MASK_PR_DGID;
+- if (path->sgid.global.interface_id || path->sgid.global.subnet_prefix)
++ if (!ib_any_gid(&path->sgid))
+ comp_mask |= IB_COMP_MASK_PR_SGID;
+ if (path->dlid)
+ comp_mask |= IB_COMP_MASK_PR_DLID;
+@@ -1708,6 +1746,15 @@ static uint8_t acm_svr_query_sa(struct acm_ep *ep, struct acm_request *req)
+ return ACM_STATUS_SUCCESS;
+ }
+
++static int
++acm_is_path_from_port(struct acm_port *port, struct ibv_path_record *path)
++{
++ if (ib_any_gid(&path->sgid)) {
++ return (port->lid == (ntohs(path.slid) & port->lid_mask));
++ }
++ return (acm_gid_index(port, &path->sgid) < port->gid_cnt);
++}
++
+ static struct acm_ep *
+ acm_get_ep(struct acm_ep_addr_data *data)
+ {
+@@ -1728,7 +1775,7 @@ acm_get_ep(struct acm_ep_addr_data *data)
+ port = &dev->port[i];
+
+ if (data->type == ACM_EP_INFO_PATH &&
+- port->lid != ntohs(data->info.path.slid))
++ !acm_is_path_from_port(port, &data->info.path))
+ continue;
+
+ for (ep_entry = port->ep_list.Next; ep_entry != &port->ep_list;
+@@ -1738,8 +1785,10 @@ acm_get_ep(struct acm_ep_addr_data *data)
+ if (ep->state != ACM_READY)
+ continue;
+
+- if (data->type == ACM_EP_INFO_PATH)
+- return ep; // TODO: check pkey
++ if ((data->type == ACM_EP_INFO_PATH) &&
++ (!data->info.path.pkey ||
++ (ntohs(data->info.path.pkey) == ep->pkey)))
++ return ep;
+
+ if (acm_addr_index(ep, data->info.addr,
+ (uint8_t) data->type) >= 0)
+@@ -1768,12 +1817,6 @@ acm_svr_query(struct acm_client *client, struct acm_resolve_msg *msg)
+ goto resp;
+ }
+
+- if (msg->data[0].type != ACM_EP_INFO_PATH) {
+- acm_log(0, "ERROR - unsupported type: 0x%x\n", msg->data[0].type);
+- status = ACM_STATUS_EINVAL;
+- goto resp;
+- }
+-
+ ep = acm_get_ep(&msg->data[0]);
+ if (!ep) {
+ acm_log(1, "notice - could not find local end point\n");
+@@ -2060,6 +2103,88 @@ put:
+ return ret;
+ }
+
++static int
++acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
++{
++ struct acm_ep *ep;
++ struct acm_dest *dest;
++ struct ibv_path_record *path;
++ uint8_t addr[ACM_MAX_ADDRESS];
++ uint8_t status;
++ int ret;
++
++ acm_log(2, "client %d\n", client->index);
++ if (msg->hdr.length < (ACM_MSG_HDR_LENGTH + ACM_MSG_EP_LENGTH)) {
++ acm_log(0, "notice - invalid msg hdr length %d\n", msg->hdr.length);
++ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EINVAL);
++ }
++
++ path = &msg->data[0].info.path;
++ if (!path->dlid && ib_any_gid(&path->dgid)) {
++ acm_log(0, "notice - no destination specified\n");
++ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EDESTADDR);
++ }
++
++ acm_format_name(2, log_data, sizeof log_data,
++ ACM_EP_INFO_PATH, path, sizeof *path);
++ acm_log(2, "path %s\n", log_data);
++ ep = acm_get_ep(&msg->data[0]);
++ if (!ep) {
++ acm_log(0, "notice - unknown local end point\n");
++ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ESRCADDR);
++ }
++
++ memset(addr, 0, sizeof addr);
++ if (path->dlid) {
++ * ((uint16_t *) addr) = path->dlid;
++ dest = acm_acquire_dest(ep, ACM_ADDRESS_LID, addr);
++ } else {
++ memcpy(addr, &path->dgid, sizeof path->dgid);
++ dest = acm_acquire_dest(ep, ACM_ADDRESS_GID, addr);
++ }
++ if (!dest) {
++ acm_log(0, "ERROR - unable to allocate destination in client request\n");
++ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ENOMEM);
++ }
++
++ lock_acquire(&dest->lock);
++ switch (dest->state) {
++ case ACM_READY:
++ acm_log(2, "request satisfied from local cache\n");
++ status = ACM_STATUS_SUCCESS;
++ break;
++ case ACM_INIT:
++ acm_log(2, "have path, bypassing address resolution");
++ acm_record_path_addr(ep, dest, path);
++ /* fall through */
++ case ACM_ADDR_RESOLVED:
++ acm_log(2, "have address, resolving route\n");
++ status = acm_resolve_path(ep, dest, acm_dest_sa_resp);
++ if (status) {
++ break;
++ }
++ /* fall through */
++ default:
++ if (msg->data[0].flags & ACM_FLAGS_NODELAY) {
++ acm_log(2, "lookup initiated, but client wants no delay\n");
++ status = ACM_STATUS_ENODATA;
++ break;
++ }
++ status = acm_svr_queue_req(dest, client, msg);
++ if (status) {
++ break;
++ }
++ ret = 0;
++ lock_release(&dest->lock);
++ goto put;
++ }
++ lock_release(&dest->lock);
++ ret = acm_client_resolve_resp(client, msg, dest, status);
++put:
++ acm_put_dest(dest);
++ return ret;
++}
++
+ static void acm_svr_receive(struct acm_client *client)
+ {
+ struct acm_msg msg;
+@@ -2085,7 +2210,11 @@ static void acm_svr_receive(struct acm_client *client)
+ }
+
+ if (resolve_msg->data[0].type == ACM_EP_INFO_PATH) {
+- ret = acm_svr_query(client, resolve_msg);
++ if (resolve_msg->data[0].flags & ACM_FLAGS_QUERY_SA) {
++ ret = acm_svr_query(client, resolve_msg);
++ } else {
++ ret = acm_svr_resolve_path(client, resolve_msg);
++ }
+ } else {
+ ret = acm_svr_resolve(client, resolve_msg);
+ }
+++ /dev/null
-Bottom: b2af32a606dc3c3e64f150250320dc7d52426926
-Top: a15744a4e313a55d0b2bac2e14be1aed79ec75f5
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2010-12-13 10:35:40 -0800
-
-ibacm: add support for path lookup by LID/GID
-
-Support caching path data by LID/GID. We limit data
-to one path per DLID/DGID.
-
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-diff --git a/src/acm.c b/src/acm.c
-index e0f0b94..5da4044 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -268,8 +268,13 @@ acm_format_name(int level, char *name, size_t name_size,
- break;
- case ACM_EP_INFO_PATH:
- path = (struct ibv_path_record *) addr;
-- sprintf(name, "SLID(%d) DLID(%d)",
-- ntohs(path->slid), ntohs(path->dlid));
-+ if (path->dlid) {
-+ sprintf(name, "SLID(%d) DLID(%d)",
-+ ntohs(path->slid), ntohs(path->dlid));
-+ } else {
-+ acm_format_name(level, name, name_size, ACM_ADDRESS_GID,
-+ &path->dgid, sizeof path->dgid);
-+ }
- break;
- case ACM_ADDRESS_LID:
- sprintf(name, "LID(%d)", *((uint16_t *) addr));
-@@ -280,6 +285,11 @@ acm_format_name(int level, char *name, size_t name_size,
- }
- }
-
-+static int ib_gid_any(union ibv_gid *gid)
-+{
-+ return ((gid->subnet_prefix | gid->interface_id) == 0);
-+}
-+
- static int acm_compare_dest(const void *dest1, const void *dest2)
- {
- return memcmp(dest1, dest2, ACM_MAX_ADDRESS);
-@@ -726,9 +736,23 @@ static int acm_addr_index(struct acm_ep *ep, uint8_t *addr, uint8_t addr_type)
- static uint8_t
- acm_record_acm_route(struct acm_ep *ep, struct acm_dest *dest)
- {
-+ int i;
- uint8_t status;
-
- acm_log(2, "\n");
-+ for (i = 0; i < MAX_EP_ADDR; i++) {
-+ if (dest->mgid == ep->mc_dest[i].mgid)
-+ break;
-+ }
-+ if (i == MAX_EP_ADDR) {
-+ acm_log(0, "ERROR - cannot match mgid\n");
-+ return ACM_STATUS_EINVAL;
-+ }
-+
-+ dest->path = ep->mc_dest[i].path;
-+ dest->path.dgid = dest->av.grh.dgid;
-+ dest->path.dlid = htons(dest->av.dlid);
-+
- dest->ah = ibv_create_ah(ep->port->dev->pd, &dest->av);
- if (!dest->ah) {
- acm_log(0, "ERROR - failed to create ah\n");
-@@ -775,8 +799,7 @@ static uint8_t acm_resolve_path(struct acm_ep *ep, struct acm_dest *dest,
- acm_init_path_query(mad);
-
- memcpy(mad->data, &dest->path, sizeof(dest->path));
-- mad->comp_mask = IB_COMP_MASK_PR_DGID | IB_COMP_MASK_PR_SGID |
-- IB_COMP_MASK_PR_TCLASS | IB_COMP_MASK_PR_PKEY;
-+ mad->comp_mask = acm_path_comp_mask(&dest->path);
-
- dest->state = ACM_QUERY_ROUTE;
- acm_post_send(&ep->sa_queue, msg);
-@@ -804,16 +827,29 @@ acm_record_acm_addr(struct acm_ep *ep, struct acm_dest *dest, struct ibv_wc *wc,
- dest->av.grh.dgid = ((struct ibv_grh *) (uintptr_t) wc->wr_id)->sgid;
-
- dest->mgid = ep->mc_dest[index].mgid;
--
-- dest->path = ep->mc_dest[index].path;
-+ dest->path.sgid = ep->mc_dest[index].path.sgid;
- dest->path.dgid = dest->av.grh.dgid;
-- dest->path.dlid = htons(dest->av.dlid);
-+ dest->path.tclass = ep->mc_dest[index].path.tclass;
-+ dest->path.pkey = ep->mc_dest[index].path.pkey;
- dest->remote_qpn = wc->src_qp;
-
- dest->state = ACM_ADDR_RESOLVED;
- return ACM_STATUS_SUCCESS;
- }
-
-+static void
-+acm_record_path_addr(struct acm_ep *ep, struct acm_dest *dest,
-+ struct ibv_path_record *path)
-+{
-+ acm_log(2, "%s\n", dest->name);
-+ dest->path.pkey = htons(ep->pkey);
-+ dest->path.sgid = path->sgid;
-+ dest->path.dgid = path->dgid;
-+ dest->path.slid = path->slid;
-+ dest->path.dlid = path->dlid;
-+ dest->state = ACM_ADDR_RESOLVED;
-+}
-+
- static uint8_t acm_validate_addr_req(struct acm_mad *mad)
- {
- struct acm_resolve_rec *rec;
-@@ -959,10 +995,12 @@ acm_dest_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *ma
- if (!status) {
- memcpy(&dest->path, sa_mad->data, sizeof(dest->path));
- acm_init_path_av(msg->ep->port, dest);
-- dest->ah = ibv_create_ah(msg->ep->port->dev->pd, &dest->av);
-- if (!dest->ah) {
-- acm_log(0, "ERROR - failed to create ah\n");
-- status = ACM_STATUS_ENOMEM;
-+ if (dest->remote_qpn) {
-+ dest->ah = ibv_create_ah(msg->ep->port->dev->pd, &dest->av);
-+ if (!dest->ah) {
-+ acm_log(0, "ERROR - failed to create ah\n");
-+ status = ACM_STATUS_ENOMEM;
-+ }
- }
- }
- if (!status) {
-@@ -1313,9 +1351,9 @@ static uint64_t acm_path_comp_mask(struct ibv_path_record *path)
- acm_log(2, "\n");
- if (path->service_id)
- comp_mask |= IB_COMP_MASK_PR_SERVICE_ID;
-- if (path->dgid.global.interface_id || path->dgid.global.subnet_prefix)
-+ if (!ib_any_gid(&path->dgid))
- comp_mask |= IB_COMP_MASK_PR_DGID;
-- if (path->sgid.global.interface_id || path->sgid.global.subnet_prefix)
-+ if (!ib_any_gid(&path->sgid))
- comp_mask |= IB_COMP_MASK_PR_SGID;
- if (path->dlid)
- comp_mask |= IB_COMP_MASK_PR_DLID;
-@@ -1708,6 +1746,15 @@ static uint8_t acm_svr_query_sa(struct acm_ep *ep, struct acm_request *req)
- return ACM_STATUS_SUCCESS;
- }
-
-+static int
-+acm_is_path_from_port(struct acm_port *port, struct ibv_path_record *path)
-+{
-+ if (ib_any_gid(&path->sgid)) {
-+ return (port->lid == (ntohs(path.slid) & port->lid_mask));
-+ }
-+ return (acm_gid_index(port, &path->sgid) < port->gid_cnt);
-+}
-+
- static struct acm_ep *
- acm_get_ep(struct acm_ep_addr_data *data)
- {
-@@ -1728,7 +1775,7 @@ acm_get_ep(struct acm_ep_addr_data *data)
- port = &dev->port[i];
-
- if (data->type == ACM_EP_INFO_PATH &&
-- port->lid != ntohs(data->info.path.slid))
-+ !acm_is_path_from_port(port, &data->info.path))
- continue;
-
- for (ep_entry = port->ep_list.Next; ep_entry != &port->ep_list;
-@@ -1738,8 +1785,10 @@ acm_get_ep(struct acm_ep_addr_data *data)
- if (ep->state != ACM_READY)
- continue;
-
-- if (data->type == ACM_EP_INFO_PATH)
-- return ep; // TODO: check pkey
-+ if ((data->type == ACM_EP_INFO_PATH) &&
-+ (!data->info.path.pkey ||
-+ (ntohs(data->info.path.pkey) == ep->pkey)))
-+ return ep;
-
- if (acm_addr_index(ep, data->info.addr,
- (uint8_t) data->type) >= 0)
-@@ -1768,12 +1817,6 @@ acm_svr_query(struct acm_client *client, struct acm_resolve_msg *msg)
- goto resp;
- }
-
-- if (msg->data[0].type != ACM_EP_INFO_PATH) {
-- acm_log(0, "ERROR - unsupported type: 0x%x\n", msg->data[0].type);
-- status = ACM_STATUS_EINVAL;
-- goto resp;
-- }
--
- ep = acm_get_ep(&msg->data[0]);
- if (!ep) {
- acm_log(1, "notice - could not find local end point\n");
-@@ -2060,6 +2103,88 @@ put:
- return ret;
- }
-
-+static int
-+acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
-+{
-+ struct acm_ep *ep;
-+ struct acm_dest *dest;
-+ struct ibv_path_record *path;
-+ uint8_t addr[ACM_MAX_ADDRESS];
-+ uint8_t status;
-+ int ret;
-+
-+ acm_log(2, "client %d\n", client->index);
-+ if (msg->hdr.length < (ACM_MSG_HDR_LENGTH + ACM_MSG_EP_LENGTH)) {
-+ acm_log(0, "notice - invalid msg hdr length %d\n", msg->hdr.length);
-+ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EINVAL);
-+ }
-+
-+ path = &msg->data[0].info.path;
-+ if (!path->dlid && ib_any_gid(&path->dgid)) {
-+ acm_log(0, "notice - no destination specified\n");
-+ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EDESTADDR);
-+ }
-+
-+ acm_format_name(2, log_data, sizeof log_data,
-+ ACM_EP_INFO_PATH, path, sizeof *path);
-+ acm_log(2, "path %s\n", log_data);
-+ ep = acm_get_ep(&msg->data[0]);
-+ if (!ep) {
-+ acm_log(0, "notice - unknown local end point\n");
-+ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ESRCADDR);
-+ }
-+
-+ memset(addr, 0, sizeof addr);
-+ if (path->dlid) {
-+ * ((uint16_t *) addr) = path->dlid;
-+ dest = acm_acquire_dest(ep, ACM_ADDRESS_LID, addr);
-+ } else {
-+ memcpy(addr, &path->dgid, sizeof path->dgid);
-+ dest = acm_acquire_dest(ep, ACM_ADDRESS_GID, addr);
-+ }
-+ if (!dest) {
-+ acm_log(0, "ERROR - unable to allocate destination in client request\n");
-+ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ENOMEM);
-+ }
-+
-+ lock_acquire(&dest->lock);
-+ switch (dest->state) {
-+ case ACM_READY:
-+ acm_log(2, "request satisfied from local cache\n");
-+ status = ACM_STATUS_SUCCESS;
-+ break;
-+ case ACM_INIT:
-+ acm_log(2, "have path, bypassing address resolution");
-+ acm_record_path_addr(ep, dest, path);
-+ /* fall through */
-+ case ACM_ADDR_RESOLVED:
-+ acm_log(2, "have address, resolving route\n");
-+ status = acm_resolve_path(ep, dest, acm_dest_sa_resp);
-+ if (status) {
-+ break;
-+ }
-+ /* fall through */
-+ default:
-+ if (msg->data[0].flags & ACM_FLAGS_NODELAY) {
-+ acm_log(2, "lookup initiated, but client wants no delay\n");
-+ status = ACM_STATUS_ENODATA;
-+ break;
-+ }
-+ status = acm_svr_queue_req(dest, client, msg);
-+ if (status) {
-+ break;
-+ }
-+ ret = 0;
-+ lock_release(&dest->lock);
-+ goto put;
-+ }
-+ lock_release(&dest->lock);
-+ ret = acm_client_resolve_resp(client, msg, dest, status);
-+put:
-+ acm_put_dest(dest);
-+ return ret;
-+}
-+
- static void acm_svr_receive(struct acm_client *client)
- {
- struct acm_msg msg;
-@@ -2085,7 +2210,11 @@ static void acm_svr_receive(struct acm_client *client)
- }
-
- if (resolve_msg->data[0].type == ACM_EP_INFO_PATH) {
-- ret = acm_svr_query(client, resolve_msg);
-+ if (resolve_msg->data[0].flags & ACM_FLAGS_QUERY_SA) {
-+ ret = acm_svr_query(client, resolve_msg);
-+ } else {
-+ ret = acm_svr_resolve_path(client, resolve_msg);
-+ }
- } else {
- ret = acm_svr_resolve(client, resolve_msg);
- }