ib_user_verbs.h 14 KB

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