Re: [infiniband-diags] fix libibnetdisc portguid hashing corner case

2010-04-18 Thread Sasha Khapyorsky
On 10:48 Wed 14 Apr , Al Chu wrote:
 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
 ch...@llnl.gov
 Computer Scientist
 High Performance Systems Division
 Lawrence Livermore National Laboratory

 Date: Tue, 13 Apr 2010 14:01:43 -0700
 From: Albert Chu ch...@llnl.gov
 Subject: [PATCH] fix libibnetdisc portguid hashing corner case
 Message-Id: 1271264633.17987.112.ca...@auk31.llnl.gov
 Mime-Version: 1.0
 Content-Transfer-Encoding: 7bit
 
 
 Signed-off-by: Albert Chu ch...@llnl.gov

Applied. Thanks.

Sasha
--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[infiniband-diags] fix libibnetdisc portguid hashing corner case

2010-04-14 Thread Al Chu
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
ch...@llnl.gov
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
---BeginMessage---

Signed-off-by: Albert Chu ch...@llnl.gov
---
 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---