[PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports

DORMANTno replies

From: Hal Rosenstock <hidden>
Date: 2013-02-21 19:01:51
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/umad.c b/src/umad.c
index 8f817d2..8ab5e80 100644
--- a/src/umad.c
+++ b/src/umad.c
@@ -256,6 +256,11 @@ static int resolve_ca_port(char *ca_name, int *port)
 			ret = -1;
 			goto Exit;
 		}
+		if (strcmp(ca.ports[*port]->link_layer, "InfiniBand") &&
+		    strcmp(ca.ports[*port]->link_layer, "IB")) {
+			ret = -1;
+			goto Exit;
+		}
 		if (ca.ports[*port]->state == 4) {
 			ret = 1;
 			goto Exit;
@@ -270,6 +275,9 @@ static int resolve_ca_port(char *ca_name, int *port)
 		DEBUG("checking port %d", i);
 		if (!ca.ports[i])
 			continue;
+		if (strcmp(ca.ports[i]->link_layer, "InfiniBand") &&
+		    strcmp(ca.ports[i]->link_layer, "IB"))
+			continue;
 		if (up < 0 && ca.ports[i]->phys_state == 5)
 			up = *port = i;
 		if (ca.ports[i]->state == 4) {
--
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