From patchwork Sun Sep 5 08:28:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eli Dorfman (Voltaire)" X-Patchwork-Id: 156421 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8588Q22029362 for ; Sun, 5 Sep 2010 08:08:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753880Ab0IEIIV (ORCPT ); Sun, 5 Sep 2010 04:08:21 -0400 Received: from fwil.voltaire.com ([193.47.165.2]:13257 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753224Ab0IEIIS (ORCPT ); Sun, 5 Sep 2010 04:08:18 -0400 Received: from [172.25.1.69] ([172.25.1.69]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 5 Sep 2010 11:08:13 +0300 Message-ID: <4C8354C9.5070502@gmail.com> Date: Sun, 05 Sep 2010 11:28:57 +0300 From: "Eli Dorfman (Voltaire)" User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Sasha Khapyorsky CC: Ira Weiny , linux-rdma Subject: [PATCH] infiniband-diags: Do not exit when unexpected node found X-OriginalArrivalTime: 05 Sep 2010 08:08:13.0420 (UTC) FILETIME=[7CB36AC0:01CB4CD1] 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 (demeter1.kernel.org [140.211.167.41]); Sun, 05 Sep 2010 08:08:41 +0000 (UTC) diff --git a/infiniband-diags/libibnetdisc/src/chassis.c b/infiniband-diags/libibnetdisc/src/chassis.c index 25d7473..7762d22 100644 --- a/infiniband-diags/libibnetdisc/src/chassis.c +++ b/infiniband-diags/libibnetdisc/src/chassis.c @@ -457,7 +457,6 @@ static int get_sfb_slot(ibnd_node_t * n, ibnd_port_t * lineport) } else { IBND_ERROR("Unexpected node found: guid 0x%016" PRIx64 "\n", n->guid); - return -1; } return 0; } @@ -498,7 +497,6 @@ static int get_router_slot(ibnd_node_t * n, ibnd_port_t * spineport) } else { IBND_ERROR("Unexpected node found: guid 0x%016" PRIx64 "\n", spineport->node->guid); - return -1; } return 0; } @@ -533,7 +531,6 @@ static int get_slb_slot(ibnd_node_t * n, ibnd_port_t * spineport) } else { IBND_ERROR("Unexpected node found: guid 0x%016" PRIx64 "\n", spineport->node->guid); - return -1; } return 0; } @@ -588,8 +585,7 @@ static int fill_voltaire_chassis_record(ibnd_node_t * node) } if (!node->ch_type) /* we assume here that remoteport belongs to line */ - if (get_sfb_slot(node, port->remoteport)) - return -1; + get_sfb_slot(node, port->remoteport); /* we could break here, but need to find if more routers connected */ } @@ -607,8 +603,7 @@ static int fill_voltaire_chassis_record(ibnd_node_t * node) continue; /* we assume here that remoteport belongs to spine */ - if (get_slb_slot(node, port->remoteport)) - return -1; + get_slb_slot(node, port->remoteport); break; } }