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