[DAPL2] DAPL Counters & 2.0.3 extensions to support counter retrieval.
[mirror/winof/.git] / ulp / dapl2 / dat / include / dat / dat_ib_extensions.h
index b94c5ce..65cf966 100644 (file)
  *     DAT_NAMED_ATTR  name == extended operations and version, \r
  *                     version_value = version number of extension API\r
  */\r
-#define DAT_IB_EXTENSION_VERSION       201     /* 2.0.1 */\r
\r
+ /* 2.0.1 - Initial IB extension support, atomic and immed data\r
+  *         dat_ib_post_fetch_and_add()\r
+  *         dat_ib_post_cmp_and_swap()\r
+  *         dat_ib_post_rdma_write_immed()\r
+  *            \r
+  * 2.0.2 - Add UD support, post send and remote_ah via connect events \r
+  *         dat_ib_post_send_ud()\r
+  *\r
+  * 2.0.3 - Add query/print counter support for IA, EP, and EVD's \r
+  *         dat_query_counters(), dat_print_counters()\r
+  *\r
+  */\r
+#define DAT_IB_EXTENSION_VERSION       203     /* 2.0.3 */\r
+#define DAT_ATTR_COUNTERS                      "DAT_COUNTERS"\r
 #define DAT_IB_ATTR_FETCH_AND_ADD      "DAT_IB_FETCH_AND_ADD"\r
 #define DAT_IB_ATTR_CMP_AND_SWAP       "DAT_IB_CMP_AND_SWAP"\r
 #define DAT_IB_ATTR_IMMED_DATA         "DAT_IB_IMMED_DATA"\r
@@ -81,6 +95,9 @@ typedef enum dat_ib_op
        DAT_IB_FETCH_AND_ADD_OP,\r
        DAT_IB_CMP_AND_SWAP_OP,\r
        DAT_IB_RDMA_WRITE_IMMED_OP,\r
+       DAT_IB_UD_SEND_OP,\r
+       DAT_QUERY_COUNTERS_OP,\r
+       DAT_PRINT_COUNTERS_OP\r
        \r
 } DAT_IB_OP;\r
 \r
@@ -170,6 +187,92 @@ typedef enum dat_ib_mem_priv_flags
        \r
 } DAT_IB_MEM_PRIV_FLAGS;\r
 \r
+/*\r
+ * Definitions for 64-bit IA Counters\r
+ */\r
+typedef enum dat_ia_counters\r
+{\r
+       DCNT_IA_PZ_CREATE,\r
+       DCNT_IA_PZ_FREE,\r
+       DCNT_IA_LMR_CREATE,\r
+       DCNT_IA_LMR_FREE,\r
+       DCNT_IA_RMR_CREATE,\r
+       DCNT_IA_RMR_FREE,\r
+       DCNT_IA_PSP_CREATE,\r
+       DCNT_IA_PSP_CREATE_ANY,\r
+       DCNT_IA_PSP_FREE,\r
+       DCNT_IA_RSP_CREATE,\r
+       DCNT_IA_RSP_FREE,\r
+       DCNT_IA_EVD_CREATE,\r
+       DCNT_IA_EVD_FREE,\r
+       DCNT_IA_EP_CREATE,\r
+       DCNT_IA_EP_FREE,\r
+       DCNT_IA_SRQ_CREATE,\r
+       DCNT_IA_SRQ_FREE,\r
+       DCNT_IA_SP_CR,\r
+       DCNT_IA_SP_CR_ACCEPTED,\r
+       DCNT_IA_SP_CR_REJECTED,\r
+       DCNT_IA_MEM_ALLOC,\r
+       DCNT_IA_MEM_ALLOC_DATA,\r
+       DCNT_IA_MEM_FREE,\r
+       DCNT_IA_ASYNC_ERROR,\r
+       DCNT_IA_ASYNC_QP_ERROR,\r
+       DCNT_IA_ASYNC_CQ_ERROR,\r
+       DCNT_IA_ALL_COUNTERS,  /* MUST be last */\r
+\r
+} DAT_IA_COUNTERS;\r
+\r
+/*\r
+ * Definitions for 64-bit EP Counters\r
+ */\r
+typedef enum dat_ep_counters\r
+{\r
+       DCNT_EP_CONNECT,\r
+       DCNT_EP_DISCONNECT,\r
+       DCNT_EP_POST_SEND,\r
+       DCNT_EP_POST_SEND_DATA,\r
+       DCNT_EP_POST_SEND_UD,\r
+       DCNT_EP_POST_SEND_UD_DATA,\r
+       DCNT_EP_POST_RECV,\r
+       DCNT_EP_POST_RECV_DATA,\r
+       DCNT_EP_POST_WRITE,\r
+       DCNT_EP_POST_WRITE_DATA,\r
+       DCNT_EP_POST_WRITE_IMM,\r
+       DCNT_EP_POST_WRITE_IMM_DATA,\r
+       DCNT_EP_POST_READ,\r
+       DCNT_EP_POST_READ_DATA,\r
+       DCNT_EP_POST_CMP_SWAP,\r
+       DCNT_EP_POST_FETCH_ADD,\r
+       DCNT_EP_RECV,\r
+       DCNT_EP_RECV_DATA,\r
+       DCNT_EP_RECV_UD,\r
+       DCNT_EP_RECV_UD_DATA,\r
+       DCNT_EP_RECV_IMM,\r
+       DCNT_EP_RECV_IMM_DATA,\r
+       DCNT_EP_RECV_RDMA_IMM,\r
+       DCNT_EP_RECV_RDMA_IMM_DATA,\r
+       DCNT_EP_ALL_COUNTERS,  /* MUST be last */\r
+\r
+} DAT_EP_COUNTERS;\r
+\r
+/*\r
+ * Definitions for 64-bit EVD Counters\r
+ */\r
+typedef enum dat_evd_counters\r
+{\r
+       DCNT_EVD_WAIT,\r
+       DCNT_EVD_WAIT_BLOCKED,\r
+       DCNT_EVD_WAIT_NOTIFY,\r
+       DCNT_EVD_DEQUEUE,\r
+       DCNT_EVD_DEQUEUE_FOUND,\r
+       DCNT_EVD_DEQUEUE_NOT_FOUND,\r
+       DCNT_EVD_DEQUEUE_POLL,\r
+       DCNT_EVD_DEQUEUE_POLL_FOUND,\r
+       DCNT_EVD_CONN_CALLBACK,\r
+       DCNT_EVD_DTO_CALLBACK,\r
+       DCNT_EVD_ALL_COUNTERS,  /* MUST be last */\r
+\r
+} DAT_EVD_COUNTERS;\r
 \r
 /* \r
  * Definitions for extended event data:\r
@@ -306,5 +409,32 @@ dat_strerror_ext_status (
                                (idata), \\r
                                (flgs))\r
 \r
+\r
+/* \r
+ * Query counter(s):  \r
+ * Provide IA, EP, or EVD and call will return appropriate counters\r
+ *     DAT_HANDLE dat_handle, enum cntr, *DAT_UINT64 p_cntrs_out, int reset\r
+ *\r
+ * use _ALL_COUNTERS to query all\r
+ */\r
+#define dat_query_counters(dat_handle, cntr, p_cntrs_out, reset) \\r
+            dat_extension_op(  dat_handle, \\r
+                               DAT_QUERY_COUNTERS_OP, \\r
+                               (cntr), \\r
+                               (p_cntrs_out), \\r
+                               (reset))\r
+/* \r
+ * Print counter(s):  \r
+ * Provide IA, EP, or EVD and call will print appropriate counters\r
+ *     DAT_HANDLE dat_handle, int cntr, int reset\r
+ * \r
+ * use _ALL_COUNTERS to print all\r
+ */\r
+#define dat_print_counters(dat_handle, cntr, reset) \\r
+            dat_extension_op(  dat_handle, \\r
+                               DAT_PRINT_COUNTERS_OP, \\r
+                               (cntr), \\r
+                               (reset))\r
+\r
 #endif /* _DAT_IB_EXTENSIONS_H_ */\r
 \r