| 1 |
/* |
| 2 |
* Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. |
| 3 |
* |
| 4 |
* This Software is licensed under one of the following licenses: |
| 5 |
* |
| 6 |
* 1) under the terms of the "Common Public License 1.0" a copy of which is |
| 7 |
* in the file LICENSE.txt in the root directory. The license is also |
| 8 |
* available from the Open Source Initiative, see |
| 9 |
* http://www.opensource.org/licenses/cpl.php. |
| 10 |
* |
| 11 |
* 2) under the terms of the "The BSD License" a copy of which is in the file |
| 12 |
* LICENSE2.txt in the root directory. The license is also available from |
| 13 |
* the Open Source Initiative, see |
| 14 |
* http://www.opensource.org/licenses/bsd-license.php. |
| 15 |
* |
| 16 |
* 3) under the terms of the "GNU General Public License (GPL) Version 2" a |
| 17 |
* copy of which is in the file LICENSE3.txt in the root directory. The |
| 18 |
* license is also available from the Open Source Initiative, see |
| 19 |
* http://www.opensource.org/licenses/gpl-license.php. |
| 20 |
* |
| 21 |
* Licensee has the right to choose one of the above licenses. |
| 22 |
* |
| 23 |
* Redistributions of source code must retain the above copyright |
| 24 |
* notice and one of the license notices. |
| 25 |
* |
| 26 |
* Redistributions in binary form must reproduce both the above copyright |
| 27 |
* notice, one of the license notices in the documentation |
| 28 |
* and/or other materials provided with the distribution. |
| 29 |
*/ |
| 30 |
|
| 31 |
#ifndef __DAPL_PROTO_H__ |
| 32 |
#define __DAPL_PROTO_H__ |
| 33 |
|
| 34 |
#ifdef __KERNEL__ |
| 35 |
#include <dat2/kdat.h> |
| 36 |
#else |
| 37 |
#include <dat2/udat.h> |
| 38 |
|
| 39 |
#include <ctype.h> |
| 40 |
#include <stdlib.h> |
| 41 |
#include <stdarg.h> |
| 42 |
#include <string.h> |
| 43 |
#endif |
| 44 |
|
| 45 |
#include "dapl_mdep.h" |
| 46 |
#include "dapl_tdep_print.h" |
| 47 |
#include "dapl_bpool.h" |
| 48 |
#include "dapl_client_info.h" |
| 49 |
#include "dapl_common.h" |
| 50 |
#include "dapl_client_info.h" |
| 51 |
#include "dapl_execute.h" |
| 52 |
#include "dapl_getopt.h" |
| 53 |
#include "dapl_global.h" |
| 54 |
#include "dapl_fft_cmd.h" |
| 55 |
#include "dapl_fft_util.h" |
| 56 |
#include "dapl_limit_cmd.h" |
| 57 |
#include "dapl_memlist.h" |
| 58 |
#include "dapl_params.h" |
| 59 |
#include "dapl_performance_stats.h" |
| 60 |
#include "dapl_performance_test.h" |
| 61 |
#include "dapl_quit_cmd.h" |
| 62 |
#include "dapl_server_info.h" |
| 63 |
#include "dapl_tdep.h" |
| 64 |
#include "dapl_test_data.h" |
| 65 |
#include "dapl_transaction_cmd.h" |
| 66 |
#include "dapl_transaction_test.h" |
| 67 |
#include "dapl_transaction_stats.h" |
| 68 |
#include "dapl_version.h" |
| 69 |
|
| 70 |
#define DAT_ERROR(Type,SubType) ((DAT_RETURN)(DAT_CLASS_ERROR | Type | SubType)) |
| 71 |
|
| 72 |
/* |
| 73 |
* Prototypes |
| 74 |
*/ |
| 75 |
|
| 76 |
/* dapl_bpool.c */ |
| 77 |
Bpool * DT_BpoolAlloc (Per_Test_Data_t * pt_ptr, |
| 78 |
DT_Tdep_Print_Head* phead, |
| 79 |
DAT_IA_HANDLE ia_handle, |
| 80 |
DAT_PZ_HANDLE pz_handle, |
| 81 |
DAT_EP_HANDLE ep_handle, |
| 82 |
DAT_EVD_HANDLE rmr_evd_handle, |
| 83 |
DAT_COUNT seg_size, |
| 84 |
DAT_COUNT num_segs, |
| 85 |
DAT_COUNT alignment, |
| 86 |
DAT_BOOLEAN enable_rdma_write, |
| 87 |
DAT_BOOLEAN enable_rdma_read); |
| 88 |
|
| 89 |
bool DT_Bpool_Destroy (Per_Test_Data_t * pt_ptr, |
| 90 |
DT_Tdep_Print_Head *phead, |
| 91 |
Bpool * bpool_ptr); |
| 92 |
|
| 93 |
unsigned char *DT_Bpool_GetBuffer (Bpool * bpool_ptr, int index); |
| 94 |
DAT_COUNT DT_Bpool_GetBuffSize (Bpool * bpool_ptr, int index); |
| 95 |
DAT_LMR_TRIPLET *DT_Bpool_GetIOV (Bpool * bpool_ptr, int index); |
| 96 |
DAT_LMR_CONTEXT DT_Bpool_GetLMR (Bpool * bpool_ptr, int index); |
| 97 |
DAT_RMR_CONTEXT DT_Bpool_GetRMR (Bpool * bpool_ptr, int index); |
| 98 |
|
| 99 |
void DT_Bpool_print (DT_Tdep_Print_Head* phead, Bpool *bpool_ptr); |
| 100 |
|
| 101 |
/* dapl_cnxn.c */ |
| 102 |
int get_ep_connection_state (DT_Tdep_Print_Head* phead, |
| 103 |
DAT_EP_HANDLE ep_handle); |
| 104 |
|
| 105 |
/* dapl_client.c */ |
| 106 |
DAT_RETURN DT_cs_Client (Params_t * params_ptr, |
| 107 |
char *dapl_name, |
| 108 |
char *server_name, |
| 109 |
DAT_UINT32 total_threads); |
| 110 |
|
| 111 |
/* dapl_client_info.c */ |
| 112 |
void DT_Client_Info_Endian (Client_Info_t * client_info); |
| 113 |
|
| 114 |
void DT_Client_Info_Print (DT_Tdep_Print_Head *phead, |
| 115 |
Client_Info_t * client_info); |
| 116 |
|
| 117 |
/* dapl_transaction_stats.c */ |
| 118 |
void DT_init_transaction_stats (Transaction_Stats_t * transaction_stats, |
| 119 |
unsigned int nums); |
| 120 |
void DT_transaction_stats_set_ready (DT_Tdep_Print_Head* phead, |
| 121 |
Transaction_Stats_t* transaction_stats); |
| 122 |
|
| 123 |
void DT_transaction_stats2_set_ready (DT_Tdep_Print_Head* phead, |
| 124 |
Transaction_Stats_t* transaction_stats); |
| 125 |
|
| 126 |
void DT_transaction_stats_reset_wait_count(DT_Tdep_Print_Head * phead, |
| 127 |
Transaction_Stats_t * transaction_stats, |
| 128 |
unsigned int num); |
| 129 |
|
| 130 |
bool DT_transaction_stats_wait_for_all (DT_Tdep_Print_Head* phead, |
| 131 |
Transaction_Stats_t* transaction_stats); |
| 132 |
|
| 133 |
bool DT_transaction_stats2_wait_for_all (DT_Tdep_Print_Head* phead, |
| 134 |
Transaction_Stats_t* transaction_stats); |
| 135 |
|
| 136 |
void DT_update_transaction_stats (Transaction_Stats_t * transaction_stats, |
| 137 |
unsigned int num_ops, |
| 138 |
unsigned int time_ms, |
| 139 |
unsigned int bytes_send, |
| 140 |
unsigned int bytes_recv, |
| 141 |
unsigned int bytes_rdma_read, |
| 142 |
unsigned int bytes_rdma_write); |
| 143 |
|
| 144 |
void DT_print_transaction_stats (DT_Tdep_Print_Head* phead, |
| 145 |
Transaction_Stats_t* transaction_stats, |
| 146 |
unsigned int num_threads, |
| 147 |
unsigned int num_EPs); |
| 148 |
|
| 149 |
/* dapl_endian.c */ |
| 150 |
void DT_Endian_Init (void); |
| 151 |
DAT_UINT32 DT_Endian32 (DAT_UINT32 val); |
| 152 |
DAT_UINT64 DT_Endian64 (DAT_UINT64 val); |
| 153 |
DAT_UINT32 DT_EndianMemHandle (DAT_UINT32 val); |
| 154 |
DAT_UINT64 DT_EndianMemAddress (DAT_UINT64 val); |
| 155 |
|
| 156 |
/* dapl_getopt.c */ |
| 157 |
void DT_mygetopt_init (mygetopt_t * opts); |
| 158 |
|
| 159 |
int DT_mygetopt_r (int argc, |
| 160 |
char *const * argv, |
| 161 |
const char *ostr, |
| 162 |
mygetopt_t * opts); |
| 163 |
|
| 164 |
/* dapl_main.c */ |
| 165 |
int main (int argc, char *argv[]); |
| 166 |
|
| 167 |
int dapltest (int argc, char *argv[]); |
| 168 |
|
| 169 |
void Dapltest_Main_Usage (void); |
| 170 |
|
| 171 |
/* dapl_mdep.c */ |
| 172 |
void DT_Mdep_Init (void); |
| 173 |
void DT_Mdep_End (void); |
| 174 |
bool DT_Mdep_GetDefaultDeviceName (char *dapl_name); |
| 175 |
void DT_Mdep_Sleep (int msec); |
| 176 |
void DT_Mdep_Schedule (void); |
| 177 |
bool DT_Mdep_GetCpuStat (DT_CpuStat *sys_stat); |
| 178 |
unsigned long DT_Mdep_GetTime (void); |
| 179 |
double DT_Mdep_GetCpuMhz (void); |
| 180 |
unsigned long DT_Mdep_GetContextSwitchNum (void); |
| 181 |
void *DT_Mdep_Malloc (size_t l_); |
| 182 |
void DT_Mdep_Free (void *a_); |
| 183 |
bool DT_Mdep_LockInit (DT_Mdep_LockType * lock_ptr); |
| 184 |
void DT_Mdep_LockDestroy (DT_Mdep_LockType * lock_ptr); |
| 185 |
void DT_Mdep_Lock (DT_Mdep_LockType * lock_ptr); |
| 186 |
void DT_Mdep_Unlock (DT_Mdep_LockType * lock_ptr); |
| 187 |
void DT_Mdep_Thread_Init_Attributes (Thread * thread_ptr); |
| 188 |
void DT_Mdep_Thread_Destroy_Attributes (Thread * thread_ptr); |
| 189 |
bool DT_Mdep_Thread_Start (Thread * thread_ptr); |
| 190 |
|
| 191 |
void DT_Mdep_Thread_Detach (DT_Mdep_ThreadHandleType thread_id); |
| 192 |
DT_Mdep_ThreadHandleType DT_Mdep_Thread_SELF ( void ); |
| 193 |
void DT_Mdep_Thread_EXIT ( void * thread_handle ); |
| 194 |
int DT_Mdep_wait_object_init ( IN DT_WAIT_OBJECT *wait_obj); |
| 195 |
int DT_Mdep_wait_object_wait ( |
| 196 |
IN DT_WAIT_OBJECT *wait_obj, |
| 197 |
IN int timeout_val); |
| 198 |
int DT_Mdep_wait_object_wakeup ( IN DT_WAIT_OBJECT *wait_obj); |
| 199 |
int DT_Mdep_wait_object_destroy ( IN DT_WAIT_OBJECT *wait_obj); |
| 200 |
|
| 201 |
|
| 202 |
DT_Mdep_Thread_Start_Routine_Return_Type |
| 203 |
DT_Mdep_Thread_Start_Routine (void *thread_handle); |
| 204 |
|
| 205 |
/* dapl_memlist.c */ |
| 206 |
void DT_MemListInit (Per_Test_Data_t * pt_ptr); |
| 207 |
void *DT_MemListAlloc (Per_Test_Data_t * pt_ptr, |
| 208 |
char *file, |
| 209 |
mem_type_e t, |
| 210 |
int size); |
| 211 |
void DT_MemListFree (Per_Test_Data_t * pt_ptr, |
| 212 |
void *ptr); |
| 213 |
void DT_PrintMemList (Per_Test_Data_t * pt_ptr); |
| 214 |
|
| 215 |
/* dapl_netaddr.c */ |
| 216 |
bool DT_NetAddrLookupHostAddress (DAT_IA_ADDRESS_PTR to_netaddr, |
| 217 |
char *hostname); |
| 218 |
|
| 219 |
DAT_IA_ADDRESS_PTR DT_NetAddrAlloc (Per_Test_Data_t * pt_ptr); |
| 220 |
|
| 221 |
void DT_NetAddrFree (Per_Test_Data_t * pt_ptr, |
| 222 |
DAT_IA_ADDRESS_PTR netaddr); |
| 223 |
|
| 224 |
/* dapl_params.c */ |
| 225 |
bool DT_Params_Parse (int argc, |
| 226 |
char *argv[], |
| 227 |
Params_t * params_ptr); |
| 228 |
|
| 229 |
/* dapl_performance_cmd.c */ |
| 230 |
const char * DT_PerformanceModeToString (Performance_Mode_Type mode); |
| 231 |
|
| 232 |
bool DT_Performance_Cmd_Init (Performance_Cmd_t * cmd); |
| 233 |
|
| 234 |
bool DT_Performance_Cmd_Parse (Performance_Cmd_t * cmd, |
| 235 |
int my_argc, |
| 236 |
char **my_argv, |
| 237 |
mygetopt_t * opts); |
| 238 |
|
| 239 |
void DT_Performance_Cmd_Print (Performance_Cmd_t * cmd); |
| 240 |
void DT_Performance_Cmd_PT_Print (DT_Tdep_Print_Head* phead, |
| 241 |
Performance_Cmd_t * cmd); |
| 242 |
|
| 243 |
void DT_Performance_Cmd_Endian (Performance_Cmd_t * cmd); |
| 244 |
|
| 245 |
/* dapl_performance_client.c */ |
| 246 |
DAT_RETURN DT_Performance_Test_Client ( Params_t *params_ptr, |
| 247 |
Per_Test_Data_t * pt_ptr, |
| 248 |
DAT_IA_HANDLE * ia_handle, |
| 249 |
DAT_IA_ADDRESS_PTR remote); |
| 250 |
|
| 251 |
bool DT_Performance_Test_Client_Connect ( |
| 252 |
DT_Tdep_Print_Head *phead, |
| 253 |
Performance_Test_t * test_ptr); |
| 254 |
|
| 255 |
bool DT_Performance_Test_Client_Exchange ( |
| 256 |
Params_t *params_ptr, |
| 257 |
DT_Tdep_Print_Head *phead, |
| 258 |
Performance_Test_t *test_ptr ); |
| 259 |
|
| 260 |
/* dapl_performance_server.c */ |
| 261 |
void DT_Performance_Test_Server (void * pt_ptr); |
| 262 |
|
| 263 |
bool DT_Performance_Test_Server_Connect ( |
| 264 |
DT_Tdep_Print_Head *phead, |
| 265 |
Performance_Test_t * test_ptr); |
| 266 |
|
| 267 |
bool DT_Performance_Test_Server_Exchange ( |
| 268 |
DT_Tdep_Print_Head *phead, |
| 269 |
Performance_Test_t *test_ptr); |
| 270 |
|
| 271 |
/* dapl_performance_util.c */ |
| 272 |
bool DT_Performance_Test_Create (Per_Test_Data_t * pt_ptr, |
| 273 |
DAT_IA_HANDLE * ia_handle, |
| 274 |
DAT_IA_ADDRESS_PTR remote_ia_addr, |
| 275 |
DAT_BOOLEAN is_server, |
| 276 |
DAT_BOOLEAN is_remote_little_endian, |
| 277 |
Performance_Test_t **perf_test); |
| 278 |
|
| 279 |
void DT_Performance_Test_Destroy (Per_Test_Data_t * pt_ptr, |
| 280 |
Performance_Test_t *test_ptr, |
| 281 |
DAT_BOOLEAN is_server); |
| 282 |
|
| 283 |
bool DT_performance_post_rdma_op (Performance_Ep_Context_t *ep_context, |
| 284 |
DAT_EVD_HANDLE reqt_evd_hdl, |
| 285 |
Performance_Stats_t *stats); |
| 286 |
|
| 287 |
unsigned int DT_performance_reap (DT_Tdep_Print_Head* phead, |
| 288 |
DAT_EVD_HANDLE evd_handle, |
| 289 |
Performance_Mode_Type mode, |
| 290 |
Performance_Stats_t *stats); |
| 291 |
|
| 292 |
unsigned int DT_performance_wait (DT_Tdep_Print_Head* phead, |
| 293 |
DAT_EVD_HANDLE evd_handle, |
| 294 |
Performance_Stats_t *stats); |
| 295 |
|
| 296 |
unsigned int DT_performance_poll (DT_Tdep_Print_Head* phead, |
| 297 |
DAT_EVD_HANDLE evd_handle, |
| 298 |
Performance_Stats_t *stats); |
| 299 |
|
| 300 |
/* dapl_performance_stats.c */ |
| 301 |
void DT_performance_stats_init (Performance_Stats_t * stats); |
| 302 |
|
| 303 |
void DT_performance_stats_record_post (Performance_Stats_t *stats, |
| 304 |
unsigned long ctxt_switch_num, |
| 305 |
DT_Mdep_TimeStamp ts); |
| 306 |
|
| 307 |
void DT_performance_stats_record_reap (Performance_Stats_t *stats, |
| 308 |
unsigned long ctxt_switch_num, |
| 309 |
DT_Mdep_TimeStamp ts); |
| 310 |
|
| 311 |
void DT_performance_stats_record_latency (Performance_Stats_t *stats, |
| 312 |
DT_Mdep_TimeStamp ts); |
| 313 |
|
| 314 |
void DT_performance_stats_data_combine (Performance_Stats_Data_t * dest, |
| 315 |
Performance_Stats_Data_t * src_a, |
| 316 |
Performance_Stats_Data_t * src_b); |
| 317 |
|
| 318 |
void DT_performance_stats_combine (Performance_Stats_t * dest, |
| 319 |
Performance_Stats_t * src_a, |
| 320 |
Performance_Stats_t * src_b); |
| 321 |
|
| 322 |
double DT_performance_stats_data_print (DT_Tdep_Print_Head* phead, |
| 323 |
Performance_Stats_Data_t* data, |
| 324 |
double cpu_mhz); |
| 325 |
|
| 326 |
void DT_performance_stats_print (Params_t * params_ptr, |
| 327 |
DT_Tdep_Print_Head* phead, |
| 328 |
Performance_Stats_t * stats, |
| 329 |
Performance_Cmd_t * cmd, |
| 330 |
Performance_Test_t * test); |
| 331 |
|
| 332 |
|
| 333 |
/* dapl_server.c */ |
| 334 |
void DT_cs_Server (Params_t * params_ptr); |
| 335 |
|
| 336 |
/* dapl_server_cmd.c */ |
| 337 |
void DT_Server_Cmd_Init (Server_Cmd_t * Server_Cmd); |
| 338 |
|
| 339 |
bool DT_Server_Cmd_Parse (Server_Cmd_t * Server_Cmd, |
| 340 |
int my_argc, |
| 341 |
char **my_argv, |
| 342 |
mygetopt_t * opts); |
| 343 |
|
| 344 |
void DT_Server_Cmd_Print (Server_Cmd_t * Server_Cmd); |
| 345 |
void DT_Server_Cmd_PT_Print (DT_Tdep_Print_Head* phead, |
| 346 |
Server_Cmd_t * Server_Cmd); |
| 347 |
|
| 348 |
void DT_Server_Cmd_Usage (void); |
| 349 |
|
| 350 |
/* dapl_server_info.c */ |
| 351 |
void DT_Server_Info_Endian (Server_Info_t * server_info); |
| 352 |
|
| 353 |
void DT_Server_Info_Print (DT_Tdep_Print_Head* phead, |
| 354 |
Server_Info_t * server_info); |
| 355 |
|
| 356 |
/* dapl_test_data.c */ |
| 357 |
Per_Test_Data_t *DT_Alloc_Per_Test_Data (DT_Tdep_Print_Head* phead); |
| 358 |
|
| 359 |
void DT_Free_Per_Test_Data (Per_Test_Data_t * pt_ptr); |
| 360 |
|
| 361 |
/* dapl_test_util.c */ |
| 362 |
DAT_BOOLEAN DT_query (Per_Test_Data_t *pt_ptr, |
| 363 |
DAT_IA_HANDLE ia_handle, |
| 364 |
DAT_EP_HANDLE ep_handle); |
| 365 |
|
| 366 |
DAT_BOOLEAN DT_post_recv_buffer (DT_Tdep_Print_Head* phead, |
| 367 |
DAT_EP_HANDLE ep_handle, |
| 368 |
Bpool * bp, |
| 369 |
int index, |
| 370 |
int size); |
| 371 |
|
| 372 |
DAT_BOOLEAN DT_post_send_buffer (DT_Tdep_Print_Head* phead, |
| 373 |
DAT_EP_HANDLE ep_handle, |
| 374 |
Bpool * bp, |
| 375 |
int index, |
| 376 |
int size); |
| 377 |
|
| 378 |
bool DT_conn_event_wait (DT_Tdep_Print_Head* phead, |
| 379 |
DAT_EP_HANDLE ep_handle, |
| 380 |
DAT_EVD_HANDLE evd_handle, |
| 381 |
DAT_EVENT_NUMBER *event_number); |
| 382 |
|
| 383 |
bool DT_disco_event_wait ( DT_Tdep_Print_Head* phead, |
| 384 |
DAT_EVD_HANDLE evd_handle, |
| 385 |
DAT_EP_HANDLE *ep_handle ); |
| 386 |
|
| 387 |
bool DT_cr_event_wait (DT_Tdep_Print_Head* phead, |
| 388 |
DAT_EVD_HANDLE evd_handle, |
| 389 |
DAT_CR_ARRIVAL_EVENT_DATA *cr_stat_p); |
| 390 |
|
| 391 |
bool DT_dto_event_reap (DT_Tdep_Print_Head* phead, |
| 392 |
DAT_EVD_HANDLE evd_handle, |
| 393 |
bool poll, |
| 394 |
DAT_DTO_COMPLETION_EVENT_DATA *dtop); |
| 395 |
|
| 396 |
bool DT_dto_event_wait (DT_Tdep_Print_Head* phead, |
| 397 |
DAT_EVD_HANDLE evd_handle, |
| 398 |
DAT_DTO_COMPLETION_EVENT_DATA *dtop); |
| 399 |
|
| 400 |
bool DT_dto_event_poll (DT_Tdep_Print_Head* phead, |
| 401 |
DAT_EVD_HANDLE evd_handle, |
| 402 |
DAT_DTO_COMPLETION_EVENT_DATA *dtop); |
| 403 |
|
| 404 |
bool DT_rmr_event_wait (DT_Tdep_Print_Head* phead, |
| 405 |
DAT_EVD_HANDLE evd_handle, |
| 406 |
DAT_RMR_BIND_COMPLETION_EVENT_DATA *rmr_ptr); |
| 407 |
|
| 408 |
bool DT_dto_check ( DT_Tdep_Print_Head* phead, |
| 409 |
DAT_DTO_COMPLETION_EVENT_DATA *dto_p, |
| 410 |
DAT_EP_HANDLE ep_expected, |
| 411 |
DAT_COUNT len_expected, |
| 412 |
DAT_DTO_COOKIE cookie_expected, |
| 413 |
char *message); |
| 414 |
|
| 415 |
bool DT_rmr_check ( DT_Tdep_Print_Head* phead, |
| 416 |
DAT_RMR_BIND_COMPLETION_EVENT_DATA*rmr_p, |
| 417 |
DAT_RMR_HANDLE rmr_expected, |
| 418 |
DAT_PVOID cookie_expected, |
| 419 |
char *message); |
| 420 |
|
| 421 |
bool DT_cr_check (DT_Tdep_Print_Head* phead, |
| 422 |
DAT_CR_ARRIVAL_EVENT_DATA *cr_stat_p, |
| 423 |
DAT_PSP_HANDLE psp_handle_expected, |
| 424 |
DAT_CONN_QUAL port_expected, |
| 425 |
DAT_CR_HANDLE *cr_handlep, |
| 426 |
char *message); |
| 427 |
|
| 428 |
/* dapl_thread.c */ |
| 429 |
void DT_Thread_Init (Per_Test_Data_t * pt_ptr); |
| 430 |
|
| 431 |
void DT_Thread_End (Per_Test_Data_t * pt_ptr); |
| 432 |
|
| 433 |
Thread *DT_Thread_Create (Per_Test_Data_t * pt_ptr, |
| 434 |
void (*fn) (void *), |
| 435 |
void *param, |
| 436 |
unsigned int stacksize); |
| 437 |
|
| 438 |
void DT_Thread_Destroy (Thread * thread_ptr, |
| 439 |
Per_Test_Data_t * pt_ptr); |
| 440 |
|
| 441 |
bool DT_Thread_Start (Thread * thread_ptr); |
| 442 |
|
| 443 |
/* dapl_quit_cmd.c */ |
| 444 |
void DT_Quit_Cmd_Init (Quit_Cmd_t * cmd); |
| 445 |
|
| 446 |
bool DT_Quit_Cmd_Parse (Quit_Cmd_t * cmd, |
| 447 |
int my_argc, |
| 448 |
char **my_argv, |
| 449 |
mygetopt_t * opts); |
| 450 |
|
| 451 |
bool DT_Quit_Cmd_Validate (Quit_Cmd_t * cmd); |
| 452 |
|
| 453 |
void DT_Quit_Cmd_Endian (Quit_Cmd_t * cmd, |
| 454 |
bool to_wire); |
| 455 |
|
| 456 |
void DT_Quit_Cmd_Print (Quit_Cmd_t * cmd); |
| 457 |
void DT_Quit_Cmd_PT_Print (DT_Tdep_Print_Head *phead, Quit_Cmd_t * cmd); |
| 458 |
|
| 459 |
void DT_Quit_Cmd_Usage (void); |
| 460 |
|
| 461 |
/* dapl_transaction_cmd.c */ |
| 462 |
void DT_Transaction_Cmd_Init (Transaction_Cmd_t * cmd); |
| 463 |
|
| 464 |
bool DT_Transaction_Cmd_Parse (Transaction_Cmd_t * cmd, |
| 465 |
int my_argc, |
| 466 |
char **my_argv, |
| 467 |
mygetopt_t * opts); |
| 468 |
|
| 469 |
void DT_Transaction_Cmd_Print (Transaction_Cmd_t * cmd); |
| 470 |
void DT_Transaction_Cmd_PT_Print (DT_Tdep_Print_Head* phead, |
| 471 |
Transaction_Cmd_t * cmd); |
| 472 |
|
| 473 |
void DT_Transaction_Cmd_Endian (Transaction_Cmd_t * cmd, |
| 474 |
bool to_wire); |
| 475 |
/* dapl_transaction_test.c */ |
| 476 |
DAT_RETURN DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr, |
| 477 |
DAT_IA_HANDLE ia_handle, |
| 478 |
DAT_IA_ADDRESS_PTR remote); |
| 479 |
|
| 480 |
void DT_Transaction_Test_Server (void *params); |
| 481 |
|
| 482 |
bool DT_Transaction_Create_Test (Per_Test_Data_t * pt_ptr, |
| 483 |
DAT_IA_HANDLE * ia_handle, |
| 484 |
DAT_BOOLEAN is_server, |
| 485 |
unsigned int port_num, |
| 486 |
DAT_BOOLEAN remote_is_little_endian, |
| 487 |
DAT_IA_ADDRESS_PTR remote_ia_addr); |
| 488 |
|
| 489 |
void DT_Transaction_Main (void *param); |
| 490 |
bool DT_Transaction_Run (DT_Tdep_Print_Head* phead, |
| 491 |
Transaction_Test_t * test_ptr); |
| 492 |
void DT_Transaction_Validation_Fill (DT_Tdep_Print_Head* phead, |
| 493 |
Transaction_Test_t * test_ptr, |
| 494 |
unsigned int iteration); |
| 495 |
bool DT_Transaction_Validation_Check (DT_Tdep_Print_Head* phead, |
| 496 |
Transaction_Test_t * test_ptr, |
| 497 |
int iteration); |
| 498 |
void DT_Print_Transaction_Test (DT_Tdep_Print_Head* phead, |
| 499 |
Transaction_Test_t* test_ptr); |
| 500 |
void DT_Print_Transaction_Stats (DT_Tdep_Print_Head* phead, |
| 501 |
Transaction_Test_t* test_ptr); |
| 502 |
|
| 503 |
/* dapl_transaction_util.c */ |
| 504 |
bool DT_handle_post_recv_buf (DT_Tdep_Print_Head* phead, |
| 505 |
Ep_Context_t * ep_context, |
| 506 |
unsigned int num_eps, |
| 507 |
int op_indx); |
| 508 |
|
| 509 |
bool DT_handle_send_op (DT_Tdep_Print_Head* phead, |
| 510 |
Ep_Context_t * ep_context, |
| 511 |
unsigned int num_eps, |
| 512 |
int op_indx, |
| 513 |
bool poll); |
| 514 |
|
| 515 |
bool DT_handle_recv_op (DT_Tdep_Print_Head* phead, |
| 516 |
Ep_Context_t * ep_context, |
| 517 |
unsigned int num_eps, |
| 518 |
int op_indx, |
| 519 |
bool poll, |
| 520 |
bool repost_recv); |
| 521 |
|
| 522 |
bool DT_handle_rdma_op (DT_Tdep_Print_Head* phead, |
| 523 |
Ep_Context_t * ep_context, |
| 524 |
unsigned int num_eps, |
| 525 |
DT_Transfer_Type opcode, |
| 526 |
int op_indx, |
| 527 |
bool poll); |
| 528 |
|
| 529 |
bool DT_check_params (Per_Test_Data_t *pt_ptr, |
| 530 |
char *module); |
| 531 |
|
| 532 |
void DT_Test_Error (void); |
| 533 |
|
| 534 |
/* dapl_util.c */ |
| 535 |
const char *DT_RetToString (DAT_RETURN ret_value); |
| 536 |
|
| 537 |
const char *DT_TransferTypeToString (DT_Transfer_Type type); |
| 538 |
|
| 539 |
const char *DT_AsyncErr2Str (DAT_EVENT_NUMBER error_code); |
| 540 |
|
| 541 |
const char *DT_EventToSTr (DAT_EVENT_NUMBER event_code); |
| 542 |
|
| 543 |
const char *DT_State2Str (DAT_EP_STATE state_code); |
| 544 |
|
| 545 |
DAT_QOS DT_ParseQoS (char *arg); |
| 546 |
|
| 547 |
unsigned char *DT_AlignPtr (void * val, DAT_COUNT align); |
| 548 |
|
| 549 |
DAT_COUNT DT_RoundSize (DAT_COUNT val, DAT_COUNT align); |
| 550 |
|
| 551 |
/* dapl_limit_cmd.c */ |
| 552 |
void DT_Limit_Cmd_Init ( Limit_Cmd_t * cmd); |
| 553 |
|
| 554 |
bool DT_Limit_Cmd_Parse ( Limit_Cmd_t * cmd, |
| 555 |
int my_argc, |
| 556 |
char **my_argv, |
| 557 |
mygetopt_t * opts); |
| 558 |
|
| 559 |
void DT_Limit_Cmd_Usage (void); |
| 560 |
|
| 561 |
/* dapl_limit.c */ |
| 562 |
DAT_RETURN DT_cs_Limit (Params_t *params, Limit_Cmd_t * cmd); |
| 563 |
|
| 564 |
/* dapl_fft_cmd.c */ |
| 565 |
void DT_FFT_Cmd_Init ( FFT_Cmd_t * cmd); |
| 566 |
|
| 567 |
bool DT_FFT_Cmd_Parse ( FFT_Cmd_t * cmd, |
| 568 |
int my_argc, |
| 569 |
char **my_argv, |
| 570 |
mygetopt_t * opts); |
| 571 |
|
| 572 |
void DT_FFT_Cmd_Usage (void); |
| 573 |
|
| 574 |
/* dapl_fft_test.c */ |
| 575 |
DAT_RETURN DT_cs_FFT (Params_t *params, FFT_Cmd_t * cmd); |
| 576 |
|
| 577 |
/* dapl_fft_hwconn.c */ |
| 578 |
void DT_hwconn_test (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 579 |
int DT_hwconn_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 580 |
int DT_hwconn_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 581 |
int DT_hwconn_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 582 |
int DT_hwconn_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 583 |
int DT_hwconn_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 584 |
int DT_hwconn_case5 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 585 |
int DT_hwconn_case6 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 586 |
int DT_hwconn_case7 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 587 |
|
| 588 |
/* dapl_fft_endpoint.c */ |
| 589 |
void DT_endpoint_test (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 590 |
int DT_endpoint_generic (Params_t *params_ptr, FFT_Cmd_t *cmd, |
| 591 |
bool destroy_pz_early); |
| 592 |
int DT_endpoint_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 593 |
int DT_endpoint_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 594 |
int DT_endpoint_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 595 |
int DT_endpoint_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 596 |
int DT_endpoint_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 597 |
|
| 598 |
/* dapl_fft_pz.c */ |
| 599 |
void DT_pz_test (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 600 |
int DT_pz_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 601 |
int DT_pz_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 602 |
int DT_pz_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 603 |
int DT_pz_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 604 |
int DT_pz_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 605 |
int DT_pz_case5 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 606 |
int DT_pz_case6 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 607 |
|
| 608 |
/* dapl_fft_util.c */ |
| 609 |
void DT_assert_fail (DT_Tdep_Print_Head* phead, |
| 610 |
char *exp, |
| 611 |
char *file, |
| 612 |
char *baseFile, |
| 613 |
int line); |
| 614 |
int DT_ia_open (DAT_NAME_PTR dev_name, DAT_IA_HANDLE *ia_handle); |
| 615 |
int DT_ep_create (Params_t *params_ptr, |
| 616 |
DAT_IA_HANDLE ia_handle, |
| 617 |
DAT_PZ_HANDLE pz_handle, |
| 618 |
DAT_EVD_HANDLE *cr_evd, |
| 619 |
DAT_EVD_HANDLE *conn_evd, |
| 620 |
DAT_EVD_HANDLE *send_evd, |
| 621 |
DAT_EVD_HANDLE *recv_evd, |
| 622 |
DAT_EP_HANDLE *ep_handle); |
| 623 |
void DT_fft_init_conn_struct (FFT_Connection_t *conn); |
| 624 |
void DT_fft_init_client (Params_t *params_ptr, |
| 625 |
FFT_Cmd_t *cmd, |
| 626 |
FFT_Connection_t *conn); |
| 627 |
int DT_fft_destroy_conn_struct (Params_t *params_ptr, FFT_Connection_t *conn); |
| 628 |
void DT_fft_init_server (Params_t *params_ptr, FFT_Cmd_t *cmd, |
| 629 |
FFT_Connection_t *conn); |
| 630 |
void DT_fft_listen (Params_t *params_ptr, FFT_Connection_t *conn); |
| 631 |
int DT_fft_connect (Params_t *params_ptr, FFT_Connection_t *conn); |
| 632 |
|
| 633 |
/* dapl_fft_connmgt.c */ |
| 634 |
int DT_connmgt_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 635 |
int DT_connmgt_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 636 |
void DT_connmgt_test (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 637 |
|
| 638 |
/* dapl_fft_mem.c */ |
| 639 |
int DT_mem_generic (Params_t *params_ptr, FFT_Cmd_t *cmd, int flag); |
| 640 |
int DT_mem_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 641 |
int DT_mem_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 642 |
int DT_mem_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 643 |
int DT_mem_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 644 |
int DT_mem_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 645 |
void DT_mem_test (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 646 |
|
| 647 |
/* dapl_fft_queryinfo.c */ |
| 648 |
int DT_queryinfo_basic (Params_t *params_ptr, FFT_Cmd_t *cmd, |
| 649 |
FFT_query_enum object_to_query, |
| 650 |
DAT_RETURN result_wanted); |
| 651 |
int DT_queryinfo_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 652 |
int DT_queryinfo_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 653 |
int DT_queryinfo_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 654 |
int DT_queryinfo_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 655 |
int DT_queryinfo_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 656 |
int DT_queryinfo_case5 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 657 |
int DT_queryinfo_case6 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 658 |
int DT_queryinfo_case7 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 659 |
int DT_queryinfo_case8 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 660 |
int DT_queryinfo_case9 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 661 |
int DT_queryinfo_case10 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 662 |
int DT_queryinfo_case11 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 663 |
int DT_queryinfo_case12 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 664 |
int DT_queryinfo_case13 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 665 |
int DT_queryinfo_case14 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 666 |
int DT_queryinfo_case15 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 667 |
int DT_queryinfo_case16 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 668 |
int DT_queryinfo_case17 (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 669 |
void DT_queryinfo_test (Params_t *params_ptr, FFT_Cmd_t *cmd); |
| 670 |
|
| 671 |
#endif /* __DAPL_PROTO_H__ */ |