[opensm] removed opensm\user\include\ib_types.h, even though it was not used, it...
[mirror/winof/.git] / core / winverbs / wv_ioctl.h
index 5086e79..898a392 100644 (file)
@@ -81,9 +81,9 @@ enum {
        WV_IO_FUNCTION_QP_ATTACH,\r
        WV_IO_FUNCTION_QP_DETACH,\r
        WV_IO_FUNCTION_QP_CANCEL,\r
-       WV_IO_FUNCTION_ADDRESS_QUERY,\r
        WV_IO_FUNCTION_EP_CREATE,\r
        WV_IO_FUNCTION_EP_DESTROY,\r
+       WV_IO_FUNCTION_EP_MODIFY,\r
        WV_IO_FUNCTION_EP_BIND,\r
        WV_IO_FUNCTION_EP_REJECT,\r
        WV_IO_FUNCTION_EP_CONNECT,\r
@@ -95,10 +95,9 @@ enum {
        WV_IO_FUNCTION_EP_MULTICAST_JOIN,\r
        WV_IO_FUNCTION_EP_MULTICAST_LEAVE,\r
        WV_IO_FUNCTION_EP_CANCEL,\r
-       WV_IO_FUNCTION_LISTEN,\r
-       WV_IO_FUNCTION_LISTEN_DESTROY,\r
-       WV_IO_FUNCTION_LISTEN_GET_REQUEST,\r
-       WV_IO_FUNCTION_LISTEN_CANCEL,\r
+       WV_IO_FUNCTION_EP_LISTEN,\r
+       WV_IO_FUNCTION_EP_GET_REQUEST,\r
+       WV_IO_FUNCTION_PD_CANCEL,\r
        WV_IO_FUNCTION_MAX\r
 };\r
 \r
@@ -150,6 +149,10 @@ enum {
 #define WV_IOCTL_PD_DEALLOCATE                 WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_PD_DEALLOCATE)\r
 \r
+// UINT64 Id / none\r
+#define WV_IOCTL_PD_CANCEL                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
+                                                                                                WV_IO_FUNCTION_PD_CANCEL)\r
+\r
 // WV_IO_MEMORY_REGISTER / WV_IO_MEMORY_KEYS\r
 #define WV_IOCTL_MEMORY_REGISTER               WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_MEMORY_REGISTER)\r
@@ -230,7 +233,7 @@ enum {
 #define WV_IOCTL_QP_QUERY                              WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_QP_QUERY)\r
 \r
-// WV_IO_QP_ATTRIBUTES / none\r
+// WV_IO_QP_ATTRIBUTES / verbs specific\r
 #define WV_IOCTL_QP_MODIFY                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_QP_MODIFY)\r
 \r
@@ -246,43 +249,69 @@ enum {
 #define WV_IOCTL_QP_CANCEL                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_QP_CANCEL)\r
 \r
-// TODO\r
-#define WV_IOCTL_ADDRESS_QUERY                 WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
-                                                                                                WV_IO_FUNCTION_ADDRESS_QUERY)\r
+// UINT64 EpType / UINT64 Id\r
 #define WV_IOCTL_EP_CREATE                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_CREATE)\r
+\r
+// UINT64 Id / none\r
 #define WV_IOCTL_EP_DESTROY                            WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_DESTROY)\r
+\r
+// WV_IO_ID + UINT8[] / none\r
+#define WV_IOCTL_EP_MODIFY                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
+                                                                                                WV_IO_FUNCTION_EP_MODIFY)\r
+\r
+// WV_IO_EP_BIND / WV_IO_EP_BIND\r
 #define WV_IOCTL_EP_BIND                               WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_BIND)\r
+\r
+// WV_IO_ID + UINT8[] / none\r
 #define WV_IOCTL_EP_REJECT                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_REJECT)\r
+\r
+// WV_IO_EP_CONNECT / none\r
 #define WV_IOCTL_EP_CONNECT                            WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_CONNECT)\r
+\r
+// WV_IO_EP_ACCEPT / verbs specific\r
 #define WV_IOCTL_EP_ACCEPT                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_ACCEPT)\r
+\r
+// WV_IO_EP_DISCONNECT/ verbs specific\r
 #define WV_IOCTL_EP_DISCONNECT                 WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_DISCONNECT)\r
+\r
+// UINT64 Id / none\r
 #define WV_IOCTL_EP_DISCONNECT_NOTIFY  WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_DISCONNECT_NOTIFY)\r
+\r
+// UINT64 Id / WV_IO_EP_ATTRIBUTES\r
 #define WV_IOCTL_EP_QUERY                              WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_QUERY)\r
+\r
+// TODO\r
 #define WV_IOCTL_EP_LOOKUP                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_LOOKUP)\r
+\r
+// TODO\r
 #define WV_IOCTL_EP_MULTICAST_JOIN             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_MULTICAST_JOIN)\r
+\r
+// TODO\r
 #define WV_IOCTL_EP_MULTICAST_LEAVE            WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_MULTICAST_LEAVE)\r
+\r
+// UINT64 Id / none\r
 #define WV_IOCTL_EP_CANCEL                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
                                                                                                 WV_IO_FUNCTION_EP_CANCEL)\r
-#define WV_IOCTL_LISTEN                                        WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
-                                                                                                WV_IO_FUNCTION_LISTEN)\r
-#define WV_IOCTL_LISTEN_DESTROY                        WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
-                                                                                                WV_IO_FUNCTION_LISTEN_DESTROY)\r
-#define WV_IOCTL_LISTEN_GET_REQUEST            WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
-                                                                                                WV_IO_FUNCTION_LISTEN_GET_REQUEST)\r
-#define WV_IOCTL_LISTEN_CANCEL                 WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
-                                                                                                WV_IO_FUNCTION_LISTEN_CANCEL)\r
+\r
+// WV_IO_EP_LISTEN / none\r
+#define WV_IOCTL_EP_LISTEN                             WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
+                                                                                                WV_IO_FUNCTION_EP_LISTEN)\r
+\r
+// WV_IO_EP_GET_REQUEST / none\r
+#define WV_IOCTL_EP_GET_REQUEST                        WV_IOCTL(WV_IO_FUNCTION_BASE + \\r
+                                                                                                WV_IO_FUNCTION_EP_GET_REQUEST)\r
 \r
 #define WV_IOCTL_MIN                                   WV_IO_FUNCTION_BASE + WV_IO_FUNCTION_MIN\r
 #define WV_IOCTL_MAX                                   WV_IO_FUNCTION_BASE + WV_IO_FUNCTION_MAX\r
@@ -478,8 +507,8 @@ typedef struct _WV_IO_AH_CREATE
 }      WV_IO_AH_CREATE;\r
 \r
 #define WV_CQ_ERROR                            0\r
-#define        WV_CQ_SOLICITED                 1\r
-#define        WV_CQ_NEXT_COMPLETION   2\r
+#define        WV_CQ_NEXT_COMPLETION   1\r
+#define        WV_CQ_SOLICITED                 2\r
 \r
 typedef struct _WV_IO_SRQ_ATTRIBUTES\r
 {\r
@@ -592,20 +621,132 @@ typedef struct _WV_IO_QP_MULTICAST
 \r
 }      WV_IO_QP_MULTICAST;\r
 \r
-// TODO:\r
-//WV_IO_ADDRESS_QUERY\r
-//WV_IO_EP_CREATE\r
-//WV_IO_EP_BIND\r
-//WV_IO_EP_REJECT\r
-//WV_IO_EP_CONNECT\r
-//WV_IO_EP_ACCEPT\r
-//WV_IO_EP_DISCONNECT\r
-//WV_IO_EP_DISCONNECT_NOTIFY\r
-//WV_IO_EP_QUERY\r
-//WV_IO_EP_LOOKUP\r
-//WV_IO_EP_MULTICAST_JOIN\r
-//WV_IO_EP_MULTICAST_LEAVE\r
-//WV_IO_LISTEN\r
-//WV_IO_LISTEN_GET_REQUEST\r
+// Windows kernel does not define sockaddr* pre-Vista\r
+typedef struct _WV_IO_SOCKADDR\r
+{\r
+       UINT16                  SaFamily;\r
+       UINT8                   SaData[14];\r
+\r
+}      WV_IO_SOCKADDR;\r
+\r
+typedef struct _WV_IO_SOCKADDR_IN\r
+{\r
+       UINT16                  SinFamily;\r
+       UINT16                  SinPort;\r
+       UINT32                  SinAddr;\r
+       UINT8                   SinZero[8];\r
+\r
+}      WV_IO_SOCKADDR_IN;\r
+\r
+typedef struct _WV_IO_SOCKADDR_IN6\r
+{\r
+       UINT16                  Sin6Family;\r
+       UINT16                  Sin6Port;\r
+       UINT32                  Sin6FlowInfo;\r
+       UINT8                   Sin6Addr[16];\r
+       UINT32                  Sin6ScopeId;\r
+\r
+}      WV_IO_SOCKADDR_IN6;\r
+\r
+typedef struct _WV_IO_SOCKADDR_DATA\r
+{\r
+       union\r
+       {\r
+               WV_IO_SOCKADDR          Sa;\r
+               WV_IO_SOCKADDR_IN       In;\r
+               WV_IO_SOCKADDR_IN6      In6;\r
+\r
+       }       SockAddr;\r
+\r
+       UINT32                                  Reserved;\r
+\r
+}      WV_IO_SOCKADDR_DATA;\r
+\r
+typedef struct _WV_IO_DEVICE_ADDRESS\r
+{\r
+       NET64                   DeviceGuid;\r
+       NET16                   Pkey;\r
+       UINT8                   PortNumber;\r
+       UINT8                   Reserved[5];\r
+\r
+}      WV_IO_DEVICE_ADDRESS;\r
+\r
+typedef struct _WV_IO_EP_BIND\r
+{\r
+       UINT64                                  Id;\r
+       WV_IO_SOCKADDR_DATA             Address;\r
+       WV_IO_DEVICE_ADDRESS    Device;\r
+\r
+}      WV_IO_EP_BIND;\r
+\r
+#define WV_IO_EP_OPTION_ROUTE          0x00000001\r
+\r
+#define WV_IO_EP_TYPE_CONNECT          0x0106\r
+#define WV_IO_EP_TYPE_DATAGRAM         0x0111\r
+\r
+typedef struct _WV_IO_EP_LISTEN\r
+{\r
+       UINT64                  Id;\r
+       UINT64                  Backlog;\r
+\r
+}      WV_IO_EP_LISTEN;\r
+\r
+typedef struct _WV_IO_EP_GET_REQUEST\r
+{\r
+       UINT64                  Id;\r
+       UINT64                  EpId;\r
+\r
+}      WV_IO_EP_GET_REQUEST;\r
+\r
+typedef struct _WV_IO_CONNECT_PARAM\r
+{\r
+       UINT64                  ResponderResources;\r
+       UINT64                  InitiatorDepth;\r
+       UINT8                   RetryCount;\r
+       UINT8                   RnrRetryCount;\r
+       UINT8                   DataLength;\r
+       UINT8                   Reserved[5];\r
+       UINT8                   Data[56];\r
+\r
+}      WV_IO_CONNECT_PARAM;\r
+\r
+typedef struct _WV_IO_EP_CONNECT\r
+{\r
+       UINT64                                  Id;\r
+       UINT64                                  QpId;\r
+       WV_IO_SOCKADDR_DATA             PeerAddress;\r
+       WV_IO_CONNECT_PARAM             Param;\r
+\r
+}      WV_IO_EP_CONNECT;\r
+\r
+typedef struct _WV_IO_EP_ACCEPT\r
+{\r
+       UINT64                                  Id;\r
+       UINT64                                  QpId;\r
+       WV_IO_CONNECT_PARAM             Param;\r
+\r
+}      WV_IO_EP_ACCEPT;\r
+\r
+typedef struct _WV_IO_EP_ATTRIBUTES\r
+{\r
+       WV_IO_SOCKADDR_DATA             LocalAddress;\r
+       WV_IO_SOCKADDR_DATA             PeerAddress;\r
+       WV_IO_DEVICE_ADDRESS    Device;\r
+\r
+       union {\r
+               WV_IO_CONNECT_PARAM     Connect;\r
+               UINT64                          Backlog;\r
+\r
+       }       Param;\r
+\r
+\r
+}      WV_IO_EP_ATTRIBUTES;\r
+\r
+typedef struct _WV_IO_EP_DISCONNECT\r
+{\r
+       UINT64                                  Id;\r
+       UINT64                                  QpId;\r
+\r
+}      WV_IO_EP_DISCONNECT;\r
 \r
 #endif // _WV_IOCTL_H_\r