[openib-general] Re: [PATCH] osm: osm_vendor_umad osm_vendor_get_all_port_attr bug

Hal Rosenstock halr at voltaire.com
Thu Aug 25 11:52:51 PDT 2005


Hi Eitan,

On Sun, 2005-08-21 at 03:32, Eitan Zahavi wrote:
> osm_vendor_get_all_port_attr returns incorrect LID and state for 
> device ports. This bug was caused by the fact that if a device port
> was skipped due to that fact it does not exist (HCA port 0). The 
> lid and state pointers used as indexes into their corresponding
> return value arrays were not advancing to the next port index.
> 
> So the return for a single HCA was mixing LID and state for the first
> port and displayed non initialized memory for the second port.

The array is not filled in as you claim. Port 0 does not take a slot on
an HCA. This looks fine to me as is (I added some print statements in
that loop as follows):

osm_vendor_get_all_port_attr: port 0
osm_vendor_get_all_port_attr: port 1
osm_vendor_get_all_port_attr: port 1 lid 1 state 4
osm_vendor_get_all_port_attr: port 2
osm_vendor_get_all_port_attr: port 2 lid 0 state 1

Port 0 is skipped; port 1 is LID 1 and active; port 2 is not plugged in
and is down:

        Port 1:
                State: Active
                Physical state: LinkUp
                Rate: 2
                Base lid: 1
                LMC: 0
                SM lid: 1
                Capability mask: 0x00500a68
                Port GUID: 0x0008f10403960559
        Port 2:
                State: Down
                Physical state: Polling
                Rate: 2
                Base lid: 0
                LMC: 0
                SM lid: 0
                Capability mask: 0x00500a68
                Port GUID: 0x0008f1040396055a

-- Hal




More information about the general mailing list