~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/rdma/rdma_netlink.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _UAPI_RDMA_NETLINK_H
  3 #define _UAPI_RDMA_NETLINK_H
  4 
  5 #include <linux/types.h>
  6 
  7 enum {
  8         RDMA_NL_IWCM = 2,
  9         RDMA_NL_RSVD,
 10         RDMA_NL_LS,     /* RDMA Local Services */
 11         RDMA_NL_NLDEV,  /* RDMA device interface */
 12         RDMA_NL_NUM_CLIENTS
 13 };
 14 
 15 enum {
 16         RDMA_NL_GROUP_IWPM = 2,
 17         RDMA_NL_GROUP_LS,
 18         RDMA_NL_NUM_GROUPS
 19 };
 20 
 21 #define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10)
 22 #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
 23 #define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op)
 24 
 25 /* The minimum version that the iwpm kernel supports */
 26 #define IWPM_UABI_VERSION_MIN   3
 27 
 28 /* The latest version that the iwpm kernel supports */
 29 #define IWPM_UABI_VERSION       4
 30 
 31 /* iwarp port mapper message flags */
 32 enum {
 33 
 34         /* Do not map the port for this IWPM request */
 35         IWPM_FLAGS_NO_PORT_MAP = (1 << 0),
 36 };
 37 
 38 /* iwarp port mapper op-codes */
 39 enum {
 40         RDMA_NL_IWPM_REG_PID = 0,
 41         RDMA_NL_IWPM_ADD_MAPPING,
 42         RDMA_NL_IWPM_QUERY_MAPPING,
 43         RDMA_NL_IWPM_REMOVE_MAPPING,
 44         RDMA_NL_IWPM_REMOTE_INFO,
 45         RDMA_NL_IWPM_HANDLE_ERR,
 46         RDMA_NL_IWPM_MAPINFO,
 47         RDMA_NL_IWPM_MAPINFO_NUM,
 48         RDMA_NL_IWPM_HELLO,
 49         RDMA_NL_IWPM_NUM_OPS
 50 };
 51 
 52 enum {
 53         IWPM_NLA_REG_PID_UNSPEC = 0,
 54         IWPM_NLA_REG_PID_SEQ,
 55         IWPM_NLA_REG_IF_NAME,
 56         IWPM_NLA_REG_IBDEV_NAME,
 57         IWPM_NLA_REG_ULIB_NAME,
 58         IWPM_NLA_REG_PID_MAX
 59 };
 60 
 61 enum {
 62         IWPM_NLA_RREG_PID_UNSPEC = 0,
 63         IWPM_NLA_RREG_PID_SEQ,
 64         IWPM_NLA_RREG_IBDEV_NAME,
 65         IWPM_NLA_RREG_ULIB_NAME,
 66         IWPM_NLA_RREG_ULIB_VER,
 67         IWPM_NLA_RREG_PID_ERR,
 68         IWPM_NLA_RREG_PID_MAX
 69 
 70 };
 71 
 72 enum {
 73         IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0,
 74         IWPM_NLA_MANAGE_MAPPING_SEQ,
 75         IWPM_NLA_MANAGE_ADDR,
 76         IWPM_NLA_MANAGE_FLAGS,
 77         IWPM_NLA_MANAGE_MAPPING_MAX
 78 };
 79 
 80 enum {
 81         IWPM_NLA_RMANAGE_MAPPING_UNSPEC = 0,
 82         IWPM_NLA_RMANAGE_MAPPING_SEQ,
 83         IWPM_NLA_RMANAGE_ADDR,
 84         IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
 85         /* The following maintains bisectability of rdma-core */
 86         IWPM_NLA_MANAGE_MAPPED_LOC_ADDR = IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
 87         IWPM_NLA_RMANAGE_MAPPING_ERR,
 88         IWPM_NLA_RMANAGE_MAPPING_MAX
 89 };
 90 
 91 #define IWPM_NLA_MAPINFO_SEND_MAX   3
 92 #define IWPM_NLA_REMOVE_MAPPING_MAX 3
 93 
 94 enum {
 95         IWPM_NLA_QUERY_MAPPING_UNSPEC = 0,
 96         IWPM_NLA_QUERY_MAPPING_SEQ,
 97         IWPM_NLA_QUERY_LOCAL_ADDR,
 98         IWPM_NLA_QUERY_REMOTE_ADDR,
 99         IWPM_NLA_QUERY_FLAGS,
100         IWPM_NLA_QUERY_MAPPING_MAX,
101 };
102 
103 enum {
104         IWPM_NLA_RQUERY_MAPPING_UNSPEC = 0,
105         IWPM_NLA_RQUERY_MAPPING_SEQ,
106         IWPM_NLA_RQUERY_LOCAL_ADDR,
107         IWPM_NLA_RQUERY_REMOTE_ADDR,
108         IWPM_NLA_RQUERY_MAPPED_LOC_ADDR,
109         IWPM_NLA_RQUERY_MAPPED_REM_ADDR,
110         IWPM_NLA_RQUERY_MAPPING_ERR,
111         IWPM_NLA_RQUERY_MAPPING_MAX
112 };
113 
114 enum {
115         IWPM_NLA_MAPINFO_REQ_UNSPEC = 0,
116         IWPM_NLA_MAPINFO_ULIB_NAME,
117         IWPM_NLA_MAPINFO_ULIB_VER,
118         IWPM_NLA_MAPINFO_REQ_MAX
119 };
120 
121 enum {
122         IWPM_NLA_MAPINFO_UNSPEC = 0,
123         IWPM_NLA_MAPINFO_LOCAL_ADDR,
124         IWPM_NLA_MAPINFO_MAPPED_ADDR,
125         IWPM_NLA_MAPINFO_FLAGS,
126         IWPM_NLA_MAPINFO_MAX
127 };
128 
129 enum {
130         IWPM_NLA_MAPINFO_NUM_UNSPEC = 0,
131         IWPM_NLA_MAPINFO_SEQ,
132         IWPM_NLA_MAPINFO_SEND_NUM,
133         IWPM_NLA_MAPINFO_ACK_NUM,
134         IWPM_NLA_MAPINFO_NUM_MAX
135 };
136 
137 enum {
138         IWPM_NLA_ERR_UNSPEC = 0,
139         IWPM_NLA_ERR_SEQ,
140         IWPM_NLA_ERR_CODE,
141         IWPM_NLA_ERR_MAX
142 };
143 
144 enum {
145         IWPM_NLA_HELLO_UNSPEC = 0,
146         IWPM_NLA_HELLO_ABI_VERSION,
147         IWPM_NLA_HELLO_MAX
148 };
149 
150 /* For RDMA_NLDEV_ATTR_DEV_NODE_TYPE */
151 enum {
152         /* IB values map to NodeInfo:NodeType. */
153         RDMA_NODE_IB_CA = 1,
154         RDMA_NODE_IB_SWITCH,
155         RDMA_NODE_IB_ROUTER,
156         RDMA_NODE_RNIC,
157         RDMA_NODE_USNIC,
158         RDMA_NODE_USNIC_UDP,
159         RDMA_NODE_UNSPECIFIED,
160 };
161 
162 /*
163  * Local service operations:
164  *   RESOLVE - The client requests the local service to resolve a path.
165  *   SET_TIMEOUT - The local service requests the client to set the timeout.
166  *   IP_RESOLVE - The client requests the local service to resolve an IP to GID.
167  */
168 enum {
169         RDMA_NL_LS_OP_RESOLVE = 0,
170         RDMA_NL_LS_OP_SET_TIMEOUT,
171         RDMA_NL_LS_OP_IP_RESOLVE,
172         RDMA_NL_LS_NUM_OPS
173 };
174 
175 /* Local service netlink message flags */
176 #define RDMA_NL_LS_F_ERR        0x0100  /* Failed response */
177 
178 /*
179  * Local service resolve operation family header.
180  * The layout for the resolve operation:
181  *    nlmsg header
182  *    family header
183  *    attributes
184  */
185 
186 /*
187  * Local service path use:
188  * Specify how the path(s) will be used.
189  *   ALL - For connected CM operation (6 pathrecords)
190  *   UNIDIRECTIONAL - For unidirectional UD (1 pathrecord)
191  *   GMP - For miscellaneous GMP like operation (at least 1 reversible
192  *         pathrecord)
193  */
194 enum {
195         LS_RESOLVE_PATH_USE_ALL = 0,
196         LS_RESOLVE_PATH_USE_UNIDIRECTIONAL,
197         LS_RESOLVE_PATH_USE_GMP,
198         LS_RESOLVE_PATH_USE_MAX
199 };
200 
201 #define LS_DEVICE_NAME_MAX 64
202 
203 struct rdma_ls_resolve_header {
204         __u8 device_name[LS_DEVICE_NAME_MAX];
205         __u8 port_num;
206         __u8 path_use;
207 };
208 
209 struct rdma_ls_ip_resolve_header {
210         __u32 ifindex;
211 };
212 
213 /* Local service attribute type */
214 #define RDMA_NLA_F_MANDATORY    (1 << 13)
215 #define RDMA_NLA_TYPE_MASK      (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | \
216                                   RDMA_NLA_F_MANDATORY))
217 
218 /*
219  * Local service attributes:
220  *   Attr Name       Size                       Byte order
221  *   -----------------------------------------------------
222  *   PATH_RECORD     struct ib_path_rec_data
223  *   TIMEOUT         u32                        cpu
224  *   SERVICE_ID      u64                        cpu
225  *   DGID            u8[16]                     BE
226  *   SGID            u8[16]                     BE
227  *   TCLASS          u8
228  *   PKEY            u16                        cpu
229  *   QOS_CLASS       u16                        cpu
230  *   IPV4            u32                        BE
231  *   IPV6            u8[16]                     BE
232  */
233 enum {
234         LS_NLA_TYPE_UNSPEC = 0,
235         LS_NLA_TYPE_PATH_RECORD,
236         LS_NLA_TYPE_TIMEOUT,
237         LS_NLA_TYPE_SERVICE_ID,
238         LS_NLA_TYPE_DGID,
239         LS_NLA_TYPE_SGID,
240         LS_NLA_TYPE_TCLASS,
241         LS_NLA_TYPE_PKEY,
242         LS_NLA_TYPE_QOS_CLASS,
243         LS_NLA_TYPE_IPV4,
244         LS_NLA_TYPE_IPV6,
245         LS_NLA_TYPE_MAX
246 };
247 
248 /* Local service DGID/SGID attribute: big endian */
249 struct rdma_nla_ls_gid {
250         __u8            gid[16];
251 };
252 
253 enum rdma_nldev_command {
254         RDMA_NLDEV_CMD_UNSPEC,
255 
256         RDMA_NLDEV_CMD_GET, /* can dump */
257         RDMA_NLDEV_CMD_SET,
258 
259         RDMA_NLDEV_CMD_NEWLINK,
260 
261         RDMA_NLDEV_CMD_DELLINK,
262 
263         RDMA_NLDEV_CMD_PORT_GET, /* can dump */
264 
265         RDMA_NLDEV_CMD_SYS_GET,
266         RDMA_NLDEV_CMD_SYS_SET,
267 
268         /* 8 is free to use */
269 
270         RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */
271 
272         RDMA_NLDEV_CMD_RES_QP_GET, /* can dump */
273 
274         RDMA_NLDEV_CMD_RES_CM_ID_GET, /* can dump */
275 
276         RDMA_NLDEV_CMD_RES_CQ_GET, /* can dump */
277 
278         RDMA_NLDEV_CMD_RES_MR_GET, /* can dump */
279 
280         RDMA_NLDEV_CMD_RES_PD_GET, /* can dump */
281 
282         RDMA_NLDEV_CMD_GET_CHARDEV,
283 
284         RDMA_NLDEV_CMD_STAT_SET,
285 
286         RDMA_NLDEV_CMD_STAT_GET, /* can dump */
287 
288         RDMA_NLDEV_CMD_STAT_DEL,
289 
290         RDMA_NLDEV_CMD_RES_QP_GET_RAW,
291 
292         RDMA_NLDEV_CMD_RES_CQ_GET_RAW,
293 
294         RDMA_NLDEV_CMD_RES_MR_GET_RAW,
295 
296         RDMA_NLDEV_CMD_RES_CTX_GET, /* can dump */
297 
298         RDMA_NLDEV_CMD_RES_SRQ_GET, /* can dump */
299 
300         RDMA_NLDEV_CMD_STAT_GET_STATUS,
301 
302         RDMA_NLDEV_CMD_RES_SRQ_GET_RAW,
303 
304         RDMA_NLDEV_CMD_NEWDEV,
305 
306         RDMA_NLDEV_CMD_DELDEV,
307 
308         RDMA_NLDEV_NUM_OPS
309 };
310 
311 enum rdma_nldev_print_type {
312         RDMA_NLDEV_PRINT_TYPE_UNSPEC,
313         RDMA_NLDEV_PRINT_TYPE_HEX,
314 };
315 
316 enum rdma_nldev_attr {
317         /* don't change the order or add anything between, this is ABI! */
318         RDMA_NLDEV_ATTR_UNSPEC,
319 
320         /* Pad attribute for 64b alignment */
321         RDMA_NLDEV_ATTR_PAD = RDMA_NLDEV_ATTR_UNSPEC,
322 
323         /* Identifier for ib_device */
324         RDMA_NLDEV_ATTR_DEV_INDEX,              /* u32 */
325 
326         RDMA_NLDEV_ATTR_DEV_NAME,               /* string */
327         /*
328          * Device index together with port index are identifiers
329          * for port/link properties.
330          *
331          * For RDMA_NLDEV_CMD_GET commamnd, port index will return number
332          * of available ports in ib_device, while for port specific operations,
333          * it will be real port index as it appears in sysfs. Port index follows
334          * sysfs notation and starts from 1 for the first port.
335          */
336         RDMA_NLDEV_ATTR_PORT_INDEX,             /* u32 */
337 
338         /*
339          * Device and port capabilities
340          *
341          * When used for port info, first 32-bits are CapabilityMask followed by
342          * 16-bit CapabilityMask2.
343          */
344         RDMA_NLDEV_ATTR_CAP_FLAGS,              /* u64 */
345 
346         /*
347          * FW version
348          */
349         RDMA_NLDEV_ATTR_FW_VERSION,             /* string */
350 
351         /*
352          * Node GUID (in host byte order) associated with the RDMA device.
353          */
354         RDMA_NLDEV_ATTR_NODE_GUID,                      /* u64 */
355 
356         /*
357          * System image GUID (in host byte order) associated with
358          * this RDMA device and other devices which are part of a
359          * single system.
360          */
361         RDMA_NLDEV_ATTR_SYS_IMAGE_GUID,         /* u64 */
362 
363         /*
364          * Subnet prefix (in host byte order)
365          */
366         RDMA_NLDEV_ATTR_SUBNET_PREFIX,          /* u64 */
367 
368         /*
369          * Local Identifier (LID),
370          * According to IB specification, It is 16-bit address assigned
371          * by the Subnet Manager. Extended to be 32-bit for OmniPath users.
372          */
373         RDMA_NLDEV_ATTR_LID,                    /* u32 */
374         RDMA_NLDEV_ATTR_SM_LID,                 /* u32 */
375 
376         /*
377          * LID mask control (LMC)
378          */
379         RDMA_NLDEV_ATTR_LMC,                    /* u8 */
380 
381         RDMA_NLDEV_ATTR_PORT_STATE,             /* u8 */
382         RDMA_NLDEV_ATTR_PORT_PHYS_STATE,        /* u8 */
383 
384         RDMA_NLDEV_ATTR_DEV_NODE_TYPE,          /* u8 */
385 
386         RDMA_NLDEV_ATTR_RES_SUMMARY,            /* nested table */
387         RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY,      /* nested table */
388         RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME, /* string */
389         RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR, /* u64 */
390 
391         RDMA_NLDEV_ATTR_RES_QP,                 /* nested table */
392         RDMA_NLDEV_ATTR_RES_QP_ENTRY,           /* nested table */
393         /*
394          * Local QPN
395          */
396         RDMA_NLDEV_ATTR_RES_LQPN,               /* u32 */
397         /*
398          * Remote QPN,
399          * Applicable for RC and UC only IBTA 11.2.5.3 QUERY QUEUE PAIR
400          */
401         RDMA_NLDEV_ATTR_RES_RQPN,               /* u32 */
402         /*
403          * Receive Queue PSN,
404          * Applicable for RC and UC only 11.2.5.3 QUERY QUEUE PAIR
405          */
406         RDMA_NLDEV_ATTR_RES_RQ_PSN,             /* u32 */
407         /*
408          * Send Queue PSN
409          */
410         RDMA_NLDEV_ATTR_RES_SQ_PSN,             /* u32 */
411         RDMA_NLDEV_ATTR_RES_PATH_MIG_STATE,     /* u8 */
412         /*
413          * QP types as visible to RDMA/core, the reserved QPT
414          * are not exported through this interface.
415          */
416         RDMA_NLDEV_ATTR_RES_TYPE,               /* u8 */
417         RDMA_NLDEV_ATTR_RES_STATE,              /* u8 */
418         /*
419          * Process ID which created object,
420          * in case of kernel origin, PID won't exist.
421          */
422         RDMA_NLDEV_ATTR_RES_PID,                /* u32 */
423         /*
424          * The name of process created following resource.
425          * It will exist only for kernel objects.
426          * For user created objects, the user is supposed
427          * to read /proc/PID/comm file.
428          */
429         RDMA_NLDEV_ATTR_RES_KERN_NAME,          /* string */
430 
431         RDMA_NLDEV_ATTR_RES_CM_ID,              /* nested table */
432         RDMA_NLDEV_ATTR_RES_CM_ID_ENTRY,        /* nested table */
433         /*
434          * rdma_cm_id port space.
435          */
436         RDMA_NLDEV_ATTR_RES_PS,                 /* u32 */
437         /*
438          * Source and destination socket addresses
439          */
440         RDMA_NLDEV_ATTR_RES_SRC_ADDR,           /* __kernel_sockaddr_storage */
441         RDMA_NLDEV_ATTR_RES_DST_ADDR,           /* __kernel_sockaddr_storage */
442 
443         RDMA_NLDEV_ATTR_RES_CQ,                 /* nested table */
444         RDMA_NLDEV_ATTR_RES_CQ_ENTRY,           /* nested table */
445         RDMA_NLDEV_ATTR_RES_CQE,                /* u32 */
446         RDMA_NLDEV_ATTR_RES_USECNT,             /* u64 */
447         RDMA_NLDEV_ATTR_RES_POLL_CTX,           /* u8 */
448 
449         RDMA_NLDEV_ATTR_RES_MR,                 /* nested table */
450         RDMA_NLDEV_ATTR_RES_MR_ENTRY,           /* nested table */
451         RDMA_NLDEV_ATTR_RES_RKEY,               /* u32 */
452         RDMA_NLDEV_ATTR_RES_LKEY,               /* u32 */
453         RDMA_NLDEV_ATTR_RES_IOVA,               /* u64 */
454         RDMA_NLDEV_ATTR_RES_MRLEN,              /* u64 */
455 
456         RDMA_NLDEV_ATTR_RES_PD,                 /* nested table */
457         RDMA_NLDEV_ATTR_RES_PD_ENTRY,           /* nested table */
458         RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY,     /* u32 */
459         RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY, /* u32 */
460         /*
461          * Provides logical name and index of netdevice which is
462          * connected to physical port. This information is relevant
463          * for RoCE and iWARP.
464          *
465          * The netdevices which are associated with containers are
466          * supposed to be exported together with GID table once it
467          * will be exposed through the netlink. Because the
468          * associated netdevices are properties of GIDs.
469          */
470         RDMA_NLDEV_ATTR_NDEV_INDEX,             /* u32 */
471         RDMA_NLDEV_ATTR_NDEV_NAME,              /* string */
472         /*
473          * driver-specific attributes.
474          */
475         RDMA_NLDEV_ATTR_DRIVER,                 /* nested table */
476         RDMA_NLDEV_ATTR_DRIVER_ENTRY,           /* nested table */
477         RDMA_NLDEV_ATTR_DRIVER_STRING,          /* string */
478         /*
479          * u8 values from enum rdma_nldev_print_type
480          */
481         RDMA_NLDEV_ATTR_DRIVER_PRINT_TYPE,      /* u8 */
482         RDMA_NLDEV_ATTR_DRIVER_S32,             /* s32 */
483         RDMA_NLDEV_ATTR_DRIVER_U32,             /* u32 */
484         RDMA_NLDEV_ATTR_DRIVER_S64,             /* s64 */
485         RDMA_NLDEV_ATTR_DRIVER_U64,             /* u64 */
486 
487         /*
488          * Indexes to get/set secific entry,
489          * for QP use RDMA_NLDEV_ATTR_RES_LQPN
490          */
491         RDMA_NLDEV_ATTR_RES_PDN,               /* u32 */
492         RDMA_NLDEV_ATTR_RES_CQN,               /* u32 */
493         RDMA_NLDEV_ATTR_RES_MRN,               /* u32 */
494         RDMA_NLDEV_ATTR_RES_CM_IDN,            /* u32 */
495         RDMA_NLDEV_ATTR_RES_CTXN,              /* u32 */
496         /*
497          * Identifies the rdma driver. eg: "rxe" or "siw"
498          */
499         RDMA_NLDEV_ATTR_LINK_TYPE,              /* string */
500 
501         /*
502          * net namespace mode for rdma subsystem:
503          * either shared or exclusive among multiple net namespaces.
504          */
505         RDMA_NLDEV_SYS_ATTR_NETNS_MODE,         /* u8 */
506         /*
507          * Device protocol, e.g. ib, iw, usnic, roce and opa
508          */
509         RDMA_NLDEV_ATTR_DEV_PROTOCOL,           /* string */
510 
511         /*
512          * File descriptor handle of the net namespace object
513          */
514         RDMA_NLDEV_NET_NS_FD,                   /* u32 */
515         /*
516          * Information about a chardev.
517          * CHARDEV_TYPE is the name of the chardev ABI (ie uverbs, umad, etc)
518          * CHARDEV_ABI signals the ABI revision (historical)
519          * CHARDEV_NAME is the kernel name for the /dev/ file (no directory)
520          * CHARDEV is the 64 bit dev_t for the inode
521          */
522         RDMA_NLDEV_ATTR_CHARDEV_TYPE,           /* string */
523         RDMA_NLDEV_ATTR_CHARDEV_NAME,           /* string */
524         RDMA_NLDEV_ATTR_CHARDEV_ABI,            /* u64 */
525         RDMA_NLDEV_ATTR_CHARDEV,                /* u64 */
526         RDMA_NLDEV_ATTR_UVERBS_DRIVER_ID,       /* u64 */
527         /*
528          * Counter-specific attributes.
529          */
530         RDMA_NLDEV_ATTR_STAT_MODE,              /* u32 */
531         RDMA_NLDEV_ATTR_STAT_RES,               /* u32 */
532         RDMA_NLDEV_ATTR_STAT_AUTO_MODE_MASK,    /* u32 */
533         RDMA_NLDEV_ATTR_STAT_COUNTER,           /* nested table */
534         RDMA_NLDEV_ATTR_STAT_COUNTER_ENTRY,     /* nested table */
535         RDMA_NLDEV_ATTR_STAT_COUNTER_ID,        /* u32 */
536         RDMA_NLDEV_ATTR_STAT_HWCOUNTERS,        /* nested table */
537         RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY,   /* nested table */
538         RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME,      /* string */
539         RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_VALUE,     /* u64 */
540 
541         /*
542          * CQ adaptive moderatio (DIM)
543          */
544         RDMA_NLDEV_ATTR_DEV_DIM,                /* u8 */
545 
546         RDMA_NLDEV_ATTR_RES_RAW,        /* binary */
547 
548         RDMA_NLDEV_ATTR_RES_CTX,                /* nested table */
549         RDMA_NLDEV_ATTR_RES_CTX_ENTRY,          /* nested table */
550 
551         RDMA_NLDEV_ATTR_RES_SRQ,                /* nested table */
552         RDMA_NLDEV_ATTR_RES_SRQ_ENTRY,          /* nested table */
553         RDMA_NLDEV_ATTR_RES_SRQN,               /* u32 */
554 
555         RDMA_NLDEV_ATTR_MIN_RANGE,              /* u32 */
556         RDMA_NLDEV_ATTR_MAX_RANGE,              /* u32 */
557 
558         RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK,       /* u8 */
559 
560         RDMA_NLDEV_ATTR_STAT_HWCOUNTER_INDEX,   /* u32 */
561         RDMA_NLDEV_ATTR_STAT_HWCOUNTER_DYNAMIC, /* u8 */
562 
563         RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE, /* u8 */
564 
565         RDMA_NLDEV_ATTR_DRIVER_DETAILS,         /* u8 */
566         /*
567          * QP subtype string, used for driver QPs
568          */
569         RDMA_NLDEV_ATTR_RES_SUBTYPE,            /* string */
570 
571         RDMA_NLDEV_ATTR_DEV_TYPE,               /* u8 */
572 
573         RDMA_NLDEV_ATTR_PARENT_NAME,            /* string */
574 
575         RDMA_NLDEV_ATTR_NAME_ASSIGN_TYPE,       /* u8 */
576 
577         /*
578          * Always the end
579          */
580         RDMA_NLDEV_ATTR_MAX
581 };
582 
583 /*
584  * Supported counter bind modes. All modes are mutual-exclusive.
585  */
586 enum rdma_nl_counter_mode {
587         RDMA_COUNTER_MODE_NONE,
588 
589         /*
590          * A qp is bound with a counter automatically during initialization
591          * based on the auto mode (e.g., qp type, ...)
592          */
593         RDMA_COUNTER_MODE_AUTO,
594 
595         /*
596          * Which qp are bound with which counter is explicitly specified
597          * by the user
598          */
599         RDMA_COUNTER_MODE_MANUAL,
600 
601         /*
602          * Always the end
603          */
604         RDMA_COUNTER_MODE_MAX,
605 };
606 
607 /*
608  * Supported criteria in counter auto mode.
609  * Currently only "qp type" is supported
610  */
611 enum rdma_nl_counter_mask {
612         RDMA_COUNTER_MASK_QP_TYPE = 1,
613         RDMA_COUNTER_MASK_PID = 1 << 1,
614 };
615 
616 /* Supported rdma device types. */
617 enum rdma_nl_dev_type {
618         RDMA_DEVICE_TYPE_SMI = 1,
619 };
620 
621 /* RDMA device name assignment types */
622 enum rdma_nl_name_assign_type {
623         RDMA_NAME_ASSIGN_TYPE_UNKNOWN = 0,
624         RDMA_NAME_ASSIGN_TYPE_USER = 1, /* Provided by user-space */
625 };
626 
627 #endif /* _UAPI_RDMA_NETLINK_H */
628 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php