make all routing engines always specify build_lid_matrices and
build_fwd_tables callback. Do not assume you can default to minhop by
not specifying a callback. This make "failures" between routing
engines consistent. If any single callback to a routing engine fails,
you know the routing engine really failed.
Al
--
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
>From af29ccfea15a5bc76a83635765ad66a2a7e25712 Mon Sep 17 00:00:00 2001
From: Albert Chu <[EMAIL PROTECTED]>
Date: Fri, 12 Sep 2008 14:22:16 -0700
Subject: [PATCH] having routing engines always specify lid and fwd callbacks
Signed-off-by: Albert Chu <[EMAIL PROTECTED]>
---
opensm/opensm/osm_ucast_dor.c | 2 +-
opensm/opensm/osm_ucast_lash.c | 8 ++++++++
opensm/opensm/osm_ucast_minhop.c | 4 ++--
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/opensm/opensm/osm_ucast_dor.c b/opensm/opensm/osm_ucast_dor.c
index 9432a05..c9a1d43 100644
--- a/opensm/opensm/osm_ucast_dor.c
+++ b/opensm/opensm/osm_ucast_dor.c
@@ -50,7 +50,7 @@ int osm_ucast_dor_build_fwd_tables(void *context)
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.build_lid_matrices = osm_ucast_minhop_build_lid_matrices;
p_osm->routing_engine.ucast_build_fwd_tables = osm_ucast_dor_build_fwd_tables;
return 0;
}
diff --git a/opensm/opensm/osm_ucast_lash.c b/opensm/opensm/osm_ucast_lash.c
index b985e9a..052b900 100644
--- a/opensm/opensm/osm_ucast_lash.c
+++ b/opensm/opensm/osm_ucast_lash.c
@@ -53,6 +53,7 @@
#include <opensm/osm_opensm.h>
#include <opensm/osm_log.h>
#include <opensm/osm_fwd_tbl.h>
+#include <opensm/osm_ucast_minhop.h>
/* //////////////////////////// */
/* Local types */
@@ -1360,6 +1361,12 @@ uint8_t osm_get_lash_sl(osm_opensm_t * p_osm, osm_port_t * p_src_port,
return (uint8_t) ((switch_t *) p_sw->priv)->routing_table[dst_id].lane;
}
+static int osm_ucast_lash_build_lid_matrices(void *context)
+{
+ lash_t *p_lash = context;
+ osm_ucast_minhop_build_lid_matrices(p_lash->p_osm);
+}
+
int osm_ucast_lash_setup(osm_opensm_t * p_osm)
{
lash_t *p_lash = lash_create(p_osm);
@@ -1367,6 +1374,7 @@ int osm_ucast_lash_setup(osm_opensm_t * p_osm)
return -1;
p_osm->routing_engine.context = p_lash;
+ p_osm->routing_engine.build_lid_matrices = osm_ucast_lash_build_lid_matrices;
p_osm->routing_engine.ucast_build_fwd_tables = lash_process;
p_osm->routing_engine.delete = lash_delete;
diff --git a/opensm/opensm/osm_ucast_minhop.c b/opensm/opensm/osm_ucast_minhop.c
index c0d2412..1105830 100644
--- a/opensm/opensm/osm_ucast_minhop.c
+++ b/opensm/opensm/osm_ucast_minhop.c
@@ -662,7 +662,7 @@ int osm_ucast_minhop_build_fwd_tables(void *context)
int osm_ucast_minhop_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;
+ p_osm->routing_engine.build_lid_matrices = osm_ucast_minhop_build_lid_matrices;
+ p_osm->routing_engine.ucast_build_fwd_tables = osm_ucast_minhop_build_fwd_tables;
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