1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linu 1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2 /* 2 /* 3 * include/uapi/linux/devlink.h - Network phys 3 * include/uapi/linux/devlink.h - Network physical device Netlink interface 4 * Copyright (c) 2016 Mellanox Technologies. A 4 * Copyright (c) 2016 Mellanox Technologies. All rights reserved. 5 * Copyright (c) 2016 Jiri Pirko <jiri@mellano 5 * Copyright (c) 2016 Jiri Pirko <jiri@mellanox.com> 6 * 6 * 7 * This program is free software; you can redi 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Publi 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either versio 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 10 * (at your option) any later version. 11 */ 11 */ 12 12 13 #ifndef _UAPI_LINUX_DEVLINK_H_ 13 #ifndef _UAPI_LINUX_DEVLINK_H_ 14 #define _UAPI_LINUX_DEVLINK_H_ 14 #define _UAPI_LINUX_DEVLINK_H_ 15 15 16 #include <linux/const.h> << 17 << 18 #define DEVLINK_GENL_NAME "devlink" 16 #define DEVLINK_GENL_NAME "devlink" 19 #define DEVLINK_GENL_VERSION 0x1 17 #define DEVLINK_GENL_VERSION 0x1 20 #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config 18 #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config" 21 19 22 enum devlink_command { 20 enum devlink_command { 23 /* don't change the order or add anyth 21 /* don't change the order or add anything between, this is ABI! */ 24 DEVLINK_CMD_UNSPEC, 22 DEVLINK_CMD_UNSPEC, 25 23 26 DEVLINK_CMD_GET, /* can 24 DEVLINK_CMD_GET, /* can dump */ 27 DEVLINK_CMD_SET, 25 DEVLINK_CMD_SET, 28 DEVLINK_CMD_NEW, 26 DEVLINK_CMD_NEW, 29 DEVLINK_CMD_DEL, 27 DEVLINK_CMD_DEL, 30 28 31 DEVLINK_CMD_PORT_GET, /* can 29 DEVLINK_CMD_PORT_GET, /* can dump */ 32 DEVLINK_CMD_PORT_SET, 30 DEVLINK_CMD_PORT_SET, 33 DEVLINK_CMD_PORT_NEW, 31 DEVLINK_CMD_PORT_NEW, 34 DEVLINK_CMD_PORT_DEL, 32 DEVLINK_CMD_PORT_DEL, 35 33 36 DEVLINK_CMD_PORT_SPLIT, 34 DEVLINK_CMD_PORT_SPLIT, 37 DEVLINK_CMD_PORT_UNSPLIT, 35 DEVLINK_CMD_PORT_UNSPLIT, 38 36 39 DEVLINK_CMD_SB_GET, /* can 37 DEVLINK_CMD_SB_GET, /* can dump */ 40 DEVLINK_CMD_SB_SET, 38 DEVLINK_CMD_SB_SET, 41 DEVLINK_CMD_SB_NEW, 39 DEVLINK_CMD_SB_NEW, 42 DEVLINK_CMD_SB_DEL, 40 DEVLINK_CMD_SB_DEL, 43 41 44 DEVLINK_CMD_SB_POOL_GET, /* can 42 DEVLINK_CMD_SB_POOL_GET, /* can dump */ 45 DEVLINK_CMD_SB_POOL_SET, 43 DEVLINK_CMD_SB_POOL_SET, 46 DEVLINK_CMD_SB_POOL_NEW, 44 DEVLINK_CMD_SB_POOL_NEW, 47 DEVLINK_CMD_SB_POOL_DEL, 45 DEVLINK_CMD_SB_POOL_DEL, 48 46 49 DEVLINK_CMD_SB_PORT_POOL_GET, /* can 47 DEVLINK_CMD_SB_PORT_POOL_GET, /* can dump */ 50 DEVLINK_CMD_SB_PORT_POOL_SET, 48 DEVLINK_CMD_SB_PORT_POOL_SET, 51 DEVLINK_CMD_SB_PORT_POOL_NEW, 49 DEVLINK_CMD_SB_PORT_POOL_NEW, 52 DEVLINK_CMD_SB_PORT_POOL_DEL, 50 DEVLINK_CMD_SB_PORT_POOL_DEL, 53 51 54 DEVLINK_CMD_SB_TC_POOL_BIND_GET, 52 DEVLINK_CMD_SB_TC_POOL_BIND_GET, /* can dump */ 55 DEVLINK_CMD_SB_TC_POOL_BIND_SET, 53 DEVLINK_CMD_SB_TC_POOL_BIND_SET, 56 DEVLINK_CMD_SB_TC_POOL_BIND_NEW, 54 DEVLINK_CMD_SB_TC_POOL_BIND_NEW, 57 DEVLINK_CMD_SB_TC_POOL_BIND_DEL, 55 DEVLINK_CMD_SB_TC_POOL_BIND_DEL, 58 56 59 /* Shared buffer occupancy monitoring 57 /* Shared buffer occupancy monitoring commands */ 60 DEVLINK_CMD_SB_OCC_SNAPSHOT, 58 DEVLINK_CMD_SB_OCC_SNAPSHOT, 61 DEVLINK_CMD_SB_OCC_MAX_CLEAR, 59 DEVLINK_CMD_SB_OCC_MAX_CLEAR, 62 60 63 DEVLINK_CMD_ESWITCH_GET, 61 DEVLINK_CMD_ESWITCH_GET, 64 #define DEVLINK_CMD_ESWITCH_MODE_GET /* obsole 62 #define DEVLINK_CMD_ESWITCH_MODE_GET /* obsolete, never use this! */ \ 65 DEVLINK_CMD_ESWITCH_GET 63 DEVLINK_CMD_ESWITCH_GET 66 64 67 DEVLINK_CMD_ESWITCH_SET, 65 DEVLINK_CMD_ESWITCH_SET, 68 #define DEVLINK_CMD_ESWITCH_MODE_SET /* obsole 66 #define DEVLINK_CMD_ESWITCH_MODE_SET /* obsolete, never use this! */ \ 69 DEVLINK_CMD_ESWITCH_SET 67 DEVLINK_CMD_ESWITCH_SET 70 68 71 DEVLINK_CMD_DPIPE_TABLE_GET, 69 DEVLINK_CMD_DPIPE_TABLE_GET, 72 DEVLINK_CMD_DPIPE_ENTRIES_GET, 70 DEVLINK_CMD_DPIPE_ENTRIES_GET, 73 DEVLINK_CMD_DPIPE_HEADERS_GET, 71 DEVLINK_CMD_DPIPE_HEADERS_GET, 74 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET, 72 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET, 75 DEVLINK_CMD_RESOURCE_SET, 73 DEVLINK_CMD_RESOURCE_SET, 76 DEVLINK_CMD_RESOURCE_DUMP, 74 DEVLINK_CMD_RESOURCE_DUMP, 77 75 78 /* Hot driver reload, makes configurat 76 /* Hot driver reload, makes configuration changes take place. The 79 * devlink instance is not released du 77 * devlink instance is not released during the process. 80 */ 78 */ 81 DEVLINK_CMD_RELOAD, 79 DEVLINK_CMD_RELOAD, 82 80 83 DEVLINK_CMD_PARAM_GET, /* can << 84 DEVLINK_CMD_PARAM_SET, << 85 DEVLINK_CMD_PARAM_NEW, << 86 DEVLINK_CMD_PARAM_DEL, << 87 << 88 DEVLINK_CMD_REGION_GET, << 89 DEVLINK_CMD_REGION_SET, << 90 DEVLINK_CMD_REGION_NEW, << 91 DEVLINK_CMD_REGION_DEL, << 92 DEVLINK_CMD_REGION_READ, << 93 << 94 DEVLINK_CMD_PORT_PARAM_GET, /* can << 95 DEVLINK_CMD_PORT_PARAM_SET, << 96 DEVLINK_CMD_PORT_PARAM_NEW, << 97 DEVLINK_CMD_PORT_PARAM_DEL, << 98 << 99 DEVLINK_CMD_INFO_GET, /* can << 100 << 101 DEVLINK_CMD_HEALTH_REPORTER_GET, << 102 DEVLINK_CMD_HEALTH_REPORTER_SET, << 103 DEVLINK_CMD_HEALTH_REPORTER_RECOVER, << 104 DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE, << 105 DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, << 106 DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR << 107 << 108 DEVLINK_CMD_FLASH_UPDATE, << 109 DEVLINK_CMD_FLASH_UPDATE_END, << 110 DEVLINK_CMD_FLASH_UPDATE_STATUS, << 111 << 112 DEVLINK_CMD_TRAP_GET, /* can << 113 DEVLINK_CMD_TRAP_SET, << 114 DEVLINK_CMD_TRAP_NEW, << 115 DEVLINK_CMD_TRAP_DEL, << 116 << 117 DEVLINK_CMD_TRAP_GROUP_GET, /* can << 118 DEVLINK_CMD_TRAP_GROUP_SET, << 119 DEVLINK_CMD_TRAP_GROUP_NEW, << 120 DEVLINK_CMD_TRAP_GROUP_DEL, << 121 << 122 DEVLINK_CMD_TRAP_POLICER_GET, /* can << 123 DEVLINK_CMD_TRAP_POLICER_SET, << 124 DEVLINK_CMD_TRAP_POLICER_NEW, << 125 DEVLINK_CMD_TRAP_POLICER_DEL, << 126 << 127 DEVLINK_CMD_HEALTH_REPORTER_TEST, << 128 << 129 DEVLINK_CMD_RATE_GET, /* can << 130 DEVLINK_CMD_RATE_SET, << 131 DEVLINK_CMD_RATE_NEW, << 132 DEVLINK_CMD_RATE_DEL, << 133 << 134 DEVLINK_CMD_LINECARD_GET, << 135 DEVLINK_CMD_LINECARD_SET, << 136 DEVLINK_CMD_LINECARD_NEW, << 137 DEVLINK_CMD_LINECARD_DEL, << 138 << 139 DEVLINK_CMD_SELFTESTS_GET, /* can << 140 DEVLINK_CMD_SELFTESTS_RUN, << 141 << 142 DEVLINK_CMD_NOTIFY_FILTER_SET, << 143 << 144 /* add new commands above here */ 81 /* add new commands above here */ 145 __DEVLINK_CMD_MAX, 82 __DEVLINK_CMD_MAX, 146 DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 83 DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 147 }; 84 }; 148 85 149 enum devlink_port_type { 86 enum devlink_port_type { 150 DEVLINK_PORT_TYPE_NOTSET, 87 DEVLINK_PORT_TYPE_NOTSET, 151 DEVLINK_PORT_TYPE_AUTO, 88 DEVLINK_PORT_TYPE_AUTO, 152 DEVLINK_PORT_TYPE_ETH, 89 DEVLINK_PORT_TYPE_ETH, 153 DEVLINK_PORT_TYPE_IB, 90 DEVLINK_PORT_TYPE_IB, 154 }; 91 }; 155 92 156 enum devlink_sb_pool_type { 93 enum devlink_sb_pool_type { 157 DEVLINK_SB_POOL_TYPE_INGRESS, 94 DEVLINK_SB_POOL_TYPE_INGRESS, 158 DEVLINK_SB_POOL_TYPE_EGRESS, 95 DEVLINK_SB_POOL_TYPE_EGRESS, 159 }; 96 }; 160 97 161 /* static threshold - limiting the maximum num 98 /* static threshold - limiting the maximum number of bytes. 162 * dynamic threshold - limiting the maximum nu 99 * dynamic threshold - limiting the maximum number of bytes 163 * based on the currently available free spa 100 * based on the currently available free space in the shared buffer pool. 164 * In this mode, the maximum quota is calcul 101 * In this mode, the maximum quota is calculated based 165 * on the following formula: 102 * on the following formula: 166 * max_quota = alpha / (1 + alpha) * Free_ 103 * max_quota = alpha / (1 + alpha) * Free_Buffer 167 * While Free_Buffer is the amount of none-o 104 * While Free_Buffer is the amount of none-occupied buffer associated to 168 * the relevant pool. 105 * the relevant pool. 169 * The value range which can be passed is 0- 106 * The value range which can be passed is 0-20 and serves 170 * for computation of alpha by following for 107 * for computation of alpha by following formula: 171 * alpha = 2 ^ (passed_value - 10) 108 * alpha = 2 ^ (passed_value - 10) 172 */ 109 */ 173 110 174 enum devlink_sb_threshold_type { 111 enum devlink_sb_threshold_type { 175 DEVLINK_SB_THRESHOLD_TYPE_STATIC, 112 DEVLINK_SB_THRESHOLD_TYPE_STATIC, 176 DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC, 113 DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC, 177 }; 114 }; 178 115 179 #define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20 116 #define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20 180 117 181 enum devlink_eswitch_mode { 118 enum devlink_eswitch_mode { 182 DEVLINK_ESWITCH_MODE_LEGACY, 119 DEVLINK_ESWITCH_MODE_LEGACY, 183 DEVLINK_ESWITCH_MODE_SWITCHDEV, 120 DEVLINK_ESWITCH_MODE_SWITCHDEV, 184 }; 121 }; 185 122 186 enum devlink_eswitch_inline_mode { 123 enum devlink_eswitch_inline_mode { 187 DEVLINK_ESWITCH_INLINE_MODE_NONE, 124 DEVLINK_ESWITCH_INLINE_MODE_NONE, 188 DEVLINK_ESWITCH_INLINE_MODE_LINK, 125 DEVLINK_ESWITCH_INLINE_MODE_LINK, 189 DEVLINK_ESWITCH_INLINE_MODE_NETWORK, 126 DEVLINK_ESWITCH_INLINE_MODE_NETWORK, 190 DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT, 127 DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT, 191 }; 128 }; 192 129 193 enum devlink_eswitch_encap_mode { 130 enum devlink_eswitch_encap_mode { 194 DEVLINK_ESWITCH_ENCAP_MODE_NONE, 131 DEVLINK_ESWITCH_ENCAP_MODE_NONE, 195 DEVLINK_ESWITCH_ENCAP_MODE_BASIC, 132 DEVLINK_ESWITCH_ENCAP_MODE_BASIC, 196 }; 133 }; 197 134 198 enum devlink_port_flavour { 135 enum devlink_port_flavour { 199 DEVLINK_PORT_FLAVOUR_PHYSICAL, /* Any 136 DEVLINK_PORT_FLAVOUR_PHYSICAL, /* Any kind of a port physically 200 * faci 137 * facing the user. 201 */ 138 */ 202 DEVLINK_PORT_FLAVOUR_CPU, /* CPU port 139 DEVLINK_PORT_FLAVOUR_CPU, /* CPU port */ 203 DEVLINK_PORT_FLAVOUR_DSA, /* Distribut 140 DEVLINK_PORT_FLAVOUR_DSA, /* Distributed switch architecture 204 * interconn 141 * interconnect port. 205 */ 142 */ 206 DEVLINK_PORT_FLAVOUR_PCI_PF, /* Repres << 207 * the PC << 208 * port t << 209 */ << 210 DEVLINK_PORT_FLAVOUR_PCI_VF, /* Repres << 211 * for th << 212 * port t << 213 */ << 214 DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any v << 215 DEVLINK_PORT_FLAVOUR_UNUSED, /* Port w << 216 * is not << 217 */ << 218 DEVLINK_PORT_FLAVOUR_PCI_SF, /* Repres << 219 * for th << 220 * port t << 221 */ << 222 }; << 223 << 224 enum devlink_rate_type { << 225 DEVLINK_RATE_TYPE_LEAF, << 226 DEVLINK_RATE_TYPE_NODE, << 227 }; << 228 << 229 enum devlink_param_cmode { << 230 DEVLINK_PARAM_CMODE_RUNTIME, << 231 DEVLINK_PARAM_CMODE_DRIVERINIT, << 232 DEVLINK_PARAM_CMODE_PERMANENT, << 233 << 234 /* Add new configuration modes above * << 235 __DEVLINK_PARAM_CMODE_MAX, << 236 DEVLINK_PARAM_CMODE_MAX = __DEVLINK_PA << 237 }; << 238 << 239 enum devlink_param_fw_load_policy_value { << 240 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRI << 241 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLA << 242 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DIS << 243 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNK << 244 }; << 245 << 246 enum devlink_param_reset_dev_on_drv_probe_valu << 247 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_V << 248 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_V << 249 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_V << 250 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_V << 251 }; << 252 << 253 enum { << 254 DEVLINK_ATTR_STATS_RX_PACKETS, << 255 DEVLINK_ATTR_STATS_RX_BYTES, << 256 DEVLINK_ATTR_STATS_RX_DROPPED, << 257 << 258 __DEVLINK_ATTR_STATS_MAX, << 259 DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATT << 260 }; << 261 << 262 /* Specify what sections of a flash component << 263 * performing an update. Overwriting of firmwa << 264 * implicitly assumed to be allowed. << 265 * << 266 * Each section must be documented in << 267 * Documentation/networking/devlink/devlink-fl << 268 * << 269 */ << 270 enum devlink_flash_overwrite { << 271 DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT, << 272 DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BI << 273 << 274 __DEVLINK_FLASH_OVERWRITE_MAX_BIT, << 275 DEVLINK_FLASH_OVERWRITE_MAX_BIT = __DE << 276 }; << 277 << 278 #define DEVLINK_FLASH_OVERWRITE_SETTINGS _BITU << 279 #define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS _B << 280 << 281 #define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECT << 282 (_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_ << 283 << 284 enum devlink_attr_selftest_id { << 285 DEVLINK_ATTR_SELFTEST_ID_UNSPEC, << 286 DEVLINK_ATTR_SELFTEST_ID_FLASH, /* fla << 287 << 288 __DEVLINK_ATTR_SELFTEST_ID_MAX, << 289 DEVLINK_ATTR_SELFTEST_ID_MAX = __DEVLI << 290 }; << 291 << 292 enum devlink_selftest_status { << 293 DEVLINK_SELFTEST_STATUS_SKIP, << 294 DEVLINK_SELFTEST_STATUS_PASS, << 295 DEVLINK_SELFTEST_STATUS_FAIL << 296 }; << 297 << 298 enum devlink_attr_selftest_result { << 299 DEVLINK_ATTR_SELFTEST_RESULT_UNSPEC, << 300 DEVLINK_ATTR_SELFTEST_RESULT, << 301 DEVLINK_ATTR_SELFTEST_RESULT_ID, << 302 DEVLINK_ATTR_SELFTEST_RESULT_STATUS, << 303 << 304 __DEVLINK_ATTR_SELFTEST_RESULT_MAX, << 305 DEVLINK_ATTR_SELFTEST_RESULT_MAX = __D << 306 }; << 307 << 308 /** << 309 * enum devlink_trap_action - Packet trap acti << 310 * @DEVLINK_TRAP_ACTION_DROP: Packet is droppe << 311 * sent to the CPU. << 312 * @DEVLINK_TRAP_ACTION_TRAP: The sole copy of << 313 * @DEVLINK_TRAP_ACTION_MIRROR: Packet is forw << 314 * sent to the CP << 315 */ << 316 enum devlink_trap_action { << 317 DEVLINK_TRAP_ACTION_DROP, << 318 DEVLINK_TRAP_ACTION_TRAP, << 319 DEVLINK_TRAP_ACTION_MIRROR, << 320 }; << 321 << 322 /** << 323 * enum devlink_trap_type - Packet trap type. << 324 * @DEVLINK_TRAP_TYPE_DROP: Trap reason is a d << 325 * processed by devli << 326 * kernel's Rx path. << 327 * @DEVLINK_TRAP_TYPE_EXCEPTION: Trap reason i << 328 * forwarded as << 329 * (e.g., missin << 330 * control plane << 331 * are processed << 332 * the kernel's << 333 * @DEVLINK_TRAP_TYPE_CONTROL: Packet was trap << 334 * the correct fun << 335 * For example, an << 336 * packets are inj << 337 * but not reporte << 338 */ << 339 enum devlink_trap_type { << 340 DEVLINK_TRAP_TYPE_DROP, << 341 DEVLINK_TRAP_TYPE_EXCEPTION, << 342 DEVLINK_TRAP_TYPE_CONTROL, << 343 }; << 344 << 345 enum { << 346 /* Trap can report input port as metad << 347 DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_POR << 348 /* Trap can report flow action cookie << 349 DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COO << 350 }; << 351 << 352 enum devlink_reload_action { << 353 DEVLINK_RELOAD_ACTION_UNSPEC, << 354 DEVLINK_RELOAD_ACTION_DRIVER_REINIT, << 355 DEVLINK_RELOAD_ACTION_FW_ACTIVATE, << 356 << 357 /* Add new reload actions above */ << 358 __DEVLINK_RELOAD_ACTION_MAX, << 359 DEVLINK_RELOAD_ACTION_MAX = __DEVLINK_ << 360 }; << 361 << 362 enum devlink_reload_limit { << 363 DEVLINK_RELOAD_LIMIT_UNSPEC, /* uns << 364 DEVLINK_RELOAD_LIMIT_NO_RESET, /* No << 365 * no << 366 */ << 367 << 368 /* Add new reload limit above */ << 369 __DEVLINK_RELOAD_LIMIT_MAX, << 370 DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_R << 371 }; << 372 << 373 #define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BIT << 374 << 375 enum devlink_linecard_state { << 376 DEVLINK_LINECARD_STATE_UNSPEC, << 377 DEVLINK_LINECARD_STATE_UNPROVISIONED, << 378 DEVLINK_LINECARD_STATE_UNPROVISIONING, << 379 DEVLINK_LINECARD_STATE_PROVISIONING, << 380 DEVLINK_LINECARD_STATE_PROVISIONING_FA << 381 DEVLINK_LINECARD_STATE_PROVISIONED, << 382 DEVLINK_LINECARD_STATE_ACTIVE, << 383 << 384 __DEVLINK_LINECARD_STATE_MAX, << 385 DEVLINK_LINECARD_STATE_MAX = __DEVLINK << 386 }; 143 }; 387 144 388 enum devlink_attr { 145 enum devlink_attr { 389 /* don't change the order or add anyth 146 /* don't change the order or add anything between, this is ABI! */ 390 DEVLINK_ATTR_UNSPEC, 147 DEVLINK_ATTR_UNSPEC, 391 148 392 /* bus name + dev name together are a 149 /* bus name + dev name together are a handle for devlink entity */ 393 DEVLINK_ATTR_BUS_NAME, 150 DEVLINK_ATTR_BUS_NAME, /* string */ 394 DEVLINK_ATTR_DEV_NAME, 151 DEVLINK_ATTR_DEV_NAME, /* string */ 395 152 396 DEVLINK_ATTR_PORT_INDEX, 153 DEVLINK_ATTR_PORT_INDEX, /* u32 */ 397 DEVLINK_ATTR_PORT_TYPE, 154 DEVLINK_ATTR_PORT_TYPE, /* u16 */ 398 DEVLINK_ATTR_PORT_DESIRED_TYPE, 155 DEVLINK_ATTR_PORT_DESIRED_TYPE, /* u16 */ 399 DEVLINK_ATTR_PORT_NETDEV_IFINDEX, 156 DEVLINK_ATTR_PORT_NETDEV_IFINDEX, /* u32 */ 400 DEVLINK_ATTR_PORT_NETDEV_NAME, 157 DEVLINK_ATTR_PORT_NETDEV_NAME, /* string */ 401 DEVLINK_ATTR_PORT_IBDEV_NAME, 158 DEVLINK_ATTR_PORT_IBDEV_NAME, /* string */ 402 DEVLINK_ATTR_PORT_SPLIT_COUNT, 159 DEVLINK_ATTR_PORT_SPLIT_COUNT, /* u32 */ 403 DEVLINK_ATTR_PORT_SPLIT_GROUP, 160 DEVLINK_ATTR_PORT_SPLIT_GROUP, /* u32 */ 404 DEVLINK_ATTR_SB_INDEX, 161 DEVLINK_ATTR_SB_INDEX, /* u32 */ 405 DEVLINK_ATTR_SB_SIZE, 162 DEVLINK_ATTR_SB_SIZE, /* u32 */ 406 DEVLINK_ATTR_SB_INGRESS_POOL_COUNT, 163 DEVLINK_ATTR_SB_INGRESS_POOL_COUNT, /* u16 */ 407 DEVLINK_ATTR_SB_EGRESS_POOL_COUNT, 164 DEVLINK_ATTR_SB_EGRESS_POOL_COUNT, /* u16 */ 408 DEVLINK_ATTR_SB_INGRESS_TC_COUNT, 165 DEVLINK_ATTR_SB_INGRESS_TC_COUNT, /* u16 */ 409 DEVLINK_ATTR_SB_EGRESS_TC_COUNT, 166 DEVLINK_ATTR_SB_EGRESS_TC_COUNT, /* u16 */ 410 DEVLINK_ATTR_SB_POOL_INDEX, 167 DEVLINK_ATTR_SB_POOL_INDEX, /* u16 */ 411 DEVLINK_ATTR_SB_POOL_TYPE, 168 DEVLINK_ATTR_SB_POOL_TYPE, /* u8 */ 412 DEVLINK_ATTR_SB_POOL_SIZE, 169 DEVLINK_ATTR_SB_POOL_SIZE, /* u32 */ 413 DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE, 170 DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE, /* u8 */ 414 DEVLINK_ATTR_SB_THRESHOLD, 171 DEVLINK_ATTR_SB_THRESHOLD, /* u32 */ 415 DEVLINK_ATTR_SB_TC_INDEX, 172 DEVLINK_ATTR_SB_TC_INDEX, /* u16 */ 416 DEVLINK_ATTR_SB_OCC_CUR, 173 DEVLINK_ATTR_SB_OCC_CUR, /* u32 */ 417 DEVLINK_ATTR_SB_OCC_MAX, 174 DEVLINK_ATTR_SB_OCC_MAX, /* u32 */ 418 DEVLINK_ATTR_ESWITCH_MODE, 175 DEVLINK_ATTR_ESWITCH_MODE, /* u16 */ 419 DEVLINK_ATTR_ESWITCH_INLINE_MODE, 176 DEVLINK_ATTR_ESWITCH_INLINE_MODE, /* u8 */ 420 177 421 DEVLINK_ATTR_DPIPE_TABLES, 178 DEVLINK_ATTR_DPIPE_TABLES, /* nested */ 422 DEVLINK_ATTR_DPIPE_TABLE, 179 DEVLINK_ATTR_DPIPE_TABLE, /* nested */ 423 DEVLINK_ATTR_DPIPE_TABLE_NAME, 180 DEVLINK_ATTR_DPIPE_TABLE_NAME, /* string */ 424 DEVLINK_ATTR_DPIPE_TABLE_SIZE, 181 DEVLINK_ATTR_DPIPE_TABLE_SIZE, /* u64 */ 425 DEVLINK_ATTR_DPIPE_TABLE_MATCHES, 182 DEVLINK_ATTR_DPIPE_TABLE_MATCHES, /* nested */ 426 DEVLINK_ATTR_DPIPE_TABLE_ACTIONS, 183 DEVLINK_ATTR_DPIPE_TABLE_ACTIONS, /* nested */ 427 DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENAB 184 DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED, /* u8 */ 428 185 429 DEVLINK_ATTR_DPIPE_ENTRIES, 186 DEVLINK_ATTR_DPIPE_ENTRIES, /* nested */ 430 DEVLINK_ATTR_DPIPE_ENTRY, 187 DEVLINK_ATTR_DPIPE_ENTRY, /* nested */ 431 DEVLINK_ATTR_DPIPE_ENTRY_INDEX, 188 DEVLINK_ATTR_DPIPE_ENTRY_INDEX, /* u64 */ 432 DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES, 189 DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES, /* nested */ 433 DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES 190 DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES, /* nested */ 434 DEVLINK_ATTR_DPIPE_ENTRY_COUNTER, 191 DEVLINK_ATTR_DPIPE_ENTRY_COUNTER, /* u64 */ 435 192 436 DEVLINK_ATTR_DPIPE_MATCH, 193 DEVLINK_ATTR_DPIPE_MATCH, /* nested */ 437 DEVLINK_ATTR_DPIPE_MATCH_VALUE, 194 DEVLINK_ATTR_DPIPE_MATCH_VALUE, /* nested */ 438 DEVLINK_ATTR_DPIPE_MATCH_TYPE, 195 DEVLINK_ATTR_DPIPE_MATCH_TYPE, /* u32 */ 439 196 440 DEVLINK_ATTR_DPIPE_ACTION, 197 DEVLINK_ATTR_DPIPE_ACTION, /* nested */ 441 DEVLINK_ATTR_DPIPE_ACTION_VALUE, 198 DEVLINK_ATTR_DPIPE_ACTION_VALUE, /* nested */ 442 DEVLINK_ATTR_DPIPE_ACTION_TYPE, 199 DEVLINK_ATTR_DPIPE_ACTION_TYPE, /* u32 */ 443 200 444 DEVLINK_ATTR_DPIPE_VALUE, 201 DEVLINK_ATTR_DPIPE_VALUE, 445 DEVLINK_ATTR_DPIPE_VALUE_MASK, 202 DEVLINK_ATTR_DPIPE_VALUE_MASK, 446 DEVLINK_ATTR_DPIPE_VALUE_MAPPING, 203 DEVLINK_ATTR_DPIPE_VALUE_MAPPING, /* u32 */ 447 204 448 DEVLINK_ATTR_DPIPE_HEADERS, 205 DEVLINK_ATTR_DPIPE_HEADERS, /* nested */ 449 DEVLINK_ATTR_DPIPE_HEADER, 206 DEVLINK_ATTR_DPIPE_HEADER, /* nested */ 450 DEVLINK_ATTR_DPIPE_HEADER_NAME, 207 DEVLINK_ATTR_DPIPE_HEADER_NAME, /* string */ 451 DEVLINK_ATTR_DPIPE_HEADER_ID, 208 DEVLINK_ATTR_DPIPE_HEADER_ID, /* u32 */ 452 DEVLINK_ATTR_DPIPE_HEADER_FIELDS, 209 DEVLINK_ATTR_DPIPE_HEADER_FIELDS, /* nested */ 453 DEVLINK_ATTR_DPIPE_HEADER_GLOBAL, 210 DEVLINK_ATTR_DPIPE_HEADER_GLOBAL, /* u8 */ 454 DEVLINK_ATTR_DPIPE_HEADER_INDEX, 211 DEVLINK_ATTR_DPIPE_HEADER_INDEX, /* u32 */ 455 212 456 DEVLINK_ATTR_DPIPE_FIELD, 213 DEVLINK_ATTR_DPIPE_FIELD, /* nested */ 457 DEVLINK_ATTR_DPIPE_FIELD_NAME, 214 DEVLINK_ATTR_DPIPE_FIELD_NAME, /* string */ 458 DEVLINK_ATTR_DPIPE_FIELD_ID, 215 DEVLINK_ATTR_DPIPE_FIELD_ID, /* u32 */ 459 DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH, 216 DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH, /* u32 */ 460 DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE, 217 DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE, /* u32 */ 461 218 462 DEVLINK_ATTR_PAD, 219 DEVLINK_ATTR_PAD, 463 220 464 DEVLINK_ATTR_ESWITCH_ENCAP_MODE, 221 DEVLINK_ATTR_ESWITCH_ENCAP_MODE, /* u8 */ 465 DEVLINK_ATTR_RESOURCE_LIST, 222 DEVLINK_ATTR_RESOURCE_LIST, /* nested */ 466 DEVLINK_ATTR_RESOURCE, 223 DEVLINK_ATTR_RESOURCE, /* nested */ 467 DEVLINK_ATTR_RESOURCE_NAME, 224 DEVLINK_ATTR_RESOURCE_NAME, /* string */ 468 DEVLINK_ATTR_RESOURCE_ID, 225 DEVLINK_ATTR_RESOURCE_ID, /* u64 */ 469 DEVLINK_ATTR_RESOURCE_SIZE, 226 DEVLINK_ATTR_RESOURCE_SIZE, /* u64 */ 470 DEVLINK_ATTR_RESOURCE_SIZE_NEW, 227 DEVLINK_ATTR_RESOURCE_SIZE_NEW, /* u64 */ 471 DEVLINK_ATTR_RESOURCE_SIZE_VALID, 228 DEVLINK_ATTR_RESOURCE_SIZE_VALID, /* u8 */ 472 DEVLINK_ATTR_RESOURCE_SIZE_MIN, 229 DEVLINK_ATTR_RESOURCE_SIZE_MIN, /* u64 */ 473 DEVLINK_ATTR_RESOURCE_SIZE_MAX, 230 DEVLINK_ATTR_RESOURCE_SIZE_MAX, /* u64 */ 474 DEVLINK_ATTR_RESOURCE_SIZE_GRAN, 231 DEVLINK_ATTR_RESOURCE_SIZE_GRAN, /* u64 */ 475 DEVLINK_ATTR_RESOURCE_UNIT, 232 DEVLINK_ATTR_RESOURCE_UNIT, /* u8 */ 476 DEVLINK_ATTR_RESOURCE_OCC, 233 DEVLINK_ATTR_RESOURCE_OCC, /* u64 */ 477 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID, 234 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID, /* u64 */ 478 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNIT 235 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS,/* u64 */ 479 236 480 DEVLINK_ATTR_PORT_FLAVOUR, 237 DEVLINK_ATTR_PORT_FLAVOUR, /* u16 */ 481 DEVLINK_ATTR_PORT_NUMBER, 238 DEVLINK_ATTR_PORT_NUMBER, /* u32 */ 482 DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER 239 DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER, /* u32 */ 483 240 484 DEVLINK_ATTR_PARAM, !! 241 /* add new attributes above here, update the policy in devlink.c */ 485 DEVLINK_ATTR_PARAM_NAME, << 486 DEVLINK_ATTR_PARAM_GENERIC, << 487 DEVLINK_ATTR_PARAM_TYPE, << 488 DEVLINK_ATTR_PARAM_VALUES_LIST, << 489 DEVLINK_ATTR_PARAM_VALUE, << 490 DEVLINK_ATTR_PARAM_VALUE_DATA, << 491 DEVLINK_ATTR_PARAM_VALUE_CMODE, << 492 << 493 DEVLINK_ATTR_REGION_NAME, << 494 DEVLINK_ATTR_REGION_SIZE, << 495 DEVLINK_ATTR_REGION_SNAPSHOTS, << 496 DEVLINK_ATTR_REGION_SNAPSHOT, << 497 DEVLINK_ATTR_REGION_SNAPSHOT_ID, << 498 << 499 DEVLINK_ATTR_REGION_CHUNKS, << 500 DEVLINK_ATTR_REGION_CHUNK, << 501 DEVLINK_ATTR_REGION_CHUNK_DATA, << 502 DEVLINK_ATTR_REGION_CHUNK_ADDR, << 503 DEVLINK_ATTR_REGION_CHUNK_LEN, << 504 << 505 DEVLINK_ATTR_INFO_DRIVER_NAME, << 506 DEVLINK_ATTR_INFO_SERIAL_NUMBER, << 507 DEVLINK_ATTR_INFO_VERSION_FIXED, << 508 DEVLINK_ATTR_INFO_VERSION_RUNNING, << 509 DEVLINK_ATTR_INFO_VERSION_STORED, << 510 DEVLINK_ATTR_INFO_VERSION_NAME, << 511 DEVLINK_ATTR_INFO_VERSION_VALUE, << 512 << 513 DEVLINK_ATTR_SB_POOL_CELL_SIZE, << 514 << 515 DEVLINK_ATTR_FMSG, << 516 DEVLINK_ATTR_FMSG_OBJ_NEST_START, << 517 DEVLINK_ATTR_FMSG_PAIR_NEST_START, << 518 DEVLINK_ATTR_FMSG_ARR_NEST_START, << 519 DEVLINK_ATTR_FMSG_NEST_END, << 520 DEVLINK_ATTR_FMSG_OBJ_NAME, << 521 DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE, << 522 DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA, << 523 << 524 DEVLINK_ATTR_HEALTH_REPORTER, << 525 DEVLINK_ATTR_HEALTH_REPORTER_NAME, << 526 DEVLINK_ATTR_HEALTH_REPORTER_STATE, << 527 DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT << 528 DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_C << 529 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS, << 530 DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_ << 531 DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECO << 532 << 533 DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME, << 534 DEVLINK_ATTR_FLASH_UPDATE_COMPONENT, << 535 DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG, << 536 DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE, << 537 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL << 538 << 539 DEVLINK_ATTR_PORT_PCI_PF_NUMBER, << 540 DEVLINK_ATTR_PORT_PCI_VF_NUMBER, << 541 << 542 DEVLINK_ATTR_STATS, << 543 << 544 DEVLINK_ATTR_TRAP_NAME, << 545 /* enum devlink_trap_action */ << 546 DEVLINK_ATTR_TRAP_ACTION, << 547 /* enum devlink_trap_type */ << 548 DEVLINK_ATTR_TRAP_TYPE, << 549 DEVLINK_ATTR_TRAP_GENERIC, << 550 DEVLINK_ATTR_TRAP_METADATA, << 551 DEVLINK_ATTR_TRAP_GROUP_NAME, << 552 << 553 DEVLINK_ATTR_RELOAD_FAILED, << 554 << 555 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_N << 556 << 557 DEVLINK_ATTR_NETNS_FD, << 558 DEVLINK_ATTR_NETNS_PID, << 559 DEVLINK_ATTR_NETNS_ID, << 560 << 561 DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP << 562 << 563 DEVLINK_ATTR_TRAP_POLICER_ID, << 564 DEVLINK_ATTR_TRAP_POLICER_RATE, << 565 DEVLINK_ATTR_TRAP_POLICER_BURST, << 566 << 567 DEVLINK_ATTR_PORT_FUNCTION, << 568 << 569 DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER, << 570 << 571 DEVLINK_ATTR_PORT_LANES, << 572 DEVLINK_ATTR_PORT_SPLITTABLE, << 573 << 574 DEVLINK_ATTR_PORT_EXTERNAL, << 575 DEVLINK_ATTR_PORT_CONTROLLER_NUMBER, << 576 << 577 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEO << 578 DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MA << 579 << 580 DEVLINK_ATTR_RELOAD_ACTION, << 581 DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED, << 582 DEVLINK_ATTR_RELOAD_LIMITS, << 583 << 584 DEVLINK_ATTR_DEV_STATS, << 585 DEVLINK_ATTR_RELOAD_STATS, << 586 DEVLINK_ATTR_RELOAD_STATS_ENTRY, << 587 DEVLINK_ATTR_RELOAD_STATS_LIMIT, << 588 DEVLINK_ATTR_RELOAD_STATS_VALUE, << 589 DEVLINK_ATTR_REMOTE_RELOAD_STATS, << 590 DEVLINK_ATTR_RELOAD_ACTION_INFO, << 591 DEVLINK_ATTR_RELOAD_ACTION_STATS, << 592 << 593 DEVLINK_ATTR_PORT_PCI_SF_NUMBER, << 594 << 595 DEVLINK_ATTR_RATE_TYPE, << 596 DEVLINK_ATTR_RATE_TX_SHARE, << 597 DEVLINK_ATTR_RATE_TX_MAX, << 598 DEVLINK_ATTR_RATE_NODE_NAME, << 599 DEVLINK_ATTR_RATE_PARENT_NODE_NAME, << 600 << 601 DEVLINK_ATTR_REGION_MAX_SNAPSHOTS, << 602 << 603 DEVLINK_ATTR_LINECARD_INDEX, << 604 DEVLINK_ATTR_LINECARD_STATE, << 605 DEVLINK_ATTR_LINECARD_TYPE, << 606 DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES, << 607 << 608 DEVLINK_ATTR_NESTED_DEVLINK, << 609 << 610 DEVLINK_ATTR_SELFTESTS, << 611 << 612 DEVLINK_ATTR_RATE_TX_PRIORITY, << 613 DEVLINK_ATTR_RATE_TX_WEIGHT, << 614 << 615 DEVLINK_ATTR_REGION_DIRECT, << 616 << 617 /* Add new attributes above here, upda << 618 * Documentation/netlink/specs/devlink << 619 * net/devlink/netlink_gen.c. << 620 */ << 621 242 622 __DEVLINK_ATTR_MAX, 243 __DEVLINK_ATTR_MAX, 623 DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX 244 DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1 624 }; 245 }; 625 246 626 /* Mapping between internal resource described 247 /* Mapping between internal resource described by the field and system 627 * structure 248 * structure 628 */ 249 */ 629 enum devlink_dpipe_field_mapping_type { 250 enum devlink_dpipe_field_mapping_type { 630 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE, 251 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE, 631 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFIND 252 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX, 632 }; 253 }; 633 254 634 /* Match type - specify the type of the match 255 /* Match type - specify the type of the match */ 635 enum devlink_dpipe_match_type { 256 enum devlink_dpipe_match_type { 636 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT, 257 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT, 637 }; 258 }; 638 259 639 /* Action type - specify the action type */ 260 /* Action type - specify the action type */ 640 enum devlink_dpipe_action_type { 261 enum devlink_dpipe_action_type { 641 DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY 262 DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY, 642 }; 263 }; 643 264 644 enum devlink_dpipe_field_ethernet_id { 265 enum devlink_dpipe_field_ethernet_id { 645 DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC, 266 DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC, 646 }; 267 }; 647 268 648 enum devlink_dpipe_field_ipv4_id { 269 enum devlink_dpipe_field_ipv4_id { 649 DEVLINK_DPIPE_FIELD_IPV4_DST_IP, 270 DEVLINK_DPIPE_FIELD_IPV4_DST_IP, 650 }; 271 }; 651 272 652 enum devlink_dpipe_field_ipv6_id { 273 enum devlink_dpipe_field_ipv6_id { 653 DEVLINK_DPIPE_FIELD_IPV6_DST_IP, 274 DEVLINK_DPIPE_FIELD_IPV6_DST_IP, 654 }; 275 }; 655 276 656 enum devlink_dpipe_header_id { 277 enum devlink_dpipe_header_id { 657 DEVLINK_DPIPE_HEADER_ETHERNET, 278 DEVLINK_DPIPE_HEADER_ETHERNET, 658 DEVLINK_DPIPE_HEADER_IPV4, 279 DEVLINK_DPIPE_HEADER_IPV4, 659 DEVLINK_DPIPE_HEADER_IPV6, 280 DEVLINK_DPIPE_HEADER_IPV6, 660 }; 281 }; 661 282 662 enum devlink_resource_unit { 283 enum devlink_resource_unit { 663 DEVLINK_RESOURCE_UNIT_ENTRY, 284 DEVLINK_RESOURCE_UNIT_ENTRY, 664 }; << 665 << 666 enum devlink_port_fn_attr_cap { << 667 DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT, << 668 DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BI << 669 DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_ << 670 DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_ << 671 << 672 /* Add new caps above */ << 673 __DEVLINK_PORT_FN_ATTR_CAPS_MAX, << 674 }; << 675 << 676 #define DEVLINK_PORT_FN_CAP_ROCE _BITUL(DEVLIN << 677 #define DEVLINK_PORT_FN_CAP_MIGRATABLE \ << 678 _BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRAT << 679 #define DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO _BITU << 680 #define DEVLINK_PORT_FN_CAP_IPSEC_PACKET _BITU << 681 << 682 enum devlink_port_function_attr { << 683 DEVLINK_PORT_FUNCTION_ATTR_UNSPEC, << 684 DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR, << 685 DEVLINK_PORT_FN_ATTR_STATE, /* u8 << 686 DEVLINK_PORT_FN_ATTR_OPSTATE, /* u8 << 687 DEVLINK_PORT_FN_ATTR_CAPS, /* bit << 688 DEVLINK_PORT_FN_ATTR_DEVLINK, /* nes << 689 DEVLINK_PORT_FN_ATTR_MAX_IO_EQS, << 690 << 691 __DEVLINK_PORT_FUNCTION_ATTR_MAX, << 692 DEVLINK_PORT_FUNCTION_ATTR_MAX = __DEV << 693 }; << 694 << 695 enum devlink_port_fn_state { << 696 DEVLINK_PORT_FN_STATE_INACTIVE, << 697 DEVLINK_PORT_FN_STATE_ACTIVE, << 698 }; << 699 << 700 /** << 701 * enum devlink_port_fn_opstate - indicates op << 702 * @DEVLINK_PORT_FN_OPSTATE_ATTACHED: Driver i << 703 * For graceful tear down of the function, aft << 704 * function, user should wait for operational << 705 * @DEVLINK_PORT_FN_OPSTATE_DETACHED: Driver i << 706 * It is safe to delete the port. << 707 */ << 708 enum devlink_port_fn_opstate { << 709 DEVLINK_PORT_FN_OPSTATE_DETACHED, << 710 DEVLINK_PORT_FN_OPSTATE_ATTACHED, << 711 }; 285 }; 712 286 713 #endif /* _UAPI_LINUX_DEVLINK_H_ */ 287 #endif /* _UAPI_LINUX_DEVLINK_H_ */ 714 288
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.