1 /* 2 * Copyright (c) 2008,2009 System Fabric Works, Inc. All rights reserved. 3 * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved. 4 * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved. 5 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. 6 * Copyright (c) 2007 Simula Research Laboratory. All rights reserved. 7 * Copyright (c) 2007 Silicon Graphics Inc. All rights reserved. 8 * 9 * This software is available to you under a choice of one of two 10 * licenses. You may choose to be licensed under the terms of the GNU 11 * General Public License (GPL) Version 2, available from the file 12 * COPYING in the main directory of this source tree, or the 13 * OpenIB.org BSD license below: 14 * 15 * Redistribution and use in source and binary forms, with or 16 * without modification, are permitted provided that the following 17 * conditions are met: 18 * 19 * - Redistributions of source code must retain the above 20 * copyright notice, this list of conditions and the following 21 * disclaimer. 22 * 23 * - Redistributions in binary form must reproduce the above 24 * copyright notice, this list of conditions and the following 25 * disclaimer in the documentation and/or other materials 26 * provided with the distribution. 27 * 28 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 29 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 31 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 32 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 33 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 34 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 35 * SOFTWARE. 36 * 37 */ 38 39 /* 40 * Abstract: 41 * Declarations for LASH algorithm 42 */ 43 44 #ifndef OSM_UCAST_LASH_H 45 #define OSM_UCAST_LASH_H 46 47 #include <opensm/osm_mesh.h> 48 49 enum { 50 UNQUEUED, 51 Q_MEMBER, 52 MST_MEMBER, 53 MAX_INT = 9999, 54 NONE = MAX_INT 55 }; 56 57 typedef struct _cdg_vertex { 58 int from; 59 int to; 60 int seen; 61 int temp; 62 int visiting_number; 63 struct _cdg_vertex *next; 64 int num_temp_depend; 65 int num_using_vertex; 66 int num_deps; 67 struct vertex_deps { 68 struct _cdg_vertex *v; 69 int num_used; 70 } deps[0]; 71 } cdg_vertex_t; 72 73 typedef struct _switch { 74 osm_switch_t *p_sw; 75 int id; 76 int used_channels; 77 int *dij_channels; 78 int q_state; 79 mesh_node_t *node; 80 struct routing_table { 81 unsigned out_link; 82 unsigned lane; 83 } routing_table[0]; 84 } switch_t; 85 86 typedef struct _lash { 87 osm_opensm_t *p_osm; 88 int num_switches; 89 uint8_t vl_min; 90 int balance_limit; 91 switch_t **switches; 92 cdg_vertex_t ****cdg_vertex_matrix; 93 int num_mst_in_lane[IB_MAX_NUM_VLS]; 94 int ***virtual_location; 95 } lash_t; 96 97 #endif 98