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