[ofa-general] [PATCH 1/5] [v2.0] dtest/dapltest: fix compiler warnings
Arlin Davis
arlin.r.davis at intel.com
Mon Sep 1 19:33:25 PDT 2008
Patch set for DAPL v2.0 to cleanup compiler warnings and fix fedora build issues.
Signed-off by: Arlin Davis ardavis at ichips.intel.com
---
test/dapltest/Makefile.am | 4 +-
test/dapltest/cmd/dapl_netaddr.c | 2 +-
test/dapltest/test/dapl_limit.c | 125 ++++++++++++++++++--------------------
test/dtest/Makefile.am | 4 +-
test/dtest/dtest.c | 35 +++++------
test/dtest/dtestx.c | 20 +++---
6 files changed, 90 insertions(+), 100 deletions(-)
diff --git a/test/dapltest/Makefile.am b/test/dapltest/Makefile.am
index 18660c8..fe69d71 100755
--- a/test/dapltest/Makefile.am
+++ b/test/dapltest/Makefile.am
@@ -4,7 +4,9 @@ else
XFLAGS =
endif
-dapltest_CFLAGS = $(XFLAGS)
+AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+
+dapltest_CFLAGS = $(AM_FLAGS) $(XFLAGS)
INCLUDES = -I include \
-I mdep/linux \
diff --git a/test/dapltest/cmd/dapl_netaddr.c b/test/dapltest/cmd/dapl_netaddr.c
index a306335..e1600d5 100644
--- a/test/dapltest/cmd/dapl_netaddr.c
+++ b/test/dapltest/cmd/dapl_netaddr.c
@@ -90,7 +90,7 @@ DT_NetAddrLookupHostAddress (DAT_IA_ADDRESS_PTR to_netaddr,
whatzit = "service unavailable";
break;
}
-#if !defined(WIN32)
+#if !defined(WIN32) && defined(__USE_GNU)
case EAI_ADDRFAMILY:
{
whatzit = "node has no address in this family";
diff --git a/test/dapltest/test/dapl_limit.c b/test/dapltest/test/dapl_limit.c
index adf1139..133b3e0 100644
--- a/test/dapltest/test/dapl_limit.c
+++ b/test/dapltest/test/dapl_limit.c
@@ -36,13 +36,13 @@
static bool
more_handles (DT_Tdep_Print_Head *phead,
- DAT_HANDLE **old_ptrptr, /* pointer to current pointer */
+ void **old_ptrptr, /* pointer to current pointer */
unsigned int *old_count, /* number pointed to */
unsigned int size) /* size of one datum */
{
unsigned int count = *old_count;
- DAT_HANDLE *old_handles = *old_ptrptr;
- DAT_HANDLE *handle_tmp = DT_Mdep_Malloc (count * 2 * size);
+ void *old_handles = *old_ptrptr;
+ void *handle_tmp = DT_Mdep_Malloc (count * 2 * size);
if (!handle_tmp)
{
@@ -171,9 +171,9 @@ limit_test ( DT_Tdep_Print_Head *phead,
DAT_EVD_HANDLE ia_async_handle;
}
OneOpen;
- unsigned int count = START_COUNT;
- OneOpen *hdlptr = (OneOpen *)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc (count * sizeof(OneOpen));
+ OneOpen *hdlptr = (OneOpen *)hptr;
/* IA Exhaustion test loop */
if (hdlptr)
@@ -186,14 +186,13 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- sizeof (*hdlptr)))
+ && !more_handles (phead, &hptr, &count, sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: IAs opened: %d\n", module, w);
retval = true;
break;
}
+ hdlptr = (OneOpen *)hptr;
/* Specify that we want to get back an async EVD. */
hdlptr[w].ia_async_handle = DAT_HANDLE_NULL;
ret = dat_ia_open (cmd->device_name,
@@ -270,9 +269,9 @@ limit_test ( DT_Tdep_Print_Head *phead,
/*
* See how many PZs we can create
*/
- unsigned int count = START_COUNT;
- DAT_PZ_HANDLE *hdlptr = (DAT_PZ_HANDLE *)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc (count * sizeof(DAT_PZ_HANDLE));
+ DAT_PZ_HANDLE *hdlptr = (DAT_PZ_HANDLE *)hptr;
/* PZ Exhaustion test loop */
if (hdlptr)
@@ -287,14 +286,13 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- sizeof (*hdlptr)))
+ && !more_handles(phead, &hptr, &count, sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: PZs created: %d\n", module, w);
retval = true;
break;
}
+ hdlptr = (DAT_PZ_HANDLE *)hptr;
ret = dat_pz_create (hdl_sets[w % cmd->width].ia_handle,
&hdlptr[w]);
if (ret != DAT_SUCCESS)
@@ -368,10 +366,10 @@ limit_test ( DT_Tdep_Print_Head *phead,
/*
* See how many CNOs we can create
*/
- unsigned int count = START_COUNT;
- DAT_CNO_HANDLE *hdlptr = (DAT_CNO_HANDLE *)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
-
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc (count * sizeof(DAT_CNO_HANDLE));
+ DAT_CNO_HANDLE *hdlptr = (DAT_CNO_HANDLE *)hptr;
+
/* CNO Exhaustion test loop */
if (hdlptr)
{
@@ -385,14 +383,13 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- sizeof (*hdlptr)))
+ && !more_handles(phead, &hptr, &count, sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: CNOs created: %d\n", module, w);
retval = true;
break;
}
+ hdlptr = (DAT_CNO_HANDLE *)hptr;
ret = dat_cno_create (hdl_sets[w % cmd->width].ia_handle,
DAT_OS_WAIT_PROXY_AGENT_NULL,
&hdlptr[w]);
@@ -489,9 +486,10 @@ limit_test ( DT_Tdep_Print_Head *phead,
/*
* See how many EVDs we can create
*/
- unsigned int count = START_COUNT;
- DAT_EVD_HANDLE *hdlptr = (DAT_EVD_HANDLE *)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc(count * sizeof(DAT_EVD_HANDLE));
+ DAT_EVD_HANDLE *hdlptr = (DAT_EVD_HANDLE *)hptr;
+
DAT_EVD_FLAGS flags = ( DAT_EVD_DTO_FLAG
| DAT_EVD_RMR_BIND_FLAG
| DAT_EVD_CR_FLAG);
@@ -524,14 +522,13 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- sizeof (*hdlptr)))
+ && !more_handles(phead, &hptr, &count, sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: EVDs created: %d\n", module, w);
retval = true;
break;
}
+ hdlptr = (DAT_EVD_HANDLE *)hptr;
ret = DT_Tdep_evd_create (hdl_sets[w % cmd->width].ia_handle,
DFLT_QLEN,
hdl_sets[w % cmd->width].cno_handle,
@@ -608,9 +605,9 @@ limit_test ( DT_Tdep_Print_Head *phead,
/*
* See how many EPs we can create
*/
- unsigned int count = START_COUNT;
- DAT_EP_HANDLE *hdlptr = (DAT_EP_HANDLE *)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc(count * sizeof(DAT_EP_HANDLE));
+ DAT_EP_HANDLE *hdlptr = (DAT_EP_HANDLE *)hptr;
/* EP Exhaustion test loop */
if (hdlptr)
@@ -623,14 +620,13 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- sizeof (*hdlptr)))
+ && !more_handles(phead, &hptr, &count, sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: EPs created: %d\n", module, w);
retval = true;
break;
}
+ hdlptr = (DAT_EP_HANDLE *)hptr;
ret = dat_ep_create (hdl_sets[w % cmd->width].ia_handle,
hdl_sets[w % cmd->width].pz_handle,
hdl_sets[w % cmd->width].evd_handle,
@@ -679,11 +675,11 @@ limit_test ( DT_Tdep_Print_Head *phead,
/*
* See how many RSPs we can create
*/
- unsigned int count = START_COUNT;
- DAT_RSP_HANDLE *hdlptr = (DAT_RSP_HANDLE *)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
- DAT_EP_HANDLE *epptr = (DAT_EP_HANDLE *)
- DT_Mdep_Malloc (count * sizeof (*epptr));
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc(count * sizeof (DAT_RSP_HANDLE));
+ DAT_RSP_HANDLE *hdlptr = (DAT_RSP_HANDLE *)hptr;
+ void *eptr = DT_Mdep_Malloc(count * sizeof (DAT_EP_HANDLE));
+ DAT_EP_HANDLE *epptr = (DAT_EP_HANDLE *)eptr;
/* RSP Exhaustion test loop */
if (hdlptr)
@@ -700,23 +696,21 @@ limit_test ( DT_Tdep_Print_Head *phead,
unsigned int count1 = count;
unsigned int count2 = count;
- if (!more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count1,
- sizeof (*hdlptr)))
+ if (!more_handles(phead, &hptr, &count1, sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: RSPs created: %d\n", module, w);
retval = true;
break;
}
- if (!more_handles (phead, (DAT_HANDLE **) &epptr,
- &count2,
- sizeof (*epptr)))
+ hdlptr = (DAT_RSP_HANDLE *)hptr;
+
+ if (!more_handles (phead, &eptr, &count2, sizeof(*epptr)))
{
DT_Tdep_PT_Printf (phead, "%s: RSPs created: %d\n", module, w);
retval = true;
break;
}
-
+ epptr = (DAT_EP_HANDLE *)eptr;
if (count1 != count2)
{
DT_Tdep_PT_Printf (phead, "%s: Mismatch in allocation of handle arrays at
point %d\n",
@@ -815,9 +809,9 @@ limit_test ( DT_Tdep_Print_Head *phead,
/*
* See how many PSPs we can create
*/
- unsigned int count = START_COUNT;
- DAT_PSP_HANDLE *hdlptr = (DAT_PSP_HANDLE *)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc (count * sizeof (DAT_PSP_HANDLE));
+ DAT_PSP_HANDLE *hdlptr = (DAT_PSP_HANDLE *)hptr;
/* PSP Exhaustion test loop */
if (hdlptr)
@@ -830,14 +824,13 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- sizeof (*hdlptr)))
+ && !more_handles (phead, &hptr, &count, sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: PSPs created: %d\n", module, w);
retval = true;
break;
}
+ hdlptr = (DAT_PSP_HANDLE *)hptr;
ret = dat_psp_create (hdl_sets[w % cmd->width].ia_handle,
CONN_QUAL0 + w,
hdl_sets[w % cmd->width].evd_handle,
@@ -941,10 +934,10 @@ limit_test ( DT_Tdep_Print_Head *phead,
/*
* See how many LMRs we can create
*/
- unsigned int count = START_COUNT;
- Bpool **hdlptr = (Bpool **)
- DT_Mdep_Malloc (count * sizeof (*hdlptr));
-
+ unsigned int count = START_COUNT;
+ void *hptr = DT_Mdep_Malloc (count * sizeof(Bpool*));
+ Bpool **hdlptr = (Bpool **)hptr;
+
/* LMR Exhaustion test loop */
if (hdlptr)
{
@@ -956,9 +949,7 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- sizeof (*hdlptr)))
+ && !more_handles (phead, &hptr, &count, sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: no memory for LMR handles\n",
module);
@@ -966,6 +957,7 @@ limit_test ( DT_Tdep_Print_Head *phead,
retval = true;
break;
}
+ hdlptr = (Bpool **)hptr;
/*
* Let BpoolAlloc do the hard work; this means that
* we're testing unique memory registrations rather
@@ -1017,14 +1009,15 @@ limit_test ( DT_Tdep_Print_Head *phead,
* We are posting the same buffer 'cnt' times, deliberately,
* but that should be OK.
*/
- unsigned int count = START_COUNT;
- DAT_LMR_TRIPLET *hdlptr = (DAT_LMR_TRIPLET *)
- DT_Mdep_Malloc (count * cmd->width * sizeof (*hdlptr));
+ unsigned int count = START_COUNT;
+ void *hptr =
+ DT_Mdep_Malloc(count * cmd->width * sizeof(DAT_LMR_TRIPLET));
+ DAT_LMR_TRIPLET *hdlptr = (DAT_LMR_TRIPLET *)hptr;
/* Recv-Post Exhaustion test loop */
if (hdlptr)
{
- unsigned int w = 0;
+ unsigned int w = 0;
unsigned int i = 0;
unsigned int done = 0;
@@ -1033,9 +1026,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
- &count,
- cmd->width * sizeof (*hdlptr)))
+ && !more_handles (phead, &hptr, &count,
+ cmd->width * sizeof(*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: no memory for IOVs \n",
module);
@@ -1047,6 +1039,7 @@ limit_test ( DT_Tdep_Print_Head *phead,
done = retval = true;
break;
}
+ hdlptr = (DAT_LMR_TRIPLET *)hptr;
for (i = 0; i < cmd->width; i++)
{
DAT_LMR_TRIPLET *iovp = &hdlptr[w * cmd->width + i];
diff --git a/test/dtest/Makefile.am b/test/dtest/Makefile.am
index aabd026..90c9d95 100755
--- a/test/dtest/Makefile.am
+++ b/test/dtest/Makefile.am
@@ -1,11 +1,11 @@
bin_PROGRAMS = dtest
dtest_SOURCES = dtest.c
+dtest_CFLAGS = -g -Wall -D_GNU_SOURCE
if EXT_TYPE_IB
bin_PROGRAMS += dtestx
dtestx_SOURCES = dtestx.c
-dtest_CFLAGS = -DDAT_EXTENSIONS
-dtestx_CFLAGS = -DDAT_EXTENSIONS
+dtestx_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAT_EXTENSIONS
dtestx_LDADD = $(srcdir)/../../dat/udat/libdat2.la
endif
diff --git a/test/dtest/dtest.c b/test/dtest/dtest.c
index 095ff40..00d14e3 100755
--- a/test/dtest/dtest.c
+++ b/test/dtest/dtest.c
@@ -207,7 +207,6 @@ struct dt_time {
struct dt_time time;
/* defaults */
-static int parent=1;
static int failed=0;
static int performance_times=0;
static int connected=0;
@@ -218,17 +217,13 @@ static int polling=0;
static int poll_count=0;
static int rdma_wr_poll_count=0;
static int rdma_rd_poll_count[MAX_RDMA_RD]={0};
-static int pin_memory=0;
static int delay=0;
static int buf_len=RDMA_BUFFER_SIZE;
static int use_cno=0;
-static int post_recv_count=MSG_BUF_COUNT;
static int recv_msg_index=0;
static int burst_msg_posted=0;
static int burst_msg_index=0;
-static int child[MAX_PROCS+1];
-
/* forward prototypes */
const char * DT_RetToString (DAT_RETURN ret_value);
const char * DT_EventToSTr (DAT_EVENT_NUMBER event_code);
@@ -254,6 +249,7 @@ DAT_RETURN do_ping_pong_msg( void );
#define LOGPRINTF if (verbose) printf
+int
main(int argc, char **argv)
{
int i,c;
@@ -446,7 +442,7 @@ main(int argc, char **argv)
inet_ntop(AF_INET,
&((struct sockaddr_in *)ep_param.local_ia_address_ptr)->sin_addr,
addr_str, sizeof(addr_str));
- printf("\n%d Query EP: LOCAL addr %s port %lld\n", getpid(),
+ printf("\n%d Query EP: LOCAL addr %s port "F64x"\n", getpid(),
addr_str, (ep_param.local_port_qual));
#endif
#if defined(_WIN32)
@@ -458,7 +454,7 @@ main(int argc, char **argv)
inet_ntop(AF_INET,
&((struct sockaddr_in *)ep_param.remote_ia_address_ptr)->sin_addr,
addr_str, sizeof(addr_str));
- printf("%d Query EP: REMOTE addr %s port %lld\n", getpid(),
+ printf("%d Query EP: REMOTE addr %s port "F64x"\n", getpid(),
addr_str, (ep_param.remote_port_qual));
#endif
fflush(stdout);
@@ -615,6 +611,7 @@ complete:
#if defined(_WIN32) || defined(_WIN64)
WSACleanup();
#endif
+ return(0);
}
#if defined(_WIN32) || defined(_WIN64)
@@ -750,7 +747,7 @@ connect_ep( char *hostname, DAT_CONN_QUAL conn_id )
/* Register send message buffer */
LOGPRINTF("%d Registering send Message Buffer %p, len %d\n",
- getpid(), &rmr_send_msg, sizeof(DAT_RMR_TRIPLET) );
+ getpid(), &rmr_send_msg, (int)sizeof(DAT_RMR_TRIPLET) );
region.for_va = &rmr_send_msg;
ret = dat_lmr_create( h_ia,
DAT_MEM_TYPE_VIRTUAL,
@@ -848,8 +845,8 @@ connect_ep( char *hostname, DAT_CONN_QUAL conn_id )
else
LOGPRINTF("%d dat_psp_created for server listen\n", getpid());
- printf("%d Server waiting for connect request on port %lld\n",
- getpid(),conn_id);
+ printf("%d Server waiting for connect request on port "F64x"\n",
+ getpid(), conn_id);
ret = dat_evd_wait( h_cr_evd, SERVER_TIMEOUT, 1, &event, &nmore );
if(ret != DAT_SUCCESS) {
@@ -936,7 +933,7 @@ connect_ep( char *hostname, DAT_CONN_QUAL conn_id )
rval = ((struct sockaddr_in *)target->ai_addr)->sin_addr.s_addr;
#endif
printf ("%d Server Name: %s \n", getpid(), hostname);
- printf ("%d Server Net Address: %d.%d.%d.%d port %lld\n", getpid(),
+ printf ("%d Server Net Address: %d.%d.%d.%d port "F64x"\n", getpid(),
(rval >> 0) & 0xff, (rval >> 8) & 0xff,
(rval >> 16) & 0xff, (rval >> 24) & 0xff, conn_id);
@@ -1099,8 +1096,8 @@ connect_ep( char *hostname, DAT_CONN_QUAL conn_id )
recv_msg_index) ) {
fprintf(stderr,"ERR recv event: len=%d cookie="F64x" expected %d/%d\n",
(int)event.event_data.dto_completion_event_data.transfered_length,
- (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
- sizeof(DAT_RMR_TRIPLET), recv_msg_index );
+ event.event_data.dto_completion_event_data.user_cookie.as_64,
+ (int)sizeof(DAT_RMR_TRIPLET), recv_msg_index );
return( DAT_ABORT );
}
@@ -1322,8 +1319,8 @@ do_rdma_write_with_msg( void )
(event.event_data.dto_completion_event_data.user_cookie.as_64 != recv_msg_index) ) {
fprintf(stderr,"unexpected event data for receive: len=%d cookie="F64x" exp %d/%d\n",
(int)event.event_data.dto_completion_event_data.transfered_length,
- (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
- sizeof(DAT_RMR_TRIPLET), recv_msg_index );
+ event.event_data.dto_completion_event_data.user_cookie.as_64,
+ (int)sizeof(DAT_RMR_TRIPLET), recv_msg_index );
return( DAT_ABORT );
}
@@ -1515,8 +1512,8 @@ do_rdma_read_with_msg( void )
fprintf(stderr,"unexpected event data for receive: len=%d cookie="F64x" exp %d/%d\n",
(int)event.event_data.dto_completion_event_data.transfered_length,
- (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
- sizeof(DAT_RMR_TRIPLET), recv_msg_index );
+ event.event_data.dto_completion_event_data.user_cookie.as_64,
+ (int)sizeof(DAT_RMR_TRIPLET), recv_msg_index );
return( DAT_ABORT );
}
@@ -1678,8 +1675,8 @@ do_ping_pong_msg( )
!= burst_msg_index) ) {
fprintf(stderr,"ERR: recv event: len=%d cookie="F64x" exp %d/%d\n",
(int)event.event_data.dto_completion_event_data.transfered_length,
- (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
- buf_len, burst_msg_index );
+ event.event_data.dto_completion_event_data.user_cookie.as_64,
+ (int)buf_len, (int)burst_msg_index );
return( DAT_ABORT );
}
diff --git a/test/dtest/dtestx.c b/test/dtest/dtestx.c
index e568aac..fb89364 100755
--- a/test/dtest/dtestx.c
+++ b/test/dtest/dtestx.c
@@ -439,7 +439,7 @@ connect_ep(char *hostname)
r_iov->virtual_address = hton64((DAT_VADDR)buf[RCV_RDMA_BUF_INDEX]);
r_iov->segment_length = hton32(buf_size);
- printf("%d Send RMR msg to remote: r_key_ctx=0x%x,va=%p,len=0x%x\n",
+ printf("%d Send RMR msg to remote: r_key_ctx=0x%x,va="F64x",len=0x%x\n",
getpid(), hton32(r_iov->rmr_context),
hton64(r_iov->virtual_address), hton32(r_iov->segment_length));
@@ -545,16 +545,14 @@ disconnect_ep(void)
int
do_immediate()
{
- DAT_REGION_DESCRIPTION region;
DAT_EVENT event;
DAT_COUNT nmore;
DAT_LMR_TRIPLET iov;
DAT_RMR_TRIPLET r_iov;
DAT_DTO_COOKIE cookie;
- DAT_RMR_CONTEXT their_context;
DAT_RETURN status;
DAT_UINT32 immed_data;
- DAT_UINT32 immed_data_recv;
+ DAT_UINT32 immed_data_recv = 0;
DAT_DTO_COMPLETION_EVENT_DATA *dto_event =
&event.event_data.dto_completion_event_data;
DAT_IB_EXTENSION_EVENT_DATA *ext_event =
@@ -620,10 +618,10 @@ do_immediate()
(dto_event->user_cookie.as_64 != RECV_BUF_INDEX+1))
{
printf("unexpected event data of immediate write: len=%d "
- "cookie=%d expected %d/%d\n",
+ "cookie="F64x" expected %d/%d\n",
(int)dto_event->transfered_length,
- (int)dto_event->user_cookie.as_64,
- sizeof(int), RECV_BUF_INDEX+1);
+ dto_event->user_cookie.as_64,
+ (int)sizeof(int), RECV_BUF_INDEX+1);
exit(1);
}
@@ -669,10 +667,10 @@ do_immediate()
(dto_event->user_cookie.as_64 != RECV_BUF_INDEX+1))
{
printf("unexpected event data of immediate write: len=%d "
- "cookie=%d expected %d/%d\n",
+ "cookie="F64x" expected %d/%d\n",
(int)dto_event->transfered_length,
- (int)dto_event->user_cookie.as_64,
- sizeof(int), RECV_BUF_INDEX+1);
+ dto_event->user_cookie.as_64,
+ (int)sizeof(int), RECV_BUF_INDEX+1);
exit(1);
}
@@ -705,7 +703,7 @@ do_immediate()
printf("Client received immed_data=0x%x\n",immed_data_recv);
printf("rdma buffer %p contains: %s\n",
- buf[ RCV_RDMA_BUF_INDEX ], buf[ RCV_RDMA_BUF_INDEX ]);
+ buf[RCV_RDMA_BUF_INDEX], (char*)buf[RCV_RDMA_BUF_INDEX]);
printf("\n RDMA_WRITE_WITH_IMMEDIATE_DATA test - PASSED\n");
return (0);
--
1.5.2.5
More information about the general
mailing list