1321936Shselasky/*
2321936Shselasky * Copyright (c) 2006-2016 Chelsio, Inc. All rights reserved.
3321936Shselasky *
4321936Shselasky * This software is available to you under a choice of one of two
5321936Shselasky * licenses.  You may choose to be licensed under the terms of the GNU
6321936Shselasky * General Public License (GPL) Version 2, available from the file
7321936Shselasky * COPYING in the main directory of this source tree, or the
8321936Shselasky * OpenIB.org BSD license below:
9321936Shselasky *
10321936Shselasky *     Redistribution and use in source and binary forms, with or
11321936Shselasky *     without modification, are permitted provided that the following
12321936Shselasky *     conditions are met:
13321936Shselasky *
14321936Shselasky *      - Redistributions of source code must retain the above
15321936Shselasky *        copyright notice, this list of conditions and the following
16321936Shselasky *        disclaimer.
17321936Shselasky *
18321936Shselasky *      - Redistributions in binary form must reproduce the above
19321936Shselasky *        copyright notice, this list of conditions and the following
20321936Shselasky *        disclaimer in the documentation and/or other materials
21321936Shselasky *        provided with the distribution.
22321936Shselasky *
23321936Shselasky * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24321936Shselasky * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25321936Shselasky * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26321936Shselasky * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27321936Shselasky * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28321936Shselasky * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29321936Shselasky * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30321936Shselasky * SOFTWARE.
31321936Shselasky */
32321936Shselasky#ifndef IWCH_ABI_H
33321936Shselasky#define IWCH_ABI_H
34321936Shselasky
35321936Shselasky#include <stdint.h>
36321936Shselasky#include <infiniband/kern-abi.h>
37321936Shselasky
38321936Shselaskystruct c4iw_alloc_ucontext_resp {
39321936Shselasky	struct ibv_get_context_resp ibv_resp;
40321936Shselasky	__u64 status_page_key;
41321936Shselasky	__u32 status_page_size;
42321936Shselasky	__u32 reserved;
43321936Shselasky};
44321936Shselasky
45321936Shselaskystruct c4iw_alloc_pd_resp {
46321936Shselasky	struct ibv_alloc_pd_resp ibv_resp;
47321936Shselasky	uint32_t pdid;
48321936Shselasky};
49321936Shselasky
50321936Shselaskystruct c4iw_create_cq_resp {
51321936Shselasky	struct ibv_create_cq_resp ibv_resp;
52321936Shselasky	__u64 key;
53321936Shselasky	__u64 gts_key;
54321936Shselasky	__u64 memsize;
55321936Shselasky	__u32 cqid;
56321936Shselasky	__u32 size;
57321936Shselasky	__u32 qid_mask;
58321936Shselasky	__u32 reserved;
59321936Shselasky};
60321936Shselasky
61321936Shselaskyenum {
62321936Shselasky	C4IW_QPF_ONCHIP = (1<<0),
63321936Shselasky};
64321936Shselasky
65321936Shselaskystruct c4iw_create_qp_resp_v0 {
66321936Shselasky	struct ibv_create_qp_resp ibv_resp;
67321936Shselasky	__u64 sq_key;
68321936Shselasky	__u64 rq_key;
69321936Shselasky	__u64 sq_db_gts_key;
70321936Shselasky	__u64 rq_db_gts_key;
71321936Shselasky	__u64 sq_memsize;
72321936Shselasky	__u64 rq_memsize;
73321936Shselasky	__u32 sqid;
74321936Shselasky	__u32 rqid;
75321936Shselasky	__u32 sq_size;
76321936Shselasky	__u32 rq_size;
77321936Shselasky	__u32 qid_mask;
78321936Shselasky};
79321936Shselasky
80321936Shselaskystruct c4iw_create_qp_resp {
81321936Shselasky	struct ibv_create_qp_resp ibv_resp;
82321936Shselasky	__u64 ma_sync_key;
83321936Shselasky	__u64 sq_key;
84321936Shselasky	__u64 rq_key;
85321936Shselasky	__u64 sq_db_gts_key;
86321936Shselasky	__u64 rq_db_gts_key;
87321936Shselasky	__u64 sq_memsize;
88321936Shselasky	__u64 rq_memsize;
89321936Shselasky	__u32 sqid;
90321936Shselasky	__u32 rqid;
91321936Shselasky	__u32 sq_size;
92321936Shselasky	__u32 rq_size;
93321936Shselasky	__u32 qid_mask;
94321936Shselasky	__u32 flags;
95321936Shselasky};
96321936Shselasky#endif				/* IWCH_ABI_H */
97