[ofa-general] [PATCH] opensm: move vendor specific header files to include/vendor
Sasha Khapyorsky
sashak at voltaire.com
Fri Nov 30 07:42:19 PST 2007
Move vendor specific header files osm_ts_useraccess.h and osm_umadt.h
from core opensm to vendor include directory.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
opensm/include/Makefile.am | 4 +-
opensm/include/opensm/osm_ts_useraccess.h | 52 ----------
opensm/include/opensm/osm_umadt.h | 142 ---------------------------
opensm/include/vendor/osm_ts_useraccess.h | 52 ++++++++++
opensm/include/vendor/osm_umadt.h | 142 +++++++++++++++++++++++++++
opensm/libvendor/osm_vendor_mlx_anafa.c | 3 +-
opensm/libvendor/osm_vendor_mlx_hca_anafa.c | 2 +-
opensm/libvendor/osm_vendor_mlx_ts.c | 3 +-
opensm/libvendor/osm_vendor_mlx_ts_anafa.c | 3 +-
opensm/libvendor/osm_vendor_ts.c | 3 +-
opensm/libvendor/osm_vendor_umadt.c | 2 +-
11 files changed, 202 insertions(+), 206 deletions(-)
delete mode 100644 opensm/include/opensm/osm_ts_useraccess.h
delete mode 100644 opensm/include/opensm/osm_umadt.h
create mode 100644 opensm/include/vendor/osm_ts_useraccess.h
create mode 100644 opensm/include/vendor/osm_umadt.h
diff --git a/opensm/include/Makefile.am b/opensm/include/Makefile.am
index 540aa26..d9ed2c3 100644
--- a/opensm/include/Makefile.am
+++ b/opensm/include/Makefile.am
@@ -45,9 +45,7 @@ EXTRA_DIST = \
$(srcdir)/opensm/osm_port_profile.h \
$(srcdir)/opensm/osm_sminfo_rcv.h \
$(srcdir)/opensm/osm_multicast.h \
- $(srcdir)/opensm/osm_ts_useraccess.h \
$(srcdir)/opensm/osm_sa_class_port_info.h \
- $(srcdir)/opensm/osm_umadt.h \
$(srcdir)/opensm/osm_node_info_rcv.h \
$(srcdir)/opensm/osm_base.h \
$(srcdir)/opensm/osm_sa_sminfo_record.h \
@@ -155,6 +153,8 @@ EXTRA_DIST = \
$(srcdir)/vendor/osm_vendor_al.h \
$(srcdir)/vendor/osm_vendor_mtl.h \
$(srcdir)/vendor/osm_vendor_sa_api.h \
+ $(srcdir)/vendor/osm_ts_useraccess.h \
+ $(srcdir)/vendor/osm_umadt.h \
$(srcdir)/vendor/osm_mtl_bind.h
pkgincludedir = $(includedir)/infiniband
diff --git a/opensm/include/opensm/osm_ts_useraccess.h b/opensm/include/opensm/osm_ts_useraccess.h
deleted file mode 100644
index d68c924..0000000
--- a/opensm/include/opensm/osm_ts_useraccess.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2004, 2005 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.
- *
- */
-
-#include "ts_ib_useraccess.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
-typedef struct ib_user_mad_filter osm_ts_user_mad_filter;
-typedef struct ib_set_port_info_ioctl osm_ts_set_port_info_ioctl;
-typedef struct ib_get_port_info_ioctl osm_ts_get_port_info_ioctl;
-typedef struct ib_gid_entry_ioctl osm_ts_gid_entry_ioctl;
-
-END_C_DECLS
diff --git a/opensm/include/opensm/osm_umadt.h b/opensm/include/opensm/osm_umadt.h
deleted file mode 100644
index 809f478..0000000
--- a/opensm/include/opensm/osm_umadt.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2004, 2005 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.
- *
- */
-
-/*
- * Abstract:
- * Declaration of osm_mad_wrapper_t.
- * This object represents the context wrapper for OpenSM MAD processing.
- * This object is part of the OpenSM family of objects.
- *
- * Environment:
- * Linux User Mode
- *
- * $Revision: 1.4 $
- */
-
-#ifndef _OSM_UMADT_h_
-#define _OSM_UMADT_h_
-
-#include "iba/ib_types.h"
-#include <vendor/osm_vendor_api.h>
-#include <opensm/osm_log.h>
-#include "umadt.h"
-#include "ibt.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
-
-typedef struct _umadt_obj_t {
- void *umadt_handle;
- UMADT_INTERFACE uMadtInterface;
- IBT_INTERFACE IbtInterface;
- boolean init_done;
- cl_spinlock_t register_lock;
- cl_qlist_t register_list;
- osm_log_t *p_log;
- uint32_t timeout;
-
-} umadt_obj_t;
-/*********/
-
-/****s* OpenSM: Umadt MAD Wrapper/osm_bind_info
-* NAME
-* osm_bind_info
-*
-* DESCRIPTION
-* Context needed for processing individual MADs
-*
-* SYNOPSIS
-*/
-
-typedef struct _mad_bind_info_t {
- cl_list_item_t list_item;
- umadt_obj_t *p_umadt_obj;
- osm_mad_pool_t *p_mad_pool;
- osm_vend_mad_recv_callback_t mad_recv_callback;
- void *client_context;
- cl_thread_t recv_processor_thread;
- cl_spinlock_t trans_ctxt_lock;
- cl_qlist_t trans_ctxt_list;
- cl_timer_t timeout_timer;
- cl_spinlock_t timeout_list_lock;
- cl_qlist_t timeout_list;
- RegisterClassStruct umadt_reg_class;
- MADT_HANDLE umadt_handle; /* Umadt type */
-
-} mad_bind_info_t;
-
-typedef struct _trans_context_t {
- cl_list_item_t list_item;
- uint64_t trans_id;
- uint64_t sent_time; /* micro secs */
- void *context;
-} trans_context_t;
-
-/*
-* FIELDS
-* list_item
-* List linkage for pools and lists. MUST BE FIRST MEMBER!
-*
-* p_mad_pool
-* Pointer to the MAD pool to be used by mads with this bind handle.
-*
-* mad_recv_callback
-* Callback function called by the mad receive processor.
-*
-* client_context
-* context to be passed to the receive callback.
-*
-* recv_processor_thread
-* Thread structure for the receive processor thread.
-*
-* umadt_reg_class
-* Umadt register class struct used to register with Umadt.
-*
-* umadt_handle
-* Umadt returns this handle from a registration call. The transport layer
-* uses this handle to talk to Umadt.
-*
-* SEE ALSO
-*********/
-
-END_C_DECLS
-#endif /*_OSM_UMADT_h_ */
diff --git a/opensm/include/vendor/osm_ts_useraccess.h b/opensm/include/vendor/osm_ts_useraccess.h
new file mode 100644
index 0000000..d68c924
--- /dev/null
+++ b/opensm/include/vendor/osm_ts_useraccess.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2004, 2005 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.
+ *
+ */
+
+#include "ts_ib_useraccess.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
+typedef struct ib_user_mad_filter osm_ts_user_mad_filter;
+typedef struct ib_set_port_info_ioctl osm_ts_set_port_info_ioctl;
+typedef struct ib_get_port_info_ioctl osm_ts_get_port_info_ioctl;
+typedef struct ib_gid_entry_ioctl osm_ts_gid_entry_ioctl;
+
+END_C_DECLS
diff --git a/opensm/include/vendor/osm_umadt.h b/opensm/include/vendor/osm_umadt.h
new file mode 100644
index 0000000..809f478
--- /dev/null
+++ b/opensm/include/vendor/osm_umadt.h
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2004, 2005 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.
+ *
+ */
+
+/*
+ * Abstract:
+ * Declaration of osm_mad_wrapper_t.
+ * This object represents the context wrapper for OpenSM MAD processing.
+ * This object is part of the OpenSM family of objects.
+ *
+ * Environment:
+ * Linux User Mode
+ *
+ * $Revision: 1.4 $
+ */
+
+#ifndef _OSM_UMADT_h_
+#define _OSM_UMADT_h_
+
+#include "iba/ib_types.h"
+#include <vendor/osm_vendor_api.h>
+#include <opensm/osm_log.h>
+#include "umadt.h"
+#include "ibt.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
+
+typedef struct _umadt_obj_t {
+ void *umadt_handle;
+ UMADT_INTERFACE uMadtInterface;
+ IBT_INTERFACE IbtInterface;
+ boolean init_done;
+ cl_spinlock_t register_lock;
+ cl_qlist_t register_list;
+ osm_log_t *p_log;
+ uint32_t timeout;
+
+} umadt_obj_t;
+/*********/
+
+/****s* OpenSM: Umadt MAD Wrapper/osm_bind_info
+* NAME
+* osm_bind_info
+*
+* DESCRIPTION
+* Context needed for processing individual MADs
+*
+* SYNOPSIS
+*/
+
+typedef struct _mad_bind_info_t {
+ cl_list_item_t list_item;
+ umadt_obj_t *p_umadt_obj;
+ osm_mad_pool_t *p_mad_pool;
+ osm_vend_mad_recv_callback_t mad_recv_callback;
+ void *client_context;
+ cl_thread_t recv_processor_thread;
+ cl_spinlock_t trans_ctxt_lock;
+ cl_qlist_t trans_ctxt_list;
+ cl_timer_t timeout_timer;
+ cl_spinlock_t timeout_list_lock;
+ cl_qlist_t timeout_list;
+ RegisterClassStruct umadt_reg_class;
+ MADT_HANDLE umadt_handle; /* Umadt type */
+
+} mad_bind_info_t;
+
+typedef struct _trans_context_t {
+ cl_list_item_t list_item;
+ uint64_t trans_id;
+ uint64_t sent_time; /* micro secs */
+ void *context;
+} trans_context_t;
+
+/*
+* FIELDS
+* list_item
+* List linkage for pools and lists. MUST BE FIRST MEMBER!
+*
+* p_mad_pool
+* Pointer to the MAD pool to be used by mads with this bind handle.
+*
+* mad_recv_callback
+* Callback function called by the mad receive processor.
+*
+* client_context
+* context to be passed to the receive callback.
+*
+* recv_processor_thread
+* Thread structure for the receive processor thread.
+*
+* umadt_reg_class
+* Umadt register class struct used to register with Umadt.
+*
+* umadt_handle
+* Umadt returns this handle from a registration call. The transport layer
+* uses this handle to talk to Umadt.
+*
+* SEE ALSO
+*********/
+
+END_C_DECLS
+#endif /*_OSM_UMADT_h_ */
diff --git a/opensm/libvendor/osm_vendor_mlx_anafa.c b/opensm/libvendor/osm_vendor_mlx_anafa.c
index bc79af8..41a521a 100644
--- a/opensm/libvendor/osm_vendor_mlx_anafa.c
+++ b/opensm/libvendor/osm_vendor_mlx_anafa.c
@@ -51,8 +51,7 @@
#include <vendor/osm_vendor_mlx_svc.h>
#include <vendor/osm_vendor_mlx_sender.h>
#include <vendor/osm_pkt_randomizer.h>
-
-#include <opensm/osm_ts_useraccess.h>
+#include <vendor/osm_ts_useraccess.h>
/**
* FORWARD REFERENCES
diff --git a/opensm/libvendor/osm_vendor_mlx_hca_anafa.c b/opensm/libvendor/osm_vendor_mlx_hca_anafa.c
index ca3b4ea..81656ea 100644
--- a/opensm/libvendor/osm_vendor_mlx_hca_anafa.c
+++ b/opensm/libvendor/osm_vendor_mlx_hca_anafa.c
@@ -50,7 +50,7 @@
#include <sys/ioctl.h>
#include <vendor/osm_vendor_mlx_transport_anafa.h>
-#include <opensm/osm_ts_useraccess.h>
+#include <vendor/osm_ts_useraccess.h>
/********************************************************************************
*
diff --git a/opensm/libvendor/osm_vendor_mlx_ts.c b/opensm/libvendor/osm_vendor_mlx_ts.c
index 83ed1b1..26955d2 100644
--- a/opensm/libvendor/osm_vendor_mlx_ts.c
+++ b/opensm/libvendor/osm_vendor_mlx_ts.c
@@ -57,8 +57,7 @@
#include <vendor/osm_vendor_mlx_transport.h>
#include <vendor/osm_vendor_mlx_dispatcher.h>
#include <vendor/osm_vendor_mlx_svc.h>
-
-#include <opensm/osm_ts_useraccess.h>
+#include <vendor/osm_ts_useraccess.h>
typedef struct _osmv_TOPSPIN_transport_mgr_ {
int device_fd;
diff --git a/opensm/libvendor/osm_vendor_mlx_ts_anafa.c b/opensm/libvendor/osm_vendor_mlx_ts_anafa.c
index f3569a7..6498d18 100644
--- a/opensm/libvendor/osm_vendor_mlx_ts_anafa.c
+++ b/opensm/libvendor/osm_vendor_mlx_ts_anafa.c
@@ -59,8 +59,7 @@
#include <vendor/osm_vendor_mlx_transport_anafa.h>
#include <vendor/osm_vendor_mlx_dispatcher.h>
#include <vendor/osm_vendor_mlx_svc.h>
-
-#include <opensm/osm_ts_useraccess.h>
+#include <vendor/osm_ts_useraccess.h>
static void
__osmv_TOPSPIN_ANAFA_mad_addr_to_osm_addr(IN osm_vendor_t const *p_vend,
diff --git a/opensm/libvendor/osm_vendor_ts.c b/opensm/libvendor/osm_vendor_ts.c
index 04b4331..9351004 100644
--- a/opensm/libvendor/osm_vendor_ts.c
+++ b/opensm/libvendor/osm_vendor_ts.c
@@ -42,11 +42,10 @@
#include <string.h>
#include <vendor/osm_vendor_ts.h>
#include <vendor/osm_vendor_api.h>
+#include <vendor/osm_ts_useraccess.h>
#include <opensm/osm_subnet.h>
#include <opensm/osm_opensm.h>
-#include <opensm/osm_ts_useraccess.h>
-
/*
Since a race can accure on requests. Meaning - a response is received before
the send_callback is called - we will save both the madw_p and the fact
diff --git a/opensm/libvendor/osm_vendor_umadt.c b/opensm/libvendor/osm_vendor_umadt.c
index fd643fa..e761452 100644
--- a/opensm/libvendor/osm_vendor_umadt.c
+++ b/opensm/libvendor/osm_vendor_umadt.c
@@ -71,7 +71,7 @@
#include <opensm/osm_mad_pool.h>
#include <vendor/osm_vendor_umadt.h>
-#include <opensm/osm_umadt.h>
+#include <vendor/osm_umadt.h>
/* GEN1 includes */
#include "umadt_so.h"
--
1.5.3.4.206.g58ba4
More information about the general
mailing list