Thread (1 message) 1 message, 1 author, 2013-02-20

[PATCHv2] infiniband-diags/ibqueryerrors.c: changed the behavior when guid/DR-path not found

From: Dan Ben Yosef <hidden>
Date: 2013-02-20 12:36:00
Subsystem: the rest · Maintainer: Linus Torvalds

If we use G or D options and we can't find the guid (sm is down or the
guid is wrong), we'll get an error instead of the result for all the
ports in the fabric.

Signed-off-by: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes since v1:
	Fixed patch description

 src/ibqueryerrors.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/ibqueryerrors.c b/src/ibqueryerrors.c
index 076327c..6320972 100644
--- a/src/ibqueryerrors.c
+++ b/src/ibqueryerrors.c
@@ -935,16 +935,18 @@ int main(int argc, char **argv)
 	if (dr_path) {
 		if ((resolved =
 		     resolve_portid_str(ibd_ca, ibd_ca_port, &portid, dr_path,
-					IB_DEST_DRPATH, NULL, ibmad_port)) < 0)
-			IBWARN("Failed to resolve %s; attempting full scan",
-			       dr_path);
+					IB_DEST_DRPATH, NULL, ibmad_port)) < 0) {
+			IBWARN("Failed to resolve %s;",dr_path);
+			goto close_port;
+		}
 	} else if (port_guid_str) {
 		if ((resolved =
 		     resolve_portid_str(ibd_ca, ibd_ca_port, &portid,
 					port_guid_str, IB_DEST_GUID, ibd_sm_id,
-					       ibmad_port)) < 0)
-			IBWARN("Failed to resolve %s; attempting full scan",
-			       port_guid_str);
+					       ibmad_port)) < 0) {
+			IBWARN("Failed to resolve %s;",port_guid_str);
+			goto close_port;
+		}
 	}
 
 	if (load_cache_file) {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help