ib_user_verbs.h revision 1308ad3ab33294c3abfd96da12b6df58b381ce52
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef IB_USER_VERBS_H
20#define IB_USER_VERBS_H
21#include <linux/types.h>
22#define IB_USER_VERBS_ABI_VERSION 6
23#define IB_USER_VERBS_CMD_THRESHOLD 50
24enum {
25  IB_USER_VERBS_CMD_GET_CONTEXT,
26  IB_USER_VERBS_CMD_QUERY_DEVICE,
27  IB_USER_VERBS_CMD_QUERY_PORT,
28  IB_USER_VERBS_CMD_ALLOC_PD,
29  IB_USER_VERBS_CMD_DEALLOC_PD,
30  IB_USER_VERBS_CMD_CREATE_AH,
31  IB_USER_VERBS_CMD_MODIFY_AH,
32  IB_USER_VERBS_CMD_QUERY_AH,
33  IB_USER_VERBS_CMD_DESTROY_AH,
34  IB_USER_VERBS_CMD_REG_MR,
35  IB_USER_VERBS_CMD_REG_SMR,
36  IB_USER_VERBS_CMD_REREG_MR,
37  IB_USER_VERBS_CMD_QUERY_MR,
38  IB_USER_VERBS_CMD_DEREG_MR,
39  IB_USER_VERBS_CMD_ALLOC_MW,
40  IB_USER_VERBS_CMD_BIND_MW,
41  IB_USER_VERBS_CMD_DEALLOC_MW,
42  IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
43  IB_USER_VERBS_CMD_CREATE_CQ,
44  IB_USER_VERBS_CMD_RESIZE_CQ,
45  IB_USER_VERBS_CMD_DESTROY_CQ,
46  IB_USER_VERBS_CMD_POLL_CQ,
47  IB_USER_VERBS_CMD_PEEK_CQ,
48  IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
49  IB_USER_VERBS_CMD_CREATE_QP,
50  IB_USER_VERBS_CMD_QUERY_QP,
51  IB_USER_VERBS_CMD_MODIFY_QP,
52  IB_USER_VERBS_CMD_DESTROY_QP,
53  IB_USER_VERBS_CMD_POST_SEND,
54  IB_USER_VERBS_CMD_POST_RECV,
55  IB_USER_VERBS_CMD_ATTACH_MCAST,
56  IB_USER_VERBS_CMD_DETACH_MCAST,
57  IB_USER_VERBS_CMD_CREATE_SRQ,
58  IB_USER_VERBS_CMD_MODIFY_SRQ,
59  IB_USER_VERBS_CMD_QUERY_SRQ,
60  IB_USER_VERBS_CMD_DESTROY_SRQ,
61  IB_USER_VERBS_CMD_POST_SRQ_RECV,
62  IB_USER_VERBS_CMD_OPEN_XRCD,
63  IB_USER_VERBS_CMD_CLOSE_XRCD,
64  IB_USER_VERBS_CMD_CREATE_XSRQ,
65  IB_USER_VERBS_CMD_OPEN_QP,
66};
67enum {
68  IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
69  IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
70  IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
71  IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
72  IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
73  IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
74  IB_USER_VERBS_EX_CMD_CREATE_WQ,
75  IB_USER_VERBS_EX_CMD_MODIFY_WQ,
76  IB_USER_VERBS_EX_CMD_DESTROY_WQ,
77  IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL,
78  IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL
79};
80struct ib_uverbs_async_event_desc {
81  __u64 element;
82  __u32 event_type;
83  __u32 reserved;
84};
85struct ib_uverbs_comp_event_desc {
86  __u64 cq_handle;
87};
88#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
89#define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u
90#define IB_USER_VERBS_CMD_FLAGS_SHIFT 24
91#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80
92struct ib_uverbs_cmd_hdr {
93  __u32 command;
94  __u16 in_words;
95  __u16 out_words;
96};
97struct ib_uverbs_ex_cmd_hdr {
98  __u64 response;
99  __u16 provider_in_words;
100  __u16 provider_out_words;
101  __u32 cmd_hdr_reserved;
102};
103struct ib_uverbs_get_context {
104  __u64 response;
105  __u64 driver_data[0];
106};
107struct ib_uverbs_get_context_resp {
108  __u32 async_fd;
109  __u32 num_comp_vectors;
110};
111struct ib_uverbs_query_device {
112  __u64 response;
113  __u64 driver_data[0];
114};
115struct ib_uverbs_query_device_resp {
116  __u64 fw_ver;
117  __be64 node_guid;
118  __be64 sys_image_guid;
119  __u64 max_mr_size;
120  __u64 page_size_cap;
121  __u32 vendor_id;
122  __u32 vendor_part_id;
123  __u32 hw_ver;
124  __u32 max_qp;
125  __u32 max_qp_wr;
126  __u32 device_cap_flags;
127  __u32 max_sge;
128  __u32 max_sge_rd;
129  __u32 max_cq;
130  __u32 max_cqe;
131  __u32 max_mr;
132  __u32 max_pd;
133  __u32 max_qp_rd_atom;
134  __u32 max_ee_rd_atom;
135  __u32 max_res_rd_atom;
136  __u32 max_qp_init_rd_atom;
137  __u32 max_ee_init_rd_atom;
138  __u32 atomic_cap;
139  __u32 max_ee;
140  __u32 max_rdd;
141  __u32 max_mw;
142  __u32 max_raw_ipv6_qp;
143  __u32 max_raw_ethy_qp;
144  __u32 max_mcast_grp;
145  __u32 max_mcast_qp_attach;
146  __u32 max_total_mcast_qp_attach;
147  __u32 max_ah;
148  __u32 max_fmr;
149  __u32 max_map_per_fmr;
150  __u32 max_srq;
151  __u32 max_srq_wr;
152  __u32 max_srq_sge;
153  __u16 max_pkeys;
154  __u8 local_ca_ack_delay;
155  __u8 phys_port_cnt;
156  __u8 reserved[4];
157};
158struct ib_uverbs_ex_query_device {
159  __u32 comp_mask;
160  __u32 reserved;
161};
162struct ib_uverbs_odp_caps {
163  __u64 general_caps;
164  struct {
165    __u32 rc_odp_caps;
166    __u32 uc_odp_caps;
167    __u32 ud_odp_caps;
168  } per_transport_caps;
169  __u32 reserved;
170};
171struct ib_uverbs_rss_caps {
172  __u32 supported_qpts;
173  __u32 max_rwq_indirection_tables;
174  __u32 max_rwq_indirection_table_size;
175  __u32 reserved;
176};
177struct ib_uverbs_tm_caps {
178  __u32 max_rndv_hdr_size;
179  __u32 max_num_tags;
180  __u32 flags;
181  __u32 max_ops;
182  __u32 max_sge;
183  __u32 reserved;
184};
185struct ib_uverbs_ex_query_device_resp {
186  struct ib_uverbs_query_device_resp base;
187  __u32 comp_mask;
188  __u32 response_length;
189  struct ib_uverbs_odp_caps odp_caps;
190  __u64 timestamp_mask;
191  __u64 hca_core_clock;
192  __u64 device_cap_flags_ex;
193  struct ib_uverbs_rss_caps rss_caps;
194  __u32 max_wq_type_rq;
195  __u32 raw_packet_caps;
196  struct ib_uverbs_tm_caps tm_caps;
197};
198struct ib_uverbs_query_port {
199  __u64 response;
200  __u8 port_num;
201  __u8 reserved[7];
202  __u64 driver_data[0];
203};
204struct ib_uverbs_query_port_resp {
205  __u32 port_cap_flags;
206  __u32 max_msg_sz;
207  __u32 bad_pkey_cntr;
208  __u32 qkey_viol_cntr;
209  __u32 gid_tbl_len;
210  __u16 pkey_tbl_len;
211  __u16 lid;
212  __u16 sm_lid;
213  __u8 state;
214  __u8 max_mtu;
215  __u8 active_mtu;
216  __u8 lmc;
217  __u8 max_vl_num;
218  __u8 sm_sl;
219  __u8 subnet_timeout;
220  __u8 init_type_reply;
221  __u8 active_width;
222  __u8 active_speed;
223  __u8 phys_state;
224  __u8 link_layer;
225  __u8 reserved[2];
226};
227struct ib_uverbs_alloc_pd {
228  __u64 response;
229  __u64 driver_data[0];
230};
231struct ib_uverbs_alloc_pd_resp {
232  __u32 pd_handle;
233};
234struct ib_uverbs_dealloc_pd {
235  __u32 pd_handle;
236};
237struct ib_uverbs_open_xrcd {
238  __u64 response;
239  __u32 fd;
240  __u32 oflags;
241  __u64 driver_data[0];
242};
243struct ib_uverbs_open_xrcd_resp {
244  __u32 xrcd_handle;
245};
246struct ib_uverbs_close_xrcd {
247  __u32 xrcd_handle;
248};
249struct ib_uverbs_reg_mr {
250  __u64 response;
251  __u64 start;
252  __u64 length;
253  __u64 hca_va;
254  __u32 pd_handle;
255  __u32 access_flags;
256  __u64 driver_data[0];
257};
258struct ib_uverbs_reg_mr_resp {
259  __u32 mr_handle;
260  __u32 lkey;
261  __u32 rkey;
262};
263struct ib_uverbs_rereg_mr {
264  __u64 response;
265  __u32 mr_handle;
266  __u32 flags;
267  __u64 start;
268  __u64 length;
269  __u64 hca_va;
270  __u32 pd_handle;
271  __u32 access_flags;
272};
273struct ib_uverbs_rereg_mr_resp {
274  __u32 lkey;
275  __u32 rkey;
276};
277struct ib_uverbs_dereg_mr {
278  __u32 mr_handle;
279};
280struct ib_uverbs_alloc_mw {
281  __u64 response;
282  __u32 pd_handle;
283  __u8 mw_type;
284  __u8 reserved[3];
285};
286struct ib_uverbs_alloc_mw_resp {
287  __u32 mw_handle;
288  __u32 rkey;
289};
290struct ib_uverbs_dealloc_mw {
291  __u32 mw_handle;
292};
293struct ib_uverbs_create_comp_channel {
294  __u64 response;
295};
296struct ib_uverbs_create_comp_channel_resp {
297  __u32 fd;
298};
299struct ib_uverbs_create_cq {
300  __u64 response;
301  __u64 user_handle;
302  __u32 cqe;
303  __u32 comp_vector;
304  __s32 comp_channel;
305  __u32 reserved;
306  __u64 driver_data[0];
307};
308struct ib_uverbs_ex_create_cq {
309  __u64 user_handle;
310  __u32 cqe;
311  __u32 comp_vector;
312  __s32 comp_channel;
313  __u32 comp_mask;
314  __u32 flags;
315  __u32 reserved;
316};
317struct ib_uverbs_create_cq_resp {
318  __u32 cq_handle;
319  __u32 cqe;
320};
321struct ib_uverbs_ex_create_cq_resp {
322  struct ib_uverbs_create_cq_resp base;
323  __u32 comp_mask;
324  __u32 response_length;
325};
326struct ib_uverbs_resize_cq {
327  __u64 response;
328  __u32 cq_handle;
329  __u32 cqe;
330  __u64 driver_data[0];
331};
332struct ib_uverbs_resize_cq_resp {
333  __u32 cqe;
334  __u32 reserved;
335  __u64 driver_data[0];
336};
337struct ib_uverbs_poll_cq {
338  __u64 response;
339  __u32 cq_handle;
340  __u32 ne;
341};
342struct ib_uverbs_wc {
343  __u64 wr_id;
344  __u32 status;
345  __u32 opcode;
346  __u32 vendor_err;
347  __u32 byte_len;
348  union {
349    __u32 imm_data;
350    __u32 invalidate_rkey;
351  } ex;
352  __u32 qp_num;
353  __u32 src_qp;
354  __u32 wc_flags;
355  __u16 pkey_index;
356  __u16 slid;
357  __u8 sl;
358  __u8 dlid_path_bits;
359  __u8 port_num;
360  __u8 reserved;
361};
362struct ib_uverbs_poll_cq_resp {
363  __u32 count;
364  __u32 reserved;
365  struct ib_uverbs_wc wc[0];
366};
367struct ib_uverbs_req_notify_cq {
368  __u32 cq_handle;
369  __u32 solicited_only;
370};
371struct ib_uverbs_destroy_cq {
372  __u64 response;
373  __u32 cq_handle;
374  __u32 reserved;
375};
376struct ib_uverbs_destroy_cq_resp {
377  __u32 comp_events_reported;
378  __u32 async_events_reported;
379};
380struct ib_uverbs_global_route {
381  __u8 dgid[16];
382  __u32 flow_label;
383  __u8 sgid_index;
384  __u8 hop_limit;
385  __u8 traffic_class;
386  __u8 reserved;
387};
388struct ib_uverbs_ah_attr {
389  struct ib_uverbs_global_route grh;
390  __u16 dlid;
391  __u8 sl;
392  __u8 src_path_bits;
393  __u8 static_rate;
394  __u8 is_global;
395  __u8 port_num;
396  __u8 reserved;
397};
398struct ib_uverbs_qp_attr {
399  __u32 qp_attr_mask;
400  __u32 qp_state;
401  __u32 cur_qp_state;
402  __u32 path_mtu;
403  __u32 path_mig_state;
404  __u32 qkey;
405  __u32 rq_psn;
406  __u32 sq_psn;
407  __u32 dest_qp_num;
408  __u32 qp_access_flags;
409  struct ib_uverbs_ah_attr ah_attr;
410  struct ib_uverbs_ah_attr alt_ah_attr;
411  __u32 max_send_wr;
412  __u32 max_recv_wr;
413  __u32 max_send_sge;
414  __u32 max_recv_sge;
415  __u32 max_inline_data;
416  __u16 pkey_index;
417  __u16 alt_pkey_index;
418  __u8 en_sqd_async_notify;
419  __u8 sq_draining;
420  __u8 max_rd_atomic;
421  __u8 max_dest_rd_atomic;
422  __u8 min_rnr_timer;
423  __u8 port_num;
424  __u8 timeout;
425  __u8 retry_cnt;
426  __u8 rnr_retry;
427  __u8 alt_port_num;
428  __u8 alt_timeout;
429  __u8 reserved[5];
430};
431struct ib_uverbs_create_qp {
432  __u64 response;
433  __u64 user_handle;
434  __u32 pd_handle;
435  __u32 send_cq_handle;
436  __u32 recv_cq_handle;
437  __u32 srq_handle;
438  __u32 max_send_wr;
439  __u32 max_recv_wr;
440  __u32 max_send_sge;
441  __u32 max_recv_sge;
442  __u32 max_inline_data;
443  __u8 sq_sig_all;
444  __u8 qp_type;
445  __u8 is_srq;
446  __u8 reserved;
447  __u64 driver_data[0];
448};
449enum ib_uverbs_create_qp_mask {
450  IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
451};
452enum {
453  IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
454};
455enum {
456  IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
457};
458enum {
459  IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
460};
461struct ib_uverbs_ex_create_qp {
462  __u64 user_handle;
463  __u32 pd_handle;
464  __u32 send_cq_handle;
465  __u32 recv_cq_handle;
466  __u32 srq_handle;
467  __u32 max_send_wr;
468  __u32 max_recv_wr;
469  __u32 max_send_sge;
470  __u32 max_recv_sge;
471  __u32 max_inline_data;
472  __u8 sq_sig_all;
473  __u8 qp_type;
474  __u8 is_srq;
475  __u8 reserved;
476  __u32 comp_mask;
477  __u32 create_flags;
478  __u32 rwq_ind_tbl_handle;
479  __u32 source_qpn;
480};
481struct ib_uverbs_open_qp {
482  __u64 response;
483  __u64 user_handle;
484  __u32 pd_handle;
485  __u32 qpn;
486  __u8 qp_type;
487  __u8 reserved[7];
488  __u64 driver_data[0];
489};
490struct ib_uverbs_create_qp_resp {
491  __u32 qp_handle;
492  __u32 qpn;
493  __u32 max_send_wr;
494  __u32 max_recv_wr;
495  __u32 max_send_sge;
496  __u32 max_recv_sge;
497  __u32 max_inline_data;
498  __u32 reserved;
499};
500struct ib_uverbs_ex_create_qp_resp {
501  struct ib_uverbs_create_qp_resp base;
502  __u32 comp_mask;
503  __u32 response_length;
504};
505struct ib_uverbs_qp_dest {
506  __u8 dgid[16];
507  __u32 flow_label;
508  __u16 dlid;
509  __u16 reserved;
510  __u8 sgid_index;
511  __u8 hop_limit;
512  __u8 traffic_class;
513  __u8 sl;
514  __u8 src_path_bits;
515  __u8 static_rate;
516  __u8 is_global;
517  __u8 port_num;
518};
519struct ib_uverbs_query_qp {
520  __u64 response;
521  __u32 qp_handle;
522  __u32 attr_mask;
523  __u64 driver_data[0];
524};
525struct ib_uverbs_query_qp_resp {
526  struct ib_uverbs_qp_dest dest;
527  struct ib_uverbs_qp_dest alt_dest;
528  __u32 max_send_wr;
529  __u32 max_recv_wr;
530  __u32 max_send_sge;
531  __u32 max_recv_sge;
532  __u32 max_inline_data;
533  __u32 qkey;
534  __u32 rq_psn;
535  __u32 sq_psn;
536  __u32 dest_qp_num;
537  __u32 qp_access_flags;
538  __u16 pkey_index;
539  __u16 alt_pkey_index;
540  __u8 qp_state;
541  __u8 cur_qp_state;
542  __u8 path_mtu;
543  __u8 path_mig_state;
544  __u8 sq_draining;
545  __u8 max_rd_atomic;
546  __u8 max_dest_rd_atomic;
547  __u8 min_rnr_timer;
548  __u8 port_num;
549  __u8 timeout;
550  __u8 retry_cnt;
551  __u8 rnr_retry;
552  __u8 alt_port_num;
553  __u8 alt_timeout;
554  __u8 sq_sig_all;
555  __u8 reserved[5];
556  __u64 driver_data[0];
557};
558struct ib_uverbs_modify_qp {
559  struct ib_uverbs_qp_dest dest;
560  struct ib_uverbs_qp_dest alt_dest;
561  __u32 qp_handle;
562  __u32 attr_mask;
563  __u32 qkey;
564  __u32 rq_psn;
565  __u32 sq_psn;
566  __u32 dest_qp_num;
567  __u32 qp_access_flags;
568  __u16 pkey_index;
569  __u16 alt_pkey_index;
570  __u8 qp_state;
571  __u8 cur_qp_state;
572  __u8 path_mtu;
573  __u8 path_mig_state;
574  __u8 en_sqd_async_notify;
575  __u8 max_rd_atomic;
576  __u8 max_dest_rd_atomic;
577  __u8 min_rnr_timer;
578  __u8 port_num;
579  __u8 timeout;
580  __u8 retry_cnt;
581  __u8 rnr_retry;
582  __u8 alt_port_num;
583  __u8 alt_timeout;
584  __u8 reserved[2];
585  __u64 driver_data[0];
586};
587struct ib_uverbs_ex_modify_qp {
588  struct ib_uverbs_modify_qp base;
589  __u32 rate_limit;
590  __u32 reserved;
591};
592struct ib_uverbs_modify_qp_resp {
593};
594struct ib_uverbs_ex_modify_qp_resp {
595  __u32 comp_mask;
596  __u32 response_length;
597};
598struct ib_uverbs_destroy_qp {
599  __u64 response;
600  __u32 qp_handle;
601  __u32 reserved;
602};
603struct ib_uverbs_destroy_qp_resp {
604  __u32 events_reported;
605};
606struct ib_uverbs_sge {
607  __u64 addr;
608  __u32 length;
609  __u32 lkey;
610};
611struct ib_uverbs_send_wr {
612  __u64 wr_id;
613  __u32 num_sge;
614  __u32 opcode;
615  __u32 send_flags;
616  union {
617    __u32 imm_data;
618    __u32 invalidate_rkey;
619  } ex;
620  union {
621    struct {
622      __u64 remote_addr;
623      __u32 rkey;
624      __u32 reserved;
625    } rdma;
626    struct {
627      __u64 remote_addr;
628      __u64 compare_add;
629      __u64 swap;
630      __u32 rkey;
631      __u32 reserved;
632    } atomic;
633    struct {
634      __u32 ah;
635      __u32 remote_qpn;
636      __u32 remote_qkey;
637      __u32 reserved;
638    } ud;
639  } wr;
640};
641struct ib_uverbs_post_send {
642  __u64 response;
643  __u32 qp_handle;
644  __u32 wr_count;
645  __u32 sge_count;
646  __u32 wqe_size;
647  struct ib_uverbs_send_wr send_wr[0];
648};
649struct ib_uverbs_post_send_resp {
650  __u32 bad_wr;
651};
652struct ib_uverbs_recv_wr {
653  __u64 wr_id;
654  __u32 num_sge;
655  __u32 reserved;
656};
657struct ib_uverbs_post_recv {
658  __u64 response;
659  __u32 qp_handle;
660  __u32 wr_count;
661  __u32 sge_count;
662  __u32 wqe_size;
663  struct ib_uverbs_recv_wr recv_wr[0];
664};
665struct ib_uverbs_post_recv_resp {
666  __u32 bad_wr;
667};
668struct ib_uverbs_post_srq_recv {
669  __u64 response;
670  __u32 srq_handle;
671  __u32 wr_count;
672  __u32 sge_count;
673  __u32 wqe_size;
674  struct ib_uverbs_recv_wr recv[0];
675};
676struct ib_uverbs_post_srq_recv_resp {
677  __u32 bad_wr;
678};
679struct ib_uverbs_create_ah {
680  __u64 response;
681  __u64 user_handle;
682  __u32 pd_handle;
683  __u32 reserved;
684  struct ib_uverbs_ah_attr attr;
685};
686struct ib_uverbs_create_ah_resp {
687  __u32 ah_handle;
688};
689struct ib_uverbs_destroy_ah {
690  __u32 ah_handle;
691};
692struct ib_uverbs_attach_mcast {
693  __u8 gid[16];
694  __u32 qp_handle;
695  __u16 mlid;
696  __u16 reserved;
697  __u64 driver_data[0];
698};
699struct ib_uverbs_detach_mcast {
700  __u8 gid[16];
701  __u32 qp_handle;
702  __u16 mlid;
703  __u16 reserved;
704  __u64 driver_data[0];
705};
706struct ib_uverbs_flow_spec_hdr {
707  __u32 type;
708  __u16 size;
709  __u16 reserved;
710  __u64 flow_spec_data[0];
711};
712struct ib_uverbs_flow_eth_filter {
713  __u8 dst_mac[6];
714  __u8 src_mac[6];
715  __be16 ether_type;
716  __be16 vlan_tag;
717};
718struct ib_uverbs_flow_spec_eth {
719  union {
720    struct ib_uverbs_flow_spec_hdr hdr;
721    struct {
722      __u32 type;
723      __u16 size;
724      __u16 reserved;
725    };
726  };
727  struct ib_uverbs_flow_eth_filter val;
728  struct ib_uverbs_flow_eth_filter mask;
729};
730struct ib_uverbs_flow_ipv4_filter {
731  __be32 src_ip;
732  __be32 dst_ip;
733  __u8 proto;
734  __u8 tos;
735  __u8 ttl;
736  __u8 flags;
737};
738struct ib_uverbs_flow_spec_ipv4 {
739  union {
740    struct ib_uverbs_flow_spec_hdr hdr;
741    struct {
742      __u32 type;
743      __u16 size;
744      __u16 reserved;
745    };
746  };
747  struct ib_uverbs_flow_ipv4_filter val;
748  struct ib_uverbs_flow_ipv4_filter mask;
749};
750struct ib_uverbs_flow_tcp_udp_filter {
751  __be16 dst_port;
752  __be16 src_port;
753};
754struct ib_uverbs_flow_spec_tcp_udp {
755  union {
756    struct ib_uverbs_flow_spec_hdr hdr;
757    struct {
758      __u32 type;
759      __u16 size;
760      __u16 reserved;
761    };
762  };
763  struct ib_uverbs_flow_tcp_udp_filter val;
764  struct ib_uverbs_flow_tcp_udp_filter mask;
765};
766struct ib_uverbs_flow_ipv6_filter {
767  __u8 src_ip[16];
768  __u8 dst_ip[16];
769  __be32 flow_label;
770  __u8 next_hdr;
771  __u8 traffic_class;
772  __u8 hop_limit;
773  __u8 reserved;
774};
775struct ib_uverbs_flow_spec_ipv6 {
776  union {
777    struct ib_uverbs_flow_spec_hdr hdr;
778    struct {
779      __u32 type;
780      __u16 size;
781      __u16 reserved;
782    };
783  };
784  struct ib_uverbs_flow_ipv6_filter val;
785  struct ib_uverbs_flow_ipv6_filter mask;
786};
787struct ib_uverbs_flow_spec_action_tag {
788  union {
789    struct ib_uverbs_flow_spec_hdr hdr;
790    struct {
791      __u32 type;
792      __u16 size;
793      __u16 reserved;
794    };
795  };
796  __u32 tag_id;
797  __u32 reserved1;
798};
799struct ib_uverbs_flow_spec_action_drop {
800  union {
801    struct ib_uverbs_flow_spec_hdr hdr;
802    struct {
803      __u32 type;
804      __u16 size;
805      __u16 reserved;
806    };
807  };
808};
809struct ib_uverbs_flow_tunnel_filter {
810  __be32 tunnel_id;
811};
812struct ib_uverbs_flow_spec_tunnel {
813  union {
814    struct ib_uverbs_flow_spec_hdr hdr;
815    struct {
816      __u32 type;
817      __u16 size;
818      __u16 reserved;
819    };
820  };
821  struct ib_uverbs_flow_tunnel_filter val;
822  struct ib_uverbs_flow_tunnel_filter mask;
823};
824struct ib_uverbs_flow_attr {
825  __u32 type;
826  __u16 size;
827  __u16 priority;
828  __u8 num_of_specs;
829  __u8 reserved[2];
830  __u8 port;
831  __u32 flags;
832  struct ib_uverbs_flow_spec_hdr flow_specs[0];
833};
834struct ib_uverbs_create_flow {
835  __u32 comp_mask;
836  __u32 qp_handle;
837  struct ib_uverbs_flow_attr flow_attr;
838};
839struct ib_uverbs_create_flow_resp {
840  __u32 comp_mask;
841  __u32 flow_handle;
842};
843struct ib_uverbs_destroy_flow {
844  __u32 comp_mask;
845  __u32 flow_handle;
846};
847struct ib_uverbs_create_srq {
848  __u64 response;
849  __u64 user_handle;
850  __u32 pd_handle;
851  __u32 max_wr;
852  __u32 max_sge;
853  __u32 srq_limit;
854  __u64 driver_data[0];
855};
856struct ib_uverbs_create_xsrq {
857  __u64 response;
858  __u64 user_handle;
859  __u32 srq_type;
860  __u32 pd_handle;
861  __u32 max_wr;
862  __u32 max_sge;
863  __u32 srq_limit;
864  __u32 max_num_tags;
865  __u32 xrcd_handle;
866  __u32 cq_handle;
867  __u64 driver_data[0];
868};
869struct ib_uverbs_create_srq_resp {
870  __u32 srq_handle;
871  __u32 max_wr;
872  __u32 max_sge;
873  __u32 srqn;
874};
875struct ib_uverbs_modify_srq {
876  __u32 srq_handle;
877  __u32 attr_mask;
878  __u32 max_wr;
879  __u32 srq_limit;
880  __u64 driver_data[0];
881};
882struct ib_uverbs_query_srq {
883  __u64 response;
884  __u32 srq_handle;
885  __u32 reserved;
886  __u64 driver_data[0];
887};
888struct ib_uverbs_query_srq_resp {
889  __u32 max_wr;
890  __u32 max_sge;
891  __u32 srq_limit;
892  __u32 reserved;
893};
894struct ib_uverbs_destroy_srq {
895  __u64 response;
896  __u32 srq_handle;
897  __u32 reserved;
898};
899struct ib_uverbs_destroy_srq_resp {
900  __u32 events_reported;
901};
902struct ib_uverbs_ex_create_wq {
903  __u32 comp_mask;
904  __u32 wq_type;
905  __u64 user_handle;
906  __u32 pd_handle;
907  __u32 cq_handle;
908  __u32 max_wr;
909  __u32 max_sge;
910  __u32 create_flags;
911  __u32 reserved;
912};
913struct ib_uverbs_ex_create_wq_resp {
914  __u32 comp_mask;
915  __u32 response_length;
916  __u32 wq_handle;
917  __u32 max_wr;
918  __u32 max_sge;
919  __u32 wqn;
920};
921struct ib_uverbs_ex_destroy_wq {
922  __u32 comp_mask;
923  __u32 wq_handle;
924};
925struct ib_uverbs_ex_destroy_wq_resp {
926  __u32 comp_mask;
927  __u32 response_length;
928  __u32 events_reported;
929  __u32 reserved;
930};
931struct ib_uverbs_ex_modify_wq {
932  __u32 attr_mask;
933  __u32 wq_handle;
934  __u32 wq_state;
935  __u32 curr_wq_state;
936  __u32 flags;
937  __u32 flags_mask;
938};
939#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
940struct ib_uverbs_ex_create_rwq_ind_table {
941  __u32 comp_mask;
942  __u32 log_ind_tbl_size;
943  __u32 wq_handles[0];
944};
945struct ib_uverbs_ex_create_rwq_ind_table_resp {
946  __u32 comp_mask;
947  __u32 response_length;
948  __u32 ind_tbl_handle;
949  __u32 ind_tbl_num;
950};
951struct ib_uverbs_ex_destroy_rwq_ind_table {
952  __u32 comp_mask;
953  __u32 ind_tbl_handle;
954};
955#define IB_DEVICE_NAME_MAX 64
956#endif
957