blob: b76e45cee0d7b7120bb800b4d1c2834793a2cea9 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris48af7cb2017-02-21 12:35:09 -08007#ifndef HNS_ABI_USER_H
8#define HNS_ABI_USER_H
9#include <linux/types.h>
10struct hns_roce_ib_create_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -070011 __aligned_u64 buf_addr;
12 __aligned_u64 db_addr;
Christopher Ferris32ff3f82020-12-14 13:10:04 -080013 __u32 cqe_size;
14 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -070015};
Christopher Ferris05667cd2021-02-16 16:01:34 -080016enum hns_roce_cq_cap_flags {
17 HNS_ROCE_CQ_FLAG_RECORD_DB = 1 << 0,
18};
Christopher Ferris76a1d452018-06-27 14:12:29 -070019struct hns_roce_ib_create_cq_resp {
20 __aligned_u64 cqn;
21 __aligned_u64 cap_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080022};
Christopher Ferris0f795212024-01-17 14:17:28 -080023enum hns_roce_srq_cap_flags {
24 HNS_ROCE_SRQ_CAP_RECORD_DB = 1 << 0,
25};
26enum hns_roce_srq_cap_flags_resp {
27 HNS_ROCE_RSP_SRQ_CAP_RECORD_DB = 1 << 0,
28};
Christopher Ferrisd842e432019-03-07 10:21:59 -080029struct hns_roce_ib_create_srq {
30 __aligned_u64 buf_addr;
31 __aligned_u64 db_addr;
32 __aligned_u64 que_addr;
Christopher Ferris0f795212024-01-17 14:17:28 -080033 __u32 req_cap_flags;
34 __u32 reserved;
Christopher Ferrisd842e432019-03-07 10:21:59 -080035};
36struct hns_roce_ib_create_srq_resp {
37 __u32 srqn;
Christopher Ferris0f795212024-01-17 14:17:28 -080038 __u32 cap_flags;
Christopher Ferrisd842e432019-03-07 10:21:59 -080039};
Christopher Ferris7f4c8372024-06-03 14:22:19 -070040enum hns_roce_congest_type_flags {
41 HNS_ROCE_CREATE_QP_FLAGS_DCQCN,
42 HNS_ROCE_CREATE_QP_FLAGS_LDCP,
43 HNS_ROCE_CREATE_QP_FLAGS_HC3,
44 HNS_ROCE_CREATE_QP_FLAGS_DIP,
45};
46enum hns_roce_create_qp_comp_mask {
47 HNS_ROCE_CREATE_QP_MASK_CONGEST_TYPE = 1 << 0,
48};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080049struct hns_roce_ib_create_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -070050 __aligned_u64 buf_addr;
51 __aligned_u64 db_addr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080052 __u8 log_sq_bb_count;
53 __u8 log_sq_stride;
54 __u8 sq_no_prefetch;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080055 __u8 reserved[5];
Christopher Ferris9ce28842018-10-25 12:11:39 -070056 __aligned_u64 sdb_addr;
Christopher Ferris7f4c8372024-06-03 14:22:19 -070057 __aligned_u64 comp_mask;
58 __aligned_u64 create_flags;
59 __aligned_u64 cong_type_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080060};
Christopher Ferris05667cd2021-02-16 16:01:34 -080061enum hns_roce_qp_cap_flags {
62 HNS_ROCE_QP_CAP_RQ_RECORD_DB = 1 << 0,
63 HNS_ROCE_QP_CAP_SQ_RECORD_DB = 1 << 1,
64 HNS_ROCE_QP_CAP_OWNER_DB = 1 << 2,
Christopher Ferris1ed55342022-03-22 16:06:25 -070065 HNS_ROCE_QP_CAP_DIRECT_WQE = 1 << 5,
Christopher Ferris05667cd2021-02-16 16:01:34 -080066};
Christopher Ferris76a1d452018-06-27 14:12:29 -070067struct hns_roce_ib_create_qp_resp {
68 __aligned_u64 cap_flags;
Christopher Ferris1ed55342022-03-22 16:06:25 -070069 __aligned_u64 dwqe_mmap_key;
Christopher Ferris76a1d452018-06-27 14:12:29 -070070};
Christopher Ferris7ac54f52024-08-07 21:07:12 +000071struct hns_roce_ib_modify_qp_resp {
72 __u8 tc_mode;
73 __u8 priority;
74 __u8 reserved[6];
75};
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080076enum {
77 HNS_ROCE_EXSGE_FLAGS = 1 << 0,
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000078 HNS_ROCE_RQ_INLINE_FLAGS = 1 << 1,
79 HNS_ROCE_CQE_INLINE_FLAGS = 1 << 2,
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080080};
81enum {
82 HNS_ROCE_RSP_EXSGE_FLAGS = 1 << 0,
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000083 HNS_ROCE_RSP_RQ_INLINE_FLAGS = 1 << 1,
84 HNS_ROCE_RSP_CQE_INLINE_FLAGS = 1 << 2,
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080085};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080086struct hns_roce_ib_alloc_ucontext_resp {
87 __u32 qp_tab_size;
Christopher Ferris32ff3f82020-12-14 13:10:04 -080088 __u32 cqe_size;
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +000089 __u32 srq_tab_size;
90 __u32 reserved;
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080091 __u32 config;
92 __u32 max_inline_data;
Christopher Ferris7f4c8372024-06-03 14:22:19 -070093 __u8 congest_type;
94 __u8 reserved0[7];
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080095};
96struct hns_roce_ib_alloc_ucontext {
97 __u32 config;
98 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -070099};
100struct hns_roce_ib_alloc_pd_resp {
101 __u32 pdn;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800102};
Christopher Ferrisb830ddf2024-03-28 11:48:08 -0700103struct hns_roce_ib_create_ah_resp {
104 __u8 dmac[6];
Christopher Ferris7ac54f52024-08-07 21:07:12 +0000105 __u8 priority;
106 __u8 tc_mode;
Christopher Ferrisb830ddf2024-03-28 11:48:08 -0700107};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800108#endif