From patchwork Sat Apr 10 00:58:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 91838 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 o3A0viKg015345 for ; Sat, 10 Apr 2010 00:58:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751444Ab0DJA6K (ORCPT ); Fri, 9 Apr 2010 20:58:10 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:62343 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135Ab0DJA6K (ORCPT ); Fri, 9 Apr 2010 20:58:10 -0400 Received: by mail-bw0-f209.google.com with SMTP id 1so2893329bwz.21 for ; Fri, 09 Apr 2010 17:58:09 -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=MBs0P4G/CUhLKCsDx7GZdX5iaLUGUFNHKz1pq4DbhFk=; b=Sq1TQf+5x33d9madDe5M8RdKkCJgC0HfvSpT+eNAoCU+JFEOjVbxenMGUa7v1rkipe +h6JYnBlc3CqndtW4FRBnWDINzmsNIQdUpZz5+NSKnZf1TLESLwM63OzrOrw+IIV4Ujh I/tNgWMEkkvDVZeLWdHGENVm247Vdl3iJCDzw= 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=okMw2vxmZ6zAp+KfPOOXBJObnNFDVLK9onibJQ2VhXg4QpYWsdIK8u4nXJLvO0MfmX A228R5Pv2Nqh/LiZarO2gK89mCAt6MMKJmDoBwWIFdkNTXvlFOWd0DJmoPP5k0gRwBBu JjU6eykeb0KE/9WW6f8iRzO9uAehP9V6aA1SE= Received: by 10.204.27.14 with SMTP id g14mr905928bkc.36.1270861089249; Fri, 09 Apr 2010 17:58:09 -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 x16sm14163900bku.5.2010.04.09.17.58.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Apr 2010 17:58:08 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id CF7DB11F34; Sat, 10 Apr 2010 03:58:19 +0300 (IDT) Date: Sat, 10 Apr 2010 03:58:19 +0300 From: Sasha Khapyorsky To: Ira Weiny Cc: "linux-rdma@vger.kernel.org" , Hal Rosenstock Subject: [PATCH] infiniband-diags/ibnetdiscover: report number of used MADs Message-ID: <20100410005819.GM4808@me> References: <20100218124931.4d6ef34b.weiny2@llnl.gov> <20100410005245.GH4808@me> <20100410005536.GI4808@me> <20100410005752.GL4808@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100410005752.GL4808@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:16 +0000 (UTC) diff --git a/infiniband-diags/src/ibnetdiscover.c b/infiniband-diags/src/ibnetdiscover.c index 1ff8ef6..32776ad 100644 --- a/infiniband-diags/src/ibnetdiscover.c +++ b/infiniband-diags/src/ibnetdiscover.c @@ -444,8 +444,9 @@ int dump_topology(int group, ibnd_fabric_t * fabric) fprintf(f, "#\n# Topology file: generated on %s#\n", ctime(&t)); if (report_max_hops) - fprintf(f, "# Reported max hops discovered: %d\n", - fabric->maxhops_discovered); + fprintf(f, "# Reported max hops discovered: %u\n" + "# Total MADs used: %u\n", + fabric->maxhops_discovered, fabric->total_mads_used); fprintf(f, "# Initiated from node %016" PRIx64 " port %016" PRIx64 "\n", fabric->from_node->guid, mad_get_field64(fabric->from_node->info, 0,