Hey Sasha,

This patch fixes a corner case in libibnetdisc that was storing
portguids w/ a guid of 0.

This bug was relatively innoucuous for ibnetdiscover b/c ibnetdiscover
does not output these ports.  However, it became a problem for me in the
caching library as I attempted to reconstruct a fabric, and multiple
ports were identifying themselves with identical guids [1].

Al

[1] - The fact the caching code assumes duplicate guids can't exist is
also a bug.  But that's for another patch.  This is a bug by itself.

-- 
Albert Chu
[email protected]
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
--- Begin Message ---
Signed-off-by: Albert Chu <[email protected]>
---
 infiniband-diags/libibnetdisc/src/ibnetdisc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c 
b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
index c895de9..6010a28 100644
--- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c
+++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
@@ -173,6 +173,7 @@ static int recv_port_info(smp_engine_t * engine, ibnd_smp_t 
* smp,
                        IBND_ERROR("Failed to allocate port\n");
                        return -1;
                }
+               port->guid = mad_get_field64(node->info, 0, 
IB_NODE_PORT_GUID_F);
        }
 
        memcpy(port->info, port_info, sizeof(port->info));
-- 
1.5.4.5


--- End Message ---

Reply via email to