Add a routing-engine ucast_build_fwd_tables call to call internal to
osm_ucast_updn.c functions rather than have the default
__osm_ucast_build_fwd_tables() be called in osm_ucast_mgr_process().
Necessary for this option to be exclusive for updn routing.
Al
--
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
>From 3bfa023000a4672fb75624114d33e9abe773548e Mon Sep 17 00:00:00 2001
From: Albert L. Chu <[EMAIL PROTECTED]>
Date: Thu, 22 May 2008 10:15:27 -0700
Subject: [PATCH] add updn ucast_build_fwd_tables call
Signed-off-by: Albert L. Chu <[EMAIL PROTECTED]>
---
opensm/opensm/osm_ucast_updn.c | 45 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/opensm/opensm/osm_ucast_updn.c b/opensm/opensm/osm_ucast_updn.c
index 0c4df5d..e8428e8 100644
--- a/opensm/opensm/osm_ucast_updn.c
+++ b/opensm/opensm/osm_ucast_updn.c
@@ -679,6 +679,50 @@ _exit:
OSM_LOG_EXIT(&p_osm->log);
return;
}
+/**********************************************************************
+ **********************************************************************/
+static void
+__osm_updn_build_fwd_tables_default_cb(IN cl_map_item_t * const p_map_item,
+ IN void *context)
+{
+ osm_switch_t *const p_sw = (osm_switch_t *) p_map_item;
+ osm_ucast_mgr_t *const p_mgr = (osm_ucast_mgr_t *) context;
+
+ osm_ucast_mgr_process_tbl(p_sw, p_mgr);
+}
+
+static void
+__osm_updn_build_fwd_tables_default(IN osm_ucast_mgr_t * const p_mgr)
+{
+ cl_qmap_t *p_sw_guid_tbl;
+
+ p_sw_guid_tbl = &p_mgr->p_subn->sw_guid_tbl;
+
+ cl_qmap_apply_func(p_sw_guid_tbl, __osm_updn_build_fwd_tables_default_cb,
+ p_mgr);
+}
+
+static int
+__osm_updn_fwd(void *ctx)
+{
+ updn_t *p_updn;
+ osm_opensm_t *p_osm;
+ osm_ucast_mgr_t *p_mgr;
+
+ CL_ASSERT(ctx);
+
+ p_updn = ctx;
+ p_osm = p_updn->p_osm;
+ p_mgr = &(p_osm->sm.ucast_mgr);
+
+ OSM_LOG_ENTER(p_mgr->p_log);
+
+ __osm_updn_build_fwd_tables_default(p_mgr);
+
+ OSM_LOG_EXIT(p_mgr->p_log);
+
+ return 0;
+}
/**********************************************************************
**********************************************************************/
@@ -701,6 +745,7 @@ int osm_ucast_updn_setup(osm_opensm_t * p_osm)
p_osm->routing_engine.context = p_updn;
p_osm->routing_engine.delete = __osm_updn_delete;
p_osm->routing_engine.build_lid_matrices = __osm_updn_call;
+ p_osm->routing_engine.ucast_build_fwd_tables = __osm_updn_fwd;
return 0;
}
--
1.5.1
_______________________________________________
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