[openib-general] [PATCH 3/4] New routing module which loads LFT tables from dump file.

Sasha Khapyorsky sashak at voltaire.com
Tue Jun 13 14:36:06 PDT 2006


Hi Eitan,

On 14:30 Tue 13 Jun     , Eitan Zahavi wrote:
> Hi Sasha,
> 
> Please see my comments inside
> 
> Sasha Khapyorsky wrote:
> >This patch implements trivial routing module which able to load LFT
> >tables from dump file. Main features:
> >- support for unicast LFTs only, support for multicast can be added later
> >- this will run after min hop matrix calculation
> >- this will load switch LFTs according to the path entries introduced in
> >  the dump file
> >- no additional checks will be performed (like is port connected, etc)
> >- in case when fabric LIDs were changed this will try to reconstruct LFTs
> >  correctly if endport GUIDs are represented in the dump file (in order
> >  to disable this GUIDs may be removed from the dump file or zeroed)
> I think you cold use the concept of directed routes for storing the LIDs 
> too.

Maybe. But there is one disadvantage - such dump file will be node
dependent, we will not be able to generate it on one node and load on
another. Anyway the goal of LID/GUID checking is to provide minimal
fixing for trivial case and not to limit the subnet administrator in
what He/She wants to do.

> So in case of new LID assignments you can extract the old -> new mapping by
> scanning the LIDs of end ports by their DR path.

I do it with GUID.

> Anyway, I think it is required that you also perform topology matching such 
> that
> if someone changed the topology you are able to figure it out and stop.
> THIS IS A SERIOUS LIMITATION OF YOUR PROPOSAL.

I think this is limitation of the subnet administrator's choice - one may
want to create LFT with entries for yet not connected nodes.

If you are about more "safe" dump loader, this may be done (and the code
may be reused), but I think this should be different routing method.

> >The dump file format is compatible with output of 'ibroute' util and for
> >whole fabric may be generated with script like this:
> >
> >  for sw_lid in `ibswitches | awk '{print $NF}'` ; do
> >	ibroute $sw_lid
> >  done > /path/to/dump_file
> >
> >, or using DR paths:
> >
> >
> >  for sw_dr in `ibnetdiscover -v \
> >		| sed -ne '/^DR path .* switch /s/^DR path 
> >		\[\(.*\)\].*$/\1/p' \
> >		| sed -e 's/\]\[/,/g' \
> >		| sort -u` ; do
> >	ibroute -D ${sw_dr}
> >  done > /path/to/dump_file
> WE SHOULD ALSO PROVIDE A DUMP FILE VIA:
> 1. OpenSM should dump its routes using this format (like it does today 
> using osm.fdbs)

In this way you may generate dump with LFTs created only by OpenSM (and
not by other SMs). This is unnecessary limitation for primary method.

However I agree that as additional method this may be good and useful.
Please feel free to provide the path for this.

> 2. ibdiagnet

Ditto

> >
> >
> >
> >diff --git a/osm/include/opensm/osm_subnet.h 
> >b/osm/include/opensm/osm_subnet.h
> >index a637367..ec1d056 100644
> >--- a/osm/include/opensm/osm_subnet.h
> >+++ b/osm/include/opensm/osm_subnet.h
> >@@ -423,6 +424,10 @@ typedef struct _osm_subn_opt
> > *  routing_engine_name
> > *     Name of used routing engine (other than default Min Hop Algorithm)
> > *
> >+*  ucast_dump_file
> >+*     Name of the unicast routing dump file from where switch
> >+*     forwearding tables will be loaded
>          ^^^^^^^^^^^
>          forwarding

Thanks. Will fix.

> >+						  "cannot parse port guid "
> >+						  "(maybe broken dump): "
> >+						  "\'%s\'\n", p);
> >+					port_guid = 0;
> >+				}
> >+			}
> >+			port_guid = cl_hton64(port_guid);
> >+			add_path(p_osm, p_sw, lid, port_num, port_guid);
> >+		}
> >+	}
> >+
> >+	fclose(file);
> >+	return 0;
> >+}
> In OpenSM we write with style:
> if () {
> }
> else if ()
> {
> }
> else
> {
> }
> 
> Not any other combination

Really? Don't want to bother with examples, but I may see almost any
"combination" in OpenSM and it is not clear for me which one is common
(the coding style and identation are different even from file to file).

Thanks for comments.
Sasha




More information about the general mailing list