[openib-general] Forwarding tables
Hal Rosenstock
halr at voltaire.com
Wed Dec 6 03:33:57 PST 2006
Hi Chev,
On Wed, 2006-12-06 at 05:52, Chevchenkovic Chevchenkovic wrote:
> Hi,
> I would like to write my own forwarding table to be used by openSM.
> I hope some expert here would help me out in this.
> 1. How do I write the new table in a file. What is the format used
> and wht are the commands to be used while loading openS?
Run dump_lfts.sh on a subnet to see the file format used for loading.
> 2; Which part of the code should I modify so as to incorporate this
> changing of linear forwarding tables in the code itself.
None if you just want to load it from a file. See opensm man page. The
options are:
-R, --routing_engine
This option chooses routing engine instead of Min Hop algorithm
(default). Supported engines: updn, file
-M, --lid_matrix_file
This option specifies the name of the lid matrix dump file from
where switch lid matrices (min hops tables will be loaded.
Also, see osm/doc/modular-routing.doc in the svn or git repository for
userspace management.
If you do want to write an algorithm, then there is some "intrusive"
work to do. Is file based sufficient for now ? Will you be adding an
additional routing algorithm ? Or do you just want to experiment for now
?
-- Hal
> Help would b very much apreciared.
> Best Wishes,
> -Chev
>
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
-------------- next part --------------
Modular Routine Engine
Modular routing engine structure has been added to allow
for ease of "plugging" new routing modules.
Currently, only unicast callbacks are supported. Multicast
can be added later.
One existing routing module is up-down "updn", which may be
activate with '-R updn' option (instead of old '-u').
General usage is:
$ opensm -R 'module-name'
There is also a trivial routing module which is able
to load LFT tables from a 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 (such as "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)
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
This script is dump_lfts.sh
In order to activate new module use:
opensm -R file -U /path/to/dump_file
If the dump_file is not found or is in error, the default routing
algorithm is utilized.
The ability to dump switch lid matrices (aka min hops tables) to file and
later to load these is also supported.
The usage is similar to unicast forwarding tables loading from dump
file (introduced by 'file' routing engine), but new lid matrix file
name should be specified by -M or --lid_matrix_file option. For example:
opensm -R file -M ./opensm-lid-matrix.dump
The dump file is named 'opensm-lid-matrix.dump' and will be generated in
standard opensm dump directory (/var/log by default) when
OSM_LOG_ROUTING logging flag is set.
When routing engine 'file' is activated, but dump file is not specified
or not cannot be open default lid matrix algorithm will be used.
There is also a switch forwarding tables dumper which generates
a file compatible with dump_lfts.sh output. This file can be used
as input for forwarding tables loading by 'file' routing engine.
Both or one of options -U and -M can be specified together with '-R file'.
NOTE: ibroute has been updated (for switch management ports) to support this.
Also, lmc was added to switch management ports. ibroute needs to be r7855 or
later from the trunk.
More information about the general
mailing list