[opensm] removed opensm\user\include\ib_types.h, even though it was not used, it...
[mirror/winof/.git] / core / winverbs / kernel / wv_srq.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_SRQ_H_\r
33 #define _WV_SRQ_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 \r
43 typedef struct _WV_SHARED_RECEIVE_QUEUE\r
44 {\r
45         WV_PROVIDER                             *pProvider;\r
46         WV_PROTECTION_DOMAIN    *pPd;\r
47         ci_interface_t                  *pVerbs;\r
48         ib_srq_handle_t                 hVerbsSrq;\r
49         LIST_ENTRY                              Entry;\r
50 \r
51         KEVENT                                  Event;\r
52         LONG                                    Ref;\r
53         WDFQUEUE                                Queue;\r
54 \r
55 }       WV_SHARED_RECEIVE_QUEUE;\r
56 \r
57 void WvSrqCreate(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
58 void WvSrqDestroy(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
59 void WvSrqFree(WV_SHARED_RECEIVE_QUEUE *pSrq);\r
60 \r
61 WV_SHARED_RECEIVE_QUEUE *WvSrqAcquire(WV_PROVIDER *pProvider, UINT64 Id);\r
62 void WvSrqRelease(WV_SHARED_RECEIVE_QUEUE *pSrq);\r
63 void WvSrqGet(WV_SHARED_RECEIVE_QUEUE *pSrq);\r
64 void WvSrqPut(WV_SHARED_RECEIVE_QUEUE *pSrq);\r
65 \r
66 void WvSrqModify(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
67 void WvSrqQuery(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
68 void WvSrqNotify(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
69 void WvSrqCancel(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
70 \r
71 #endif // _WV_SRQ_H_\r