Skip to contentSkip to conversation

fix MFT record dump

PATCH Applied Eli Dorfman (Voltaire) 2 participants 2 messages Jun 10, 2010 – Jun 14, 2010 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix MFT record dump

fix wrong MLID calculation in MFT record dump.

---
 infiniband-diags/src/saquery.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
infiniband-diags/src/saquery.c +5 -3
index 5e9a5ad..cb4fc18 100644
@@ -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");
 }
 
Signature · 6 lines
1.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]