]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
dapltest: cleanup warnings, unused variables, etc
authorArlin Davis <arlin.r.davis@intel.com>
Tue, 5 Apr 2016 21:00:33 +0000 (14:00 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Tue, 5 Apr 2016 21:00:33 +0000 (14:00 -0700)
Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
14 files changed:
test/dapltest/cmd/dapl_performance_cmd.c
test/dapltest/cmd/dapl_quit_cmd.c
test/dapltest/cmd/dapl_server_cmd.c
test/dapltest/cmd/dapl_transaction_cmd.c
test/dapltest/include/dapl_fft_util.h
test/dapltest/include/dapl_proto.h
test/dapltest/mdep/linux/dapl_mdep_user.c
test/dapltest/mdep/linux/dapl_mdep_user.h
test/dapltest/test/dapl_bpool.c
test/dapltest/test/dapl_fft_mem.c
test/dapltest/test/dapl_fft_pz.c
test/dapltest/test/dapl_fft_util.c
test/dapltest/test/dapl_performance_client.c
test/dapltest/test/dapl_test_util.c

index de38abfbb905b677c391c82b527e6c1a317b5353..b6049afc291eae15c754677a0a058e6382691a97 100644 (file)
@@ -282,7 +282,7 @@ void DT_Performance_Cmd_Print(Performance_Cmd_t * cmd)
        DT_Mdep_printf("-------------------------------------\n");
        DT_Mdep_printf("PerfCmd.server_name              : %s\n",
                       cmd->server_name);
-       DT_Mdep_printf("PerfCmd.server_port_number       : %d\n",
+       DT_Mdep_printf("PerfCmd.server_port_number       : %lu\n",
                       cmd->port);
        DT_Mdep_printf("PerfCmd.dapl_name                : %s\n",
                       cmd->dapl_name);
index ba8e708f06993bdfeb2788edccd92383be4a1b58..8711a5c7d59481e4b7213278e52eb9da35a6eeac 100644 (file)
@@ -136,5 +136,5 @@ void DT_Quit_Cmd_Print(Quit_Cmd_t * cmd)
 {
        DT_Mdep_printf("Quit_Cmd.server_name: %s\n", cmd->server_name);
        DT_Mdep_printf("Quit_Cmd.device_name: %s\n", cmd->device_name);
-       DT_Mdep_printf("Quit_Cmd.port: %s\n", cmd->port);
+       DT_Mdep_printf("Quit_Cmd.port: %lu\n", cmd->port);
 }
index 219b8decf19b7dae6d9eef7264b3a9580b613a78..a7fdea512aef84ee22aa5896149eda516961219b 100644 (file)
@@ -117,5 +117,5 @@ void DT_Server_Cmd_Print(Server_Cmd_t * Server_Cmd)
 {
        DT_Mdep_printf("Server_Cmd.debug:       %d\n", Server_Cmd->debug);
        DT_Mdep_printf("Server_Cmd.dapl_name: %s\n", Server_Cmd->dapl_name);
-       DT_Mdep_printf("Server_Cmd.port:       %d\n", Server_Cmd->port);
+       DT_Mdep_printf("Server_Cmd.port:       %lu\n", Server_Cmd->port);
 }
index 80b493d81eb4560eff69956652af93084825ee5b..7f1800b5bb7d54ef848da3c8a9861979db775c49 100644 (file)
@@ -422,7 +422,7 @@ void DT_Transaction_Cmd_Print(Transaction_Cmd_t * cmd)
        DT_Mdep_printf("-------------------------------------\n");
        DT_Mdep_printf("TransCmd.server_name              : %s\n",
                       cmd->server_name);
-       DT_Mdep_printf("TransCmd.server_port_number       : %d\n",
+       DT_Mdep_printf("TransCmd.server_port_number       : %lu\n",
                       cmd->port);
        DT_Mdep_printf("TransCmd.num_iterations           : %d\n",
                       cmd->num_iterations);
index 17675cf4b5cfa4cc8a0a0875d9ccc39d4d4337e5..7b22e7e10ffef58cdbc4af8576cbd3c70735f748 100644 (file)
     else { \
        DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \
        DT_Tdep_PT_Printf(test_num,"Error = %d, %s\n", rc, DT_RetToString(rc)); \
-       res = 0; \
        goto cleanup; \
     }
 
 #define DT_assert(test_num, x)   if(x) ; \
     else { \
        DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \
-       res = 0; \
        goto cleanup; \
     }
 
index fb5a293befee15a7db29bae53855489d3d2fbe9e..0e1038c38c4a7339659c1d9f6760d2b6ffa5c31d 100644 (file)
@@ -123,6 +123,10 @@ void            DT_transaction_stats_set_ready (DT_Tdep_Print_Head* phead,
 void            DT_transaction_stats2_set_ready (DT_Tdep_Print_Head* phead, 
                                        Transaction_Stats_t* transaction_stats);
 
+void           DT_transaction_stats_reset_wait_count(DT_Tdep_Print_Head * phead,
+                                       Transaction_Stats_t * transaction_stats,
+                                       unsigned int num);
+
 bool            DT_transaction_stats_wait_for_all (DT_Tdep_Print_Head* phead,
                                        Transaction_Stats_t* transaction_stats);
 
index d2b45bd84ffc57c4a0327d3df5acfe095db550a3..9dd40e3b9e7c847d3664c10ebd03e60db7765bbe 100644 (file)
@@ -433,11 +433,9 @@ int DT_Mdep_wait_object_init(IN DT_WAIT_OBJECT * wait_obj)
 
 int DT_Mdep_wait_object_wait(IN DT_WAIT_OBJECT * wait_obj, IN int timeout_val)
 {
-       int dat_status;
        int pthread_status;
        struct timespec future;
 
-       dat_status = 0;
        pthread_status = 0;
 
        if (timeout_val != DAT_TIMEOUT_INFINITE) {
index 772f2dd22bf970aaeeaeea1ff66c41a972a667e5..2eeed9119adc3df3ade207ef77ba2f5b6cf8e8da 100755 (executable)
@@ -203,6 +203,6 @@ do { \
 /*
  * Release processor to reschedule
  */
-#define DT_Mdep_yield pthread_yield
+#define DT_Mdep_yield sched_yield
 
 #endif
index e06f2fc2a56db8436d0240e0e484214dc20b2505..9ee32f7a3e257cf1aa0d2dd7e625740590683739 100644 (file)
@@ -246,17 +246,8 @@ DT_Bpool_Destroy(Per_Test_Data_t * pt_ptr,
        if (bpool_ptr) {
                if (bpool_ptr->alloc_ptr) {
                        if (bpool_ptr->rmr_handle) {
-                               DAT_LMR_TRIPLET iov;
-                               DAT_RMR_COOKIE cookie;
                                DAT_RETURN ret;
 
-                               iov.virtual_address = bpool_ptr->reg_addr;
-                               iov.segment_length = 0; /* un-bind */
-                               iov.lmr_context = bpool_ptr->lmr_context;
-                               cookie.as_64 = (DAT_UINT64) 0UL;
-                               cookie.as_ptr =
-                                   (DAT_PVOID) (uintptr_t) bpool_ptr->reg_addr;
-
                                /*
                                 * Do not attempt to unbind here. The remote node
                                 * is going through the same logic and may disconnect
index 4a89d4e2d38d4b2688c22669440261d56d863475..dda9545fc8c3d4081bfacc17fa8ab00d9faf45d5 100644 (file)
@@ -47,7 +47,6 @@ int DT_mem_generic(Params_t * params_ptr, FFT_Cmd_t * cmd, int flag)
        int res;
        DAT_VLEN buffer_size;
        DAT_IA_HANDLE ia_handle;
-       DAT_PZ_HANDLE pz_handle;
        DT_Tdep_Print_Head *phead;
        phead = params_ptr->phead;
        rc = 0;
@@ -58,7 +57,6 @@ int DT_mem_generic(Params_t * params_ptr, FFT_Cmd_t * cmd, int flag)
        reg_addr = 0;
        alloc_ptr = 0;
        ia_handle = 0;
-       pz_handle = 0;
 
        DT_fft_init_client(params_ptr, cmd, &conn);
        DT_assert(phead, NULL != conn.ia_handle);
@@ -78,10 +76,6 @@ int DT_mem_generic(Params_t * params_ptr, FFT_Cmd_t * cmd, int flag)
 
        ia_handle = conn.ia_handle;
 
-       if (flag != 3) {
-               pz_handle = conn.pz_handle;
-       }
-
        if (flag != 4) {
                DT_Tdep_PT_Printf(phead, "Registering memory\n");
                rc = DT_Tdep_lmr_create(ia_handle, DAT_MEM_TYPE_VIRTUAL, region, buffer_size, conn.pz_handle, DAT_MEM_PRIV_ALL_FLAG, &lmr_handle, &lmr_context, NULL,   /* FIXME */
index 77f818b99f8c4f589930756c157b3fd72984ccca..8faa35951f0dae991c2e30a620e6ad463e7df951 100644 (file)
@@ -39,7 +39,6 @@ int DT_pz_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
        char *dev_name;
        DAT_IA_HANDLE ia_handle;
        DAT_PZ_HANDLE pz_handle;
-       DAT_EVD_HANDLE evd_handle;
        DAT_RETURN rc;
        int res;
        DT_Tdep_Print_Head *phead;
@@ -51,7 +50,6 @@ int DT_pz_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
        res = 1;
        ia_handle = 0;
        pz_handle = 0;
-       evd_handle = DAT_HANDLE_NULL;
        dev_name = cmd->device_name;
 
        rc = DT_ia_open(dev_name, &ia_handle);
index 5afd9fb058773edce05da4957965d7f3a6f02382..e89e5cbce09ac4d915d1a0fd3a69f9354e0d2d3f 100644 (file)
@@ -144,7 +144,6 @@ void DT_fft_init_conn_struct(FFT_Connection_t * conn)
 void DT_fft_init_client(Params_t * params_ptr, FFT_Cmd_t * cmd,
                        FFT_Connection_t * conn)
 {
-       int res;
        DAT_RETURN rc = 0;
        DT_Tdep_Print_Head *phead;
        phead = params_ptr->phead;
@@ -248,7 +247,6 @@ int DT_fft_destroy_conn_struct(Params_t * params_ptr, FFT_Connection_t * conn)
 void DT_fft_init_server(Params_t * params_ptr, FFT_Cmd_t * cmd,
                        FFT_Connection_t * conn)
 {
-       int res;
        DAT_RETURN rc = 0;
        DT_Tdep_Print_Head *phead;
        phead = params_ptr->phead;
@@ -290,7 +288,6 @@ void DT_fft_init_server(Params_t * params_ptr, FFT_Cmd_t * cmd,
 /* helper function that allows a server to listen for a connection */
 void DT_fft_listen(Params_t * params_ptr, FFT_Connection_t * conn)
 {
-       int res;
        DAT_RETURN rc = 0;
        DT_Tdep_Print_Head *phead;
        phead = params_ptr->phead;
@@ -320,7 +317,6 @@ void DT_fft_listen(Params_t * params_ptr, FFT_Connection_t * conn)
 int DT_fft_connect(Params_t * params_ptr, FFT_Connection_t * conn)
 {
        int wait_count;
-       int res;
        DAT_RETURN rc = 0;
        DT_Tdep_Print_Head *phead;
        phead = params_ptr->phead;
index 169a2127d4c98db0a99fce6e1ec93aaa12a45022..62fcce12fb3e51591d0fffae70e9091217e08ded 100644 (file)
@@ -42,7 +42,6 @@ DT_Performance_Test_Client(Params_t * params_ptr,
        Performance_Test_t *test_ptr = NULL;
        int connected = 1;
        DT_Tdep_Print_Head *phead;
-       DAT_RETURN rc;
 
        phead = pt_ptr->Params.phead;
 
@@ -275,7 +274,6 @@ DT_Performance_Test_Client_Phase2(DT_Tdep_Print_Head * phead,
        Performance_Test_Op_t *op;
        DT_Mdep_TimeStamp pre_ts;
        DT_Mdep_TimeStamp post_ts;
-       unsigned long int bytes;
        unsigned int i;
 
        /*
@@ -286,8 +284,6 @@ DT_Performance_Test_Client_Phase2(DT_Tdep_Print_Head * phead,
        op = &ep_context->op;
        iov = DT_Bpool_GetIOV(op->bp, 0);
 
-       bytes = op->seg_size * op->num_segs;
-
        /* Prep the inputs */
        for (i = 0; i < op->num_segs; i++) {
                iov[i].virtual_address = (DAT_VADDR) (uintptr_t)
index f649b2828f32cb67fb9c2c3b0796c85bf5b39972..89b60b6f2dce25ef8b6aa51e84497a435824d195 100644 (file)
@@ -239,10 +239,6 @@ DT_cr_event_wait(DT_Tdep_Print_Head * phead,
                 DAT_EVD_HANDLE evd_handle,
                 DAT_CR_ARRIVAL_EVENT_DATA * cr_stat_p)
 {
-       int err_cnt;
-
-       err_cnt = 0;
-
        for (;;) {
                DAT_RETURN ret;
                DAT_EVENT event;
@@ -415,7 +411,7 @@ DT_dto_event_poll(DT_Tdep_Print_Head * phead,
                  DAT_EVD_HANDLE evd_handle,
                  DAT_DTO_COMPLETION_EVENT_DATA * dto_statusp)
 {
-       for (;;DT_Mdep_yield()) {
+       do {
                DAT_RETURN ret;
                DAT_EVENT event;
 
@@ -450,7 +446,8 @@ DT_dto_event_poll(DT_Tdep_Print_Head * phead,
                DT_Tdep_PT_Printf(phead,
                                  "Warning: dto_event_poll swallowing %s event\n",
                                  DT_EventToSTr(event.event_number));
-       }
+
+       } while (!DT_Mdep_yield());
 
        return (false);
 }