1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */ /* * Copyright (c) 2022, Microsoft Corporation. All rights reserved. */ #ifndef MANA_ABI_USER_H #define MANA_ABI_USER_H #include <linux/types.h> #include <rdma/ib_user_ioctl_verbs.h> /* * Increment this value if any changes that break userspace ABI * compatibility are made. */ #define MANA_IB_UVERBS_ABI_VERSION 1 enum mana_ib_create_cq_flags { /* Reserved for backward compatibility. Legacy * kernel versions use it to create CQs in RNIC */ MANA_IB_CREATE_RNIC_CQ = 1 << 0, }; struct mana_ib_create_cq { __aligned_u64 buf_addr; __u16 comp_mask; __u16 reserved0; __u32 reserved1; }; struct mana_ib_create_cq_resp { __u32 cqid; __u32 reserved; }; struct mana_ib_create_qp { __aligned_u64 sq_buf_addr; __u32 sq_buf_size; __u32 port; }; struct mana_ib_create_qp_resp { __u32 sqid; __u32 cqid; __u32 tx_vp_offset; __u32 reserved; }; struct mana_ib_create_rc_qp { __aligned_u64 queue_buf[4]; __u32 queue_size[4]; }; struct mana_ib_create_rc_qp_resp { __u32 queue_id[4]; }; struct mana_ib_create_uc_qp { __aligned_u64 queue_buf[3]; __u32 queue_size[3]; __u32 comp_mask; }; struct mana_ib_create_uc_qp_resp { __u32 queue_id[3]; __u32 reserved; }; struct mana_ib_create_wq { __aligned_u64 wq_buf_addr; __u32 wq_buf_size; __u32 reserved; }; /* RX Hash function flags */ enum mana_ib_rx_hash_function_flags { MANA_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0, }; struct mana_ib_create_qp_rss { __aligned_u64 rx_hash_fields_mask; __u8 rx_hash_function; __u8 reserved[7]; __u32 rx_hash_key_len; __u8 rx_hash_key[40]; __u32 port; }; struct rss_resp_entry { __u32 cqid; __u32 wqid; }; struct mana_ib_create_qp_rss_resp { __aligned_u64 num_entries; struct rss_resp_entry entries[64]; }; enum mana_ib_ucontext_support { MANA_IB_UCNTX_ALLOC_PDN_SUPPORT = 1 << 0, }; struct mana_ib_alloc_ucontext_resp { __aligned_u64 comp_mask; }; enum mana_ib_create_pd_flags { MANA_IB_PD_SHORT_PDN = 1 << 0, }; struct mana_ib_alloc_pd { __u32 comp_mask; __u32 reserved; }; struct mana_ib_alloc_pd_resp { __u32 pdn; __u32 reserved; }; #endif