• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 RDMA_USER_RXE_H
20 #define RDMA_USER_RXE_H
21 #include <linux/types.h>
22 #include <linux/socket.h>
23 #include <linux/in.h>
24 #include <linux/in6.h>
25 enum {
26   RXE_NETWORK_TYPE_IPV4 = 1,
27   RXE_NETWORK_TYPE_IPV6 = 2,
28 };
29 union rxe_gid {
30   __u8 raw[16];
31   struct {
32     __be64 subnet_prefix;
33     __be64 interface_id;
34   } global;
35 };
36 struct rxe_global_route {
37   union rxe_gid dgid;
38   __u32 flow_label;
39   __u8 sgid_index;
40   __u8 hop_limit;
41   __u8 traffic_class;
42 };
43 struct rxe_av {
44   __u8 port_num;
45   __u8 network_type;
46   __u8 dmac[6];
47   struct rxe_global_route grh;
48   union {
49     struct sockaddr_in _sockaddr_in;
50     struct sockaddr_in6 _sockaddr_in6;
51   } sgid_addr, dgid_addr;
52 };
53 struct rxe_send_wr {
54   __aligned_u64 wr_id;
55   __u32 num_sge;
56   __u32 opcode;
57   __u32 send_flags;
58   union {
59     __be32 imm_data;
60     __u32 invalidate_rkey;
61   } ex;
62   union {
63     struct {
64       __aligned_u64 remote_addr;
65       __u32 rkey;
66       __u32 reserved;
67     } rdma;
68     struct {
69       __aligned_u64 remote_addr;
70       __aligned_u64 compare_add;
71       __aligned_u64 swap;
72       __u32 rkey;
73       __u32 reserved;
74     } atomic;
75     struct {
76       __u32 remote_qpn;
77       __u32 remote_qkey;
78       __u16 pkey_index;
79     } ud;
80     struct {
81       union {
82         struct ib_mr * mr;
83         __aligned_u64 reserved;
84       };
85       __u32 key;
86       __u32 access;
87     } reg;
88   } wr;
89 };
90 struct rxe_sge {
91   __aligned_u64 addr;
92   __u32 length;
93   __u32 lkey;
94 };
95 struct mminfo {
96   __aligned_u64 offset;
97   __u32 size;
98   __u32 pad;
99 };
100 struct rxe_dma_info {
101   __u32 length;
102   __u32 resid;
103   __u32 cur_sge;
104   __u32 num_sge;
105   __u32 sge_offset;
106   __u32 reserved;
107   union {
108     __u8 inline_data[0];
109     struct rxe_sge sge[0];
110   };
111 };
112 struct rxe_send_wqe {
113   struct rxe_send_wr wr;
114   struct rxe_av av;
115   __u32 status;
116   __u32 state;
117   __aligned_u64 iova;
118   __u32 mask;
119   __u32 first_psn;
120   __u32 last_psn;
121   __u32 ack_length;
122   __u32 ssn;
123   __u32 has_rd_atomic;
124   struct rxe_dma_info dma;
125 };
126 struct rxe_recv_wqe {
127   __aligned_u64 wr_id;
128   __u32 num_sge;
129   __u32 padding;
130   struct rxe_dma_info dma;
131 };
132 struct rxe_create_cq_resp {
133   struct mminfo mi;
134 };
135 struct rxe_resize_cq_resp {
136   struct mminfo mi;
137 };
138 struct rxe_create_qp_resp {
139   struct mminfo rq_mi;
140   struct mminfo sq_mi;
141 };
142 struct rxe_create_srq_resp {
143   struct mminfo mi;
144   __u32 srq_num;
145   __u32 reserved;
146 };
147 struct rxe_modify_srq_cmd {
148   __aligned_u64 mmap_info_addr;
149 };
150 #endif
151