Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

vipl_macros.h File Reference

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)


Detailed Description

The VI-GM macros definition include file.

Definition in file vipl_macros.h.


Define Documentation

#define VIP_THREAD_T   pthread_t
 

Thread abstraction type.

Definition at line 24 of file vipl_macros.h.

#define VIP_THREAD_CREATE thread,
fctn,
arg   )     pthread_create (thread, NULL, fctn, arg)
 

Create a thread.

Definition at line 26 of file vipl_macros.h.

Referenced by VipCQNotify(), VipOpenNic(), VipRecvNotify(), and VipSendNotify().

#define VIP_THREAD_JOIN thread   )     pthread_join (thread, NULL)
 

Wait for another thread to exit.

Definition at line 29 of file vipl_macros.h.

Referenced by VipCloseNic(), VipDestroyVi(), and VipOpenNic().

#define VIP_THREAD_EXIT retval   )     pthread_exit (retval)
 

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().

 
#define VIP_THREAD_SELF  )     pthread_self()
 

Return the id of the current thread.

Definition at line 33 of file vipl_macros.h.

Referenced by vip_debug().

#define VIP_MUTEX_T   pthread_mutex_t
 

Mutex abstraction type.

Definition at line 54 of file vipl_macros.h.

Referenced by vip_plumber_periodic().

#define VIP_MUTEX_ATTR
 

Mutex attributes abstraction, needed for debugging mutexes.

Definition at line 72 of file vipl_macros.h.

#define VIP_MUTEX_INIT lock   )     pthread_mutex_init (lock,NULL)
 

Initialize a mutex.

Definition at line 74 of file vipl_macros.h.

Referenced by vip_plumber_periodic(), and VipOpenNic().

#define VIP_ASSERT_MUTEX_LOCKED lock   ) 
 

Check that the Mutex is effectively locked .

Definition at line 76 of file vipl_macros.h.

Referenced by vip_alive_alarm_callback(), vip_alive_sent_callback(), vip_allocate_handle(), vip_allocate_packet(), vip_avl_deregister_memory(), vip_avl_register_memory(), vip_check_memory_handle(), vip_destroy_conn_handle_set(), vip_destroy_cq_handle_set(), vip_destroy_mem_handle_set(), vip_destroy_ptag_handle_set(), vip_destroy_vi_handle_set(), vip_flush_fifo_send(), vip_free_handle(), vip_generate_async_error(), vip_notify_desc_completion(), vip_process_send_desc(), vip_remove_conn_waiting_list(), vip_resume_callback(), vip_send_data(), vip_sent_callback(), vip_vi_transition_to_error_state(), and vip_wait_for_notification().

#define VIP_MUTEX_TRYLOCK lock   )     ((pthread_mutex_trylock (lock) == EBUSY) ? VIP_FALSE : VIP_TRUE)
 

Try to lock a mutex (non-blocking).

Definition at line 80 of file vipl_macros.h.

#define VIP_MUTEX_DESTROY lock   )     pthread_mutex_destroy (lock)
 

Destroy a mutex (needs to be previously unlocked).

Definition at line 92 of file vipl_macros.h.

Referenced by VipCloseNic(), and VipOpenNic().

#define VIP_MUTEX_LOCK lock   )     pthread_mutex_lock (lock)
 

Try to lock a mutex (blocking).

Definition at line 94 of file vipl_macros.h.

Referenced by vip_check_nic_and_vi(), vip_conn_peer_request_alarm_callback(), vip_cq_notify_thread(), 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_handle_report(), vip_plumber_blocking(), vip_plumber_periodic(), vip_receive_event(), vip_recv_notify_thread(), vip_resume_callback(), vip_send_notify_thread(), vip_sent_callback(), VipCloseNic(), VipConnectAccept(), VipConnectPeerDone(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectReject(), VipConnectRequest(), VipConnectWait(), VipCQDone(), VipCQNotify(), VipCQWait(), VipCreateCQ(), VipCreatePtag(), VipCreateVi(), VipDeregisterMem(), VipDestroyCQ(), VipDestroyPtag(), VipDestroyVi(), VipDisconnect(), VipErrorCallback(), VipNSGetHostByAddr(), VipNSGetHostByName(), VipNSInit(), VipNSShutdown(), VipOpenNic(), VipPostRecv(), VipPostSend(), VipQueryMem(), VipQueryNic(), VipQuerySystemManagementInfo(), VipQueryVi(), VipRecvDone(), VipRecvNotify(), VipRecvWait(), VipRegisterMem(), VipResizeCQ(), VipSendDone(), VipSendNotify(), VipSendWait(), VipSetMemAttributes(), and VipSetViAttributes().

#define VIP_MUTEX_UNLOCK lock   )     pthread_mutex_unlock (lock)
 

Unlock a previously locked mutex.

Definition at line 96 of file vipl_macros.h.

Referenced by vip_conn_peer_request_alarm_callback(), vip_cq_notify_thread(), vip_destroy_conn_handle_set(), vip_destroy_cq_handle_set(), vip_destroy_vi_handle_set(), vip_handle_3way_done(), vip_handle_3way_ok(), 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_handle_matching_message(), vip_handle_put_done(), vip_handle_put_ok(), vip_handle_put_req(), vip_handle_report(), vip_plumber_blocking(), vip_plumber_periodic(), vip_receive_event(), vip_recv_notify_thread(), vip_resume_callback(), vip_send_notify_thread(), vip_sent_callback(), VipCloseNic(), VipConnectAccept(), VipConnectPeerDone(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectReject(), VipConnectRequest(), VipConnectWait(), VipCQDone(), VipCQNotify(), VipCQWait(), VipCreateCQ(), VipCreatePtag(), VipCreateVi(), VipDeregisterMem(), VipDestroyCQ(), VipDestroyPtag(), VipDestroyVi(), VipDisconnect(), VipErrorCallback(), VipNSGetHostByAddr(), VipNSGetHostByName(), VipNSInit(), VipNSShutdown(), VipOpenNic(), VipPostRecv(), VipPostSend(), VipQueryMem(), VipQueryNic(), VipQuerySystemManagementInfo(), VipQueryVi(), VipRecvDone(), VipRecvNotify(), VipRecvWait(), VipRegisterMem(), VipResizeCQ(), VipSendDone(), VipSendNotify(), VipSendWait(), VipSetMemAttributes(), and VipSetViAttributes().

#define VIP_EVENT_T   pthread_cond_t
 

Event abstraction type (aka condition variable).

Definition at line 118 of file vipl_macros.h.

Referenced by vip_plumber_periodic().

#define VIP_EVENT_INIT event   )     pthread_cond_init (event, NULL)
 

Initialize an event.

Definition at line 120 of file vipl_macros.h.

Referenced by vip_plumber_periodic(), VipConnectPeerRequest(), VipConnectRequest(), VipConnectWait(), VipCreateCQ(), and VipCreateVi().

#define VIP_EVENT_SIGNAL event   )     pthread_cond_signal (event)
 

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().

#define VIP_EVENT_WAIT event,
lock   )     pthread_cond_wait (event,lock)
 

Wait for an event to be signaled.

Definition at line 124 of file vipl_macros.h.

Referenced by vip_wait_for_notification().

#define VIP_EVENT_WAIT_TIMEOUT event,
lock,
timeout   )     pthread_cond_timedwait (event,lock,timeout)
 

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().

#define VIP_EVENT_DESTROY event   )     pthread_cond_destroy (event)
 

Destroy an event.

Definition at line 133 of file vipl_macros.h.

#define VIP_SEMAPHORE_T   sem_t
 

Semaphore abstraction type.

Definition at line 173 of file vipl_macros.h.

#define VIP_SEMAPHORE_WAIT sema   )     sem_wait (sema)
 

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().

#define VIP_SEMAPHORE_INIT sema,
value   )     sem_init(sema,0,value)
 

Initialize a semaphore.

Definition at line 185 of file vipl_macros.h.

Referenced by VipCreateCQ(), VipCreateVi(), and VipOpenNic().

#define VIP_SEMAPHORE_DESTROY sema   )     sem_destroy (sema)
 

Destroy a semaphore.

Definition at line 187 of file vipl_macros.h.

Referenced by VipCloseNic(), and VipOpenNic().

#define VIP_SEMAPHORE_POST sema   )     sem_post (sema)
 

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().

#define VIP_AVL_TREE_T   avl_tree *
 

AVL tree abstraction type.

Definition at line 209 of file vipl_macros.h.

#define VIP_AVL_TREE_INIT tree   )     tree = avl_create (vip_avl_compare_function, NULL)
 

Initialize an AVL tree.

Definition at line 211 of file vipl_macros.h.

Referenced by VipOpenNic().

#define VIP_AVL_TREE_DESTROY tree   )     avl_destroy (tree, vip_avl_free_function)
 

Destroy an AVL tree.

Definition at line 214 of file vipl_macros.h.

Referenced by VipCloseNic(), and VipOpenNic().

#define VIP_AVL_TREE_FIND tree,
data   )     avl_find (tree, data)
 

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().

#define VIP_AVL_TREE_INSERT tree,
data   )     avl_insert (tree, data)
 

Insert an entry in an AVL tree.

Definition at line 224 of file vipl_macros.h.

Referenced by vip_avl_register_memory().

#define VIP_AVL_TREE_DELETE tree,
data   )     avl_delete (tree, data)
 

Delete an entry from an AVL tree.

Definition at line 226 of file vipl_macros.h.

Referenced by vip_avl_deregister_memory().

#define VIP_NOTICE args   )     vip_notice args
 

Print a formatted message to standard error output.

Definition at line 231 of file vipl_macros.h.

Referenced by vip_alive_sent_callback().

#define VIP_ASSERT exp   ) 
 

Check if the expression if true and abort otherwise.

Definition at line 238 of file vipl_macros.h.

Referenced by vip_alive_alarm_callback(), vip_allocate_handle(), vip_allocate_packet(), vip_avl_deregister_memory(), vip_avl_register_memory(), vip_check_nic_and_vi(), vip_conn_mgr_dead_endpoint(), vip_cq_notify_thread(), vip_debug(), vip_destroy_conn_handle_set(), vip_destroy_cq_handle_set(), vip_destroy_mem_handle_set(), vip_destroy_ptag_handle_set(), vip_destroy_vi_handle_set(), vip_flush_fifo_send(), vip_free_handle(), vip_generate_async_error(), vip_handle_3way_done(), vip_handle_3way_ok(), 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_handle_matching_message(), vip_handle_put_done(), vip_handle_put_ok(), vip_handle_put_req(), vip_handle_report(), vip_notify_desc_completion(), vip_plumber_periodic(), vip_process_send_desc(), vip_recv_notify_thread(), vip_remove_conn_waiting_list(), vip_resume_callback(), vip_return_report(), vip_send_conn_request(), vip_send_data(), vip_send_notify_thread(), vip_sent_callback(), vip_vi_transition_to_error_state(), vip_wait_for_notification(), VipConnectAccept(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectRequest(), VipConnectWait(), VipCQDone(), VipCQNotify(), VipCQWait(), VipDeregisterMem(), VipDestroyCQ(), VipDestroyVi(), VipDisconnect(), VipOpenNic(), VipPostRecv(), VipPostSend(), VipQuerySystemManagementInfo(), VipRecvDone(), VipRecvNotify(), VipRecvWait(), VipRegisterMem(), VipSendDone(), VipSendNotify(), VipSendWait(), VipSetMemAttributes(), and VipSetViAttributes().

#define VIP_INVALID_NIC_HANDLE vip_nic_ptr   ) 
 

Value:

((vip_nic_ptr == NULL)                                                     \
 || (((VIP_UINTPTR) vip_nic_ptr) <= VI_GM_MAX_NIC_HANDLES)                 \
 || (vip_nic_ptr->magic != VIP_NIC_MAGIC))
Check the validity of a NIC handle.

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().

#define VIP_INVALID_PTAG_HANDLE vip_ptag_ptr   ) 
 

Value:

((vip_ptag_ptr == NULL) || (vip_ptag_ptr->handle.magic != VIP_PTAG_MAGIC)  \
 || (vip_ptag_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC))
Check the validity of a Protection Tag handle.

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().

#define VIP_INVALID_CQ_HANDLE vip_cq_ptr   ) 
 

Value:

((vip_cq_ptr == NULL) || (vip_cq_ptr->handle.magic != VIP_CQ_MAGIC)        \
 || (vip_cq_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC))
Check the validity of a Completion Queue handle.

Definition at line 253 of file vipl_macros.h.

Referenced by VipCQDone(), VipCQNotify(), VipCQWait(), VipCreateVi(), VipDestroyCQ(), and VipResizeCQ().

#define VIP_INVALID_VI_HANDLE vip_vi_ptr   ) 
 

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))
Check the validity of a VI handle.

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().

#define VIP_INVALID_MEM_HANDLE vip_mem_ptr   ) 
 

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))
Check the validity of a Memory registration handle.

Definition at line 265 of file vipl_macros.h.

Referenced by vip_check_memory_handle(), VipDeregisterMem(), VipQueryMem(), and VipSetMemAttributes().

#define VIP_INVALID_CONN_HANDLE vip_conn_ptr   ) 
 

Value:

((vip_conn_ptr == NULL) || (vip_conn_ptr->handle.magic != VIP_CONN_MAGIC)  \
 || (vip_conn_ptr->handle.vip_nic_ptr->magic != VIP_NIC_MAGIC))
Check the validity of a Connection handle.

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().

#define VIP_FILL_GENERIC_HEAD ptr,
len,
vi,
type_code   ) 
 

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
Fill the generic part of a VI-GM packet.

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().

#define VIP_ENTER_IOCTL gm_ptr   ) 
 

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().

#define VIP_EXIT_IOCTL gm_ptr   ) 
 

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().

#define VIP_PROGRESSION gm_ptr   ) 
 

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)
Allow progress in the protocols by polling once the network.

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().

#define STRINGIZE arg   )     #arg
 

Transform a argument in a string.

Definition at line 303 of file vipl_macros.h.

#define XSTRINGIZE arg   )     STRINGIZE(arg)
 

Conversion of argument into string (abstraction).

Definition at line 305 of file vipl_macros.h.

#define LINE_STR   XSTRINGIZE(__LINE__)
 

Return the current line in the source file as a string.

Definition at line 307 of file vipl_macros.h.

#define VIP_DEBUG_LABEL name   ) 
 

Defined the name of the current function to be used in a debug message.

Definition at line 372 of file vipl_macros.h.

Referenced by main(), vi_gm_debug_checksum_check(), vip_alive_alarm_callback(), vip_alive_sent_callback(), vip_allocate_handle(), vip_allocate_packet(), vip_avl_deregister_memory(), vip_avl_register_memory(), vip_check_memory_handle(), vip_check_nic_and_vi(), vip_conn_mgr_dead_endpoint(), vip_conn_peer_request_alarm_callback(), vip_cq_notify_thread(), vip_default_error_callback(), vip_destroy_conn_handle_set(), vip_destroy_cq_handle_set(), vip_destroy_mem_handle_set(), vip_destroy_ptag_handle_set(), vip_destroy_vi_handle_set(), vip_flush_fifo_send(), vip_free_handle(), vip_generate_async_error(), vip_handle_3way_done(), vip_handle_3way_ok(), 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_handle_matching_message(), vip_handle_put_done(), vip_handle_put_ok(), vip_handle_put_req(), vip_handle_report(), vip_init_handle_set(), vip_notify_desc_completion(), vip_plumber_blocking(), vip_plumber_periodic(), vip_process_send_desc(), vip_receive_event(), vip_recv_notify_thread(), vip_remove_conn_waiting_list(), vip_resume_callback(), vip_return_report(), vip_send_conn_request(), vip_send_data(), vip_send_notify_thread(), vip_sent_callback(), vip_sent_report_callback_status(), vip_vi_transition_to_error_state(), vip_wait_for_notification(), VipCloseNic(), VipConnectAccept(), VipConnectPeerDone(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectReject(), VipConnectRequest(), VipConnectWait(), VipCQDone(), VipCQNotify(), VipCQWait(), VipCreateCQ(), VipCreatePtag(), VipCreateVi(), VipDeregisterMem(), VipDestroyCQ(), VipDestroyPtag(), VipDestroyVi(), VipDisconnect(), VipErrorCallback(), VipNSGetHostByAddr(), VipNSGetHostByName(), VipNSInit(), VipNSShutdown(), VipOpenNic(), VipPostRecv(), VipPostSend(), VipQueryMem(), VipQueryNic(), VipQuerySystemManagementInfo(), VipQueryVi(), VipRecvDone(), VipRecvNotify(), VipRecvWait(), VipRegisterMem(), VipResizeCQ(), VipSendDone(), VipSendNotify(), VipSendWait(), VipSetMemAttributes(), and VipSetViAttributes().

#define VIP_DEBUG args   ) 
 

Print a formatted debug message on the standard error output.

Definition at line 374 of file vipl_macros.h.

Referenced by main(), vip_alive_alarm_callback(), vip_alive_sent_callback(), vip_allocate_handle(), vip_allocate_packet(), vip_avl_deregister_memory(), vip_avl_register_memory(), vip_check_memory_handle(), vip_check_nic_and_vi(), vip_conn_mgr_dead_endpoint(), vip_conn_peer_request_alarm_callback(), vip_cq_notify_thread(), vip_default_error_callback(), vip_destroy_conn_handle_set(), vip_destroy_cq_handle_set(), vip_destroy_mem_handle_set(), vip_destroy_ptag_handle_set(), vip_destroy_vi_handle_set(), vip_flush_fifo_send(), vip_free_handle(), vip_generate_async_error(), vip_handle_3way_done(), vip_handle_3way_ok(), 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_handle_matching_message(), vip_handle_put_done(), vip_handle_put_ok(), vip_handle_put_req(), vip_handle_report(), vip_init_handle_set(), vip_notify_desc_completion(), vip_plumber_blocking(), vip_plumber_periodic(), vip_process_send_desc(), vip_receive_event(), vip_recv_notify_thread(), vip_remove_conn_waiting_list(), vip_resume_callback(), vip_return_report(), vip_send_conn_request(), vip_send_data(), vip_send_notify_thread(), vip_sent_callback(), vip_sent_report_callback_status(), vip_vi_transition_to_error_state(), vip_wait_for_notification(), VipCloseNic(), VipConnectAccept(), VipConnectPeerDone(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectReject(), VipConnectRequest(), VipConnectWait(), VipCQDone(), VipCQNotify(), VipCQWait(), VipCreateCQ(), VipCreatePtag(), VipCreateVi(), VipDeregisterMem(), VipDestroyCQ(), VipDestroyPtag(), VipDestroyVi(), VipDisconnect(), VipErrorCallback(), VipNSGetHostByAddr(), VipNSGetHostByName(), VipNSInit(), VipNSShutdown(), VipOpenNic(), VipPostRecv(), VipPostSend(), VipQueryMem(), VipQueryNic(), VipQuerySystemManagementInfo(), VipQueryVi(), VipRecvDone(), VipRecvNotify(), VipRecvWait(), VipRegisterMem(), VipResizeCQ(), VipSendDone(), VipSendNotify(), VipSendWait(), VipSetMemAttributes(), and VipSetViAttributes().

#define VIP_DEBUG_GM args   ) 
 

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().

#define VIP_DEBUG_PROTECTED args   ) 
 

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().

#define VIP_DEBUG_GM_PROTECTED args   ) 
 

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.

#define VIP_ABORT args   )     VIP_DEBUG (("Print Debug not enabled")); abort ()
 

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