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