All of lore.kernel.org
 help / color / mirror / Atom feed
* [infiniband-diags] fix libibnetdisc portguid hashing corner case
@ 2010-04-14 17:48 Al Chu
       [not found] ` <1271267283.17987.120.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Al Chu @ 2010-04-14 17:48 UTC (permalink / raw)
  To: Sasha Khapyorsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

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
chu11-i2BcT+NCU+M@public.gmane.org
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory

[-- Attachment #2: 0001-fix-libibnetdisc-portguid-hashing-corner-case.patch --]
[-- Type: message/rfc822, Size: 996 bytes --]

From: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
Subject: [PATCH] fix libibnetdisc portguid hashing corner case
Date: Tue, 13 Apr 2010 14:01:43 -0700
Message-ID: <1271264633.17987.112.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>


Signed-off-by: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [infiniband-diags] fix libibnetdisc portguid hashing corner case
       [not found] ` <1271267283.17987.120.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
@ 2010-04-18 16:47   ` Sasha Khapyorsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Khapyorsky @ 2010-04-18 16:47 UTC (permalink / raw)
  To: Al Chu; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

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
> chu11-i2BcT+NCU+M@public.gmane.org
> Computer Scientist
> High Performance Systems Division
> Lawrence Livermore National Laboratory

> Date: Tue, 13 Apr 2010 14:01:43 -0700
> From: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
> Subject: [PATCH] fix libibnetdisc portguid hashing corner case
> Message-Id: <1271264633.17987.112.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> 
> 
> Signed-off-by: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>

Applied. Thanks.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-18 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-14 17:48 [infiniband-diags] fix libibnetdisc portguid hashing corner case Al Chu
     [not found] ` <1271267283.17987.120.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
2010-04-18 16:47   ` Sasha Khapyorsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.