Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 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 __QEDR_USER_H__ |
| 20 | #define __QEDR_USER_H__ |
| 21 | #include <linux/types.h> |
| 22 | #define QEDR_ABI_VERSION (8) |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 23 | enum qedr_alloc_ucontext_flags { |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 24 | QEDR_ALLOC_UCTX_EDPM_MODE = 1 << 0, |
| 25 | QEDR_ALLOC_UCTX_DB_REC = 1 << 1, |
| 26 | QEDR_SUPPORT_DPM_SIZES = 1 << 2, |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 27 | }; |
| 28 | struct qedr_alloc_ucontext_req { |
| 29 | __u32 context_flags; |
| 30 | __u32 reserved; |
| 31 | }; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 32 | #define QEDR_LDPM_MAX_SIZE (8192) |
| 33 | #define QEDR_EDPM_TRANS_SIZE (64) |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 34 | #define QEDR_EDPM_MAX_SIZE (ROCE_REQ_MAX_INLINE_DATA_SIZE) |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 35 | enum qedr_rdma_dpm_type { |
| 36 | QEDR_DPM_TYPE_NONE = 0, |
| 37 | QEDR_DPM_TYPE_ROCE_ENHANCED = 1 << 0, |
| 38 | QEDR_DPM_TYPE_ROCE_LEGACY = 1 << 1, |
| 39 | QEDR_DPM_TYPE_IWARP_LEGACY = 1 << 2, |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 40 | QEDR_DPM_TYPE_ROCE_EDPM_MODE = 1 << 3, |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 41 | QEDR_DPM_SIZES_SET = 1 << 4, |
| 42 | }; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 43 | struct qedr_alloc_ucontext_resp { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 44 | __aligned_u64 db_pa; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 45 | __u32 db_size; |
| 46 | __u32 max_send_wr; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 47 | __u32 max_recv_wr; |
| 48 | __u32 max_srq_wr; |
| 49 | __u32 sges_per_send_wr; |
| 50 | __u32 sges_per_recv_wr; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 51 | __u32 sges_per_srq_wr; |
| 52 | __u32 max_cqes; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 53 | __u8 dpm_flags; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 54 | __u8 wids_enabled; |
| 55 | __u16 wid_count; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 56 | __u16 ldpm_limit_size; |
| 57 | __u8 edpm_trans_size; |
| 58 | __u8 reserved; |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 59 | __u16 edpm_limit_size; |
| 60 | __u8 padding[6]; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 61 | }; |
| 62 | struct qedr_alloc_pd_ureq { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 63 | __aligned_u64 rsvd1; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 64 | }; |
| 65 | struct qedr_alloc_pd_uresp { |
| 66 | __u32 pd_id; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 67 | __u32 reserved; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 68 | }; |
| 69 | struct qedr_create_cq_ureq { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 70 | __aligned_u64 addr; |
| 71 | __aligned_u64 len; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 72 | }; |
| 73 | struct qedr_create_cq_uresp { |
| 74 | __u32 db_offset; |
| 75 | __u16 icid; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 76 | __u16 reserved; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 77 | __aligned_u64 db_rec_addr; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 78 | }; |
| 79 | struct qedr_create_qp_ureq { |
| 80 | __u32 qp_handle_hi; |
| 81 | __u32 qp_handle_lo; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 82 | __aligned_u64 sq_addr; |
| 83 | __aligned_u64 sq_len; |
| 84 | __aligned_u64 rq_addr; |
| 85 | __aligned_u64 rq_len; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 86 | }; |
| 87 | struct qedr_create_qp_uresp { |
| 88 | __u32 qp_id; |
| 89 | __u32 atomic_supported; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 90 | __u32 sq_db_offset; |
| 91 | __u16 sq_icid; |
| 92 | __u32 rq_db_offset; |
| 93 | __u16 rq_icid; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 94 | __u32 rq_db2_offset; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 95 | __u32 reserved; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 96 | __aligned_u64 sq_db_rec_addr; |
| 97 | __aligned_u64 rq_db_rec_addr; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 98 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 99 | struct qedr_create_srq_ureq { |
| 100 | __aligned_u64 prod_pair_addr; |
| 101 | __aligned_u64 srq_addr; |
| 102 | __aligned_u64 srq_len; |
| 103 | }; |
| 104 | struct qedr_create_srq_uresp { |
| 105 | __u16 srq_id; |
| 106 | __u16 reserved0; |
| 107 | __u32 reserved1; |
| 108 | }; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 109 | struct qedr_user_db_rec { |
| 110 | __aligned_u64 db_data; |
| 111 | }; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 112 | #endif |