[ofa-general] ***SPAM*** [PATCH] Add osm_config.h file

Ira Weiny weiny2 at llnl.gov
Thu Oct 9 14:59:44 PDT 2008


>From 0b4e9b0b21a039051fc729568104e7e82a249f53 Mon Sep 17 00:00:00 2001
From: Ira Weiny <weiny2 at llnl.gov>
Date: Thu, 9 Oct 2008 14:44:13 -0700
Subject: [PATCH] Add osm_config.h file

   The defines in this file are required for plugin and third party tool
   compatibility.

Signed-off-by: Ira Weiny <weiny2 at llnl.gov>
---
 opensm/configure.in                      |    7 +++-
 opensm/include/opensm/osm_config.h.in    |   61 ++++++++++++++++++++++++++++++
 opensm/include/opensm/osm_event_plugin.h |    1 +
 opensm/opensm/Makefile.am                |    3 +-
 4 files changed, 70 insertions(+), 2 deletions(-)
 create mode 100644 opensm/include/opensm/osm_config.h.in

diff --git a/opensm/configure.in b/opensm/configure.in
index 7da932b..680e6a0 100644
--- a/opensm/configure.in
+++ b/opensm/configure.in
@@ -4,12 +4,17 @@ AC_PREREQ(2.57)
 AC_INIT(opensm, 3.2.2, general at lists.openfabrics.org)
 AC_CONFIG_SRCDIR([opensm/osm_opensm.c])
 AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_HEADERS(include/config.h)
+AC_CONFIG_HEADERS(include/config.h include/opensm/osm_config.h)
 AM_INIT_AUTOMAKE
 
 AC_SUBST(RELEASE, ${RELEASE:-unknown})
 AC_SUBST(TARBALL, ${TARBALL:-${PACKAGE}-${VERSION}.tar.gz})
 
+dnl NOTE: AC_DEFINE's and AC_DEFINE_UNQUOTED's which are used in header files
+dnl       MUST have a corresponding entry in include/opensm/osm_config.h.in to
+dnl       ensure plugin compatibility.
+AC_DEFINE(_OSM_CONFIG_H_, 1, mark config.h inclusion)
+
 dnl Defines the Language
 AC_LANG_C
 
diff --git a/opensm/include/opensm/osm_config.h.in b/opensm/include/opensm/osm_config.h.in
new file mode 100644
index 0000000..6781af7
--- /dev/null
+++ b/opensm/include/opensm/osm_config.h.in
@@ -0,0 +1,61 @@
+/* include/osm_config.h.in
+ *
+ * Defines various OpenSM configuration parameters to be used by various
+ * plugins and third party tools.
+ *
+ * NOTE: Defines used in header files MUST be included here to ensure plugin
+ * compatibility.
+ */
+
+#ifndef _OSM_CONFIG_H_
+#define _OSM_CONFIG_H_
+
+/* Define as 1 if you want Dual Sided RMPP Support */
+#undef DUAL_SIDED_RMPP
+
+/* Define as 1 if you want to enable a console on a socket connection */
+#undef ENABLE_OSM_CONSOLE_SOCKET
+
+/* Define as 1 if you want to enable the event plugin */
+#undef ENABLE_OSM_DEFAULT_EVENT_PLUGIN
+
+/* Define as 1 if you want to enable the performance manager */
+#undef ENABLE_OSM_PERF_MGR
+
+/* Define as 1 if you want to enable the performance manager profiling code */
+#undef ENABLE_OSM_PERF_MGR_PROFILE
+
+/* Define a default node name map file */
+#undef HAVE_DEFAULT_NODENAME_MAP
+
+/* Define a default OpenSM config file */
+#undef HAVE_DEFAULT_OPENSM_CONFIG_FILE
+
+/* Define a Partition config file */
+#undef HAVE_DEFAULT_PARTITION_CONFIG_FILE
+
+/* Define a Prefix Routes config file */
+#undef HAVE_DEFAULT_PREFIX_ROUTES_FILE
+
+/* Define a QOS policy config file */
+#undef HAVE_DEFAULT_QOS_POLICY_FILE
+
+/* Define OpenSM config directory */
+#undef OPENSM_CONFIG_DIR
+
+/* Define as 1 for vapi vendor */
+#undef OSM_VENDOR_INTF_MTL
+
+/* Define as 1 for OpenIB vendor */
+#undef OSM_VENDOR_INTF_OPENIB
+
+/* Define as 1 for sim vendor */
+#undef OSM_VENDOR_INTF_SIM
+
+/* Define as 1 for ts vendor */
+#undef OSM_VENDOR_INTF_TS
+
+/* Define as 1 if you want Vendor RMPP Support */
+#undef VENDOR_RMPP_SUPPORT
+
+#endif /* _OSM_CONFIG_H_ */
diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h
index e44a78a..d70dfde 100644
--- a/opensm/include/opensm/osm_event_plugin.h
+++ b/opensm/include/opensm/osm_event_plugin.h
@@ -37,6 +37,7 @@
 #include <time.h>
 #include <iba/ib_types.h>
 #include <complib/cl_qlist.h>
+#include <opensm/osm_config.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
diff --git a/opensm/opensm/Makefile.am b/opensm/opensm/Makefile.am
index e95a482..409c147 100644
--- a/opensm/opensm/Makefile.am
+++ b/opensm/opensm/Makefile.am
@@ -116,7 +116,8 @@ opensminclude_HEADERS = \
 	$(srcdir)/../include/opensm/osm_switch.h \
 	$(srcdir)/../include/opensm/osm_ucast_mgr.h \
 	$(srcdir)/../include/opensm/osm_vl15intf.h \
-	$(top_builddir)/include/opensm/osm_version.h
+	$(top_builddir)/include/opensm/osm_version.h \
+	$(top_builddir)/include/opensm/osm_config.h
 
 BUILT_SOURCES = osm_version osm_qos_parser_y.h
 osm_version:
-- 
1.5.4.5




More information about the general mailing list