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