[openib-general] [PATCH] OpenSM - osm_vendor_get_all_port_attr - add info
Yael Kalka
yael at mellanox.co.il
Thu Mar 2 02:18:14 PST 2006
Hi Hal,
Currently osm_vendor_get_all_port_attr doesn't update the port number
information. The following patch adds this information.
Thanks,
Yael
Signed-off-by: Yael Kalka <yael at mellanox.co.il>
Index: libvendor/osm_vendor_ibumad.c
===================================================================
--- libvendor/osm_vendor_ibumad.c (revision 5572)
+++ libvendor/osm_vendor_ibumad.c (working copy)
@@ -565,8 +565,10 @@ osm_vendor_get_all_port_attr(
ib_net64_t *p_guid = portguids, *e = portguids + *p_num_ports;
umad_ca_t ca;
int lids[*p_num_ports];
+ int portnums[*p_num_ports];
int linkstates[*p_num_ports];
int *p_lid = lids;
+ int *p_portnum = portnums;
int *p_linkstates = linkstates;
umad_port_t def_port = {""};
int r, i, j;
@@ -604,9 +606,11 @@ osm_vendor_get_all_port_attr(
if (ca.ports[j]) {
*p_lid = ca.ports[j]->base_lid;
*p_linkstates = ca.ports[j]->state;
+ *p_portnum = ca.ports[j]->portnum;
}
p_lid++;
p_linkstates++;
+ p_portnum++;
}
}
}
@@ -622,6 +626,7 @@ osm_vendor_get_all_port_attr(
portguids[0] = def_port.port_guid;
lids[0] = def_port.base_lid;
+ portnums[0] = def_port.portnum;
linkstates[0] = def_port.state;
sm_lid = def_port.sm_lid;
@@ -642,6 +647,7 @@ osm_vendor_get_all_port_attr(
continue;
p_attr_array[j].port_guid = portguids[i];
p_attr_array[j].lid = lids[i];
+ p_attr_array[j].port_num = portnums[i];
if (j == 0)
p_attr_array[j].sm_lid = sm_lid;
else
More information about the general
mailing list