|
Packit |
13e616 |
Modular Routine Engine
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
Modular routing engine structure has been added to allow
|
|
Packit |
13e616 |
for ease of "plugging" new routing modules.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
Currently, only unicast callbacks are supported. Multicast
|
|
Packit |
13e616 |
can be added later.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
One of existing routing modules is up-down "updn", which may
|
|
Packit |
13e616 |
be activated with '-R updn' option (instead of old '-u').
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
General usage is:
|
|
Packit |
13e616 |
$ opensm -R 'module-name'
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
There is also a trivial routing module which is able
|
|
Packit |
13e616 |
to load LFT tables from a file.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
Main features:
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
- this will load switch LFTs and/or LID matrices (min hops tables)
|
|
Packit |
13e616 |
- this will load switch LFTs according to the path entries introduced in
|
|
Packit |
13e616 |
the file
|
|
Packit |
13e616 |
- no additional checks will be performed (such as "is port connected", etc.)
|
|
Packit |
13e616 |
- in case when fabric LIDs were changed this will try to reconstruct LFTs
|
|
Packit |
13e616 |
correctly if endport GUIDs are represented in the file (in order
|
|
Packit |
13e616 |
to disable this GUIDs may be removed from the file or zeroed)
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
The file format is compatible with output of 'ibroute' util and for
|
|
Packit |
13e616 |
whole fabric may be generated with script like this:
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
for sw_lid in `ibswitches | awk '{print $NF}'` ; do
|
|
Packit |
13e616 |
ibroute $sw_lid
|
|
Packit |
13e616 |
done > /path/to/lfts_file
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
, or using DR paths:
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
for sw_dr in `ibnetdiscover -v \
|
|
Packit |
13e616 |
| sed -ne '/^DR path .* switch /s/^DR path \[\(.*\)\].*$/\1/p' \
|
|
Packit |
13e616 |
| sed -e 's/\]\[/,/g' \
|
|
Packit |
13e616 |
| sort -u` ; do
|
|
Packit |
13e616 |
ibroute -D ${sw_dr}
|
|
Packit |
13e616 |
done > /path/to/lfts_file
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
This script is dump_lfts.sh
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
In order to activate new module use:
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
opensm -R file -U /path/to/lfts_file
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
If the lfts_file is not found or is in error, the default routing
|
|
Packit |
13e616 |
algorithm is utilized.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
The ability to dump switch lid matrices (aka min hops tables) to file and
|
|
Packit |
13e616 |
later to load these is also supported.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
The usage is similar to unicast forwarding tables loading from a lfts
|
|
Packit |
13e616 |
file (introduced by 'file' routing engine), but new lid matrix file
|
|
Packit |
13e616 |
name should be specified by -M or --lid_matrix_file option. For example:
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
opensm -R file -M ./opensm-lid-matrix.dump
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
The dump file is named 'opensm-lid-matrix.dump' and will be generated in
|
|
Packit |
13e616 |
standard opensm dump directory (/var/log by default) when
|
|
Packit |
13e616 |
OSM_LOG_ROUTING logging flag is set.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
When routing engine 'file' is activated, but the lfts file is not specified
|
|
Packit |
13e616 |
or cannot be opened, the default lid matrix algorithm will be used.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
There is also a switch forwarding tables dumper which generates
|
|
Packit |
13e616 |
a file compatible with dump_lfts.sh output. This file can be used
|
|
Packit |
13e616 |
as input for forwarding tables loading by 'file' routing engine.
|
|
Packit |
13e616 |
Both or one of options -U and -M can be specified together with '-R file'.
|
|
Packit |
13e616 |
|
|
Packit |
13e616 |
NOTE: ibroute has been updated (for switch management ports) to support this.
|
|
Packit |
13e616 |
Also, lmc was added to switch management ports. ibroute needs to be r7855 or
|
|
Packit |
13e616 |
later from the trunk.
|
|
Packit |
13e616 |
|