2
* Copyright (c) 2004 Mellanox Technologies LTD. All rights reserved.
4
* This software is available to you under a choice of one of two
5
* licenses. You may choose to be licensed under the terms of the GNU
6
* General Public License (GPL) Version 2, available from the file
7
* COPYING in the main directory of this source tree, or the
8
* OpenIB.org BSD license below:
10
* Redistribution and use in source and binary forms, with or
11
* without modification, are permitted provided that the following
14
* - Redistributions of source code must retain the above
15
* copyright notice, this list of conditions and the following
18
* - Redistributions in binary form must reproduce the above
19
* copyright notice, this list of conditions and the following
20
* disclaimer in the documentation and/or other materials
21
* provided with the distribution.
23
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
#ifndef IBDM_SUBN_MGT_H
36
#define IBDM_SUBN_MGT_H
42
The file holds a set of utilities to be run on the subnet to mimic OpenSM
43
initialization and analyze the results:
45
Assign Lids: SubnMgtAssignLids
46
Init min hop tables: SubnMgtCalcMinHopTables
47
Perform Enhanced LMC aware routing: SubnMgtOsmEnhancedRoute
48
Perform standard routing: SubnMgtOsmRoute
49
Verify all CA to CA routes: SubnMgtVerifyAllCaToCaRoutes
54
int SubnMgtAssignLids (IBPort *p_smNodePort, unsigned int lmc = 0);
56
// Calculate the minhop table for the switches
57
int SubnMgtCalcMinHopTables (IBFabric *p_fabric);
59
// Fill in the FDB tables in an OpesnSM style routing
60
// which is switch based, uses number of routes per port
61
// profiling and treat LMC assigned lids sequentialy
62
// Rely on running the SubnMgtCalcMinHopTables beforehand
64
SubnMgtOsmRoute(IBFabric *p_fabric);
66
// Fill in the FDB tables in an OpesnSM style routing
67
// which is switch based, uses number of routes per port
68
// profiling and treat LMC assigned lids sequentialy.
69
// Also it will favor runing through a new system or node
70
// on top of the port profile.
71
// Rely on running the SubnMgtCalcMinHopTables beforehand
73
SubnMgtOsmEnhancedRoute(IBFabric *p_fabric);
75
// Perform Fat Tree specific routing by assigning a single LID to
76
// each root node port a single LID to route through.
78
SubnMgtFatTreeRoute(IBFabric *p_fabric);
80
// Verify All CA to CA connectivity
82
SubnMgtVerifyAllCaToCaRoutes(IBFabric *p_fabric);
84
// Verify all point to point connectivity
86
SubnMgtVerifyAllRoutes(IBFabric *p_fabric);
88
// Calc Up/Down min hop tables using the given ranking per node
90
SubnMgtCalcUpDnMinHopTbls(IBFabric *p_fabric , map_pnode_int &nodesRank);
92
//Calc by Up-Down Min Hop Algorithm the Switch Tables
94
SubnMgtCalcUpDnMinHopTblsByRootNodesRex(IBFabric *p_fabric , char * rootNodesNameRex);
96
// Analyze the fabric to find its root nodes assuming it is
97
// a pure tree (keeping all levels in place).
99
SubnMgtFindTreeRootNodes(IBFabric *p_fabric);
101
// Analyze the fabric to find its root nodes using statistical methods
102
// on the profiles of min hops to CAs
104
SubnMgtFindRootNodesByMinHop(IBFabric *p_fabric);
106
// Given a list of root nodes mark them with a zero rank
107
// Then BFS and rank min
108
// note we use the provided map of IBNode* to int for storing the rank
110
SubnRankFabricNodesByRootNodes(
111
IBFabric *p_fabric, list_pnode rootNodes, map_pnode_int &nodesRank);
113
// Find any routes that exist in the FDB's from CA to CA and do not adhare to
114
// the up/down rules. Report any crossing of the path.
116
SubnReportNonUpDownCa2CaPaths(IBFabric *p_fabric, map_pnode_int &nodesRank);
118
// Check all multicast groups :
119
// 1. all switches holding it are connected
120
// 2. No loops (i.e. a single BFS with no returns).
121
int SubnMgtCheckFabricMCGrps(IBFabric *p_fabric);
123
// Check all multicast groups do not have credit loop potential
125
SubnMgtCheckFabricMCGrpsForCreditLoopPotential(
126
IBFabric *p_fabric, map_pnode_int &nodesRank);
128
// Provide sets of port pairs to run BW check from in a way that is
129
// full bandwidth. Reide in LinkCover.cpp
131
LinkCoverageAnalysis(IBFabric *p_fabric, list_pnode rootNodes);
133
// Perform FatTree analysis
135
FatTreeAnalysis(IBFabric *p_fabric);
137
// Perform FatTree optimal permutation routing
139
FatTreeRouteByPermutation(IBFabric* p_fabric, char* srcs, char* dsts);
141
#endif /* IBDM_SUBN_MGT_H */