From 4477d4c37b88fe0b7cb2da8ab2e1a304b55cc9af Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Mon, 4 Jun 2012 11:38:54 -0700 Subject: [PATCH] ibacm: Automatically select local port if not specified by path record 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 --- src/acm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/acm.c b/src/acm.c index c940df3..7891788 100644 --- a/src/acm.c +++ b/src/acm.c @@ -1762,6 +1762,10 @@ acm_is_path_from_port(struct acm_port *port, struct ibv_path_record *path) 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; } -- 2.46.0