1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _UAPI_LINUX_DEVLINK_H_ 8 #define _UAPI_LINUX_DEVLINK_H_ 9 #include <linux/const.h> 10 #define DEVLINK_GENL_NAME "devlink" 11 #define DEVLINK_GENL_VERSION 0x1 12 #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config" 13 enum devlink_command { 14 DEVLINK_CMD_UNSPEC, 15 DEVLINK_CMD_GET, 16 DEVLINK_CMD_SET, 17 DEVLINK_CMD_NEW, 18 DEVLINK_CMD_DEL, 19 DEVLINK_CMD_PORT_GET, 20 DEVLINK_CMD_PORT_SET, 21 DEVLINK_CMD_PORT_NEW, 22 DEVLINK_CMD_PORT_DEL, 23 DEVLINK_CMD_PORT_SPLIT, 24 DEVLINK_CMD_PORT_UNSPLIT, 25 DEVLINK_CMD_SB_GET, 26 DEVLINK_CMD_SB_SET, 27 DEVLINK_CMD_SB_NEW, 28 DEVLINK_CMD_SB_DEL, 29 DEVLINK_CMD_SB_POOL_GET, 30 DEVLINK_CMD_SB_POOL_SET, 31 DEVLINK_CMD_SB_POOL_NEW, 32 DEVLINK_CMD_SB_POOL_DEL, 33 DEVLINK_CMD_SB_PORT_POOL_GET, 34 DEVLINK_CMD_SB_PORT_POOL_SET, 35 DEVLINK_CMD_SB_PORT_POOL_NEW, 36 DEVLINK_CMD_SB_PORT_POOL_DEL, 37 DEVLINK_CMD_SB_TC_POOL_BIND_GET, 38 DEVLINK_CMD_SB_TC_POOL_BIND_SET, 39 DEVLINK_CMD_SB_TC_POOL_BIND_NEW, 40 DEVLINK_CMD_SB_TC_POOL_BIND_DEL, 41 DEVLINK_CMD_SB_OCC_SNAPSHOT, 42 DEVLINK_CMD_SB_OCC_MAX_CLEAR, 43 DEVLINK_CMD_ESWITCH_GET, 44 #define DEVLINK_CMD_ESWITCH_MODE_GET DEVLINK_CMD_ESWITCH_GET 45 DEVLINK_CMD_ESWITCH_SET, 46 #define DEVLINK_CMD_ESWITCH_MODE_SET DEVLINK_CMD_ESWITCH_SET 47 DEVLINK_CMD_DPIPE_TABLE_GET, 48 DEVLINK_CMD_DPIPE_ENTRIES_GET, 49 DEVLINK_CMD_DPIPE_HEADERS_GET, 50 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET, 51 DEVLINK_CMD_RESOURCE_SET, 52 DEVLINK_CMD_RESOURCE_DUMP, 53 DEVLINK_CMD_RELOAD, 54 DEVLINK_CMD_PARAM_GET, 55 DEVLINK_CMD_PARAM_SET, 56 DEVLINK_CMD_PARAM_NEW, 57 DEVLINK_CMD_PARAM_DEL, 58 DEVLINK_CMD_REGION_GET, 59 DEVLINK_CMD_REGION_SET, 60 DEVLINK_CMD_REGION_NEW, 61 DEVLINK_CMD_REGION_DEL, 62 DEVLINK_CMD_REGION_READ, 63 DEVLINK_CMD_PORT_PARAM_GET, 64 DEVLINK_CMD_PORT_PARAM_SET, 65 DEVLINK_CMD_PORT_PARAM_NEW, 66 DEVLINK_CMD_PORT_PARAM_DEL, 67 DEVLINK_CMD_INFO_GET, 68 DEVLINK_CMD_HEALTH_REPORTER_GET, 69 DEVLINK_CMD_HEALTH_REPORTER_SET, 70 DEVLINK_CMD_HEALTH_REPORTER_RECOVER, 71 DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE, 72 DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, 73 DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR, 74 DEVLINK_CMD_FLASH_UPDATE, 75 DEVLINK_CMD_FLASH_UPDATE_END, 76 DEVLINK_CMD_FLASH_UPDATE_STATUS, 77 DEVLINK_CMD_TRAP_GET, 78 DEVLINK_CMD_TRAP_SET, 79 DEVLINK_CMD_TRAP_NEW, 80 DEVLINK_CMD_TRAP_DEL, 81 DEVLINK_CMD_TRAP_GROUP_GET, 82 DEVLINK_CMD_TRAP_GROUP_SET, 83 DEVLINK_CMD_TRAP_GROUP_NEW, 84 DEVLINK_CMD_TRAP_GROUP_DEL, 85 DEVLINK_CMD_TRAP_POLICER_GET, 86 DEVLINK_CMD_TRAP_POLICER_SET, 87 DEVLINK_CMD_TRAP_POLICER_NEW, 88 DEVLINK_CMD_TRAP_POLICER_DEL, 89 DEVLINK_CMD_HEALTH_REPORTER_TEST, 90 DEVLINK_CMD_RATE_GET, 91 DEVLINK_CMD_RATE_SET, 92 DEVLINK_CMD_RATE_NEW, 93 DEVLINK_CMD_RATE_DEL, 94 DEVLINK_CMD_LINECARD_GET, 95 DEVLINK_CMD_LINECARD_SET, 96 DEVLINK_CMD_LINECARD_NEW, 97 DEVLINK_CMD_LINECARD_DEL, 98 DEVLINK_CMD_SELFTESTS_GET, 99 DEVLINK_CMD_SELFTESTS_RUN, 100 DEVLINK_CMD_NOTIFY_FILTER_SET, 101 __DEVLINK_CMD_MAX, 102 DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 103 }; 104 enum devlink_port_type { 105 DEVLINK_PORT_TYPE_NOTSET, 106 DEVLINK_PORT_TYPE_AUTO, 107 DEVLINK_PORT_TYPE_ETH, 108 DEVLINK_PORT_TYPE_IB, 109 }; 110 enum devlink_sb_pool_type { 111 DEVLINK_SB_POOL_TYPE_INGRESS, 112 DEVLINK_SB_POOL_TYPE_EGRESS, 113 }; 114 enum devlink_sb_threshold_type { 115 DEVLINK_SB_THRESHOLD_TYPE_STATIC, 116 DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC, 117 }; 118 #define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20 119 enum devlink_eswitch_mode { 120 DEVLINK_ESWITCH_MODE_LEGACY, 121 DEVLINK_ESWITCH_MODE_SWITCHDEV, 122 }; 123 enum devlink_eswitch_inline_mode { 124 DEVLINK_ESWITCH_INLINE_MODE_NONE, 125 DEVLINK_ESWITCH_INLINE_MODE_LINK, 126 DEVLINK_ESWITCH_INLINE_MODE_NETWORK, 127 DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT, 128 }; 129 enum devlink_eswitch_encap_mode { 130 DEVLINK_ESWITCH_ENCAP_MODE_NONE, 131 DEVLINK_ESWITCH_ENCAP_MODE_BASIC, 132 }; 133 enum devlink_port_flavour { 134 DEVLINK_PORT_FLAVOUR_PHYSICAL, 135 DEVLINK_PORT_FLAVOUR_CPU, 136 DEVLINK_PORT_FLAVOUR_DSA, 137 DEVLINK_PORT_FLAVOUR_PCI_PF, 138 DEVLINK_PORT_FLAVOUR_PCI_VF, 139 DEVLINK_PORT_FLAVOUR_VIRTUAL, 140 DEVLINK_PORT_FLAVOUR_UNUSED, 141 DEVLINK_PORT_FLAVOUR_PCI_SF, 142 }; 143 enum devlink_rate_type { 144 DEVLINK_RATE_TYPE_LEAF, 145 DEVLINK_RATE_TYPE_NODE, 146 }; 147 enum devlink_param_cmode { 148 DEVLINK_PARAM_CMODE_RUNTIME, 149 DEVLINK_PARAM_CMODE_DRIVERINIT, 150 DEVLINK_PARAM_CMODE_PERMANENT, 151 __DEVLINK_PARAM_CMODE_MAX, 152 DEVLINK_PARAM_CMODE_MAX = __DEVLINK_PARAM_CMODE_MAX - 1 153 }; 154 enum devlink_param_fw_load_policy_value { 155 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER, 156 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH, 157 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK, 158 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN, 159 }; 160 enum devlink_param_reset_dev_on_drv_probe_value { 161 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN, 162 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS, 163 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER, 164 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK, 165 }; 166 enum { 167 DEVLINK_ATTR_STATS_RX_PACKETS, 168 DEVLINK_ATTR_STATS_RX_BYTES, 169 DEVLINK_ATTR_STATS_RX_DROPPED, 170 __DEVLINK_ATTR_STATS_MAX, 171 DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1 172 }; 173 enum devlink_flash_overwrite { 174 DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT, 175 DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT, 176 __DEVLINK_FLASH_OVERWRITE_MAX_BIT, 177 DEVLINK_FLASH_OVERWRITE_MAX_BIT = __DEVLINK_FLASH_OVERWRITE_MAX_BIT - 1 178 }; 179 #define DEVLINK_FLASH_OVERWRITE_SETTINGS _BITUL(DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT) 180 #define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS _BITUL(DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT) 181 #define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS (_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_BIT) - 1) 182 enum devlink_attr_selftest_id { 183 DEVLINK_ATTR_SELFTEST_ID_UNSPEC, 184 DEVLINK_ATTR_SELFTEST_ID_FLASH, 185 __DEVLINK_ATTR_SELFTEST_ID_MAX, 186 DEVLINK_ATTR_SELFTEST_ID_MAX = __DEVLINK_ATTR_SELFTEST_ID_MAX - 1 187 }; 188 enum devlink_selftest_status { 189 DEVLINK_SELFTEST_STATUS_SKIP, 190 DEVLINK_SELFTEST_STATUS_PASS, 191 DEVLINK_SELFTEST_STATUS_FAIL 192 }; 193 enum devlink_attr_selftest_result { 194 DEVLINK_ATTR_SELFTEST_RESULT_UNSPEC, 195 DEVLINK_ATTR_SELFTEST_RESULT, 196 DEVLINK_ATTR_SELFTEST_RESULT_ID, 197 DEVLINK_ATTR_SELFTEST_RESULT_STATUS, 198 __DEVLINK_ATTR_SELFTEST_RESULT_MAX, 199 DEVLINK_ATTR_SELFTEST_RESULT_MAX = __DEVLINK_ATTR_SELFTEST_RESULT_MAX - 1 200 }; 201 enum devlink_trap_action { 202 DEVLINK_TRAP_ACTION_DROP, 203 DEVLINK_TRAP_ACTION_TRAP, 204 DEVLINK_TRAP_ACTION_MIRROR, 205 }; 206 enum devlink_trap_type { 207 DEVLINK_TRAP_TYPE_DROP, 208 DEVLINK_TRAP_TYPE_EXCEPTION, 209 DEVLINK_TRAP_TYPE_CONTROL, 210 }; 211 enum { 212 DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT, 213 DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE, 214 }; 215 enum devlink_reload_action { 216 DEVLINK_RELOAD_ACTION_UNSPEC, 217 DEVLINK_RELOAD_ACTION_DRIVER_REINIT, 218 DEVLINK_RELOAD_ACTION_FW_ACTIVATE, 219 __DEVLINK_RELOAD_ACTION_MAX, 220 DEVLINK_RELOAD_ACTION_MAX = __DEVLINK_RELOAD_ACTION_MAX - 1 221 }; 222 enum devlink_reload_limit { 223 DEVLINK_RELOAD_LIMIT_UNSPEC, 224 DEVLINK_RELOAD_LIMIT_NO_RESET, 225 __DEVLINK_RELOAD_LIMIT_MAX, 226 DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1 227 }; 228 #define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1) 229 enum devlink_linecard_state { 230 DEVLINK_LINECARD_STATE_UNSPEC, 231 DEVLINK_LINECARD_STATE_UNPROVISIONED, 232 DEVLINK_LINECARD_STATE_UNPROVISIONING, 233 DEVLINK_LINECARD_STATE_PROVISIONING, 234 DEVLINK_LINECARD_STATE_PROVISIONING_FAILED, 235 DEVLINK_LINECARD_STATE_PROVISIONED, 236 DEVLINK_LINECARD_STATE_ACTIVE, 237 __DEVLINK_LINECARD_STATE_MAX, 238 DEVLINK_LINECARD_STATE_MAX = __DEVLINK_LINECARD_STATE_MAX - 1 239 }; 240 enum devlink_attr { 241 DEVLINK_ATTR_UNSPEC, 242 DEVLINK_ATTR_BUS_NAME, 243 DEVLINK_ATTR_DEV_NAME, 244 DEVLINK_ATTR_PORT_INDEX, 245 DEVLINK_ATTR_PORT_TYPE, 246 DEVLINK_ATTR_PORT_DESIRED_TYPE, 247 DEVLINK_ATTR_PORT_NETDEV_IFINDEX, 248 DEVLINK_ATTR_PORT_NETDEV_NAME, 249 DEVLINK_ATTR_PORT_IBDEV_NAME, 250 DEVLINK_ATTR_PORT_SPLIT_COUNT, 251 DEVLINK_ATTR_PORT_SPLIT_GROUP, 252 DEVLINK_ATTR_SB_INDEX, 253 DEVLINK_ATTR_SB_SIZE, 254 DEVLINK_ATTR_SB_INGRESS_POOL_COUNT, 255 DEVLINK_ATTR_SB_EGRESS_POOL_COUNT, 256 DEVLINK_ATTR_SB_INGRESS_TC_COUNT, 257 DEVLINK_ATTR_SB_EGRESS_TC_COUNT, 258 DEVLINK_ATTR_SB_POOL_INDEX, 259 DEVLINK_ATTR_SB_POOL_TYPE, 260 DEVLINK_ATTR_SB_POOL_SIZE, 261 DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE, 262 DEVLINK_ATTR_SB_THRESHOLD, 263 DEVLINK_ATTR_SB_TC_INDEX, 264 DEVLINK_ATTR_SB_OCC_CUR, 265 DEVLINK_ATTR_SB_OCC_MAX, 266 DEVLINK_ATTR_ESWITCH_MODE, 267 DEVLINK_ATTR_ESWITCH_INLINE_MODE, 268 DEVLINK_ATTR_DPIPE_TABLES, 269 DEVLINK_ATTR_DPIPE_TABLE, 270 DEVLINK_ATTR_DPIPE_TABLE_NAME, 271 DEVLINK_ATTR_DPIPE_TABLE_SIZE, 272 DEVLINK_ATTR_DPIPE_TABLE_MATCHES, 273 DEVLINK_ATTR_DPIPE_TABLE_ACTIONS, 274 DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED, 275 DEVLINK_ATTR_DPIPE_ENTRIES, 276 DEVLINK_ATTR_DPIPE_ENTRY, 277 DEVLINK_ATTR_DPIPE_ENTRY_INDEX, 278 DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES, 279 DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES, 280 DEVLINK_ATTR_DPIPE_ENTRY_COUNTER, 281 DEVLINK_ATTR_DPIPE_MATCH, 282 DEVLINK_ATTR_DPIPE_MATCH_VALUE, 283 DEVLINK_ATTR_DPIPE_MATCH_TYPE, 284 DEVLINK_ATTR_DPIPE_ACTION, 285 DEVLINK_ATTR_DPIPE_ACTION_VALUE, 286 DEVLINK_ATTR_DPIPE_ACTION_TYPE, 287 DEVLINK_ATTR_DPIPE_VALUE, 288 DEVLINK_ATTR_DPIPE_VALUE_MASK, 289 DEVLINK_ATTR_DPIPE_VALUE_MAPPING, 290 DEVLINK_ATTR_DPIPE_HEADERS, 291 DEVLINK_ATTR_DPIPE_HEADER, 292 DEVLINK_ATTR_DPIPE_HEADER_NAME, 293 DEVLINK_ATTR_DPIPE_HEADER_ID, 294 DEVLINK_ATTR_DPIPE_HEADER_FIELDS, 295 DEVLINK_ATTR_DPIPE_HEADER_GLOBAL, 296 DEVLINK_ATTR_DPIPE_HEADER_INDEX, 297 DEVLINK_ATTR_DPIPE_FIELD, 298 DEVLINK_ATTR_DPIPE_FIELD_NAME, 299 DEVLINK_ATTR_DPIPE_FIELD_ID, 300 DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH, 301 DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE, 302 DEVLINK_ATTR_PAD, 303 DEVLINK_ATTR_ESWITCH_ENCAP_MODE, 304 DEVLINK_ATTR_RESOURCE_LIST, 305 DEVLINK_ATTR_RESOURCE, 306 DEVLINK_ATTR_RESOURCE_NAME, 307 DEVLINK_ATTR_RESOURCE_ID, 308 DEVLINK_ATTR_RESOURCE_SIZE, 309 DEVLINK_ATTR_RESOURCE_SIZE_NEW, 310 DEVLINK_ATTR_RESOURCE_SIZE_VALID, 311 DEVLINK_ATTR_RESOURCE_SIZE_MIN, 312 DEVLINK_ATTR_RESOURCE_SIZE_MAX, 313 DEVLINK_ATTR_RESOURCE_SIZE_GRAN, 314 DEVLINK_ATTR_RESOURCE_UNIT, 315 DEVLINK_ATTR_RESOURCE_OCC, 316 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID, 317 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS, 318 DEVLINK_ATTR_PORT_FLAVOUR, 319 DEVLINK_ATTR_PORT_NUMBER, 320 DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER, 321 DEVLINK_ATTR_PARAM, 322 DEVLINK_ATTR_PARAM_NAME, 323 DEVLINK_ATTR_PARAM_GENERIC, 324 DEVLINK_ATTR_PARAM_TYPE, 325 DEVLINK_ATTR_PARAM_VALUES_LIST, 326 DEVLINK_ATTR_PARAM_VALUE, 327 DEVLINK_ATTR_PARAM_VALUE_DATA, 328 DEVLINK_ATTR_PARAM_VALUE_CMODE, 329 DEVLINK_ATTR_REGION_NAME, 330 DEVLINK_ATTR_REGION_SIZE, 331 DEVLINK_ATTR_REGION_SNAPSHOTS, 332 DEVLINK_ATTR_REGION_SNAPSHOT, 333 DEVLINK_ATTR_REGION_SNAPSHOT_ID, 334 DEVLINK_ATTR_REGION_CHUNKS, 335 DEVLINK_ATTR_REGION_CHUNK, 336 DEVLINK_ATTR_REGION_CHUNK_DATA, 337 DEVLINK_ATTR_REGION_CHUNK_ADDR, 338 DEVLINK_ATTR_REGION_CHUNK_LEN, 339 DEVLINK_ATTR_INFO_DRIVER_NAME, 340 DEVLINK_ATTR_INFO_SERIAL_NUMBER, 341 DEVLINK_ATTR_INFO_VERSION_FIXED, 342 DEVLINK_ATTR_INFO_VERSION_RUNNING, 343 DEVLINK_ATTR_INFO_VERSION_STORED, 344 DEVLINK_ATTR_INFO_VERSION_NAME, 345 DEVLINK_ATTR_INFO_VERSION_VALUE, 346 DEVLINK_ATTR_SB_POOL_CELL_SIZE, 347 DEVLINK_ATTR_FMSG, 348 DEVLINK_ATTR_FMSG_OBJ_NEST_START, 349 DEVLINK_ATTR_FMSG_PAIR_NEST_START, 350 DEVLINK_ATTR_FMSG_ARR_NEST_START, 351 DEVLINK_ATTR_FMSG_NEST_END, 352 DEVLINK_ATTR_FMSG_OBJ_NAME, 353 DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE, 354 DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA, 355 DEVLINK_ATTR_HEALTH_REPORTER, 356 DEVLINK_ATTR_HEALTH_REPORTER_NAME, 357 DEVLINK_ATTR_HEALTH_REPORTER_STATE, 358 DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT, 359 DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT, 360 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS, 361 DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD, 362 DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER, 363 DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME, 364 DEVLINK_ATTR_FLASH_UPDATE_COMPONENT, 365 DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG, 366 DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE, 367 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL, 368 DEVLINK_ATTR_PORT_PCI_PF_NUMBER, 369 DEVLINK_ATTR_PORT_PCI_VF_NUMBER, 370 DEVLINK_ATTR_STATS, 371 DEVLINK_ATTR_TRAP_NAME, 372 DEVLINK_ATTR_TRAP_ACTION, 373 DEVLINK_ATTR_TRAP_TYPE, 374 DEVLINK_ATTR_TRAP_GENERIC, 375 DEVLINK_ATTR_TRAP_METADATA, 376 DEVLINK_ATTR_TRAP_GROUP_NAME, 377 DEVLINK_ATTR_RELOAD_FAILED, 378 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS, 379 DEVLINK_ATTR_NETNS_FD, 380 DEVLINK_ATTR_NETNS_PID, 381 DEVLINK_ATTR_NETNS_ID, 382 DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP, 383 DEVLINK_ATTR_TRAP_POLICER_ID, 384 DEVLINK_ATTR_TRAP_POLICER_RATE, 385 DEVLINK_ATTR_TRAP_POLICER_BURST, 386 DEVLINK_ATTR_PORT_FUNCTION, 387 DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER, 388 DEVLINK_ATTR_PORT_LANES, 389 DEVLINK_ATTR_PORT_SPLITTABLE, 390 DEVLINK_ATTR_PORT_EXTERNAL, 391 DEVLINK_ATTR_PORT_CONTROLLER_NUMBER, 392 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT, 393 DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK, 394 DEVLINK_ATTR_RELOAD_ACTION, 395 DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED, 396 DEVLINK_ATTR_RELOAD_LIMITS, 397 DEVLINK_ATTR_DEV_STATS, 398 DEVLINK_ATTR_RELOAD_STATS, 399 DEVLINK_ATTR_RELOAD_STATS_ENTRY, 400 DEVLINK_ATTR_RELOAD_STATS_LIMIT, 401 DEVLINK_ATTR_RELOAD_STATS_VALUE, 402 DEVLINK_ATTR_REMOTE_RELOAD_STATS, 403 DEVLINK_ATTR_RELOAD_ACTION_INFO, 404 DEVLINK_ATTR_RELOAD_ACTION_STATS, 405 DEVLINK_ATTR_PORT_PCI_SF_NUMBER, 406 DEVLINK_ATTR_RATE_TYPE, 407 DEVLINK_ATTR_RATE_TX_SHARE, 408 DEVLINK_ATTR_RATE_TX_MAX, 409 DEVLINK_ATTR_RATE_NODE_NAME, 410 DEVLINK_ATTR_RATE_PARENT_NODE_NAME, 411 DEVLINK_ATTR_REGION_MAX_SNAPSHOTS, 412 DEVLINK_ATTR_LINECARD_INDEX, 413 DEVLINK_ATTR_LINECARD_STATE, 414 DEVLINK_ATTR_LINECARD_TYPE, 415 DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES, 416 DEVLINK_ATTR_NESTED_DEVLINK, 417 DEVLINK_ATTR_SELFTESTS, 418 DEVLINK_ATTR_RATE_TX_PRIORITY, 419 DEVLINK_ATTR_RATE_TX_WEIGHT, 420 DEVLINK_ATTR_REGION_DIRECT, 421 __DEVLINK_ATTR_MAX, 422 DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1 423 }; 424 enum devlink_dpipe_field_mapping_type { 425 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE, 426 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX, 427 }; 428 enum devlink_dpipe_match_type { 429 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT, 430 }; 431 enum devlink_dpipe_action_type { 432 DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY, 433 }; 434 enum devlink_dpipe_field_ethernet_id { 435 DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC, 436 }; 437 enum devlink_dpipe_field_ipv4_id { 438 DEVLINK_DPIPE_FIELD_IPV4_DST_IP, 439 }; 440 enum devlink_dpipe_field_ipv6_id { 441 DEVLINK_DPIPE_FIELD_IPV6_DST_IP, 442 }; 443 enum devlink_dpipe_header_id { 444 DEVLINK_DPIPE_HEADER_ETHERNET, 445 DEVLINK_DPIPE_HEADER_IPV4, 446 DEVLINK_DPIPE_HEADER_IPV6, 447 }; 448 enum devlink_resource_unit { 449 DEVLINK_RESOURCE_UNIT_ENTRY, 450 }; 451 enum devlink_port_fn_attr_cap { 452 DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT, 453 DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT, 454 DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT, 455 DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT, 456 __DEVLINK_PORT_FN_ATTR_CAPS_MAX, 457 }; 458 #define DEVLINK_PORT_FN_CAP_ROCE _BITUL(DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT) 459 #define DEVLINK_PORT_FN_CAP_MIGRATABLE _BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT) 460 #define DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT) 461 #define DEVLINK_PORT_FN_CAP_IPSEC_PACKET _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT) 462 enum devlink_port_function_attr { 463 DEVLINK_PORT_FUNCTION_ATTR_UNSPEC, 464 DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR, 465 DEVLINK_PORT_FN_ATTR_STATE, 466 DEVLINK_PORT_FN_ATTR_OPSTATE, 467 DEVLINK_PORT_FN_ATTR_CAPS, 468 DEVLINK_PORT_FN_ATTR_DEVLINK, 469 __DEVLINK_PORT_FUNCTION_ATTR_MAX, 470 DEVLINK_PORT_FUNCTION_ATTR_MAX = __DEVLINK_PORT_FUNCTION_ATTR_MAX - 1 471 }; 472 enum devlink_port_fn_state { 473 DEVLINK_PORT_FN_STATE_INACTIVE, 474 DEVLINK_PORT_FN_STATE_ACTIVE, 475 }; 476 enum devlink_port_fn_opstate { 477 DEVLINK_PORT_FN_OPSTATE_DETACHED, 478 DEVLINK_PORT_FN_OPSTATE_ATTACHED, 479 }; 480 #endif 481