History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma

Pull rdma updates from Doug Ledford: "This is the complete update for the rdma stack for this release cycle. Most of it is typical driver and core updates, but there is the entirely new VMWare pvrdma driver. You may have noticed that there were changes in DaveM's pull request to the bnxt Ethernet driver to support a RoCE RDMA driver. The bnxt_re driver was tentatively set to be pulled in this release cycle, but it simply wasn't ready in time and was dropped (a few review comments still to address, and some multi-arch build issues like prefetch() not working across all arches). Summary: - shared mlx5 updates with net stack (will drop out on merge if Dave's tree has already been merged) - driver updates: cxgb4, hfi1, hns-roce, i40iw, mlx4, mlx5, qedr, rxe - debug cleanups - new connection rejection helpers - SRP updates - various misc fixes - new paravirt driver from vmware" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (210 commits) IB: Add vmw_pvrdma driver IB/mlx4: fix improper return value IB/ocrdma: fix bad initialization infiniband: nes: return value of skb_linearize should be handled MAINTAINERS: Update Intel RDMA RNIC driver maintainers MAINTAINERS: Remove Mitesh Ahuja from emulex maintainers IB/core: fix unmap_sg argument qede: fix general protection fault may occur on probe IB/mthca: Replace pci_pool_alloc by pci_pool_zalloc mlx5, calc_sq_size(): Make a debug message more informative mlx5: Remove a set-but-not-used variable mlx5: Use { } instead of { 0 } to init struct IB/srp: Make writing the add_target sysfs attr interruptible IB/srp: Make mapping failures easier to debug IB/srp: Make login failures easier to debug IB/srp: Introduce a local variable in srp_add_one() IB/srp: Fix CONFIG_DYNAMIC_DEBUG=n build IB/multicast: Check ib_find_pkey() return value IPoIB: Avoid reading an uninitialized member variable IB/mad: Fix an array index check ...

Linus Torvalds committed 9 years ago

Commit 4d5b57e2 parents 6df8b74 6f94ba2203 files · +12276 −2656Browse files

Showing the changes to include/uapi (7 of 203 files). Show all

Unified · Split

7 files
  1. include/uapi/rdma/Kbuild +2 −0
  2. include/uapi/rdma/hfi/hfi1_user.h +1 −1
  3. include/uapi/rdma/hns-abi.h +54 −0
  4. include/uapi/rdma/ib_user_verbs.h +38 −0
  5. include/uapi/rdma/mlx5-abi.h +37 −1
  6. include/uapi/rdma/rdma_user_cm.h +6 −6
  7. include/uapi/rdma/vmw_pvrdma-abi.h +289 −0
include/uapi/rdma/Kbuild+2−0
@@ -14,3 +14,5 @@ header-y += mlx5-abi.h · 13 unmodified lines
14header-y += mthca-abi.h14header-y += mthca-abi.h
15header-y += nes-abi.h15header-y += nes-abi.h
16header-y += ocrdma-abi.h16header-y += ocrdma-abi.h
17header-y += hns-abi.h
18header-y += vmw_pvrdma-abi.h
include/uapi/rdma/hfi/hfi1_user.h+1−1
@@ -75,7 +75,7 @@ · 74 unmodified lines
75 * may not be implemented; the user code must deal with this if it75 * may not be implemented; the user code must deal with this if it
76 * cares, or it must abort after initialization reports the difference.76 * cares, or it must abort after initialization reports the difference.
77 */77 */
78#define HFI1_USER_SWMINOR 278#define HFI1_USER_SWMINOR 3
79 79
80/*80/*
81 * We will encode the major/minor inside a single 32bit version number.81 * We will encode the major/minor inside a single 32bit version number.
include/uapi/rdma/hns-abi.h+54−0
@@ -0,0 +1,54 @@
1/*
2 * Copyright (c) 2016 Hisilicon Limited.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef HNS_ABI_USER_H
34#define HNS_ABI_USER_H
35
36#include <linux/types.h>
37
38struct hns_roce_ib_create_cq {
39 __u64 buf_addr;
40};
41
42struct hns_roce_ib_create_qp {
43 __u64 buf_addr;
44 __u64 db_addr;
45 __u8 log_sq_bb_count;
46 __u8 log_sq_stride;
47 __u8 sq_no_prefetch;
48 __u8 reserved[5];
49};
50
51struct hns_roce_ib_alloc_ucontext_resp {
52 __u32 qp_tab_size;
53};
54#endif /* HNS_ABI_USER_H */
include/uapi/rdma/ib_user_verbs.h+38−0
@@ -37,6 +37,7 @@ · 36 unmodified lines
37#define IB_USER_VERBS_H37#define IB_USER_VERBS_H
38 38
39#include <linux/types.h>39#include <linux/types.h>
40#include <rdma/ib_verbs.h>
40 41
41/*42/*
42 * Increment this value if any changes that break userspace ABI43 * Increment this value if any changes that break userspace ABI
@@ -93,6 +94,7 @@ enum { · 50 unmodified lines
93 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,94 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
94 IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,95 IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
95 IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,96 IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
97 IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
96 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,98 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
97 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,99 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
98 IB_USER_VERBS_EX_CMD_CREATE_WQ,100 IB_USER_VERBS_EX_CMD_CREATE_WQ,
@@ -545,6 +547,14 @@ enum { · 446 unmodified lines
545 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,547 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
546};548};
547 549
550enum {
551 IB_USER_LEGACY_LAST_QP_ATTR_MASK = IB_QP_DEST_QPN
552};
553
554enum {
555 IB_USER_LAST_QP_ATTR_MASK = IB_QP_RATE_LIMIT
556};
557
548struct ib_uverbs_ex_create_qp {558struct ib_uverbs_ex_create_qp {
549 __u64 user_handle;559 __u64 user_handle;
550 __u32 pd_handle;560 __u32 pd_handle;
@@ -684,9 +694,20 @@ struct ib_uverbs_modify_qp { · 133 unmodified lines
684 __u64 driver_data[0];694 __u64 driver_data[0];
685};695};
686 696
697struct ib_uverbs_ex_modify_qp {
698 struct ib_uverbs_modify_qp base;
699 __u32 rate_limit;
700 __u32 reserved;
701};
702
687struct ib_uverbs_modify_qp_resp {703struct ib_uverbs_modify_qp_resp {
688};704};
689 705
706struct ib_uverbs_ex_modify_qp_resp {
707 __u32 comp_mask;
708 __u32 response_length;
709};
710
690struct ib_uverbs_destroy_qp {711struct ib_uverbs_destroy_qp {
691 __u64 response;712 __u64 response;
692 __u32 qp_handle;713 __u32 qp_handle;
@@ -908,6 +929,23 @@ struct ib_uverbs_flow_spec_ipv6 { · 215 unmodified lines
908 struct ib_uverbs_flow_ipv6_filter mask;929 struct ib_uverbs_flow_ipv6_filter mask;
909};930};
910 931
932struct ib_uverbs_flow_tunnel_filter {
933 __be32 tunnel_id;
934};
935
936struct ib_uverbs_flow_spec_tunnel {
937 union {
938 struct ib_uverbs_flow_spec_hdr hdr;
939 struct {
940 __u32 type;
941 __u16 size;
942 __u16 reserved;
943 };
944 };
945 struct ib_uverbs_flow_tunnel_filter val;
946 struct ib_uverbs_flow_tunnel_filter mask;
947};
948
911struct ib_uverbs_flow_attr {949struct ib_uverbs_flow_attr {
912 __u32 type;950 __u32 type;
913 __u16 size;951 __u16 size;
include/uapi/rdma/mlx5-abi.h+37−1
@@ -82,6 +82,7 @@ enum mlx5_ib_alloc_ucontext_resp_mask { · 81 unmodified lines
82 82
83enum mlx5_user_cmds_supp_uhw {83enum mlx5_user_cmds_supp_uhw {
84 MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0,84 MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0,
85 MLX5_USER_CMDS_SUPP_UHW_CREATE_AH = 1 << 1,
85};86};
86 87
87struct mlx5_ib_alloc_ucontext_resp {88struct mlx5_ib_alloc_ucontext_resp {
@@ -124,18 +125,47 @@ struct mlx5_ib_rss_caps { · 36 unmodified lines
124 __u8 reserved[7];125 __u8 reserved[7];
125};126};
126 127
128enum mlx5_ib_cqe_comp_res_format {
129 MLX5_IB_CQE_RES_FORMAT_HASH = 1 << 0,
130 MLX5_IB_CQE_RES_FORMAT_CSUM = 1 << 1,
131 MLX5_IB_CQE_RES_RESERVED = 1 << 2,
132};
133
134struct mlx5_ib_cqe_comp_caps {
135 __u32 max_num;
136 __u32 supported_format; /* enum mlx5_ib_cqe_comp_res_format */
137};
138
139struct mlx5_packet_pacing_caps {
140 __u32 qp_rate_limit_min;
141 __u32 qp_rate_limit_max; /* In kpbs */
142
143 /* Corresponding bit will be set if qp type from
144 * 'enum ib_qp_type' is supported, e.g.
145 * supported_qpts |= 1 << IB_QPT_RAW_PACKET
146 */
147 __u32 supported_qpts;
148 __u32 reserved;
149};
150
127struct mlx5_ib_query_device_resp {151struct mlx5_ib_query_device_resp {
128 __u32 comp_mask;152 __u32 comp_mask;
129 __u32 response_length;153 __u32 response_length;
130 struct mlx5_ib_tso_caps tso_caps;154 struct mlx5_ib_tso_caps tso_caps;
131 struct mlx5_ib_rss_caps rss_caps;155 struct mlx5_ib_rss_caps rss_caps;
156 struct mlx5_ib_cqe_comp_caps cqe_comp_caps;
157 struct mlx5_packet_pacing_caps packet_pacing_caps;
158 __u32 mlx5_ib_support_multi_pkt_send_wqes;
159 __u32 reserved;
132};160};
133 161
134struct mlx5_ib_create_cq {162struct mlx5_ib_create_cq {
135 __u64 buf_addr;163 __u64 buf_addr;
136 __u64 db_addr;164 __u64 db_addr;
137 __u32 cqe_size;165 __u32 cqe_size;
138 __u32 reserved; /* explicit padding (optional on i386) */166 __u8 cqe_comp_en;
167 __u8 cqe_comp_res_format;
168 __u16 reserved; /* explicit padding (optional on i386) */
139};169};
140 170
141struct mlx5_ib_create_cq_resp {171struct mlx5_ib_create_cq_resp {
@@ -232,6 +262,12 @@ struct mlx5_ib_create_wq { · 90 unmodified lines
232 __u32 reserved;262 __u32 reserved;
233};263};
234 264
265struct mlx5_ib_create_ah_resp {
266 __u32 response_length;
267 __u8 dmac[ETH_ALEN];
268 __u8 reserved[6];
269};
270
235struct mlx5_ib_create_wq_resp {271struct mlx5_ib_create_wq_resp {
236 __u32 response_length;272 __u32 response_length;
237 __u32 reserved;273 __u32 reserved;
include/uapi/rdma/rdma_user_cm.h+6−6
@@ -110,7 +110,7 @@ struct rdma_ucm_bind { · 109 unmodified lines
110 __u32 id;110 __u32 id;
111 __u16 addr_size;111 __u16 addr_size;
112 __u16 reserved;112 __u16 reserved;
113 struct sockaddr_storage addr;113 struct __kernel_sockaddr_storage addr;
114};114};
115 115
116struct rdma_ucm_resolve_ip {116struct rdma_ucm_resolve_ip {
@@ -126,8 +126,8 @@ struct rdma_ucm_resolve_addr { · 9 unmodified lines
126 __u16 src_size;126 __u16 src_size;
127 __u16 dst_size;127 __u16 dst_size;
128 __u32 reserved;128 __u32 reserved;
129 struct sockaddr_storage src_addr;129 struct __kernel_sockaddr_storage src_addr;
130 struct sockaddr_storage dst_addr;130 struct __kernel_sockaddr_storage dst_addr;
131};131};
132 132
133struct rdma_ucm_resolve_route {133struct rdma_ucm_resolve_route {
@@ -164,8 +164,8 @@ struct rdma_ucm_query_addr_resp { · 30 unmodified lines
164 __u16 pkey;164 __u16 pkey;
165 __u16 src_size;165 __u16 src_size;
166 __u16 dst_size;166 __u16 dst_size;
167 struct sockaddr_storage src_addr;167 struct __kernel_sockaddr_storage src_addr;
168 struct sockaddr_storage dst_addr;168 struct __kernel_sockaddr_storage dst_addr;
169};169};
170 170
171struct rdma_ucm_query_path_resp {171struct rdma_ucm_query_path_resp {
@@ -257,7 +257,7 @@ struct rdma_ucm_join_mcast { · 85 unmodified lines
257 __u32 id;257 __u32 id;
258 __u16 addr_size;258 __u16 addr_size;
259 __u16 join_flags;259 __u16 join_flags;
260 struct sockaddr_storage addr;260 struct __kernel_sockaddr_storage addr;
261};261};
262 262
263struct rdma_ucm_get_event {263struct rdma_ucm_get_event {
include/uapi/rdma/vmw_pvrdma-abi.h+289−0
@@ -0,0 +1,289 @@
1/*
2 * Copyright (c) 2012-2016 VMware, Inc. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of EITHER the GNU General Public License
6 * version 2 as published by the Free Software Foundation or the BSD
7 * 2-Clause License. This program is distributed in the hope that it
8 * will be useful, but WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED
9 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
10 * See the GNU General Public License version 2 for more details at
11 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program available in the file COPYING in the main
15 * directory of this source tree.
16 *
17 * The BSD 2-Clause License
18 *
19 * Redistribution and use in source and binary forms, with or
20 * without modification, are permitted provided that the following
21 * conditions are met:
22 *
23 * - Redistributions of source code must retain the above
24 * copyright notice, this list of conditions and the following
25 * disclaimer.
26 *
27 * - Redistributions in binary form must reproduce the above
28 * copyright notice, this list of conditions and the following
29 * disclaimer in the documentation and/or other materials
30 * provided with the distribution.
31 *
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
35 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
36 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
37 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
39 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
41 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
42 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
43 * OF THE POSSIBILITY OF SUCH DAMAGE.
44 */
45
46#ifndef __VMW_PVRDMA_ABI_H__
47#define __VMW_PVRDMA_ABI_H__
48
49#include <linux/types.h>
50
51#define PVRDMA_UVERBS_ABI_VERSION 3 /* ABI Version. */
52#define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF /* Bottom 24 bits. */
53#define PVRDMA_UAR_QP_OFFSET 0 /* QP doorbell. */
54#define PVRDMA_UAR_QP_SEND BIT(30) /* Send bit. */
55#define PVRDMA_UAR_QP_RECV BIT(31) /* Recv bit. */
56#define PVRDMA_UAR_CQ_OFFSET 4 /* CQ doorbell. */
57#define PVRDMA_UAR_CQ_ARM_SOL BIT(29) /* Arm solicited bit. */
58#define PVRDMA_UAR_CQ_ARM BIT(30) /* Arm bit. */
59#define PVRDMA_UAR_CQ_POLL BIT(31) /* Poll bit. */
60
61enum pvrdma_wr_opcode {
62 PVRDMA_WR_RDMA_WRITE,
63 PVRDMA_WR_RDMA_WRITE_WITH_IMM,
64 PVRDMA_WR_SEND,
65 PVRDMA_WR_SEND_WITH_IMM,
66 PVRDMA_WR_RDMA_READ,
67 PVRDMA_WR_ATOMIC_CMP_AND_SWP,
68 PVRDMA_WR_ATOMIC_FETCH_AND_ADD,
69 PVRDMA_WR_LSO,
70 PVRDMA_WR_SEND_WITH_INV,
71 PVRDMA_WR_RDMA_READ_WITH_INV,
72 PVRDMA_WR_LOCAL_INV,
73 PVRDMA_WR_FAST_REG_MR,
74 PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP,
75 PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD,
76 PVRDMA_WR_BIND_MW,
77 PVRDMA_WR_REG_SIG_MR,
78};
79
80enum pvrdma_wc_status {
81 PVRDMA_WC_SUCCESS,
82 PVRDMA_WC_LOC_LEN_ERR,
83 PVRDMA_WC_LOC_QP_OP_ERR,
84 PVRDMA_WC_LOC_EEC_OP_ERR,
85 PVRDMA_WC_LOC_PROT_ERR,
86 PVRDMA_WC_WR_FLUSH_ERR,
87 PVRDMA_WC_MW_BIND_ERR,
88 PVRDMA_WC_BAD_RESP_ERR,
89 PVRDMA_WC_LOC_ACCESS_ERR,
90 PVRDMA_WC_REM_INV_REQ_ERR,
91 PVRDMA_WC_REM_ACCESS_ERR,
92 PVRDMA_WC_REM_OP_ERR,
93 PVRDMA_WC_RETRY_EXC_ERR,
94 PVRDMA_WC_RNR_RETRY_EXC_ERR,
95 PVRDMA_WC_LOC_RDD_VIOL_ERR,
96 PVRDMA_WC_REM_INV_RD_REQ_ERR,
97 PVRDMA_WC_REM_ABORT_ERR,
98 PVRDMA_WC_INV_EECN_ERR,
99 PVRDMA_WC_INV_EEC_STATE_ERR,
100 PVRDMA_WC_FATAL_ERR,
101 PVRDMA_WC_RESP_TIMEOUT_ERR,
102 PVRDMA_WC_GENERAL_ERR,
103};
104
105enum pvrdma_wc_opcode {
106 PVRDMA_WC_SEND,
107 PVRDMA_WC_RDMA_WRITE,
108 PVRDMA_WC_RDMA_READ,
109 PVRDMA_WC_COMP_SWAP,
110 PVRDMA_WC_FETCH_ADD,
111 PVRDMA_WC_BIND_MW,
112 PVRDMA_WC_LSO,
113 PVRDMA_WC_LOCAL_INV,
114 PVRDMA_WC_FAST_REG_MR,
115 PVRDMA_WC_MASKED_COMP_SWAP,
116 PVRDMA_WC_MASKED_FETCH_ADD,
117 PVRDMA_WC_RECV = 1 << 7,
118 PVRDMA_WC_RECV_RDMA_WITH_IMM,
119};
120
121enum pvrdma_wc_flags {
122 PVRDMA_WC_GRH = 1 << 0,
123 PVRDMA_WC_WITH_IMM = 1 << 1,
124 PVRDMA_WC_WITH_INVALIDATE = 1 << 2,
125 PVRDMA_WC_IP_CSUM_OK = 1 << 3,
126 PVRDMA_WC_WITH_SMAC = 1 << 4,
127 PVRDMA_WC_WITH_VLAN = 1 << 5,
128 PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_VLAN,
129};
130
131struct pvrdma_alloc_ucontext_resp {
132 __u32 qp_tab_size;
133 __u32 reserved;
134};
135
136struct pvrdma_alloc_pd_resp {
137 __u32 pdn;
138 __u32 reserved;
139};
140
141struct pvrdma_create_cq {
142 __u64 buf_addr;
143 __u32 buf_size;
144 __u32 reserved;
145};
146
147struct pvrdma_create_cq_resp {
148 __u32 cqn;
149 __u32 reserved;
150};
151
152struct pvrdma_resize_cq {
153 __u64 buf_addr;
154 __u32 buf_size;
155 __u32 reserved;
156};
157
158struct pvrdma_create_srq {
159 __u64 buf_addr;
160};
161
162struct pvrdma_create_srq_resp {
163 __u32 srqn;
164 __u32 reserved;
165};
166
167struct pvrdma_create_qp {
168 __u64 rbuf_addr;
169 __u64 sbuf_addr;
170 __u32 rbuf_size;
171 __u32 sbuf_size;
172 __u64 qp_addr;
173};
174
175/* PVRDMA masked atomic compare and swap */
176struct pvrdma_ex_cmp_swap {
177 __u64 swap_val;
178 __u64 compare_val;
179 __u64 swap_mask;
180 __u64 compare_mask;
181};
182
183/* PVRDMA masked atomic fetch and add */
184struct pvrdma_ex_fetch_add {
185 __u64 add_val;
186 __u64 field_boundary;
187};
188
189/* PVRDMA address vector. */
190struct pvrdma_av {
191 __u32 port_pd;
192 __u32 sl_tclass_flowlabel;
193 __u8 dgid[16];
194 __u8 src_path_bits;
195 __u8 gid_index;
196 __u8 stat_rate;
197 __u8 hop_limit;
198 __u8 dmac[6];
199 __u8 reserved[6];
200};
201
202/* PVRDMA scatter/gather entry */
203struct pvrdma_sge {
204 __u64 addr;
205 __u32 length;
206 __u32 lkey;
207};
208
209/* PVRDMA receive queue work request */
210struct pvrdma_rq_wqe_hdr {
211 __u64 wr_id; /* wr id */
212 __u32 num_sge; /* size of s/g array */
213 __u32 total_len; /* reserved */
214};
215/* Use pvrdma_sge (ib_sge) for receive queue s/g array elements. */
216
217/* PVRDMA send queue work request */
218struct pvrdma_sq_wqe_hdr {
219 __u64 wr_id; /* wr id */
220 __u32 num_sge; /* size of s/g array */
221 __u32 total_len; /* reserved */
222 __u32 opcode; /* operation type */
223 __u32 send_flags; /* wr flags */
224 union {
225 __u32 imm_data;
226 __u32 invalidate_rkey;
227 } ex;
228 __u32 reserved;
229 union {
230 struct {
231 __u64 remote_addr;
232 __u32 rkey;
233 __u8 reserved[4];
234 } rdma;
235 struct {
236 __u64 remote_addr;
237 __u64 compare_add;
238 __u64 swap;
239 __u32 rkey;
240 __u32 reserved;
241 } atomic;
242 struct {
243 __u64 remote_addr;
244 __u32 log_arg_sz;
245 __u32 rkey;
246 union {
247 struct pvrdma_ex_cmp_swap cmp_swap;
248 struct pvrdma_ex_fetch_add fetch_add;
249 } wr_data;
250 } masked_atomics;
251 struct {
252 __u64 iova_start;
253 __u64 pl_pdir_dma;
254 __u32 page_shift;
255 __u32 page_list_len;
256 __u32 length;
257 __u32 access_flags;
258 __u32 rkey;
259 } fast_reg;
260 struct {
261 __u32 remote_qpn;
262 __u32 remote_qkey;
263 struct pvrdma_av av;
264 } ud;
265 } wr;
266};
267/* Use pvrdma_sge (ib_sge) for send queue s/g array elements. */
268
269/* Completion queue element. */
270struct pvrdma_cqe {
271 __u64 wr_id;
272 __u64 qp;
273 __u32 opcode;
274 __u32 status;
275 __u32 byte_len;
276 __u32 imm_data;
277 __u32 src_qp;
278 __u32 wc_flags;
279 __u32 vendor_err;
280 __u16 pkey_index;
281 __u16 slid;
282 __u8 sl;
283 __u8 dlid_path_bits;
284 __u8 port_num;
285 __u8 smac[6];
286 __u8 reserved2[7]; /* Pad to next power of 2 (64). */
287};
288
289#endif /* __VMW_PVRDMA_ABI_H__ */