IBDMSH(1)
๐ IBDMSH โ the InfiniBand data model shell
okay so you've opened IBDMSH(1), straight out of the IB DATA MODEL PACKAGE manual. Settle in bestie, this one's a long one. ๐
๐ธ NAME
ibdmsh โ InfiniBand data model โ an extended TCL shell โจ
(yes the manpage itself says "extentended". we love a typo. we keep the typo. iykyk ๐ )
๐ฆ DESCRIPTION
ibdmsh is a TCL shell that's been glowed up with an interface for the IB data model. Basically? You write TCL code, and that TCL code reaches directly into the IB data model objects and functions. No middleman, no wrapper, just vibes and direct access. ๐ฅ
The little sub-sections below are where the actual definitions live โ every object and every API call gets its moment. Let's get into it.
๐ฎ IBDM Constants
๐ Node Types
These constants are what the node object's type field is out here using. Main character constants, fr fr. ๐
[ 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
IB_UNKNOWN_NODE_TYPEโ the "we genuinely do not know what this is" node type. it's giving mystery. ๐IB_SW_NODEโ a switch node. ๐IB_CA_NODEโ a channel adapter node. ๐
๐ง Log Verbosity Flags
These are the constants you use as argument bits for the global variable $FabricUtilsVerboseLevel. Think of them as the volume dial for how much the logs are gonna yap at you. ๐ฃ๏ธ
[ Constant : int ] $FABU_LOG_NONE = 0x0
[ Constant : int ] $FABU_LOG_ERROR = 0x1
[ Constant : int ] $FABU_LOG_INFO = 0x2
[ Constant : int ] $FABU_LOG_VERBOSE = 0x4
$FABU_LOG_NONE=0x0โ silence. not a peep. ๐$FABU_LOG_ERROR=0x1โ only errors, only when things go wrong. ๐ญ$FABU_LOG_INFO=0x2โ the normal informative level. ๐$FABU_LOG_VERBOSE=0x4โ verbose mode, it will tell you everything. obsessed. โจ
๐ซ IBDM Globals
Log level: set this one to the FABU_LOG* values above, bestie. โฌ๏ธ
[ Global : int ] $FabricUtilsVerboseLevel
heads up: this is a global, so it's not just hanging out in one little corner โ it's the mood of the whole shell. set it once, and everything downstream reads it. ๐ซถ
and that's just the setup, the lore, the groundworkโฆ there's so much more coming ๐
โจ IBDM Objects โจ
okay so bestie, this section is literally the whole cast of characters IBDM lets you play with ๐ It describes the various object types exposed by IBDM.
IBDM exposes some of its internal objects. The object identifiers returned by the various function calls are formatted according to these rules โ memorize them, they're the group-chat handles of the fabric world:
- 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. Two vibes, one icon โจ
๐ 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 โ read-only ones said no thanks, periodt.
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. (Yes bestie, "in conjunction to with" is exactly what the original says, I don't make the rules ๐ญ)
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.
- [ Member data: returns
IBPort *]-p_remotePortโ Port connected on the other side of link - [ Member data: returns
IBSysPort *]-p_sysPortโ The system port (if any) connected to - [ Member data: returns
IBNode *]-p_nodeโ The node the port is part of. - [ Member data: returns
int]-numโ Physical ports are identified by number. - [ Member data: returns
unsigned int]-base_lidโ The base lid assigned to the port. - [ Member data: returns
IBLinkWidth *]-widthโ The link width of the port - [ Member data: returns
IBLinkSpeed *]-speedโ The link speed of the port - [ Member data: returns
unsigned int]-counter1โ A generic value to be used by various algorithms - [ Constructor: returns
IBPort *]IBPort name p_nodePtr numberโ IBPort constructor - [ Member : returns
new_uint64_t]guid_getโ Obtain the guid of the port - [ Member : returns
void]guid_set guidโ Modify the guid of the port - [ Member : returns
new_string]getNameโ Get the port name: A device port connected to system port (front panel) returns the front panel port name. - [ Member : returns
void]connect p_otherPort ?width? ?speed?โ Connect the port to another node port with optional width and speed parameters - [ Member : returns
int]disconnectโ Disconnect the port. Return 0 if successful
๐ฆ class IBNode ๐ฆ
The IB Node class represents a single IB Device (chip)
- [ Member data: returns
string *]-nameโ Name of the node (instance name of the chip) - [ Member data: returns
IBNodeType]-typeโ Either a$IB_SW_NODEor$IB_CA_NODE - [ Member data: returns
uint16_t *]-devIdโ The device ID of the node - [ Member data: returns
uint16_t *]-revIdโ The device revision Id. - [ Member data: returns
uint16_t *]-vendIdโ The device Vendor ID. - [ Member data: returns
string *]-attributesโ Comma-sep string of arbitrary attributes k=v - [ Member data: returns
uint8_t]-rankโ The rank of the node (0 is a root) - [ Member data: returns
IBSystem *]-p_systemโ What system we belong to - [ Member data: returns
IBFabric *]-p_fabricโ What fabric we belong to. - [ Member data: returns
unsigned int]-numPortsโ Number of physical ports - [ Member data: returns
vec_pport *]-Portsโ Vector of all the ports - [ Member data: returns
vec_vec_byte *]-MinHopsTableโ A table of the number of hops required to get from each port to each target LID - [ Member data: returns
vec_byte *]-LFTโ The LFT of this node (for switches only) which is a long vector of target ports - index is the LID - [ Member : returns
new_uint64_t]guid_getโ Obtain the node GUID - [ Member : returns
void]guid_set guidโ Set the node GUID - [ Constructor: returns
IBNode *]IBNode name n p_fab p_sys t npโ Constractor - [ Member : returns
IBPort *]makePort numโ Create a new port by its number (if required) return the port pointer - [ Member : returns
IBPort *]getPort numโ Get a port by number num = 1..N: - [ Member : returns
void]setHops p_port lid hopsโ Set the min hop for the given port (* is all) lid pair - [ Member : returns
int]getHops p_port lidโ Get the min number of hops defined for the given port or all - [ Member : returns
IBPort *]getFirstMinHopPort lidโ Scan the node ports and find the first port with min hop to the lid - [ Member : returns
void]setLFTPortForLid lid portNumโ Set the Linear Forwarding Table for the given LID - [ Member : returns
int]getLFTPortForLid lidโ Get the LFT for a given LID - [ Member : returns
void]repHopTableโ Dump out the min hop table of the node
๐ class IBSysPort ๐
The IBSysPort class represents an IB plug on the system front or back panels
- [ Member data: returns
string *]-nameโ The front panel name (silk) of the port - [ Member data: returns
IBSysPort *]-p_remoteSysPortโ If connected the other side sys port - [ Member data: returns
IBSystem *]-p_systemโ System it benongs to - [ Member data: returns
IBPort *]-p_nodePortโ The node port it connects to. - [ Constructor: returns
IBSysPort *]IBSysPort name n p_sysโ Constructor - [ Member : returns
void]connect p_otherSysPort ?width? ?speed?โ Connect two SysPorts - [ Member : returns
int]disconnectโ Disconnect the SysPort (and ports). Return 0 if successful
๐ class IBSystem ๐
The IBSystem class represents an entire chassis
- [ Member data: returns
string *]-nameโ The "host" name of the system - [ Member data: returns
string *]-typeโ What is the type i.e. Cougar, Buffalo, MTS2400, etc. A corresponding IBNL file should exist - defining this system type - [ Member data: returns
IBFabric *]-p_fabricโ Fabric the system belongs to - [ Member data: returns
map_str_pnode *]-NodeByNameโ Provide the node pointer by its name - [ Member data: returns
map_str_psysport *]-PortByNameโ A map provising pointer to the SysPort by name - [ Constructor: returns
IBSystem *]IBSystem name n p_fab tโ Constractor - [ Member : returns
new_uint64_t]guid_getโ Obtain the system image GUID - [ Member : returns
void]guid_set guidโ Set the system image GUID - [ Member : returns
IBSysPort *]makeSysPort pNameโ Make sure we got the port defined (so define it if not) - [ Member : returns
IBPort *]getSysPortNodePortByName sysPortNameโ Get the node port for the given sys port by name - [ Member : returns
IBSysPort *]getSysPort nameโ Get a Sys Port by name
๐ class IBFabric ๐
Represents an entire IB subnet made of systems
- [ Member data: returns
map_str_pnode *]-NodeByNameโ Provide a list of node name and pointer pairs - [ Member data: returns
map_str_psys *]-SystemByNameโ Provide a list of system name and pointer pairs - [ Member data: returns
vec_pport *]-PortByLidโ Provides a list of system port name and pointer pairs - [ Member data: returns
map_guid_pnode *]-NodeByGuidโ Provides a list of node guid and node pointer pairs - [ Member data: returns
map_guid_psys *]-SystemByGuidโ Provides a list of system image guid and system pointer pairs - [ Member data: returns
map_guid_pport *]-PortByGuidโ Provides a list of port guid and port pointer pairs - [ Member data: returns
unsigned int]-minLidโ Track min lid used. - [ Member data: returns
unsigned int]-maxLidโ Track max lid used. - [ Member data: returns
unsigned int]-lmcโ LMC value used - [ Member : returns
IBNode *]makeNode n p_sys type numPortsโ Get the node by its name (create one of does not exist) - [ Member : returns
IBNode *]getNode nameโ Get the node by its name - [ Member : returns
list_pnode *]getNodesByType typeโ Return the list of node pointers matching the required type - [ Member : returns
IBSystem *]makeGenericSystem nameโ Create a new generic system - basically an empty container for nodes... - [ Member : returns
IBSystem *]makeSystem name typeโ Create a new system - the type must have a registered factory. - [ Member : returns
IBSystem *]getSystem nameโ Get system by name - [ Member : returns
IBSystem *]getSystemByGuid guidโ get the system by its guid - [ Member : returns
IBNode *]getNodeByGuid guidโ get the node by its guid - [ Member : returns
IBPort *]getPortByGuid guidโ get the port by its guid - [ Member : returns
void]addCable t1 n1 p1 t2 n2 p2 ?width? ?speed?โ Adds a cable given two sets of node type, node name and port number. Optionally use a given width and speed for the connection - [ Member : returns
int]parseCables fnโ Parse the cables file and build the fabric - [ Member : returns
int]parseTopology fnโ Parse Topology File and build the fabric - [ Member : returns
int]addLink type1 numPorts1 sysGuid1 nodeGuid1 portGuid1 vend1 devId1 rev1 desc1 lid1 portNum1 type2 numPorts2 sysGuid2 nodeGuid2 portGuid2 vend2 devId2 rev2 desc2 lid2 portNum2 ?width? ?speed?โ Add a link into the fabric - this will create system and nodes as required. - [ Member : returns
int]parseSubnetLinks fnโ Parse the OpenSM subnet.lst file and build the fabric from it. - [ Member : returns
int]parseFdbFile fnโ Parse OpenSM FDB dump file and fill in the switches LFT tables - [ Member : returns
int]parseMCFdbFile fnโ Parse an OpenSM MCFDBs file and set the MFT table accordingly - [ Member : returns
int]parsePSLFile fnโ Parse Path to SL mapping file. Each line with: src_node_guid DLID SL
Used by credit loop check
- [ Member : returns
int]parseSLVLFile fnโ Parse SLVL tables file. Each line holds: sw_node_guid in_port out_port 0x(sl0)(sl1) 0x(sl2)(sl3)... - [ Member : returns
void]setLidPort lid p_portโ Set a lid port - [ Member : returns
IBPort *]getPortByLid lidโ Get a port by lid - [ returns
IBFabric *]new_IBFabricโ Construct a new fabric - [ returns
void]delete_IBFabric p_fabricโ Destruct a fabric
๐ IBDM Functions ๐
This section provides the details about the functions IBDM exposes. The order follows the expected order in a regular IBDM flow. And the vibe check: they all return 0 on succes. Yes, succes โ that's the spelling in the source, and we are not fixing it, because it's part of the lore now. ๐๐
๐ธ Subnet Utilities ๐ธ
The file holds a set of utilities to be run on the subnet to mimic OpenSM initialization and analyze the results:
[ returns int ]ibdmAssignLidsp_smNodePort?lmc?โ Assign LIDs with an optional LMC (multiple LID per port)[ returns int ]ibdmCalcMinHopTablesp_fabricโ Calculate and populate the MinHopTables required for running OpenSM style routing.[ returns int ]ibdmCalcUpDnMinHopTblsp_fabricrootNodesNameRexโ Calculate and populate the MinHopTables following Up/Down rule.[ returns int ]ibdmOsmRoutep_fabricโ Route the fabric with OpenSM style routing[ returns int ]ibdmEnhancedRoutep_fabricโ Route the fabric with OpenSM style routing enhanced with better support for LMC > 0[ returns int ]ibdmFatTreeRoutep_fabricrootNodesโ Route the fabric using algorithm that fits only full fat trees[ returns int ]ibdmFatTreeAnalysisp_fabricโ Analyze the fabric to see if it is a fat tree and route it if it is[ returns int ]ibdmVerifyCAtoCARoutesp_fabricโ Make sure all (H)CAs are connected to each other based on the LFT settings[ returns int ]ibdmVerifyAllPathsp_fabricโ Make sure all Switches and (H)CAs are connected to each other based on the LFT settings[ returns int ]ibdmAnalyzeLoopsp_fabricโ 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 theibdmReportNonUpDownCa2CaPaths[ returns list_pnode ]ibdmFindSymmetricalTreeRootsp_fabricโ Analyze the tree topology and find the roots of the tree based on its symmetry[ returns list_pnode ]ibdmFindRootNodesByMinHopp_fabricโ Based on the MinHopTable find the roots of the tree. A 5% assymetry is allowed[ returns int ]ibdmRankFabricByRootsp_fabricrootNodesโ Given the list of root nodes (names) rank the nodes (root = 0)[ returns int ]ibdmReportNonUpDownCa2CaPathsp_fabricrootNodesโ Analyze the routes to make sure Up/Down rule is maintained[ returns int ]ibdmCheckMulticastGroupsp_fabricโ Verify connectivity of multicast routing[ returns int ]ibdmCheckFabricMCGrpsForCreditLoopPotentialp_fabricrootNodesโ Analyze multicast routing to make sure it obeys Up/Down rule[ returns int ]ibdmLinkCoverageAnalysisp_fabricrootNodesโ 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
[ returns int ]ibdmTraceDRPathRoutep_smNodePortdrPathPortNumsโ Trace a directed route path from the given port[ returns int ]ibdmTraceRouteByMinHopsp_fabricsliddlidโ Trace a path along the MinHop from the source to destination LIDs[ returns int ]ibdmTraceRouteByLFTp_fabricsliddlidhopsp_nodesListโ Trace a path following the LFT updating the hops and node list variables
๐ฆ Topology Matching Utilities ๐ฆ
The following utilities matches two fabrics providing both mismatch messages and a unified fabric
[ returns int ]ibdmMatchFabricsp_spec_fabricp_discovered_fabricanchorNodeNameanchorPortNumanchorPortGuidโ Match a topology based fabric with a discovered one starting at the enchor port[ returns int ]ibdmBuildMergedFabricp_spec_fabricp_discovered_fabricp_merged_fabricโ After matching usingibdmMatchFabricspopulate the "merged fabric" with information merged for the matched nodes
๐ Congestion Analysis Utilities ๐
Provide ability to track and report link oversubscription
[ returns int ]ibdmCongInitp_fabricโ Initialize the tracking system[ returns int ]ibdmCongCleanupp_fabricโ Cleanup the counters and deallocate[ returns int ]ibdmCongClearp_fabricโ Cleanup counters[ returns int ]ibdmCongTracep_fabricsrcLiddstLidโ Trace a path between the LIDs updating link usage info[ returns int ]ibdmCongReportp_fabricโ Report the resulting congestion information[ returns int ]ibdmCongDumpp_fabricโ Dump all congestion tracking info
๐ AUTHOR ๐
Eitan Zahavi, Mellanox Technologies LTD, eitan@mellanox.co.il
And that's the whole manual, bestie! This was IBDM 1.0, dated 2024-04-22, from the IBDMSH(1) page. Go route something iconic. ๐โจ
๐ฆ where this page comes from
- ubuntu noble: ibutils 1.5.7+0.2.gbd7e502-3build1
- ubuntu questing: ibutils 1.5.7+0.2.gbd7e502-3build1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms