[ofa-general] [PATCH] opensm/vendor: filter out non-IB devices in osm_vendor_get_all_port_attr()

Sasha Khapyorsky sashak at voltaire.com
Tue Jan 8 12:23:45 PST 2008


osm_vendor_get_all_port_attr() will return attributes for only IB ports
and will filter out all non-IB (iWARP) devices.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/libvendor/osm_vendor_ibumad.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opensm/libvendor/osm_vendor_ibumad.c b/opensm/libvendor/osm_vendor_ibumad.c
index 522325b..977a3b2 100644
--- a/opensm/libvendor/osm_vendor_ibumad.c
+++ b/opensm/libvendor/osm_vendor_ibumad.c
@@ -571,6 +571,8 @@ osm_vendor_get_all_port_attr(IN osm_vendor_t * const p_vend,
 		 * For each CA, retrieve the port guids
 		 */
 		if (umad_get_ca(p_vend->ca_names[i], &ca) == 0) {
+			if (ca.node_type < 1 || ca.node_type > 3)
+				continue;
 			for (j = 0; j <= ca.numports; j++) {
 				if (!ca.ports[j])
 					continue;
-- 
1.5.4.rc2.38.gd6da3




More information about the general mailing list