ib_user_verbs.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. /*
  2. * Copyright (c) 2005 Topspin Communications. All rights reserved.
  3. * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
  4. * Copyright (c) 2005 PathScale, Inc. All rights reserved.
  5. * Copyright (c) 2006 Mellanox Technologies. All rights reserved.
  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.
  34. */
  35. #ifndef IB_USER_VERBS_H
  36. #define IB_USER_VERBS_H
  37. #include <linux/types.h>
  38. /*
  39. * Increment this value if any changes that break userspace ABI
  40. * compatibility are made.
  41. */
  42. #define IB_USER_VERBS_ABI_VERSION 6
  43. enum {
  44. IB_USER_VERBS_CMD_GET_CONTEXT,
  45. IB_USER_VERBS_CMD_QUERY_DEVICE,
  46. IB_USER_VERBS_CMD_QUERY_PORT,
  47. IB_USER_VERBS_CMD_ALLOC_PD,
  48. IB_USER_VERBS_CMD_DEALLOC_PD,
  49. IB_USER_VERBS_CMD_CREATE_AH,
  50. IB_USER_VERBS_CMD_MODIFY_AH,
  51. IB_USER_VERBS_CMD_QUERY_AH,
  52. IB_USER_VERBS_CMD_DESTROY_AH,
  53. IB_USER_VERBS_CMD_REG_MR,
  54. IB_USER_VERBS_CMD_REG_SMR,
  55. IB_USER_VERBS_CMD_REREG_MR,
  56. IB_USER_VERBS_CMD_QUERY_MR,
  57. IB_USER_VERBS_CMD_DEREG_MR,
  58. IB_USER_VERBS_CMD_ALLOC_MW,
  59. IB_USER_VERBS_CMD_BIND_MW,
  60. IB_USER_VERBS_CMD_DEALLOC_MW,
  61. IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
  62. IB_USER_VERBS_CMD_CREATE_CQ,
  63. IB_USER_VERBS_CMD_RESIZE_CQ,
  64. IB_USER_VERBS_CMD_DESTROY_CQ,
  65. IB_USER_VERBS_CMD_POLL_CQ,
  66. IB_USER_VERBS_CMD_PEEK_CQ,
  67. IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
  68. IB_USER_VERBS_CMD_CREATE_QP,
  69. IB_USER_VERBS_CMD_QUERY_QP,
  70. IB_USER_VERBS_CMD_MODIFY_QP,
  71. IB_USER_VERBS_CMD_DESTROY_QP,
  72. IB_USER_VERBS_CMD_POST_SEND,
  73. IB_USER_VERBS_CMD_POST_RECV,
  74. IB_USER_VERBS_CMD_ATTACH_MCAST,
  75. IB_USER_VERBS_CMD_DETACH_MCAST,
  76. IB_USER_VERBS_CMD_CREATE_SRQ,
  77. IB_USER_VERBS_CMD_MODIFY_SRQ,
  78. IB_USER_VERBS_CMD_QUERY_SRQ,
  79. IB_USER_VERBS_CMD_DESTROY_SRQ,
  80. IB_USER_VERBS_CMD_POST_SRQ_RECV,
  81. IB_USER_VERBS_CMD_OPEN_XRCD,
  82. IB_USER_VERBS_CMD_CLOSE_XRCD,
  83. IB_USER_VERBS_CMD_CREATE_XSRQ,
  84. IB_USER_VERBS_CMD_OPEN_QP
  85. };
  86. /*
  87. * Make sure that all structs defined in this file remain laid out so
  88. * that they pack the same way on 32-bit and 64-bit architectures (to
  89. * avoid incompatibility between 32-bit userspace and 64-bit kernels).
  90. * Specifically:
  91. * - Do not use pointer types -- pass pointers in __u64 instead.
  92. * - Make sure that any structure larger than 4 bytes is padded to a
  93. * multiple of 8 bytes. Otherwise the structure size will be
  94. * different between 32-bit and 64-bit architectures.
  95. */
  96. struct ib_uverbs_async_event_desc {
  97. __u64 element;
  98. __u32 event_type; /* enum ib_event_type */
  99. __u32 reserved;
  100. };
  101. struct ib_uverbs_comp_event_desc {
  102. __u64 cq_handle;
  103. };
  104. /*
  105. * All commands from userspace should start with a __u32 command field
  106. * followed by __u16 in_words and out_words fields (which give the
  107. * length of the command block and response buffer if any in 32-bit
  108. * words). The kernel driver will read these fields first and read
  109. * the rest of the command struct based on these value.
  110. */
  111. struct ib_uverbs_cmd_hdr {
  112. __u32 command;
  113. __u16 in_words;
  114. __u16 out_words;
  115. };
  116. struct ib_uverbs_get_context {
  117. __u64 response;
  118. __u64 driver_data[0];
  119. };
  120. struct ib_uverbs_get_context_resp {
  121. __u32 async_fd;
  122. __u32 num_comp_vectors;
  123. };
  124. struct ib_uverbs_query_device {
  125. __u64 response;
  126. __u64 driver_data[0];
  127. };
  128. struct ib_uverbs_query_device_resp {
  129. __u64 fw_ver;
  130. __be64 node_guid;
  131. __be64 sys_image_guid;
  132. __u64 max_mr_size;
  133. __u64 page_size_cap;
  134. __u32 vendor_id;
  135. __u32 vendor_part_id;
  136. __u32 hw_ver;
  137. __u32 max_qp;
  138. __u32 max_qp_wr;
  139. __u32 device_cap_flags;
  140. __u32 max_sge;
  141. __u32 max_sge_rd;
  142. __u32 max_cq;
  143. __u32 max_cqe;
  144. __u32 max_mr;
  145. __u32 max_pd;
  146. __u32 max_qp_rd_atom;
  147. __u32 max_ee_rd_atom;
  148. __u32 max_res_rd_atom;
  149. __u32 max_qp_init_rd_atom;
  150. __u32 max_ee_init_rd_atom;
  151. __u32 atomic_cap;
  152. __u32 max_ee;
  153. __u32 max_rdd;
  154. __u32 max_mw;
  155. __u32 max_raw_ipv6_qp;
  156. __u32 max_raw_ethy_qp;
  157. __u32 max_mcast_grp;
  158. __u32 max_mcast_qp_attach;
  159. __u32 max_total_mcast_qp_attach;
  160. __u32 max_ah;
  161. __u32 max_fmr;
  162. __u32 max_map_per_fmr;
  163. __u32 max_srq;
  164. __u32 max_srq_wr;
  165. __u32 max_srq_sge;
  166. __u16 max_pkeys;
  167. __u8 local_ca_ack_delay;
  168. __u8 phys_port_cnt;
  169. __u8 reserved[4];
  170. };
  171. struct ib_uverbs_query_port {
  172. __u64 response;
  173. __u8 port_num;
  174. __u8 reserved[7];
  175. __u64 driver_data[0];
  176. };
  177. struct ib_uverbs_query_port_resp {
  178. __u32 port_cap_flags;
  179. __u32 max_msg_sz;
  180. __u32 bad_pkey_cntr;
  181. __u32 qkey_viol_cntr;
  182. __u32 gid_tbl_len;
  183. __u16 pkey_tbl_len;
  184. __u16 lid;
  185. __u16 sm_lid;
  186. __u8 state;
  187. __u8 max_mtu;
  188. __u8 active_mtu;
  189. __u8 lmc;
  190. __u8 max_vl_num;
  191. __u8 sm_sl;
  192. __u8 subnet_timeout;
  193. __u8 init_type_reply;
  194. __u8 active_width;
  195. __u8 active_speed;
  196. __u8 phys_state;
  197. __u8 link_layer;
  198. __u8 reserved[2];
  199. };
  200. struct ib_uverbs_alloc_pd {
  201. __u64 response;
  202. __u64 driver_data[0];
  203. };
  204. struct ib_uverbs_alloc_pd_resp {
  205. __u32 pd_handle;
  206. };
  207. struct ib_uverbs_dealloc_pd {
  208. __u32 pd_handle;
  209. };
  210. struct ib_uverbs_open_xrcd {
  211. __u64 response;
  212. __u32 fd;
  213. __u32 oflags;
  214. __u64 driver_data[0];
  215. };
  216. struct ib_uverbs_open_xrcd_resp {
  217. __u32 xrcd_handle;
  218. };
  219. struct ib_uverbs_close_xrcd {
  220. __u32 xrcd_handle;
  221. };
  222. struct ib_uverbs_reg_mr {
  223. __u64 response;
  224. __u64 start;
  225. __u64 length;
  226. __u64 hca_va;
  227. __u32 pd_handle;
  228. __u32 access_flags;
  229. __u64 driver_data[0];
  230. };
  231. struct ib_uverbs_reg_mr_resp {
  232. __u32 mr_handle;
  233. __u32 lkey;
  234. __u32 rkey;
  235. };
  236. struct ib_uverbs_dereg_mr {
  237. __u32 mr_handle;
  238. };
  239. struct ib_uverbs_alloc_mw {
  240. __u64 response;
  241. __u32 pd_handle;
  242. __u8 mw_type;
  243. __u8 reserved[3];
  244. };
  245. struct ib_uverbs_alloc_mw_resp {
  246. __u32 mw_handle;
  247. __u32 rkey;
  248. };
  249. struct ib_uverbs_dealloc_mw {
  250. __u32 mw_handle;
  251. };
  252. struct ib_uverbs_create_comp_channel {
  253. __u64 response;
  254. };
  255. struct ib_uverbs_create_comp_channel_resp {
  256. __u32 fd;
  257. };
  258. struct ib_uverbs_create_cq {
  259. __u64 response;
  260. __u64 user_handle;
  261. __u32 cqe;
  262. __u32 comp_vector;
  263. __s32 comp_channel;
  264. __u32 reserved;
  265. __u64 driver_data[0];
  266. };
  267. struct ib_uverbs_create_cq_resp {
  268. __u32 cq_handle;
  269. __u32 cqe;
  270. };
  271. struct ib_uverbs_resize_cq {
  272. __u64 response;
  273. __u32 cq_handle;
  274. __u32 cqe;
  275. __u64 driver_data[0];
  276. };
  277. struct ib_uverbs_resize_cq_resp {
  278. __u32 cqe;
  279. __u32 reserved;
  280. __u64 driver_data[0];
  281. };
  282. struct ib_uverbs_poll_cq {
  283. __u64 response;
  284. __u32 cq_handle;
  285. __u32 ne;
  286. };
  287. struct ib_uverbs_wc {
  288. __u64 wr_id;
  289. __u32 status;
  290. __u32 opcode;
  291. __u32 vendor_err;
  292. __u32 byte_len;
  293. union {
  294. __u32 imm_data;
  295. __u32 invalidate_rkey;
  296. } ex;
  297. __u32 qp_num;
  298. __u32 src_qp;
  299. __u32 wc_flags;
  300. __u16 pkey_index;
  301. __u16 slid;
  302. __u8 sl;
  303. __u8 dlid_path_bits;
  304. __u8 port_num;
  305. __u8 reserved;
  306. };
  307. struct ib_uverbs_poll_cq_resp {
  308. __u32 count;
  309. __u32 reserved;
  310. struct ib_uverbs_wc wc[0];
  311. };
  312. struct ib_uverbs_req_notify_cq {
  313. __u32 cq_handle;
  314. __u32 solicited_only;
  315. };
  316. struct ib_uverbs_destroy_cq {
  317. __u64 response;
  318. __u32 cq_handle;
  319. __u32 reserved;
  320. };
  321. struct ib_uverbs_destroy_cq_resp {
  322. __u32 comp_events_reported;
  323. __u32 async_events_reported;
  324. };
  325. struct ib_uverbs_global_route {
  326. __u8 dgid[16];
  327. __u32 flow_label;
  328. __u8 sgid_index;
  329. __u8 hop_limit;
  330. __u8 traffic_class;
  331. __u8 reserved;
  332. };
  333. struct ib_uverbs_ah_attr {
  334. struct ib_uverbs_global_route grh;
  335. __u16 dlid;
  336. __u8 sl;
  337. __u8 src_path_bits;
  338. __u8 static_rate;
  339. __u8 is_global;
  340. __u8 port_num;
  341. __u8 reserved;
  342. };
  343. struct ib_uverbs_qp_attr {
  344. __u32 qp_attr_mask;
  345. __u32 qp_state;
  346. __u32 cur_qp_state;
  347. __u32 path_mtu;
  348. __u32 path_mig_state;
  349. __u32 qkey;
  350. __u32 rq_psn;
  351. __u32 sq_psn;
  352. __u32 dest_qp_num;
  353. __u32 qp_access_flags;
  354. struct ib_uverbs_ah_attr ah_attr;
  355. struct ib_uverbs_ah_attr alt_ah_attr;
  356. /* ib_qp_cap */
  357. __u32 max_send_wr;
  358. __u32 max_recv_wr;
  359. __u32 max_send_sge;
  360. __u32 max_recv_sge;
  361. __u32 max_inline_data;
  362. __u16 pkey_index;
  363. __u16 alt_pkey_index;
  364. __u8 en_sqd_async_notify;
  365. __u8 sq_draining;
  366. __u8 max_rd_atomic;
  367. __u8 max_dest_rd_atomic;
  368. __u8 min_rnr_timer;
  369. __u8 port_num;
  370. __u8 timeout;
  371. __u8 retry_cnt;
  372. __u8 rnr_retry;
  373. __u8 alt_port_num;
  374. __u8 alt_timeout;
  375. __u8 reserved[5];
  376. };
  377. struct ib_uverbs_create_qp {
  378. __u64 response;
  379. __u64 user_handle;
  380. __u32 pd_handle;
  381. __u32 send_cq_handle;
  382. __u32 recv_cq_handle;
  383. __u32 srq_handle;
  384. __u32 max_send_wr;
  385. __u32 max_recv_wr;
  386. __u32 max_send_sge;
  387. __u32 max_recv_sge;
  388. __u32 max_inline_data;
  389. __u8 sq_sig_all;
  390. __u8 qp_type;
  391. __u8 is_srq;
  392. __u8 reserved;
  393. __u64 driver_data[0];
  394. };
  395. struct ib_uverbs_open_qp {
  396. __u64 response;
  397. __u64 user_handle;
  398. __u32 pd_handle;
  399. __u32 qpn;
  400. __u8 qp_type;
  401. __u8 reserved[7];
  402. __u64 driver_data[0];
  403. };
  404. /* also used for open response */
  405. struct ib_uverbs_create_qp_resp {
  406. __u32 qp_handle;
  407. __u32 qpn;
  408. __u32 max_send_wr;
  409. __u32 max_recv_wr;
  410. __u32 max_send_sge;
  411. __u32 max_recv_sge;
  412. __u32 max_inline_data;
  413. __u32 reserved;
  414. };
  415. /*
  416. * This struct needs to remain a multiple of 8 bytes to keep the
  417. * alignment of the modify QP parameters.
  418. */
  419. struct ib_uverbs_qp_dest {
  420. __u8 dgid[16];
  421. __u32 flow_label;
  422. __u16 dlid;
  423. __u16 reserved;
  424. __u8 sgid_index;
  425. __u8 hop_limit;
  426. __u8 traffic_class;
  427. __u8 sl;
  428. __u8 src_path_bits;
  429. __u8 static_rate;
  430. __u8 is_global;
  431. __u8 port_num;
  432. };
  433. struct ib_uverbs_query_qp {
  434. __u64 response;
  435. __u32 qp_handle;
  436. __u32 attr_mask;
  437. __u64 driver_data[0];
  438. };
  439. struct ib_uverbs_query_qp_resp {
  440. struct ib_uverbs_qp_dest dest;
  441. struct ib_uverbs_qp_dest alt_dest;
  442. __u32 max_send_wr;
  443. __u32 max_recv_wr;
  444. __u32 max_send_sge;
  445. __u32 max_recv_sge;
  446. __u32 max_inline_data;
  447. __u32 qkey;
  448. __u32 rq_psn;
  449. __u32 sq_psn;
  450. __u32 dest_qp_num;
  451. __u32 qp_access_flags;
  452. __u16 pkey_index;
  453. __u16 alt_pkey_index;
  454. __u8 qp_state;
  455. __u8 cur_qp_state;
  456. __u8 path_mtu;
  457. __u8 path_mig_state;
  458. __u8 sq_draining;
  459. __u8 max_rd_atomic;
  460. __u8 max_dest_rd_atomic;
  461. __u8 min_rnr_timer;
  462. __u8 port_num;
  463. __u8 timeout;
  464. __u8 retry_cnt;
  465. __u8 rnr_retry;
  466. __u8 alt_port_num;
  467. __u8 alt_timeout;
  468. __u8 sq_sig_all;
  469. __u8 reserved[5];
  470. __u64 driver_data[0];
  471. };
  472. struct ib_uverbs_modify_qp {
  473. struct ib_uverbs_qp_dest dest;
  474. struct ib_uverbs_qp_dest alt_dest;
  475. __u32 qp_handle;
  476. __u32 attr_mask;
  477. __u32 qkey;
  478. __u32 rq_psn;
  479. __u32 sq_psn;
  480. __u32 dest_qp_num;
  481. __u32 qp_access_flags;
  482. __u16 pkey_index;
  483. __u16 alt_pkey_index;
  484. __u8 qp_state;
  485. __u8 cur_qp_state;
  486. __u8 path_mtu;
  487. __u8 path_mig_state;
  488. __u8 en_sqd_async_notify;
  489. __u8 max_rd_atomic;
  490. __u8 max_dest_rd_atomic;
  491. __u8 min_rnr_timer;
  492. __u8 port_num;
  493. __u8 timeout;
  494. __u8 retry_cnt;
  495. __u8 rnr_retry;
  496. __u8 alt_port_num;
  497. __u8 alt_timeout;
  498. __u8 reserved[2];
  499. __u64 driver_data[0];
  500. };
  501. struct ib_uverbs_modify_qp_resp {
  502. };
  503. struct ib_uverbs_destroy_qp {
  504. __u64 response;
  505. __u32 qp_handle;
  506. __u32 reserved;
  507. };
  508. struct ib_uverbs_destroy_qp_resp {
  509. __u32 events_reported;
  510. };
  511. /*
  512. * The ib_uverbs_sge structure isn't used anywhere, since we assume
  513. * the ib_sge structure is packed the same way on 32-bit and 64-bit
  514. * architectures in both kernel and user space. It's just here to
  515. * document the ABI.
  516. */
  517. struct ib_uverbs_sge {
  518. __u64 addr;
  519. __u32 length;
  520. __u32 lkey;
  521. };
  522. struct ib_uverbs_send_wr {
  523. __u64 wr_id;
  524. __u32 num_sge;
  525. __u32 opcode;
  526. __u32 send_flags;
  527. union {
  528. __u32 imm_data;
  529. __u32 invalidate_rkey;
  530. } ex;
  531. union {
  532. struct {
  533. __u64 remote_addr;
  534. __u32 rkey;
  535. __u32 reserved;
  536. } rdma;
  537. struct {
  538. __u64 remote_addr;
  539. __u64 compare_add;
  540. __u64 swap;
  541. __u32 rkey;
  542. __u32 reserved;
  543. } atomic;
  544. struct {
  545. __u32 ah;
  546. __u32 remote_qpn;
  547. __u32 remote_qkey;
  548. __u32 reserved;
  549. } ud;
  550. } wr;
  551. };
  552. struct ib_uverbs_post_send {
  553. __u64 response;
  554. __u32 qp_handle;
  555. __u32 wr_count;
  556. __u32 sge_count;
  557. __u32 wqe_size;
  558. struct ib_uverbs_send_wr send_wr[0];
  559. };
  560. struct ib_uverbs_post_send_resp {
  561. __u32 bad_wr;
  562. };
  563. struct ib_uverbs_recv_wr {
  564. __u64 wr_id;
  565. __u32 num_sge;
  566. __u32 reserved;
  567. };
  568. struct ib_uverbs_post_recv {
  569. __u64 response;
  570. __u32 qp_handle;
  571. __u32 wr_count;
  572. __u32 sge_count;
  573. __u32 wqe_size;
  574. struct ib_uverbs_recv_wr recv_wr[0];
  575. };
  576. struct ib_uverbs_post_recv_resp {
  577. __u32 bad_wr;
  578. };
  579. struct ib_uverbs_post_srq_recv {
  580. __u64 response;
  581. __u32 srq_handle;
  582. __u32 wr_count;
  583. __u32 sge_count;
  584. __u32 wqe_size;
  585. struct ib_uverbs_recv_wr recv[0];
  586. };
  587. struct ib_uverbs_post_srq_recv_resp {
  588. __u32 bad_wr;
  589. };
  590. struct ib_uverbs_create_ah {
  591. __u64 response;
  592. __u64 user_handle;
  593. __u32 pd_handle;
  594. __u32 reserved;
  595. struct ib_uverbs_ah_attr attr;
  596. };
  597. struct ib_uverbs_create_ah_resp {
  598. __u32 ah_handle;
  599. };
  600. struct ib_uverbs_destroy_ah {
  601. __u32 ah_handle;
  602. };
  603. struct ib_uverbs_attach_mcast {
  604. __u8 gid[16];
  605. __u32 qp_handle;
  606. __u16 mlid;
  607. __u16 reserved;
  608. __u64 driver_data[0];
  609. };
  610. struct ib_uverbs_detach_mcast {
  611. __u8 gid[16];
  612. __u32 qp_handle;
  613. __u16 mlid;
  614. __u16 reserved;
  615. __u64 driver_data[0];
  616. };
  617. struct ib_uverbs_create_srq {
  618. __u64 response;
  619. __u64 user_handle;
  620. __u32 pd_handle;
  621. __u32 max_wr;
  622. __u32 max_sge;
  623. __u32 srq_limit;
  624. __u64 driver_data[0];
  625. };
  626. struct ib_uverbs_create_xsrq {
  627. __u64 response;
  628. __u64 user_handle;
  629. __u32 srq_type;
  630. __u32 pd_handle;
  631. __u32 max_wr;
  632. __u32 max_sge;
  633. __u32 srq_limit;
  634. __u32 reserved;
  635. __u32 xrcd_handle;
  636. __u32 cq_handle;
  637. __u64 driver_data[0];
  638. };
  639. struct ib_uverbs_create_srq_resp {
  640. __u32 srq_handle;
  641. __u32 max_wr;
  642. __u32 max_sge;
  643. __u32 srqn;
  644. };
  645. struct ib_uverbs_modify_srq {
  646. __u32 srq_handle;
  647. __u32 attr_mask;
  648. __u32 max_wr;
  649. __u32 srq_limit;
  650. __u64 driver_data[0];
  651. };
  652. struct ib_uverbs_query_srq {
  653. __u64 response;
  654. __u32 srq_handle;
  655. __u32 reserved;
  656. __u64 driver_data[0];
  657. };
  658. struct ib_uverbs_query_srq_resp {
  659. __u32 max_wr;
  660. __u32 max_sge;
  661. __u32 srq_limit;
  662. __u32 reserved;
  663. };
  664. struct ib_uverbs_destroy_srq {
  665. __u64 response;
  666. __u32 srq_handle;
  667. __u32 reserved;
  668. };
  669. struct ib_uverbs_destroy_srq_resp {
  670. __u32 events_reported;
  671. };
  672. #endif /* IB_USER_VERBS_H */