If the user specifies a DLID or DGID as part of a path record lookup,
automatically select a local port. This allows a user to query an SA
without needing to specify the local SLID or SGID.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
dest->path.sgid = path->sgid;
dest->path.slid = path->slid;
} else {
- dest->path.slid = ep->port->lid;
+ dest->path.slid = htons(ep->port->lid);
}
dest->path.dlid = path->dlid;
dest->state = ACM_ADDR_RESOLVED;
return (port->lid == (ntohs(path->slid) & port->lid_mask));
}
+ if (ib_any_gid(&path->dgid)) {
+ return 1;
+ }
+
if (acm_gid_index(port, &path->dgid) < port->gid_cnt) {
return 1;
}