From patchwork Fri Apr 9 17:24:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 91728 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o39HOvPc013162 for ; Fri, 9 Apr 2010 17:24:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754856Ab0DIRY4 (ORCPT ); Fri, 9 Apr 2010 13:24:56 -0400 Received: from nspiron-3.llnl.gov ([128.115.41.83]:63306 "EHLO smtp.llnl.gov" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754814Ab0DIRYz (ORCPT ); Fri, 9 Apr 2010 13:24:55 -0400 X-Attachments: 0001-fix-libibnetdisc-corner-case-when-user-tries-to-re-c.patch Received: from auk31.llnl.gov (HELO [134.9.93.159]) ([134.9.93.159]) by smtp.llnl.gov with ESMTP; 09 Apr 2010 10:24:51 -0700 Subject: [infiniband-diags] fix libibnetdisc corner case when user tries to re-cache a loaded cache From: Al Chu To: "sashak@voltaire.com" Cc: "linux-rdma@vger.kernel.org" Date: Fri, 09 Apr 2010 10:24:50 -0700 Message-Id: <1270833890.17987.16.camel@auk31.llnl.gov> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 09 Apr 2010 17:24:57 +0000 (UTC) diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c b/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c index d94b85a..9cd5981 100644 --- a/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c @@ -501,6 +501,10 @@ static int _fill_port(ibnd_fabric_cache_t * fabric_cache, ibnd_node_t * node, node->ports[port_cache->port->portnum] = port_cache->port; + /* achu: needed if user wishes to re-cache a loaded fabric. + * Otherwise, mostly unnecessary to do this. + */ + add_to_portguid_hash(port_cache->port, fabric_cache->fabric->portstbl); return 0; }