[openib-general] [PATCH 3/13] osm: port to WinIB stack : include/iba/ib_types.h

Eitan Zahavi eitan at mellanox.co.il
Sun Sep 17 08:58:51 PDT 2006


Hi Hal

Most are just adding OSM_API for fucntion declarations.
Some minor indentations.

Thanks

Eitan

Signed-off-by:  Eitan Zahavi <eitan at mellanox.co.il>

Index: include/iba/ib_types.h
===================================================================
--- include/iba/ib_types.h	(revision 9502)
+++ include/iba/ib_types.h	(working copy)
@@ -52,6 +52,19 @@
 
 BEGIN_C_DECLS
 
+#if defined( WIN32 ) || defined( _WIN64 )
+    #if defined( EXPORT_AL_SYMBOLS )
+         #define OSM_EXPORT	__declspec(dllexport)
+    #else
+         #define OSM_EXPORT	__declspec(dllimport)
+    #endif
+    #define OSM_API __stdcall
+#else
+    #define OSM_EXPORT	extern
+    #define OSM_API
+    #define __ptr64
+#endif
+
 /****h* IBA Base/Constants
 * NAME
 *	Constants
@@ -573,7 +586,7 @@ BEGIN_C_DECLS
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_class_is_vendor_specific_low(
 	IN		const	uint8_t class_code )
 {
@@ -605,7 +618,7 @@ ib_class_is_vendor_specific_low(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_class_is_vendor_specific_high(
 	IN		const	uint8_t class_code )
 {
@@ -637,7 +650,7 @@ ib_class_is_vendor_specific_high(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_class_is_vendor_specific(
 	IN		const	uint8_t class_code )
 {
@@ -668,7 +681,7 @@ ib_class_is_vendor_specific(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_class_is_rmpp(
         IN              const   uint8_t class_code )
 {
@@ -1297,6 +1310,7 @@ ib_class_is_rmpp(
 *	IB_MAD_ATTR_SLVL_RECORD
 *
 * DESCRIPTION
+*	VSLtoL Map Table attribute (15.2.5)
 *	SLtoVL Mapping Table Record attribute (15.2.5)
 *
 * SOURCE
@@ -1680,7 +1694,7 @@ ib_class_is_rmpp(
 *	IB_PATH_REC_BASE_MASK
 *
 * DESCRIPTION
-*	Mask for the base value field for path record MTU, rate,
+*	Mask for the base value field for path record MTU, rate
 *	and packet lifetime.
 *
 * SOURCE
@@ -1768,7 +1782,7 @@ typedef ib_net64_t		ib_gid_prefix_t;
 */
 #define IB_LINK_NO_CHANGE 0
 #define IB_LINK_DOWN      1
-#define IB_LINK_INIT	  2
+#define IB_LINK_INIT	   2
 #define IB_LINK_ARMED     3
 #define IB_LINK_ACTIVE    4
 #define IB_LINK_ACT_DEFER 5
@@ -1792,7 +1806,7 @@ static const char* const __ib_node_type_
 *
 * SYNOPSIS
 */
-static inline const char*
+static inline const char*	OSM_API
 ib_get_node_type_str(
 	IN uint32_t node_type )
 {
@@ -1834,7 +1848,7 @@ static const char* const __ib_port_state
 *
 * SYNOPSIS
 */
-static inline const char*
+static inline const char*	OSM_API
 ib_get_port_state_str(
 	IN				uint8_t						port_state )
 {
@@ -1865,7 +1879,7 @@ ib_get_port_state_str(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_get_port_state_from_str(
 	IN				char*						p_port_state_str )
 {
@@ -1920,7 +1934,7 @@ ib_get_port_state_from_str(
 *
 * SYNOPSIS
 */
-static inline ib_net16_t
+static inline ib_net16_t	OSM_API
 ib_pkey_get_base(
 	IN		const	ib_net16_t					pkey )
 {
@@ -1947,7 +1961,7 @@ ib_pkey_get_base(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_pkey_is_full_member(
 	IN		const	ib_net16_t					pkey )
 {
@@ -1979,7 +1993,7 @@ ib_pkey_is_full_member(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_pkey_is_invalid(
 	IN		const	ib_net16_t					pkey )
 {
@@ -2044,7 +2058,7 @@ typedef union _ib_gid
 * SEE ALSO
 *********/
 
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_gid_is_multicast(
 	IN		const	ib_gid_t*					p_gid )
 {
@@ -2060,7 +2074,7 @@ ib_gid_is_multicast(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_gid_set_default(
 	IN				ib_gid_t* const				p_gid,
 	IN		const	ib_net64_t					interface_id )
@@ -2093,7 +2107,7 @@ ib_gid_set_default(
 *
 * SYNOPSIS
 */
-static inline ib_net64_t
+static inline ib_net64_t	OSM_API
 ib_gid_get_subnet_prefix(
 	IN		const	ib_gid_t* const				p_gid )
 {
@@ -2122,7 +2136,7 @@ ib_gid_get_subnet_prefix(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_gid_is_link_local(
 	IN		const	ib_gid_t* const				p_gid )
 {
@@ -2152,7 +2166,7 @@ ib_gid_is_link_local(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_gid_is_site_local(
 	IN		const	ib_gid_t* const				p_gid )
 {
@@ -2182,7 +2196,7 @@ ib_gid_is_site_local(
 *
 * SYNOPSIS
 */
-static inline ib_net64_t
+static inline ib_net64_t	OSM_API
 ib_gid_get_guid(
 	IN		const	ib_gid_t* const				p_gid )
 {
@@ -2539,7 +2553,7 @@ typedef struct _ib_path_rec
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_path_rec_init_local(
 	IN	ib_path_rec_t* const	p_rec,
 	IN	ib_gid_t* const		p_dgid,
@@ -2649,7 +2663,7 @@ ib_path_rec_init_local(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_num_path(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2674,11 +2688,11 @@ ib_path_rec_num_path(
 *	ib_path_rec_sl
 *
 * DESCRIPTION
-*	Get service level.
+*	Get path service level.
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_sl(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2707,7 +2721,7 @@ ib_path_rec_sl(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_mtu(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2742,7 +2756,7 @@ ib_path_rec_mtu(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_mtu_sel(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2775,7 +2789,7 @@ ib_path_rec_mtu_sel(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_rate(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2814,7 +2828,7 @@ ib_path_rec_rate(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_rate_sel(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2847,7 +2861,7 @@ ib_path_rec_rate_sel(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_pkt_life(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2876,7 +2890,7 @@ ib_path_rec_pkt_life(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_pkt_life_sel(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2909,7 +2923,7 @@ ib_path_rec_pkt_life_sel(
 *
 * SYNOPSIS
 */
-static inline uint32_t
+static inline uint32_t	OSM_API
 ib_path_rec_flow_lbl(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -2938,7 +2952,7 @@ ib_path_rec_flow_lbl(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_rec_hop_limit(
 	IN		const	ib_path_rec_t* const		p_rec )
 {
@@ -3141,7 +3155,7 @@ typedef struct _ib_sm_info
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_sminfo_get_priority(
 	IN		const	ib_sm_info_t* const			p_smi )
 {
@@ -3169,7 +3183,7 @@ ib_sminfo_get_priority(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_sminfo_get_state(
 	IN		const	ib_sm_info_t* const			p_smi )
 {
@@ -3287,7 +3301,7 @@ typedef struct _ib_rmpp_mad
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_mad_init_new(
 	IN				ib_mad_t* const				p_mad,
 	IN		const	uint8_t						mgmt_class,
@@ -3350,7 +3364,7 @@ ib_mad_init_new(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_mad_init_response(
 	IN		const	ib_mad_t* const				p_req_mad,
 	IN				ib_mad_t* const				p_mad,
@@ -3395,7 +3409,7 @@ ib_mad_init_response(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_mad_is_response(
 	IN		const	ib_mad_t* const				p_mad )
 {
@@ -3452,7 +3466,7 @@ ib_mad_is_response(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_rmpp_is_flag_set(
 	IN		const	ib_rmpp_mad_t* const		p_rmpp_mad,
 	IN		const	uint8_t						flag )
@@ -3477,7 +3491,7 @@ ib_rmpp_is_flag_set(
 *	ib_mad_t, ib_rmpp_mad_t
 *********/
 
-static inline void
+static inline void	OSM_API
 ib_rmpp_set_resp_time(
 	IN				ib_rmpp_mad_t* const		p_rmpp_mad,
 	IN		const	uint8_t						resp_time )
@@ -3487,7 +3501,7 @@ ib_rmpp_set_resp_time(
 }
 
 
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_rmpp_get_resp_time(
 	IN		const	ib_rmpp_mad_t* const		p_rmpp_mad )
 {
@@ -3624,7 +3638,7 @@ typedef struct _ib_smp
 *
 * SYNOPSIS
 */
-static inline ib_net16_t
+static inline ib_net16_t	OSM_API
 ib_smp_get_status(
 	IN		const	ib_smp_t* const				p_smp )
 {
@@ -3653,7 +3667,7 @@ ib_smp_get_status(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_smp_is_response(
 	IN		const	ib_smp_t* const				p_smp )
 {
@@ -3681,7 +3695,7 @@ ib_smp_is_response(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_smp_is_d(
 	IN		const	ib_smp_t* const				p_smp )
 {
@@ -3714,7 +3728,7 @@ ib_smp_is_d(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_smp_init_new(
 	IN				ib_smp_t* const				p_smp,
 	IN		const	uint8_t						method,
@@ -3800,7 +3814,7 @@ ib_smp_init_new(
 *
 * SYNOPSIS
 */
-static inline void*
+static inline void*	OSM_API
 ib_smp_get_payload_ptr(
 	IN		const	ib_smp_t* const				p_smp )
 {
@@ -3894,14 +3908,14 @@ typedef struct _ib_sa_mad
 /**********/
 #define IB_SA_MAD_HDR_SIZE (sizeof(ib_sa_mad_t) - IB_SA_DATA_SIZE)
 
-static inline uint32_t
+static inline uint32_t	OSM_API
 ib_get_attr_size(
 	IN	const	ib_net16_t				attr_offset )
 {
 	return( ((uint32_t)cl_ntoh16( attr_offset )) << 3 );
 }
 
-static inline ib_net16_t
+static inline ib_net16_t	OSM_API
 ib_get_attr_offset(
 	IN	const	uint32_t				attr_size )
 {
@@ -3917,7 +3931,7 @@ ib_get_attr_offset(
 *
 * SYNOPSIS
 */
-static inline void*
+static inline void*	OSM_API
 ib_sa_mad_get_payload_ptr(
 	IN	const	ib_sa_mad_t* const		p_sa_mad )
 {
@@ -3954,7 +3968,7 @@ ib_sa_mad_get_payload_ptr(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_node_info_get_local_port_num(
 	IN		const	ib_node_info_t* const		p_ni )
 {
@@ -3985,7 +3999,7 @@ ib_node_info_get_local_port_num(
 *
 * SYNOPSIS
 */
-static inline ib_net32_t
+static inline ib_net32_t	OSM_API
 ib_node_info_get_vendor_id(
 	IN		const	ib_node_info_t* const		p_ni )
 {
@@ -4134,7 +4148,7 @@ typedef struct _ib_port_info
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_port_state(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -4162,7 +4176,7 @@ ib_port_info_get_port_state(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_port_state(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						port_state )
@@ -4194,7 +4208,7 @@ ib_port_info_set_port_state(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_vl_cap(
 	IN const ib_port_info_t* const p_pi)
 {
@@ -4222,7 +4236,7 @@ ib_port_info_get_vl_cap(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_init_type(
 	IN const ib_port_info_t* const p_pi)
 {
@@ -4250,7 +4264,7 @@ ib_port_info_get_init_type(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_op_vls(
 	IN const ib_port_info_t* const p_pi)
 {
@@ -4278,7 +4292,7 @@ ib_port_info_get_op_vls(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_op_vls(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						op_vls )
@@ -4310,7 +4324,7 @@ ib_port_info_set_op_vls(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_state_no_change(
 	IN				ib_port_info_t* const		p_pi )
 {
@@ -4339,7 +4353,7 @@ ib_port_info_set_state_no_change(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_link_speed_sup(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -4370,7 +4384,7 @@ ib_port_info_get_link_speed_sup(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_link_speed_sup(
 	IN				uint8_t const				speed,
 	IN				ib_port_info_t*				p_pi )
@@ -4405,7 +4419,7 @@ ib_port_info_set_link_speed_sup(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_port_phys_state(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -4436,7 +4450,7 @@ ib_port_info_get_port_phys_state(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_port_phys_state(
 	IN				uint8_t const				phys_state,
 	IN				ib_port_info_t*				p_pi )
@@ -4471,7 +4485,7 @@ ib_port_info_set_port_phys_state(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_link_down_def_state(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -4499,7 +4513,7 @@ ib_port_info_get_link_down_def_state(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_link_down_def_state(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						link_dwn_state )
@@ -4531,7 +4545,7 @@ ib_port_info_set_link_down_def_state(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_link_speed_active(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -4583,7 +4597,7 @@ ib_port_info_get_link_speed_active(
 * SYNOPSIS
 */
 
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_compute_rate(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -4680,7 +4694,7 @@ ib_port_info_compute_rate(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_path_get_ipd(
 	IN				uint8_t						local_link_width_supported,
 	IN				uint8_t						path_rec_rate )
@@ -4751,7 +4765,7 @@ ib_path_get_ipd(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_mtu_cap(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -4778,7 +4792,7 @@ ib_port_info_get_mtu_cap(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_neighbor_mtu(
 	IN const ib_port_info_t* const p_pi )
 {
@@ -4805,7 +4819,7 @@ ib_port_info_get_neighbor_mtu(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_neighbor_mtu(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						mtu )
@@ -4839,7 +4853,7 @@ ib_port_info_set_neighbor_mtu(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_master_smsl(
 	IN const ib_port_info_t* const p_pi )
 {
@@ -4866,7 +4880,7 @@ ib_port_info_get_master_smsl(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_master_smsl(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						smsl )
@@ -4898,7 +4912,7 @@ ib_port_info_set_master_smsl(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_timeout(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						timeout )
@@ -4933,7 +4947,7 @@ ib_port_info_set_timeout(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_client_rereg(
 	IN		ib_port_info_t* const   p_pi,
 	IN		const   uint8_t         client_rereg )
@@ -4968,7 +4982,7 @@ ib_port_info_set_client_rereg(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_timeout(
   IN				ib_port_info_t const*   p_pi )
 {
@@ -4996,7 +5010,7 @@ ib_port_info_get_timeout(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_client_rereg(
   IN				ib_port_info_t const* p_pi )
 {
@@ -5025,7 +5039,7 @@ ib_port_info_get_client_rereg(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_hoq_lifetime(
   IN		ib_port_info_t* const		p_pi,
   IN		const	uint8_t					hoq_life )
@@ -5059,7 +5073,7 @@ ib_port_info_set_hoq_lifetime(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_hoq_lifetime(
   IN		const ib_port_info_t* const		p_pi )
 {
@@ -5089,7 +5103,7 @@ ib_port_info_get_hoq_lifetime(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_vl_stall_count(
   IN		ib_port_info_t* const		p_pi,
   IN		const	uint8_t					vl_stall_count )
@@ -5123,7 +5137,7 @@ ib_port_info_set_vl_stall_count(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_vl_stall_count(
   IN		const ib_port_info_t* const		p_pi )
 {
@@ -5152,7 +5166,7 @@ ib_port_info_get_vl_stall_count(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_lmc(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -5180,7 +5194,7 @@ ib_port_info_get_lmc(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_lmc(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						lmc )
@@ -5213,7 +5227,7 @@ ib_port_info_set_lmc(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_link_speed_enabled(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -5240,7 +5254,7 @@ ib_port_info_get_link_speed_enabled(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_link_speed_enabled(
 	IN				ib_port_info_t* const		p_pi,
 	IN		const	uint8_t						link_speed_enabled )
@@ -5272,7 +5286,7 @@ ib_port_info_set_link_speed_enabled(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_mpb(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -5301,7 +5315,7 @@ ib_port_info_get_mpb(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_mpb(
 	IN				ib_port_info_t*				p_pi,
 	IN				uint8_t						mpb )
@@ -5332,7 +5346,7 @@ ib_port_info_set_mpb(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_local_phy_err_thd(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -5359,7 +5373,7 @@ ib_port_info_get_local_phy_err_thd(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_port_info_get_overrun_err_thd(
 	IN		const	ib_port_info_t* const		p_pi )
 {
@@ -5387,7 +5401,7 @@ ib_port_info_get_overrun_err_thd(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_port_info_set_phy_and_overrun_err_thd(
   IN		ib_port_info_t* const		p_pi,
   IN		uint8_t				phy_threshold,
@@ -5540,7 +5554,7 @@ typedef struct _ib_switch_info_record
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_switch_info_get_state_change(
 	IN		const	ib_switch_info_t* const		p_si )
 {
@@ -5568,7 +5582,7 @@ ib_switch_info_get_state_change(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_switch_info_clear_state_change(
 	IN				ib_switch_info_t* const		p_si )
 {
@@ -5599,7 +5613,7 @@ ib_switch_info_clear_state_change(
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_switch_info_is_enhanced_port0(
 	IN		const	ib_switch_info_t* const		p_si )
 {
@@ -5714,7 +5728,7 @@ typedef struct _ib_multipath_rec_t
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_num_path(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -5743,7 +5757,7 @@ ib_multipath_rec_num_path(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_sl(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -5772,7 +5786,7 @@ ib_multipath_rec_sl(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_mtu(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -5807,7 +5821,7 @@ ib_multipath_rec_mtu(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_mtu_sel(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -5840,7 +5854,7 @@ ib_multipath_rec_mtu_sel(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_rate(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -5873,7 +5887,7 @@ ib_multipath_rec_rate(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_rate_sel(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -5906,7 +5920,7 @@ ib_multipath_rec_rate_sel(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_pkt_life(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -5935,7 +5949,7 @@ ib_multipath_rec_pkt_life(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_multipath_rec_pkt_life_sel(
         IN              const   ib_multipath_rec_t* const            p_rec )
 {
@@ -6052,7 +6066,7 @@ typedef struct _ib_slvl_table_record
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_slvl_table_set(
   IN		ib_slvl_table_t*        p_slvl_tbl,
   IN		uint8_t                 sl_index,
@@ -6102,7 +6116,7 @@ ib_slvl_table_set(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_slvl_table_get(
   IN		const ib_slvl_table_t*        p_slvl_tbl,
   IN		uint8_t                 sl_index )
@@ -6223,7 +6237,7 @@ typedef struct _ib_grh
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_grh_get_ver_class_flow(
 	IN		const	ib_net32_t					ver_class_flow,
 		OUT			uint8_t* const				p_ver,
@@ -6275,7 +6289,7 @@ ib_grh_get_ver_class_flow(
 *
 * SYNOPSIS
 */
-static inline ib_net32_t
+static inline ib_net32_t	OSM_API
 ib_grh_set_ver_class_flow(
 	IN		const	uint8_t						ver,
 	IN		const	uint8_t						tclass,
@@ -6391,7 +6405,7 @@ typedef struct _ib_member_rec
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_member_get_sl_flow_hop(
 	IN const ib_net32_t sl_flow_hop,
 	OUT uint8_t* const p_sl,
@@ -6442,7 +6456,7 @@ ib_member_get_sl_flow_hop(
 *
 * SYNOPSIS
 */
-static inline ib_net32_t
+static inline ib_net32_t	OSM_API
 ib_member_set_sl_flow_hop(
 	IN const uint8_t sl,
 	IN const uint32_t flow_label,
@@ -6483,7 +6497,7 @@ ib_member_set_sl_flow_hop(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_member_get_scope_state(
 	IN	const	uint8_t			scope_state,
 	OUT	uint8_t* const			p_scope,
@@ -6527,7 +6541,7 @@ ib_member_get_scope_state(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_member_set_scope_state(
 	IN	const	uint8_t			scope,
 	IN	const	uint8_t			state )
@@ -6566,7 +6580,7 @@ ib_member_set_scope_state(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_member_set_join_state(
 	IN OUT		ib_member_rec_t		*p_mc_rec,
 	IN		const	uint8_t		state )
@@ -6730,7 +6744,7 @@ typedef struct _ib_mad_notice_attr    //
 *
 * SYNOPSIS
 */
-static inline boolean_t
+static inline boolean_t	OSM_API
 ib_notice_is_generic(
   IN		   const	ib_mad_notice_attr_t *p_ntc )
 {
@@ -6757,7 +6771,7 @@ ib_notice_is_generic(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_notice_get_type(
   IN		   const	ib_mad_notice_attr_t *p_ntc )
 {
@@ -6784,7 +6798,7 @@ ib_notice_get_type(
 *
 * SYNOPSIS
 */
-static inline ib_net32_t
+static inline ib_net32_t	OSM_API
 ib_notice_get_prod_type(
   IN		   const	ib_mad_notice_attr_t *p_ntc )
 {
@@ -6815,7 +6829,7 @@ ib_notice_get_prod_type(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_notice_set_prod_type(
   IN ib_mad_notice_attr_t *p_ntc,
   IN ib_net32_t prod_type_val )
@@ -6848,7 +6862,7 @@ ib_notice_set_prod_type(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_notice_set_prod_type_ho(
   IN ib_mad_notice_attr_t *p_ntc,
   IN uint32_t prod_type_val_ho )
@@ -6882,7 +6896,7 @@ ib_notice_set_prod_type_ho(
 *
 * SYNOPSIS
 */
-static inline ib_net32_t
+static inline ib_net32_t	OSM_API
 ib_notice_get_vend_id(
   IN		   const	ib_mad_notice_attr_t *p_ntc )
 {
@@ -6913,7 +6927,7 @@ ib_notice_get_vend_id(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_notice_set_vend_id(
   IN ib_mad_notice_attr_t *p_ntc,
   IN ib_net32_t vend_id )
@@ -6946,7 +6960,7 @@ ib_notice_set_vend_id(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_notice_set_vend_id_ho(
   IN ib_mad_notice_attr_t *p_ntc,
   IN uint32_t vend_id_ho )
@@ -6974,12 +6988,12 @@ ib_notice_set_vend_id_ho(
 #include <complib/cl_packon.h>
 typedef struct _ib_inform_info
 {
-  ib_gid_t				gid;
+  ib_gid_t				   gid;
   ib_net16_t				lid_range_begin;
   ib_net16_t				lid_range_end;
   ib_net16_t				reserved1;
-  uint8_t				is_generic;
-  uint8_t				subscribe;
+  uint8_t					is_generic;
+  uint8_t					subscribe;
   ib_net16_t				trap_type;
   union _inform_g_or_v
   {
@@ -7015,7 +7029,7 @@ typedef struct _ib_inform_info
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_inform_info_get_qpn_resp_time(
   IN		   const	ib_net32_t			qpn_resp_time_val,
   OUT			ib_net32_t* const			p_qpn,
@@ -7056,7 +7070,7 @@ ib_inform_info_get_qpn_resp_time(
 *
 * SYNOPSIS
 */
-static inline void
+static inline void	OSM_API
 ib_inform_info_set_qpn(
   IN	ib_inform_info_t 	*p_ii,
   IN	ib_net32_t const	qpn)
@@ -7087,7 +7101,7 @@ ib_inform_info_set_qpn(
 *
 * SYNOPSIS
 */
-static inline ib_net32_t
+static inline ib_net32_t	OSM_API
 ib_inform_info_get_node_type(
   IN		   const	ib_inform_info_t  *p_inf)
 {
@@ -7120,7 +7134,7 @@ ib_inform_info_get_node_type(
 *
 * SYNOPSIS
 */
-static inline ib_net32_t
+static inline ib_net32_t	OSM_API
 ib_inform_info_get_vend_id(
   IN	const	ib_inform_info_t  *p_inf)
 {
@@ -7271,7 +7285,7 @@ typedef struct _ib_iou_info
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_iou_info_diag_dev_id(
 	IN		const	ib_iou_info_t* const		p_iou_info )
 {
@@ -7300,7 +7314,7 @@ ib_iou_info_diag_dev_id(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ib_iou_info_option_rom(
 	IN		const	ib_iou_info_t*	const	p_iou_info )
 {
@@ -7329,7 +7343,7 @@ ib_iou_info_option_rom(
 *
 * SYNOPSIS
 */
-static inline uint8_t
+static inline uint8_t	OSM_API
 ioc_at_slot(
 	IN		const	ib_iou_info_t*	const	p_iou_info,
 	IN				uint8_t					slot )
@@ -7476,7 +7490,7 @@ typedef struct _ib_ioc_profile
 *********/
 
 
-static inline uint32_t
+static inline uint32_t	OSM_API
 ib_ioc_profile_get_vend_id(
 	IN		const	ib_ioc_profile_t* const		p_ioc_profile )
 {
@@ -7484,7 +7498,7 @@ ib_ioc_profile_get_vend_id(
 }
 
 
-static inline void
+static inline void	OSM_API
 ib_ioc_profile_set_vend_id(
 	IN				ib_ioc_profile_t* const		p_ioc_profile,
 	IN		const	uint32_t					vend_id )
@@ -7552,7 +7566,7 @@ typedef struct _ib_svc_entries
 *********/
 
 
-static inline void
+static inline void	OSM_API
 ib_dm_get_slot_lo_hi(
 	IN		const	ib_net32_t			slot_lo_hi,
 		OUT			uint8_t		*const	p_slot,
@@ -7580,7 +7594,7 @@ typedef struct _ib_ioc_info
 {
 	ib_net64_t				module_guid;
 	ib_net64_t				iou_guid;
-	ib_ioc_profile_t			ioc_profile;
+	ib_ioc_profile_t		ioc_profile;
 	ib_net64_t				access_key;
 	uint16_t				initiators_conf;
 	uint8_t					resv[38];
@@ -7621,8 +7635,8 @@ typedef struct _ib_ioc_info
 #define IB_SIDR_REQ_PDATA_SIZE_VER1			216
 #define IB_SIDR_REP_PDATA_SIZE_VER1			140
 
-#define IB_ARI_SIZE					72	// redefine
-#define IB_APR_INFO_SIZE				72
+#define IB_ARI_SIZE							72		// redefine
+#define IB_APR_INFO_SIZE					72
 
 
 /****d* Access Layer/ib_rej_status_t
@@ -7748,17 +7762,22 @@ typedef uint16_t					ib_sidr_status_t;
  *	The following definitions are shared between the Access Layer and VPD
  */
 
-typedef struct _ib_ca			*ib_ca_handle_t;
-typedef struct _ib_pd			*ib_pd_handle_t;
-typedef struct _ib_rdd			*ib_rdd_handle_t;
-typedef struct _ib_mr			*ib_mr_handle_t;
-typedef struct _ib_mw			*ib_mw_handle_t;
-typedef struct _ib_qp			*ib_qp_handle_t;
-typedef struct _ib_eec			*ib_eec_handle_t;
-typedef struct _ib_cq			*ib_cq_handle_t;
-typedef struct _ib_av			*ib_av_handle_t;
-typedef struct _ib_mcast		*ib_mcast_handle_t;
 
+typedef struct _ib_ca* __ptr64			ib_ca_handle_t;
+typedef struct _ib_pd* __ptr64			ib_pd_handle_t;
+typedef struct _ib_rdd* __ptr64			ib_rdd_handle_t;
+typedef struct _ib_mr* __ptr64			ib_mr_handle_t;
+typedef struct _ib_mw* __ptr64			ib_mw_handle_t;
+typedef struct _ib_qp* __ptr64			ib_qp_handle_t;
+typedef struct _ib_eec* __ptr64       ib_eec_handle_t;
+typedef struct _ib_cq* __ptr64			ib_cq_handle_t;
+typedef struct _ib_av* __ptr64			ib_av_handle_t;
+typedef struct _ib_mcast* __ptr64		ib_mcast_handle_t;
+
+/* Currently for windows branch we use the extended version of ib special verbs struct 
+	in order to be compliant with Infinicon ib_types , later we'll change it to support 
+	OpenSM ib_types.h */
+#ifndef WIN32
 
 /****d* Access Layer/ib_api_status_t
 * NAME
@@ -7832,7 +7851,7 @@ typedef enum _ib_api_status_t
 }	ib_api_status_t;
 /*****/
 
-extern const char* ib_error_str[];
+OSM_EXPORT const char* ib_error_str[];
 
 /****f* IBA Base: Types/ib_get_err_str
 * NAME
@@ -7843,7 +7862,7 @@ extern const char* ib_error_str[];
 *
 * SYNOPSIS
 */
-static inline const char*
+static inline const char*	OSM_API
 ib_get_err_str(
 	IN				ib_api_status_t				status )
 {
@@ -8020,7 +8039,7 @@ typedef enum _ib_async_event_t
 *
 *****/
 
-extern const char* ib_async_event_str[];
+OSM_EXPORT const char* ib_async_event_str[];
 
 /****f* IBA Base: Types/ib_get_async_event_str
 * NAME
@@ -8031,7 +8050,7 @@ extern const char* ib_async_event_str[];
 *
 * SYNOPSIS
 */
-static inline const char*
+static inline const char*	OSM_API
 ib_get_async_event_str(
 	IN				ib_async_event_t			event )
 {
@@ -8311,6 +8330,7 @@ typedef struct _ib_ca_attr
 	uint32_t				vend_id;
 	uint16_t				dev_id;
 	uint16_t				revision;
+	uint64_t				fw_ver;
 
 	/*
 	 * Total size of the ca attributes in bytes
@@ -8353,6 +8373,8 @@ typedef struct _ib_ca_attr
 	uint32_t				max_mcast_grps;
 	uint32_t				max_mcast_qps;
 	uint32_t				max_qps_per_mcast_grp;
+	uint32_t				max_fmr;
+	uint32_t				max_map_per_fmr;
 
 	/*
 	 * local_ack_delay:
@@ -8400,6 +8422,9 @@ typedef struct _ib_ca_attr
 *	revision
 *		Revision ID of this adapter
 *
+*	Fw_ver
+*		Device Firmware version.
+*
 *	size
 *		Total size in bytes for the HCA attributes.  This size includes total
 *		size required for all the variable members of the structure.  If a
@@ -9633,7 +9658,7 @@ typedef enum _ib_wc_status_t
 *		The completed work request was canceled by the user.
 *****/
 
-extern const char* ib_wc_status_str[];
+OSM_EXPORT const char* ib_wc_status_str[];
 
 /****f* IBA Base: Types/ib_get_wc_status_str
 * NAME
@@ -9644,7 +9669,7 @@ extern const char* ib_wc_status_str[];
 *
 * SYNOPSIS
 */
-static inline const char*
+static inline const char*	OSM_API
 ib_get_wc_status_str(
 	IN				ib_wc_status_t				wc_status )
 {
@@ -10300,4 +10325,9 @@ typedef struct _ib_ci_op
 
 END_C_DECLS
 
-#endif // __IB_TYPES_H__
+#endif /* ndef WIN */
+#if defined( __WIN__ )
+    #include <iba/ib_types_extended.h>
+#endif
+
+#endif /* __IB_TYPES_H__ */





More information about the general mailing list