From patchwork Mon Nov 2 19:33:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 57119 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA2JXOMg018862 for ; Mon, 2 Nov 2009 19:33:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113AbZKBTdN (ORCPT ); Mon, 2 Nov 2009 14:33:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754287AbZKBTdN (ORCPT ); Mon, 2 Nov 2009 14:33:13 -0500 Received: from nspiron-2.llnl.gov ([128.115.41.82]:4986 "EHLO nspiron-2.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754113AbZKBTdN (ORCPT ); Mon, 2 Nov 2009 14:33:13 -0500 X-Attachments: 0001-remove-ibnd_update_node.patch Received: from auk31.llnl.gov (HELO [134.9.93.159]) ([134.9.93.159]) by nspiron-2.llnl.gov with ESMTP; 02 Nov 2009 11:33:18 -0800 Subject: [infiniband-diags] [PATCH] [1/2] remove ibnd_update_node From: Al Chu Reply-To: chu11@llnl.gov To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Date: Mon, 02 Nov 2009 11:33:17 -0800 Message-Id: <1257190397.580.30.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 diff --git a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h index bb5df02..6120453 100644 --- a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h +++ b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h @@ -172,9 +172,6 @@ MAD_EXPORT void ibnd_destroy_fabric(ibnd_fabric_t * fabric); MAD_EXPORT ibnd_node_t *ibnd_find_node_guid(ibnd_fabric_t * fabric, uint64_t guid); MAD_EXPORT ibnd_node_t *ibnd_find_node_dr(ibnd_fabric_t * fabric, char *dr_str); -MAD_EXPORT ibnd_node_t *ibnd_update_node(struct ibmad_port *ibmad_port, - ibnd_fabric_t * fabric, - ibnd_node_t * node); typedef void (*ibnd_iter_node_func_t) (ibnd_node_t * node, void *user_data); MAD_EXPORT void ibnd_iter_nodes(ibnd_fabric_t * fabric, diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c index ebc45ba..ffa35e4 100644 --- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c @@ -264,61 +264,6 @@ static int _check_ibmad_port(struct ibmad_port *ibmad_port) return 0; } -ibnd_node_t *ibnd_update_node(struct ibmad_port * ibmad_port, - ibnd_fabric_t * fabric, ibnd_node_t * node) -{ - char portinfo_port0[IB_SMP_DATA_SIZE]; - void *nd = node->nodedesc; - int p = 0; - - if (_check_ibmad_port(ibmad_port) < 0) - return NULL; - - if (!fabric) { - IBND_DEBUG("fabric parameter NULL\n"); - return NULL; - } - - if (!node) { - IBND_DEBUG("node parameter NULL\n"); - return NULL; - } - - if (query_node_info(ibmad_port, fabric, node, &(node->path_portid))) - return NULL; - - if (!smp_query_via(nd, &(node->path_portid), IB_ATTR_NODE_DESC, 0, 0, - ibmad_port)) - return NULL; - - /* update all the port info's */ - for (p = 1; p >= node->numports; p++) { - get_port_info(ibmad_port, fabric, node->ports[p], - p, &(node->path_portid)); - } - - if (node->type != IB_NODE_SWITCH) - goto done; - - if (!smp_query_via - (portinfo_port0, &(node->path_portid), IB_ATTR_PORT_INFO, 0, 0, - ibmad_port)) - return NULL; - - node->smalid = mad_get_field(portinfo_port0, 0, IB_PORT_LID_F); - node->smalmc = mad_get_field(portinfo_port0, 0, IB_PORT_LMC_F); - - if (!smp_query_via(node->switchinfo, &(node->path_portid), - IB_ATTR_SWITCH_INFO, 0, 0, ibmad_port)) - node->smaenhsp0 = 0; /* assume base SP0 */ - else - mad_decode_field(node->switchinfo, IB_SW_ENHANCED_PORT0_F, - &node->smaenhsp0); - -done: - return node; -} - ibnd_node_t *ibnd_find_node_dr(ibnd_fabric_t * fabric, char *dr_str) { int i = 0;