• 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 _UAPI_RDMA_NETLINK_H
20 #define _UAPI_RDMA_NETLINK_H
21 #include <linux/types.h>
22 enum {
23   RDMA_NL_IWCM = 2,
24   RDMA_NL_RSVD,
25   RDMA_NL_LS,
26   RDMA_NL_NLDEV,
27   RDMA_NL_NUM_CLIENTS
28 };
29 enum {
30   RDMA_NL_GROUP_IWPM = 2,
31   RDMA_NL_GROUP_LS,
32   RDMA_NL_NUM_GROUPS
33 };
34 #define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10)
35 #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
36 #define RDMA_NL_GET_TYPE(client,op) ((client << 10) + op)
37 #define IWPM_UABI_VERSION_MIN 3
38 #define IWPM_UABI_VERSION 4
39 enum {
40   IWPM_FLAGS_NO_PORT_MAP = (1 << 0),
41 };
42 enum {
43   RDMA_NL_IWPM_REG_PID = 0,
44   RDMA_NL_IWPM_ADD_MAPPING,
45   RDMA_NL_IWPM_QUERY_MAPPING,
46   RDMA_NL_IWPM_REMOVE_MAPPING,
47   RDMA_NL_IWPM_REMOTE_INFO,
48   RDMA_NL_IWPM_HANDLE_ERR,
49   RDMA_NL_IWPM_MAPINFO,
50   RDMA_NL_IWPM_MAPINFO_NUM,
51   RDMA_NL_IWPM_HELLO,
52   RDMA_NL_IWPM_NUM_OPS
53 };
54 enum {
55   IWPM_NLA_REG_PID_UNSPEC = 0,
56   IWPM_NLA_REG_PID_SEQ,
57   IWPM_NLA_REG_IF_NAME,
58   IWPM_NLA_REG_IBDEV_NAME,
59   IWPM_NLA_REG_ULIB_NAME,
60   IWPM_NLA_REG_PID_MAX
61 };
62 enum {
63   IWPM_NLA_RREG_PID_UNSPEC = 0,
64   IWPM_NLA_RREG_PID_SEQ,
65   IWPM_NLA_RREG_IBDEV_NAME,
66   IWPM_NLA_RREG_ULIB_NAME,
67   IWPM_NLA_RREG_ULIB_VER,
68   IWPM_NLA_RREG_PID_ERR,
69   IWPM_NLA_RREG_PID_MAX
70 };
71 enum {
72   IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0,
73   IWPM_NLA_MANAGE_MAPPING_SEQ,
74   IWPM_NLA_MANAGE_ADDR,
75   IWPM_NLA_MANAGE_FLAGS,
76   IWPM_NLA_MANAGE_MAPPING_MAX
77 };
78 enum {
79   IWPM_NLA_RMANAGE_MAPPING_UNSPEC = 0,
80   IWPM_NLA_RMANAGE_MAPPING_SEQ,
81   IWPM_NLA_RMANAGE_ADDR,
82   IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
83   IWPM_NLA_MANAGE_MAPPED_LOC_ADDR = IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
84   IWPM_NLA_RMANAGE_MAPPING_ERR,
85   IWPM_NLA_RMANAGE_MAPPING_MAX
86 };
87 #define IWPM_NLA_MAPINFO_SEND_MAX 3
88 #define IWPM_NLA_REMOVE_MAPPING_MAX 3
89 enum {
90   IWPM_NLA_QUERY_MAPPING_UNSPEC = 0,
91   IWPM_NLA_QUERY_MAPPING_SEQ,
92   IWPM_NLA_QUERY_LOCAL_ADDR,
93   IWPM_NLA_QUERY_REMOTE_ADDR,
94   IWPM_NLA_QUERY_FLAGS,
95   IWPM_NLA_QUERY_MAPPING_MAX,
96 };
97 enum {
98   IWPM_NLA_RQUERY_MAPPING_UNSPEC = 0,
99   IWPM_NLA_RQUERY_MAPPING_SEQ,
100   IWPM_NLA_RQUERY_LOCAL_ADDR,
101   IWPM_NLA_RQUERY_REMOTE_ADDR,
102   IWPM_NLA_RQUERY_MAPPED_LOC_ADDR,
103   IWPM_NLA_RQUERY_MAPPED_REM_ADDR,
104   IWPM_NLA_RQUERY_MAPPING_ERR,
105   IWPM_NLA_RQUERY_MAPPING_MAX
106 };
107 enum {
108   IWPM_NLA_MAPINFO_REQ_UNSPEC = 0,
109   IWPM_NLA_MAPINFO_ULIB_NAME,
110   IWPM_NLA_MAPINFO_ULIB_VER,
111   IWPM_NLA_MAPINFO_REQ_MAX
112 };
113 enum {
114   IWPM_NLA_MAPINFO_UNSPEC = 0,
115   IWPM_NLA_MAPINFO_LOCAL_ADDR,
116   IWPM_NLA_MAPINFO_MAPPED_ADDR,
117   IWPM_NLA_MAPINFO_FLAGS,
118   IWPM_NLA_MAPINFO_MAX
119 };
120 enum {
121   IWPM_NLA_MAPINFO_NUM_UNSPEC = 0,
122   IWPM_NLA_MAPINFO_SEQ,
123   IWPM_NLA_MAPINFO_SEND_NUM,
124   IWPM_NLA_MAPINFO_ACK_NUM,
125   IWPM_NLA_MAPINFO_NUM_MAX
126 };
127 enum {
128   IWPM_NLA_ERR_UNSPEC = 0,
129   IWPM_NLA_ERR_SEQ,
130   IWPM_NLA_ERR_CODE,
131   IWPM_NLA_ERR_MAX
132 };
133 enum {
134   IWPM_NLA_HELLO_UNSPEC = 0,
135   IWPM_NLA_HELLO_ABI_VERSION,
136   IWPM_NLA_HELLO_MAX
137 };
138 enum {
139   RDMA_NODE_IB_CA = 1,
140   RDMA_NODE_IB_SWITCH,
141   RDMA_NODE_IB_ROUTER,
142   RDMA_NODE_RNIC,
143   RDMA_NODE_USNIC,
144   RDMA_NODE_USNIC_UDP,
145   RDMA_NODE_UNSPECIFIED,
146 };
147 enum {
148   RDMA_NL_LS_OP_RESOLVE = 0,
149   RDMA_NL_LS_OP_SET_TIMEOUT,
150   RDMA_NL_LS_OP_IP_RESOLVE,
151   RDMA_NL_LS_NUM_OPS
152 };
153 #define RDMA_NL_LS_F_ERR 0x0100
154 enum {
155   LS_RESOLVE_PATH_USE_ALL = 0,
156   LS_RESOLVE_PATH_USE_UNIDIRECTIONAL,
157   LS_RESOLVE_PATH_USE_GMP,
158   LS_RESOLVE_PATH_USE_MAX
159 };
160 #define LS_DEVICE_NAME_MAX 64
161 struct rdma_ls_resolve_header {
162   __u8 device_name[LS_DEVICE_NAME_MAX];
163   __u8 port_num;
164   __u8 path_use;
165 };
166 struct rdma_ls_ip_resolve_header {
167   __u32 ifindex;
168 };
169 #define RDMA_NLA_F_MANDATORY (1 << 13)
170 #define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | RDMA_NLA_F_MANDATORY))
171 enum {
172   LS_NLA_TYPE_UNSPEC = 0,
173   LS_NLA_TYPE_PATH_RECORD,
174   LS_NLA_TYPE_TIMEOUT,
175   LS_NLA_TYPE_SERVICE_ID,
176   LS_NLA_TYPE_DGID,
177   LS_NLA_TYPE_SGID,
178   LS_NLA_TYPE_TCLASS,
179   LS_NLA_TYPE_PKEY,
180   LS_NLA_TYPE_QOS_CLASS,
181   LS_NLA_TYPE_IPV4,
182   LS_NLA_TYPE_IPV6,
183   LS_NLA_TYPE_MAX
184 };
185 struct rdma_nla_ls_gid {
186   __u8 gid[16];
187 };
188 enum rdma_nldev_command {
189   RDMA_NLDEV_CMD_UNSPEC,
190   RDMA_NLDEV_CMD_GET,
191   RDMA_NLDEV_CMD_SET,
192   RDMA_NLDEV_CMD_NEWLINK,
193   RDMA_NLDEV_CMD_DELLINK,
194   RDMA_NLDEV_CMD_PORT_GET,
195   RDMA_NLDEV_CMD_SYS_GET,
196   RDMA_NLDEV_CMD_SYS_SET,
197   RDMA_NLDEV_CMD_RES_GET = 9,
198   RDMA_NLDEV_CMD_RES_QP_GET,
199   RDMA_NLDEV_CMD_RES_CM_ID_GET,
200   RDMA_NLDEV_CMD_RES_CQ_GET,
201   RDMA_NLDEV_CMD_RES_MR_GET,
202   RDMA_NLDEV_CMD_RES_PD_GET,
203   RDMA_NLDEV_CMD_GET_CHARDEV,
204   RDMA_NLDEV_CMD_STAT_SET,
205   RDMA_NLDEV_CMD_STAT_GET,
206   RDMA_NLDEV_CMD_STAT_DEL,
207   RDMA_NLDEV_CMD_RES_QP_GET_RAW,
208   RDMA_NLDEV_CMD_RES_CQ_GET_RAW,
209   RDMA_NLDEV_CMD_RES_MR_GET_RAW,
210   RDMA_NLDEV_CMD_RES_CTX_GET,
211   RDMA_NLDEV_CMD_RES_SRQ_GET,
212   RDMA_NLDEV_CMD_STAT_GET_STATUS,
213   RDMA_NLDEV_NUM_OPS
214 };
215 enum rdma_nldev_print_type {
216   RDMA_NLDEV_PRINT_TYPE_UNSPEC,
217   RDMA_NLDEV_PRINT_TYPE_HEX,
218 };
219 enum rdma_nldev_attr {
220   RDMA_NLDEV_ATTR_UNSPEC,
221   RDMA_NLDEV_ATTR_PAD = RDMA_NLDEV_ATTR_UNSPEC,
222   RDMA_NLDEV_ATTR_DEV_INDEX,
223   RDMA_NLDEV_ATTR_DEV_NAME,
224   RDMA_NLDEV_ATTR_PORT_INDEX,
225   RDMA_NLDEV_ATTR_CAP_FLAGS,
226   RDMA_NLDEV_ATTR_FW_VERSION,
227   RDMA_NLDEV_ATTR_NODE_GUID,
228   RDMA_NLDEV_ATTR_SYS_IMAGE_GUID,
229   RDMA_NLDEV_ATTR_SUBNET_PREFIX,
230   RDMA_NLDEV_ATTR_LID,
231   RDMA_NLDEV_ATTR_SM_LID,
232   RDMA_NLDEV_ATTR_LMC,
233   RDMA_NLDEV_ATTR_PORT_STATE,
234   RDMA_NLDEV_ATTR_PORT_PHYS_STATE,
235   RDMA_NLDEV_ATTR_DEV_NODE_TYPE,
236   RDMA_NLDEV_ATTR_RES_SUMMARY,
237   RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY,
238   RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME,
239   RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR,
240   RDMA_NLDEV_ATTR_RES_QP,
241   RDMA_NLDEV_ATTR_RES_QP_ENTRY,
242   RDMA_NLDEV_ATTR_RES_LQPN,
243   RDMA_NLDEV_ATTR_RES_RQPN,
244   RDMA_NLDEV_ATTR_RES_RQ_PSN,
245   RDMA_NLDEV_ATTR_RES_SQ_PSN,
246   RDMA_NLDEV_ATTR_RES_PATH_MIG_STATE,
247   RDMA_NLDEV_ATTR_RES_TYPE,
248   RDMA_NLDEV_ATTR_RES_STATE,
249   RDMA_NLDEV_ATTR_RES_PID,
250   RDMA_NLDEV_ATTR_RES_KERN_NAME,
251   RDMA_NLDEV_ATTR_RES_CM_ID,
252   RDMA_NLDEV_ATTR_RES_CM_ID_ENTRY,
253   RDMA_NLDEV_ATTR_RES_PS,
254   RDMA_NLDEV_ATTR_RES_SRC_ADDR,
255   RDMA_NLDEV_ATTR_RES_DST_ADDR,
256   RDMA_NLDEV_ATTR_RES_CQ,
257   RDMA_NLDEV_ATTR_RES_CQ_ENTRY,
258   RDMA_NLDEV_ATTR_RES_CQE,
259   RDMA_NLDEV_ATTR_RES_USECNT,
260   RDMA_NLDEV_ATTR_RES_POLL_CTX,
261   RDMA_NLDEV_ATTR_RES_MR,
262   RDMA_NLDEV_ATTR_RES_MR_ENTRY,
263   RDMA_NLDEV_ATTR_RES_RKEY,
264   RDMA_NLDEV_ATTR_RES_LKEY,
265   RDMA_NLDEV_ATTR_RES_IOVA,
266   RDMA_NLDEV_ATTR_RES_MRLEN,
267   RDMA_NLDEV_ATTR_RES_PD,
268   RDMA_NLDEV_ATTR_RES_PD_ENTRY,
269   RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY,
270   RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY,
271   RDMA_NLDEV_ATTR_NDEV_INDEX,
272   RDMA_NLDEV_ATTR_NDEV_NAME,
273   RDMA_NLDEV_ATTR_DRIVER,
274   RDMA_NLDEV_ATTR_DRIVER_ENTRY,
275   RDMA_NLDEV_ATTR_DRIVER_STRING,
276   RDMA_NLDEV_ATTR_DRIVER_PRINT_TYPE,
277   RDMA_NLDEV_ATTR_DRIVER_S32,
278   RDMA_NLDEV_ATTR_DRIVER_U32,
279   RDMA_NLDEV_ATTR_DRIVER_S64,
280   RDMA_NLDEV_ATTR_DRIVER_U64,
281   RDMA_NLDEV_ATTR_RES_PDN,
282   RDMA_NLDEV_ATTR_RES_CQN,
283   RDMA_NLDEV_ATTR_RES_MRN,
284   RDMA_NLDEV_ATTR_RES_CM_IDN,
285   RDMA_NLDEV_ATTR_RES_CTXN,
286   RDMA_NLDEV_ATTR_LINK_TYPE,
287   RDMA_NLDEV_SYS_ATTR_NETNS_MODE,
288   RDMA_NLDEV_ATTR_DEV_PROTOCOL,
289   RDMA_NLDEV_NET_NS_FD,
290   RDMA_NLDEV_ATTR_CHARDEV_TYPE,
291   RDMA_NLDEV_ATTR_CHARDEV_NAME,
292   RDMA_NLDEV_ATTR_CHARDEV_ABI,
293   RDMA_NLDEV_ATTR_CHARDEV,
294   RDMA_NLDEV_ATTR_UVERBS_DRIVER_ID,
295   RDMA_NLDEV_ATTR_STAT_MODE,
296   RDMA_NLDEV_ATTR_STAT_RES,
297   RDMA_NLDEV_ATTR_STAT_AUTO_MODE_MASK,
298   RDMA_NLDEV_ATTR_STAT_COUNTER,
299   RDMA_NLDEV_ATTR_STAT_COUNTER_ENTRY,
300   RDMA_NLDEV_ATTR_STAT_COUNTER_ID,
301   RDMA_NLDEV_ATTR_STAT_HWCOUNTERS,
302   RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY,
303   RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME,
304   RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_VALUE,
305   RDMA_NLDEV_ATTR_DEV_DIM,
306   RDMA_NLDEV_ATTR_RES_RAW,
307   RDMA_NLDEV_ATTR_RES_CTX,
308   RDMA_NLDEV_ATTR_RES_CTX_ENTRY,
309   RDMA_NLDEV_ATTR_RES_SRQ,
310   RDMA_NLDEV_ATTR_RES_SRQ_ENTRY,
311   RDMA_NLDEV_ATTR_RES_SRQN,
312   RDMA_NLDEV_ATTR_MIN_RANGE,
313   RDMA_NLDEV_ATTR_MAX_RANGE,
314   RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK,
315   RDMA_NLDEV_ATTR_STAT_HWCOUNTER_INDEX,
316   RDMA_NLDEV_ATTR_STAT_HWCOUNTER_DYNAMIC,
317   RDMA_NLDEV_ATTR_MAX
318 };
319 enum rdma_nl_counter_mode {
320   RDMA_COUNTER_MODE_NONE,
321   RDMA_COUNTER_MODE_AUTO,
322   RDMA_COUNTER_MODE_MANUAL,
323   RDMA_COUNTER_MODE_MAX,
324 };
325 enum rdma_nl_counter_mask {
326   RDMA_COUNTER_MASK_QP_TYPE = 1,
327   RDMA_COUNTER_MASK_PID = 1 << 1,
328 };
329 #endif
330