[opensm] removed opensm\user\include\ib_types.h, even though it was not used, it...
[mirror/winof/.git] / core / winverbs / kernel / wv_qp.h
1 /*\r
2  * Copyright (c) 2008 Intel Corporation. All rights reserved.\r
3  *\r
4  * This software is available to you under the OpenIB.org BSD license\r
5  * below:\r
6  *\r
7  *     Redistribution and use in source and binary forms, with or\r
8  *     without modification, are permitted provided that the following\r
9  *     conditions are met:\r
10  *\r
11  *      - Redistributions of source code must retain the above\r
12  *        copyright notice, this list of conditions and the following\r
13  *        disclaimer.\r
14  *\r
15  *      - Redistributions in binary form must reproduce the above\r
16  *        copyright notice, this list of conditions and the following\r
17  *        disclaimer in the documentation and/or other materials\r
18  *        provided with the distribution.\r
19  *\r
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV\r
23  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
24  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
25  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
26  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
27  * SOFTWARE.\r
28  */\r
29 \r
30 #pragma once\r
31 \r
32 #ifndef _WV_QP_H_\r
33 #define _WV_QP_H_\r
34 \r
35 #include <ntddk.h>\r
36 #include <wdm.h>\r
37 #include <iba\ib_types.h>\r
38 #include <iba\ib_ci.h>\r
39 \r
40 #include "wv_pd.h"\r
41 #include "wv_provider.h"\r
42 #include "wv_cq.h"\r
43 #include "wv_srq.h"\r
44 \r
45 typedef struct _WV_QUEUE_PAIR\r
46 {\r
47         WV_PROVIDER                             *pProvider;\r
48         WV_PROTECTION_DOMAIN    *pPd;\r
49         WV_COMPLETION_QUEUE             *pSendCq;\r
50         WV_COMPLETION_QUEUE             *pReceiveCq;\r
51         WV_SHARED_RECEIVE_QUEUE *pSrq;\r
52         ci_interface_t                  *pVerbs;\r
53         ib_qp_handle_t                  hVerbsQp;\r
54         UINT32                                  Qpn;\r
55         LIST_ENTRY                              Entry;\r
56         LIST_ENTRY                              McList;\r
57 \r
58         KGUARDED_MUTEX                  Lock;\r
59         KEVENT                                  Event;\r
60         LONG                                    Ref;\r
61 \r
62 }       WV_QUEUE_PAIR;\r
63 \r
64 void WvQpCreate(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
65 void WvQpDestroy(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
66 void WvQpFree(WV_QUEUE_PAIR *pQp);\r
67 void WvQpRemoveHandler(WV_QUEUE_PAIR *pQp);\r
68 \r
69 WV_QUEUE_PAIR *WvQpAcquire(WV_PROVIDER *pProvider, UINT64 Id);\r
70 void WvQpRelease(WV_QUEUE_PAIR *pQp);\r
71 \r
72 void WvQpModify(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
73 void WvQpQuery(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
74 void WvQpAttach(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
75 void WvQpDetach(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
76 void WvQpCancel(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
77 \r
78 #endif // _WV_QP_H_\r