From a4c29dfdac5106285968d8bf7243826862ce1103 Mon Sep 17 00:00:00 2001 From: stansmith Date: Fri, 5 Oct 2007 17:03:09 +0000 Subject: [PATCH] [DAPL2] v2 white-space cleanup DAT extensions enabled by default. git-svn-id: svn://openib.tc.cornell.edu/gen1@844 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/ulp/dapl2/dapl/common/dapl_cookie.c | 3 +- trunk/ulp/dapl2/dapl/common/dapl_debug.c | 1 + trunk/ulp/dapl2/dapl/common/dapl_evd_util.c | 66 +++++++----- trunk/ulp/dapl2/dapl/ibal/dapl_ibal_dto.h | 101 +++++++++++------- .../dapl2/dapl/ibal/dapl_ibal_extensions.c | 22 ++-- trunk/ulp/dapl2/dapl/ibal/dapl_ibal_util.h | 38 ++++--- trunk/ulp/dapl2/dapl/include/dapl_debug.h | 3 +- trunk/ulp/dapl2/dapl/udapl/SOURCES | 2 +- trunk/ulp/dapl2/dat/include/dat/dat.h | 4 +- .../dapl2/dat/include/dat/dat_ib_extensions.h | 2 +- trunk/ulp/dapl2/dat/udat/udat_exports.src | 3 + trunk/ulp/dapl2/test/dapltest/SOURCES | 4 + trunk/ulp/dapl2/test/dapltest/dapltest.rc | 7 +- .../dapl2/test/dapltest/scripts/dt-cli.bat | 45 +++++--- trunk/ulp/dapl2/test/dirs | 2 +- trunk/ulp/dapl2/test/dtest/SOURCES | 4 + trunk/ulp/dapl2/test/dtest/dtest.rc | 7 +- 17 files changed, 201 insertions(+), 113 deletions(-) diff --git a/trunk/ulp/dapl2/dapl/common/dapl_cookie.c b/trunk/ulp/dapl2/dapl/common/dapl_cookie.c index 78191876..2b69cc9b 100644 --- a/trunk/ulp/dapl2/dapl/common/dapl_cookie.c +++ b/trunk/ulp/dapl2/dapl/common/dapl_cookie.c @@ -183,6 +183,7 @@ dapls_cb_free ( if ( NULL != buffer->pool ) { dapl_os_free (buffer->pool, buffer->pool_size * sizeof (DAPL_COOKIE)); + buffer->pool = NULL; } } @@ -224,7 +225,6 @@ dapls_cb_get ( else { dapl_os_atomic_set (&buffer->head, new_head); - *cookie_ptr = &buffer->pool[dapl_os_atomic_read (&buffer->head)]; dat_status = DAT_SUCCESS; } @@ -256,7 +256,6 @@ dapls_cb_put ( IN DAPL_COOKIE *cookie ) { dapl_os_atomic_set (&buffer->tail, cookie->index); - return DAT_SUCCESS; } diff --git a/trunk/ulp/dapl2/dapl/common/dapl_debug.c b/trunk/ulp/dapl2/dapl/common/dapl_debug.c index 73f30ccd..a587dce9 100644 --- a/trunk/ulp/dapl2/dapl/common/dapl_debug.c +++ b/trunk/ulp/dapl2/dapl/common/dapl_debug.c @@ -86,6 +86,7 @@ char *dapl_dbg_counter_names[] = { "dapl_evd_not_found", "dapls_timer_set", "dapls_timer_cancel", + "dapl_extensions" }; void dapl_dump_cntr( int cntr ) diff --git a/trunk/ulp/dapl2/dapl/common/dapl_evd_util.c b/trunk/ulp/dapl2/dapl/common/dapl_evd_util.c index 66d99ab6..f628fd0a 100644 --- a/trunk/ulp/dapl2/dapl/common/dapl_evd_util.c +++ b/trunk/ulp/dapl2/dapl/common/dapl_evd_util.c @@ -557,6 +557,25 @@ dapli_evd_eh_print_cqe ( IN ib_work_completion_t *cqe_ptr) { #ifdef DAPL_DBG +#if defined(_MSC_VER) || defined(_WIN32) || defined(_WIN64) + static char *optable[] = + { + "PAD0", + "OP_SEND", + "OP_RDMA_WRITE", + "OP_RDMA_READ", + "OP_COMP_AND_SWAP", // 4 + "OP_FETCH_AND_ADD", // 5 + "OP_RECEIVE_RDMA_WRITE", + "PAD1", + "OP_RECEIVE", // (8) + "OP_BIND_MW", + "OP_RDMA_WRITE_IMM", + "OP_SEND_IMM", + "OP_RECEIVE_IMM", + 0 + }; +#else static char *optable[] = { "OP_RDMA_WRITE", @@ -571,6 +590,7 @@ dapli_evd_eh_print_cqe ( "OP_BIND_MW", 0 }; +#endif dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK, "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n"); @@ -1090,25 +1110,24 @@ dapli_evd_cqe_to_event ( #ifdef DAT_EXTENSIONS /* Extended via request post or message receive */ if ((cookie->val.dto.type == DAPL_DTO_TYPE_EXTENSION) || - (cookie->val.dto.type == DAPL_DTO_TYPE_RECV && - DAPL_GET_CQE_OPTYPE(cqe_ptr) != OP_RECEIVE)) + (cookie->val.dto.type == DAPL_DTO_TYPE_RECV && + DAPL_GET_CQE_OPTYPE(cqe_ptr) != OP_RECEIVE)) { - dapls_cqe_to_event_extension(ep_ptr, cookie, - cqe_ptr, event_ptr); - dapls_cookie_dealloc (&ep_ptr->req_buffer, cookie); - break; + dapls_cqe_to_event_extension (ep_ptr, cookie, cqe_ptr, event_ptr); + dapls_cookie_dealloc (&ep_ptr->req_buffer, cookie); + break; } #endif if ( DAPL_DTO_TYPE_RECV == cookie->val.dto.type ) { - dapl_os_atomic_dec (&ep_ptr->recv_count); - buffer = &ep_ptr->recv_buffer; + dapl_os_atomic_dec (&ep_ptr->recv_count); + buffer = &ep_ptr->recv_buffer; } else { - dapl_os_atomic_dec (&ep_ptr->req_count); - buffer = &ep_ptr->req_buffer; + dapl_os_atomic_dec (&ep_ptr->req_count); + buffer = &ep_ptr->req_buffer; } event_ptr->event_number = DAT_DTO_COMPLETION_EVENT; @@ -1121,14 +1140,14 @@ dapli_evd_cqe_to_event ( if ( cookie->val.dto.type == DAPL_DTO_TYPE_SEND || cookie->val.dto.type == DAPL_DTO_TYPE_RDMA_WRITE ) { - /* Get size from DTO; CQE value may be off. */ - event_ptr->event_data.dto_completion_event_data.transfered_length = - cookie->val.dto.size; + /* Get size from DTO; CQE value may be off. */ + event_ptr->event_data.dto_completion_event_data.transfered_length = + cookie->val.dto.size; } else { - event_ptr->event_data.dto_completion_event_data.transfered_length = - DAPL_GET_CQE_BYTESNUM (cqe_ptr); + event_ptr->event_data.dto_completion_event_data.transfered_length = + DAPL_GET_CQE_BYTESNUM (cqe_ptr); } dapls_cookie_dealloc (buffer, cookie); @@ -1147,19 +1166,19 @@ dapli_evd_cqe_to_event ( cookie->val.rmr.cookie; if (dto_status == DAT_DTO_SUCCESS) { - event_ptr->event_data.rmr_completion_event_data.status = - DAT_RMR_BIND_SUCCESS; - dapl_os_assert ((DAPL_GET_CQE_OPTYPE (cqe_ptr)) == OP_BIND_MW); + event_ptr->event_data.rmr_completion_event_data.status = + DAT_RMR_BIND_SUCCESS; + dapl_os_assert ((DAPL_GET_CQE_OPTYPE (cqe_ptr)) == OP_BIND_MW); } else { - dapl_dbg_log (DAPL_DBG_TYPE_DTO_COMP_ERR, + dapl_dbg_log (DAPL_DBG_TYPE_DTO_COMP_ERR, " MW bind completion ERROR: %d: op %#x ep: %p\n", dto_status, DAPL_GET_CQE_OPTYPE (cqe_ptr), ep_ptr); - event_ptr->event_data.rmr_completion_event_data.status = - DAT_RMR_OPERATION_FAILED; - dapl_os_atomic_dec(&cookie->val.rmr.rmr->lmr->lmr_ref_count); + event_ptr->event_data.rmr_completion_event_data.status = + DAT_RMR_OPERATION_FAILED; + dapl_os_atomic_dec(&cookie->val.rmr.rmr->lmr->lmr_ref_count); } dapls_cookie_dealloc (&ep_ptr->req_buffer, cookie); @@ -1275,8 +1294,7 @@ dapls_evd_copy_cq ( * will overwrite. */ - event = dapli_evd_get_and_init_event ( - evd_ptr, DAT_DTO_COMPLETION_EVENT ); + event = dapli_evd_get_and_init_event (evd_ptr,DAT_DTO_COMPLETION_EVENT); if (event == NULL) { /* We've already attempted the overflow post; return. */ diff --git a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_dto.h b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_dto.h index 270a7f23..da903d83 100644 --- a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_dto.h +++ b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_dto.h @@ -54,9 +54,6 @@ #include #endif -//STATIC _INLINE_ int -//dapls_cqe_opcode_convert (ib_work_completion_t *cqe_p); - extern DAT_RETURN dapls_ib_cq_late_alloc ( IN ib_pd_handle_t pd_handle, @@ -311,7 +308,8 @@ dapls_ib_optional_prv_dat ( { cr_ptr->param.private_data_size = sizeof(cr_ptr->private_data); cr_ptr->param.private_data = cr_ptr->private_data; - dapl_os_memcpy(cr_ptr->private_data, p_prv_data->private_data, cr_ptr->param.private_data_size ); + dapl_os_memcpy( cr_ptr->private_data, + p_prv_data->private_data, cr_ptr->param.private_data_size ); *cr_pp = (DAPL_CR *)cr_ptr->param.private_data; } return dat_status; @@ -324,39 +322,36 @@ dapls_cqe_opcode_convert (ib_work_completion_t *cqe_p) switch (((ib_work_completion_t *)cqe_p)->wc_type) { case IB_WC_SEND: - { return (OP_SEND); - } + case IB_WC_RDMA_WRITE: - case IB_WC_RECV_RDMA_WRITE: - { + if (cqe_p->recv.conn.immediate_data & IB_RECV_OPT_IMMEDIATE) + return (OP_RDMA_WRITE_IMM); return (OP_RDMA_WRITE); - } + + case IB_WC_RECV: + if (cqe_p->recv.conn.immediate_data & IB_RECV_OPT_IMMEDIATE) + return (OP_RECEIVE_IMM); + return (OP_RECEIVE); + case IB_WC_RDMA_READ: - { return (OP_RDMA_READ); - } - case IB_WC_COMPARE_SWAP: - { - return (OP_COMP_AND_SWAP); - } - case IB_WC_FETCH_ADD: - { - return (OP_FETCH_AND_ADD); - } + case IB_WC_MW_BIND: - { return (OP_BIND_MW); - } - case IB_WC_RECV: - { - return (OP_RECEIVE); - } + + case IB_WC_FETCH_ADD: + return (OP_FETCH_AND_ADD); + + case IB_WC_COMPARE_SWAP: + return (OP_COMP_AND_SWAP); + + case IB_WC_RECV_RDMA_WRITE: + return (OP_RECEIVE); // XXX? + default : - { /* error */ return (IB_ERROR); - } } } @@ -368,22 +363,28 @@ STATIC _INLINE_ DAT_DTOS dapls_cqe_dtos_opcode(ib_work_completion_t *cqe_p) case IB_WC_SEND: return (DAT_DTO_SEND); + case IB_WC_MW_BIND: return (DAT_DTO_BIND_MW); + #ifdef DAT_EXTENSIONS case IB_WC_RDMA_WRITE: - case IB_WC_RECV_RDMA_WRITE: if (cqe_p->recv.conn.immediate_data & IB_RECV_OPT_IMMEDIATE) return (DAT_IB_DTO_RDMA_WRITE_IMMED); else return (DAT_DTO_RDMA_WRITE); + case IB_WC_COMPARE_SWAP: return (DAT_IB_DTO_CMP_SWAP); + case IB_WC_FETCH_ADD: return (DAT_IB_DTO_FETCH_ADD); + case IB_WC_RDMA_READ: return (DAT_DTO_RDMA_READ); + case IB_WC_RECV: + case IB_WC_RECV_RDMA_WRITE: if (cqe_p->recv.conn.immediate_data & IB_RECV_OPT_IMMEDIATE) return (DAT_IB_DTO_RECV_IMMED); else @@ -391,16 +392,23 @@ STATIC _INLINE_ DAT_DTOS dapls_cqe_dtos_opcode(ib_work_completion_t *cqe_p) #else case IB_WC_RDMA_READ: return (DAT_DTO_RDMA_READ); + case IB_WC_RDMA_WRITE: case IB_WC_RECV_RDMA_WRITE: return (DAT_DTO_RDMA_WRITE); + case IB_WC_RECV: return (DAT_DTO_RECEIVE); #endif default: +#ifdef DAPL_DBG + dapl_dbg_log(DAPL_DBG_TYPE_ERR, "%s() Unknown IB_WC_TYPE %d?\n", + __FUNCTION__, cqe_p->wc_type); +#endif return (0xff); } } + #define DAPL_GET_CQE_DTOS_OPTYPE(cqe_p) dapls_cqe_dtos_opcode(cqe_p) #define DAPL_GET_CQE_WRID(cqe_p) ((ib_work_completion_t *)cqe_p)->wr_id @@ -437,8 +445,8 @@ dapls_ib_post_ext_send ( DAT_COUNT i, total_len; dapl_dbg_log(DAPL_DBG_TYPE_EP, - " post_snd: ep %p op %d ck %p sgs", - "%d l_iov %p r_iov %p f %d\n", + " post_ext_send: ep %p op %d ck %p numSegs %d\n" + " loc_iov %p rem_iov %p flgs %d\n", ep_ptr, op_type, cookie, num_segs, local_iov, remote_iov, completion_flags); @@ -448,7 +456,13 @@ dapls_ib_post_ext_send ( ds_array_p = dapl_os_alloc(num_segs*sizeof(ib_data_segment_t)); if (NULL == ds_array_p) + { +#ifdef DAPL_DBG + dapl_dbg_log(DAPL_DBG_TYPE_ERR," %s() os_alloc(%d) failed?\n", + __FUNCTION__,(num_segs*sizeof(ib_data_segment_t))); +#endif return (DAT_INSUFFICIENT_RESOURCES); + } /* setup the work request */ dapl_os_memzero (&wr, sizeof(ib_send_wr_t)); @@ -481,24 +495,31 @@ dapls_ib_post_ext_send ( switch (op_type) { - case WR_RDMA_WRITE: + case OP_RDMA_WRITE_IMM: + wr.immediate_data = immed_data; + wr.send_opt |= IB_SEND_OPT_IMMEDIATE; + /* fall thru */ + case OP_RDMA_WRITE: + wr.wr_type = WR_RDMA_WRITE; + if ( immed_data == 0 ) break; + dapl_dbg_log(DAPL_DBG_TYPE_EP, - " post_ext: rkey 0x%x va %#016Lx immed=0x%x\n", + " post_ext: OP_RDMA_WRITE_IMM rkey 0x%x va " + "%#016Lx immed=0x%x\n", remote_iov->rmr_context, remote_iov->virtual_address, immed_data); - wr.immediate_data = immed_data; - wr.send_opt |= IB_SEND_OPT_IMMEDIATE; wr.remote_ops.vaddr = remote_iov->virtual_address; wr.remote_ops.rkey = remote_iov->rmr_context; break; - case WR_COMPARE_SWAP: + case OP_COMP_AND_SWAP: + wr.wr_type = WR_COMPARE_SWAP; dapl_dbg_log(DAPL_DBG_TYPE_EP, - " post_ext: OP_COMP_AND_SWAP=%lx," - "%lx rkey 0x%x va %#016Lx\n", + " post_ext: OP_COMP_AND_SWAP=%llx,%llx rkey 0x%x " + "va %#016Lx\n", compare_add, swap, remote_iov->rmr_context, remote_iov->virtual_address); @@ -508,7 +529,8 @@ dapls_ib_post_ext_send ( wr.remote_ops.atomic2 = swap; break; - case WR_FETCH_ADD: + case OP_FETCH_AND_ADD: + wr.wr_type = WR_FETCH_ADD; dapl_dbg_log(DAPL_DBG_TYPE_EP, " post_ext: OP_FETCH_AND_ADD=%lx," "%lx rkey 0x%x va %#016Lx\n", @@ -517,6 +539,7 @@ dapls_ib_post_ext_send ( wr.remote_ops.vaddr = remote_iov->virtual_address; wr.remote_ops.rkey = remote_iov->rmr_context; + wr.remote_ops.atomic1 = compare_add; break; default: @@ -532,7 +555,7 @@ dapls_ib_post_ext_send ( completion_flags) ? IB_SEND_OPT_SOLICITED : 0; dapl_dbg_log(DAPL_DBG_TYPE_EP, - " post_snd: op 0x%x flags 0x%x sglist %p, %d\n", + " post_snd1: op 0x%x flags 0x%x sglist %p, %d\n", wr.wr_type, wr.send_opt, wr.ds_array, wr.num_ds); ib_status = ib_post_send(ep_ptr->qp_handle, &wr, &bad_wr); diff --git a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_extensions.c b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_extensions.c index d1351f5a..5fe28327 100644 --- a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_extensions.c +++ b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_extensions.c @@ -43,7 +43,6 @@ #include "dapl_cookie.h" #include - DAT_RETURN dapli_post_ext( IN DAT_EP_HANDLE ep_handle, IN DAT_UINT64 cmp_add, @@ -177,10 +176,11 @@ dapli_post_ext( IN DAT_EP_HANDLE ep_handle, DAT_RETURN dat_status = DAT_SUCCESS; dapl_dbg_log(DAPL_DBG_TYPE_API, - " post_ext_op: ep %p cmp_val %d " - "swap_val %d cookie 0x%x, r_iov %p, flags 0x%x\n", + "--> post_ext_op: ep %p cmp_val %x swap_val %x cookie " + "0x%x\n r_iov %p, flags 0x%x op %d segs %d\n", ep_handle, (unsigned)cmp_add, (unsigned)swap, - (unsigned)user_cookie.as_64, remote_iov, flags); + (unsigned)user_cookie.as_64, remote_iov, flags, op_type, + segments); if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) return(DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP)); @@ -212,9 +212,6 @@ dapli_post_ext( IN DAT_EP_HANDLE ep_handle, * completions */ dapl_os_atomic_inc(&ep_ptr->req_count); -dapl_dbg_log (DAPL_DBG_TYPE_CM, "--> %s() EP %lx req_count %d\n",__FUNCTION__, - ep_ptr, dapl_os_atomic_read(&ep_ptr->req_count)); - } /* @@ -231,10 +228,17 @@ dapl_dbg_log (DAPL_DBG_TYPE_CM, "--> %s() EP %lx req_count %d\n",__FUNCTION__, swap, /* swap */ flags); - if (dat_status != DAT_SUCCESS) { - if ( cookie != NULL ) { + if (dat_status != DAT_SUCCESS) + { + if ( cookie != NULL ) + { dapl_os_atomic_dec(&ep_ptr->req_count); dapls_cookie_dealloc(&ep_ptr->req_buffer, cookie); +#ifdef DAPL_DBG + dapl_dbg_log(DAPL_DBG_TYPE_ERR, + "%s() post_ex_send err %d @ line %d\n", + __FUNCTION__,dat_status,__LINE__); +#endif } } diff --git a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_util.h b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_util.h index 02a84d52..8859b991 100644 --- a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_util.h +++ b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_util.h @@ -31,10 +31,6 @@ #include #endif -STATIC _INLINE_ DAT_RETURN -dapl_ib_status_convert ( - IN int32_t ib_status); - /* * Typedefs to map IBAL types to more generic 'ib' types */ @@ -175,10 +171,10 @@ typedef struct _dapl_ibal_evd_cb #define OP_COMP_AND_SWAP WR_COMPARE_SWAP #define OP_FETCH_AND_ADD WR_FETCH_ADD -#define OP_RECEIVE 6 /* no-equip */ -#define OP_BIND_MW 7 /* no-equip */ -#define OP_RDMA_WRITE_IMM 8 /* no-equip */ -#define OP_RECEIVE_IMM 9 /* no-equip */ +#define OP_RECEIVE 8 /* (8) */ +#define OP_BIND_MW 9 /* no-equivalent */ +#define OP_RDMA_WRITE_IMM 10 /* RDMA_WRITE+Immediate data */ +#define OP_RECEIVE_IMM 11 /* no-equivalent */ /* * Definitions to map QP state @@ -194,9 +190,11 @@ typedef struct _dapl_ibal_evd_cb /* * Definitions to map Memory OPs */ -#define IB_ACCESS_LOCAL_WRITE IB_AC_LOCAL_WRITE -#define IB_ACCESS_REMOTE_READ IB_AC_RDMA_READ -#define IB_ACCESS_REMOTE_WRITE IB_AC_RDMA_WRITE +#define IB_ACCESS_LOCAL_WRITE IB_AC_LOCAL_WRITE +#define IB_ACCESS_REMOTE_READ IB_AC_RDMA_READ +#define IB_ACCESS_REMOTE_WRITE IB_AC_RDMA_WRITE +#define IB_ACCESS_REMOTE_ATOMIC IB_AC_ATOMIC +#define IB_ACCESS_MEM_WINDOW_BIND IB_AC_MW_BIND /* * CQE status @@ -445,12 +443,11 @@ dapli_find_evd_cb_by_context( IN dapl_ibal_ca_t *ca); extern IB_HCA_NAME -dapl_ib_convert_name( - IN char *name); +dapl_ib_convert_name(IN char *name); STATIC _INLINE_ int32_t -dapl_lmr_convert_privileges ( IN DAT_MEM_PRIV_FLAGS privileges ) +dapl_lmr_convert_privileges (IN DAT_MEM_PRIV_FLAGS privileges ) { int32_t value = 0; @@ -473,6 +470,10 @@ dapl_lmr_convert_privileges ( IN DAT_MEM_PRIV_FLAGS privileges ) { value |= IB_ACCESS_REMOTE_WRITE; } +#ifdef DAT_EXTENSIONS + if (DAT_IB_MEM_PRIV_REMOTE_ATOMIC & privileges) + value |= IB_ACCESS_REMOTE_ATOMIC; +#endif return value; } @@ -480,7 +481,7 @@ dapl_lmr_convert_privileges ( IN DAT_MEM_PRIV_FLAGS privileges ) STATIC _INLINE_ int32_t dapl_rmr_convert_privileges ( IN DAT_MEM_PRIV_FLAGS privileges ) { - int32_t value = 0; + int32_t value = IB_ACCESS_MEM_WINDOW_BIND;/* see dapls_ib_mw_bind() */ if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges) { @@ -491,6 +492,13 @@ dapl_rmr_convert_privileges ( IN DAT_MEM_PRIV_FLAGS privileges ) { value |= IB_ACCESS_REMOTE_WRITE; } +#ifdef DAPL_DBG + if (value == IB_ACCESS_MEM_WINDOW_BIND) + { + dapl_dbg_log(DAPL_DBG_TYPE_ERR,"%s() Unknown DAT_MEM_PRIV_ 0x%x\n", + __FUNCTION__,privileges); + } +#endif return value; } diff --git a/trunk/ulp/dapl2/dapl/include/dapl_debug.h b/trunk/ulp/dapl2/dapl/include/dapl_debug.h index 57bab60f..b096fdb4 100644 --- a/trunk/ulp/dapl2/dapl/include/dapl_debug.h +++ b/trunk/ulp/dapl2/dapl/include/dapl_debug.h @@ -121,7 +121,8 @@ static __inline void dapl_dbg_log ( DAPL_DBG_TYPE type, const char *fmt, ...) #define DCNT_EVD_DEQUEUE_NOT_FOUND 18 #define DCNT_TIMER_SET 19 #define DCNT_TIMER_CANCEL 20 -#define DCNT_NUM_COUNTERS 21 +#define DCNT_EXTENSION 21 +#define DCNT_NUM_COUNTERS 22 #define DCNT_ALL_COUNTERS DCNT_NUM_COUNTERS #if defined(DAPL_COUNTERS) diff --git a/trunk/ulp/dapl2/dapl/udapl/SOURCES b/trunk/ulp/dapl2/dapl/udapl/SOURCES index 257e7a53..6e5e4290 100644 --- a/trunk/ulp/dapl2/dapl/udapl/SOURCES +++ b/trunk/ulp/dapl2/dapl/udapl/SOURCES @@ -38,7 +38,7 @@ DAPL_OPTS= $(DAPL_OPTS) -DDAT_EXTENSIONS=1 USER_C_FLAGS=$(USER_C_FLAGS) $(DAPL_OPTS) !if !$(FREEBUILD) -USER_C_FLAGS=$(USER_C_FLAGS) -DDAPL_DBG +USER_C_FLAGS=$(USER_C_FLAGS) -DDAPL_DBG #-DDAPL_COUNTERS !endif TARGETLIBS= \ diff --git a/trunk/ulp/dapl2/dat/include/dat/dat.h b/trunk/ulp/dapl2/dat/include/dat/dat.h index cdd5df4e..c6455a02 100644 --- a/trunk/ulp/dapl2/dat/include/dat/dat.h +++ b/trunk/ulp/dapl2/dat/include/dat/dat.h @@ -225,7 +225,7 @@ typedef enum dat_evd_flags DAT_EVD_DEFAULT_FLAG = 0x1F0 #ifdef DAT_EXTENSIONS /* To be used by DAT extensions as a starting point for extended evd flags */ - ,DAT_EVD_EXTENSION_BASE = 0x200 + ,DAT_EVD_EXTENSION_BASE = 0x200 #endif /* DAT_EXTENSIONS */ } DAT_EVD_FLAGS; @@ -325,7 +325,7 @@ typedef enum dat_mem_priv_flags #ifdef DAT_EXTENSIONS /* To be used by DAT extensions as a starting point of extension memory privileges */ - ,DAT_MEM_PRIV_EXTENSION_BASE = 0x40 + ,DAT_MEM_PRIV_EXTENSION_BASE = 0x40 #endif /* DAT_EXTENSIONS */ } DAT_MEM_PRIV_FLAGS; diff --git a/trunk/ulp/dapl2/dat/include/dat/dat_ib_extensions.h b/trunk/ulp/dapl2/dat/include/dat/dat_ib_extensions.h index b94c5ce8..1f63cb4b 100644 --- a/trunk/ulp/dapl2/dat/include/dat/dat_ib_extensions.h +++ b/trunk/ulp/dapl2/dat/include/dat/dat_ib_extensions.h @@ -296,7 +296,7 @@ dat_strerror_ext_status ( * Other extension flags: * n/a */ -#define dat_ib_post_rdma_write_immed(ep, size, lbuf, cookie, rbuf, idata, flgs) \ +#define dat_ib_post_rdma_write_immed(ep, size, lbuf, cookie, rbuf, idata, flgs)\ dat_extension_op( ep, \ DAT_IB_RDMA_WRITE_IMMED_OP, \ (size), \ diff --git a/trunk/ulp/dapl2/dat/udat/udat_exports.src b/trunk/ulp/dapl2/dat/udat/udat_exports.src index cb542011..0a68ff69 100644 --- a/trunk/ulp/dapl2/dat/udat/udat_exports.src +++ b/trunk/ulp/dapl2/dat/udat/udat_exports.src @@ -50,4 +50,7 @@ dat_rsp_create dat_rsp_free dat_rsp_query dat_strerror +#ifdef DAT_EXTENSIONS +dat_extension_op +#endif diff --git a/trunk/ulp/dapl2/test/dapltest/SOURCES b/trunk/ulp/dapl2/test/dapltest/SOURCES index c986bc72..abe37922 100644 --- a/trunk/ulp/dapl2/test/dapltest/SOURCES +++ b/trunk/ulp/dapl2/test/dapltest/SOURCES @@ -1,4 +1,8 @@ +!if $(FREEBUILD) TARGETNAME=dapl2test +!else +TARGETNAME=dapl2testd +!endif TARGETPATH=..\..\..\..\bin\user\obj$(BUILD_ALT_DIR) TARGETTYPE=PROGRAM UMTYPE=console diff --git a/trunk/ulp/dapl2/test/dapltest/dapltest.rc b/trunk/ulp/dapl2/test/dapltest/dapltest.rc index c12cea30..f41ac8b0 100644 --- a/trunk/ulp/dapl2/test/dapltest/dapltest.rc +++ b/trunk/ulp/dapl2/test/dapltest/dapltest.rc @@ -37,11 +37,14 @@ #if DBG #define VER_FILEDESCRIPTION_STR "DAPL/DAT[2.0] test Application (Debug)" +#define VER_INTERNALNAME_STR "dapl2testd.exe" +#define VER_ORIGINALFILENAME_STR "dapl2testd.exe" + #else #define VER_FILEDESCRIPTION_STR "DAPL/DAT[2.0] test Application" -#endif - #define VER_INTERNALNAME_STR "dapl2test.exe" #define VER_ORIGINALFILENAME_STR "dapl2test.exe" +#endif + #include diff --git a/trunk/ulp/dapl2/test/dapltest/scripts/dt-cli.bat b/trunk/ulp/dapl2/test/dapltest/scripts/dt-cli.bat index ef219cfa..388ade1a 100644 --- a/trunk/ulp/dapl2/test/dapltest/scripts/dt-cli.bat +++ b/trunk/ulp/dapl2/test/dapltest/scripts/dt-cli.bat @@ -79,14 +79,14 @@ rem add '-d' for debug output. ) if "%T%" == "trans" ( - echo Transaction test - 2048 iterations, 1 thread, SR 4KB buffers - %DT% -T T -s %S% -D %D% -i 2048 -t 1 -w 1 client SR 4096 server SR 4096 + echo Transaction test - 8192 iterations, 1 thread, SR 4KB buffers + %DT% -T T -s %S% -D %D% -i 8192 -t 1 -w 1 client SR 4096 server SR 4096 exit /B ) if "%T%" == "transm" ( - echo Multiple RW, RR, SR transactions, 2048 iterations - %DT% -T T -P -t 1 -w 1 -i 2048 -s %S% -D %D% client RW 4096 1 server RW 2048 4 server RR 1024 2 client RR 2048 2 client SR 1024 3 -f server SR 256 3 -f + echo Multiple RW, RR, SR transactions, 4096 iterations + %DT% -T T -P -t 1 -w 1 -i 4096 -s %S% -D %D% client RW 4096 1 server RW 2048 4 server RR 1024 2 client RR 2048 2 client SR 1024 3 -f server SR 256 3 -f exit /B ) @@ -121,12 +121,12 @@ if "%T%" == "perf" ( ) if "%T%" == "rdma-read" ( - %DT% -T P -s %S% -D %D% -i 2048 RR 4096 2 + %DT% -T P -s %S% -D %D% -i 4096 RR 32768 4 exit /B ) if "%T%" == "rdma-write" ( - %DT% -T P -s %S% -D %D% -i 2048 RW 4096 2 + %DT% -T P -s %S% -D %D% -i 4096 RW 32768 4 exit /B ) @@ -149,22 +149,41 @@ if "%T%" == "latp" ( ) if "%T%" == "lim" ( - echo limit tests - %DT% -T L -s %S% -D %D% -w 8 -m 100 limit_ia limit_pz limit_evd limit_ep limit_psp limit_lmr limit_rpost + echo Resource limit tests + %DT% -T L -D %D% -w 8 -m 100 limit_ia + %DT% -T L -D %D% -w 8 -m 100 limit_pz + %DT% -T L -D %D% -w 8 -m 100 limit_evd + %DT% -T L -D %D% -w 8 -m 100 limit_ep + %DT% -T L -D %D% -w 8 -m 100 limit_psp + %DT% -T L -D %D% -w 8 -m 100 limit_lmr + %DT% -T L -D %D% -w 8 -m 15 limit_rpost exit /B ) if "%T%" == "regression" ( + if "%X%" == "" ( + if not "%3" == "" ( + set L=%3 + ) + ) else ( + if not "%4" == "" ( + set L=%4 + ) + ) + rem change % to ! - run cmd.exe /V:ON for loop count changes from cmd line echo %T% testing in %L% Loops REM rdma-write, read, perf FOR /L %%i IN (1,1,%L%) DO ( - %DT% -T P -s %S% -D %D% -i 2048 RW 4096 2 - %DT% -T P -s %S% -D %D% -i 2048 RR 4096 2 - %DT% -T P %DBG% -s %S% -D %D% -i 2048 RW 4096 2 - %DT% -T T -s %S% -D %D% -i 2048 -t 1 -w 1 client SR 4096 server SR 4096 - %DT% -T T -s %S% -D %D% -i 4096 -t 4 -w 1 client SR 8192 3 server SR 8192 3 + call %0 %1 trans + call %0 %1 perf + call %0 %1 threads + call %0 %1 transm + call %0 %1 transt call %0 %1 transme call %0 %1 transmet + call %0 %1 rdma-write + call %0 %1 rdma-read + call %0 %1 bw ) echo %T% tests completed: %L% loops. exit /B diff --git a/trunk/ulp/dapl2/test/dirs b/trunk/ulp/dapl2/test/dirs index 5c041791..06a51edf 100644 --- a/trunk/ulp/dapl2/test/dirs +++ b/trunk/ulp/dapl2/test/dirs @@ -1 +1 @@ -DIRS=dapltest dtest +DIRS=dapltest dtest dtestx diff --git a/trunk/ulp/dapl2/test/dtest/SOURCES b/trunk/ulp/dapl2/test/dtest/SOURCES index 126623c3..5901675a 100644 --- a/trunk/ulp/dapl2/test/dtest/SOURCES +++ b/trunk/ulp/dapl2/test/dtest/SOURCES @@ -1,4 +1,8 @@ +!if $(FREEBUILD) TARGETNAME=dtest2 +!else +TARGETNAME=dtest2d +!endif TARGETPATH=..\..\..\..\bin\user\obj$(BUILD_ALT_DIR) TARGETTYPE=PROGRAM UMTYPE=console diff --git a/trunk/ulp/dapl2/test/dtest/dtest.rc b/trunk/ulp/dapl2/test/dtest/dtest.rc index b2216339..4884f754 100644 --- a/trunk/ulp/dapl2/test/dtest/dtest.rc +++ b/trunk/ulp/dapl2/test/dtest/dtest.rc @@ -37,11 +37,12 @@ #if DBG #define VER_FILEDESCRIPTION_STR "Simple DAPL/DAT svr/cli test Application (Debug)" +#define VER_INTERNALNAME_STR "dtest2d.exe" +#define VER_ORIGINALFILENAME_STR "dtest2d.exe" #else #define VER_FILEDESCRIPTION_STR "Simple DAPL/DAT svr/cli test Application" +#define VER_INTERNALNAME_STR "dtest2.exe" +#define VER_ORIGINALFILENAME_STR "dtest2.exe" #endif -#define VER_INTERNALNAME_STR "dapl2test.exe" -#define VER_ORIGINALFILENAME_STR "dapl2test.exe" - #include -- 2.41.0