Blame include/opensm/osm_ucast_lash.h

Packit 13e616
/*
Packit 13e616
 * Copyright (c) 2008,2009 System Fabric Works, Inc. All rights reserved.
Packit 13e616
 * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.
Packit 13e616
 * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved.
Packit 13e616
 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
Packit 13e616
 * Copyright (c) 2007      Simula Research Laboratory. All rights reserved.
Packit 13e616
 * Copyright (c) 2007      Silicon Graphics Inc. All rights reserved.
Packit 13e616
 *
Packit 13e616
 * This software is available to you under a choice of one of two
Packit 13e616
 * licenses.  You may choose to be licensed under the terms of the GNU
Packit 13e616
 * General Public License (GPL) Version 2, available from the file
Packit 13e616
 * COPYING in the main directory of this source tree, or the
Packit 13e616
 * OpenIB.org BSD license below:
Packit 13e616
 *
Packit 13e616
 *     Redistribution and use in source and binary forms, with or
Packit 13e616
 *     without modification, are permitted provided that the following
Packit 13e616
 *     conditions are met:
Packit 13e616
 *
Packit 13e616
 *      - Redistributions of source code must retain the above
Packit 13e616
 *        copyright notice, this list of conditions and the following
Packit 13e616
 *        disclaimer.
Packit 13e616
 *
Packit 13e616
 *      - Redistributions in binary form must reproduce the above
Packit 13e616
 *        copyright notice, this list of conditions and the following
Packit 13e616
 *        disclaimer in the documentation and/or other materials
Packit 13e616
 *        provided with the distribution.
Packit 13e616
 *
Packit 13e616
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Packit 13e616
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 13e616
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Packit 13e616
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
Packit 13e616
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
Packit 13e616
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
Packit 13e616
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Packit 13e616
 * SOFTWARE.
Packit 13e616
 *
Packit 13e616
 */
Packit 13e616
Packit 13e616
/*
Packit 13e616
 * Abstract:
Packit 13e616
 *      Declarations for LASH algorithm
Packit 13e616
 */
Packit 13e616
Packit 13e616
#ifndef OSM_UCAST_LASH_H
Packit 13e616
#define OSM_UCAST_LASH_H
Packit 13e616
Packit 13e616
#include <opensm/osm_mesh.h>
Packit 13e616
Packit 13e616
enum {
Packit 13e616
	UNQUEUED,
Packit 13e616
	Q_MEMBER,
Packit 13e616
	MST_MEMBER,
Packit 13e616
	MAX_INT = 9999,
Packit 13e616
	NONE = MAX_INT
Packit 13e616
};
Packit 13e616
Packit 13e616
typedef struct _cdg_vertex {
Packit 13e616
	int from;
Packit 13e616
	int to;
Packit 13e616
	int seen;
Packit 13e616
	int temp;
Packit 13e616
	int visiting_number;
Packit 13e616
	struct _cdg_vertex *next;
Packit 13e616
	int num_temp_depend;
Packit 13e616
	int num_using_vertex;
Packit 13e616
	int num_deps;
Packit 13e616
	struct vertex_deps {
Packit 13e616
		struct _cdg_vertex *v;
Packit 13e616
		int num_used;
Packit 13e616
	} deps[0];
Packit 13e616
} cdg_vertex_t;
Packit 13e616
Packit 13e616
typedef struct _switch {
Packit 13e616
	osm_switch_t *p_sw;
Packit 13e616
	int id;
Packit 13e616
	int used_channels;
Packit 13e616
	int *dij_channels;
Packit 13e616
	int q_state;
Packit 13e616
	mesh_node_t *node;
Packit 13e616
	struct routing_table {
Packit 13e616
		unsigned out_link;
Packit 13e616
		unsigned lane;
Packit 13e616
	} routing_table[0];
Packit 13e616
} switch_t;
Packit 13e616
Packit 13e616
typedef struct _lash {
Packit 13e616
	osm_opensm_t *p_osm;
Packit 13e616
	int num_switches;
Packit 13e616
	uint8_t vl_min;
Packit 13e616
	int balance_limit;
Packit 13e616
	switch_t **switches;
Packit 13e616
	cdg_vertex_t ****cdg_vertex_matrix;
Packit 13e616
	int num_mst_in_lane[IB_MAX_NUM_VLS];
Packit 13e616
	int ***virtual_location;
Packit 13e616
} lash_t;
Packit 13e616
Packit 13e616
#endif