blob: e4a2f40a94a2df0eec68726094da4468fc66282d [file] [log] [blame]
Christopher Ferris49f525c2016-12-12 14:55:36 -08001/****************************************************************************
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 RDMA_USER_RXE_H
20#define RDMA_USER_RXE_H
21#include <linux/types.h>
Christopher Ferris76a1d452018-06-27 14:12:29 -070022#include <linux/socket.h>
23#include <linux/in.h>
24#include <linux/in6.h>
Christopher Ferris49f525c2016-12-12 14:55:36 -080025union rxe_gid {
Christopher Ferris49f525c2016-12-12 14:55:36 -080026 __u8 raw[16];
27 struct {
28 __be64 subnet_prefix;
29 __be64 interface_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -080030 } global;
31};
32struct rxe_global_route {
33 union rxe_gid dgid;
Christopher Ferris49f525c2016-12-12 14:55:36 -080034 __u32 flow_label;
35 __u8 sgid_index;
36 __u8 hop_limit;
37 __u8 traffic_class;
Christopher Ferris49f525c2016-12-12 14:55:36 -080038};
39struct rxe_av {
40 __u8 port_num;
41 __u8 network_type;
Christopher Ferris24f97eb2019-05-20 12:58:13 -070042 __u8 dmac[6];
Christopher Ferris49f525c2016-12-12 14:55:36 -080043 struct rxe_global_route grh;
44 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -080045 struct sockaddr_in _sockaddr_in;
Christopher Ferris49f525c2016-12-12 14:55:36 -080046 struct sockaddr_in6 _sockaddr_in6;
47 } sgid_addr, dgid_addr;
48};
49struct rxe_send_wr {
Christopher Ferris76a1d452018-06-27 14:12:29 -070050 __aligned_u64 wr_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -080051 __u32 num_sge;
52 __u32 opcode;
53 __u32 send_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -080054 union {
55 __be32 imm_data;
56 __u32 invalidate_rkey;
57 } ex;
Christopher Ferris49f525c2016-12-12 14:55:36 -080058 union {
59 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070060 __aligned_u64 remote_addr;
Christopher Ferris49f525c2016-12-12 14:55:36 -080061 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070062 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080063 } rdma;
64 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070065 __aligned_u64 remote_addr;
66 __aligned_u64 compare_add;
67 __aligned_u64 swap;
Christopher Ferris49f525c2016-12-12 14:55:36 -080068 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070069 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080070 } atomic;
71 struct {
Christopher Ferris49f525c2016-12-12 14:55:36 -080072 __u32 remote_qpn;
73 __u32 remote_qkey;
74 __u16 pkey_index;
75 } ud;
Christopher Ferris49f525c2016-12-12 14:55:36 -080076 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070077 union {
78 struct ib_mr * mr;
79 __aligned_u64 reserved;
80 };
Christopher Ferris49f525c2016-12-12 14:55:36 -080081 __u32 key;
Christopher Ferris76a1d452018-06-27 14:12:29 -070082 __u32 access;
Christopher Ferris49f525c2016-12-12 14:55:36 -080083 } reg;
84 } wr;
85};
86struct rxe_sge {
Christopher Ferris76a1d452018-06-27 14:12:29 -070087 __aligned_u64 addr;
Christopher Ferris49f525c2016-12-12 14:55:36 -080088 __u32 length;
89 __u32 lkey;
90};
Christopher Ferris49f525c2016-12-12 14:55:36 -080091struct mminfo {
Christopher Ferris76a1d452018-06-27 14:12:29 -070092 __aligned_u64 offset;
Christopher Ferris49f525c2016-12-12 14:55:36 -080093 __u32 size;
94 __u32 pad;
Christopher Ferris49f525c2016-12-12 14:55:36 -080095};
96struct rxe_dma_info {
97 __u32 length;
98 __u32 resid;
Christopher Ferris49f525c2016-12-12 14:55:36 -080099 __u32 cur_sge;
100 __u32 num_sge;
101 __u32 sge_offset;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700102 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800103 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800104 __u8 inline_data[0];
105 struct rxe_sge sge[0];
106 };
107};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800108struct rxe_send_wqe {
109 struct rxe_send_wr wr;
110 struct rxe_av av;
111 __u32 status;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800112 __u32 state;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700113 __aligned_u64 iova;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800114 __u32 mask;
115 __u32 first_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800116 __u32 last_psn;
117 __u32 ack_length;
118 __u32 ssn;
119 __u32 has_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800120 struct rxe_dma_info dma;
121};
122struct rxe_recv_wqe {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700123 __aligned_u64 wr_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800124 __u32 num_sge;
125 __u32 padding;
126 struct rxe_dma_info dma;
127};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700128struct rxe_create_cq_resp {
129 struct mminfo mi;
130};
131struct rxe_resize_cq_resp {
132 struct mminfo mi;
133};
134struct rxe_create_qp_resp {
135 struct mminfo rq_mi;
136 struct mminfo sq_mi;
137};
138struct rxe_create_srq_resp {
139 struct mminfo mi;
140 __u32 srq_num;
141 __u32 reserved;
142};
143struct rxe_modify_srq_cmd {
144 __aligned_u64 mmap_info_addr;
145};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800146#endif