[ofa-general] [PATCH] opensm/include/vendor: indentation fixes
Sasha Khapyorsky
sashak at voltaire.com
Wed Aug 15 14:55:01 PDT 2007
include/vendor header files are formatted with opensm/osm_indent
(indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs)
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
opensm/include/vendor/osm_mtl_bind.h | 50 ++--
opensm/include/vendor/osm_pkt_randomizer.h | 42 ++--
opensm/include/vendor/osm_vendor.h | 2 -
opensm/include/vendor/osm_vendor_al.h | 94 +++----
opensm/include/vendor/osm_vendor_api.h | 93 +++----
opensm/include/vendor/osm_vendor_ibumad.h | 49 ++--
opensm/include/vendor/osm_vendor_mlx.h | 39 ++--
opensm/include/vendor/osm_vendor_mlx_defs.h | 52 ++--
opensm/include/vendor/osm_vendor_mlx_dispatcher.h | 13 +-
opensm/include/vendor/osm_vendor_mlx_hca.h | 21 +-
opensm/include/vendor/osm_vendor_mlx_inout.h | 10 +-
opensm/include/vendor/osm_vendor_mlx_rmpp_ctx.h | 120 ++++-----
opensm/include/vendor/osm_vendor_mlx_sar.h | 34 ++--
opensm/include/vendor/osm_vendor_mlx_sender.h | 56 ++---
opensm/include/vendor/osm_vendor_mlx_svc.h | 196 +++++++-------
opensm/include/vendor/osm_vendor_mlx_transport.h | 24 +-
.../vendor/osm_vendor_mlx_transport_anafa.h | 19 +-
opensm/include/vendor/osm_vendor_mlx_txn.h | 185 ++++++-------
opensm/include/vendor/osm_vendor_mtl.h | 71 ++---
opensm/include/vendor/osm_vendor_mtl_hca_guid.h | 39 ++--
.../vendor/osm_vendor_mtl_transaction_mgr.h | 72 ++---
opensm/include/vendor/osm_vendor_sa_api.h | 286 ++++++++++----------
opensm/include/vendor/osm_vendor_select.h | 17 +-
opensm/include/vendor/osm_vendor_test.h | 45 ++--
opensm/include/vendor/osm_vendor_ts.h | 102 +++----
opensm/include/vendor/osm_vendor_umadt.h | 26 +-
26 files changed, 762 insertions(+), 995 deletions(-)
diff --git a/opensm/include/vendor/osm_mtl_bind.h b/opensm/include/vendor/osm_mtl_bind.h
index 81b434b..3994d59 100644
--- a/opensm/include/vendor/osm_mtl_bind.h
+++ b/opensm/include/vendor/osm_mtl_bind.h
@@ -45,13 +45,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****s* OpenSM: Vendor/osm_vendor_mgt_bind
* NAME
* osm_vendor_mgt_bind_t
@@ -62,14 +61,12 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_vendor_mgt_bind
-{
- boolean_t smi_init, gsi_init;
- IB_MGT_mad_hndl_t smi_mads_hdl;
- IB_MGT_mad_hndl_t gsi_mads_hdl;
- struct _osm_mtl_bind_info *smi_p_bind;
-}
-osm_vendor_mgt_bind_t;
+typedef struct _osm_vendor_mgt_bind {
+ boolean_t smi_init, gsi_init;
+ IB_MGT_mad_hndl_t smi_mads_hdl;
+ IB_MGT_mad_hndl_t gsi_mads_hdl;
+ struct _osm_mtl_bind_info *smi_p_bind;
+} osm_vendor_mgt_bind_t;
/*
* FIELDS
@@ -91,19 +88,17 @@ osm_vendor_mgt_bind_t;
*
* SYNOPSIS
*/
-typedef struct _osm_mtl_bind_info
-{
- IB_MGT_mad_hndl_t mad_hndl;
- osm_vendor_t *p_vend;
- void *client_context;
- VAPI_hca_hndl_t hca_hndl;
- VAPI_hca_id_t hca_id;
- uint8_t port_num;
- osm_vend_mad_recv_callback_t rcv_callback;
- osm_vend_mad_send_err_callback_t send_err_callback;
- osm_mad_pool_t *p_osm_pool;
-}
-osm_mtl_bind_info_t;
+typedef struct _osm_mtl_bind_info {
+ IB_MGT_mad_hndl_t mad_hndl;
+ osm_vendor_t *p_vend;
+ void *client_context;
+ VAPI_hca_hndl_t hca_hndl;
+ VAPI_hca_id_t hca_id;
+ uint8_t port_num;
+ osm_vend_mad_recv_callback_t rcv_callback;
+ osm_vend_mad_send_err_callback_t send_err_callback;
+ osm_mad_pool_t *p_osm_pool;
+} osm_mtl_bind_info_t;
/*
* FIELDS
@@ -135,10 +130,7 @@ osm_mtl_bind_info_t;
* SEE ALSO
*********/
ib_api_status_t
-osm_mtl_send_mad(
- IN osm_mtl_bind_info_t *p_bind,
- IN osm_madw_t * const p_madw);
+osm_mtl_send_mad(IN osm_mtl_bind_info_t * p_bind, IN osm_madw_t * const p_madw);
END_C_DECLS
-
-#endif // _OSM_BIND_H_
+#endif // _OSM_BIND_H_
diff --git a/opensm/include/vendor/osm_pkt_randomizer.h b/opensm/include/vendor/osm_pkt_randomizer.h
index 8c32b1b..0c831e0 100644
--- a/opensm/include/vendor/osm_pkt_randomizer.h
+++ b/opensm/include/vendor/osm_pkt_randomizer.h
@@ -33,7 +33,6 @@
*
*/
-
/*
* Abstract:
* Declaration of osm_subn_t.
@@ -49,7 +48,6 @@
#ifndef _OSM_PKT_RANDOMIZER_H_
#define _OSM_PKT_RANDOMIZER_H_
-
#include <iba/ib_types.h>
#include <complib/cl_qmap.h>
#include <complib/cl_map.h>
@@ -62,13 +60,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****h* OpenSM/Packet Randomizer
* NAME
* Packet Randomizer
@@ -84,7 +81,6 @@ BEGIN_C_DECLS
* Yael Kalka, Mellanox
*
*********/
-
/****d* OpenSM: Pkt_Randomizer/osm_pkt_randomizer_t
* NAME
* osm_pkt_randomizer_t
@@ -95,13 +91,12 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_pkt_randomizer
-{
- uint8_t osm_pkt_drop_rate;
- uint8_t osm_pkt_num_unstable_links;
- uint8_t osm_pkt_unstable_link_rate;
- osm_dr_path_t *fault_dr_paths;
- uint8_t num_paths_initialized;
+typedef struct _osm_pkt_randomizer {
+ uint8_t osm_pkt_drop_rate;
+ uint8_t osm_pkt_num_unstable_links;
+ uint8_t osm_pkt_unstable_link_rate;
+ osm_dr_path_t *fault_dr_paths;
+ uint8_t num_paths_initialized;
} osm_pkt_randomizer_t;
/*
@@ -143,9 +138,8 @@ typedef struct _osm_pkt_randomizer
* SYNOPSIS
*/
ib_api_status_t
-osm_pkt_randomizer_init(
- IN OUT osm_pkt_randomizer_t **pp_pkt_randomizer,
- IN osm_log_t *p_log );
+osm_pkt_randomizer_init(IN OUT osm_pkt_randomizer_t ** pp_pkt_randomizer,
+ IN osm_log_t * p_log);
/*
* PARAMETERS
* p_pkt_randomizer
@@ -163,7 +157,6 @@ osm_pkt_randomizer_init(
*
*********/
-
/****f* OpenSM: Pkt_Randomizer/osm_pkt_randomizer_destroy
* NAME
* osm_pkt_randomizer_destroy
@@ -174,9 +167,8 @@ osm_pkt_randomizer_init(
* SYNOPSIS
*/
void
-osm_pkt_randomizer_destroy(
- IN osm_pkt_randomizer_t **pp_pkt_randomizer,
- IN osm_log_t *p_log );
+osm_pkt_randomizer_destroy(IN osm_pkt_randomizer_t ** pp_pkt_randomizer,
+ IN osm_log_t * p_log);
/*
* PARAMETERS
* p_pkt_randomizer
@@ -210,10 +202,9 @@ osm_pkt_randomizer_destroy(
* SYNOPSIS
*/
boolean_t
-osm_pkt_randomizer_mad_drop(
- IN osm_log_t *p_log,
- IN osm_pkt_randomizer_t *p_pkt_randomizer,
- IN const ib_mad_t *p_mad );
+osm_pkt_randomizer_mad_drop(IN osm_log_t * p_log,
+ IN osm_pkt_randomizer_t * p_pkt_randomizer,
+ IN const ib_mad_t * p_mad);
/*
* PARAMETERS
* p_subn
@@ -235,5 +226,4 @@ osm_pkt_randomizer_mad_drop(
*********/
END_C_DECLS
-
-#endif /* _OSM_PKT_RANDOMIZER_H */
+#endif /* _OSM_PKT_RANDOMIZER_H */
diff --git a/opensm/include/vendor/osm_vendor.h b/opensm/include/vendor/osm_vendor.h
index 6a4f5c6..eb7665e 100644
--- a/opensm/include/vendor/osm_vendor.h
+++ b/opensm/include/vendor/osm_vendor.h
@@ -33,7 +33,6 @@
*
*/
-
/*
* Abstract:
* Include file used by OpenSM to pull in the correct vendor file.
@@ -75,4 +74,3 @@
#error No MAD Interface selected!
#error Choose an interface in osm_vendor_select.h
#endif
-
diff --git a/opensm/include/vendor/osm_vendor_al.h b/opensm/include/vendor/osm_vendor_al.h
index ad529f3..1f80006 100644
--- a/opensm/include/vendor/osm_vendor_al.h
+++ b/opensm/include/vendor/osm_vendor_al.h
@@ -33,7 +33,6 @@
*
*/
-
/*
* Abstract:
* Declaration of osm_mad_wrapper_t.
@@ -46,9 +45,6 @@
* $Revision: 1.4 $
*/
-
-
-
#ifndef _OSM_VENDOR_AL_H_
#define _OSM_VENDOR_AL_H_
@@ -62,13 +58,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****h* OpenSM/Vendor AL
* NAME
* Vendor AL
@@ -87,9 +82,6 @@ BEGIN_C_DECLS
*
*
*********/
-
-
-
/****h* OpenSM/Vendor Access Layer (AL)
* NAME
* Vendor AL
@@ -101,14 +93,11 @@ BEGIN_C_DECLS
* Steve King, Intel
*
*********/
-
#define OSM_AL_SQ_SGE 256
#define OSM_AL_RQ_SGE 256
#define OSM_DEFAULT_RETRY_COUNT 3
-
/* AL supports RMPP */
#define VENDOR_RMPP_SUPPORT 1
-
/****s* OpenSM: Vendor AL/osm_ca_info_t
* NAME
* osm_ca_info_t
@@ -118,11 +107,10 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_ca_info
-{
- ib_net64_t guid;
- size_t attr_size;
- ib_ca_attr_t *p_attr;
+typedef struct _osm_ca_info {
+ ib_net64_t guid;
+ size_t attr_size;
+ ib_ca_attr_t *p_attr;
} osm_ca_info_t;
/*
@@ -149,11 +137,11 @@ typedef struct _osm_ca_info
* SYNOPSIS
*/
static inline uint8_t
-osm_ca_info_get_num_ports(
- IN const osm_ca_info_t* const p_ca_info )
+osm_ca_info_get_num_ports(IN const osm_ca_info_t * const p_ca_info)
{
- return( p_ca_info->p_attr->num_ports );
+ return (p_ca_info->p_attr->num_ports);
}
+
/*
* PARAMETERS
* p_ca_info
@@ -177,12 +165,12 @@ osm_ca_info_get_num_ports(
* SYNOPSIS
*/
static inline ib_net64_t
-osm_ca_info_get_port_guid(
- IN const osm_ca_info_t* const p_ca_info,
- IN const uint8_t index )
+osm_ca_info_get_port_guid(IN const osm_ca_info_t * const p_ca_info,
+ IN const uint8_t index)
{
- return( p_ca_info->p_attr->p_port_attr[index].port_guid );
+ return (p_ca_info->p_attr->p_port_attr[index].port_guid);
}
+
/*
* PARAMETERS
* p_ca_info
@@ -212,12 +200,12 @@ osm_ca_info_get_port_guid(
* SYNOPSIS
*/
static inline uint8_t
-osm_ca_info_get_port_num(
- IN const osm_ca_info_t* const p_ca_info,
- IN const uint8_t index )
+osm_ca_info_get_port_num(IN const osm_ca_info_t * const p_ca_info,
+ IN const uint8_t index)
{
- return( p_ca_info->p_attr->p_port_attr[index].port_num );
+ return (p_ca_info->p_attr->p_port_attr[index].port_num);
}
+
/*
* PARAMETERS
* p_ca_info
@@ -246,11 +234,11 @@ osm_ca_info_get_port_num(
* SYNOPSIS
*/
static inline ib_net64_t
-osm_ca_info_get_ca_guid(
- IN const osm_ca_info_t* const p_ca_info )
+osm_ca_info_get_ca_guid(IN const osm_ca_info_t * const p_ca_info)
{
- return( p_ca_info->p_attr->ca_guid );
+ return (p_ca_info->p_attr->ca_guid);
}
+
/*
* PARAMETERS
* p_ca_info
@@ -273,15 +261,14 @@ osm_ca_info_get_ca_guid(
*
* SYNOPSIS
*/
-typedef struct _osm_vendor
-{
- ib_al_handle_t h_al;
- osm_log_t *p_log;
- uint32_t ca_count;
- osm_ca_info_t *p_ca_info;
- uint32_t timeout;
- ib_ca_handle_t h_ca;
- ib_pd_handle_t h_pd;
+typedef struct _osm_vendor {
+ ib_al_handle_t h_al;
+ osm_log_t *p_log;
+ uint32_t ca_count;
+ osm_ca_info_t *p_ca_info;
+ uint32_t timeout;
+ ib_ca_handle_t h_ca;
+ ib_pd_handle_t h_pd;
} osm_vendor_t;
/*
@@ -307,10 +294,8 @@ typedef struct _osm_vendor
* SEE ALSO
*********/
-
#define OSM_BIND_INVALID_HANDLE 0
-
/****s* OpenSM: Vendor AL/osm_bind_handle_t
* NAME
* osm_bind_handle_t
@@ -320,7 +305,7 @@ typedef struct _osm_vendor
*
* SYNOPSIS
*/
-typedef void* osm_bind_handle_t;
+typedef void *osm_bind_handle_t;
/***********/
/****s* OpenSM/osm_vend_wrap_t
@@ -333,15 +318,14 @@ typedef void* osm_bind_handle_t;
*
* SYNOPSIS
*********/
-typedef struct _osm_vend_wrap_t
-{
- uint32_t size;
- osm_bind_handle_t h_bind;
- ib_mad_element_t *p_elem;
- ib_av_handle_t h_av;
- void* p_resp_madw;
-
-}osm_vend_wrap_t;
+typedef struct _osm_vend_wrap_t {
+ uint32_t size;
+ osm_bind_handle_t h_bind;
+ ib_mad_element_t *p_elem;
+ ib_av_handle_t h_av;
+ void *p_resp_madw;
+
+} osm_vend_wrap_t;
/*
* FIELDS
* size
@@ -365,7 +349,5 @@ typedef struct _osm_vend_wrap_t
* SEE ALSO
*********/
-
END_C_DECLS
-
-#endif /* _OSM_VENDOR_AL_H_ */
+#endif /* _OSM_VENDOR_AL_H_ */
diff --git a/opensm/include/vendor/osm_vendor_api.h b/opensm/include/vendor/osm_vendor_api.h
index 2451baa..8e3011d 100644
--- a/opensm/include/vendor/osm_vendor_api.h
+++ b/opensm/include/vendor/osm_vendor_api.h
@@ -54,13 +54,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****s* OpenSM Vendor API/osm_vend_mad_recv_callback_t
* NAME
* osm_vend_mad_recv_callback_t
@@ -71,10 +70,9 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef void (*osm_vend_mad_recv_callback_t)(
- IN osm_madw_t *p_madw,
- IN void* bind_context,
- IN osm_madw_t *p_req_madw );
+typedef void (*osm_vend_mad_recv_callback_t) (IN osm_madw_t * p_madw,
+ IN void *bind_context,
+ IN osm_madw_t * p_req_madw);
/*
* PARAMETERS
* p_madw
@@ -107,9 +105,8 @@ typedef void (*osm_vend_mad_recv_callback_t)(
*
* SYNOPSIS
*/
-typedef void (*osm_vend_mad_send_err_callback_t)(
- IN void* bind_context,
- IN osm_madw_t *p_madw );
+typedef void (*osm_vend_mad_send_err_callback_t) (IN void *bind_context,
+ IN osm_madw_t * p_madw);
/*
* PARAMETERS
* bind_context
@@ -139,10 +136,8 @@ typedef void (*osm_vend_mad_send_err_callback_t)(
*
* SYNOPSIS
*/
-osm_vendor_t*
-osm_vendor_new(
- IN osm_log_t* const p_log,
- IN const uint32_t timeout );
+osm_vendor_t *osm_vendor_new(IN osm_log_t * const p_log,
+ IN const uint32_t timeout);
/*
* PARAMETERS
* p_log
@@ -168,9 +163,7 @@ osm_vendor_new(
*
* SYNOPSIS
*/
-void
-osm_vendor_delete(
- IN osm_vendor_t** const pp_vend );
+void osm_vendor_delete(IN osm_vendor_t ** const pp_vend);
/*
* PARAMETERS
* pp_vend
@@ -194,10 +187,9 @@ osm_vendor_delete(
* SYNOPSIS
*/
ib_api_status_t
-osm_vendor_get_all_port_attr(
- IN osm_vendor_t* const p_vend,
- IN ib_port_attr_t* const p_attr_array,
- IN uint32_t* const p_num_ports );
+osm_vendor_get_all_port_attr(IN osm_vendor_t * const p_vend,
+ IN ib_port_attr_t * const p_attr_array,
+ IN uint32_t * const p_num_ports);
/*
* PARAMETERS
* p_vend
@@ -232,10 +224,8 @@ osm_vendor_get_all_port_attr(
* SYNOPSIS
*/
ib_api_status_t
-osm_vendor_init(
- IN osm_vendor_t* const p_vend,
- IN osm_log_t * const p_log,
- IN const uint32_t timeout );
+osm_vendor_init(IN osm_vendor_t * const p_vend,
+ IN osm_log_t * const p_log, IN const uint32_t timeout);
/*
* PARAMETERS
* p_vend
@@ -267,13 +257,12 @@ osm_vendor_init(
* SYNOPSIS
*/
osm_bind_handle_t
-osm_vendor_bind(
- IN osm_vendor_t* const p_vend,
- IN osm_bind_info_t* const p_bind_info,
- IN osm_mad_pool_t* const p_mad_pool,
- IN osm_vend_mad_recv_callback_t mad_recv_callback,
- IN osm_vend_mad_send_err_callback_t send_err_callback,
- IN void* context );
+osm_vendor_bind(IN osm_vendor_t * const p_vend,
+ IN osm_bind_info_t * const p_bind_info,
+ IN osm_mad_pool_t * const p_mad_pool,
+ IN osm_vend_mad_recv_callback_t mad_recv_callback,
+ IN osm_vend_mad_send_err_callback_t send_err_callback,
+ IN void *context);
/*
* PARAMETERS
* p_vend
@@ -313,9 +302,7 @@ osm_vendor_bind(
*
* SYNOPSIS
*/
-void
-osm_vendor_unbind(
- IN osm_bind_handle_t h_bind );
+void osm_vendor_unbind(IN osm_bind_handle_t h_bind);
/*
* PARAMETERS
* h_bind
@@ -339,11 +326,9 @@ osm_vendor_unbind(
*
* SYNOPSIS
*/
-ib_mad_t*
-osm_vendor_get(
- IN osm_bind_handle_t h_bind,
- IN const uint32_t mad_size,
- IN osm_vend_wrap_t* const p_vend_wrap );
+ib_mad_t *osm_vendor_get(IN osm_bind_handle_t h_bind,
+ IN const uint32_t mad_size,
+ IN osm_vend_wrap_t * const p_vend_wrap);
/*
* PARAMETERS
* h_bind
@@ -372,10 +357,8 @@ osm_vendor_get(
* SYNOPSIS
*/
ib_api_status_t
-osm_vendor_send(
- IN osm_bind_handle_t h_bind,
- IN osm_madw_t* const p_madw,
- IN boolean_t const resp_expected);
+osm_vendor_send(IN osm_bind_handle_t h_bind,
+ IN osm_madw_t * const p_madw, IN boolean_t const resp_expected);
/*
* PARAMETERS
* h_bind
@@ -409,9 +392,8 @@ osm_vendor_send(
* SYNOPSIS
*/
void
-osm_vendor_put(
- IN osm_bind_handle_t h_bind,
- IN osm_vend_wrap_t* const p_vend_wrap );
+osm_vendor_put(IN osm_bind_handle_t h_bind,
+ IN osm_vend_wrap_t * const p_vend_wrap);
/*
* PARAMETERS
* h_bind
@@ -439,9 +421,7 @@ osm_vendor_put(
*
* SYNOPSIS
*/
-ib_api_status_t
-osm_vendor_local_lid_change(
- IN osm_bind_handle_t h_bind );
+ib_api_status_t osm_vendor_local_lid_change(IN osm_bind_handle_t h_bind);
/*
* PARAMETERS
* h_bind
@@ -464,10 +444,7 @@ osm_vendor_local_lid_change(
*
* SYNOPSIS
*/
-void
-osm_vendor_set_sm(
- IN osm_bind_handle_t h_bind,
- IN boolean_t is_sm_val );
+void osm_vendor_set_sm(IN osm_bind_handle_t h_bind, IN boolean_t is_sm_val);
/*
* PARAMETERS
* h_bind
@@ -494,10 +471,7 @@ osm_vendor_set_sm(
*
* SYNOPSIS
*/
-void
-osm_vendor_set_debug(
- IN osm_vendor_t* const p_vend,
- IN int32_t level );
+void osm_vendor_set_debug(IN osm_vendor_t * const p_vend, IN int32_t level);
/*
* PARAMETERS
* p_vend
@@ -515,5 +489,4 @@ osm_vendor_set_debug(
*********/
END_C_DECLS
-
-#endif /* _OSM_VENDOR_API_H_ */
+#endif /* _OSM_VENDOR_API_H_ */
diff --git a/opensm/include/vendor/osm_vendor_ibumad.h b/opensm/include/vendor/osm_vendor_ibumad.h
index 0c00d1f..f86aeef 100644
--- a/opensm/include/vendor/osm_vendor_ibumad.h
+++ b/opensm/include/vendor/osm_vendor_ibumad.h
@@ -47,13 +47,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****h* OpenSM/Vendor Access Layer (UMAD)
* NAME
* Vendor UMAD
@@ -65,12 +64,9 @@ BEGIN_C_DECLS
*
*
*********/
-
#define OSM_DEFAULT_RETRY_COUNT 3
-
#define OSM_UMAD_MAX_CAS 32
#define OSM_UMAD_MAX_PORTS_PER_CA 2
-
/****s* OpenSM: Vendor UMAD/osm_ca_info_t
* NAME
* osm_ca_info_t
@@ -80,11 +76,10 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_ca_info
-{
- ib_net64_t guid;
- size_t attr_size;
- ib_ca_attr_t *p_attr;
+typedef struct _osm_ca_info {
+ ib_net64_t guid;
+ size_t attr_size;
+ ib_ca_attr_t *p_attr;
} osm_ca_info_t;
/*
* FIELDS
@@ -110,11 +105,11 @@ typedef struct _osm_ca_info
* SYNOPSIS
*/
static inline uint8_t
-osm_ca_info_get_num_ports(
- IN const osm_ca_info_t* const p_ca_info )
+osm_ca_info_get_num_ports(IN const osm_ca_info_t * const p_ca_info)
{
- return( p_ca_info->p_attr->num_ports );
+ return (p_ca_info->p_attr->num_ports);
}
+
/*
* PARAMETERS
* p_ca_info
@@ -137,7 +132,7 @@ osm_ca_info_get_num_ports(
*
* SYNOPSIS
*/
-typedef void *osm_bind_handle_t;
+typedef void *osm_bind_handle_t;
/***********/
typedef struct _umad_match {
@@ -148,20 +143,18 @@ typedef struct _umad_match {
#define OSM_UMAD_MAX_PENDING 1000
-typedef struct vendor_match_tbl
-{
+typedef struct vendor_match_tbl {
umad_match_t tbl[OSM_UMAD_MAX_PENDING];
uint32_t last_version;
int max;
} vendor_match_tbl_t;
-typedef struct _osm_vendor
-{
- osm_log_t *p_log;
- uint32_t ca_count;
- osm_ca_info_t *p_ca_info;
- uint32_t timeout;
- int max_retries;
+typedef struct _osm_vendor {
+ osm_log_t *p_log;
+ uint32_t ca_count;
+ osm_ca_info_t *p_ca_info;
+ uint32_t timeout;
+ int max_retries;
osm_bind_handle_t agents[UMAD_CA_MAX_AGENTS];
char ca_names[OSM_UMAD_MAX_CAS][UMAD_CA_NAME_LEN];
vendor_match_tbl_t mtbl;
@@ -176,15 +169,13 @@ typedef struct _osm_vendor
#define OSM_BIND_INVALID_HANDLE 0
-typedef struct _osm_vend_wrap
-{
+typedef struct _osm_vend_wrap {
int agent;
int size;
int retries;
void *umad;
- osm_bind_handle_t h_bind;
+ osm_bind_handle_t h_bind;
} osm_vend_wrap_t;
END_C_DECLS
-
-#endif /* _OSM_VENDOR_UMAD_H_ */
+#endif /* _OSM_VENDOR_UMAD_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx.h b/opensm/include/vendor/osm_vendor_mlx.h
index b3794cd..106e0b4 100644
--- a/opensm/include/vendor/osm_vendor_mlx.h
+++ b/opensm/include/vendor/osm_vendor_mlx.h
@@ -43,13 +43,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/*
Forward reference
*/
@@ -59,35 +58,34 @@ struct _osm_pkt_randomizer;
typedef struct _osm_vendor {
- /* for holding common transport info - useful at ibmgt transport*/
- void *p_transport_info;
+ /* for holding common transport info - useful at ibmgt transport */
+ void *p_transport_info;
- osm_log_t *p_log;
+ osm_log_t *p_log;
- /* Uniform timeout for every ACK/single MAD */
- uint32_t resp_timeout;
+ /* Uniform timeout for every ACK/single MAD */
+ uint32_t resp_timeout;
- /* Uniform timeout for every rmpp transaction */
- uint32_t ttime_timeout;
+ /* Uniform timeout for every rmpp transaction */
+ uint32_t ttime_timeout;
- /* All the bind handles associated with the vendor */
- cl_qlist_t bind_handles;
+ /* All the bind handles associated with the vendor */
+ cl_qlist_t bind_handles;
- /* run randomizer flag */
- boolean_t run_randomizer;
+ /* run randomizer flag */
+ boolean_t run_randomizer;
- /* Packet Randomizer object */
- struct _osm_pkt_randomizer *p_pkt_randomizer;
+ /* Packet Randomizer object */
+ struct _osm_pkt_randomizer *p_pkt_randomizer;
} osm_vendor_t;
/* Repeating the definitions in osm_vendor_api.h */
-typedef void* osm_bind_handle_t;
+typedef void *osm_bind_handle_t;
-typedef struct _osm_vend_wrap
-{
- ib_mad_t* p_mad;
+typedef struct _osm_vend_wrap {
+ ib_mad_t *p_mad;
} osm_vend_wrap_t;
#ifndef OSM_BIND_INVALID_HANDLE
@@ -95,5 +93,4 @@ typedef struct _osm_vend_wrap
#endif
END_C_DECLS
-
#endif
diff --git a/opensm/include/vendor/osm_vendor_mlx_defs.h b/opensm/include/vendor/osm_vendor_mlx_defs.h
index db5aef5..d4c2c30 100644
--- a/opensm/include/vendor/osm_vendor_mlx_defs.h
+++ b/opensm/include/vendor/osm_vendor_mlx_defs.h
@@ -44,22 +44,18 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/* The maximum number of outstanding MADs an RMPP sender can transmit */
#define OSMV_RMPP_RECV_WIN 16
-
/* The maximum number of retransmissions of the same MAD */
#define OSMV_MAX_RETRANSMIT 3
-
/* Transaction Timeout = OSMV_TXN_TIMEOUT_FACTOR * Response Timeout */
#define OSMV_TXN_TIMEOUT_FACTOR 128
-
/************/
/****s* OSM Vendor: Types/osmv_bind_obj_t
* NAME
@@ -71,39 +67,37 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-
typedef struct _osmv_bind_obj {
- /* Used to signal when the struct is being destroyed */
- struct _osmv_bind_obj* magic_ptr;
+ /* Used to signal when the struct is being destroyed */
+ struct _osmv_bind_obj *magic_ptr;
- osm_vendor_t /*const */ *p_vendor;
+ osm_vendor_t /*const */ * p_vendor;
- uint32_t hca_hndl;
- uint32_t port_num;
+ uint32_t hca_hndl;
+ uint32_t port_num;
- /* Atomic access protector */
- cl_spinlock_t lock;
+ /* Atomic access protector */
+ cl_spinlock_t lock;
- /* is_closing == TRUE --> the handle is being unbound */
- boolean_t is_closing;
+ /* is_closing == TRUE --> the handle is being unbound */
+ boolean_t is_closing;
- /* Event callbacks */
- osm_vend_mad_recv_callback_t recv_cb;
- osm_vend_mad_send_err_callback_t send_err_cb;
- /* ... and their context */
- void *cb_context;
+ /* Event callbacks */
+ osm_vend_mad_recv_callback_t recv_cb;
+ osm_vend_mad_send_err_callback_t send_err_cb;
+ /* ... and their context */
+ void *cb_context;
- /* A pool to manage MAD wrappers*/
- osm_mad_pool_t *p_osm_pool;
+ /* A pool to manage MAD wrappers */
+ osm_mad_pool_t *p_osm_pool;
- /* each subvendor implements its own transport mgr */
- void *p_transp_mgr;
+ /* each subvendor implements its own transport mgr */
+ void *p_transp_mgr;
- /* The transaction DB */
- osmv_txn_mgr_t txn_mgr;
+ /* The transaction DB */
+ osmv_txn_mgr_t txn_mgr;
} osmv_bind_obj_t;
END_C_DECLS
-
-#endif /* _OSMV_DEFS_H_ */
+#endif /* _OSMV_DEFS_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_dispatcher.h b/opensm/include/vendor/osm_vendor_mlx_dispatcher.h
index 5a14d48..ba83f30 100644
--- a/opensm/include/vendor/osm_vendor_mlx_dispatcher.h
+++ b/opensm/include/vendor/osm_vendor_mlx_dispatcher.h
@@ -39,13 +39,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/*
* NAME
* osmv_dispatch_mad
@@ -62,12 +61,10 @@ BEGIN_C_DECLS
* p_mad_buf The 256 byte buffer of individual MAD
* p_mad_addr The MAD originator's address
*/
-
ib_api_status_t
-osmv_dispatch_mad(IN osm_bind_handle_t h_bind,
- IN const void *p_mad_buf,
- IN const osm_mad_addr_t *p_mad_addr);
+osmv_dispatch_mad(IN osm_bind_handle_t h_bind,
+ IN const void *p_mad_buf,
+ IN const osm_mad_addr_t * p_mad_addr);
END_C_DECLS
-
#endif
diff --git a/opensm/include/vendor/osm_vendor_mlx_hca.h b/opensm/include/vendor/osm_vendor_mlx_hca.h
index 1052135..9b56943 100644
--- a/opensm/include/vendor/osm_vendor_mlx_hca.h
+++ b/opensm/include/vendor/osm_vendor_mlx_hca.h
@@ -42,26 +42,23 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
#if defined( OSM_VENDOR_INTF_TS_NO_VAPI ) || defined( OSM_VENDOR_INTF_SIM )
#define VAPI_hca_hndl_t uint32_t
#define VAPI_hca_id_t char*
#endif
-
ib_api_status_t
-osm_vendor_get_guid_ca_and_port( IN osm_vendor_t const *p_vend,
- IN ib_net64_t const guid,
- OUT uint32_t *p_hca_hndl,
- OUT char *p_hca_id,
- OUT uint8_t *p_hca_idx,
- OUT uint32_t *p_port_num );
+osm_vendor_get_guid_ca_and_port(IN osm_vendor_t const *p_vend,
+ IN ib_net64_t const guid,
+ OUT uint32_t * p_hca_hndl,
+ OUT char *p_hca_id,
+ OUT uint8_t * p_hca_idx,
+ OUT uint32_t * p_port_num);
END_C_DECLS
-
-#endif /* _OSMV_HCA_H_ */
+#endif /* _OSMV_HCA_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_inout.h b/opensm/include/vendor/osm_vendor_mlx_inout.h
index b88fadc..868639b 100644
--- a/opensm/include/vendor/osm_vendor_mlx_inout.h
+++ b/opensm/include/vendor/osm_vendor_mlx_inout.h
@@ -39,13 +39,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
#ifdef IN
#undef IN
#endif
@@ -65,7 +64,6 @@ BEGIN_C_DECLS
#ifndef OUT
#define OUT
#endif
-
#ifndef OSM_VENDOR_INTF_TS_NO_VAPI
#ifndef OSM_VENDOR_INTF_ANAFA
#ifndef OSM_VENDOR_INTF_SIM
@@ -74,7 +72,5 @@ BEGIN_C_DECLS
#endif
#endif
#endif
-
END_C_DECLS
-
-#endif /* _OSMV_INOUT_H_ */
+#endif /* _OSMV_INOUT_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_rmpp_ctx.h b/opensm/include/vendor/osm_vendor_mlx_rmpp_ctx.h
index b056eb8..dac1f13 100644
--- a/opensm/include/vendor/osm_vendor_mlx_rmpp_ctx.h
+++ b/opensm/include/vendor/osm_vendor_mlx_rmpp_ctx.h
@@ -44,48 +44,45 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
typedef struct _osmv_rmpp_send_ctx {
- uint8_t status;
+ uint8_t status;
- uint32_t window_first;
- uint32_t window_last;
+ uint32_t window_first;
+ uint32_t window_last;
- uint32_t mad_sz;
- boolean_t is_sa_mad;
+ uint32_t mad_sz;
+ boolean_t is_sa_mad;
- cl_event_t event;
+ cl_event_t event;
- /* Segmentation engine */
- osmv_rmpp_sar_t sar;
- osm_log_t *p_log;
+ /* Segmentation engine */
+ osmv_rmpp_sar_t sar;
+ osm_log_t *p_log;
} osmv_rmpp_send_ctx_t;
-
typedef struct _osmv_rmpp_recv_ctx {
- boolean_t is_sa_mad;
-
- uint32_t expected_seg;
-
- /* Reassembly buffer */
- cl_qlist_t *p_rbuf;
+ boolean_t is_sa_mad;
- /* Reassembly engine */
- osmv_rmpp_sar_t sar;
- osm_log_t* p_log;
+ uint32_t expected_seg;
-} osmv_rmpp_recv_ctx_t;
+ /* Reassembly buffer */
+ cl_qlist_t *p_rbuf;
+ /* Reassembly engine */
+ osmv_rmpp_sar_t sar;
+ osm_log_t *p_log;
+} osmv_rmpp_recv_ctx_t;
/*
* NAME
@@ -98,9 +95,8 @@ typedef struct _osmv_rmpp_recv_ctx {
*
*/
ib_api_status_t
-osmv_rmpp_send_ctx_init(osmv_rmpp_send_ctx_t* p_ctx, void* arbt_mad, uint32_t mad_sz,
- osm_log_t* p_log);
-
+osmv_rmpp_send_ctx_init(osmv_rmpp_send_ctx_t * p_ctx, void *arbt_mad,
+ uint32_t mad_sz, osm_log_t * p_log);
/*
* NAME
@@ -112,9 +108,7 @@ osmv_rmpp_send_ctx_init(osmv_rmpp_send_ctx_t* p_ctx, void* arbt_mad, uint32_t ma
* SEE ALSO
*
*/
-void
-osmv_rmpp_send_ctx_done(IN osmv_rmpp_send_ctx_t *ctx);
-
+void osmv_rmpp_send_ctx_done(IN osmv_rmpp_send_ctx_t * ctx);
/*
* NAME
@@ -126,10 +120,10 @@ osmv_rmpp_send_ctx_done(IN osmv_rmpp_send_ctx_t *ctx);
*
*/
static inline uint32_t
-osmv_rmpp_send_ctx_get_wf(IN const osmv_rmpp_send_ctx_t *p_ctx)
+osmv_rmpp_send_ctx_get_wf(IN const osmv_rmpp_send_ctx_t * p_ctx)
{
- CL_ASSERT( p_ctx);
- return p_ctx->window_first;
+ CL_ASSERT(p_ctx);
+ return p_ctx->window_first;
}
/*
@@ -142,10 +136,10 @@ osmv_rmpp_send_ctx_get_wf(IN const osmv_rmpp_send_ctx_t *p_ctx)
*
*/
static inline void
-osmv_rmpp_send_ctx_set_wf(IN osmv_rmpp_send_ctx_t *p_ctx, IN uint32_t val)
+osmv_rmpp_send_ctx_set_wf(IN osmv_rmpp_send_ctx_t * p_ctx, IN uint32_t val)
{
- CL_ASSERT( p_ctx);
- p_ctx->window_first = val;
+ CL_ASSERT(p_ctx);
+ p_ctx->window_first = val;
}
/*
@@ -158,10 +152,10 @@ osmv_rmpp_send_ctx_set_wf(IN osmv_rmpp_send_ctx_t *p_ctx, IN uint32_t val)
*
*/
static inline uint32_t
-osmv_rmpp_send_ctx_get_wl(IN const osmv_rmpp_send_ctx_t *p_send_ctx)
+osmv_rmpp_send_ctx_get_wl(IN const osmv_rmpp_send_ctx_t * p_send_ctx)
{
- CL_ASSERT(p_send_ctx);
- return p_send_ctx->window_last;
+ CL_ASSERT(p_send_ctx);
+ return p_send_ctx->window_last;
}
/*
@@ -174,10 +168,10 @@ osmv_rmpp_send_ctx_get_wl(IN const osmv_rmpp_send_ctx_t *p_send_ctx)
*
*/
static inline void
-osmv_rmpp_send_ctx_set_wl(IN osmv_rmpp_send_ctx_t *p_ctx, IN uint32_t val)
+osmv_rmpp_send_ctx_set_wl(IN osmv_rmpp_send_ctx_t * p_ctx, IN uint32_t val)
{
- CL_ASSERT( p_ctx);
- p_ctx->window_last = val;
+ CL_ASSERT(p_ctx);
+ p_ctx->window_last = val;
}
/*
@@ -189,8 +183,7 @@ osmv_rmpp_send_ctx_set_wl(IN osmv_rmpp_send_ctx_t *p_ctx, IN uint32_t val)
* SEE ALSO
*
*/
-uint32_t
-osmv_rmpp_send_ctx_get_num_segs(IN osmv_rmpp_send_ctx_t *p_send_ctx);
+uint32_t osmv_rmpp_send_ctx_get_num_segs(IN osmv_rmpp_send_ctx_t * p_send_ctx);
/*
* NAME
@@ -202,8 +195,9 @@ osmv_rmpp_send_ctx_get_num_segs(IN osmv_rmpp_send_ctx_t *p_send_ctx);
*
*/
ib_api_status_t
-osmv_rmpp_send_ctx_get_seg(IN osmv_rmpp_send_ctx_t *p_send_ctx,IN uint32_t seg_idx,
- IN uint32_t resp_timeout, OUT void* p_mad);
+osmv_rmpp_send_ctx_get_seg(IN osmv_rmpp_send_ctx_t * p_send_ctx,
+ IN uint32_t seg_idx, IN uint32_t resp_timeout,
+ OUT void *p_mad);
/*
* NAME
@@ -215,7 +209,7 @@ osmv_rmpp_send_ctx_get_seg(IN osmv_rmpp_send_ctx_t *p_send_ctx,IN uint32_t seg_i
*
*/
ib_api_status_t
-osmv_rmpp_recv_ctx_init(osmv_rmpp_recv_ctx_t *p_ctx,osm_log_t* p_log );
+osmv_rmpp_recv_ctx_init(osmv_rmpp_recv_ctx_t * p_ctx, osm_log_t * p_log);
/*
* NAME
@@ -226,8 +220,7 @@ osmv_rmpp_recv_ctx_init(osmv_rmpp_recv_ctx_t *p_ctx,osm_log_t* p_log );
* SEE ALSO
*
*/
-void
-osmv_rmpp_recv_ctx_done(IN osmv_rmpp_recv_ctx_t *p_ctx);
+void osmv_rmpp_recv_ctx_done(IN osmv_rmpp_recv_ctx_t * p_ctx);
/*
* NAME
@@ -238,10 +231,10 @@ osmv_rmpp_recv_ctx_done(IN osmv_rmpp_recv_ctx_t *p_ctx);
*
*/
static inline uint32_t
-osmv_rmpp_recv_ctx_get_es(IN const osmv_rmpp_recv_ctx_t *p_recv_ctx)
+osmv_rmpp_recv_ctx_get_es(IN const osmv_rmpp_recv_ctx_t * p_recv_ctx)
{
- CL_ASSERT( p_recv_ctx);
- return p_recv_ctx->expected_seg;
+ CL_ASSERT(p_recv_ctx);
+ return p_recv_ctx->expected_seg;
}
/*
@@ -253,11 +246,10 @@ osmv_rmpp_recv_ctx_get_es(IN const osmv_rmpp_recv_ctx_t *p_recv_ctx)
*
*/
static inline void
-osmv_rmpp_recv_ctx_set_es(IN osmv_rmpp_recv_ctx_t *p_recv_ctx,
- IN uint32_t val)
+osmv_rmpp_recv_ctx_set_es(IN osmv_rmpp_recv_ctx_t * p_recv_ctx, IN uint32_t val)
{
- CL_ASSERT( p_recv_ctx);
- p_recv_ctx->expected_seg = val;
+ CL_ASSERT(p_recv_ctx);
+ p_recv_ctx->expected_seg = val;
}
/*
@@ -269,20 +261,18 @@ osmv_rmpp_recv_ctx_set_es(IN osmv_rmpp_recv_ctx_t *p_recv_ctx,
*
*/
ib_api_status_t
-osmv_rmpp_recv_ctx_store_mad_seg(IN osmv_rmpp_recv_ctx_t *p_recv_ctx,
- IN void* p_mad);
-
+osmv_rmpp_recv_ctx_store_mad_seg(IN osmv_rmpp_recv_ctx_t * p_recv_ctx,
+ IN void *p_mad);
uint32_t
-osmv_rmpp_recv_ctx_get_cur_byte_num(IN osmv_rmpp_recv_ctx_t *p_recv_ctx);
+osmv_rmpp_recv_ctx_get_cur_byte_num(IN osmv_rmpp_recv_ctx_t * p_recv_ctx);
uint32_t
-osmv_rmpp_recv_ctx_get_byte_num_from_first(IN osmv_rmpp_recv_ctx_t *p_recv_ctx);
+osmv_rmpp_recv_ctx_get_byte_num_from_first(IN osmv_rmpp_recv_ctx_t *
+ p_recv_ctx);
uint32_t
-osmv_rmpp_recv_ctx_get_byte_num_from_last(IN osmv_rmpp_recv_ctx_t *p_recv_ctx);
-
-
+osmv_rmpp_recv_ctx_get_byte_num_from_last(IN osmv_rmpp_recv_ctx_t * p_recv_ctx);
/*
* NAME
@@ -292,10 +282,8 @@ osmv_rmpp_recv_ctx_get_byte_num_from_last(IN osmv_rmpp_recv_ctx_t *p_recv_ctx);
* reassembles all rmpp buffs to one big arbitrary mad
*/
ib_api_status_t
-osmv_rmpp_recv_ctx_reassemble_arbt_mad( IN osmv_rmpp_recv_ctx_t *p_recv_ctx,
- IN uint32_t size,
- IN void* p_arbt_mad);
+osmv_rmpp_recv_ctx_reassemble_arbt_mad(IN osmv_rmpp_recv_ctx_t * p_recv_ctx,
+ IN uint32_t size, IN void *p_arbt_mad);
END_C_DECLS
-
#endif
diff --git a/opensm/include/vendor/osm_vendor_mlx_sar.h b/opensm/include/vendor/osm_vendor_mlx_sar.h
index 448054a..a65b4f2 100644
--- a/opensm/include/vendor/osm_vendor_mlx_sar.h
+++ b/opensm/include/vendor/osm_vendor_mlx_sar.h
@@ -42,22 +42,21 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-typedef struct _osmv_rmpp_sar{
- void* p_arbt_mad;
- uint32_t data_len; /* total data len in all the mads */
- /* these data members contain only constants */
- uint32_t hdr_sz;
- uint32_t data_sz; /*typical data sz for this kind of mad (sa or regular */
-
-}osmv_rmpp_sar_t;
+typedef struct _osmv_rmpp_sar {
+ void *p_arbt_mad;
+ uint32_t data_len; /* total data len in all the mads */
+ /* these data members contain only constants */
+ uint32_t hdr_sz;
+ uint32_t data_sz; /*typical data sz for this kind of mad (sa or regular */
+} osmv_rmpp_sar_t;
/*
* NAME
@@ -70,8 +69,8 @@ typedef struct _osmv_rmpp_sar{
*
*/
ib_api_status_t
-osmv_rmpp_sar_init(osmv_rmpp_sar_t* p_sar, void* p_arbt_mad,
- uint32_t mad_size, boolean_t is_sa_mad);
+osmv_rmpp_sar_init(osmv_rmpp_sar_t * p_sar, void *p_arbt_mad,
+ uint32_t mad_size, boolean_t is_sa_mad);
/*
* NAME
@@ -83,8 +82,7 @@ osmv_rmpp_sar_init(osmv_rmpp_sar_t* p_sar, void* p_arbt_mad,
* SEE ALSO
*
*/
-void
-osmv_rmpp_sar_done(osmv_rmpp_sar_t* p_sar);
+void osmv_rmpp_sar_done(osmv_rmpp_sar_t * p_sar);
/*
* NAME
@@ -97,7 +95,8 @@ osmv_rmpp_sar_done(osmv_rmpp_sar_t* p_sar);
*
*/
ib_api_status_t
-osmv_rmpp_sar_get_mad_seg(osmv_rmpp_sar_t* p_sar,uint32_t seg_idx,void* p_buf);
+osmv_rmpp_sar_get_mad_seg(osmv_rmpp_sar_t * p_sar, uint32_t seg_idx,
+ void *p_buf);
/*
* NAME
@@ -111,8 +110,7 @@ osmv_rmpp_sar_get_mad_seg(osmv_rmpp_sar_t* p_sar,uint32_t seg_idx,void* p_buf);
*
*/
ib_api_status_t
-osmv_rmpp_sar_reassemble_arbt_mad(osmv_rmpp_sar_t* p_sar,cl_qlist_t* p_bufs);
+osmv_rmpp_sar_reassemble_arbt_mad(osmv_rmpp_sar_t * p_sar, cl_qlist_t * p_bufs);
END_C_DECLS
-
-#endif /* _OSMV_SAR_H_ */
+#endif /* _OSMV_SAR_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_sender.h b/opensm/include/vendor/osm_vendor_mlx_sender.h
index fb72750..e849744 100644
--- a/opensm/include/vendor/osm_vendor_mlx_sender.h
+++ b/opensm/include/vendor/osm_vendor_mlx_sender.h
@@ -43,13 +43,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****d* OSM Vendor/osmv_simple_send_madw
* NAME
* osmv_simple_send_madw
@@ -62,12 +61,9 @@ BEGIN_C_DECLS
*
*/
ib_api_status_t
-osmv_simple_send_madw(
- IN osm_bind_handle_t h_bind,
- IN osm_madw_t *const p_madw,
- IN osmv_txn_ctx_t *p_txn,
- IN boolean_t is_retry
- );
+osmv_simple_send_madw(IN osm_bind_handle_t h_bind,
+ IN osm_madw_t * const p_madw,
+ IN osmv_txn_ctx_t * p_txn, IN boolean_t is_retry);
/****d* OSM Vendor/osmv_rmpp_send_madw
* NAME
@@ -82,10 +78,9 @@ osmv_simple_send_madw(
* has been acknowledged, or upon error.
*/
ib_api_status_t
-osmv_rmpp_send_madw(IN osm_bind_handle_t h_bind,
- IN osm_madw_t *const p_madw,
- IN osmv_txn_ctx_t *p_txn,
- IN boolean_t is_rmpp_ds);
+osmv_rmpp_send_madw(IN osm_bind_handle_t h_bind,
+ IN osm_madw_t * const p_madw,
+ IN osmv_txn_ctx_t * p_txn, IN boolean_t is_rmpp_ds);
/*
* NAME osmv_rmpp_send_ack
@@ -94,11 +89,10 @@ osmv_rmpp_send_madw(IN osm_bind_handle_t h_bind,
*/
ib_api_status_t
-osmv_rmpp_send_ack(IN osm_bind_handle_t h_bind,
- IN const ib_mad_t *p_req_mad,
- IN uint32_t seg_num,
- IN uint32_t nwl,
- IN const osm_mad_addr_t *p_mad_addr);
+osmv_rmpp_send_ack(IN osm_bind_handle_t h_bind,
+ IN const ib_mad_t * p_req_mad,
+ IN uint32_t seg_num,
+ IN uint32_t nwl, IN const osm_mad_addr_t * p_mad_addr);
/*
* NAME osmv_rmpp_send_nak
@@ -107,11 +101,10 @@ osmv_rmpp_send_ack(IN osm_bind_handle_t h_bind,
*/
ib_api_status_t
-osmv_rmpp_send_nak(IN osm_bind_handle_t h_bind,
- IN const ib_mad_t *p_req_mad,
- IN const osm_mad_addr_t *p_mad_addr,
- IN uint8_t nak_type,
- IN uint8_t status);
+osmv_rmpp_send_nak(IN osm_bind_handle_t h_bind,
+ IN const ib_mad_t * p_req_mad,
+ IN const osm_mad_addr_t * p_mad_addr,
+ IN uint8_t nak_type, IN uint8_t status);
/*
* NAME osmv_rmpp_snd_error
@@ -120,17 +113,16 @@ osmv_rmpp_send_nak(IN osm_bind_handle_t h_bind,
*/
static inline void
-osmv_rmpp_snd_error(IN osmv_rmpp_send_ctx_t *p_send_ctx,
- IN ib_api_status_t status)
+osmv_rmpp_snd_error(IN osmv_rmpp_send_ctx_t * p_send_ctx,
+ IN ib_api_status_t status)
{
- p_send_ctx->status = status;
+ p_send_ctx->status = status;
- /* Release the thread waiting on send()
- * It will release the transaction's context
- */
- cl_event_signal(&p_send_ctx->event);
+ /* Release the thread waiting on send()
+ * It will release the transaction's context
+ */
+ cl_event_signal(&p_send_ctx->event);
}
END_C_DECLS
-
-#endif /* _OSMV_RMPP_SENDER_H_ */
+#endif /* _OSMV_RMPP_SENDER_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_svc.h b/opensm/include/vendor/osm_vendor_mlx_svc.h
index c74c6f3..f23a77d 100644
--- a/opensm/include/vendor/osm_vendor_mlx_svc.h
+++ b/opensm/include/vendor/osm_vendor_mlx_svc.h
@@ -44,172 +44,158 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
-inline static boolean_t
-osmv_mad_is_response(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_mad_is_response(IN const ib_mad_t * p_mad)
{
- return (ib_mad_is_response(p_mad) ||
- (p_mad->method == IB_MAD_METHOD_TRAP_REPRESS));
+ return (ib_mad_is_response(p_mad) ||
+ (p_mad->method == IB_MAD_METHOD_TRAP_REPRESS));
}
-inline static uint8_t
-osmv_invert_method(IN uint8_t req_method)
+inline static uint8_t osmv_invert_method(IN uint8_t req_method)
{
- switch(req_method)
- {
- case IB_MAD_METHOD_GET_RESP:
- /* Not a 1-1 mapping! */
- return IB_MAD_METHOD_GET;
+ switch (req_method) {
+ case IB_MAD_METHOD_GET_RESP:
+ /* Not a 1-1 mapping! */
+ return IB_MAD_METHOD_GET;
- case IB_MAD_METHOD_GET:
- return IB_MAD_METHOD_GET_RESP;
+ case IB_MAD_METHOD_GET:
+ return IB_MAD_METHOD_GET_RESP;
- case IB_MAD_METHOD_SET:
- return IB_MAD_METHOD_GET_RESP;
+ case IB_MAD_METHOD_SET:
+ return IB_MAD_METHOD_GET_RESP;
- case IB_MAD_METHOD_GETTABLE_RESP:
- return IB_MAD_METHOD_GETTABLE;
+ case IB_MAD_METHOD_GETTABLE_RESP:
+ return IB_MAD_METHOD_GETTABLE;
- case IB_MAD_METHOD_GETTABLE:
- return IB_MAD_METHOD_GETTABLE_RESP;
+ case IB_MAD_METHOD_GETTABLE:
+ return IB_MAD_METHOD_GETTABLE_RESP;
- case IB_MAD_METHOD_GETMULTI_RESP:
- /* Not a 1-1 mapping! */
- return IB_MAD_METHOD_GETMULTI;
+ case IB_MAD_METHOD_GETMULTI_RESP:
+ /* Not a 1-1 mapping! */
+ return IB_MAD_METHOD_GETMULTI;
- case IB_MAD_METHOD_GETTRACETABLE:
- case IB_MAD_METHOD_GETMULTI:
- return IB_MAD_METHOD_GETMULTI_RESP;
+ case IB_MAD_METHOD_GETTRACETABLE:
+ case IB_MAD_METHOD_GETMULTI:
+ return IB_MAD_METHOD_GETMULTI_RESP;
- case IB_MAD_METHOD_TRAP:
- return IB_MAD_METHOD_TRAP_REPRESS;
+ case IB_MAD_METHOD_TRAP:
+ return IB_MAD_METHOD_TRAP_REPRESS;
- case IB_MAD_METHOD_TRAP_REPRESS:
- return IB_MAD_METHOD_TRAP;
+ case IB_MAD_METHOD_TRAP_REPRESS:
+ return IB_MAD_METHOD_TRAP;
- case IB_MAD_METHOD_REPORT:
- return IB_MAD_METHOD_REPORT_RESP;
+ case IB_MAD_METHOD_REPORT:
+ return IB_MAD_METHOD_REPORT_RESP;
- case IB_MAD_METHOD_REPORT_RESP:
- return IB_MAD_METHOD_REPORT;
+ case IB_MAD_METHOD_REPORT_RESP:
+ return IB_MAD_METHOD_REPORT;
- /* IB_MAD_METHOD_SEND does not have a response */
- case IB_MAD_METHOD_SEND:
- return IB_MAD_METHOD_SEND;
+ /* IB_MAD_METHOD_SEND does not have a response */
+ case IB_MAD_METHOD_SEND:
+ return IB_MAD_METHOD_SEND;
- default: CL_ASSERT(FALSE);
- }
+ default:
+ CL_ASSERT(FALSE);
+ }
- return 0; /* Just make the compiler happy */
+ return 0; /* Just make the compiler happy */
}
-inline static boolean_t
-osmv_mad_is_rmpp(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_mad_is_rmpp(IN const ib_mad_t * p_mad)
{
- uint8_t rmpp_flags;
- CL_ASSERT(NULL != p_mad);
-
- rmpp_flags = ((ib_rmpp_mad_t*)p_mad)->rmpp_flags;
- /* HACK - JUST SA and DevMgt for now - need to add BIS and DevAdm */
- if ( (p_mad->mgmt_class != IB_MCLASS_SUBN_ADM) &&
- (p_mad->mgmt_class != IB_MCLASS_DEV_MGMT) )
- return(0);
- return (0 != (rmpp_flags & IB_RMPP_FLAG_ACTIVE));
+ uint8_t rmpp_flags;
+ CL_ASSERT(NULL != p_mad);
+
+ rmpp_flags = ((ib_rmpp_mad_t *) p_mad)->rmpp_flags;
+ /* HACK - JUST SA and DevMgt for now - need to add BIS and DevAdm */
+ if ((p_mad->mgmt_class != IB_MCLASS_SUBN_ADM) &&
+ (p_mad->mgmt_class != IB_MCLASS_DEV_MGMT))
+ return (0);
+ return (0 != (rmpp_flags & IB_RMPP_FLAG_ACTIVE));
}
-inline static boolean_t
-osmv_mad_is_multi_resp(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_mad_is_multi_resp(IN const ib_mad_t * p_mad)
{
- CL_ASSERT(NULL != p_mad);
- return (IB_MAD_METHOD_GETMULTI == p_mad->method
- ||
- IB_MAD_METHOD_GETTRACETABLE == p_mad->method);
+ CL_ASSERT(NULL != p_mad);
+ return (IB_MAD_METHOD_GETMULTI == p_mad->method
+ || IB_MAD_METHOD_GETTRACETABLE == p_mad->method);
}
-inline static boolean_t
-osmv_mad_is_sa(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_mad_is_sa(IN const ib_mad_t * p_mad)
{
- CL_ASSERT(NULL != p_mad);
- return (IB_MCLASS_SUBN_ADM == p_mad->mgmt_class);
+ CL_ASSERT(NULL != p_mad);
+ return (IB_MCLASS_SUBN_ADM == p_mad->mgmt_class);
}
-inline static boolean_t
-osmv_rmpp_is_abort_stop(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_rmpp_is_abort_stop(IN const ib_mad_t * p_mad)
{
- uint8_t rmpp_type;
- CL_ASSERT(p_mad);
+ uint8_t rmpp_type;
+ CL_ASSERT(p_mad);
- rmpp_type = ((ib_rmpp_mad_t*)p_mad)->rmpp_type;
- return (IB_RMPP_TYPE_STOP == rmpp_type || IB_RMPP_TYPE_ABORT == rmpp_type);
+ rmpp_type = ((ib_rmpp_mad_t *) p_mad)->rmpp_type;
+ return (IB_RMPP_TYPE_STOP == rmpp_type
+ || IB_RMPP_TYPE_ABORT == rmpp_type);
}
-inline static boolean_t
-osmv_rmpp_is_data(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_rmpp_is_data(IN const ib_mad_t * p_mad)
{
- CL_ASSERT(p_mad);
- return (IB_RMPP_TYPE_DATA == ((ib_rmpp_mad_t*)p_mad)->rmpp_type);
+ CL_ASSERT(p_mad);
+ return (IB_RMPP_TYPE_DATA == ((ib_rmpp_mad_t *) p_mad)->rmpp_type);
}
-inline static boolean_t
-osmv_rmpp_is_ack(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_rmpp_is_ack(IN const ib_mad_t * p_mad)
{
- CL_ASSERT(p_mad);
- return (IB_RMPP_TYPE_ACK == ((ib_rmpp_mad_t*)p_mad)->rmpp_type);
+ CL_ASSERT(p_mad);
+ return (IB_RMPP_TYPE_ACK == ((ib_rmpp_mad_t *) p_mad)->rmpp_type);
}
-inline static boolean_t
-osmv_rmpp_is_first(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_rmpp_is_first(IN const ib_mad_t * p_mad)
{
- uint8_t rmpp_flags;
- CL_ASSERT(NULL != p_mad);
+ uint8_t rmpp_flags;
+ CL_ASSERT(NULL != p_mad);
- rmpp_flags = ((ib_rmpp_mad_t*)p_mad)->rmpp_flags;
- return (0 != (IB_RMPP_FLAG_FIRST & rmpp_flags));
+ rmpp_flags = ((ib_rmpp_mad_t *) p_mad)->rmpp_flags;
+ return (0 != (IB_RMPP_FLAG_FIRST & rmpp_flags));
}
-inline static boolean_t
-osmv_rmpp_is_last(IN const ib_mad_t *p_mad)
+inline static boolean_t osmv_rmpp_is_last(IN const ib_mad_t * p_mad)
{
- uint8_t rmpp_flags;
- CL_ASSERT(NULL != p_mad);
+ uint8_t rmpp_flags;
+ CL_ASSERT(NULL != p_mad);
- rmpp_flags = ((ib_rmpp_mad_t*)p_mad)->rmpp_flags;
- return (0 != (IB_RMPP_FLAG_LAST & rmpp_flags));
+ rmpp_flags = ((ib_rmpp_mad_t *) p_mad)->rmpp_flags;
+ return (0 != (IB_RMPP_FLAG_LAST & rmpp_flags));
}
-inline static uint8_t*
-osmv_mad_copy(IN const ib_mad_t *p_mad)
+inline static uint8_t *osmv_mad_copy(IN const ib_mad_t * p_mad)
{
- uint8_t *p_copy;
+ uint8_t *p_copy;
- CL_ASSERT(p_mad);
- p_copy = malloc(MAD_BLOCK_SIZE);
+ CL_ASSERT(p_mad);
+ p_copy = malloc(MAD_BLOCK_SIZE);
- if (NULL != p_copy) {
- memset(p_copy, 0, MAD_BLOCK_SIZE);
- memcpy(p_copy, p_mad, MAD_BLOCK_SIZE);
- }
+ if (NULL != p_copy) {
+ memset(p_copy, 0, MAD_BLOCK_SIZE);
+ memcpy(p_copy, p_mad, MAD_BLOCK_SIZE);
+ }
- return p_copy;
+ return p_copy;
}
/* Should be passed externally from the Makefile */
/* #define OSMV_RANDOM_DROP 1 */
#define OSMV_DROP_RATE 0.3
-inline static boolean_t
-osmv_random_drop(void)
+inline static boolean_t osmv_random_drop(void)
{
- srand(1); /* Pick a new base */
- return (rand() / (double)RAND_MAX < OSMV_DROP_RATE);
+ srand(1); /* Pick a new base */
+ return (rand() / (double)RAND_MAX < OSMV_DROP_RATE);
}
END_C_DECLS
-
-#endif /* _OSMV_SVC_H_ */
+#endif /* _OSMV_SVC_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_transport.h b/opensm/include/vendor/osm_vendor_mlx_transport.h
index 4dcd1eb..2840e49 100644
--- a/opensm/include/vendor/osm_vendor_mlx_transport.h
+++ b/opensm/include/vendor/osm_vendor_mlx_transport.h
@@ -52,13 +52,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/*
* NAME
* osmv_transport_init
@@ -66,13 +65,11 @@ BEGIN_C_DECLS
* DESCRIPTION
* Setup the MAD transport infrastructure (filters, callbacks etc).
*/
-
#define VENDOR_HCA_MAXNAMES 32
ib_api_status_t
-osmv_transport_init( IN osm_bind_info_t *p_info,
- IN char hca_id[VENDOR_HCA_MAXNAMES],
- IN uint8_t hca_idx,
- IN osmv_bind_obj_t *p_bo);
+osmv_transport_init(IN osm_bind_info_t * p_info,
+ IN char hca_id[VENDOR_HCA_MAXNAMES],
+ IN uint8_t hca_idx, IN osmv_bind_obj_t * p_bo);
/*
* NAME
@@ -82,9 +79,8 @@ osmv_transport_init( IN osm_bind_info_t *p_info,
* Send a single MAD (256 byte)
*/
ib_api_status_t
-osmv_transport_mad_send(IN const osm_bind_handle_t h_bind,
- IN void *p_mad,
- IN const osm_mad_addr_t *p_mad_addr);
+osmv_transport_mad_send(IN const osm_bind_handle_t h_bind,
+ IN void *p_mad, IN const osm_mad_addr_t * p_mad_addr);
/*
* NAME
@@ -93,9 +89,7 @@ osmv_transport_mad_send(IN const osm_bind_handle_t h_bind,
* DESCRIPTION
* deallocator of transportation infrastructure
*/
-void
-osmv_transport_done(IN const osm_bind_handle_t h_bind);
+void osmv_transport_done(IN const osm_bind_handle_t h_bind);
END_C_DECLS
-
-#endif /* _OSMV_TRANSPORT_H_ */
+#endif /* _OSMV_TRANSPORT_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_transport_anafa.h b/opensm/include/vendor/osm_vendor_mlx_transport_anafa.h
index 5587a91..dac26ed 100644
--- a/opensm/include/vendor/osm_vendor_mlx_transport_anafa.h
+++ b/opensm/include/vendor/osm_vendor_mlx_transport_anafa.h
@@ -49,24 +49,21 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
#define OSMV_ANAFA_ID 0
-
typedef struct _osmv_TOPSPIN_ANAFA_transport_mgr_ {
- int device_fd;
- cl_thread_t receiver;
-}osmv_TOPSPIN_ANAFA_transport_mgr_t;
+ int device_fd;
+ cl_thread_t receiver;
+} osmv_TOPSPIN_ANAFA_transport_mgr_t;
typedef struct _osmv_TOPSPIN_ANAFA_transport_info_ {
- int device_fd;
-}osmv_TOPSPIN_ANAFA_transport_info_t;
+ int device_fd;
+} osmv_TOPSPIN_ANAFA_transport_info_t;
END_C_DECLS
-
-#endif /* _OSMV_TRANSPORT_ANAFA_H_ */
+#endif /* _OSMV_TRANSPORT_ANAFA_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mlx_txn.h b/opensm/include/vendor/osm_vendor_mlx_txn.h
index d05fbfa..ce59191 100644
--- a/opensm/include/vendor/osm_vendor_mlx_txn.h
+++ b/opensm/include/vendor/osm_vendor_mlx_txn.h
@@ -48,62 +48,58 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
typedef enum _osmv_txn_rmpp_state {
- OSMV_TXN_RMPP_NONE = 0, /* Not part of RMPP transaction */
-
- OSMV_TXN_RMPP_SENDER,
- OSMV_TXN_RMPP_RECEIVER
+ OSMV_TXN_RMPP_NONE = 0, /* Not part of RMPP transaction */
+ OSMV_TXN_RMPP_SENDER,
+ OSMV_TXN_RMPP_RECEIVER
} osmv_txn_rmpp_state_t;
-
typedef struct _osmv_rmpp_txfr {
- osmv_txn_rmpp_state_t rmpp_state;
- boolean_t is_rmpp_init_by_peer;
- osmv_rmpp_send_ctx_t *p_rmpp_send_ctx;
- osmv_rmpp_recv_ctx_t *p_rmpp_recv_ctx;
+ osmv_txn_rmpp_state_t rmpp_state;
+ boolean_t is_rmpp_init_by_peer;
+ osmv_rmpp_send_ctx_t *p_rmpp_send_ctx;
+ osmv_rmpp_recv_ctx_t *p_rmpp_recv_ctx;
} osmv_rmpp_txfr_t;
-
typedef struct _osmv_txn_ctx {
- /* The original Transaction ID */
- uint64_t tid;
- /* The key by which the Transaction is stored */
- uint64_t key;
+ /* The original Transaction ID */
+ uint64_t tid;
+ /* The key by which the Transaction is stored */
+ uint64_t key;
- /* RMPP Send/Receive contexts, if applicable */
- osmv_rmpp_txfr_t rmpp_txfr;
+ /* RMPP Send/Receive contexts, if applicable */
+ osmv_rmpp_txfr_t rmpp_txfr;
- /* A MAD that was sent during the transaction (request or response) */
- osm_madw_t *p_madw;
+ /* A MAD that was sent during the transaction (request or response) */
+ osm_madw_t *p_madw;
- /* Reference to a log to enable tracing */
- osm_log_t *p_log;
+ /* Reference to a log to enable tracing */
+ osm_log_t *p_log;
} osmv_txn_ctx_t;
-
typedef struct _osmv_txn_mgr {
- /* Container of all the transactions */
- cl_qmap_t *p_txn_map;
+ /* Container of all the transactions */
+ cl_qmap_t *p_txn_map;
- /* The timeouts DB */
- cl_event_wheel_t *p_event_wheel;
+ /* The timeouts DB */
+ cl_event_wheel_t *p_event_wheel;
- /* Reference to a log to enable tracing */
- osm_log_t *p_log;
+ /* Reference to a log to enable tracing */
+ osm_log_t *p_log;
} osmv_txn_mgr_t;
@@ -119,11 +115,8 @@ typedef struct _osmv_txn_mgr {
*
*/
ib_api_status_t
-osmv_txn_init( IN osm_bind_handle_t h_bind,
- IN uint64_t tid,
- IN uint64_t key,
- OUT osmv_txn_ctx_t **pp_txn);
-
+osmv_txn_init(IN osm_bind_handle_t h_bind,
+ IN uint64_t tid, IN uint64_t key, OUT osmv_txn_ctx_t ** pp_txn);
/*
* NAME
@@ -136,10 +129,8 @@ osmv_txn_init( IN osm_bind_handle_t h_bind,
*
*/
ib_api_status_t
-osmv_txn_init_rmpp_sender(IN osm_bind_handle_t h_bind,
- IN osmv_txn_ctx_t *p_txn,
- IN osm_madw_t *p_madw);
-
+osmv_txn_init_rmpp_sender(IN osm_bind_handle_t h_bind,
+ IN osmv_txn_ctx_t * p_txn, IN osm_madw_t * p_madw);
/*
* NAME
@@ -152,9 +143,9 @@ osmv_txn_init_rmpp_sender(IN osm_bind_handle_t h_bind,
*
*/
ib_api_status_t
-osmv_txn_init_rmpp_receiver(IN osm_bind_handle_t h_bind,
- IN osmv_txn_ctx_t *p_txn,
- IN boolean_t is_init_by_peer);
+osmv_txn_init_rmpp_receiver(IN osm_bind_handle_t h_bind,
+ IN osmv_txn_ctx_t * p_txn,
+ IN boolean_t is_init_by_peer);
/*
* NAME
@@ -167,9 +158,8 @@ osmv_txn_init_rmpp_receiver(IN osm_bind_handle_t h_bind,
*
*/
void
-osmv_txn_done(IN osm_bind_handle_t h_bind,
- IN uint64_t key,
- IN boolean_t is_in_cb);
+osmv_txn_done(IN osm_bind_handle_t h_bind,
+ IN uint64_t key, IN boolean_t is_in_cb);
/*
* NAME
* osmv_txn_get_tid
@@ -179,11 +169,10 @@ osmv_txn_done(IN osm_bind_handle_t h_bind,
* SEE ALSO
*
*/
-static inline uint64_t
-osmv_txn_get_tid(IN osmv_txn_ctx_t* p_txn)
+static inline uint64_t osmv_txn_get_tid(IN osmv_txn_ctx_t * p_txn)
{
- CL_ASSERT(NULL != p_txn);
- return p_txn->tid;
+ CL_ASSERT(NULL != p_txn);
+ return p_txn->tid;
}
/*
@@ -196,12 +185,12 @@ osmv_txn_get_tid(IN osmv_txn_ctx_t* p_txn)
*
*/
-static inline uint64_t
-osmv_txn_get_key(IN osmv_txn_ctx_t* p_txn)
+static inline uint64_t osmv_txn_get_key(IN osmv_txn_ctx_t * p_txn)
{
- CL_ASSERT(NULL != p_txn);
- return p_txn->key;
+ CL_ASSERT(NULL != p_txn);
+ return p_txn->key;
}
+
/*
* NAME
* osmv_txn_is_rmpp_init_by_peer
@@ -212,11 +201,10 @@ osmv_txn_get_key(IN osmv_txn_ctx_t* p_txn)
* SEE ALSO
*
*/
-static inline boolean_t
-osmv_txn_is_rmpp_init_by_peer(IN osmv_txn_ctx_t* p_txn)
+static inline boolean_t osmv_txn_is_rmpp_init_by_peer(IN osmv_txn_ctx_t * p_txn)
{
- CL_ASSERT(NULL != p_txn);
- return p_txn->rmpp_txfr.is_rmpp_init_by_peer;
+ CL_ASSERT(NULL != p_txn);
+ return p_txn->rmpp_txfr.is_rmpp_init_by_peer;
}
/*
@@ -228,11 +216,11 @@ osmv_txn_is_rmpp_init_by_peer(IN osmv_txn_ctx_t* p_txn)
* SEE ALSO
*
*/
-static inline osmv_rmpp_send_ctx_t*
-osmv_txn_get_rmpp_send_ctx(IN osmv_txn_ctx_t* p_txn)
+static inline osmv_rmpp_send_ctx_t *osmv_txn_get_rmpp_send_ctx(IN osmv_txn_ctx_t
+ * p_txn)
{
- CL_ASSERT(NULL != p_txn);
- return p_txn->rmpp_txfr.p_rmpp_send_ctx;
+ CL_ASSERT(NULL != p_txn);
+ return p_txn->rmpp_txfr.p_rmpp_send_ctx;
}
/*
@@ -244,11 +232,11 @@ osmv_txn_get_rmpp_send_ctx(IN osmv_txn_ctx_t* p_txn)
* SEE ALSO
*
*/
-static inline osmv_rmpp_recv_ctx_t*
-osmv_txn_get_rmpp_recv_ctx(IN osmv_txn_ctx_t* p_txn)
+static inline osmv_rmpp_recv_ctx_t *osmv_txn_get_rmpp_recv_ctx(IN osmv_txn_ctx_t
+ * p_txn)
{
- CL_ASSERT(NULL != p_txn);
- return p_txn->rmpp_txfr.p_rmpp_recv_ctx;
+ CL_ASSERT(NULL != p_txn);
+ return p_txn->rmpp_txfr.p_rmpp_recv_ctx;
}
/*
@@ -261,10 +249,10 @@ osmv_txn_get_rmpp_recv_ctx(IN osmv_txn_ctx_t* p_txn)
*
*/
static inline osmv_txn_rmpp_state_t
-osmv_txn_get_rmpp_state(IN osmv_txn_ctx_t *p_txn)
+osmv_txn_get_rmpp_state(IN osmv_txn_ctx_t * p_txn)
{
- CL_ASSERT(NULL != p_txn);
- return p_txn->rmpp_txfr.rmpp_state;
+ CL_ASSERT(NULL != p_txn);
+ return p_txn->rmpp_txfr.rmpp_state;
}
/*
@@ -277,11 +265,11 @@ osmv_txn_get_rmpp_state(IN osmv_txn_ctx_t *p_txn)
*
*/
static inline void
-osmv_txn_set_rmpp_state(IN osmv_txn_ctx_t *p_txn,
- IN osmv_txn_rmpp_state_t state)
+osmv_txn_set_rmpp_state(IN osmv_txn_ctx_t * p_txn,
+ IN osmv_txn_rmpp_state_t state)
{
- CL_ASSERT(NULL != p_txn);
- p_txn->rmpp_txfr.rmpp_state = state;
+ CL_ASSERT(NULL != p_txn);
+ p_txn->rmpp_txfr.rmpp_state = state;
}
/*
@@ -293,11 +281,10 @@ osmv_txn_set_rmpp_state(IN osmv_txn_ctx_t *p_txn,
* SEE ALSO
*
*/
-static inline osm_madw_t*
-osmv_txn_get_madw(IN osmv_txn_ctx_t *p_txn)
+static inline osm_madw_t *osmv_txn_get_madw(IN osmv_txn_ctx_t * p_txn)
{
- CL_ASSERT(NULL != p_txn);
- return p_txn->p_madw;
+ CL_ASSERT(NULL != p_txn);
+ return p_txn->p_madw;
}
/*
@@ -310,11 +297,10 @@ osmv_txn_get_madw(IN osmv_txn_ctx_t *p_txn)
*
*/
static inline void
-osmv_txn_set_madw(IN osmv_txn_ctx_t *p_txn,
- IN osm_madw_t *p_madw)
+osmv_txn_set_madw(IN osmv_txn_ctx_t * p_txn, IN osm_madw_t * p_madw)
{
- CL_ASSERT(NULL != p_txn);
- p_txn->p_madw = p_madw;
+ CL_ASSERT(NULL != p_txn);
+ p_txn->p_madw = p_madw;
}
/*
@@ -327,9 +313,8 @@ osmv_txn_set_madw(IN osmv_txn_ctx_t *p_txn,
*
*/
ib_api_status_t
-osmv_txn_set_timeout_ev(IN osm_bind_handle_t h_bind,
- IN uint64_t key,
- IN uint64_t msec);
+osmv_txn_set_timeout_ev(IN osm_bind_handle_t h_bind,
+ IN uint64_t key, IN uint64_t msec);
/*
* NAME
* osmv_txn_remove_timeout_ev
@@ -339,9 +324,7 @@ osmv_txn_set_timeout_ev(IN osm_bind_handle_t h_bind,
* SEE ALSO
*
*/
-void
-osmv_txn_remove_timeout_ev(IN osm_bind_handle_t h_bind,
- IN uint64_t key);
+void osmv_txn_remove_timeout_ev(IN osm_bind_handle_t h_bind, IN uint64_t key);
/*
* NAME
* osmv_txn_lookup
@@ -353,14 +336,10 @@ osmv_txn_remove_timeout_ev(IN osm_bind_handle_t h_bind,
*
*/
ib_api_status_t
-osmv_txn_lookup(IN osm_bind_handle_t h_bind,
- IN uint64_t key,
- OUT osmv_txn_ctx_t **pp_txn);
-
-void
-osmv_txn_abort_rmpp_txns(IN osm_bind_handle_t h_bind);
-
+osmv_txn_lookup(IN osm_bind_handle_t h_bind,
+ IN uint64_t key, OUT osmv_txn_ctx_t ** pp_txn);
+void osmv_txn_abort_rmpp_txns(IN osm_bind_handle_t h_bind);
/* * * * * * * * * * * * */
/*
@@ -373,9 +352,8 @@ osmv_txn_abort_rmpp_txns(IN osm_bind_handle_t h_bind);
*
*/
ib_api_status_t
-osmv_txnmgr_init(IN osmv_txn_mgr_t *p_tx_mgr,
- IN osm_log_t *p_log,
- IN cl_spinlock_t *p_lock);
+osmv_txnmgr_init(IN osmv_txn_mgr_t * p_tx_mgr,
+ IN osm_log_t * p_log, IN cl_spinlock_t * p_lock);
/*
* NAME
@@ -386,20 +364,17 @@ osmv_txnmgr_init(IN osmv_txn_mgr_t *p_tx_mgr,
* SEE ALSO
*
*/
-void
-osmv_txnmgr_done(IN osm_bind_handle_t h_bind);
+void osmv_txnmgr_done(IN osm_bind_handle_t h_bind);
-void osmv_txn_lock(IN osm_bind_handle_t h_bind);
-void osmv_txn_unlock(IN osm_bind_handle_t h_bind);
+void osmv_txn_lock(IN osm_bind_handle_t h_bind);
+void osmv_txn_unlock(IN osm_bind_handle_t h_bind);
-inline static uint64_t
-osmv_txn_uniq_key(IN uint64_t tid)
+inline static uint64_t osmv_txn_uniq_key(IN uint64_t tid)
{
- uint64_t pid = getpid();
+ uint64_t pid = getpid();
- return ((pid << 32) | (tid & 0xFFFFFFFF));
+ return ((pid << 32) | (tid & 0xFFFFFFFF));
}
END_C_DECLS
-
-#endif /* _OSMV_TXN_H_ */
+#endif /* _OSMV_TXN_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mtl.h b/opensm/include/vendor/osm_vendor_mtl.h
index 5e3b416..e740b2e 100644
--- a/opensm/include/vendor/osm_vendor_mtl.h
+++ b/opensm/include/vendor/osm_vendor_mtl.h
@@ -33,8 +33,6 @@
*
*/
-
-
/*
* Abstract:
* Definition of interface for the MTL Vendor
@@ -65,13 +63,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****h* OpenSM/Vendor MTL
* NAME
* Vendor MTL
@@ -88,7 +85,6 @@ BEGIN_C_DECLS
*
*
*********/
-
/****s* OpenSM: Vendor MTL/osm_ca_info_t
* NAME
* osm_ca_info_t
@@ -98,14 +94,12 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_ca_info
-{
+typedef struct _osm_ca_info {
ib_net64_t guid;
size_t attr_size;
ib_ca_attr_t *p_attr;
-}
-osm_ca_info_t;
+} osm_ca_info_t;
/*
* FIELDS
@@ -123,7 +117,6 @@ osm_ca_info_t;
#define OSM_DEFAULT_RETRY_COUNT 3
-
/***** OpenSM: Vendor MTL/osm_vendor_t
* NAME
* osm_vendor_t
@@ -133,16 +126,14 @@ osm_ca_info_t;
*
* SYNOPSIS
*/
-typedef struct _osm_vendor
-{
+typedef struct _osm_vendor {
ib_al_handle_t h_al;
osm_log_t *p_log;
uint32_t ca_count;
osm_ca_info_t *p_ca_info;
uint32_t timeout;
- struct osm_transaction_mgr_t *p_transaction_mgr;
-}
-osm_vendor_t;
+ struct osm_transaction_mgr_t *p_transaction_mgr;
+} osm_vendor_t;
/*
* FIELDS
@@ -167,8 +158,6 @@ osm_vendor_t;
* SEE ALSO
*********/
-
-
/****f* OpenSM: Vendor MTL/CA Info/osm_ca_info_get_port_guid
* NAME
* osm_ca_info_get_port_guid
@@ -179,10 +168,10 @@ osm_vendor_t;
* SYNOPSIS
*/
static inline ib_net64_t
-osm_ca_info_get_port_guid( IN const osm_ca_info_t * const p_ca_info,
- IN const uint8_t index )
+osm_ca_info_get_port_guid(IN const osm_ca_info_t * const p_ca_info,
+ IN const uint8_t index)
{
- return ( p_ca_info->p_attr->p_port_attr[index].port_guid );
+ return (p_ca_info->p_attr->p_port_attr[index].port_guid);
}
/*
@@ -213,9 +202,9 @@ osm_ca_info_get_port_guid( IN const osm_ca_info_t * const p_ca_info,
* SYNOPSIS
*/
static inline uint8_t
-osm_ca_info_get_num_ports( IN const osm_ca_info_t * const p_ca_info )
+osm_ca_info_get_num_ports(IN const osm_ca_info_t * const p_ca_info)
{
- return ( p_ca_info->p_attr->num_ports );
+ return (p_ca_info->p_attr->num_ports);
}
/*
@@ -242,11 +231,11 @@ osm_ca_info_get_num_ports( IN const osm_ca_info_t * const p_ca_info )
* SYNOPSIS
*/
ib_api_status_t
-osm_vendor_get_guid_ca_and_port( IN osm_vendor_t * const p_vend,
- IN ib_net64_t const guid,
- OUT VAPI_hca_hndl_t * p_hca_hndl,
- OUT VAPI_hca_id_t * p_hca_id,
- OUT uint32_t * p_port_num );
+osm_vendor_get_guid_ca_and_port(IN osm_vendor_t * const p_vend,
+ IN ib_net64_t const guid,
+ OUT VAPI_hca_hndl_t * p_hca_hndl,
+ OUT VAPI_hca_id_t * p_hca_id,
+ OUT uint32_t * p_port_num);
/*
* PARAMETERS
@@ -283,11 +272,10 @@ osm_vendor_get_guid_ca_and_port( IN osm_vendor_t * const p_vend,
*
* SYNOPSIS
*/
-ib_api_status_t osm_vendor_get_all_port_attr( IN osm_vendor_t * const p_vend,
- IN ib_port_attr_t *
- const p_attr_array,
- IN uint32_t *
- const p_num_ports );
+ib_api_status_t osm_vendor_get_all_port_attr(IN osm_vendor_t * const p_vend,
+ IN ib_port_attr_t *
+ const p_attr_array,
+ IN uint32_t * const p_num_ports);
/*
* PARAMETERS
@@ -309,7 +297,6 @@ ib_api_status_t osm_vendor_get_all_port_attr( IN osm_vendor_t * const p_vend,
* SEE ALSO
*********/
-
#define OSM_BIND_INVALID_HANDLE 0
/****s* OpenSM: Vendor MTL/osm_bind_handle_t
@@ -335,13 +322,12 @@ typedef void *osm_bind_handle_t;
*
* SYNOPSIS
*********/
-typedef struct _osm_vend_wrap_t
-{
- uint32_t size;
- osm_bind_handle_t h_bind;
- // ib_av_handle_t h_av;
- ib_mad_t *mad_buf_p;
- void *p_resp_madw;
+typedef struct _osm_vend_wrap_t {
+ uint32_t size;
+ osm_bind_handle_t h_bind;
+ // ib_av_handle_t h_av;
+ ib_mad_t *mad_buf_p;
+ void *p_resp_madw;
} osm_vend_wrap_t;
/*
@@ -364,5 +350,4 @@ typedef struct _osm_vend_wrap_t
*********/
END_C_DECLS
-
-#endif /* _OSM_VENDOR_MTL_H_ */
+#endif /* _OSM_VENDOR_MTL_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mtl_hca_guid.h b/opensm/include/vendor/osm_vendor_mtl_hca_guid.h
index f27aa54..59bfad5 100644
--- a/opensm/include/vendor/osm_vendor_mtl_hca_guid.h
+++ b/opensm/include/vendor/osm_vendor_mtl_hca_guid.h
@@ -33,7 +33,6 @@
*
*/
-
/*
* Abstract:
* Provides interface over VAPI for obtaining the local ports guids or from guid
@@ -51,13 +50,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****s* OpenSM: Vendor AL/osm_ca_info_t
* NAME
* osm_ca_info_t
@@ -67,14 +65,12 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_ca_info
-{
+typedef struct _osm_ca_info {
ib_net64_t guid;
size_t attr_size;
ib_ca_attr_t *p_attr;
-}
-osm_ca_info_t;
+} osm_ca_info_t;
/*
* FIELDS
@@ -90,7 +86,6 @@ osm_ca_info_t;
* SEE ALSO
*********/
-
/****f* OpenSM: CA Info/osm_ca_info_get_port_guid
* NAME
* osm_ca_info_get_port_guid
@@ -101,10 +96,10 @@ osm_ca_info_t;
* SYNOPSIS
*/
static inline ib_net64_t
-osm_ca_info_get_port_guid( IN const osm_ca_info_t * const p_ca_info,
- IN const uint8_t index )
+osm_ca_info_get_port_guid(IN const osm_ca_info_t * const p_ca_info,
+ IN const uint8_t index)
{
- return ( p_ca_info->p_attr->p_port_attr[index].port_guid );
+ return (p_ca_info->p_attr->p_port_attr[index].port_guid);
}
/*
@@ -136,10 +131,10 @@ osm_ca_info_get_port_guid( IN const osm_ca_info_t * const p_ca_info,
* SYNOPSIS
*/
ib_api_status_t
-osm_vendor_get_guid_ca_and_port( IN osm_vendor_t * const p_vend,
- IN ib_net64_t const guid,
- OUT VAPI_hca_id_t * p_hca_id,
- OUT uint32_t * p_port_num );
+osm_vendor_get_guid_ca_and_port(IN osm_vendor_t * const p_vend,
+ IN ib_net64_t const guid,
+ OUT VAPI_hca_id_t * p_hca_id,
+ OUT uint32_t * p_port_num);
/*
* PARAMETERS
@@ -176,11 +171,10 @@ osm_vendor_get_guid_ca_and_port( IN osm_vendor_t * const p_vend,
*
* SYNOPSIS
*/
-ib_api_status_t osm_vendor_get_all_port_attr( IN osm_vendor_t * const p_vend,
- IN ib_port_attr_t *
- const p_attr_array,
- IN uint32_t *
- const p_num_ports );
+ib_api_status_t osm_vendor_get_all_port_attr(IN osm_vendor_t * const p_vend,
+ IN ib_port_attr_t *
+ const p_attr_array,
+ IN uint32_t * const p_num_ports);
/*
* PARAMETERS
@@ -203,5 +197,4 @@ ib_api_status_t osm_vendor_get_all_port_attr( IN osm_vendor_t * const p_vend,
*********/
END_C_DECLS
-
-#endif /* _OSM_VENDOR_HCA_GUID_H_ */
+#endif /* _OSM_VENDOR_HCA_GUID_H_ */
diff --git a/opensm/include/vendor/osm_vendor_mtl_transaction_mgr.h b/opensm/include/vendor/osm_vendor_mtl_transaction_mgr.h
index 126177c..bdd0714 100644
--- a/opensm/include/vendor/osm_vendor_mtl_transaction_mgr.h
+++ b/opensm/include/vendor/osm_vendor_mtl_transaction_mgr.h
@@ -33,8 +33,6 @@
*
*/
-
-
/*
* Abstract:
* Definition of interface for the MTL Vendor
@@ -50,9 +48,9 @@
#define _OSM_TRANSACTION_MGR_H_
/*
-#include <vapi_types.h>
-#include <evapi.h>
-*/
+ #include <vapi_types.h>
+ #include <evapi.h>
+ */
#include <iba/ib_types.h>
#include <iba/ib_al.h>
@@ -73,13 +71,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****s* OpenSM: Transaction Manager/osm_madw_req_t
* NAME
* osm_madw_req_t
@@ -90,14 +87,13 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_madw_req
-{
- cl_list_item_t list_item;
- cl_map_item_t map_item;
- osm_madw_t *p_madw;
- uint64_t waking_time;
- uint8_t retry_cnt;
- osm_bind_handle_t *p_bind;
+typedef struct _osm_madw_req {
+ cl_list_item_t list_item;
+ cl_map_item_t map_item;
+ osm_madw_t *p_madw;
+ uint64_t waking_time;
+ uint8_t retry_cnt;
+ osm_bind_handle_t *p_bind;
} osm_madw_req_t;
/*
@@ -143,14 +139,12 @@ typedef struct _osm_madw_req
*
* SYNOPSIS
*/
-typedef struct _osm_transaction_mgr
-{
- cl_qmap_t *madw_by_tid_map_p;
- cl_qlist_t *madw_reqs_list_p;
- cl_spinlock_t transaction_mgr_lock;
- cl_timer_t madw_list_timer;
-}
-osm_transaction_mgr_t;
+typedef struct _osm_transaction_mgr {
+ cl_qmap_t *madw_by_tid_map_p;
+ cl_qlist_t *madw_reqs_list_p;
+ cl_spinlock_t transaction_mgr_lock;
+ cl_timer_t madw_list_timer;
+} osm_transaction_mgr_t;
/*
* FIELDS
@@ -178,8 +172,7 @@ osm_transaction_mgr_t;
*
* SYNOPSIS
*/
-void
-osm_transaction_mgr_init( IN osm_vendor_t * const p_vend );
+void osm_transaction_mgr_init(IN osm_vendor_t * const p_vend);
/*
* PARAMETERS
@@ -188,7 +181,6 @@ osm_transaction_mgr_init( IN osm_vendor_t * const p_vend );
*
*********/
-
/****f* OpenSM: Transaction Manager/osm_transaction_mgr_destroy
* NAME
* osm_transaction_mgr_destroy
@@ -200,8 +192,7 @@ osm_transaction_mgr_init( IN osm_vendor_t * const p_vend );
*
* SYNOPSIS
*/
-void
-osm_transaction_mgr_destroy ( IN osm_vendor_t * const p_vend );
+void osm_transaction_mgr_destroy(IN osm_vendor_t * const p_vend);
/*
* PARAMETERS
@@ -224,8 +215,8 @@ osm_transaction_mgr_destroy ( IN osm_vendor_t * const p_vend );
* SYNOPSIS
*/
ib_api_status_t
-osm_transaction_mgr_insert_madw( IN osm_bind_handle_t *p_bind,
- IN osm_madw_t * p_madw );
+osm_transaction_mgr_insert_madw(IN osm_bind_handle_t * p_bind,
+ IN osm_madw_t * p_madw);
/*
* PARAMETERS
* p_vend
@@ -236,7 +227,6 @@ osm_transaction_mgr_insert_madw( IN osm_bind_handle_t *p_bind,
*
*********/
-
/****f* OpenSM: Transaction Manager/osm_transaction_mgr_erase_madw
* NAME
* osm_transaction_mgr_erase_madw
@@ -250,8 +240,8 @@ osm_transaction_mgr_insert_madw( IN osm_bind_handle_t *p_bind,
* SYNOPSIS
*/
ib_api_status_t
-osm_transaction_mgr_erase_madw( IN osm_vendor_t * const p_vend,
- IN ib_mad_t * p_mad );
+osm_transaction_mgr_erase_madw(IN osm_vendor_t * const p_vend,
+ IN ib_mad_t * p_mad);
/*
* PARAMETERS
* p_vend
@@ -272,9 +262,9 @@ osm_transaction_mgr_erase_madw( IN osm_vendor_t * const p_vend,
* SYNOPSIS
*/
ib_api_status_t
-osm_transaction_mgr_get_madw_for_tid( IN osm_vendor_t * const p_vend,
- IN ib_mad_t * const p_mad,
- OUT osm_madw_t ** req_madw_p );
+osm_transaction_mgr_get_madw_for_tid(IN osm_vendor_t * const p_vend,
+ IN ib_mad_t * const p_mad,
+ OUT osm_madw_t ** req_madw_p);
/*
* PARAMETERS
* p_vend
@@ -288,7 +278,6 @@ osm_transaction_mgr_get_madw_for_tid( IN osm_vendor_t * const p_vend,
*
*********/
-
/****f* OpenSM: Transaction Manager/osm_transaction_mgr_callback
* NAME
* osm_transaction_mgr_callback
@@ -303,8 +292,7 @@ osm_transaction_mgr_get_madw_for_tid( IN osm_vendor_t * const p_vend,
*
* SYNOPSIS
*/
-void
-osm_transaction_mgr_callback( IN void* context );
+void osm_transaction_mgr_callback(IN void *context);
/*
* PARAMETERS
* context
@@ -313,6 +301,4 @@ osm_transaction_mgr_callback( IN void* context );
*********/
END_C_DECLS
-
-#endif /* _OSM_TRANSACTION_MGR_H_ */
-
+#endif /* _OSM_TRANSACTION_MGR_H_ */
diff --git a/opensm/include/vendor/osm_vendor_sa_api.h b/opensm/include/vendor/osm_vendor_sa_api.h
index a260333..3de7fe3 100644
--- a/opensm/include/vendor/osm_vendor_sa_api.h
+++ b/opensm/include/vendor/osm_vendor_sa_api.h
@@ -52,13 +52,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****d* OpenSM Vendor SA Client/osmv_flags_t
* NAME
* osmv_flags_t
@@ -68,7 +67,7 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef uint32_t osmv_flags_t;
+typedef uint32_t osmv_flags_t;
#define OSM_SA_FLAGS_SYNC 0x00000001
/*
* VALUES
@@ -90,8 +89,7 @@ typedef uint32_t osmv_flags_t;
*
* SYNOPSIS
*/
-typedef enum _osmv_query_type
-{
+typedef enum _osmv_query_type {
OSMV_QUERY_USER_DEFINED,
OSMV_QUERY_ALL_SVC_RECS,
@@ -116,7 +114,7 @@ typedef enum _osmv_query_type
OSMV_QUERY_MULTIPATH_REC,
-} osmv_query_type_t;
+} osmv_query_type_t;
/*
* VALUES
* OSMV_QUERY_USER_DEFINED
@@ -185,15 +183,14 @@ typedef enum _osmv_query_type
*
* SYNOPSIS
*/
-typedef struct _osmv_user_query
-{
- uint8_t method;
- ib_net16_t attr_id;
- ib_net16_t attr_offset;
- ib_net32_t attr_mod;
- ib_net64_t comp_mask;
- void *p_attr;
-} osmv_user_query_t;
+typedef struct _osmv_user_query {
+ uint8_t method;
+ ib_net16_t attr_id;
+ ib_net16_t attr_offset;
+ ib_net32_t attr_mod;
+ ib_net64_t comp_mask;
+ void *p_attr;
+} osmv_user_query_t;
/*
* FIELDS
*
@@ -238,11 +235,10 @@ typedef struct _osmv_user_query
*
* SYNOPSIS
*/
-typedef struct _osmv_gid_pair
-{
- ib_gid_t src_gid;
- ib_gid_t dest_gid;
-} osmv_gid_pair_t;
+typedef struct _osmv_gid_pair {
+ ib_gid_t src_gid;
+ ib_gid_t dest_gid;
+} osmv_gid_pair_t;
/*
* FIELDS
* src_gid
@@ -267,11 +263,10 @@ typedef struct _osmv_gid_pair
*
* SYNOPSIS
*/
-typedef struct _osmv_lid_pair
-{
- ib_net16_t src_lid;
- ib_net16_t dest_lid;
-} osmv_lid_pair_t;
+typedef struct _osmv_lid_pair {
+ ib_net16_t src_lid;
+ ib_net16_t dest_lid;
+} osmv_lid_pair_t;
/*
* FIELDS
* src_lid
@@ -294,11 +289,10 @@ typedef struct _osmv_lid_pair
*
* SYNOPSIS
*/
-typedef struct _osmv_guid_pair
-{
- ib_net64_t src_guid;
- ib_net64_t dest_guid;
-} osmv_guid_pair_t;
+typedef struct _osmv_guid_pair {
+ ib_net64_t src_guid;
+ ib_net64_t dest_guid;
+} osmv_guid_pair_t;
/*
* FIELDS
* src_guid
@@ -324,17 +318,16 @@ typedef struct _osmv_guid_pair
*
* SYNOPSIS
*/
-typedef struct _osmv_multipath_req_t
-{
- ib_net64_t comp_mask;
- uint16_t pkey;
- boolean_t reversible;
- uint8_t num_path;
- uint8_t sl;
- uint8_t independence;
- uint8_t sgid_count;
- uint8_t dgid_count;
- ib_gid_t gids[IB_MULTIPATH_MAX_GIDS];
+typedef struct _osmv_multipath_req_t {
+ ib_net64_t comp_mask;
+ uint16_t pkey;
+ boolean_t reversible;
+ uint8_t num_path;
+ uint8_t sl;
+ uint8_t independence;
+ uint8_t sgid_count;
+ uint8_t dgid_count;
+ ib_gid_t gids[IB_MULTIPATH_MAX_GIDS];
} osmv_multipath_req_t;
/*
* FIELDS
@@ -354,14 +347,13 @@ typedef struct _osmv_multipath_req_t
*
* SYNOPSIS
*/
-typedef struct _osmv_query_res
-{
- const void *query_context;
- ib_api_status_t status;
- osmv_query_type_t query_type;
- uint32_t result_cnt;
- osm_madw_t *p_result_madw;
-} osmv_query_res_t;
+typedef struct _osmv_query_res {
+ const void *query_context;
+ ib_api_status_t status;
+ osmv_query_type_t query_type;
+ uint32_t result_cnt;
+ osm_madw_t *p_result_madw;
+} osmv_query_res_t;
/*
* FIELDS
* query_context
@@ -413,22 +405,21 @@ typedef struct _osmv_query_res
*
* SYNOPSIS
*/
-static inline void*
-osmv_get_query_result(
- IN osm_madw_t *p_result_madw,
- IN uint32_t result_index )
+static inline void *osmv_get_query_result(IN osm_madw_t * p_result_madw,
+ IN uint32_t result_index)
{
- ib_sa_mad_t *p_sa_mad;
+ ib_sa_mad_t *p_sa_mad;
- CL_ASSERT( p_result_madw );
- p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
- CL_ASSERT( p_sa_mad );
- CL_ASSERT( ib_get_attr_size( p_sa_mad->attr_offset ) * (result_index + 1) +
- IB_SA_MAD_HDR_SIZE <= p_result_madw->mad_size );
+ CL_ASSERT(p_result_madw);
+ p_sa_mad = (ib_sa_mad_t *) osm_madw_get_mad_ptr(p_result_madw);
+ CL_ASSERT(p_sa_mad);
+ CL_ASSERT(ib_get_attr_size(p_sa_mad->attr_offset) * (result_index + 1) +
+ IB_SA_MAD_HDR_SIZE <= p_result_madw->mad_size);
- return( p_sa_mad->data +
- (ib_get_attr_size( p_sa_mad->attr_offset ) * result_index) );
+ return (p_sa_mad->data +
+ (ib_get_attr_size(p_sa_mad->attr_offset) * result_index));
}
+
/*
* PARAMETERS
* p_result_madw
@@ -458,19 +449,20 @@ osmv_get_query_result(
*
* SYNOPSIS
*/
-static inline ib_path_rec_t*
-osmv_get_query_path_rec(
- IN osm_madw_t *p_result_madw,
- IN uint32_t result_index )
+static inline ib_path_rec_t *osmv_get_query_path_rec(IN osm_madw_t *
+ p_result_madw,
+ IN uint32_t result_index)
{
- ib_sa_mad_t *p_sa_mad;
+ ib_sa_mad_t *p_sa_mad;
- CL_ASSERT( p_result_madw );
- p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
- CL_ASSERT( p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_PATH_RECORD );
+ CL_ASSERT(p_result_madw);
+ p_sa_mad = (ib_sa_mad_t *) osm_madw_get_mad_ptr(p_result_madw);
+ CL_ASSERT(p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_PATH_RECORD);
- return( (ib_path_rec_t*)osmv_get_query_result( p_result_madw, result_index ) );
+ return ((ib_path_rec_t *)
+ osmv_get_query_result(p_result_madw, result_index));
}
+
/*
* PARAMETERS
* p_result_madw
@@ -498,20 +490,21 @@ osmv_get_query_path_rec(
*
* SYNOPSIS
*/
-static inline ib_portinfo_record_t*
-osmv_get_query_portinfo_rec(
- IN osm_madw_t *p_result_madw,
- IN uint32_t result_index )
+static inline ib_portinfo_record_t *osmv_get_query_portinfo_rec(IN osm_madw_t *
+ p_result_madw,
+ IN uint32_t
+ result_index)
{
- ib_sa_mad_t *p_sa_mad;
+ ib_sa_mad_t *p_sa_mad;
- CL_ASSERT( p_result_madw );
- p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
- CL_ASSERT( p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_PORTINFO_RECORD );
+ CL_ASSERT(p_result_madw);
+ p_sa_mad = (ib_sa_mad_t *) osm_madw_get_mad_ptr(p_result_madw);
+ CL_ASSERT(p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_PORTINFO_RECORD);
- return( (ib_portinfo_record_t*)osmv_get_query_result( p_result_madw,
- result_index ) );
+ return ((ib_portinfo_record_t *) osmv_get_query_result(p_result_madw,
+ result_index));
}
+
/*
* PARAMETERS
* p_result_madw
@@ -539,20 +532,21 @@ osmv_get_query_portinfo_rec(
*
* SYNOPSIS
*/
-static inline ib_node_record_t*
-osmv_get_query_node_rec(
- IN osm_madw_t *p_result_madw,
- IN uint32_t result_index )
+static inline ib_node_record_t *osmv_get_query_node_rec(IN osm_madw_t *
+ p_result_madw,
+ IN uint32_t
+ result_index)
{
- ib_sa_mad_t *p_sa_mad;
+ ib_sa_mad_t *p_sa_mad;
- CL_ASSERT( p_result_madw );
- p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
- CL_ASSERT( p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_NODE_RECORD );
+ CL_ASSERT(p_result_madw);
+ p_sa_mad = (ib_sa_mad_t *) osm_madw_get_mad_ptr(p_result_madw);
+ CL_ASSERT(p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_NODE_RECORD);
- return( (ib_node_record_t*)osmv_get_query_result( p_result_madw,
- result_index ) );
+ return ((ib_node_record_t *) osmv_get_query_result(p_result_madw,
+ result_index));
}
+
/*
* PARAMETERS
* p_result_madw
@@ -580,20 +574,21 @@ osmv_get_query_node_rec(
*
* SYNOPSIS
*/
-static inline ib_service_record_t*
-osmv_get_query_svc_rec(
- IN osm_madw_t *p_result_madw,
- IN uint32_t result_index )
+static inline ib_service_record_t *osmv_get_query_svc_rec(IN osm_madw_t *
+ p_result_madw,
+ IN uint32_t
+ result_index)
{
- ib_sa_mad_t *p_sa_mad;
+ ib_sa_mad_t *p_sa_mad;
- CL_ASSERT( p_result_madw );
- p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
- CL_ASSERT( p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_SERVICE_RECORD );
+ CL_ASSERT(p_result_madw);
+ p_sa_mad = (ib_sa_mad_t *) osm_madw_get_mad_ptr(p_result_madw);
+ CL_ASSERT(p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_SERVICE_RECORD);
- return( (ib_service_record_t*)osmv_get_query_result( p_result_madw,
- result_index ) );
+ return ((ib_service_record_t *) osmv_get_query_result(p_result_madw,
+ result_index));
}
+
/*
* PARAMETERS
* p_result_madw
@@ -621,20 +616,20 @@ osmv_get_query_svc_rec(
*
* SYNOPSIS
*/
-static inline ib_member_rec_t*
-osmv_get_query_mc_rec(
- IN osm_madw_t *p_result_madw,
- IN uint32_t result_index )
+static inline ib_member_rec_t *osmv_get_query_mc_rec(IN osm_madw_t *
+ p_result_madw,
+ IN uint32_t result_index)
{
- ib_sa_mad_t *p_sa_mad;
+ ib_sa_mad_t *p_sa_mad;
- CL_ASSERT( p_result_madw );
- p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
- CL_ASSERT( p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_MCMEMBER_RECORD );
+ CL_ASSERT(p_result_madw);
+ p_sa_mad = (ib_sa_mad_t *) osm_madw_get_mad_ptr(p_result_madw);
+ CL_ASSERT(p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_MCMEMBER_RECORD);
- return( (ib_member_rec_t*)osmv_get_query_result( p_result_madw,
- result_index ) );
+ return ((ib_member_rec_t *) osmv_get_query_result(p_result_madw,
+ result_index));
}
+
/*
* PARAMETERS
* p_result_madw
@@ -662,20 +657,25 @@ osmv_get_query_mc_rec(
*
* SYNOPSIS
*/
-static inline ib_inform_info_record_t*
-osmv_get_query_inform_info_rec(
- IN osm_madw_t *p_result_madw,
- IN uint32_t result_index )
+static inline ib_inform_info_record_t *osmv_get_query_inform_info_rec(IN
+ osm_madw_t
+ *
+ p_result_madw,
+ IN
+ uint32_t
+ result_index)
{
- ib_sa_mad_t *p_sa_mad;
+ ib_sa_mad_t *p_sa_mad;
- CL_ASSERT( p_result_madw );
- p_sa_mad = (ib_sa_mad_t*)osm_madw_get_mad_ptr( p_result_madw );
- CL_ASSERT( p_sa_mad && p_sa_mad->attr_id == IB_MAD_ATTR_INFORM_INFO_RECORD );
+ CL_ASSERT(p_result_madw);
+ p_sa_mad = (ib_sa_mad_t *) osm_madw_get_mad_ptr(p_result_madw);
+ CL_ASSERT(p_sa_mad
+ && p_sa_mad->attr_id == IB_MAD_ATTR_INFORM_INFO_RECORD);
- return( (ib_inform_info_record_t*)osmv_get_query_result( p_result_madw,
- result_index ) );
+ return ((ib_inform_info_record_t *) osmv_get_query_result(p_result_madw,
+ result_index));
}
+
/*
* PARAMETERS
* p_result_madw
@@ -704,8 +704,7 @@ osmv_get_query_inform_info_rec(
* SYNOPSIS
*/
typedef void
-(*osmv_pfn_query_cb_t)(
- IN osmv_query_res_t *p_query_res );
+ (*osmv_pfn_query_cb_t) (IN osmv_query_res_t * p_query_res);
/*
* PARAMETERS
* p_query_res
@@ -735,19 +734,18 @@ typedef void
*
* SYNOPSIS
*/
-typedef struct _osmv_query_req
-{
- osmv_query_type_t query_type;
- const void *p_query_input;
- ib_net64_t sm_key;
-
- uint32_t timeout_ms;
- uint32_t retry_cnt;
- osmv_flags_t flags;
-
- const void *query_context;
- osmv_pfn_query_cb_t pfn_query_cb;
-} osmv_query_req_t;
+typedef struct _osmv_query_req {
+ osmv_query_type_t query_type;
+ const void *p_query_input;
+ ib_net64_t sm_key;
+
+ uint32_t timeout_ms;
+ uint32_t retry_cnt;
+ osmv_flags_t flags;
+
+ const void *query_context;
+ osmv_pfn_query_cb_t pfn_query_cb;
+} osmv_query_req_t;
/*
* FIELDS
* query_type
@@ -816,11 +814,8 @@ typedef struct _osmv_query_req
* SYNOPSIS
*/
osm_bind_handle_t
-osmv_bind_sa(
- IN osm_vendor_t * const p_vend,
- IN osm_mad_pool_t * const p_mad_pool,
- IN ib_net64_t port_guid
- );
+osmv_bind_sa(IN osm_vendor_t * const p_vend,
+ IN osm_mad_pool_t * const p_mad_pool, IN ib_net64_t port_guid);
/*
* PARAMETERS
* p_vend
@@ -851,10 +846,8 @@ osmv_bind_sa(
* SYNOPSIS
*/
ib_api_status_t
-osmv_query_sa(
- IN osm_bind_handle_t h_bind,
- IN const osmv_query_req_t * const p_query_req
- );
+osmv_query_sa(IN osm_bind_handle_t h_bind,
+ IN const osmv_query_req_t * const p_query_req);
/*
* PARAMETERS
* h_bind
@@ -875,5 +868,4 @@ osmv_query_sa(
*********/
END_C_DECLS
-
-#endif /* _OSM_VENDOR_SA_API_H_ */
+#endif /* _OSM_VENDOR_SA_API_H_ */
diff --git a/opensm/include/vendor/osm_vendor_select.h b/opensm/include/vendor/osm_vendor_select.h
index c63cfc4..5bd6ba6 100644
--- a/opensm/include/vendor/osm_vendor_select.h
+++ b/opensm/include/vendor/osm_vendor_select.h
@@ -33,7 +33,6 @@
*
*/
-
/*
* Abstract:
* Include file that defines which vendor files to compile.
@@ -65,12 +64,12 @@
#ifndef OSM_VENDOR_INTF_SIM
#ifndef OSM_VENDOR_INTF_AL
#define OSM_VENDOR_INTF_AL
-#endif /* AL */
-#endif /* TS */
-#endif /* SIM */
-#endif /* MTL */
-#endif /* UMADT */
-#endif /* TEST */
-#endif /* OPENIB */
+#endif /* AL */
+#endif /* TS */
+#endif /* SIM */
+#endif /* MTL */
+#endif /* UMADT */
+#endif /* TEST */
+#endif /* OPENIB */
-#endif /* _OSM_VENDOR_SELECT_H_ */
+#endif /* _OSM_VENDOR_SELECT_H_ */
diff --git a/opensm/include/vendor/osm_vendor_test.h b/opensm/include/vendor/osm_vendor_test.h
index 6757ef8..26e6314 100644
--- a/opensm/include/vendor/osm_vendor_test.h
+++ b/opensm/include/vendor/osm_vendor_test.h
@@ -33,7 +33,6 @@
*
*/
-
#ifndef _OSM_VENDOR_TEST_H_
#define _OSM_VENDOR_TEST_H_
@@ -44,17 +43,14 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/* This value must be zero for the TEST transport. */
#define OSM_BIND_INVALID_HANDLE 0
-
-
/*
* Abstract:
* Declaration of vendor specific transport interface.
@@ -67,7 +63,6 @@ BEGIN_C_DECLS
*
* $Revision: 1.4 $
*/
-
/****h* OpenSM/Vendor Test
* NAME
* Vendor Test
@@ -91,9 +86,8 @@ BEGIN_C_DECLS
*
* SYNOPSIS
*/
-typedef struct _osm_vend_wrap
-{
- uint32_t dummy;
+typedef struct _osm_vend_wrap {
+ uint32_t dummy;
} osm_vend_wrap_t;
/*********/
@@ -110,28 +104,25 @@ typedef struct _osm_vend_wrap
*
* SYNOPSIS
*/
-typedef struct _osm_vendor
-{
- osm_log_t *p_log;
- uint32_t timeout;
+typedef struct _osm_vendor {
+ osm_log_t *p_log;
+ uint32_t timeout;
} osm_vendor_t;
/*********/
-typedef struct _osm_bind_handle
-{
- osm_vendor_t *p_vend;
- ib_net64_t port_guid;
- uint8_t mad_class;
- uint8_t class_version;
- boolean_t is_responder;
- boolean_t is_trap_processor;
- boolean_t is_report_processor;
- uint32_t send_q_size;
- uint32_t recv_q_size;
+typedef struct _osm_bind_handle {
+ osm_vendor_t *p_vend;
+ ib_net64_t port_guid;
+ uint8_t mad_class;
+ uint8_t class_version;
+ boolean_t is_responder;
+ boolean_t is_trap_processor;
+ boolean_t is_report_processor;
+ uint32_t send_q_size;
+ uint32_t recv_q_size;
} *osm_bind_handle_t;
END_C_DECLS
-
-#endif /* _OSM_VENDOR_TEST_H_ */
+#endif /* _OSM_VENDOR_TEST_H_ */
diff --git a/opensm/include/vendor/osm_vendor_ts.h b/opensm/include/vendor/osm_vendor_ts.h
index 35e28c1..2c46fb9 100644
--- a/opensm/include/vendor/osm_vendor_ts.h
+++ b/opensm/include/vendor/osm_vendor_ts.h
@@ -33,7 +33,6 @@
*
*/
-
/*
* Abstract:
* Definition of interface for the TS Vendor
@@ -65,13 +64,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****s* OpenSM: Vendor TS/osm_bind_handle_t
* NAME
* osm_bind_handle_t
@@ -95,17 +93,16 @@ typedef void *osm_bind_handle_t;
*
* SYNOPSIS
*/
-typedef struct _osm_ts_bind_info
-{
- int ul_dev_fd;
- VAPI_hca_hndl_t hca_hndl;
- struct _osm_vendor *p_vend;
- void *client_context;
- uint8_t port_num;
- void *rcv_callback;
- void *send_err_callback;
- struct _osm_mad_pool *p_osm_pool;
- cl_thread_t poller;
+typedef struct _osm_ts_bind_info {
+ int ul_dev_fd;
+ VAPI_hca_hndl_t hca_hndl;
+ struct _osm_vendor *p_vend;
+ void *client_context;
+ uint8_t port_num;
+ void *rcv_callback;
+ void *send_err_callback;
+ struct _osm_mad_pool *p_osm_pool;
+ cl_thread_t poller;
} osm_ts_bind_info_t;
/*
* FIELDS
@@ -168,14 +165,12 @@ typedef struct _osm_ts_bind_info
*
* SYNOPSIS
*/
-typedef struct _osm_ca_info
-{
- ib_net64_t guid;
- size_t attr_size;
- ib_ca_attr_t *p_attr;
+typedef struct _osm_ca_info {
+ ib_net64_t guid;
+ size_t attr_size;
+ ib_ca_attr_t *p_attr;
-}
-osm_ca_info_t;
+} osm_ca_info_t;
/*
* FIELDS
@@ -191,7 +186,6 @@ osm_ca_info_t;
* SEE ALSO
*********/
-
/***** OpenSM: Vendor TS/osm_vendor_t
* NAME
* osm_vendor_t
@@ -201,15 +195,14 @@ osm_ca_info_t;
*
* SYNOPSIS
*/
-typedef struct _osm_vendor
-{
- osm_log_t *p_log;
- uint32_t ca_count;
- osm_ca_info_t *p_ca_info;
- uint32_t timeout;
- struct _osm_transaction_mgr *p_transaction_mgr;
- osm_ts_bind_info_t smi_bind;
- osm_ts_bind_info_t gsi_bind;
+typedef struct _osm_vendor {
+ osm_log_t *p_log;
+ uint32_t ca_count;
+ osm_ca_info_t *p_ca_info;
+ uint32_t timeout;
+ struct _osm_transaction_mgr *p_transaction_mgr;
+ osm_ts_bind_info_t smi_bind;
+ osm_ts_bind_info_t gsi_bind;
} osm_vendor_t;
/*
@@ -241,7 +234,6 @@ typedef struct _osm_vendor
* SEE ALSO
*********/
-
/****f* OpenSM: Vendor TS/CA Info/osm_ca_info_get_port_guid
* NAME
* osm_ca_info_get_port_guid
@@ -252,10 +244,10 @@ typedef struct _osm_vendor
* SYNOPSIS
*/
static inline ib_net64_t
-osm_ca_info_get_port_guid( IN const osm_ca_info_t * const p_ca_info,
- IN const uint8_t index )
+osm_ca_info_get_port_guid(IN const osm_ca_info_t * const p_ca_info,
+ IN const uint8_t index)
{
- return ( p_ca_info->p_attr->p_port_attr[index].port_guid );
+ return (p_ca_info->p_attr->p_port_attr[index].port_guid);
}
/*
@@ -286,9 +278,9 @@ osm_ca_info_get_port_guid( IN const osm_ca_info_t * const p_ca_info,
* SYNOPSIS
*/
static inline uint8_t
-osm_ca_info_get_num_ports( IN const osm_ca_info_t * const p_ca_info )
+osm_ca_info_get_num_ports(IN const osm_ca_info_t * const p_ca_info)
{
- return ( p_ca_info->p_attr->num_ports );
+ return (p_ca_info->p_attr->num_ports);
}
/*
@@ -315,11 +307,11 @@ osm_ca_info_get_num_ports( IN const osm_ca_info_t * const p_ca_info )
* SYNOPSIS
*/
ib_api_status_t
-osm_vendor_get_guid_ca_and_port( IN osm_vendor_t * const p_vend,
- IN ib_net64_t const guid,
- OUT VAPI_hca_hndl_t * p_hca_hndl,
- OUT VAPI_hca_id_t * p_hca_id,
- OUT uint32_t * p_port_num );
+osm_vendor_get_guid_ca_and_port(IN osm_vendor_t * const p_vend,
+ IN ib_net64_t const guid,
+ OUT VAPI_hca_hndl_t * p_hca_hndl,
+ OUT VAPI_hca_id_t * p_hca_id,
+ OUT uint32_t * p_port_num);
/*
* PARAMETERS
@@ -356,11 +348,10 @@ osm_vendor_get_guid_ca_and_port( IN osm_vendor_t * const p_vend,
*
* SYNOPSIS
*/
-ib_api_status_t osm_vendor_get_all_port_attr( IN osm_vendor_t * const p_vend,
- IN ib_port_attr_t *
- const p_attr_array,
- IN uint32_t *
- const p_num_ports );
+ib_api_status_t osm_vendor_get_all_port_attr(IN osm_vendor_t * const p_vend,
+ IN ib_port_attr_t *
+ const p_attr_array,
+ IN uint32_t * const p_num_ports);
/*
* PARAMETERS
@@ -382,7 +373,6 @@ ib_api_status_t osm_vendor_get_all_port_attr( IN osm_vendor_t * const p_vend,
* SEE ALSO
*********/
-
#define OSM_BIND_INVALID_HANDLE 0
/****s* OpenSM: Vendor TS/osm_vend_wrap_t
@@ -395,12 +385,11 @@ ib_api_status_t osm_vendor_get_all_port_attr( IN osm_vendor_t * const p_vend,
*
* SYNOPSIS
*********/
-typedef struct _osm_vend_wrap_t
-{
- uint32_t size;
- osm_bind_handle_t h_bind;
- ib_mad_t *p_mad_buf;
- void *p_resp_madw;
+typedef struct _osm_vend_wrap_t {
+ uint32_t size;
+ osm_bind_handle_t h_bind;
+ ib_mad_t *p_mad_buf;
+ void *p_resp_madw;
} osm_vend_wrap_t;
/*
@@ -423,5 +412,4 @@ typedef struct _osm_vend_wrap_t
*********/
END_C_DECLS
-
-#endif /* _OSM_VENDOR_TS_H_ */
+#endif /* _OSM_VENDOR_TS_H_ */
diff --git a/opensm/include/vendor/osm_vendor_umadt.h b/opensm/include/vendor/osm_vendor_umadt.h
index 4964947..68b7dfb 100644
--- a/opensm/include/vendor/osm_vendor_umadt.h
+++ b/opensm/include/vendor/osm_vendor_umadt.h
@@ -33,7 +33,6 @@
*
*/
-
/*
* Abstract:
* Declaration of osm_mad_wrapper_t.
@@ -58,13 +57,12 @@
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
-#else /* !__cplusplus */
+#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
-#endif /* __cplusplus */
+#endif /* __cplusplus */
BEGIN_C_DECLS
-
/****h* OpenSM/ Vendor Umadt
* NAME
* MAD Wrapper
@@ -76,10 +74,9 @@ BEGIN_C_DECLS
* Ranjit Pandit, Intel
*
*********/
-typedef void* osm_vendor_t;
+typedef void *osm_vendor_t;
#define OSM_BIND_INVALID_HANDLE 0
-
/****s* OpenSM: Vendor Umadt /osm_bind_handle_t
* NAME
* osm_bind_handle_t
@@ -90,7 +87,7 @@ typedef void* osm_vendor_t;
* SYNOPSIS
*/
-typedef void* osm_bind_handle_t;
+typedef void *osm_bind_handle_t;
/****s* OpenSM: Vendor Umadt /mad_direction_t
* NAME
@@ -104,8 +101,8 @@ typedef void* osm_bind_handle_t;
* SYNOPSIS
*/
typedef enum _mad_direction_t {
- SEND =0,
- RECEIVE,
+ SEND = 0,
+ RECEIVE,
} mad_direction_t;
/****s* OpenSM/ osm_vend_wrap_t
@@ -119,10 +116,10 @@ typedef enum _mad_direction_t {
* SYNOPSIS
*********/
typedef struct _osm_vend_wrap_t {
- MadtStruct *p_madt_struct;
- mad_direction_t direction; // send or receive
- uint32_t size;
-}osm_vend_wrap_t;
+ MadtStruct *p_madt_struct;
+ mad_direction_t direction; // send or receive
+ uint32_t size;
+} osm_vend_wrap_t;
/*
* FIELDS
* p_madt_struct
@@ -135,5 +132,4 @@ typedef struct _osm_vend_wrap_t {
*********/
END_C_DECLS
-
-#endif /* _OSM_VENDOR_UMADT_h_ */
+#endif /* _OSM_VENDOR_UMADT_h_ */
--
1.5.3.rc2.29.gc4640f
More information about the general
mailing list