libibverbs: use comp_channel to enhance scalability
[mirror/winof/.git] / ulp / libibverbs / include / infiniband / verbs.h
index c849d75..6841463 100644 (file)
@@ -37,6 +37,8 @@
 \r
 #include <windows.h>\r
 #include <rdma\winverbs.h>\r
+#include <errno.h>\r
+#include <comp_channel.h>\r
 \r
 #ifdef __cplusplus\r
 extern "C" {\r
@@ -51,6 +53,16 @@ typedef unsigned __int16     uint16_t;
 typedef unsigned __int32       uint32_t;\r
 typedef unsigned __int64       uint64_t;\r
 \r
+#define EOVERFLOW              WV_BUFFER_OVERFLOW\r
+#define EISCONN                        WV_CONNECTION_ACTIVE\r
+#define ECONNREFUSED   WV_CONNECTION_REFUSED\r
+#define ETIMEDOUT              WV_TIMEOUT\r
+#define ENETUNREACH            WV_HOST_UNREACHABLE\r
+#define EADDRINUSE             WV_ADDRESS_ALREADY_EXISTS\r
+#define EALREADY               WV_IO_PENDING\r
+#define EAFNOSUPPORT   WV_INVALID_ADDRESS\r
+#define EWOULDBLOCK            WV_DEVICE_BUSY\r
+\r
 union ibv_gid\r
 {\r
        uint8_t                 raw[16];\r
@@ -636,8 +648,8 @@ struct ibv_qp
 \r
 struct ibv_comp_channel\r
 {\r
-       struct ibv_context     *context;\r
-       uint32_t                                timeout;\r
+       struct ibv_context              *context;\r
+       COMP_CHANNEL                    comp_channel;\r
 };\r
 \r
 struct ibv_cq\r
@@ -646,9 +658,8 @@ struct ibv_cq
        struct ibv_comp_channel *channel;\r
        void                                    *cq_context;\r
        IWVCompletionQueue              *handle;\r
-       OVERLAPPED                              overlap;\r
        int                                             cqe;\r
-       uint32_t                                comp_events_completed;\r
+       COMP_ENTRY                              comp_entry;\r
 };\r
 \r
 struct ibv_ah\r
@@ -678,7 +689,7 @@ struct ibv_context
 {\r
        struct ibv_device               *device;\r
        IWVDevice                               *cmd_if;\r
-       uint32_t                                timeout;\r
+       COMP_CHANNEL                    channel;\r
 };\r
 \r
 /**\r
@@ -1103,6 +1114,23 @@ const char *ibv_port_state_str(enum ibv_port_state port_state);
 __declspec(dllexport)\r
 const char *ibv_event_type_str(enum ibv_event_type event);\r
 \r
+/*\r
+ * Windows specific structures and interfaces\r
+ */\r
+struct ibv_windata\r
+{\r
+       IWVProvider             *prov;\r
+       COMP_MANAGER    *comp_mgr;\r
+};\r
+\r
+#define IBV_WINDATA_VERSION 1\r
+\r
+__declspec(dllexport)\r
+int ibv_get_windata(struct ibv_windata *windata, int version);\r
+\r
+__declspec(dllexport)\r
+void ibv_release_windata(struct ibv_windata *windata, int version);\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r