IB/core: Make uverbs flow structure use names like verbs ones
[deliverable/linux.git] / include / uapi / rdma / ib_user_verbs.h
CommitLineData
8a96b3f9
RD
1/*
2 * Copyright (c) 2005 Topspin Communications. All rights reserved.
33b9b3ee 3 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
91ecd4ae 4 * Copyright (c) 2005 PathScale, Inc. All rights reserved.
8bdb0e86 5 * Copyright (c) 2006 Mellanox Technologies. All rights reserved.
8a96b3f9
RD
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU
9 * General Public License (GPL) Version 2, available from the file
10 * COPYING in the main directory of this source tree, or the
11 * OpenIB.org BSD license below:
12 *
13 * Redistribution and use in source and binary forms, with or
14 * without modification, are permitted provided that the following
15 * conditions are met:
16 *
17 * - Redistributions of source code must retain the above
18 * copyright notice, this list of conditions and the following
19 * disclaimer.
20 *
21 * - Redistributions in binary form must reproduce the above
22 * copyright notice, this list of conditions and the following
23 * disclaimer in the documentation and/or other materials
24 * provided with the distribution.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
30 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
31 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 * SOFTWARE.
8a96b3f9
RD
34 */
35
36#ifndef IB_USER_VERBS_H
37#define IB_USER_VERBS_H
38
39#include <linux/types.h>
40
41/*
42 * Increment this value if any changes that break userspace ABI
43 * compatibility are made.
44 */
ea88fd16 45#define IB_USER_VERBS_ABI_VERSION 6
400dbc96 46#define IB_USER_VERBS_CMD_THRESHOLD 50
8a96b3f9
RD
47
48enum {
8a96b3f9
RD
49 IB_USER_VERBS_CMD_GET_CONTEXT,
50 IB_USER_VERBS_CMD_QUERY_DEVICE,
51 IB_USER_VERBS_CMD_QUERY_PORT,
8a96b3f9
RD
52 IB_USER_VERBS_CMD_ALLOC_PD,
53 IB_USER_VERBS_CMD_DEALLOC_PD,
54 IB_USER_VERBS_CMD_CREATE_AH,
55 IB_USER_VERBS_CMD_MODIFY_AH,
56 IB_USER_VERBS_CMD_QUERY_AH,
57 IB_USER_VERBS_CMD_DESTROY_AH,
58 IB_USER_VERBS_CMD_REG_MR,
59 IB_USER_VERBS_CMD_REG_SMR,
60 IB_USER_VERBS_CMD_REREG_MR,
61 IB_USER_VERBS_CMD_QUERY_MR,
62 IB_USER_VERBS_CMD_DEREG_MR,
63 IB_USER_VERBS_CMD_ALLOC_MW,
64 IB_USER_VERBS_CMD_BIND_MW,
65 IB_USER_VERBS_CMD_DEALLOC_MW,
6b73597e 66 IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
8a96b3f9
RD
67 IB_USER_VERBS_CMD_CREATE_CQ,
68 IB_USER_VERBS_CMD_RESIZE_CQ,
69 IB_USER_VERBS_CMD_DESTROY_CQ,
70 IB_USER_VERBS_CMD_POLL_CQ,
71 IB_USER_VERBS_CMD_PEEK_CQ,
72 IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
73 IB_USER_VERBS_CMD_CREATE_QP,
74 IB_USER_VERBS_CMD_QUERY_QP,
75 IB_USER_VERBS_CMD_MODIFY_QP,
76 IB_USER_VERBS_CMD_DESTROY_QP,
77 IB_USER_VERBS_CMD_POST_SEND,
78 IB_USER_VERBS_CMD_POST_RECV,
79 IB_USER_VERBS_CMD_ATTACH_MCAST,
f520ba5a
RD
80 IB_USER_VERBS_CMD_DETACH_MCAST,
81 IB_USER_VERBS_CMD_CREATE_SRQ,
82 IB_USER_VERBS_CMD_MODIFY_SRQ,
83 IB_USER_VERBS_CMD_QUERY_SRQ,
84 IB_USER_VERBS_CMD_DESTROY_SRQ,
53d0bd1e
SH
85 IB_USER_VERBS_CMD_POST_SRQ_RECV,
86 IB_USER_VERBS_CMD_OPEN_XRCD,
8541f8de 87 IB_USER_VERBS_CMD_CLOSE_XRCD,
42849b26 88 IB_USER_VERBS_CMD_CREATE_XSRQ,
436f2ad0 89 IB_USER_VERBS_CMD_OPEN_QP,
7afbddfa 90#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
436f2ad0
HHZ
91 IB_USER_VERBS_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
92 IB_USER_VERBS_CMD_DESTROY_FLOW
7afbddfa 93#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
8a96b3f9
RD
94};
95
96/*
97 * Make sure that all structs defined in this file remain laid out so
98 * that they pack the same way on 32-bit and 64-bit architectures (to
99 * avoid incompatibility between 32-bit userspace and 64-bit kernels).
91ecd4ae
RD
100 * Specifically:
101 * - Do not use pointer types -- pass pointers in __u64 instead.
102 * - Make sure that any structure larger than 4 bytes is padded to a
103 * multiple of 8 bytes. Otherwise the structure size will be
104 * different between 32-bit and 64-bit architectures.
8a96b3f9
RD
105 */
106
107struct ib_uverbs_async_event_desc {
108 __u64 element;
109 __u32 event_type; /* enum ib_event_type */
110 __u32 reserved;
111};
112
113struct ib_uverbs_comp_event_desc {
114 __u64 cq_handle;
115};
116
117/*
118 * All commands from userspace should start with a __u32 command field
119 * followed by __u16 in_words and out_words fields (which give the
120 * length of the command block and response buffer if any in 32-bit
121 * words). The kernel driver will read these fields first and read
122 * the rest of the command struct based on these value.
123 */
124
125struct ib_uverbs_cmd_hdr {
126 __u32 command;
127 __u16 in_words;
128 __u16 out_words;
129};
130
7afbddfa 131#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
400dbc96
II
132struct ib_uverbs_cmd_hdr_ex {
133 __u32 command;
134 __u16 in_words;
135 __u16 out_words;
136 __u16 provider_in_words;
137 __u16 provider_out_words;
138 __u32 cmd_hdr_reserved;
139};
7afbddfa 140#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
400dbc96 141
8a96b3f9
RD
142struct ib_uverbs_get_context {
143 __u64 response;
8a96b3f9
RD
144 __u64 driver_data[0];
145};
146
147struct ib_uverbs_get_context_resp {
148 __u32 async_fd;
6b73597e 149 __u32 num_comp_vectors;
8a96b3f9
RD
150};
151
152struct ib_uverbs_query_device {
153 __u64 response;
154 __u64 driver_data[0];
155};
156
157struct ib_uverbs_query_device_resp {
158 __u64 fw_ver;
97f52eb4
SH
159 __be64 node_guid;
160 __be64 sys_image_guid;
8a96b3f9
RD
161 __u64 max_mr_size;
162 __u64 page_size_cap;
163 __u32 vendor_id;
164 __u32 vendor_part_id;
165 __u32 hw_ver;
166 __u32 max_qp;
167 __u32 max_qp_wr;
168 __u32 device_cap_flags;
169 __u32 max_sge;
170 __u32 max_sge_rd;
171 __u32 max_cq;
172 __u32 max_cqe;
173 __u32 max_mr;
174 __u32 max_pd;
175 __u32 max_qp_rd_atom;
176 __u32 max_ee_rd_atom;
177 __u32 max_res_rd_atom;
178 __u32 max_qp_init_rd_atom;
179 __u32 max_ee_init_rd_atom;
180 __u32 atomic_cap;
181 __u32 max_ee;
182 __u32 max_rdd;
183 __u32 max_mw;
184 __u32 max_raw_ipv6_qp;
185 __u32 max_raw_ethy_qp;
186 __u32 max_mcast_grp;
187 __u32 max_mcast_qp_attach;
188 __u32 max_total_mcast_qp_attach;
189 __u32 max_ah;
190 __u32 max_fmr;
191 __u32 max_map_per_fmr;
192 __u32 max_srq;
193 __u32 max_srq_wr;
194 __u32 max_srq_sge;
195 __u16 max_pkeys;
196 __u8 local_ca_ack_delay;
197 __u8 phys_port_cnt;
198 __u8 reserved[4];
199};
200
201struct ib_uverbs_query_port {
202 __u64 response;
203 __u8 port_num;
204 __u8 reserved[7];
205 __u64 driver_data[0];
206};
207
208struct ib_uverbs_query_port_resp {
209 __u32 port_cap_flags;
210 __u32 max_msg_sz;
211 __u32 bad_pkey_cntr;
212 __u32 qkey_viol_cntr;
213 __u32 gid_tbl_len;
214 __u16 pkey_tbl_len;
215 __u16 lid;
216 __u16 sm_lid;
217 __u8 state;
218 __u8 max_mtu;
219 __u8 active_mtu;
220 __u8 lmc;
221 __u8 max_vl_num;
222 __u8 sm_sl;
223 __u8 subnet_timeout;
224 __u8 init_type_reply;
225 __u8 active_width;
226 __u8 active_speed;
227 __u8 phys_state;
2420b60b
EC
228 __u8 link_layer;
229 __u8 reserved[2];
8a96b3f9
RD
230};
231
8a96b3f9
RD
232struct ib_uverbs_alloc_pd {
233 __u64 response;
234 __u64 driver_data[0];
235};
236
237struct ib_uverbs_alloc_pd_resp {
238 __u32 pd_handle;
239};
240
241struct ib_uverbs_dealloc_pd {
242 __u32 pd_handle;
243};
244
53d0bd1e
SH
245struct ib_uverbs_open_xrcd {
246 __u64 response;
247 __u32 fd;
248 __u32 oflags;
249 __u64 driver_data[0];
250};
251
252struct ib_uverbs_open_xrcd_resp {
253 __u32 xrcd_handle;
254};
255
256struct ib_uverbs_close_xrcd {
257 __u32 xrcd_handle;
258};
259
8a96b3f9
RD
260struct ib_uverbs_reg_mr {
261 __u64 response;
262 __u64 start;
263 __u64 length;
264 __u64 hca_va;
265 __u32 pd_handle;
266 __u32 access_flags;
267 __u64 driver_data[0];
268};
269
270struct ib_uverbs_reg_mr_resp {
271 __u32 mr_handle;
272 __u32 lkey;
273 __u32 rkey;
274};
275
276struct ib_uverbs_dereg_mr {
277 __u32 mr_handle;
278};
279
6b52a12b
SM
280struct ib_uverbs_alloc_mw {
281 __u64 response;
282 __u32 pd_handle;
283 __u8 mw_type;
284 __u8 reserved[3];
285};
286
287struct ib_uverbs_alloc_mw_resp {
288 __u32 mw_handle;
289 __u32 rkey;
290};
291
292struct ib_uverbs_dealloc_mw {
293 __u32 mw_handle;
294};
295
6b73597e
RD
296struct ib_uverbs_create_comp_channel {
297 __u64 response;
298};
299
300struct ib_uverbs_create_comp_channel_resp {
301 __u32 fd;
302};
303
8a96b3f9
RD
304struct ib_uverbs_create_cq {
305 __u64 response;
306 __u64 user_handle;
307 __u32 cqe;
6b73597e
RD
308 __u32 comp_vector;
309 __s32 comp_channel;
310 __u32 reserved;
8a96b3f9
RD
311 __u64 driver_data[0];
312};
313
314struct ib_uverbs_create_cq_resp {
315 __u32 cq_handle;
316 __u32 cqe;
317};
318
33b9b3ee
RD
319struct ib_uverbs_resize_cq {
320 __u64 response;
321 __u32 cq_handle;
322 __u32 cqe;
323 __u64 driver_data[0];
324};
325
326struct ib_uverbs_resize_cq_resp {
327 __u32 cqe;
64f817ba
RC
328 __u32 reserved;
329 __u64 driver_data[0];
33b9b3ee
RD
330};
331
91ecd4ae
RD
332struct ib_uverbs_poll_cq {
333 __u64 response;
334 __u32 cq_handle;
335 __u32 ne;
336};
337
338struct ib_uverbs_wc {
339 __u64 wr_id;
340 __u32 status;
341 __u32 opcode;
342 __u32 vendor_err;
343 __u32 byte_len;
00f7ec36
SW
344 union {
345 __u32 imm_data;
346 __u32 invalidate_rkey;
347 } ex;
91ecd4ae
RD
348 __u32 qp_num;
349 __u32 src_qp;
350 __u32 wc_flags;
351 __u16 pkey_index;
352 __u16 slid;
353 __u8 sl;
354 __u8 dlid_path_bits;
355 __u8 port_num;
356 __u8 reserved;
357};
358
359struct ib_uverbs_poll_cq_resp {
360 __u32 count;
361 __u32 reserved;
362 struct ib_uverbs_wc wc[0];
363};
364
365struct ib_uverbs_req_notify_cq {
366 __u32 cq_handle;
367 __u32 solicited_only;
368};
369
8a96b3f9 370struct ib_uverbs_destroy_cq {
63aaf647 371 __u64 response;
8a96b3f9 372 __u32 cq_handle;
63aaf647
RD
373 __u32 reserved;
374};
375
376struct ib_uverbs_destroy_cq_resp {
377 __u32 comp_events_reported;
378 __u32 async_events_reported;
8a96b3f9
RD
379};
380
6a9af2e1
SH
381struct ib_uverbs_global_route {
382 __u8 dgid[16];
383 __u32 flow_label;
384 __u8 sgid_index;
385 __u8 hop_limit;
386 __u8 traffic_class;
387 __u8 reserved;
388};
389
390struct ib_uverbs_ah_attr {
391 struct ib_uverbs_global_route grh;
392 __u16 dlid;
393 __u8 sl;
394 __u8 src_path_bits;
395 __u8 static_rate;
396 __u8 is_global;
397 __u8 port_num;
398 __u8 reserved;
399};
400
401struct ib_uverbs_qp_attr {
402 __u32 qp_attr_mask;
403 __u32 qp_state;
404 __u32 cur_qp_state;
405 __u32 path_mtu;
406 __u32 path_mig_state;
407 __u32 qkey;
408 __u32 rq_psn;
409 __u32 sq_psn;
410 __u32 dest_qp_num;
411 __u32 qp_access_flags;
412
413 struct ib_uverbs_ah_attr ah_attr;
414 struct ib_uverbs_ah_attr alt_ah_attr;
415
416 /* ib_qp_cap */
417 __u32 max_send_wr;
418 __u32 max_recv_wr;
419 __u32 max_send_sge;
420 __u32 max_recv_sge;
421 __u32 max_inline_data;
422
423 __u16 pkey_index;
424 __u16 alt_pkey_index;
425 __u8 en_sqd_async_notify;
426 __u8 sq_draining;
427 __u8 max_rd_atomic;
428 __u8 max_dest_rd_atomic;
429 __u8 min_rnr_timer;
430 __u8 port_num;
431 __u8 timeout;
432 __u8 retry_cnt;
433 __u8 rnr_retry;
434 __u8 alt_port_num;
435 __u8 alt_timeout;
436 __u8 reserved[5];
437};
438
8a96b3f9
RD
439struct ib_uverbs_create_qp {
440 __u64 response;
441 __u64 user_handle;
442 __u32 pd_handle;
443 __u32 send_cq_handle;
444 __u32 recv_cq_handle;
445 __u32 srq_handle;
446 __u32 max_send_wr;
447 __u32 max_recv_wr;
448 __u32 max_send_sge;
449 __u32 max_recv_sge;
450 __u32 max_inline_data;
451 __u8 sq_sig_all;
452 __u8 qp_type;
453 __u8 is_srq;
454 __u8 reserved;
455 __u64 driver_data[0];
456};
457
42849b26
SH
458struct ib_uverbs_open_qp {
459 __u64 response;
460 __u64 user_handle;
461 __u32 pd_handle;
462 __u32 qpn;
463 __u8 qp_type;
464 __u8 reserved[7];
465 __u64 driver_data[0];
466};
467
468/* also used for open response */
8a96b3f9
RD
469struct ib_uverbs_create_qp_resp {
470 __u32 qp_handle;
471 __u32 qpn;
77369ed3
JM
472 __u32 max_send_wr;
473 __u32 max_recv_wr;
474 __u32 max_send_sge;
475 __u32 max_recv_sge;
476 __u32 max_inline_data;
4d9781c5 477 __u32 reserved;
8a96b3f9
RD
478};
479
480/*
481 * This struct needs to remain a multiple of 8 bytes to keep the
482 * alignment of the modify QP parameters.
483 */
484struct ib_uverbs_qp_dest {
485 __u8 dgid[16];
486 __u32 flow_label;
487 __u16 dlid;
488 __u16 reserved;
489 __u8 sgid_index;
490 __u8 hop_limit;
491 __u8 traffic_class;
492 __u8 sl;
493 __u8 src_path_bits;
494 __u8 static_rate;
495 __u8 is_global;
496 __u8 port_num;
497};
498
7ccc9a24
DB
499struct ib_uverbs_query_qp {
500 __u64 response;
501 __u32 qp_handle;
502 __u32 attr_mask;
503 __u64 driver_data[0];
504};
505
506struct ib_uverbs_query_qp_resp {
507 struct ib_uverbs_qp_dest dest;
508 struct ib_uverbs_qp_dest alt_dest;
509 __u32 max_send_wr;
510 __u32 max_recv_wr;
511 __u32 max_send_sge;
512 __u32 max_recv_sge;
513 __u32 max_inline_data;
514 __u32 qkey;
515 __u32 rq_psn;
516 __u32 sq_psn;
517 __u32 dest_qp_num;
518 __u32 qp_access_flags;
519 __u16 pkey_index;
520 __u16 alt_pkey_index;
521 __u8 qp_state;
522 __u8 cur_qp_state;
523 __u8 path_mtu;
524 __u8 path_mig_state;
0b26c88f 525 __u8 sq_draining;
7ccc9a24
DB
526 __u8 max_rd_atomic;
527 __u8 max_dest_rd_atomic;
528 __u8 min_rnr_timer;
529 __u8 port_num;
530 __u8 timeout;
531 __u8 retry_cnt;
532 __u8 rnr_retry;
533 __u8 alt_port_num;
534 __u8 alt_timeout;
535 __u8 sq_sig_all;
536 __u8 reserved[5];
537 __u64 driver_data[0];
538};
539
8a96b3f9
RD
540struct ib_uverbs_modify_qp {
541 struct ib_uverbs_qp_dest dest;
542 struct ib_uverbs_qp_dest alt_dest;
543 __u32 qp_handle;
544 __u32 attr_mask;
545 __u32 qkey;
546 __u32 rq_psn;
547 __u32 sq_psn;
548 __u32 dest_qp_num;
549 __u32 qp_access_flags;
550 __u16 pkey_index;
551 __u16 alt_pkey_index;
552 __u8 qp_state;
553 __u8 cur_qp_state;
554 __u8 path_mtu;
555 __u8 path_mig_state;
556 __u8 en_sqd_async_notify;
557 __u8 max_rd_atomic;
558 __u8 max_dest_rd_atomic;
559 __u8 min_rnr_timer;
560 __u8 port_num;
561 __u8 timeout;
562 __u8 retry_cnt;
563 __u8 rnr_retry;
564 __u8 alt_port_num;
565 __u8 alt_timeout;
566 __u8 reserved[2];
567 __u64 driver_data[0];
568};
569
570struct ib_uverbs_modify_qp_resp {
571};
572
573struct ib_uverbs_destroy_qp {
63aaf647 574 __u64 response;
8a96b3f9 575 __u32 qp_handle;
63aaf647
RD
576 __u32 reserved;
577};
578
579struct ib_uverbs_destroy_qp_resp {
580 __u32 events_reported;
8a96b3f9
RD
581};
582
91ecd4ae
RD
583/*
584 * The ib_uverbs_sge structure isn't used anywhere, since we assume
585 * the ib_sge structure is packed the same way on 32-bit and 64-bit
586 * architectures in both kernel and user space. It's just here to
587 * document the ABI.
588 */
589struct ib_uverbs_sge {
590 __u64 addr;
591 __u32 length;
592 __u32 lkey;
593};
594
595struct ib_uverbs_send_wr {
a74cd4af 596 __u64 wr_id;
91ecd4ae
RD
597 __u32 num_sge;
598 __u32 opcode;
599 __u32 send_flags;
0f39cf3d
RD
600 union {
601 __u32 imm_data;
602 __u32 invalidate_rkey;
603 } ex;
91ecd4ae
RD
604 union {
605 struct {
606 __u64 remote_addr;
607 __u32 rkey;
608 __u32 reserved;
609 } rdma;
610 struct {
611 __u64 remote_addr;
612 __u64 compare_add;
613 __u64 swap;
614 __u32 rkey;
615 __u32 reserved;
616 } atomic;
617 struct {
618 __u32 ah;
619 __u32 remote_qpn;
620 __u32 remote_qkey;
621 __u32 reserved;
622 } ud;
623 } wr;
624};
625
626struct ib_uverbs_post_send {
627 __u64 response;
628 __u32 qp_handle;
629 __u32 wr_count;
630 __u32 sge_count;
631 __u32 wqe_size;
632 struct ib_uverbs_send_wr send_wr[0];
633};
634
635struct ib_uverbs_post_send_resp {
636 __u32 bad_wr;
637};
638
639struct ib_uverbs_recv_wr {
640 __u64 wr_id;
641 __u32 num_sge;
642 __u32 reserved;
643};
644
645struct ib_uverbs_post_recv {
646 __u64 response;
647 __u32 qp_handle;
648 __u32 wr_count;
649 __u32 sge_count;
650 __u32 wqe_size;
651 struct ib_uverbs_recv_wr recv_wr[0];
652};
653
654struct ib_uverbs_post_recv_resp {
655 __u32 bad_wr;
656};
657
658struct ib_uverbs_post_srq_recv {
659 __u64 response;
660 __u32 srq_handle;
661 __u32 wr_count;
662 __u32 sge_count;
663 __u32 wqe_size;
664 struct ib_uverbs_recv_wr recv[0];
665};
666
667struct ib_uverbs_post_srq_recv_resp {
668 __u32 bad_wr;
669};
670
91ecd4ae
RD
671struct ib_uverbs_create_ah {
672 __u64 response;
673 __u64 user_handle;
674 __u32 pd_handle;
675 __u32 reserved;
676 struct ib_uverbs_ah_attr attr;
677};
678
679struct ib_uverbs_create_ah_resp {
680 __u32 ah_handle;
681};
682
683struct ib_uverbs_destroy_ah {
684 __u32 ah_handle;
685};
686
8a96b3f9
RD
687struct ib_uverbs_attach_mcast {
688 __u8 gid[16];
689 __u32 qp_handle;
690 __u16 mlid;
691 __u16 reserved;
692 __u64 driver_data[0];
693};
694
695struct ib_uverbs_detach_mcast {
696 __u8 gid[16];
697 __u32 qp_handle;
698 __u16 mlid;
699 __u16 reserved;
700 __u64 driver_data[0];
436f2ad0
HHZ
701};
702
7afbddfa 703#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
b68c9560 704struct ib_uverbs_flow_eth_filter {
436f2ad0
HHZ
705 __u8 dst_mac[6];
706 __u8 src_mac[6];
707 __be16 ether_type;
708 __be16 vlan_tag;
709};
710
b68c9560 711struct ib_uverbs_flow_spec_eth {
436f2ad0
HHZ
712 __u32 type;
713 __u16 size;
714 __u16 reserved;
b68c9560
YD
715 struct ib_uverbs_flow_eth_filter val;
716 struct ib_uverbs_flow_eth_filter mask;
436f2ad0
HHZ
717};
718
b68c9560 719struct ib_uverbs_flow_ipv4_filter {
436f2ad0
HHZ
720 __be32 src_ip;
721 __be32 dst_ip;
722};
723
b68c9560 724struct ib_uverbs_flow_spec_ipv4 {
436f2ad0
HHZ
725 __u32 type;
726 __u16 size;
727 __u16 reserved;
b68c9560
YD
728 struct ib_uverbs_flow_ipv4_filter val;
729 struct ib_uverbs_flow_ipv4_filter mask;
436f2ad0
HHZ
730};
731
b68c9560 732struct ib_uverbs_flow_tcp_udp_filter {
436f2ad0
HHZ
733 __be16 dst_port;
734 __be16 src_port;
735};
736
b68c9560 737struct ib_uverbs_flow_spec_tcp_udp {
436f2ad0
HHZ
738 __u32 type;
739 __u16 size;
740 __u16 reserved;
b68c9560
YD
741 struct ib_uverbs_flow_tcp_udp_filter val;
742 struct ib_uverbs_flow_tcp_udp_filter mask;
436f2ad0
HHZ
743};
744
b68c9560 745struct ib_uverbs_flow_spec {
436f2ad0
HHZ
746 union {
747 struct {
748 __u32 type;
749 __u16 size;
750 __u16 reserved;
751 };
b68c9560
YD
752 struct ib_uverbs_flow_spec_eth eth;
753 struct ib_uverbs_flow_spec_ipv4 ipv4;
754 struct ib_uverbs_flow_spec_tcp_udp tcp_udp;
436f2ad0
HHZ
755 };
756};
757
d82693da 758struct ib_uverbs_flow_attr {
436f2ad0
HHZ
759 __u32 type;
760 __u16 size;
761 __u16 priority;
762 __u8 num_of_specs;
763 __u8 reserved[2];
764 __u8 port;
765 __u32 flags;
766 /* Following are the optional layers according to user request
767 * struct ib_flow_spec_xxx
768 * struct ib_flow_spec_yyy
769 */
770};
771
772struct ib_uverbs_create_flow {
773 __u32 comp_mask;
f8848274 774 __u32 reserved;
436f2ad0
HHZ
775 __u64 response;
776 __u32 qp_handle;
d82693da 777 struct ib_uverbs_flow_attr flow_attr;
436f2ad0
HHZ
778};
779
780struct ib_uverbs_create_flow_resp {
781 __u32 comp_mask;
782 __u32 flow_handle;
783};
784
785struct ib_uverbs_destroy_flow {
786 __u32 comp_mask;
787 __u32 flow_handle;
8a96b3f9 788};
7afbddfa 789#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
8a96b3f9 790
f520ba5a
RD
791struct ib_uverbs_create_srq {
792 __u64 response;
793 __u64 user_handle;
794 __u32 pd_handle;
795 __u32 max_wr;
796 __u32 max_sge;
797 __u32 srq_limit;
798 __u64 driver_data[0];
799};
800
8541f8de
SH
801struct ib_uverbs_create_xsrq {
802 __u64 response;
803 __u64 user_handle;
804 __u32 srq_type;
805 __u32 pd_handle;
806 __u32 max_wr;
807 __u32 max_sge;
808 __u32 srq_limit;
809 __u32 reserved;
810 __u32 xrcd_handle;
811 __u32 cq_handle;
812 __u64 driver_data[0];
813};
814
f520ba5a
RD
815struct ib_uverbs_create_srq_resp {
816 __u32 srq_handle;
ea88fd16
DB
817 __u32 max_wr;
818 __u32 max_sge;
8541f8de 819 __u32 srqn;
f520ba5a
RD
820};
821
822struct ib_uverbs_modify_srq {
823 __u32 srq_handle;
824 __u32 attr_mask;
825 __u32 max_wr;
f520ba5a 826 __u32 srq_limit;
f520ba5a
RD
827 __u64 driver_data[0];
828};
829
8bdb0e86
DB
830struct ib_uverbs_query_srq {
831 __u64 response;
832 __u32 srq_handle;
833 __u32 reserved;
834 __u64 driver_data[0];
835};
836
837struct ib_uverbs_query_srq_resp {
838 __u32 max_wr;
839 __u32 max_sge;
840 __u32 srq_limit;
841 __u32 reserved;
842};
843
f520ba5a 844struct ib_uverbs_destroy_srq {
63aaf647 845 __u64 response;
f520ba5a 846 __u32 srq_handle;
63aaf647
RD
847 __u32 reserved;
848};
849
850struct ib_uverbs_destroy_srq_resp {
851 __u32 events_reported;
f520ba5a
RD
852};
853
8a96b3f9 854#endif /* IB_USER_VERBS_H */
This page took 1.22882 seconds and 5 git commands to generate.