[ofa-general] Re: [RFC][PATCH] ibnetdiscover: remove report of max hops discovered.

Hal Rosenstock hal.rosenstock at gmail.com
Thu May 7 06:53:05 PDT 2009


On Wed, May 6, 2009 at 9:01 PM, Ira Weiny <weiny2 at llnl.gov> wrote:
> The number reported as "max hops" from ibnetdiscover can change depending on
> the algorithm used to discover the fabric.  As Hal says in the message below
> using this number is therefore dangerous.
>
> If no one is currently using this number I propose the patch below which
> removes the "max hops discovered" from the output.

If it's removed from the topology output, should there be an option
which displays this number ? It does provide some idea of the levels
in the hierarchy which can be useful when someone provides a topology
file for their subnet.

-- Hal

> Ira
>
> On Tue, 5 May 2009 14:25:32 -0400
> Hal Rosenstock <hal.rosenstock at gmail.com> wrote:
>
>> Hi Al,
>>
>> On Tue, May 5, 2009 at 1:08 PM, Al Chu <chu11 at llnl.gov> wrote:
>
> [snip]
>
>> >
>> > Ira says that the output of the hops is actually "max hops used to get
>> > from my port to another port during my search of the network".  So the
>> > number could change if (hypotehtical example) depth-first-search were
>> > used instead of BFS.
>>
>> Sure; it can depend on how the search is done but isn't it the max
>> from the initiated node (which could be different depending on the
>> algo used) ? Using that number seems dangerous for that very reason. I
>> always thought that number was "nice" to have but nothing more. It
>> predated my work on ibnetdiscover.
>>
>> -- Hal
>>
>
>
> From: Ira Weiny <weiny2 at llnl.gov>
> Date: Wed, 6 May 2009 17:56:23 -0700
> Subject: [PATCH] ibnetdiscover: remove report of max hops discovered.
>
>
> Signed-off-by: Ira Weiny <weiny2 at llnl.gov>
> ---
>  infiniband-diags/src/ibnetdiscover.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/infiniband-diags/src/ibnetdiscover.c b/infiniband-diags/src/ibnetdiscover.c
> index 1799618..89e4f0f 100644
> --- a/infiniband-diags/src/ibnetdiscover.c
> +++ b/infiniband-diags/src/ibnetdiscover.c
> @@ -448,7 +448,6 @@ dump_topology(int group, ibnd_fabric_t *fabric)
>        struct iter_user_data iter_user_data;
>
>        fprintf(f, "#\n# Topology file: generated on %s#\n", ctime(&t));
> -       fprintf(f, "# Max of %d hops discovered\n", fabric->maxhops_discovered);
>        fprintf(f, "# Initiated from node %016" PRIx64 " port %016" PRIx64 "\n",
>                fabric->from_node->guid,
>                mad_get_field64(fabric->from_node->info, 0, IB_NODE_PORT_GUID_F));
> --
> 1.5.4.5
>
>



More information about the general mailing list