ibdmsh IB DATA MODEL - Extentended TCL shell ibdmsh is a TCL shell extended with interface for the IB data model. To use this shell you will write TCL code that directly access the IB data model objects and functions. The following sub sections provide detailed definition for those objects and API.

Node Types
The following constants are used by the node object type field [ Constant : int ] $IB_UNKNOWN_NODE_TYPE = IB_UNKNOWN_NODE_TYPE [ Constant : int ] $IB_SW_NODE = IB_SW_NODE [ Constant : int ] $IB_CA_NODE = IB_CA_NODE

Log Verbosity Flags
The following constants are used as argument bits for the global variable $FabricUtilsVerboseLevel [ Constant : int ] $FABU_LOG_NONE = 0x0 [ Constant : int ] $FABU_LOG_ERROR = 0x1 [ Constant : int ] $FABU_LOG_INFO = 0x2 [ Constant : int ] $FABU_LOG_VERBOSE = 0x4 Log level: set to FABU_LOG* values [ Global : int ] $FabricUtilsVerboseLevel This section decribes the various object types exposed by IBDM. IBDM exposes some of its internal objects. The objects identifiers returned by the various function calls are formatted according to the following rules: Fabric: fabric:<idx> System: system:<fab idx>:<sys name> SysPort: sysport:<fab idx>:<sys name>:<port name> Node: node:<fab idx>:<node name> Port: port:<fab idx>:<node name>/<port num> IBDM Objects are standard Swig-Tcl objects. As such they have two flavors for their usage: Variables, Objects. Variables/Pointers: For each object attribute a "get" and "set" methods are provided. The format of the methods is: <class>_<attribute>_<get|set>. The "set" method is only available for read/write attributes. Example: set nodes [ibdm_get_nodes] set node [lindex $nodes 0] IBNode_numPorts_get $node Objects: Given an object pointer one can convert it to a Tcl "Object" using the following command: <class> <obj_name> -this <obj pointer> Once declared the <obj-name> can be used in conjunction to with the standard "configure" and "cget" commands. Example (following the previous one): IBFabric VaTech -this $fabric VaTech cget -NodeByName To delete an object symbol (and enable its mapping to another pointer) use: rename <obj name> "" for example: rename VaTech ""

class IBPort
The following are the different fields and methods of the IB Port class which describes an IB device (chip) physical port. Port connected on the other side of link The system port (if any) connected to The node the port is part of. Physical ports are identified by number. The base lid assigned to the port. The link width of the port The link speed of the port A generic value to be used by various algorithms IBPort constructor Obtain the guid of the port Modify the guid of the port Get the port name: A device port connected to system port (front pannel) returns the front pannel port name. Connect the port to another node port with optional width and speed parameters Disconnect the port. Return 0 if successful

class IBNode
The IB Node class represents a single IB Device (chip) Name of the node (instance name of the chip) Either a $IB_SW_NODE or $IB_CA_NODE The device ID of the node The device revision Id. The device Vendor ID. Comma-sep string of arbitrary attributes k=v The rank of the node (0 is a root) What system we belong to What fabric we belong to. Number of physical ports Vector of all the ports A table of the number of hops required to get from each port to each target LID The LFT of this node (for switches only) which is a long vector of target ports - index is the LID Obtain the node GUID Set the node GUID Constractor Create a new port by its number (if required) return the port pointer Get a port by number num = 1..N: Set the min hop for the given port (* is all) lid pair Get the min number of hops defined for the given port or all Scan the node ports and find the first port with min hop to the lid Set the Linear Forwarding Table for the given LID Get the LFT for a given LID Dump out the min hop table of the node

class IBSysPort
The IBSysPort class represents an IB plug on the system front or back pannels The front pannel name (silk) of the port If connected the other side sys port System it benongs to The node port it connects to. Constructor Connect two SysPorts Disconnect the SysPort (and ports). Return 0 if successful

class IBSystem
The IBSystem class represents an entire chassis The "host" name of the system What is the type i.e. Cougar, Buffalo, MTS2400, etc. A corresponding IBNL file should exist - defining this system type Fabric the system belongs to Provide the node pointer by its name A map provising pointer to the SysPort by name Constractor Obtain the system image GUID Set the system image GUID Make sure we got the port defined (so define it if not) Get the node port for the given sys port by name Get a Sys Port by name

class IBFabric
Represents an entire IB subnet made of systems Provide a list of node name and pointer pairs Provide a list of system name and pointer pairs Provides a list of system port name and pointer pairs Provides a list of node guid and node pointer pairs Provides a list of system image guid and system pointer pairs Provides a list of port guid and port pointer pairs Track min lid used. Track max lid used. LMC value used Get the node by its name (create one of does not exist) Get the node by its name Return the list of node pointers matching the required type Create a new generic system - basically an empty container for nodes... Create a new system - the type must have a registed factory. Get system by name get the system by its guid get the node by its guid get the port by its guid Adds a cable given two sets of node type, node name and port number. Optionally use a given width and speed for the connection Parse the cables file and build the fabric Parse Topology File and build the fabric Add a link into the fabric - this will create system and nodes as required. Parse the OpenSM subnet.lst file and build the fabric from it. Parse OpenSM FDB dump file and fill in the switches LFT tables Parse an OpenSM MCFDBs file and set the MFT table accordingly Parse Path to SL mapping file. Each line with: src_node_guid DLID SL Used by credit loop check Parse SLVL tables file. Each line holds: sw_node_guid in_port out_port 0x(sl0)(sl1) 0x(sl2)(sl3)... Set a lid port Get a port by lid Construct a new fabric Destruct a fabric This section provide the details about the functions IBDM exposes. The order follows the expected order in a regular IBDM flow. They all return 0 on succes.

Subnet Utilities
The file holds a set of utilities to be run on the subnet to mimic OpenSM initialization and analyze the results: Assign LIDs with an optional LMC (multiple LID per port) Calculate and populate the MinHopTables required for running OpenSM style routing. Calculate and populate the MinHopTables following Up/Down rule. Route the fabric with OpenSM style routing Route the fabric with OpenSM style routing enhanced with better support for LMC > 0 Route the fabric using algorithm that fits only full fat trees Analyze the fabric to see if it is a fat tree and route it if it is Make sure all (H)CAs are connected to each other based on the LFT settings Make sure all Switches and (H)CAs are connected to each other based on the LFT settings A rigorous check for credit loops. This algorithm does a full and accurate check but its reporting of credit loop paths is hard to interpret. If you know the roots of the tree (or the tree is symmetrical) it is preferable to use the ibdmReportNonUpDownCa2CaPaths Analyze the tree topology and find the roots of the tree based on its symmetry Based on the MinHopTable find the roots of the tree. A 5% assymetry is allowed Given the list of root nodes (names) rank the nodes (root = 0) Analyze the routes to make sure Up/Down rule is maintained Verify connectivity of multicast routing Analyze multicast routing to make sure it obeys Up/Down rule Prepare a schedule for transmission from a set of sources to destinations such that in each stage there are no links that are over subscribed and after all stages all the links of the fabric were excersized

Tracing Utilities
These functions allows tracing paths reporting back the visited nodes Trace a directed route path from the given port Trace a path along the MinHop from the source to destination LIDs Trace a path following the LFT updating the hops and node list variables

Topology Matching Utilities
The following utilities matches two fabrics providing both missmatch messages and a unified fabric Match a topology based fabric with a discovered one starting at the enchor port After matching using ibdmMatchFabrics populate the "merged fabric" with information merged for the matched nodes

Congestion Analysis Utilities
Provide ability to track and report link oversubscription Initialize the tracking system Cleanup the counters and deallocate Cleanup counters Trace a path between the LIDs updating link usage info Report the resulting congestion information Dump all congestion tracking info Eitan Zahavi, Mellanox Technologies LTD, eitan@mellanox.co.il