~ubuntu-branches/ubuntu/raring/ibutils/raring-proposed

« back to all changes in this revision

Viewing changes to ibdm/ibdm/SubnMgt.h

  • Committer: Bazaar Package Importer
  • Author(s): Benoit Mortier
  • Date: 2010-01-11 22:22:00 UTC
  • Revision ID: james.westby@ubuntu.com-20100111222200-53kum2et5nh13rv3
Tags: upstream-1.2-OFED-1.4.2
ImportĀ upstreamĀ versionĀ 1.2-OFED-1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2004 Mellanox Technologies LTD. All rights reserved.
 
3
 *
 
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:
 
9
 *
 
10
 *     Redistribution and use in source and binary forms, with or
 
11
 *     without modification, are permitted provided that the following
 
12
 *     conditions are met:
 
13
 *
 
14
 *      - Redistributions of source code must retain the above
 
15
 *        copyright notice, this list of conditions and the following
 
16
 *        disclaimer.
 
17
 *
 
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.
 
22
 *
 
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
 
30
 * SOFTWARE.
 
31
 *
 
32
 * $Id$
 
33
 */
 
34
 
 
35
#ifndef IBDM_SUBN_MGT_H
 
36
#define IBDM_SUBN_MGT_H
 
37
 
 
38
/*
 
39
 
 
40
  Subnet Utilities:
 
41
 
 
42
  The file holds a set of utilities to be run on the subnet to mimic OpenSM
 
43
  initialization and analyze the results:
 
44
 
 
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
 
50
 
 
51
*/
 
52
 
 
53
// Assign lids
 
54
int SubnMgtAssignLids (IBPort *p_smNodePort, unsigned int lmc = 0);
 
55
 
 
56
// Calculate the minhop table for the switches
 
57
int SubnMgtCalcMinHopTables (IBFabric *p_fabric);
 
58
 
 
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
 
63
int
 
64
SubnMgtOsmRoute(IBFabric *p_fabric);
 
65
 
 
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
 
72
int
 
73
SubnMgtOsmEnhancedRoute(IBFabric *p_fabric);
 
74
 
 
75
// Perform Fat Tree specific routing by assigning a single LID to
 
76
// each root node port a single LID to route through.
 
77
int
 
78
SubnMgtFatTreeRoute(IBFabric *p_fabric);
 
79
 
 
80
// Verify All CA to CA connectivity
 
81
int
 
82
SubnMgtVerifyAllCaToCaRoutes(IBFabric *p_fabric);
 
83
 
 
84
// Verify all point to point connectivity
 
85
int
 
86
SubnMgtVerifyAllRoutes(IBFabric *p_fabric);
 
87
 
 
88
// Calc Up/Down min hop tables using the given ranking per node
 
89
int
 
90
SubnMgtCalcUpDnMinHopTbls(IBFabric *p_fabric , map_pnode_int &nodesRank);
 
91
 
 
92
//Calc by Up-Down Min Hop Algorithm the Switch Tables
 
93
int
 
94
SubnMgtCalcUpDnMinHopTblsByRootNodesRex(IBFabric *p_fabric , char * rootNodesNameRex);
 
95
 
 
96
// Analyze the fabric to find its root nodes assuming it is
 
97
// a pure tree (keeping all levels in place).
 
98
list_pnode
 
99
SubnMgtFindTreeRootNodes(IBFabric *p_fabric);
 
100
 
 
101
// Analyze the fabric to find its root nodes using statistical methods
 
102
// on the profiles of min hops to CAs
 
103
list_pnode
 
104
SubnMgtFindRootNodesByMinHop(IBFabric *p_fabric);
 
105
 
 
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
 
109
int
 
110
SubnRankFabricNodesByRootNodes(
 
111
  IBFabric *p_fabric, list_pnode rootNodes, map_pnode_int &nodesRank);
 
112
 
 
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.
 
115
int
 
116
SubnReportNonUpDownCa2CaPaths(IBFabric *p_fabric, map_pnode_int &nodesRank);
 
117
 
 
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);
 
122
 
 
123
// Check all multicast groups do not have credit loop potential
 
124
int
 
125
SubnMgtCheckFabricMCGrpsForCreditLoopPotential(
 
126
  IBFabric *p_fabric, map_pnode_int &nodesRank);
 
127
 
 
128
// Provide sets of port pairs to run BW check from in a way that is
 
129
// full bandwidth. Reide in LinkCover.cpp
 
130
int
 
131
LinkCoverageAnalysis(IBFabric *p_fabric, list_pnode rootNodes);
 
132
 
 
133
// Perform FatTree analysis
 
134
int
 
135
FatTreeAnalysis(IBFabric *p_fabric);
 
136
 
 
137
// Perform FatTree optimal permutation routing
 
138
int
 
139
FatTreeRouteByPermutation(IBFabric* p_fabric, char* srcs, char* dsts);
 
140
 
 
141
#endif /* IBDM_SUBN_MGT_H */
 
142