From patchwork Sat Apr 10 00:58:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 91839 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 o3A0wnvo016256 for ; Sat, 10 Apr 2010 00:58:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751450Ab0DJA6s (ORCPT ); Fri, 9 Apr 2010 20:58:48 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:44489 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135Ab0DJA6s (ORCPT ); Fri, 9 Apr 2010 20:58:48 -0400 Received: by bwz1 with SMTP id 1so2893539bwz.21 for ; Fri, 09 Apr 2010 17:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=iTd8/NPQbHRBHSbacrDK0KVoc7j66walz5OxnRVHLcY=; b=msCePuI1EH6N4p39QmwNmvQK0uabeNrXmi8ucm+OpAuosoF+ZEB3AkHHV7FXBGMow5 jYtU/NCgE0roLzvGzyh/d6L/+9LF69ydWr+WislHP/RSbwKpYyZ3uQAG+pyS0c7j75oL syrCUo6+hwtXUHhBDcsIbYuuNGsnHCiGV60Ig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=t8FzsBQAfAgmfCHBXVXyHF8G6TWHpix/vA7PSg0PxEbA++iFUawLMYfODRncrmWE2c wKW/JozFv0pIpAdce5N5CAJXxuXEUYlXajG16XD2Nv/+5n7lJT7t4D2rhBso83+RDxrT 0M0VyXgW1CbzDdQIykDUMsjojp7d+2WqiieKA= Received: by 10.204.156.5 with SMTP id u5mr844557bkw.161.1270861126830; Fri, 09 Apr 2010 17:58:46 -0700 (PDT) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id a11sm14165255bkc.3.2010.04.09.17.58.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Apr 2010 17:58:46 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id 8147711F34; Sat, 10 Apr 2010 03:58:57 +0300 (IDT) Date: Sat, 10 Apr 2010 03:58:57 +0300 From: Sasha Khapyorsky To: Ira Weiny Cc: "linux-rdma@vger.kernel.org" , Hal Rosenstock Subject: [PATCH] libibnetdisc: no backward NodeInfo queries Message-ID: <20100410005857.GN4808@me> References: <20100218124931.4d6ef34b.weiny2@llnl.gov> <20100410005245.GH4808@me> <20100410005536.GI4808@me> <20100410005752.GL4808@me> <20100410005819.GM4808@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100410005819.GM4808@me> User-Agent: Mutt/1.5.20 (2009-06-14) 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]); Sat, 10 Apr 2010 00:58:49 +0000 (UTC) diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c index 65126dd..03b678e 100644 --- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c @@ -199,7 +199,8 @@ static int recv_port_info(smp_engine_t * engine, ibnd_smp_t * smp, if (port_num && mad_get_field(port->info, 0, IB_PORT_PHYS_STATE_F) == IB_PORT_PHYS_STATE_LINKUP - && (node->type == IB_NODE_SWITCH || node == fabric->from_node)) { + && ((node->type == IB_NODE_SWITCH && port_num != local_port) || + node == fabric->from_node)) { ib_portid_t path = smp->path; if (extend_dpath(engine, &path, port_num) > 0) query_node_info(engine, &path, node);