[openib-general] [PATCH] OpenSM - osm_vendor_get_all_port_attr - add info

Yael Kalka yael at mellanox.co.il
Mon Feb 27 02:14:17 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 5496)
+++ 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;
@@ -622,6 +624,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 +645,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