When '--max_hops,-m' option is specified report (in comment) a total
number of used MADs for discovery aside of number of hops.

Signed-off-by: Sasha Khapyorsky <[email protected]>
---
 infiniband-diags/src/ibnetdiscover.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

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,
-- 
1.7.0.4

--
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

Reply via email to