
Go to the source code of this file.
Defines | |
| #define | VIP_THREAD_T pthread_t |
| #define | VIP_THREAD_CREATE(thread, fctn, arg) pthread_create (thread, NULL, fctn, arg) |
| #define | VIP_THREAD_JOIN(thread) pthread_join (thread, NULL) |
| #define | VIP_THREAD_EXIT(retval) pthread_exit (retval) |
| #define | VIP_THREAD_SELF() pthread_self() |
| #define | VIP_MUTEX_T pthread_mutex_t |
| #define | VIP_MUTEX_ATTR |
| #define | VIP_MUTEX_INIT(lock) pthread_mutex_init (lock,NULL) |
| #define | VIP_ASSERT_MUTEX_LOCKED(lock) |
| #define | VIP_MUTEX_TRYLOCK(lock) ((pthread_mutex_trylock (lock) == EBUSY) ? VIP_FALSE : VIP_TRUE) |
| #define | VIP_MUTEX_DESTROY(lock) pthread_mutex_destroy (lock) |
| #define | VIP_MUTEX_LOCK(lock) pthread_mutex_lock (lock) |
| #define | VIP_MUTEX_UNLOCK(lock) pthread_mutex_unlock (lock) |
| #define | VIP_EVENT_T pthread_cond_t |
| #define | VIP_EVENT_INIT(event) pthread_cond_init (event, NULL) |
| #define | VIP_EVENT_SIGNAL(event) pthread_cond_signal (event) |
| #define | VIP_EVENT_WAIT(event, lock) pthread_cond_wait (event,lock) |
| #define | VIP_EVENT_WAIT_TIMEOUT(event, lock, timeout) pthread_cond_timedwait (event,lock,timeout) |
| #define | VIP_EVENT_DESTROY(event) pthread_cond_destroy (event) |
| #define | VIP_SEMAPHORE_T sem_t |
| #define | VIP_SEMAPHORE_WAIT(sema) sem_wait (sema) |
| #define | VIP_SEMAPHORE_INIT(sema, value) sem_init(sema,0,value) |
| #define | VIP_SEMAPHORE_DESTROY(sema) sem_destroy (sema) |
| #define | VIP_SEMAPHORE_POST(sema) sem_post (sema) |
| #define | VIP_AVL_TREE_T avl_tree * |
| #define | VIP_AVL_TREE_INIT(tree) tree = avl_create (vip_avl_compare_function, NULL) |
| #define | VIP_AVL_TREE_DESTROY(tree) avl_destroy (tree, vip_avl_free_function) |
| #define | VIP_AVL_TREE_FIND(tree, data) avl_find (tree, data) |
| #define | VIP_AVL_TREE_INSERT(tree, data) avl_insert (tree, data) |
| #define | VIP_AVL_TREE_DELETE(tree, data) avl_delete (tree, data) |
| #define | VIP_NOTICE(args) vip_notice args |
| #define | VIP_ASSERT(exp) |
| #define | VIP_INVALID_NIC_HANDLE(vip_nic_ptr) |
| #define | VIP_INVALID_PTAG_HANDLE(vip_ptag_ptr) |
| #define | VIP_INVALID_CQ_HANDLE(vip_cq_ptr) |
| #define | VIP_INVALID_VI_HANDLE(vip_vi_ptr) |
| #define | VIP_INVALID_MEM_HANDLE(vip_mem_ptr) |
| #define | VIP_INVALID_CONN_HANDLE(vip_conn_ptr) |
| #define | VIP_FILL_GENERIC_HEAD(ptr, len, vi, type_code) |
| #define | VIP_ENTER_IOCTL(gm_ptr) |
| #define | VIP_EXIT_IOCTL(gm_ptr) |
| #define | VIP_PROGRESSION(gm_ptr) |
| #define | STRINGIZE(arg) #arg |
| #define | XSTRINGIZE(arg) STRINGIZE(arg) |
| #define | LINE_STR XSTRINGIZE(__LINE__) |
| #define | VIP_DEBUG_LABEL(name) |
| #define | VIP_DEBUG(args) |
| #define | VIP_DEBUG_GM(args) |
| #define | VIP_DEBUG_PROTECTED(args) |
| #define | VIP_DEBUG_GM_PROTECTED(args) |
| #define | VIP_ABORT(args) VIP_DEBUG (("Print Debug not enabled")); abort () |
| #define | VI_GM_DEBUG_CHECKSUM_SMALL |
| #define | VI_GM_DEBUG_CHECKSUM_LARGE |
| #define | VI_GM_DEBUG_CHECKSUM_COMPUTE(cksum_ptr, buf, len) |
| #define | VI_GM_DEBUG_CHECKSUM_CHECK(msg, buf, from, cksum_ptr) |
| #define | VI_GM_DEBUG_CHECKSUM_COPY(cksum_target, cksum_source) |
| #define | VIP_NIC_MAGIC 0xCAFE |
| #define | VIP_VI_MAGIC 0xABCD |
| #define | VIP_CQ_MAGIC 0xBABA |
| #define | VIP_PTAG_MAGIC 0xDEDE |
| #define | VIP_MEM_MAGIC 0xFADE |
| #define | VIP_CONN_MAGIC 0xFFAA |
| #define | VIP_SEND_REQ_NONE 1 |
| #define | VIP_SEND_REQ_DMA 2 |
| #define | VIP_SEND_REQ_MALLOC 4 |
| #define | VIP_SEND_REQ_RELIABLE 8 |
| #define | VIP_SEND_REQ_UNRELIABLE 16 |
| #define | VIP_SEND_REQ_RDMA_WRITE 32 |
| #define | VIP_SEND_REQ_OPMASK (VIP_SEND_REQ_RELIABLE + VIP_SEND_REQ_UNRELIABLE + VIP_SEND_REQ_RDMA_WRITE) |
| #define | VIP_SEND_REQ_TYPEMASK (VIP_SEND_REQ_NONE + VIP_SEND_REQ_DMA + VIP_SEND_REQ_MALLOC) |
| #define | VIP_REPORT_COMPLETION_RR 1 |
| #define | VIP_REPORT_REM_DESC_ERROR 2 |
| #define | VIP_REPORT_INVALID_SENDER 4 |
| #define | VIP_REPORT_RECV_QUEUE_EMPTY 8 |
| #define | VIP_REPORT_RDMA_PROT_ERROR 16 |
| #define | VIP_REPORT_CONN_LOST 32 |
| #define | VIP_CONN_TYPE_CLIENT 1 |
| #define | VIP_CONN_TYPE_SERVER 2 |
| #define | VIP_CONN_TYPE_PEER 4 |
| #define | VIP_NET_UCHAR gm_u8_n_t |
| #define | VIP_NET_UINT16 gm_u16_n_t |
| #define | VIP_NET_UINT32 gm_u32_n_t |
| #define | VIP_NET_UINT64 gm_u64_n_t |
| #define | VIP_HTON_UCHAR(x) gm_hton_u8 (x) |
| #define | VIP_HTON_UINT16(x) gm_hton_u16 (x) |
| #define | VIP_HTON_UINT32(x) gm_hton_u32 (x) |
| #define | VIP_HTON_UINT64(x) gm_hton_u64 (x) |
| #define | VIP_NTOH_UCHAR(x) gm_ntoh_u8 (x) |
| #define | VIP_NTOH_UINT16(x) gm_ntoh_u16 (x) |
| #define | VIP_NTOH_UINT32(x) gm_ntoh_u32 (x) |
| #define | VIP_NTOH_UINT64(x) gm_ntoh_u64 (x) |
Definition in file vipl_macros.h.
|
|
Thread abstraction type. Definition at line 24 of file vipl_macros.h. |
|
|
Create a thread. Definition at line 26 of file vipl_macros.h. Referenced by VipCQNotify(), VipOpenNic(), VipRecvNotify(), and VipSendNotify(). |
|
|
Wait for another thread to exit. Definition at line 29 of file vipl_macros.h. Referenced by VipCloseNic(), VipDestroyVi(), and VipOpenNic(). |
|
|
Terminate the current thread. Definition at line 31 of file vipl_macros.h. Referenced by vip_cq_notify_thread(), vip_plumber_blocking(), vip_plumber_periodic(), vip_recv_notify_thread(), and vip_send_notify_thread(). |
|
|
Return the id of the current thread. Definition at line 33 of file vipl_macros.h. Referenced by vip_debug(). |
|
|
Mutex abstraction type. Definition at line 54 of file vipl_macros.h. Referenced by vip_plumber_periodic(). |
|
|
Mutex attributes abstraction, needed for debugging mutexes. Definition at line 72 of file vipl_macros.h. |
|
|
Initialize a mutex. Definition at line 74 of file vipl_macros.h. Referenced by vip_plumber_periodic(), and VipOpenNic(). |
|
|
|
Try to lock a mutex (non-blocking). Definition at line 80 of file vipl_macros.h. |
|
|
Destroy a mutex (needs to be previously unlocked). Definition at line 92 of file vipl_macros.h. Referenced by VipCloseNic(), and VipOpenNic(). |
|
|
|
|
Event abstraction type (aka condition variable). Definition at line 118 of file vipl_macros.h. Referenced by vip_plumber_periodic(). |
|
|
Initialize an event. Definition at line 120 of file vipl_macros.h. Referenced by vip_plumber_periodic(), VipConnectPeerRequest(), VipConnectRequest(), VipConnectWait(), VipCreateCQ(), and VipCreateVi(). |
|
|
Notify all threads waiting on this event. Definition at line 122 of file vipl_macros.h. Referenced by vip_conn_peer_request_alarm_callback(), vip_destroy_conn_handle_set(), vip_destroy_cq_handle_set(), vip_destroy_vi_handle_set(), vip_handle_conn_accept(), vip_handle_conn_ack(), vip_handle_conn_list(), vip_handle_conn_nomatch(), vip_handle_conn_reject(), vip_handle_conn_req(), vip_notify_desc_completion(), vip_vi_transition_to_error_state(), and VipDestroyVi(). |
|
|
Wait for an event to be signaled. Definition at line 124 of file vipl_macros.h. Referenced by vip_wait_for_notification(). |
|
|
Wait with a timeout for an event to be signaled. Definition at line 126 of file vipl_macros.h. Referenced by vip_plumber_periodic(), and vip_wait_for_notification(). |
|
|
Destroy an event. Definition at line 133 of file vipl_macros.h. |
|
|
Semaphore abstraction type. Definition at line 173 of file vipl_macros.h. |
|
|
Decrement the value of the semaphore, wait if <= 0. Definition at line 175 of file vipl_macros.h. Referenced by vip_cq_notify_thread(), vip_plumber_blocking(), vip_recv_notify_thread(), vip_send_notify_thread(), and vip_wait_for_notification(). |
|
|
Initialize a semaphore. Definition at line 185 of file vipl_macros.h. Referenced by VipCreateCQ(), VipCreateVi(), and VipOpenNic(). |
|
|
Destroy a semaphore. Definition at line 187 of file vipl_macros.h. Referenced by VipCloseNic(), and VipOpenNic(). |
|
|
Increment the value of the semaphore. Definition at line 189 of file vipl_macros.h. Referenced by vip_plumber_blocking(), vip_wait_for_notification(), VipCloseNic(), VipCQNotify(), VipDestroyVi(), VipOpenNic(), VipRecvNotify(), and VipSendNotify(). |
|
|
AVL tree abstraction type. Definition at line 209 of file vipl_macros.h. |
|
|
Initialize an AVL tree. Definition at line 211 of file vipl_macros.h. Referenced by VipOpenNic(). |
|
|
Destroy an AVL tree. Definition at line 214 of file vipl_macros.h. Referenced by VipCloseNic(), and VipOpenNic(). |
|
|
Lookup (quickly) an entry in an AVL tree. Definition at line 216 of file vipl_macros.h. Referenced by vip_avl_deregister_memory(), and vip_avl_register_memory(). |
|
|
Insert an entry in an AVL tree. Definition at line 224 of file vipl_macros.h. Referenced by vip_avl_register_memory(). |
|
|
Delete an entry from an AVL tree. Definition at line 226 of file vipl_macros.h. Referenced by vip_avl_deregister_memory(). |
|
|
Print a formatted message to standard error output. Definition at line 231 of file vipl_macros.h. Referenced by vip_alive_sent_callback(). |
|
|
|
Value: ((vip_nic_ptr == NULL) \ || (((VIP_UINTPTR) vip_nic_ptr) <= VI_GM_MAX_NIC_HANDLES) \ || (vip_nic_ptr->magic != VIP_NIC_MAGIC)) Definition at line 242 of file vipl_macros.h. Referenced by vip_check_nic_and_vi(), vip_handle_report(), vip_resume_callback(), vip_sent_callback(), VipCloseNic(), VipConnectWait(), VipCreateCQ(), VipCreatePtag(), VipCreateVi(), VipDeregisterMem(), VipDestroyPtag(), VipErrorCallback(), VipNSGetHostByAddr(), VipNSGetHostByName(), VipNSInit(), VipNSShutdown(), VipQueryMem(), VipQueryNic(), VipQuerySystemManagementInfo(), VipRegisterMem(), and VipSetMemAttributes(). |
|
|
Value: ((vip_ptag_ptr == NULL) || (vip_ptag_ptr->handle.magic != VIP_PTAG_MAGIC) \ || (vip_ptag_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC)) Definition at line 248 of file vipl_macros.h. Referenced by vip_check_memory_handle(), vip_handle_put_req(), VipCreateVi(), VipDeregisterMem(), VipDestroyPtag(), VipPostRecv(), VipPostSend(), VipRegisterMem(), VipSetMemAttributes(), and VipSetViAttributes(). |
|
|
Value: ((vip_cq_ptr == NULL) || (vip_cq_ptr->handle.magic != VIP_CQ_MAGIC) \ || (vip_cq_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC)) Definition at line 253 of file vipl_macros.h. Referenced by VipCQDone(), VipCQNotify(), VipCQWait(), VipCreateVi(), VipDestroyCQ(), and VipResizeCQ(). |
|
|
Value: ((vip_vi_ptr == NULL) \ || (((VIP_UINTPTR) vip_vi_ptr) <= VI_GM_MAX_VI) \ || (vip_vi_ptr->handle.magic != VIP_VI_MAGIC) \ || (vip_vi_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC)) Definition at line 258 of file vipl_macros.h. Referenced by vip_check_nic_and_vi(), vip_handle_report(), vip_send_conn_request(), vip_sent_callback(), VipConnectAccept(), VipConnectPeerDone(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectRequest(), VipDestroyVi(), VipDisconnect(), VipPostRecv(), VipPostSend(), VipQueryVi(), VipRecvDone(), VipRecvNotify(), VipRecvWait(), VipSendDone(), VipSendNotify(), VipSendWait(), and VipSetViAttributes(). |
|
|
Value: ((vip_mem_ptr == NULL) \ || (((VIP_UINTPTR) vip_mem_ptr) <= VI_GM_MAX_REGISTER_REGIONS) \ || (vip_mem_ptr->handle.magic != VIP_MEM_MAGIC) \ || (vip_mem_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC)) Definition at line 265 of file vipl_macros.h. Referenced by vip_check_memory_handle(), VipDeregisterMem(), VipQueryMem(), and VipSetMemAttributes(). |
|
|
Value: ((vip_conn_ptr == NULL) || (vip_conn_ptr->handle.magic != VIP_CONN_MAGIC) \ || (vip_conn_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC)) Definition at line 272 of file vipl_macros.h. Referenced by vip_conn_peer_request_alarm_callback(), vip_handle_conn_accept(), vip_handle_conn_ack(), vip_handle_conn_list(), vip_handle_conn_nomatch(), vip_handle_conn_reject(), VipConnectAccept(), VipConnectPeerDone(), VipConnectPeerWait(), and VipConnectReject(). |
|
|
Value: ptr->vip_pkt_eager_ur.type = VIP_HTON_UCHAR (type_code); \ ptr->vip_pkt_eager_ur.length_24 = VIP_HTON_UCHAR ((len & 0xFF0000) >> 16); \ ptr->vip_pkt_eager_ur.length_16 = VIP_HTON_UCHAR ((len & 0xFF00) >> 8); \ ptr->vip_pkt_eager_ur.length_8 = VIP_HTON_UCHAR (len & 0xFF); \ ptr->vip_pkt_eager_ur.net_remote_nic_index = vi->net_remote_nic_index; \ ptr->vip_pkt_eager_ur.net_remote_vi_index = vi->net_remote_vi_index Definition at line 277 of file vipl_macros.h. Referenced by vip_handle_3way_ok(), vip_handle_matching_message(), vip_handle_put_ok(), vip_handle_put_req(), and vip_process_send_desc(). |
|
|
Hook before calling a GM ioctl (not used anymore). Definition at line 286 of file vipl_macros.h. Referenced by vip_avl_deregister_memory(), vip_avl_register_memory(), VipConnectPeerRequest(), VipConnectRequest(), VipNSGetHostByAddr(), and VipNSGetHostByName(). |
|
|
Hook after calling a GM ioctl (not used anymore). Definition at line 288 of file vipl_macros.h. Referenced by vip_avl_deregister_memory(), vip_avl_register_memory(), VipConnectPeerRequest(), VipConnectRequest(), VipNSGetHostByAddr(), and VipNSGetHostByName(). |
|
|
Value: do \ { \ if (VIP_MUTEX_TRYLOCK (&(gm_ptr->recv_lock)) == VIP_TRUE) \ { \ vip_receive_event (gm_ptr, VIP_FALSE); \ VIP_MUTEX_UNLOCK (&(gm_ptr->recv_lock)); \ } \ } \ while (0) Definition at line 291 of file vipl_macros.h. Referenced by VipConnectAccept(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectReject(), VipConnectRequest(), VipConnectWait(), VipCQDone(), VipCQNotify(), VipCQWait(), VipDeregisterMem(), VipNSGetHostByAddr(), VipNSGetHostByName(), VipRecvDone(), VipRecvNotify(), VipRecvWait(), VipRegisterMem(), VipSendDone(), VipSendNotify(), and VipSendWait(). |
|
|
Transform a argument in a string. Definition at line 303 of file vipl_macros.h. |
|
|
Conversion of argument into string (abstraction). Definition at line 305 of file vipl_macros.h. |
|
|
Return the current line in the source file as a string. Definition at line 307 of file vipl_macros.h. |
|
|
|
|
Print a formatted GM debug message on the standard error output. Definition at line 376 of file vipl_macros.h. Referenced by vip_avl_deregister_memory(), vip_avl_register_memory(), VipConnectRequest(), VipNSGetHostByAddr(), VipNSGetHostByName(), VipOpenNic(), and VipQuerySystemManagementInfo(). |
|
|
Print a formatted debug message on the standard error output, protecting from other threads with a lock. Definition at line 379 of file vipl_macros.h. Referenced by vip_handle_matching_message(), vip_receive_event(), and vip_sent_report_callback_status(). |
|
|
Print a formatted GM debug message on the standard error output, protecting from other threads with a lock. Definition at line 382 of file vipl_macros.h. |
|
|
Abort the current execution with a fatal error message. Definition at line 384 of file vipl_macros.h. Referenced by vi_gm_debug_checksum_check(), vip_avl_r |