[openib-general] [PATCH] kDAPL: remove use of DAT_COUNT
Tom Duffy
tduffy at sun.com
Thu May 12 10:35:33 PDT 2005
Remove DAT_COUNT, just use int.
Plus a few whitespace fixes thrown in for good measure. I am trying to
clean these things up as I see them.
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: linux-kernel/test/dapltest/test/dapl_performance_util.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_performance_util.c (revision 2321)
+++ linux-kernel/test/dapltest/test/dapl_performance_util.c (working copy)
@@ -40,7 +40,7 @@ DT_Performance_Test_Create (
Performance_Test_t **perf_test)
{
Performance_Test_t *test_ptr;
- DAT_COUNT pipeline_len;
+ int pipeline_len;
u32 ret;
DT_Tdep_Print_Head *phead;
@@ -523,8 +523,8 @@ DT_performance_wait (
DAT_EVD_HANDLE evd_handle,
Performance_Stats_t *stats)
{
- DAT_COUNT i;
- DAT_COUNT queue_size;
+ int i;
+ int queue_size;
u32 ret;
struct dat_event event;
unsigned long pre_ctxt_num;
Index: linux-kernel/test/dapltest/test/dapl_limit.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_limit.c (revision 2321)
+++ linux-kernel/test/dapltest/test/dapl_limit.c (working copy)
@@ -1122,8 +1122,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
*/
if (depth == LIM_SIZE_LMR)
{
- DAT_COUNT last_size = 0;
- DAT_COUNT test_size = DFLT_BUFFSZ;
+ int last_size = 0;
+ int test_size = DFLT_BUFFSZ;
Bpool *test_bpool;
for (;;)
{
Index: linux-kernel/test/dapltest/test/dapl_transaction_test.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_transaction_test.c (revision 2321)
+++ linux-kernel/test/dapltest/test/dapl_transaction_test.c (working copy)
@@ -742,7 +742,7 @@ retry:
*/
{
struct dat_event event;
- DAT_COUNT drained = 0;
+ int drained = 0;
dat_ep_reset (test_ptr->ep_context[i].ep_handle);
do
Index: linux-kernel/test/dapltest/test/dapl_bpool.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_bpool.c (revision 2321)
+++ linux-kernel/test/dapltest/test/dapl_bpool.c (working copy)
@@ -90,16 +90,16 @@ DT_BpoolAlloc (
DAT_PZ_HANDLE pz_handle,
DAT_EP_HANDLE ep_handle,
DAT_EVD_HANDLE rmr_evd_handle,
- DAT_COUNT seg_size,
- DAT_COUNT num_segs,
- DAT_COUNT alignment,
+ int seg_size,
+ int num_segs,
+ int alignment,
boolean_t enable_rdma_write,
boolean_t enable_rdma_read)
{
unsigned char *module = "DT_BpoolAlloc";
unsigned char *alloc_ptr = NULL;
Bpool *bpool_ptr = NULL;
- DAT_COUNT alloc_size, bpool_size;
+ int alloc_size, bpool_size;
DAT_REGION_DESCRIPTION region;
u32 ret = DAT_SUCCESS;
DAT_VLEN bp_len;
@@ -392,7 +392,7 @@ DT_Bpool_GetRegBuff (Bpool * bpool_ptr,
}
/*****************************************************************************/
-DAT_COUNT
+int
DT_Bpool_GetBuffSize (Bpool * bpool_ptr, int index)
{
return ( bpool_ptr->seg_size );
Index: linux-kernel/test/dapltest/test/dapl_test_util.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_test_util.c (revision 2321)
+++ linux-kernel/test/dapltest/test/dapl_test_util.c (working copy)
@@ -573,7 +573,7 @@ boolean_t
DT_dto_check ( DT_Tdep_Print_Head *phead,
struct dat_dto_completion_event_data *dto_p,
DAT_EP_HANDLE ep_expected,
- DAT_COUNT len_expected,
+ int len_expected,
DAT_DTO_COOKIE cookie_expected,
char *message )
{
Index: linux-kernel/test/dapltest/test/dapl_util.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_util.c (revision 2321)
+++ linux-kernel/test/dapltest/test/dapl_util.c (working copy)
@@ -189,7 +189,7 @@ DT_State2Str (DAT_EP_STATE state_code)
* and do the correct thing if align == 0.
*/
unsigned char *
-DT_AlignPtr (void * val, DAT_COUNT align)
+DT_AlignPtr (void * val, int align)
{
if (align)
{
@@ -199,8 +199,8 @@ DT_AlignPtr (void * val, DAT_COUNT align
return (val);
}
-DAT_COUNT
-DT_RoundSize (DAT_COUNT val, DAT_COUNT align)
+int
+DT_RoundSize (int val, int align)
{
if (align)
{
Index: linux-kernel/test/dapltest/test/dapl_client.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_client.c (revision 2321)
+++ linux-kernel/test/dapltest/test/dapl_client.c (working copy)
@@ -276,7 +276,7 @@ retry:
if ( event_num == DAT_CONNECTION_EVENT_PEER_REJECTED )
{
struct dat_event event;
- DAT_COUNT drained = 0;
+ int drained = 0;
DT_Mdep_Sleep (1000);
DT_Tdep_PT_Printf (phead,
Index: linux-kernel/test/dapltest/include/dapl_tdep.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_tdep.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_tdep.h (working copy)
@@ -46,7 +46,7 @@ DT_Tdep_Execute_Test ( Params_t *params_
u32
DT_Tdep_evd_create (DAT_IA_HANDLE ia_handle,
- DAT_COUNT evd_min_qlen,
+ int evd_min_qlen,
DAT_CNO_HANDLE cno_handle,
DAT_EVD_FLAGS evd_flags,
DAT_EVD_HANDLE *evd_handle_ptr);
Index: linux-kernel/test/dapltest/include/dapl_global.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_global.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_global.h (working copy)
@@ -30,7 +30,7 @@
#include "dapl_proto.h"
-extern DAT_COUNT DT_dapltest_debug;
+extern int DT_dapltest_debug;
extern boolean_t DT_local_is_little_endian;
#endif
Index: linux-kernel/test/dapltest/include/dapl_performance_test.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_performance_test.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_performance_test.h (working copy)
@@ -57,7 +57,7 @@ typedef struct
DAT_EP_HANDLE ep_handle;
struct dat_ep_attr ep_attr;
DAT_CONN_QUAL port;
- DAT_COUNT pipeline_len;
+ int pipeline_len;
Bpool *bp;
Performance_Test_Op_t op;
} Performance_Ep_Context_t;
@@ -73,13 +73,13 @@ typedef struct
DAT_IA_HANDLE ia_handle;
DAT_PZ_HANDLE pz_handle;
DAT_CNO_HANDLE cno_handle;
- DAT_COUNT reqt_evd_length;
+ int reqt_evd_length;
DAT_EVD_HANDLE reqt_evd_hdl; /* request+rmr */
- DAT_COUNT recv_evd_length;
+ int recv_evd_length;
DAT_EVD_HANDLE recv_evd_hdl; /* receive */
- DAT_COUNT conn_evd_length;
+ int conn_evd_length;
DAT_EVD_HANDLE conn_evd_hdl; /* connect */
- DAT_COUNT creq_evd_length;
+ int creq_evd_length;
DAT_EVD_HANDLE creq_evd_hdl; /* "" request */
Performance_Ep_Context_t ep_context;
} Performance_Test_t;
Index: linux-kernel/test/dapltest/include/dapl_proto.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_proto.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_proto.h (working copy)
@@ -85,9 +85,9 @@ Bpool * DT_BpoolAlloc (Per_Test_
DAT_PZ_HANDLE pz_handle,
DAT_EP_HANDLE ep_handle,
DAT_EVD_HANDLE rmr_evd_handle,
- DAT_COUNT seg_size,
- DAT_COUNT num_segs,
- DAT_COUNT alignment,
+ int seg_size,
+ int num_segs,
+ int alignment,
boolean_t enable_rdma_write,
boolean_t enable_rdma_read);
@@ -97,7 +97,7 @@ boolean_t DT_Bpool_Destroy (P
unsigned char *DT_Bpool_GetBuffer (Bpool * bpool_ptr, int index);
DAT_VADDR DT_Bpool_GetRegBuff (Bpool * bpool_ptr, int index);
-DAT_COUNT DT_Bpool_GetBuffSize (Bpool * bpool_ptr, int index);
+int DT_Bpool_GetBuffSize (Bpool * bpool_ptr, int index);
struct dat_lmr_triplet *DT_Bpool_GetIOV (Bpool * bpool_ptr, int index);
DAT_LMR_CONTEXT DT_Bpool_GetLMR (Bpool * bpool_ptr, int index);
DAT_RMR_CONTEXT DT_Bpool_GetRMR (Bpool * bpool_ptr, int index);
@@ -398,7 +398,7 @@ boolean_t DT_rmr_event_wait (
boolean_t DT_dto_check ( DT_Tdep_Print_Head* phead,
struct dat_dto_completion_event_data *dto_p,
DAT_EP_HANDLE ep_expected,
- DAT_COUNT len_expected,
+ int len_expected,
DAT_DTO_COOKIE cookie_expected,
char *message);
@@ -537,9 +537,9 @@ DAT_QOS DT_ParseQoS (char *arg);
DAT_MEM_TYPE DT_ParseMemType (char *arg);
-unsigned char *DT_AlignPtr (void * val, DAT_COUNT align);
+unsigned char *DT_AlignPtr (void * val, int align);
-DAT_COUNT DT_RoundSize (DAT_COUNT val, DAT_COUNT align);
+int DT_RoundSize (int val, int align);
/* dapl_limit_cmd.c */
void DT_Limit_Cmd_Init ( Limit_Cmd_t * cmd);
Index: linux-kernel/test/dapltest/include/dapl_bpool.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_bpool.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_bpool.h (working copy)
@@ -39,8 +39,8 @@ struct Bpool_tag {
unsigned char *alloc_ptr;
uint32_t alloc_size;
DAT_PZ_HANDLE pz_handle;
- DAT_COUNT seg_size;
- DAT_COUNT num_segs; /* num segments */
+ int seg_size;
+ int num_segs; /* num segments */
unsigned char *buffer_start; /* Start of buffer area */
DAT_VLEN buffer_size; /* Size of data buffer (rounded) */
DAT_VADDR reg_addr; /* start of registered area */
Index: linux-kernel/test/dapltest/include/dapl_fft_util.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_fft_util.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_fft_util.h (working copy)
@@ -61,7 +61,7 @@ typedef struct
DAT_EP_HANDLE ep_handle;
DAT_EVD_HANDLE cr_evd, conn_evd, send_evd, recv_evd;
struct dat_event event;
- DAT_COUNT count;
+ int count;
DAT_CR_HANDLE cr_handle;
Bpool *bpool;
struct dat_cr_arrival_event_data cr_stat;
Index: linux-kernel/test/dapltest/include/dapl_performance_stats.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_performance_stats.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_performance_stats.h (working copy)
@@ -58,7 +58,7 @@ typedef struct
Performance_Stats_Data_t latency;
DT_CpuStat pre_cpu_stat;
DT_CpuStat post_cpu_stat;
- DAT_COUNT pipeline_len;
+ int pipeline_len;
} Performance_Stats_t;
#endif
Index: linux-kernel/test/dapltest/include/dapl_transaction_test.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_transaction_test.h (revision 2321)
+++ linux-kernel/test/dapltest/include/dapl_transaction_test.h (working copy)
@@ -80,7 +80,7 @@ typedef struct
DAT_IA_ADDRESS_PTR remote_ia_addr;
DAT_CONN_QUAL base_port;
DAT_TIMEOUT time_out;
- DAT_COUNT evd_length;
+ int evd_length;
Thread *thread;
/* This group set up by each thread in DT_Transaction_Main() */
Index: linux-kernel/test/dapltest/cmd/dapl_test_data.c
===================================================================
--- linux-kernel/test/dapltest/cmd/dapl_test_data.c (revision 2321)
+++ linux-kernel/test/dapltest/cmd/dapl_test_data.c (working copy)
@@ -27,7 +27,7 @@
#include "dapl_proto.h"
-DAT_COUNT DT_dapltest_debug = 0;
+int DT_dapltest_debug = 0;
/*
* check memory leaking int alloc_count; DT_Mdep_LockType
* Alloc_Count_Lock;
Index: linux-kernel/test/dapltest/common/dapl_global.c
===================================================================
--- linux-kernel/test/dapltest/common/dapl_global.c (revision 2321)
+++ linux-kernel/test/dapltest/common/dapl_global.c (working copy)
@@ -28,6 +28,6 @@
#include "dapl_proto.h"
boolean_t DT_local_is_little_endian;
-DAT_COUNT DT_dapltest_debug = 0;
+int DT_dapltest_debug = 0;
Index: linux-kernel/test/dapltest/kdapl/kdapl_tdep_evd.c
===================================================================
--- linux-kernel/test/dapltest/kdapl/kdapl_tdep_evd.c (revision 2321)
+++ linux-kernel/test/dapltest/kdapl/kdapl_tdep_evd.c (working copy)
@@ -96,7 +96,7 @@ KDT_Evd_Destroy(void)
u32
DT_Tdep_evd_create (DAT_IA_HANDLE ia_handle,
- DAT_COUNT evd_min_qlen,
+ int evd_min_qlen,
DAT_CNO_HANDLE cno_handle,
DAT_EVD_FLAGS evd_flags,
DAT_EVD_HANDLE *evd_handle_ptr)
Index: linux-kernel/dat-provider/dapl_cookie.c
===================================================================
--- linux-kernel/dat-provider/dapl_cookie.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_cookie.c (working copy)
@@ -113,9 +113,9 @@ u32 dapl_cb_put(DAPL_COOKIE_BUFFER *buff
* DAT_INSUFFICIENT_RESOURCES
*
*/
-u32 dapl_cb_create(DAPL_COOKIE_BUFFER *buffer, DAPL_EP *ep, DAT_COUNT size)
+u32 dapl_cb_create(DAPL_COOKIE_BUFFER *buffer, DAPL_EP *ep, int size)
{
- DAT_COUNT i;
+ int i;
/*
* allocate one additional entry so that the tail
@@ -181,7 +181,7 @@ void dapl_cb_free(DAPL_COOKIE_BUFFER * b
u32 dapl_cb_get(DAPL_COOKIE_BUFFER *buffer, DAPL_COOKIE **cookie_ptr)
{
u32 dat_status;
- DAT_COUNT new_head;
+ int new_head;
dapl_os_assert(NULL != cookie_ptr);
Index: linux-kernel/dat-provider/dapl_ep_connect.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_connect.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_connect.c (working copy)
@@ -45,7 +45,7 @@
u32 dapl_ep_connect(DAT_EP_HANDLE ep_handle,
DAT_IA_ADDRESS_PTR remote_ia_address,
DAT_CONN_QUAL remote_conn_qual, DAT_TIMEOUT timeout,
- DAT_COUNT private_data_size, const void *private_data,
+ int private_data_size, const void *private_data,
DAT_QOS qos, DAT_CONNECT_FLAGS connect_flags)
{
DAPL_EP *ep_ptr;
Index: linux-kernel/dat-provider/dapl_cookie.h
===================================================================
--- linux-kernel/dat-provider/dapl_cookie.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_cookie.h (working copy)
@@ -37,7 +37,7 @@
#include "dapl.h"
extern u32 dapl_cb_create(DAPL_COOKIE_BUFFER *buffer, DAPL_EP *ep,
- DAT_COUNT size);
+ int size);
extern void dapl_cb_free(DAPL_COOKIE_BUFFER *buffer);
Index: linux-kernel/dat-provider/dapl_module.c
===================================================================
--- linux-kernel/dat-provider/dapl_module.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_module.c (working copy)
@@ -174,7 +174,7 @@ void DAT_PROVIDER_INIT_FUNC_NAME(const s
}
printk("KDAPL : Added device %s to the registry\n",
provider_info->ia_name);
- bail:
+bail:
if (DAT_SUCCESS != dat_status) {
if (NULL != provider) {
(void)dapl_provider_list_remove(provider_info->ia_name);
@@ -220,7 +220,7 @@ void DAT_PROVIDER_FINI_FUNC_NAME(const s
*/
dapl_hca_free(provider->extension);
- (void)dapl_provider_list_remove(provider_info->ia_name);
+ dapl_provider_list_remove(provider_info->ia_name);
}
static struct ib_client dapl_client = {
@@ -237,9 +237,8 @@ static char *dev_name_suffix_table[3] =
void dapl_add_one(struct ib_device *device)
{
- DAT_COUNT i;
+ int i, length;
struct dat_provider_info provider_info;
- int length;
dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
"Inside dapl_add_one called by %s\n", device->name);
@@ -254,14 +253,12 @@ void dapl_add_one(struct ib_device *devi
provider_info.is_thread_safe = FALSE;
DAT_PROVIDER_INIT_FUNC_NAME(&provider_info, device, i);
}
- return;
}
void dapl_remove_one(struct ib_device *device)
{
- DAT_COUNT i;
+ int i, length;
struct dat_provider_info provider_info;
- int length;
dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
"Inside dapl_remove_one called by %s\n", device->name);
@@ -269,14 +266,12 @@ void dapl_remove_one(struct ib_device *d
length = strlen(device->name);
for (i = 0; i < device->phys_port_cnt; i++) {
strncpy(provider_info.ia_name, device->name, length + 1);
- (void)strcat(provider_info.ia_name,
- dev_name_suffix_table[i + 1]);
+ strcat(provider_info.ia_name, dev_name_suffix_table[i + 1]);
provider_info.dat_version_major = DAT_VERSION_MAJOR;
provider_info.dat_version_minor = DAT_VERSION_MINOR;
provider_info.is_thread_safe = FALSE;
DAT_PROVIDER_FINI_FUNC_NAME(&provider_info);
}
- return;
}
/*
@@ -289,11 +284,9 @@ static void dapl_register_providers(void
status = ib_register_client(&dapl_client);
if (status < 0)
printk("ib_register_client () failed: %x\n", status);
- return;
};
static void dapl_unregister_providers(void)
{
- (void)ib_unregister_client(&dapl_client);
- return;
+ ib_unregister_client(&dapl_client);
}
Index: linux-kernel/dat-provider/dapl_ring_buffer_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_ring_buffer_util.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ring_buffer_util.c (working copy)
@@ -56,7 +56,7 @@
* DAT_INSUFFICIENT_RESOURCES
*
*/
-u32 dapl_rbuf_alloc(DAPL_RING_BUFFER *rbuf, DAT_COUNT size)
+u32 dapl_rbuf_alloc(DAPL_RING_BUFFER *rbuf, int size)
{
unsigned int rsize; /* real size */
@@ -68,7 +68,7 @@ u32 dapl_rbuf_alloc(DAPL_RING_BUFFER *rb
/* Put size on a power of 2 boundary */
rsize = 1;
- while ((DAT_COUNT) rsize < size) {
+ while ((int) rsize < size) {
rsize <<= 1;
}
@@ -104,7 +104,7 @@ u32 dapl_rbuf_alloc(DAPL_RING_BUFFER *rb
* DAT_INSUFFICIENT_RESOURCES
*
*/
-u32 dapl_rbuf_realloc(DAPL_RING_BUFFER *rbuf, DAT_COUNT size)
+u32 dapl_rbuf_realloc(DAPL_RING_BUFFER *rbuf, int size)
{
DAPL_RING_BUFFER new_rbuf;
void *entry;
@@ -261,11 +261,9 @@ void *dapl_rbuf_remove(DAPL_RING_BUFFER
* count of entries
*
*/
-DAT_COUNT dapl_rbuf_count(DAPL_RING_BUFFER * rbuf)
+int dapl_rbuf_count(DAPL_RING_BUFFER * rbuf)
{
- DAT_COUNT count;
- int head;
- int tail;
+ int count, head, tail;
head = atomic_read(&rbuf->head) & rbuf->lim;
tail = atomic_read(&rbuf->tail) & rbuf->lim;
Index: linux-kernel/dat-provider/dapl_srq_resize.c
===================================================================
--- linux-kernel/dat-provider/dapl_srq_resize.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_srq_resize.c (working copy)
@@ -63,7 +63,7 @@
* DAT_INVALID_STATE
*/
-u32 dapl_srq_resize(DAT_SRQ_HANDLE srq_handle, DAT_COUNT srq_max_recv_dto)
+u32 dapl_srq_resize(DAT_SRQ_HANDLE srq_handle, int srq_max_recv_dto)
{
DAPL_IA *ia_ptr;
DAPL_SRQ *srq_ptr;
Index: linux-kernel/dat-provider/dapl_ep_post_rdma_write.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_post_rdma_write.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_post_rdma_write.c (working copy)
@@ -66,7 +66,7 @@
* DAT_PROTECTION_VIOLATION
* DAT_PRIVILEGES_VIOLATION
*/
-u32 dapl_ep_post_rdma_write(DAT_EP_HANDLE ep_handle, DAT_COUNT num_segments,
+u32 dapl_ep_post_rdma_write(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
const struct dat_rmr_triplet *remote_iov,
Index: linux-kernel/dat-provider/dapl_openib_dto.h
===================================================================
--- linux-kernel/dat-provider/dapl_openib_dto.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_openib_dto.h (working copy)
@@ -51,7 +51,7 @@
* Provider specific Post RECV function
*/
static __inline__ u32 dapl_ib_post_recv(DAPL_EP *ep_ptr, DAPL_COOKIE *cookie,
- DAT_COUNT num_segments,
+ int num_segments,
struct dat_lmr_triplet *local_iov)
{
struct ib_recv_wr rr_desc = { NULL };
@@ -101,7 +101,7 @@ static __inline__ u32 dapl_ib_post_recv(
*/
static __inline__ u32 dapl_ib_post_send(DAPL_EP *ep_ptr, int op_type,
DAPL_COOKIE *cookie,
- DAT_COUNT num_segments,
+ int num_segments,
struct dat_lmr_triplet *local_iov,
const struct dat_rmr_triplet *remote_iov,
DAT_COMPLETION_FLAGS completion_flags)
Index: linux-kernel/dat-provider/dapl_ring_buffer_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_ring_buffer_util.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_ring_buffer_util.h (working copy)
@@ -42,9 +42,9 @@
/*
* Prototypes
*/
-u32 dapl_rbuf_alloc(DAPL_RING_BUFFER *rbuf, DAT_COUNT size);
+u32 dapl_rbuf_alloc(DAPL_RING_BUFFER *rbuf, int size);
-u32 dapl_rbuf_realloc(DAPL_RING_BUFFER *rbuf, DAT_COUNT size);
+u32 dapl_rbuf_realloc(DAPL_RING_BUFFER *rbuf, int size);
void dapl_rbuf_destroy(DAPL_RING_BUFFER * rbuf);
@@ -52,7 +52,7 @@ u32 dapl_rbuf_add(DAPL_RING_BUFFER *rbuf
void *dapl_rbuf_remove(DAPL_RING_BUFFER * rbuf);
-DAT_COUNT dapl_rbuf_count(DAPL_RING_BUFFER * rbuf);
+int dapl_rbuf_count(DAPL_RING_BUFFER *rbuf);
void dapl_rbuf_adjust(DAPL_RING_BUFFER * rbuf, intptr_t offset);
Index: linux-kernel/dat-provider/dapl_evd_resize.c
===================================================================
--- linux-kernel/dat-provider/dapl_evd_resize.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_evd_resize.c (working copy)
@@ -63,11 +63,11 @@
* DAT_INVALID_STATE
*/
-u32 dapl_evd_resize(DAT_EVD_HANDLE evd_handle, DAT_COUNT evd_qlen)
+u32 dapl_evd_resize(DAT_EVD_HANDLE evd_handle, int evd_qlen)
{
DAPL_IA *ia_ptr;
DAPL_EVD *evd_ptr;
- DAT_COUNT pend_cnt;
+ int pend_cnt;
u32 dat_status;
dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_evd_resize (%p, %d)\n",
Index: linux-kernel/dat-provider/dapl_adapter_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_adapter_util.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_adapter_util.h (working copy)
@@ -51,7 +51,7 @@ typedef enum async_handler_type {
u32 dapl_ib_enum_hcas(const char *vendor,
DAPL_HCA_NAME **hca_names,
- DAT_COUNT *total_hca_count);
+ int *total_hca_count);
u32 dapl_ib_get_instance_data(DAPL_HCA_NAME hca_name, char *instance);
@@ -69,7 +69,7 @@ u32 dapl_ib_qp_modify(DAPL_IA *ia_ptr, D
u32 dapl_ib_connect(DAT_EP_HANDLE ep_handle,
DAT_IA_ADDRESS_PTR remote_ia_address,
DAT_CONN_QUAL remote_conn_qual,
- DAT_COUNT private_data_size, void *private_data);
+ int private_data_size, void *private_data);
u32 dapl_ib_disconnect(DAPL_EP *ep_ptr, DAT_CLOSE_FLAGS close_flags);
@@ -80,7 +80,7 @@ u32 dapl_ib_remove_conn_listener(DAPL_IA
u32 dapl_ib_accept_connection(DAT_CR_HANDLE cr_handle,
DAT_EP_HANDLE ep_handle,
- DAT_COUNT private_data_size,
+ int private_data_size,
const void *private_data);
u32 dapl_ib_reject_connection(ib_cm_handle_t cm_handle, int reject_reason);
@@ -89,14 +89,14 @@ u32 dapl_ib_setup_async_callback(DAPL_IA
DAPL_ASYNC_HANDLER_TYPE handler_type,
ib_async_handler_t callback, void *context);
-u32 dapl_ib_cq_alloc(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, DAT_COUNT *cqlen,
+u32 dapl_ib_cq_alloc(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, int *cqlen,
ib_comp_handle_t callback);
u32 dapl_ib_cq_free(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr);
u32 dapl_set_cq_notify(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr);
-u32 dapl_ib_cq_resize(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, DAT_COUNT *cqlen);
+u32 dapl_ib_cq_resize(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, int *cqlen);
u32 dapl_ib_pd_alloc(DAPL_IA *ia_ptr, DAPL_PZ *pz);
Index: linux-kernel/dat-provider/dapl_ep_post_send.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_post_send.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_post_send.c (working copy)
@@ -63,7 +63,7 @@
* DAT_PROTECTION_VIOLATION
* DAT_PRIVILEGES_VIOLATION
*/
-u32 dapl_ep_post_send(DAT_EP_HANDLE ep_handle, DAT_COUNT num_segments,
+u32 dapl_ep_post_send(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
DAT_COMPLETION_FLAGS completion_flags)
Index: linux-kernel/dat-provider/dapl_provider.c
===================================================================
--- linux-kernel/dat-provider/dapl_provider.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_provider.c (working copy)
@@ -204,7 +204,7 @@ u32 dapl_provider_list_destroy(void)
return DAT_SUCCESS;
}
-DAT_COUNT dapl_provider_list_size(void)
+int dapl_provider_list_size(void)
{
return g_dapl_provider_list.size;
}
Index: linux-kernel/dat-provider/dapl_openib_cm.c
===================================================================
--- linux-kernel/dat-provider/dapl_openib_cm.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_openib_cm.c (working copy)
@@ -396,7 +396,7 @@ error:
u32 dapl_ib_connect(DAT_EP_HANDLE ep_handle,
DAT_IA_ADDRESS_PTR remote_ia_address,
DAT_CONN_QUAL remote_conn_qual,
- DAT_COUNT private_data_size, void *private_data)
+ int private_data_size, void *private_data)
{
DAPL_IA *ia_ptr;
DAPL_EP *ep_ptr;
@@ -732,7 +732,7 @@ u32 dapl_ib_reject_connection(struct dap
*
*/
u32 dapl_ib_accept_connection(DAT_CR_HANDLE cr_handle, DAT_EP_HANDLE ep_handle,
- DAT_COUNT private_data_size,
+ int private_data_size,
const void *prd_ptr)
{
DAPL_CR *cr_ptr;
Index: linux-kernel/dat-provider/dapl_provider.h
===================================================================
--- linux-kernel/dat-provider/dapl_provider.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_provider.h (working copy)
@@ -56,7 +56,7 @@ typedef struct DAPL_PROVIDER_LIST_NODE {
typedef struct DAPL_PROVIDER_LIST {
DAPL_PROVIDER_LIST_NODE *head;
DAPL_PROVIDER_LIST_NODE *tail;
- DAT_COUNT size;
+ int size;
} DAPL_PROVIDER_LIST;
/*********************************************************************
@@ -78,7 +78,7 @@ extern u32 dapl_provider_list_create(voi
extern u32 dapl_provider_list_destroy(void);
-extern DAT_COUNT dapl_provider_list_size(void);
+extern int dapl_provider_list_size(void);
extern u32 dapl_provider_list_insert(const char *name,
struct dat_provider **p_data);
Index: linux-kernel/dat-provider/dapl_ep_recv_query.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_recv_query.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_recv_query.c (working copy)
@@ -55,7 +55,7 @@
* DAT_MODEL_NOT_SUPPORTED
*/
u32 dapl_ep_recv_query(DAT_EP_HANDLE ep_handle,
- DAT_COUNT *nbufs_allocate, DAT_COUNT *bufs_alloc_span)
+ int *nbufs_allocate, int *bufs_alloc_span)
{
DAPL_EP *ep_ptr;
u32 dat_status = DAT_SUCCESS;
Index: linux-kernel/dat-provider/dapl_openib_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_openib_util.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_openib_util.c (working copy)
@@ -221,7 +221,7 @@ u32 dapl_ib_close_hca(DAPL_HCA *hca_ptr)
* DAT_INSUFFICIENT_RESOURCES
*
*/
-u32 dapl_ib_cq_alloc(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, DAT_COUNT *cqlen,
+u32 dapl_ib_cq_alloc(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, int *cqlen,
ib_comp_handle_t callback)
{
int ib_status;
@@ -263,7 +263,7 @@ u32 dapl_ib_cq_free(DAPL_IA *ia_ptr, DAP
return dapl_ib_status_convert(ib_status);
}
-u32 dapl_ib_cq_resize(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, DAT_COUNT *cqlen)
+u32 dapl_ib_cq_resize(DAPL_IA *ia_ptr, DAPL_EVD *evd_ptr, int *cqlen)
{
int ib_status;
Index: linux-kernel/dat-provider/dapl_evd_kcreate.c
===================================================================
--- linux-kernel/dat-provider/dapl_evd_kcreate.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_evd_kcreate.c (working copy)
@@ -48,7 +48,7 @@
* even if it is not required. However, it will not be armed.
*/
-u32 dapl_evd_kcreate(DAT_IA_HANDLE ia_handle, DAT_COUNT evd_min_qlen,
+u32 dapl_evd_kcreate(DAT_IA_HANDLE ia_handle, int evd_min_qlen,
DAT_UPCALL_POLICY upcall_policy, /* ignore */
const struct dat_upcall_object *upcall,
DAT_EVD_FLAGS evd_flags, DAT_EVD_HANDLE *evd_handle)
Index: linux-kernel/dat-provider/dapl_srq_set_lw.c
===================================================================
--- linux-kernel/dat-provider/dapl_srq_set_lw.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_srq_set_lw.c (working copy)
@@ -63,7 +63,7 @@
* DAT_MODEL_NOT_SUPPORTED
*/
-u32 dapl_srq_set_lw(DAT_SRQ_HANDLE srq_handle, DAT_COUNT low_watermark)
+u32 dapl_srq_set_lw(DAT_SRQ_HANDLE srq_handle, int low_watermark)
{
DAPL_SRQ *srq_ptr;
u32 dat_status = DAT_SUCCESS;
Index: linux-kernel/dat-provider/dapl_cr_accept.c
===================================================================
--- linux-kernel/dat-provider/dapl_cr_accept.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_cr_accept.c (working copy)
@@ -40,7 +40,7 @@
* and passive side (local endpoint).
*/
u32 dapl_cr_accept(DAT_CR_HANDLE cr_handle, DAT_EP_HANDLE ep_handle,
- DAT_COUNT private_data_size, const void *private_data)
+ int private_data_size, const void *private_data)
{
DAPL_EP *ep_ptr;
u32 dat_status;
Index: linux-kernel/dat-provider/dapl_srq_post_recv.c
===================================================================
--- linux-kernel/dat-provider/dapl_srq_post_recv.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_srq_post_recv.c (working copy)
@@ -67,7 +67,7 @@
* DAT_PROTECTION_VIOLATION
* DAT_PROVILEGES_VIOLATION
*/
-u32 dapl_srq_post_recv(DAT_SRQ_HANDLE srq_handle, DAT_COUNT num_segments,
+u32 dapl_srq_post_recv(DAT_SRQ_HANDLE srq_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie)
{
Index: linux-kernel/dat-provider/dapl_ep_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_util.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_util.c (working copy)
@@ -281,7 +281,7 @@ u32 dapl_ep_check_request_completion_fla
return DAT_SUCCESS;
}
-u32 dapl_ep_post_send_req(DAT_EP_HANDLE ep_handle, DAT_COUNT num_segments,
+u32 dapl_ep_post_send_req(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
const struct dat_rmr_triplet *remote_iov,
Index: linux-kernel/dat-provider/dapl_ep_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_ep_util.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_util.h (working copy)
@@ -50,8 +50,7 @@ extern u32 dapl_ep_check_recv_completion
extern u32 dapl_ep_check_request_completion_flags(DAT_COMPLETION_FLAGS flags);
-extern u32 dapl_ep_post_send_req(DAT_EP_HANDLE ep_handle,
- DAT_COUNT num_segments,
+extern u32 dapl_ep_post_send_req(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
const struct dat_rmr_triplet *remote_iov,
Index: linux-kernel/dat-provider/dapl_ep_post_rdma_read.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_post_rdma_read.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_post_rdma_read.c (working copy)
@@ -66,7 +66,7 @@
* DAT_PROTECTION_VIOLATION
* DAT_PRIVILEGES_VIOLATION
*/
-u32 dapl_ep_post_rdma_read(DAT_EP_HANDLE ep_handle, DAT_COUNT num_segments,
+u32 dapl_ep_post_rdma_read(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
const struct dat_rmr_triplet *remote_iov,
Index: linux-kernel/dat-provider/dapl_ia_open.c
===================================================================
--- linux-kernel/dat-provider/dapl_ia_open.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ia_open.c (working copy)
@@ -51,7 +51,7 @@
* That function maps the DAT_NAME parameter of dat_ia_open to a DAT_PROVIDER,
* and calls this function.
*/
-u32 dapl_ia_open(const DAT_NAME_PTR name, DAT_COUNT async_evd_qlen,
+u32 dapl_ia_open(const DAT_NAME_PTR name, int async_evd_qlen,
DAT_EVD_HANDLE *async_evd_handle_ptr,
DAT_IA_HANDLE *ia_handle_ptr)
{
Index: linux-kernel/dat-provider/dapl_evd_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_evd_util.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_evd_util.c (working copy)
@@ -41,7 +41,7 @@
static __inline__ void dapl_evd_eh_print_cqe(ib_work_completion_t * cqe);
-u32 dapl_evd_event_alloc(DAPL_EVD *evd_ptr, DAT_COUNT qlen);
+u32 dapl_evd_event_alloc(DAPL_EVD *evd_ptr, int qlen);
/*
* actually create the evd. this is called after all parameter checking
@@ -50,11 +50,11 @@ u32 dapl_evd_event_alloc(DAPL_EVD *evd_p
*/
u32 dapl_evd_internal_create(DAPL_IA *ia_ptr, DAPL_CNO *cno_ptr,
- DAT_COUNT min_qlen, DAT_EVD_FLAGS evd_flags,
+ int min_qlen, DAT_EVD_FLAGS evd_flags,
DAPL_EVD **evd_ptr_ptr)
{
DAPL_EVD *evd_ptr;
- DAT_COUNT cq_len;
+ int cq_len;
u32 dat_status = DAT_SUCCESS;
*evd_ptr_ptr = NULL;
@@ -113,7 +113,7 @@ u32 dapl_evd_internal_create(DAPL_IA *ia
dapl_ia_link_evd(ia_ptr, evd_ptr);
*evd_ptr_ptr = evd_ptr;
- bail:
+bail:
if (dat_status != DAT_SUCCESS) {
if (evd_ptr) {
dapl_evd_dealloc(evd_ptr);
@@ -127,7 +127,7 @@ u32 dapl_evd_internal_create(DAPL_IA *ia
* alloc and initialize an EVD struct
*/
DAPL_EVD *dapl_evd_alloc(DAPL_IA * ia_ptr, DAPL_CNO * cno_ptr,
- DAT_EVD_FLAGS evd_flags, DAT_COUNT qlen)
+ DAT_EVD_FLAGS evd_flags, int qlen)
{
DAPL_EVD *evd_ptr;
@@ -164,17 +164,17 @@ DAPL_EVD *dapl_evd_alloc(DAPL_IA * ia_pt
evd_ptr->qlen = qlen;
evd_ptr->cno_ptr = cno_ptr;
- bail:
+bail:
return evd_ptr;
}
/*
* alloc events into an EVD.
*/
-u32 dapl_evd_event_alloc(DAPL_EVD *evd_ptr, DAT_COUNT qlen)
+u32 dapl_evd_event_alloc(DAPL_EVD *evd_ptr, int qlen)
{
struct dat_event *event_ptr;
- DAT_COUNT i;
+ int i;
u32 dat_status = DAT_SUCCESS;
/* Allocate EVENTs */
@@ -206,62 +206,56 @@ u32 dapl_evd_event_alloc(DAPL_EVD *evd_p
event_ptr++;
}
- bail:
+bail:
return dat_status;
}
/*
* realloc events into an EVD.
*/
-u32 dapl_evd_event_realloc(DAPL_EVD *evd_ptr, DAT_COUNT qlen)
+u32 dapl_evd_event_realloc(DAPL_EVD *evd_ptr, int qlen)
{
- struct dat_event *events;
- DAT_COUNT old_qlen;
- DAT_COUNT i;
- intptr_t diff;
+ struct dat_event *events;
+ int i, old_qlen, diff;
u32 dat_status;
- /* Allocate EVENTs */
- events = (struct dat_event *)dapl_os_realloc(evd_ptr->events,
- qlen * sizeof *events);
- if ( NULL == events )
- {
- dat_status = DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
- goto bail;
- }
+ /* Allocate EVENTs */
+ events = (struct dat_event *)dapl_os_realloc(evd_ptr->events,
+ qlen * sizeof *events);
+ if (!events) {
+ dat_status = DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+ DAT_RESOURCE_MEMORY);
+ goto bail;
+ }
- diff = events - evd_ptr->events;
- evd_ptr->events = events;
+ diff = events - evd_ptr->events;
+ evd_ptr->events = events;
- old_qlen = evd_ptr->qlen;
- evd_ptr->qlen = qlen;
+ old_qlen = evd_ptr->qlen;
+ evd_ptr->qlen = qlen;
- /* reallocate free event queue */
- dat_status = dapl_rbuf_realloc(&evd_ptr->free_event_queue, qlen);
- if (dat_status != DAT_SUCCESS)
- {
- goto bail;
- }
- dapl_rbuf_adjust(&evd_ptr->free_event_queue, diff);
+ /* reallocate free event queue */
+ dat_status = dapl_rbuf_realloc(&evd_ptr->free_event_queue, qlen);
+ if (dat_status != DAT_SUCCESS)
+ goto bail;
- /* reallocate pending event queue */
- dat_status = dapl_rbuf_realloc(&evd_ptr->pending_event_queue, qlen);
- if (dat_status != DAT_SUCCESS)
- {
- goto bail;
- }
- dapl_rbuf_adjust(&evd_ptr->pending_event_queue, diff);
+ dapl_rbuf_adjust(&evd_ptr->free_event_queue, diff);
- /*
- * add new events to free event queue.
- */
- for (i = old_qlen; i < qlen; i++)
- {
- dapl_rbuf_add(&evd_ptr->free_event_queue, (void *) &events[i]);
- }
+ /* reallocate pending event queue */
+ dat_status = dapl_rbuf_realloc(&evd_ptr->pending_event_queue, qlen);
+ if (dat_status != DAT_SUCCESS)
+ goto bail;
+
+ dapl_rbuf_adjust(&evd_ptr->pending_event_queue, diff);
+
+ /*
+ * add new events to free event queue.
+ */
+ for (i = old_qlen; i < qlen; i++)
+ dapl_rbuf_add(&evd_ptr->free_event_queue, (void *) &events[i]);
bail:
- return dat_status;
+ return dat_status;
}
/*
@@ -297,10 +291,8 @@ u32 dapl_evd_dealloc(DAPL_EVD *evd_ptr)
evd_ptr->header.magic = DAPL_MAGIC_INVALID;
/* Release reference on the CNO if it exists */
- if ( evd_ptr->cno_ptr != NULL )
- {
+ if (evd_ptr->cno_ptr != NULL)
evd_ptr->cno_ptr = NULL;
- }
/* If the ring buffer allocation failed, then the dapl_rbuf_destroy */
/* function will detect that the ring buffer's internal data (ex. base */
@@ -314,7 +306,7 @@ u32 dapl_evd_dealloc(DAPL_EVD *evd_ptr)
kfree(evd_ptr);
- bail:
+bail:
return dat_status;
}
@@ -539,7 +531,7 @@ u32 dapl_evd_post_cr_arrival_event(DAPL_
u32 dapl_evd_post_connection_event(DAPL_EVD *evd_ptr,
DAT_EVENT_NUMBER event_number,
DAT_EP_HANDLE ep_handle,
- DAT_COUNT private_data_size,
+ int private_data_size,
void *private_data)
{
struct dat_event *event_ptr;
Index: linux-kernel/dat-provider/dapl_evd_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_evd_util.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_evd_util.h (working copy)
@@ -41,15 +41,15 @@
#include "dapl.h"
u32 dapl_evd_internal_create(DAPL_IA *ia_ptr, DAPL_CNO *cno_ptr,
- DAT_COUNT min_qlen, DAT_EVD_FLAGS evd_flags,
+ int min_qlen, DAT_EVD_FLAGS evd_flags,
DAPL_EVD **evd_ptr_ptr);
DAPL_EVD *dapl_evd_alloc(DAPL_IA * ia_ptr, DAPL_CNO * cno_ptr,
- DAT_EVD_FLAGS evd_flags, DAT_COUNT qlen);
+ DAT_EVD_FLAGS evd_flags, int qlen);
u32 dapl_evd_dealloc(DAPL_EVD *evd_ptr);
-u32 dapl_evd_event_realloc(DAPL_EVD *evd_ptr, DAT_COUNT qlen);
+u32 dapl_evd_event_realloc(DAPL_EVD *evd_ptr, int qlen);
/*
* Each of these functions will retrieve a free event from
@@ -72,7 +72,7 @@ u32 dapl_evd_post_cr_arrival_event(DAPL_
u32 dapl_evd_post_connection_event(DAPL_EVD *evd_ptr,
DAT_EVENT_NUMBER event_number,
DAT_EP_HANDLE ep_handle,
- DAT_COUNT private_data_size,
+ int private_data_size,
void *private_data);
u32 dapl_evd_post_async_error_event(DAPL_EVD *evd_ptr,
Index: linux-kernel/dat-provider/dapl_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_util.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_util.h (working copy)
@@ -73,13 +73,6 @@ typedef long intptr_t;
#define dapl_ip_addr6(sockaddr) (((struct sockaddr_in6 *)sockaddr)->sin6_addr.s6_addr32)
-/*
- * Atomic operations
- */
-
-static __inline__ DAT_COUNT
-dapl_os_atomic_assign(atomic_t * v, DAT_COUNT match_value, DAT_COUNT new_value);
-
/* dapl_os_atomic_assign
*
* assign 'new_value' to '*v' if the current value
@@ -90,14 +83,14 @@ dapl_os_atomic_assign(atomic_t * v, DAT_
* Return the current value in any case.
*
* This matches the IBTA atomic operation compare & swap
- * except that it is for local memory and a DAT_COUNT may
+ * except that it is for local memory and a int may
* be only 32 bits, rather than 64.
*/
-static __inline__ DAT_COUNT
-dapl_os_atomic_assign(atomic_t * v, DAT_COUNT match_value, DAT_COUNT new_value)
+static inline int dapl_os_atomic_assign(atomic_t * v, int match_value,
+ int new_value)
{
- DAT_COUNT current_value;
+ int current_value;
/*
* Use the Pentium compare and exchange instruction
Index: linux-kernel/dat-provider/dapl_hash.c
===================================================================
--- linux-kernel/dat-provider/dapl_hash.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_hash.c (working copy)
@@ -320,12 +320,12 @@ dapl_hash_delete_element(DAPL_HASH_ELEM
/*
* Create a new hash table with at least 'table_size' hash buckets.
*/
-u32 dapl_hash_create(DAT_COUNT table_size, DAPL_HASH_TABLE **pp_table)
+u32 dapl_hash_create(int table_size, DAPL_HASH_TABLE **pp_table)
{
DAPL_HASH_TABLE *p_table;
- DAT_COUNT table_length = table_size * sizeof(DAPL_HASH_ELEM);
+ int table_length = table_size * sizeof(DAPL_HASH_ELEM);
u32 dat_status = DAT_SUCCESS;
- DAT_COUNT i;
+ int i;
dapl_os_assert(pp_table);
@@ -379,7 +379,7 @@ u32 dapl_hash_free(DAPL_HASH_TABLE *p_ta
* Returns the number of elements stored in the table
*/
-u32 dapl_hash_size(DAPL_HASH_TABLE *p_table, DAT_COUNT *p_size)
+u32 dapl_hash_size(DAPL_HASH_TABLE *p_table, int *p_size)
{
dapl_os_assert(p_table && p_size);
Index: linux-kernel/dat-provider/dapl_ep_dup_connect.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_dup_connect.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_dup_connect.c (working copy)
@@ -70,7 +70,7 @@
* DAT_MODEL_NOT_SUPPORTED
*/
u32 dapl_ep_dup_connect(DAT_EP_HANDLE ep_handle, DAT_EP_HANDLE ep_dup_handle,
- DAT_TIMEOUT timeout, DAT_COUNT private_data_size,
+ DAT_TIMEOUT timeout, int private_data_size,
const void *private_data, DAT_QOS qos)
{
DAPL_EP *ep_dup_ptr;
Index: linux-kernel/dat-provider/dapl.h
===================================================================
--- linux-kernel/dat-provider/dapl.h (revision 2321)
+++ linux-kernel/dat-provider/dapl.h (working copy)
@@ -193,14 +193,14 @@ struct dapl_llist_entry {
struct dapl_ring_buffer {
void **base; /* base of element array */
- DAT_COUNT lim; /* mask, number of entries - 1 */
+ int lim; /* mask, number of entries - 1 */
atomic_t head; /* head pointer index */
atomic_t tail; /* tail pointer index */
};
struct dapl_cookie_buffer {
DAPL_COOKIE *pool;
- DAT_COUNT pool_size;
+ int pool_size;
atomic_t head;
atomic_t tail;
};
@@ -257,33 +257,32 @@ struct dapl_cno {
};
/* DAPL_EVD maps to DAT_EVD_HANDLE */
-struct dapl_evd
-{
- DAPL_HEADER header;
-
- DAPL_EVD_STATE evd_state;
- DAT_EVD_FLAGS evd_flags;
-
- /* Derived from evd_flags; see dapls_evd_internal_create. */
- boolean_t evd_producer_locking_needed;
-
- /* Every EVD has a CQ unless it is a SOFTWARE_EVENT only EVD */
- ib_cq_handle_t ib_cq_handle;
-
- /* An Event Dispatcher cannot be freed while
- * it is referenced elsewhere.
- */
- atomic_t evd_ref_count;
-
- /* Set if there has been a catastrophic overflow */
- boolean_t catastrophic_overflow;
-
- /* the actual events */
- DAT_COUNT qlen;
- struct dat_event *events;
- DAPL_RING_BUFFER free_event_queue;
- DAPL_RING_BUFFER pending_event_queue;
- DAPL_CNO *cno_ptr;
+struct dapl_evd {
+ DAPL_HEADER header;
+ DAPL_EVD_STATE evd_state;
+ DAT_EVD_FLAGS evd_flags;
+
+ /* Derived from evd_flags; see dapls_evd_internal_create. */
+ boolean_t evd_producer_locking_needed;
+
+ /* Every EVD has a CQ unless it is a SOFTWARE_EVENT only EVD */
+ ib_cq_handle_t ib_cq_handle;
+
+ /*
+ * An Event Dispatcher cannot be freed while
+ * it is referenced elsewhere.
+ */
+ atomic_t evd_ref_count;
+
+ /* Set if there has been a catastrophic overflow */
+ boolean_t catastrophic_overflow;
+
+ /* the actual events */
+ int qlen;
+ struct dat_event *events;
+ DAPL_RING_BUFFER free_event_queue;
+ DAPL_RING_BUFFER pending_event_queue;
+ DAPL_CNO *cno_ptr;
};
/* uDAPL timer entry, used to queue timeouts */
@@ -329,10 +328,10 @@ struct dapl_ep {
DAPL_COOKIE_BUFFER recv_buffer;
ib_data_segment_t *recv_iov;
- DAT_COUNT recv_iov_num;
+ int recv_iov_num;
ib_data_segment_t *send_iov;
- DAT_COUNT send_iov_num;
+ int send_iov_num;
};
/* DAPL_SRQ maps to DAT_SRQ_HANDLE */
@@ -394,7 +393,7 @@ struct dapl_sp {
boolean_t listening; /* PSP is registered & active */
ib_cm_srvc_handle_t cm_srvc_handle; /* Used by CM */
DAPL_LLIST_HEAD cr_list_head; /* CR pending queue */
- DAT_COUNT cr_list_count; /* count of CRs on queue */
+ int cr_list_count; /* count of CRs on queue */
};
/* DAPL_CR maps to DAT_CR_HANDLE */
@@ -439,7 +438,7 @@ typedef enum dapl_cookie_type {
struct dapl_dto_cookie {
DAPL_DTO_TYPE type;
DAT_DTO_COOKIE cookie;
- DAT_COUNT size; /* used for SEND and RDMA write */
+ int size; /* used for SEND and RDMA write */
};
/* DAPL_RMR_COOKIE used as context for bind WQEs */
@@ -452,7 +451,7 @@ struct dapl_rmr_cookie {
struct dapl_cookie {
DAPL_COOKIE_TYPE type; /* Must be first, to define struct. */
DAPL_EP *ep;
- DAT_COUNT index;
+ int index;
union {
DAPL_DTO_COOKIE dto;
DAPL_RMR_COOKIE rmr;
@@ -475,8 +474,9 @@ typedef char DAPL_HCA_NAME[DAPL_HCA_NAME
* DAT API functions
*/
-extern u32 dapl_ia_open(const DAT_NAME_PTR, DAT_COUNT, DAT_EVD_HANDLE *,
- DAT_IA_HANDLE *);
+extern u32 dapl_ia_open(const DAT_NAME_PTR name, int async_evd_qlen,
+ DAT_EVD_HANDLE *async_evd_handle_ptr,
+ DAT_IA_HANDLE *ia_handle_ptr);
extern u32 dapl_ia_close(DAT_IA_HANDLE, DAT_CLOSE_FLAGS);
@@ -496,7 +496,7 @@ extern u32 dapl_get_handle_type(DAT_HAND
extern u32 dapl_cr_query(DAT_CR_HANDLE, struct dat_cr_param *);
extern u32 dapl_cr_accept(DAT_CR_HANDLE cr_handle, DAT_EP_HANDLE ep_handle,
- DAT_COUNT private_data_size,
+ int private_data_size,
const void *private_data);
extern u32 dapl_cr_reject(DAT_CR_HANDLE cr_handle);
@@ -509,7 +509,7 @@ extern u32 dapl_ia_memtype_hint(DAT_IA_H
DAT_VLEN *suggested_length,
DAT_VADDR *suggested_alignment);
-extern u32 dapl_evd_kcreate(DAT_IA_HANDLE ia_handle, DAT_COUNT evd_min_qlen,
+extern u32 dapl_evd_kcreate(DAT_IA_HANDLE ia_handle, int evd_min_qlen,
DAT_UPCALL_POLICY upcall_policy,
const struct dat_upcall_object * upcall,
DAT_EVD_FLAGS evd_flags,
@@ -526,7 +526,7 @@ extern u32 dapl_evd_enable(DAT_EVD_HANDL
extern u32 dapl_evd_disable(DAT_EVD_HANDLE evd_handle);
-extern u32 dapl_evd_resize(DAT_EVD_HANDLE evd_handle, DAT_COUNT evd_qlen);
+extern u32 dapl_evd_resize(DAT_EVD_HANDLE evd_handle, int evd_qlen);
extern u32 dapl_evd_post_se(DAT_EVD_HANDLE evd_handle,
const struct dat_event *event);
@@ -558,39 +558,39 @@ extern u32 dapl_ep_connect(DAT_EP_HANDLE
DAT_IA_ADDRESS_PTR remote_ia_address,
DAT_CONN_QUAL remote_conn_qual,
DAT_TIMEOUT timeout,
- DAT_COUNT private_data_size,
+ int private_data_size,
const void *private_data,
DAT_QOS quality_of_service,
DAT_CONNECT_FLAGS connect_flags);
extern u32 dapl_ep_dup_connect(DAT_EP_HANDLE ep_handle,
DAT_EP_HANDLE ep_dup_handle, DAT_TIMEOUT timeout,
- DAT_COUNT private_data_size,
+ int private_data_size,
const void *private_data,
DAT_QOS quality_of_service);
extern u32 dapl_ep_disconnect(DAT_EP_HANDLE ep_handle,
DAT_CLOSE_FLAGS close_flags);
-extern u32 dapl_ep_post_send(DAT_EP_HANDLE ep_handle, DAT_COUNT num_segments,
+extern u32 dapl_ep_post_send(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
DAT_COMPLETION_FLAGS completion_flags);
-extern u32 dapl_ep_post_recv(DAT_EP_HANDLE ep_handle, DAT_COUNT num_segments,
+extern u32 dapl_ep_post_recv(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
DAT_COMPLETION_FLAGS completion_flags);
extern u32 dapl_ep_post_rdma_read(DAT_EP_HANDLE ep_handle,
- DAT_COUNT num_segments,
+ int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
const struct dat_rmr_triplet *remote_iov,
DAT_COMPLETION_FLAGS completion_flags);
extern u32 dapl_ep_post_rdma_write(DAT_EP_HANDLE ep_handle,
- DAT_COUNT num_segments,
+ int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
const struct dat_rmr_triplet *remote_iov,
@@ -613,12 +613,12 @@ extern u32 dapl_ep_create_with_srq(DAT_I
DAT_EP_HANDLE *ep_handle);
extern u32 dapl_ep_recv_query(DAT_EP_HANDLE ep_handle,
- DAT_COUNT *nbufs_allocated,
- DAT_COUNT *bufs_alloc_span);
+ int *nbufs_allocated,
+ int *bufs_alloc_span);
extern u32 dapl_ep_set_watermark(DAT_EP_HANDLE ep_handle,
- DAT_COUNT soft_high_watermark,
- DAT_COUNT hard_high_watermark);
+ int soft_high_watermark,
+ int hard_high_watermark);
/* LMR functions */
@@ -703,7 +703,7 @@ extern u32 dapl_srq_create(DAT_IA_HANDLE
extern u32 dapl_srq_free(DAT_SRQ_HANDLE srq_handle);
-extern u32 dapl_srq_post_recv(DAT_SRQ_HANDLE srq_handle, DAT_COUNT num_segments,
+extern u32 dapl_srq_post_recv(DAT_SRQ_HANDLE srq_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie);
@@ -711,9 +711,9 @@ extern u32 dapl_srq_query(DAT_SRQ_HANDLE
struct dat_srq_param *srq_param);
extern u32 dapl_srq_resize(DAT_SRQ_HANDLE srq_handle,
- DAT_COUNT srq_max_recv_dto);
+ int srq_max_recv_dto);
-extern u32 dapl_srq_set_lw(DAT_SRQ_HANDLE srq_handle, DAT_COUNT low_watermark);
+extern u32 dapl_srq_set_lw(DAT_SRQ_HANDLE srq_handle, int low_watermark);
/*
* DAPL internal utility function prototpyes
Index: linux-kernel/dat-provider/dapl_hash.h
===================================================================
--- linux-kernel/dat-provider/dapl_hash.h (revision 2321)
+++ linux-kernel/dat-provider/dapl_hash.h (working copy)
@@ -67,11 +67,11 @@
* *
*********************************************************************/
-extern u32 dapl_hash_create(DAT_COUNT capacity, DAPL_HASH_TABLE **pp_table);
+extern u32 dapl_hash_create(int capacity, DAPL_HASH_TABLE **pp_table);
extern u32 dapl_hash_free(DAPL_HASH_TABLE *p_table);
-extern u32 dapl_hash_size(DAPL_HASH_TABLE *p_table, DAT_COUNT *p_size);
+extern u32 dapl_hash_size(DAPL_HASH_TABLE *p_table, int *p_size);
extern u32 dapl_hash_insert(DAPL_HASH_TABLE *p_table, DAPL_HASH_KEY key,
DAPL_HASH_DATA data);
Index: linux-kernel/dat-provider/dapl_ep_post_recv.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_post_recv.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_post_recv.c (working copy)
@@ -66,7 +66,7 @@
* DAT_PROTECTION_VIOLATION
* DAT_PROVILEGES_VIOLATION
*/
-u32 dapl_ep_post_recv(DAT_EP_HANDLE ep_handle, DAT_COUNT num_segments,
+u32 dapl_ep_post_recv(DAT_EP_HANDLE ep_handle, int num_segments,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE user_cookie,
DAT_COMPLETION_FLAGS completion_flags)
Index: linux-kernel/dat-provider/dapl_ep_set_watermark.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_set_watermark.c (revision 2321)
+++ linux-kernel/dat-provider/dapl_ep_set_watermark.c (working copy)
@@ -60,8 +60,8 @@
* DAT_MODEL_NOT_SUPPORTED
*/
u32 dapl_ep_set_watermark(DAT_EP_HANDLE ep_handle,
- DAT_COUNT soft_high_watermark,
- DAT_COUNT hard_high_watermark)
+ int soft_high_watermark,
+ int hard_high_watermark)
{
DAPL_EP *ep_ptr;
u32 dat_status = DAT_SUCCESS;
Index: linux-kernel/dat/dictionary.c
===================================================================
--- linux-kernel/dat/dictionary.c (revision 2321)
+++ linux-kernel/dat/dictionary.c (working copy)
@@ -75,8 +75,7 @@ void dat_dictionary_destroy(struct dat_d
* Function: dat_dictionary_size
***********************************************************************/
-u32 dat_dictionary_size(const struct dat_dictionary *dictionary,
- DAT_COUNT *size)
+u32 dat_dictionary_size(const struct dat_dictionary *dictionary, int *size)
{
BUG_ON(NULL == dictionary);
BUG_ON(NULL == size);
@@ -190,11 +189,11 @@ u32 dat_dictionary_search(struct dat_dic
***********************************************************************/
u32 dat_dictionary_enumerate(struct dat_dictionary *dictionary, void *array[],
- DAT_COUNT array_size)
+ int array_size)
{
struct list_head *cur_list;
struct dat_dictionary_entry *cur_entry;
- DAT_COUNT i;
+ int i;
u32 status;
BUG_ON(NULL == dictionary);
Index: linux-kernel/dat/dr.c
===================================================================
--- linux-kernel/dat/dr.c (revision 2321)
+++ linux-kernel/dat/dr.c (working copy)
@@ -42,7 +42,7 @@
*********************************************************************/
struct dat_dr_entry {
- DAT_COUNT ref_count;
+ int ref_count;
struct dat_provider_info info;
DAT_IA_OPEN_FUNC ia_open_func;
};
@@ -206,7 +206,7 @@ u32 dat_dr_provider_close(const struct d
* Function: dat_dr_size
************************************************************************/
-u32 dat_dr_size(DAT_COUNT *size)
+u32 dat_dr_size(int *size)
{
return dat_dictionary_size(&g_dr_dictionary, size);
}
@@ -215,17 +215,13 @@ u32 dat_dr_size(DAT_COUNT *size)
* Function: dat_dr_list
***********************************************************************/
-u32 dat_dr_list(DAT_COUNT max_to_return,
- DAT_COUNT *entries_returned,
+u32 dat_dr_list(int max_to_return, int *entries_returned,
struct dat_provider_info *(dat_provider_list[]))
{
- struct dat_dr_entry **array;
- DAT_COUNT array_size;
- DAT_COUNT i;
+ struct dat_dr_entry **array = NULL;
+ int i, array_size;
u32 status = DAT_SUCCESS;
- array = NULL;
-
/* The dictionary size may increase between the call to */
/* dat_dictionary_size() and dat_dictionary_enumerate(). */
/* Therefore we loop until a successful enumeration is made. */
Index: linux-kernel/dat/api.c
===================================================================
--- linux-kernel/dat/api.c (revision 2321)
+++ linux-kernel/dat/api.c (working copy)
@@ -575,7 +575,7 @@ static u32 dat_strerror_minor(u32 value,
* Function: dat_ia_openv
***********************************************************************/
-u32 dat_ia_openv(const DAT_NAME_PTR name, DAT_COUNT async_event_qlen,
+u32 dat_ia_openv(const DAT_NAME_PTR name, int async_event_qlen,
DAT_EVD_HANDLE *async_event_handle, DAT_IA_HANDLE *ia_handle,
u32 dat_major, u32 dat_minor, boolean_t thread_safety)
{
@@ -756,8 +756,7 @@ EXPORT_SYMBOL(dat_registry_add_provider)
* Function: dat_registry_list_providers
***********************************************************************/
-u32 dat_registry_list_providers(DAT_COUNT max_to_return,
- DAT_COUNT *entries_returned,
+u32 dat_registry_list_providers(int max_to_return, int *entries_returned,
struct dat_provider_info *(dat_provider_list[]))
{
u32 status = DAT_SUCCESS;
Index: linux-kernel/dat/dr.h
===================================================================
--- linux-kernel/dat/dr.h (revision 2321)
+++ linux-kernel/dat/dr.h (working copy)
@@ -54,10 +54,9 @@ extern u32 dat_dr_provider_open(const st
extern u32 dat_dr_provider_close(const struct dat_provider_info *info);
-extern u32 dat_dr_size(DAT_COUNT *size);
+extern u32 dat_dr_size(int *size);
-extern u32 dat_dr_list(DAT_COUNT max_to_return,
- DAT_COUNT *entries_returned,
+extern u32 dat_dr_list(int max_to_return, int *entries_returned,
struct dat_provider_info *(dat_provider_list[]));
#endif /* DR_H */
Index: linux-kernel/dat/dictionary.h
===================================================================
--- linux-kernel/dat/dictionary.h (revision 2321)
+++ linux-kernel/dat/dictionary.h (working copy)
@@ -50,7 +50,7 @@ struct dat_dictionary_entry {
struct dat_dictionary {
struct list_head list;
- DAT_COUNT size;
+ int size;
};
/*********************************************************************
@@ -70,7 +70,7 @@ struct dat_dictionary {
extern void dat_dictionary_destroy(struct dat_dictionary *dictionary);
extern u32 dat_dictionary_size(const struct dat_dictionary *dictionary,
- DAT_COUNT *size);
+ int *size);
extern u32 dat_dictionary_entry_create(struct dat_dictionary_entry **p_entry);
@@ -87,8 +87,7 @@ extern u32 dat_dictionary_search(struct
void **p_data);
extern u32 dat_dictionary_enumerate(struct dat_dictionary *dictionary,
- void *array[],
- const DAT_COUNT array_size);
+ void *array[], const int array_size);
extern u32 dat_dictionary_remove(struct dat_dictionary *dictionary,
const struct dat_provider_info *key,
Index: linux-kernel/dat/dat.h
===================================================================
--- linux-kernel/dat/dat.h (revision 2321)
+++ linux-kernel/dat/dat.h (working copy)
@@ -40,7 +40,6 @@
/* unsigned longest native to compiler */
typedef unsigned long long DAT_UVERYLONG;
-typedef int DAT_COUNT;
typedef u64 DAT_PADDR;
/*
@@ -575,18 +574,18 @@ struct dat_ep_attr {
DAT_QOS qos;
DAT_COMPLETION_FLAGS recv_completion_flags;
DAT_COMPLETION_FLAGS request_completion_flags;
- DAT_COUNT max_recv_dtos;
- DAT_COUNT max_request_dtos;
- DAT_COUNT max_recv_iov;
- DAT_COUNT max_request_iov;
- DAT_COUNT max_rdma_read_in;
- DAT_COUNT max_rdma_read_out;
- DAT_COUNT srq_soft_hw;
- DAT_COUNT max_rdma_read_iov;
- DAT_COUNT max_rdma_write_iov;
- DAT_COUNT ep_transport_specific_count;
+ int max_recv_dtos;
+ int max_request_dtos;
+ int max_recv_iov;
+ int max_request_iov;
+ int max_rdma_read_in;
+ int max_rdma_read_out;
+ int srq_soft_hw;
+ int max_rdma_read_iov;
+ int max_rdma_write_iov;
+ int ep_transport_specific_count;
struct dat_named_attr *ep_transport_specific;
- DAT_COUNT ep_provider_specific_count;
+ int ep_provider_specific_count;
struct dat_named_attr *ep_provider_specific;
};
@@ -656,7 +655,7 @@ typedef enum dat_ep_param_mask {
DAT_EP_FIELD_ALL = 0x3FFFF7FF
} DAT_EP_PARAM_MASK;
-#define DAT_WATERMARK_INFINITE ((DAT_COUNT)~0)
+#define DAT_WATERMARK_INFINITE ((int)~0)
#define DAT_HW_DEFAULT DAT_WATERMARK_INFINITE
#define DAT_SRQ_LW_DEFAULT 0x0
@@ -665,23 +664,23 @@ typedef enum dat_srq_state {
DAT_SRQ_STATE_ERROR
} DAT_SRQ_STATE;
-#define DAT_VALUE_UNKNOWN (((DAT_COUNT) ~0)-1)
+#define DAT_VALUE_UNKNOWN (((int) ~0)-1)
struct dat_srq_attr {
- DAT_COUNT max_recv_dtos;
- DAT_COUNT max_recv_iov;
- DAT_COUNT low_watermark;
+ int max_recv_dtos;
+ int max_recv_iov;
+ int low_watermark;
};
struct dat_srq_param {
DAT_IA_HANDLE ia_handle;
DAT_SRQ_STATE srq_state;
DAT_PZ_HANDLE pz_handle;
- DAT_COUNT max_recv_dtos;
- DAT_COUNT max_recv_iov;
- DAT_COUNT low_watermark;
- DAT_COUNT available_dto_count;
- DAT_COUNT outstanding_dto_count;
+ int max_recv_dtos;
+ int max_recv_iov;
+ int low_watermark;
+ int available_dto_count;
+ int outstanding_dto_count;
};
/* PZ Parameters */
@@ -723,7 +722,7 @@ struct dat_cr_param {
DAT_PORT_QUAL remote_port_qual;
/* Size of the Private Data. */
- DAT_COUNT private_data_size;
+ int private_data_size;
/* Pointer to the Private Data passed by remote side in the Connection
* Request.
@@ -820,7 +819,7 @@ struct dat_cr_arrival_event_data {
/* Connection event data */
struct dat_connection_event_data {
DAT_EP_HANDLE ep_handle;
- DAT_COUNT private_data_size;
+ int private_data_size;
void *private_data;
};
@@ -836,7 +835,7 @@ struct dat_connection_event_data {
struct dat_asynch_error_event_data {
DAT_HANDLE dat_handle; /* either IA, EP, EVD, SRQ, */
/* LMR, RMR, or PZ handle */
- DAT_COUNT reason; /* object specific */
+ int reason; /* object specific */
};
/* The reason is object type specific and its values are defined below. */
@@ -954,7 +953,7 @@ struct dat_provider_info {
struct dat_evd_param {
DAT_IA_HANDLE ia_handle;
- DAT_COUNT evd_qlen;
+ int evd_qlen;
DAT_UPCALL_POLICY upcall_policy;
struct dat_upcall_object upcall;
DAT_EVD_FLAGS evd_flags;
@@ -1010,33 +1009,33 @@ struct dat_ia_attr {
u32 firmware_version_major;
u32 firmware_version_minor;
DAT_IA_ADDRESS_PTR ia_address_ptr;
- DAT_COUNT max_eps;
- DAT_COUNT max_dto_per_ep;
- DAT_COUNT max_rdma_read_per_ep_in;
- DAT_COUNT max_rdma_read_per_ep_out;
- DAT_COUNT max_evds;
- DAT_COUNT max_evd_qlen;
- DAT_COUNT max_iov_segments_per_dto;
- DAT_COUNT max_lmrs;
+ int max_eps;
+ int max_dto_per_ep;
+ int max_rdma_read_per_ep_in;
+ int max_rdma_read_per_ep_out;
+ int max_evds;
+ int max_evd_qlen;
+ int max_iov_segments_per_dto;
+ int max_lmrs;
DAT_VLEN max_lmr_block_size;
DAT_VADDR max_lmr_virtual_address;
- DAT_COUNT max_pzs;
+ int max_pzs;
DAT_VLEN max_message_size;
DAT_VLEN max_rdma_size;
- DAT_COUNT max_rmrs;
+ int max_rmrs;
DAT_VADDR max_rmr_target_address;
- DAT_COUNT max_srqs;
- DAT_COUNT max_ep_per_srq;
- DAT_COUNT max_recv_per_srq;
- DAT_COUNT max_iov_segments_per_rdma_read;
- DAT_COUNT max_iov_segments_per_rdma_write;
- DAT_COUNT max_rdma_read_in;
- DAT_COUNT max_rdma_read_out;
+ int max_srqs;
+ int max_ep_per_srq;
+ int max_recv_per_srq;
+ int max_iov_segments_per_rdma_read;
+ int max_iov_segments_per_rdma_write;
+ int max_rdma_read_in;
+ int max_rdma_read_out;
boolean_t max_rdma_read_per_ep_in_guaranteed;
boolean_t max_rdma_read_per_ep_out_guaranteed;
- DAT_COUNT num_transport_attr;
+ int num_transport_attr;
struct dat_named_attr *transport_attr;
- DAT_COUNT num_vendor_attr;
+ int num_vendor_attr;
struct dat_named_attr *vendor_attr;
};
@@ -1079,21 +1078,21 @@ struct dat_provider_attr {
DAT_QOS dat_qos_supported;
DAT_COMPLETION_FLAGS completion_flags_supported;
boolean_t is_thread_safe;
- DAT_COUNT max_private_data_size;
+ int max_private_data_size;
boolean_t supports_multipath;
DAT_EP_CREATOR_FOR_PSP ep_creator;
DAT_UPCALL_POLICY upcall_policy;
u32 optimal_buffer_alignment;
const boolean_t evd_stream_merging_supported[6][6];
boolean_t srq_supported;
- DAT_COUNT srq_watermarks_supported;
+ int srq_watermarks_supported;
boolean_t srq_ep_pz_difference_supported;
- DAT_COUNT srq_info_supported;
- DAT_COUNT ep_recv_info_supported;
+ int srq_info_supported;
+ int ep_recv_info_supported;
boolean_t lmr_sync_req;
boolean_t dto_async_return_guaranteed;
boolean_t rdma_write_for_rdma_read_req;
- DAT_COUNT num_provider_specific_attr;
+ int num_provider_specific_attr;
struct dat_named_attr *provider_specific_attr;
};
@@ -1105,10 +1104,10 @@ struct dat_provider_attr {
****************************************************************/
typedef u32 (*DAT_IA_OPEN_FUNC) (
- const DAT_NAME_PTR, DAT_COUNT, DAT_EVD_HANDLE *, DAT_IA_HANDLE *);
+ const DAT_NAME_PTR, int, DAT_EVD_HANDLE *, DAT_IA_HANDLE *);
typedef u32 (*DAT_IA_OPENV_FUNC) (
- const DAT_NAME_PTR, DAT_COUNT, DAT_EVD_HANDLE *, DAT_IA_HANDLE *,
+ const DAT_NAME_PTR, int, DAT_EVD_HANDLE *, DAT_IA_HANDLE *,
u32, u32, boolean_t);
typedef u32 (*DAT_IA_CLOSE_FUNC) (DAT_IA_HANDLE, DAT_CLOSE_FLAGS);
@@ -1125,14 +1124,14 @@ typedef u32 (*DAT_GET_HANDLE_TYPE_FUNC)
typedef u32 (*DAT_CR_QUERY_FUNC) (DAT_CR_HANDLE, struct dat_cr_param *);
-typedef u32 (*DAT_CR_ACCEPT_FUNC) (DAT_CR_HANDLE, DAT_EP_HANDLE, DAT_COUNT,
+typedef u32 (*DAT_CR_ACCEPT_FUNC) (DAT_CR_HANDLE, DAT_EP_HANDLE, int,
const void*);
typedef u32 (*DAT_CR_REJECT_FUNC) (DAT_CR_HANDLE);
typedef u32 (*DAT_CR_HANDOFF_FUNC) (DAT_CR_HANDLE, DAT_CONN_QUAL);
-typedef u32 (*DAT_EVD_RESIZE_FUNC) (DAT_EVD_HANDLE, DAT_COUNT);
+typedef u32 (*DAT_EVD_RESIZE_FUNC) (DAT_EVD_HANDLE, int);
typedef u32 (*DAT_EVD_POST_SE_FUNC) (DAT_EVD_HANDLE,
const struct dat_event *);
@@ -1158,29 +1157,29 @@ typedef u32 (*DAT_EP_MODIFY_FUNC) (
DAT_EP_HANDLE, DAT_EP_PARAM_MASK, const struct dat_ep_param *);
typedef u32 (*DAT_EP_CONNECT_FUNC) (DAT_EP_HANDLE, DAT_IA_ADDRESS_PTR,
- DAT_CONN_QUAL, DAT_TIMEOUT, DAT_COUNT,
+ DAT_CONN_QUAL, DAT_TIMEOUT, int,
const void *, DAT_QOS, DAT_CONNECT_FLAGS);
typedef u32 (*DAT_EP_DUP_CONNECT_FUNC) (DAT_EP_HANDLE, DAT_EP_HANDLE,
- DAT_TIMEOUT, DAT_COUNT, const void *,
+ DAT_TIMEOUT, int, const void *,
DAT_QOS);
typedef u32 (*DAT_EP_DISCONNECT_FUNC) (DAT_EP_HANDLE, DAT_CLOSE_FLAGS);
typedef u32 (*DAT_EP_POST_SEND_FUNC) (
- DAT_EP_HANDLE, DAT_COUNT, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
+ DAT_EP_HANDLE, int, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
DAT_COMPLETION_FLAGS);
typedef u32 (*DAT_EP_POST_RECV_FUNC) (
- DAT_EP_HANDLE, DAT_COUNT, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
+ DAT_EP_HANDLE, int, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
DAT_COMPLETION_FLAGS);
typedef u32 (*DAT_EP_POST_RDMA_READ_FUNC) (
- DAT_EP_HANDLE, DAT_COUNT, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
+ DAT_EP_HANDLE, int, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
const struct dat_rmr_triplet *, DAT_COMPLETION_FLAGS);
typedef u32 (*DAT_EP_POST_RDMA_WRITE_FUNC) (
- DAT_EP_HANDLE, DAT_COUNT, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
+ DAT_EP_HANDLE, int, struct dat_lmr_triplet *, DAT_DTO_COOKIE,
const struct dat_rmr_triplet *, DAT_COMPLETION_FLAGS);
typedef u32 (*DAT_EP_GET_STATUS_FUNC) (
@@ -1191,10 +1190,10 @@ typedef u32 (*DAT_EP_FREE_FUNC) (DAT_EP_
typedef u32 (*DAT_EP_RESET_FUNC) (DAT_EP_HANDLE);
typedef u32 (*DAT_EP_RECV_QUERY_FUNC) (
- DAT_EP_HANDLE, DAT_COUNT *, DAT_COUNT *);
+ DAT_EP_HANDLE, int *, int *);
typedef u32 (*DAT_EP_SET_WATERMARK_FUNC) (
- DAT_EP_HANDLE, DAT_COUNT, DAT_COUNT);
+ DAT_EP_HANDLE, int, int);
typedef u32 (*DAT_LMR_FREE_FUNC) (DAT_LMR_HANDLE);
@@ -1248,17 +1247,17 @@ typedef u32 (*DAT_PZ_FREE_FUNC) (DAT_PZ_
typedef u32 (*DAT_SRQ_CREATE_FUNC) (
DAT_IA_HANDLE, DAT_PZ_HANDLE, struct dat_srq_attr *, DAT_SRQ_HANDLE *);
-typedef u32 (*DAT_SRQ_SET_LW_FUNC) (DAT_SRQ_HANDLE, DAT_COUNT);
+typedef u32 (*DAT_SRQ_SET_LW_FUNC) (DAT_SRQ_HANDLE, int);
typedef u32 (*DAT_SRQ_FREE_FUNC) (DAT_SRQ_HANDLE);
typedef u32 (*DAT_SRQ_QUERY_FUNC) (DAT_SRQ_HANDLE,
struct dat_srq_param *);
-typedef u32 (*DAT_SRQ_RESIZE_FUNC) (DAT_SRQ_HANDLE, DAT_COUNT);
+typedef u32 (*DAT_SRQ_RESIZE_FUNC) (DAT_SRQ_HANDLE, int);
typedef u32 (*DAT_SRQ_POST_RECV_FUNC) (
- DAT_SRQ_HANDLE, DAT_COUNT, struct dat_lmr_triplet *, DAT_DTO_COOKIE);
+ DAT_SRQ_HANDLE, int, struct dat_lmr_triplet *, DAT_DTO_COOKIE);
typedef u32 (*DAT_LMR_KCREATE_FUNC) (
DAT_IA_HANDLE, DAT_MEM_TYPE, DAT_REGION_DESCRIPTION, DAT_VLEN,
@@ -1271,7 +1270,7 @@ typedef u32 (*DAT_IA_MEMTYPE_HINT_FUNC)
DAT_VLEN *, DAT_VADDR *);
typedef u32 (*DAT_EVD_KCREATE_FUNC) (
- DAT_IA_HANDLE, DAT_COUNT, DAT_UPCALL_POLICY,
+ DAT_IA_HANDLE, int, DAT_UPCALL_POLICY,
const struct dat_upcall_object *,
DAT_EVD_FLAGS, DAT_EVD_HANDLE *);
@@ -1378,9 +1377,10 @@ extern u32 dat_registry_remove_provider(
/*
* DAT registry functions for consumers
*/
-extern u32 dat_ia_openv(const DAT_NAME_PTR, DAT_COUNT,
- DAT_EVD_HANDLE *, DAT_IA_HANDLE *,
- u32, u32, boolean_t);
+extern u32 dat_ia_openv(const DAT_NAME_PTR name, int async_event_qlen,
+ DAT_EVD_HANDLE *async_event_handle,
+ DAT_IA_HANDLE *ia_handle, u32 dat_major, u32 dat_minor,
+ boolean_t thread_safety);
#define dat_ia_open(name, qlen, async_evd, ia) \
dat_ia_openv((name), (qlen), (async_evd), (ia), \
@@ -1391,8 +1391,8 @@ extern u32 dat_ia_close(DAT_IA_HANDLE, D
extern u32 dat_strerror(u32, const char **, const char **);
-extern u32 dat_registry_list_providers(
- DAT_COUNT, DAT_COUNT *, struct dat_provider_info *dat_provider_list[]);
+extern u32 dat_registry_list_providers(int max_to_return, int *entries_returned,
+ struct dat_provider_info *dat_provider_list[]);
/*
* inline functions for consumers
@@ -1402,64 +1402,57 @@ extern u32 dat_registry_list_providers(
#define DAT_CALL_PROVIDER_FUNC(func, handle, ...) \
DAT_HANDLE_TO_PROVIDER(handle)->func(handle, ##__VA_ARGS__)
-static inline u32 dat_set_consumer_context(DAT_HANDLE handle,
- DAT_CONTEXT context)
+static inline u32 dat_set_consumer_context(DAT_HANDLE handle,
+ DAT_CONTEXT context)
{
- return DAT_CALL_PROVIDER_FUNC(
- set_consumer_context_func, handle, context);
+ return DAT_CALL_PROVIDER_FUNC(set_consumer_context_func, handle,
+ context);
}
-static inline u32 dat_get_consumer_context(DAT_HANDLE handle,
- DAT_CONTEXT *context)
+static inline u32 dat_get_consumer_context(DAT_HANDLE handle,
+ DAT_CONTEXT *context)
{
- return DAT_CALL_PROVIDER_FUNC(
- get_consumer_context_func, handle, context);
+ return DAT_CALL_PROVIDER_FUNC(get_consumer_context_func, handle,
+ context);
}
-static inline u32 dat_get_handle_type(DAT_HANDLE handle,
- DAT_HANDLE_TYPE *type)
+static inline u32 dat_get_handle_type(DAT_HANDLE handle, DAT_HANDLE_TYPE *type)
{
return DAT_CALL_PROVIDER_FUNC(get_handle_type_func, handle, type);
}
-static inline u32 dat_ia_memtype_hint(DAT_IA_HANDLE ia,
- DAT_MEM_TYPE mem_type,
- DAT_VLEN length,
- DAT_MEM_OPTIMIZE_FLAGS mem_optimize,
- DAT_VLEN * preferred_length,
- DAT_VADDR * preferred_alignment)
-{
- return DAT_CALL_PROVIDER_FUNC(
- ia_memtype_hint_func, ia, mem_type, length, mem_optimize,
- preferred_length, preferred_alignment);
+static inline u32 dat_ia_memtype_hint(DAT_IA_HANDLE ia, DAT_MEM_TYPE mem_type,
+ DAT_VLEN length,
+ DAT_MEM_OPTIMIZE_FLAGS mem_optimize,
+ DAT_VLEN *preferred_length,
+ DAT_VADDR *preferred_alignment)
+{
+ return DAT_CALL_PROVIDER_FUNC(ia_memtype_hint_func, ia, mem_type,
+ length, mem_optimize, preferred_length,
+ preferred_alignment);
}
-static inline u32 dat_ia_query(DAT_IA_HANDLE ia,
- DAT_EVD_HANDLE * async_evd,
- struct dat_ia_attr *ia_attr,
- struct dat_provider_attr *provider_attr)
+static inline u32 dat_ia_query(DAT_IA_HANDLE ia, DAT_EVD_HANDLE *async_evd,
+ struct dat_ia_attr *ia_attr,
+ struct dat_provider_attr *provider_attr)
{
return DAT_CALL_PROVIDER_FUNC(
ia_query_func, ia, async_evd, ia_attr, provider_attr);
}
-static inline u32 dat_cr_accept(DAT_CR_HANDLE cr,
- DAT_EP_HANDLE ep,
- DAT_COUNT private_data_size,
- const void *private_data)
+static inline u32 dat_cr_accept(DAT_CR_HANDLE cr, DAT_EP_HANDLE ep,
+ int private_data_size, const void *private_data)
{
return DAT_CALL_PROVIDER_FUNC(
cr_accept_func, cr, ep, private_data_size, private_data);
}
-static inline u32 dat_cr_handoff(DAT_CR_HANDLE cr,
- DAT_CONN_QUAL handoff)
+static inline u32 dat_cr_handoff(DAT_CR_HANDLE cr, DAT_CONN_QUAL handoff)
{
return DAT_CALL_PROVIDER_FUNC(cr_handoff_func, cr, handoff);
}
-static inline u32 dat_cr_query(DAT_CR_HANDLE cr,
- struct dat_cr_param *param)
+static inline u32 dat_cr_query(DAT_CR_HANDLE cr, struct dat_cr_param *param)
{
return DAT_CALL_PROVIDER_FUNC(cr_query_func, cr, param);
}
@@ -1469,8 +1462,7 @@ static inline u32 dat_cr_reject(DAT_CR_H
return DAT_CALL_PROVIDER_FUNC(cr_reject_func, cr);
}
-static inline u32 dat_evd_dequeue(DAT_EVD_HANDLE evd,
- struct dat_event *event)
+static inline u32 dat_evd_dequeue(DAT_EVD_HANDLE evd, struct dat_event *event)
{
return DAT_CALL_PROVIDER_FUNC(evd_dequeue_func, evd, event);
}
@@ -1480,94 +1472,81 @@ static inline u32 dat_evd_free(DAT_EVD_H
return DAT_CALL_PROVIDER_FUNC(evd_free_func, evd);
}
-static inline u32 dat_evd_kcreate(DAT_IA_HANDLE ia,
- DAT_COUNT qlen,
- DAT_UPCALL_POLICY policy,
- const struct dat_upcall_object *upcall,
- DAT_EVD_FLAGS flags,
- DAT_EVD_HANDLE * evd)
+static inline u32 dat_evd_kcreate(DAT_IA_HANDLE ia, int qlen,
+ DAT_UPCALL_POLICY policy,
+ const struct dat_upcall_object *upcall,
+ DAT_EVD_FLAGS flags, DAT_EVD_HANDLE * evd)
{
- return DAT_CALL_PROVIDER_FUNC(
- evd_kcreate_func, ia, qlen, policy, upcall, flags, evd);
+ return DAT_CALL_PROVIDER_FUNC(evd_kcreate_func, ia, qlen, policy,
+ upcall, flags, evd);
}
-static inline u32 dat_evd_modify_upcall(DAT_EVD_HANDLE evd,
- DAT_UPCALL_POLICY policy,
- const struct dat_upcall_object *upcall)
+static inline u32 dat_evd_modify_upcall(DAT_EVD_HANDLE evd,
+ DAT_UPCALL_POLICY policy,
+ const struct dat_upcall_object *upcall)
{
- return DAT_CALL_PROVIDER_FUNC(
- evd_modify_upcall_func, evd, policy, upcall);
+ return DAT_CALL_PROVIDER_FUNC(evd_modify_upcall_func, evd, policy,
+ upcall);
}
-static inline u32 dat_evd_post_se(DAT_EVD_HANDLE evd,
- const struct dat_event *event)
+static inline u32 dat_evd_post_se(DAT_EVD_HANDLE evd,
+ const struct dat_event *event)
{
return DAT_CALL_PROVIDER_FUNC(evd_post_se_func, evd, event);
}
-static inline u32 dat_evd_query(DAT_EVD_HANDLE evd,
- struct dat_evd_param *param)
+static inline u32 dat_evd_query(DAT_EVD_HANDLE evd, struct dat_evd_param *param)
{
return DAT_CALL_PROVIDER_FUNC(evd_query_func, evd, param);
}
-static inline u32 dat_evd_resize(DAT_EVD_HANDLE evd, DAT_COUNT qlen)
+static inline u32 dat_evd_resize(DAT_EVD_HANDLE evd, int qlen)
{
return DAT_CALL_PROVIDER_FUNC(evd_resize_func, evd, qlen);
}
-static inline u32 dat_ep_connect(DAT_EP_HANDLE ep,
- DAT_IA_ADDRESS_PTR ia_addr,
- DAT_CONN_QUAL conn_qual,
- DAT_TIMEOUT timeout,
- DAT_COUNT private_data_size,
- const void *private_data,
- DAT_QOS qos,
- DAT_CONNECT_FLAGS flags)
-{
- return DAT_CALL_PROVIDER_FUNC(
- ep_connect_func, ep, ia_addr, conn_qual, timeout,
- private_data_size, private_data, qos, flags);
-}
-
-static inline u32 dat_ep_create(DAT_IA_HANDLE ia,
- DAT_PZ_HANDLE pz,
- DAT_EVD_HANDLE in_evd,
- DAT_EVD_HANDLE out_evd,
- DAT_EVD_HANDLE connect_evd,
- const struct dat_ep_attr *attr,
- DAT_EP_HANDLE * ep)
-{
- return DAT_CALL_PROVIDER_FUNC(
- ep_create_func, ia, pz, in_evd, out_evd, connect_evd, attr, ep);
+static inline u32 dat_ep_connect(DAT_EP_HANDLE ep, DAT_IA_ADDRESS_PTR ia_addr,
+ DAT_CONN_QUAL conn_qual, DAT_TIMEOUT timeout,
+ int private_data_size,
+ const void *private_data, DAT_QOS qos,
+ DAT_CONNECT_FLAGS flags)
+{
+ return DAT_CALL_PROVIDER_FUNC(ep_connect_func, ep, ia_addr, conn_qual,
+ timeout, private_data_size, private_data,
+ qos, flags);
+}
+
+static inline u32 dat_ep_create(DAT_IA_HANDLE ia, DAT_PZ_HANDLE pz,
+ DAT_EVD_HANDLE in_evd, DAT_EVD_HANDLE out_evd,
+ DAT_EVD_HANDLE connect_evd,
+ const struct dat_ep_attr *attr,
+ DAT_EP_HANDLE *ep)
+{
+ return DAT_CALL_PROVIDER_FUNC(ep_create_func, ia, pz, in_evd, out_evd,
+ connect_evd, attr, ep);
}
-static inline u32 dat_ep_create_with_srq(DAT_IA_HANDLE ia,
- DAT_PZ_HANDLE pz,
- DAT_EVD_HANDLE in_evd,
- DAT_EVD_HANDLE out_evd,
- DAT_EVD_HANDLE connect_evd,
- DAT_SRQ_HANDLE srq,
- const struct dat_ep_attr *attr,
- DAT_EP_HANDLE * ep)
+static inline u32 dat_ep_create_with_srq(DAT_IA_HANDLE ia, DAT_PZ_HANDLE pz,
+ DAT_EVD_HANDLE in_evd,
+ DAT_EVD_HANDLE out_evd,
+ DAT_EVD_HANDLE connect_evd,
+ DAT_SRQ_HANDLE srq,
+ const struct dat_ep_attr *attr,
+ DAT_EP_HANDLE *ep)
{
return DAT_CALL_PROVIDER_FUNC(ep_create_with_srq_func, ia, pz, in_evd,
out_evd, connect_evd, srq, attr, ep);
}
-static inline u32 dat_ep_disconnect(DAT_EP_HANDLE ep,
- DAT_CLOSE_FLAGS flags)
+static inline u32 dat_ep_disconnect(DAT_EP_HANDLE ep, DAT_CLOSE_FLAGS flags)
{
return DAT_CALL_PROVIDER_FUNC(ep_disconnect_func, ep, flags);
}
-static inline u32 dat_ep_dup_connect(DAT_EP_HANDLE ep,
- DAT_EP_HANDLE dup_ep,
- DAT_TIMEOUT timeout,
- DAT_COUNT private_data_size,
- const void *private_data,
- DAT_QOS qos)
+static inline u32 dat_ep_dup_connect(DAT_EP_HANDLE ep, DAT_EP_HANDLE dup_ep,
+ DAT_TIMEOUT timeout, int private_data_size,
+ const void *private_data, DAT_QOS qos)
{
return DAT_CALL_PROVIDER_FUNC(ep_dup_connect_func, ep, dup_ep, timeout,
private_data_size, private_data, qos);
@@ -1578,56 +1557,50 @@ static inline u32 dat_ep_free(DAT_EP_HAN
return DAT_CALL_PROVIDER_FUNC(ep_free_func, ep);
}
-static inline u32 dat_ep_get_status(DAT_EP_HANDLE ep,
- DAT_EP_STATE * state,
- boolean_t *recv_idle,
- boolean_t *req_idle)
+static inline u32 dat_ep_get_status(DAT_EP_HANDLE ep, DAT_EP_STATE *state,
+ boolean_t *recv_idle, boolean_t *req_idle)
{
- return DAT_CALL_PROVIDER_FUNC(
- ep_get_status_func, ep, state, recv_idle, req_idle);
+ return DAT_CALL_PROVIDER_FUNC(ep_get_status_func, ep, state, recv_idle,
+ req_idle);
}
-static inline u32 dat_ep_modify(DAT_EP_HANDLE ep,
- DAT_EP_PARAM_MASK mask,
- const struct dat_ep_param *param)
+static inline u32 dat_ep_modify(DAT_EP_HANDLE ep, DAT_EP_PARAM_MASK mask,
+ const struct dat_ep_param *param)
{
return DAT_CALL_PROVIDER_FUNC(ep_modify_func, ep, mask, param);
}
-static inline u32 dat_ep_post_rdma_read(DAT_EP_HANDLE ep,
- DAT_COUNT size,
- struct dat_lmr_triplet *local_iov,
- DAT_DTO_COOKIE cookie,
- const struct dat_rmr_triplet *remote_iov,
- DAT_COMPLETION_FLAGS flags)
+static inline u32 dat_ep_post_rdma_read(DAT_EP_HANDLE ep, int size,
+ struct dat_lmr_triplet *local_iov,
+ DAT_DTO_COOKIE cookie,
+ const struct dat_rmr_triplet *remote_iov,
+ DAT_COMPLETION_FLAGS flags)
{
return DAT_CALL_PROVIDER_FUNC(ep_post_rdma_read_func, ep, size,
local_iov, cookie, remote_iov, flags);
}
-static inline u32 dat_ep_post_rdma_write(DAT_EP_HANDLE ep,
- DAT_COUNT size,
- struct dat_lmr_triplet *local_iov,
- DAT_DTO_COOKIE cookie,
- const struct dat_rmr_triplet *remote_iov,
- DAT_COMPLETION_FLAGS flags)
+static inline u32 dat_ep_post_rdma_write(DAT_EP_HANDLE ep, int size,
+ struct dat_lmr_triplet *local_iov,
+ DAT_DTO_COOKIE cookie,
+ const struct dat_rmr_triplet *remote_iov,
+ DAT_COMPLETION_FLAGS flags)
{
return DAT_CALL_PROVIDER_FUNC(ep_post_rdma_write_func, ep, size,
local_iov, cookie, remote_iov, flags);
}
-static inline u32 dat_ep_post_recv(DAT_EP_HANDLE ep,
- DAT_COUNT size,
- struct dat_lmr_triplet *local_iov,
- DAT_DTO_COOKIE cookie,
- DAT_COMPLETION_FLAGS flags)
+static inline u32 dat_ep_post_recv(DAT_EP_HANDLE ep, int size,
+ struct dat_lmr_triplet *local_iov,
+ DAT_DTO_COOKIE cookie,
+ DAT_COMPLETION_FLAGS flags)
{
- return DAT_CALL_PROVIDER_FUNC(
- ep_post_recv_func, ep, size, local_iov, cookie, flags);
+ return DAT_CALL_PROVIDER_FUNC(ep_post_recv_func, ep, size, local_iov,
+ cookie, flags);
}
static inline u32 dat_ep_post_send(DAT_EP_HANDLE ep,
- DAT_COUNT size,
+ int size,
struct dat_lmr_triplet *local_iov,
DAT_DTO_COOKIE cookie,
DAT_COMPLETION_FLAGS flags)
@@ -1641,12 +1614,11 @@ static inline u32 dat_ep_query(DAT_EP_HA
return DAT_CALL_PROVIDER_FUNC(ep_query_func, ep, param);
}
-static inline u32 dat_ep_recv_query(DAT_EP_HANDLE ep,
- DAT_COUNT * bufs_alloc,
- DAT_COUNT * bufs_avail)
+static inline u32 dat_ep_recv_query(DAT_EP_HANDLE ep, int *bufs_alloc,
+ int *bufs_avail)
{
- return DAT_CALL_PROVIDER_FUNC(
- ep_recv_query_func, ep, bufs_alloc, bufs_avail);
+ return DAT_CALL_PROVIDER_FUNC(ep_recv_query_func, ep, bufs_alloc,
+ bufs_avail);
}
static inline u32 dat_ep_reset(DAT_EP_HANDLE ep)
@@ -1654,16 +1626,15 @@ static inline u32 dat_ep_reset(DAT_EP_HA
return DAT_CALL_PROVIDER_FUNC(ep_reset_func, ep);
}
-static inline u32 dat_ep_set_watermark(DAT_EP_HANDLE ep,
- DAT_COUNT soft_high_watermark,
- DAT_COUNT hard_high_watermark)
+static inline u32 dat_ep_set_watermark(DAT_EP_HANDLE ep,
+ int soft_high_watermark,
+ int hard_high_watermark)
{
return DAT_CALL_PROVIDER_FUNC(ep_set_watermark_func, ep,
soft_high_watermark, hard_high_watermark);
}
-static inline u32 dat_lmr_query(DAT_LMR_HANDLE lmr,
- struct dat_lmr_param *param)
+static inline u32 dat_lmr_query(DAT_LMR_HANDLE lmr, struct dat_lmr_param *param)
{
return DAT_CALL_PROVIDER_FUNC(lmr_query_func, lmr, param);
}
@@ -1673,23 +1644,23 @@ static inline u32 dat_lmr_free(DAT_LMR_H
return DAT_CALL_PROVIDER_FUNC(lmr_free_func, lmr);
}
-static inline u32 dat_lmr_sync_rdma_read(DAT_IA_HANDLE ia,
- const struct dat_lmr_triplet *iovs,
- DAT_VLEN num_iovs)
+static inline u32 dat_lmr_sync_rdma_read(DAT_IA_HANDLE ia,
+ const struct dat_lmr_triplet *iovs,
+ DAT_VLEN num_iovs)
{
- return DAT_CALL_PROVIDER_FUNC(
- lmr_sync_rdma_read_func, ia, iovs, num_iovs);
+ return DAT_CALL_PROVIDER_FUNC(lmr_sync_rdma_read_func, ia, iovs,
+ num_iovs);
}
static inline u32 dat_lmr_sync_rdma_write(DAT_IA_HANDLE ia,
- const struct dat_lmr_triplet *iovs,
- DAT_VLEN num_iovs)
+ const struct dat_lmr_triplet *iovs,
+ DAT_VLEN num_iovs)
{
- return DAT_CALL_PROVIDER_FUNC(
- lmr_sync_rdma_write_func, ia, iovs, num_iovs);
+ return DAT_CALL_PROVIDER_FUNC(lmr_sync_rdma_write_func, ia, iovs,
+ num_iovs);
}
-static inline u32 dat_rmr_create(DAT_PZ_HANDLE pz, DAT_RMR_HANDLE * rmr)
+static inline u32 dat_rmr_create(DAT_PZ_HANDLE pz, DAT_RMR_HANDLE *rmr)
{
return DAT_CALL_PROVIDER_FUNC(rmr_create_func, pz, rmr);
}
@@ -1699,13 +1670,12 @@ static inline u32 dat_rmr_query(DAT_RMR_
return DAT_CALL_PROVIDER_FUNC(rmr_query_func, rmr, param);
}
-static inline u32 dat_rmr_bind(DAT_RMR_HANDLE rmr,
- const struct dat_lmr_triplet *iov,
- DAT_MEM_PRIV_FLAGS mem_flags,
- DAT_EP_HANDLE ep,
- DAT_RMR_COOKIE cookie,
- DAT_COMPLETION_FLAGS comp_flags,
- DAT_RMR_CONTEXT * context)
+static inline u32 dat_rmr_bind(DAT_RMR_HANDLE rmr,
+ const struct dat_lmr_triplet *iov,
+ DAT_MEM_PRIV_FLAGS mem_flags,
+ DAT_EP_HANDLE ep, DAT_RMR_COOKIE cookie,
+ DAT_COMPLETION_FLAGS comp_flags,
+ DAT_RMR_CONTEXT *context)
{
return DAT_CALL_PROVIDER_FUNC(rmr_bind_func, rmr, iov, mem_flags, ep,
cookie, comp_flags, context);
@@ -1716,28 +1686,23 @@ static inline u32 dat_rmr_free(DAT_RMR_H
return DAT_CALL_PROVIDER_FUNC(rmr_free_func, rmr);
}
-static inline u32 dat_psp_create(DAT_IA_HANDLE ia,
- DAT_CONN_QUAL conn_qual,
- DAT_EVD_HANDLE evd,
- DAT_PSP_FLAGS flags,
- DAT_PSP_HANDLE * psp)
+static inline u32 dat_psp_create(DAT_IA_HANDLE ia, DAT_CONN_QUAL conn_qual,
+ DAT_EVD_HANDLE evd, DAT_PSP_FLAGS flags,
+ DAT_PSP_HANDLE *psp)
{
- return DAT_CALL_PROVIDER_FUNC(
- psp_create_func, ia, conn_qual, evd, flags, psp);
+ return DAT_CALL_PROVIDER_FUNC(psp_create_func, ia, conn_qual, evd,
+ flags, psp);
}
-static inline u32 dat_psp_create_any(DAT_IA_HANDLE ia,
- DAT_CONN_QUAL * conn_qual,
- DAT_EVD_HANDLE evd,
- DAT_PSP_FLAGS flags,
- DAT_PSP_HANDLE * psp)
+static inline u32 dat_psp_create_any(DAT_IA_HANDLE ia, DAT_CONN_QUAL *conn_qual,
+ DAT_EVD_HANDLE evd, DAT_PSP_FLAGS flags,
+ DAT_PSP_HANDLE *psp)
{
- return DAT_CALL_PROVIDER_FUNC(
- psp_create_any_func, ia, conn_qual, evd, flags, psp);
+ return DAT_CALL_PROVIDER_FUNC(psp_create_any_func, ia, conn_qual, evd,
+ flags, psp);
}
-static inline u32 dat_psp_query(DAT_PSP_HANDLE psp,
- struct dat_psp_param *param)
+static inline u32 dat_psp_query(DAT_PSP_HANDLE psp, struct dat_psp_param *param)
{
return DAT_CALL_PROVIDER_FUNC(psp_query_func, psp, param);
}
@@ -1747,18 +1712,15 @@ static inline u32 dat_psp_free(DAT_PSP_H
return DAT_CALL_PROVIDER_FUNC(psp_free_func, psp);
}
-static inline u32 dat_rsp_create(DAT_IA_HANDLE ia,
- DAT_CONN_QUAL conn_qual,
- DAT_EP_HANDLE ep,
- DAT_EVD_HANDLE evd,
- DAT_RSP_HANDLE * rsp)
+static inline u32 dat_rsp_create(DAT_IA_HANDLE ia, DAT_CONN_QUAL conn_qual,
+ DAT_EP_HANDLE ep, DAT_EVD_HANDLE evd,
+ DAT_RSP_HANDLE *rsp)
{
- return DAT_CALL_PROVIDER_FUNC(
- rsp_create_func, ia, conn_qual, ep, evd, rsp);
+ return DAT_CALL_PROVIDER_FUNC(rsp_create_func, ia, conn_qual, ep, evd,
+ rsp);
}
-static inline u32 dat_rsp_query(DAT_RSP_HANDLE rsp,
- struct dat_rsp_param *param)
+static inline u32 dat_rsp_query(DAT_RSP_HANDLE rsp, struct dat_rsp_param *param)
{
return DAT_CALL_PROVIDER_FUNC(rsp_query_func, rsp, param);
}
@@ -1768,13 +1730,12 @@ static inline u32 dat_rsp_free(DAT_RSP_H
return DAT_CALL_PROVIDER_FUNC(rsp_free_func, rsp);
}
-static inline u32 dat_pz_create(DAT_IA_HANDLE ia, DAT_PZ_HANDLE * pz)
+static inline u32 dat_pz_create(DAT_IA_HANDLE ia, DAT_PZ_HANDLE *pz)
{
return DAT_CALL_PROVIDER_FUNC(pz_create_func, ia, pz);
}
-static inline u32 dat_pz_query(DAT_PZ_HANDLE pz,
- struct dat_pz_param *param)
+static inline u32 dat_pz_query(DAT_PZ_HANDLE pz, struct dat_pz_param *param)
{
return DAT_CALL_PROVIDER_FUNC(pz_query_func, pz, param);
}
@@ -1784,10 +1745,9 @@ static inline u32 dat_pz_free(DAT_PZ_HAN
return DAT_CALL_PROVIDER_FUNC(pz_free_func, pz);
}
-static inline u32 dat_srq_create(DAT_IA_HANDLE ia,
- DAT_PZ_HANDLE pz,
- struct dat_srq_attr *attr,
- DAT_SRQ_HANDLE * srq)
+static inline u32 dat_srq_create(DAT_IA_HANDLE ia, DAT_PZ_HANDLE pz,
+ struct dat_srq_attr *attr,
+ DAT_SRQ_HANDLE *srq)
{
return DAT_CALL_PROVIDER_FUNC(srq_create_func, ia, pz, attr, srq);
}
@@ -1797,50 +1757,44 @@ static inline u32 dat_srq_free(DAT_SRQ_H
return DAT_CALL_PROVIDER_FUNC(srq_free_func, srq);
}
-static inline u32 dat_srq_post_recv(DAT_SRQ_HANDLE srq,
- DAT_COUNT num_iovs,
- struct dat_lmr_triplet *iovs,
- DAT_DTO_COOKIE cookie)
+static inline u32 dat_srq_post_recv(DAT_SRQ_HANDLE srq, int num_iovs,
+ struct dat_lmr_triplet *iovs,
+ DAT_DTO_COOKIE cookie)
{
- return DAT_CALL_PROVIDER_FUNC(
- srq_post_recv_func, srq, num_iovs, iovs, cookie);
+ return DAT_CALL_PROVIDER_FUNC(srq_post_recv_func, srq, num_iovs, iovs,
+ cookie);
}
-static inline u32 dat_srq_query(DAT_SRQ_HANDLE srq,
- struct dat_srq_param *param)
+static inline u32 dat_srq_query(DAT_SRQ_HANDLE srq, struct dat_srq_param *param)
{
return DAT_CALL_PROVIDER_FUNC(srq_query_func, srq, param);
}
-static inline u32 dat_srq_resize(DAT_SRQ_HANDLE srq,
- DAT_COUNT max_recv_dtos)
+static inline u32 dat_srq_resize(DAT_SRQ_HANDLE srq, int max_recv_dtos)
{
return DAT_CALL_PROVIDER_FUNC(srq_resize_func, srq, max_recv_dtos);
}
-static inline u32 dat_srq_set_lw(DAT_SRQ_HANDLE srq,
- DAT_COUNT low_watermark)
+static inline u32 dat_srq_set_lw(DAT_SRQ_HANDLE srq, int low_watermark)
{
return DAT_CALL_PROVIDER_FUNC(srq_set_lw_func, srq, low_watermark);
}
-static inline u32 dat_lmr_kcreate(DAT_IA_HANDLE ia,
- DAT_MEM_TYPE type,
- DAT_REGION_DESCRIPTION region,
- DAT_VLEN len,
- DAT_PZ_HANDLE pz,
- DAT_MEM_PRIV_FLAGS privileges,
- DAT_MEM_OPTIMIZE_FLAGS optimization,
- DAT_LMR_HANDLE * lmr_handle,
- DAT_LMR_CONTEXT * lmr_context,
- DAT_RMR_CONTEXT * rmr_context,
- DAT_VLEN * registered_length,
- DAT_VADDR *registered_address)
-{
- return DAT_CALL_PROVIDER_FUNC(
- lmr_kcreate_func, ia, type, region, len, pz, privileges,
- optimization, lmr_handle, lmr_context, rmr_context,
- registered_length, registered_address);
+static inline u32 dat_lmr_kcreate(DAT_IA_HANDLE ia, DAT_MEM_TYPE type,
+ DAT_REGION_DESCRIPTION region, DAT_VLEN len,
+ DAT_PZ_HANDLE pz,
+ DAT_MEM_PRIV_FLAGS privileges,
+ DAT_MEM_OPTIMIZE_FLAGS optimization,
+ DAT_LMR_HANDLE *lmr_handle,
+ DAT_LMR_CONTEXT *lmr_context,
+ DAT_RMR_CONTEXT *rmr_context,
+ DAT_VLEN *registered_length,
+ DAT_VADDR *registered_address)
+{
+ return DAT_CALL_PROVIDER_FUNC(lmr_kcreate_func, ia, type, region, len,
+ pz, privileges, optimization, lmr_handle,
+ lmr_context, rmr_context,
+ registered_length, registered_address);
}
#endif /* DAT_H */
More information about the general
mailing list