From patchwork Thu Jun 10 15:03:03 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: 105397 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 o5AEie8l000859 for ; Thu, 10 Jun 2010 14:45:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653Ab0FJOpy (ORCPT ); Thu, 10 Jun 2010 10:45:54 -0400 Received: from fwil.voltaire.com ([193.47.165.2]:15330 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753068Ab0FJOpx (ORCPT ); Thu, 10 Jun 2010 10:45:53 -0400 Received: from [172.25.1.69] ([172.25.1.69]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 10 Jun 2010 17:45:51 +0300 Message-ID: <4C10FEA7.7030400@gmail.com> Date: Thu, 10 Jun 2010 18:03:03 +0300 From: "Eli Dorfman (Voltaire)" User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Sasha Khapyorsky CC: linux-rdma Subject: [PATCH] fix MFT record dump X-OriginalArrivalTime: 10 Jun 2010 14:45:51.0488 (UTC) FILETIME=[9F477000:01CB08AB] 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]); Thu, 10 Jun 2010 14:45:54 +0000 (UTC) diff --git a/infiniband-diags/src/saquery.c b/infiniband-diags/src/saquery.c index 5e9a5ad..cb4fc18 100644 --- a/infiniband-diags/src/saquery.c +++ b/infiniband-diags/src/saquery.c @@ -788,16 +788,18 @@ static void dump_one_mft_record(void *data) unsigned block = cl_ntoh16(mftr->position_block_num) & IB_MCAST_BLOCK_ID_MASK_HO; int i; + unsigned offset; + printf("MFT Record dump:\n" "\t\tLID........................%u\n" "\t\tPosition...................%u\n" "\t\tBlock......................%u\n" "\t\tMFT:\n\t\tMLID\tPort Mask\n", cl_ntoh16(mftr->lid), position, block); + offset = IB_LID_MCAST_START_HO + block * 32; for (i = 0; i < IB_MCAST_BLOCK_SIZE; i++) - printf("\t\t0x%x\t0x%x\n", - IB_LID_MCAST_START_HO + block * 64 + i, - cl_ntoh16(mftr->mft[i])); + printf("\t\t0x%04x\t0x%04x\n", + offset + i, cl_ntoh16(mftr->mft[i])); printf("\n"); }