split off dor into its own routing engine like other algorithms.

Al

-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
>From 8689b4447d9db47a200c8dcbdbcb8301ca323d42 Mon Sep 17 00:00:00 2001
From: Albert Chu <[EMAIL PROTECTED]>
Date: Fri, 12 Sep 2008 14:19:16 -0700
Subject: [PATCH] add dor routing files


Signed-off-by: Albert Chu <[EMAIL PROTECTED]>
---
 opensm/include/opensm/osm_ucast_dor.h |   70 +++++++++++++++++++++++++++++++++
 opensm/opensm/Makefile.am             |    4 +-
 opensm/opensm/osm_opensm.c            |    3 +-
 opensm/opensm/osm_ucast_dor.c         |   49 +++++++++++++++++++++++
 4 files changed, 124 insertions(+), 2 deletions(-)
 create mode 100644 opensm/include/opensm/osm_ucast_dor.h
 create mode 100644 opensm/opensm/osm_ucast_dor.c

diff --git a/opensm/include/opensm/osm_ucast_dor.h b/opensm/include/opensm/osm_ucast_dor.h
new file mode 100644
index 0000000..598163c
--- /dev/null
+++ b/opensm/include/opensm/osm_ucast_dor.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifndef _OSM_UCAST_DOR_H_
+#define _OSM_UCAST_DOR_H_
+
+#include <opensm/osm_opensm.h>
+#include <opensm/osm_ucast_mgr.h>
+
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS   }
+#else				/* !__cplusplus */
+#  define BEGIN_C_DECLS
+#  define END_C_DECLS
+#endif				/* __cplusplus */
+
+BEGIN_C_DECLS
+
+/****f* OpenSM: Unicast Dor/osm_ucast_dor_setup
+* NAME
+*	osm_ucast_dor_setup
+*
+* DESCRIPTION
+*	Setup routing engine with dor routing.
+*
+* SYNOPSIS
+*/
+int osm_ucast_dor_setup(IN osm_opensm_t * p_osm);
+/*
+* PARAMETERS
+*	p_mgr
+*		[in] Pointer to an osm_opensm_t object.
+*
+*********/
+
+END_C_DECLS
+#endif				/* _OSM_UCAST_DOR_H_ */
diff --git a/opensm/opensm/Makefile.am b/opensm/opensm/Makefile.am
index ea44e14..4051b99 100644
--- a/opensm/opensm/Makefile.am
+++ b/opensm/opensm/Makefile.am
@@ -52,7 +52,8 @@ opensm_SOURCES = main.c osm_console_io.c osm_console.c osm_db_files.c \
 		 osm_prtn.c osm_prtn_config.c osm_qos.c osm_router.c \
 		 osm_trap_rcv.c osm_ucast_mgr.c osm_ucast_minhop.c \
 		 osm_ucast_updn.c osm_ucast_lash.c osm_ucast_file.c \
-		 osm_ucast_ftree.c osm_vl15intf.c osm_vl_arb_rcv.c \
+		 osm_ucast_ftree.c osm_ucast_dor.c \
+		 osm_vl15intf.c osm_vl_arb_rcv.c \
 		 st.c osm_perfmgr.c osm_perfmgr_db.c \
 		 osm_event_plugin.c osm_dump.c \
 		 osm_qos_parser_y.y osm_qos_parser_l.l osm_qos_policy.c
@@ -115,6 +116,7 @@ opensminclude_HEADERS = \
 	$(srcdir)/../include/opensm/osm_subnet.h \
 	$(srcdir)/../include/opensm/osm_switch.h \
 	$(srcdir)/../include/opensm/osm_ucast_mgr.h \
+	$(srcdir)/../include/opensm/osm_ucast_dor.h \
 	$(srcdir)/../include/opensm/osm_ucast_file.h \
 	$(srcdir)/../include/opensm/osm_ucast_ftree.h \
 	$(srcdir)/../include/opensm/osm_ucast_lash.h \
diff --git a/opensm/opensm/osm_opensm.c b/opensm/opensm/osm_opensm.c
index 8a66424..81a2f76 100644
--- a/opensm/opensm/osm_opensm.c
+++ b/opensm/opensm/osm_opensm.c
@@ -58,6 +58,7 @@
 #include <opensm/osm_sm.h>
 #include <opensm/osm_vl15intf.h>
 #include <opensm/osm_event_plugin.h>
+#include <opensm/osm_ucast_dor.h>
 #include <opensm/osm_ucast_file.h>
 #include <opensm/osm_ucast_ftree.h>
 #include <opensm/osm_ucast_lash.h>
@@ -76,7 +77,7 @@ const static struct routing_engine_module routing_modules[] = {
 	{"file", osm_ucast_file_setup},
 	{"ftree", osm_ucast_ftree_setup},
 	{"lash", osm_ucast_lash_setup},
-	{"dor", osm_ucast_minhop_setup},
+	{"dor", osm_ucast_dor_setup},
 	{NULL, NULL}
 };
 
diff --git a/opensm/opensm/osm_ucast_dor.c b/opensm/opensm/osm_ucast_dor.c
new file mode 100644
index 0000000..f354a26
--- /dev/null
+++ b/opensm/opensm/osm_ucast_dor.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2006,2007 Voltaire, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#if HAVE_CONFIG_H
+#  include <config.h>
+#endif				/* HAVE_CONFIG_H */
+
+#include <stdlib.h>
+#include <string.h>
+#include <opensm/osm_opensm.h>
+#include <opensm/osm_log.h>
+
+int osm_ucast_dor_setup(osm_opensm_t * p_osm)
+{
+	p_osm->routing_engine.context = (void *)p_osm;
+	p_osm->routing_engine.build_lid_matrices = NULL;
+	p_osm->routing_engine.ucast_build_fwd_tables = NULL;
+	return 0;
+}
-- 
1.5.4.5

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to