root/include/uapi/linux/devlink.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
   2 /*
   3  * include/uapi/linux/devlink.h - Network physical device Netlink interface
   4  * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
   5  * Copyright (c) 2016 Jiri Pirko <jiri@mellanox.com>
   6  *
   7  * This program is free software; you can redistribute it and/or modify
   8  * it under the terms of the GNU General Public License as published by
   9  * the Free Software Foundation; either version 2 of the License, or
  10  * (at your option) any later version.
  11  */
  12 
  13 #ifndef _UAPI_LINUX_DEVLINK_H_
  14 #define _UAPI_LINUX_DEVLINK_H_
  15 
  16 #define DEVLINK_GENL_NAME "devlink"
  17 #define DEVLINK_GENL_VERSION 0x1
  18 #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
  19 
  20 enum devlink_command {
  21         /* don't change the order or add anything between, this is ABI! */
  22         DEVLINK_CMD_UNSPEC,
  23 
  24         DEVLINK_CMD_GET,                /* can dump */
  25         DEVLINK_CMD_SET,
  26         DEVLINK_CMD_NEW,
  27         DEVLINK_CMD_DEL,
  28 
  29         DEVLINK_CMD_PORT_GET,           /* can dump */
  30         DEVLINK_CMD_PORT_SET,
  31         DEVLINK_CMD_PORT_NEW,
  32         DEVLINK_CMD_PORT_DEL,
  33 
  34         DEVLINK_CMD_PORT_SPLIT,
  35         DEVLINK_CMD_PORT_UNSPLIT,
  36 
  37         DEVLINK_CMD_SB_GET,             /* can dump */
  38         DEVLINK_CMD_SB_SET,
  39         DEVLINK_CMD_SB_NEW,
  40         DEVLINK_CMD_SB_DEL,
  41 
  42         DEVLINK_CMD_SB_POOL_GET,        /* can dump */
  43         DEVLINK_CMD_SB_POOL_SET,
  44         DEVLINK_CMD_SB_POOL_NEW,
  45         DEVLINK_CMD_SB_POOL_DEL,
  46 
  47         DEVLINK_CMD_SB_PORT_POOL_GET,   /* can dump */
  48         DEVLINK_CMD_SB_PORT_POOL_SET,
  49         DEVLINK_CMD_SB_PORT_POOL_NEW,
  50         DEVLINK_CMD_SB_PORT_POOL_DEL,
  51 
  52         DEVLINK_CMD_SB_TC_POOL_BIND_GET,        /* can dump */
  53         DEVLINK_CMD_SB_TC_POOL_BIND_SET,
  54         DEVLINK_CMD_SB_TC_POOL_BIND_NEW,
  55         DEVLINK_CMD_SB_TC_POOL_BIND_DEL,
  56 
  57         /* Shared buffer occupancy monitoring commands */
  58         DEVLINK_CMD_SB_OCC_SNAPSHOT,
  59         DEVLINK_CMD_SB_OCC_MAX_CLEAR,
  60 
  61         DEVLINK_CMD_ESWITCH_GET,
  62 #define DEVLINK_CMD_ESWITCH_MODE_GET /* obsolete, never use this! */ \
  63         DEVLINK_CMD_ESWITCH_GET
  64 
  65         DEVLINK_CMD_ESWITCH_SET,
  66 #define DEVLINK_CMD_ESWITCH_MODE_SET /* obsolete, never use this! */ \
  67         DEVLINK_CMD_ESWITCH_SET
  68 
  69         DEVLINK_CMD_DPIPE_TABLE_GET,
  70         DEVLINK_CMD_DPIPE_ENTRIES_GET,
  71         DEVLINK_CMD_DPIPE_HEADERS_GET,
  72         DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET,
  73         DEVLINK_CMD_RESOURCE_SET,
  74         DEVLINK_CMD_RESOURCE_DUMP,
  75 
  76         /* Hot driver reload, makes configuration changes take place. The
  77          * devlink instance is not released during the process.
  78          */
  79         DEVLINK_CMD_RELOAD,
  80 
  81         DEVLINK_CMD_PARAM_GET,          /* can dump */
  82         DEVLINK_CMD_PARAM_SET,
  83         DEVLINK_CMD_PARAM_NEW,
  84         DEVLINK_CMD_PARAM_DEL,
  85 
  86         DEVLINK_CMD_REGION_GET,
  87         DEVLINK_CMD_REGION_SET,
  88         DEVLINK_CMD_REGION_NEW,
  89         DEVLINK_CMD_REGION_DEL,
  90         DEVLINK_CMD_REGION_READ,
  91 
  92         DEVLINK_CMD_PORT_PARAM_GET,     /* can dump */
  93         DEVLINK_CMD_PORT_PARAM_SET,
  94         DEVLINK_CMD_PORT_PARAM_NEW,
  95         DEVLINK_CMD_PORT_PARAM_DEL,
  96 
  97         DEVLINK_CMD_INFO_GET,           /* can dump */
  98 
  99         DEVLINK_CMD_HEALTH_REPORTER_GET,
 100         DEVLINK_CMD_HEALTH_REPORTER_SET,
 101         DEVLINK_CMD_HEALTH_REPORTER_RECOVER,
 102         DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE,
 103         DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET,
 104         DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR,
 105 
 106         DEVLINK_CMD_FLASH_UPDATE,
 107         DEVLINK_CMD_FLASH_UPDATE_END,           /* notification only */
 108         DEVLINK_CMD_FLASH_UPDATE_STATUS,        /* notification only */
 109 
 110         DEVLINK_CMD_TRAP_GET,           /* can dump */
 111         DEVLINK_CMD_TRAP_SET,
 112         DEVLINK_CMD_TRAP_NEW,
 113         DEVLINK_CMD_TRAP_DEL,
 114 
 115         DEVLINK_CMD_TRAP_GROUP_GET,     /* can dump */
 116         DEVLINK_CMD_TRAP_GROUP_SET,
 117         DEVLINK_CMD_TRAP_GROUP_NEW,
 118         DEVLINK_CMD_TRAP_GROUP_DEL,
 119 
 120         /* add new commands above here */
 121         __DEVLINK_CMD_MAX,
 122         DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
 123 };
 124 
 125 enum devlink_port_type {
 126         DEVLINK_PORT_TYPE_NOTSET,
 127         DEVLINK_PORT_TYPE_AUTO,
 128         DEVLINK_PORT_TYPE_ETH,
 129         DEVLINK_PORT_TYPE_IB,
 130 };
 131 
 132 enum devlink_sb_pool_type {
 133         DEVLINK_SB_POOL_TYPE_INGRESS,
 134         DEVLINK_SB_POOL_TYPE_EGRESS,
 135 };
 136 
 137 /* static threshold - limiting the maximum number of bytes.
 138  * dynamic threshold - limiting the maximum number of bytes
 139  *   based on the currently available free space in the shared buffer pool.
 140  *   In this mode, the maximum quota is calculated based
 141  *   on the following formula:
 142  *     max_quota = alpha / (1 + alpha) * Free_Buffer
 143  *   While Free_Buffer is the amount of none-occupied buffer associated to
 144  *   the relevant pool.
 145  *   The value range which can be passed is 0-20 and serves
 146  *   for computation of alpha by following formula:
 147  *     alpha = 2 ^ (passed_value - 10)
 148  */
 149 
 150 enum devlink_sb_threshold_type {
 151         DEVLINK_SB_THRESHOLD_TYPE_STATIC,
 152         DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC,
 153 };
 154 
 155 #define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20
 156 
 157 enum devlink_eswitch_mode {
 158         DEVLINK_ESWITCH_MODE_LEGACY,
 159         DEVLINK_ESWITCH_MODE_SWITCHDEV,
 160 };
 161 
 162 enum devlink_eswitch_inline_mode {
 163         DEVLINK_ESWITCH_INLINE_MODE_NONE,
 164         DEVLINK_ESWITCH_INLINE_MODE_LINK,
 165         DEVLINK_ESWITCH_INLINE_MODE_NETWORK,
 166         DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT,
 167 };
 168 
 169 enum devlink_eswitch_encap_mode {
 170         DEVLINK_ESWITCH_ENCAP_MODE_NONE,
 171         DEVLINK_ESWITCH_ENCAP_MODE_BASIC,
 172 };
 173 
 174 enum devlink_port_flavour {
 175         DEVLINK_PORT_FLAVOUR_PHYSICAL, /* Any kind of a port physically
 176                                         * facing the user.
 177                                         */
 178         DEVLINK_PORT_FLAVOUR_CPU, /* CPU port */
 179         DEVLINK_PORT_FLAVOUR_DSA, /* Distributed switch architecture
 180                                    * interconnect port.
 181                                    */
 182         DEVLINK_PORT_FLAVOUR_PCI_PF, /* Represents eswitch port for
 183                                       * the PCI PF. It is an internal
 184                                       * port that faces the PCI PF.
 185                                       */
 186         DEVLINK_PORT_FLAVOUR_PCI_VF, /* Represents eswitch port
 187                                       * for the PCI VF. It is an internal
 188                                       * port that faces the PCI VF.
 189                                       */
 190 };
 191 
 192 enum devlink_param_cmode {
 193         DEVLINK_PARAM_CMODE_RUNTIME,
 194         DEVLINK_PARAM_CMODE_DRIVERINIT,
 195         DEVLINK_PARAM_CMODE_PERMANENT,
 196 
 197         /* Add new configuration modes above */
 198         __DEVLINK_PARAM_CMODE_MAX,
 199         DEVLINK_PARAM_CMODE_MAX = __DEVLINK_PARAM_CMODE_MAX - 1
 200 };
 201 
 202 enum devlink_param_fw_load_policy_value {
 203         DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER,
 204         DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
 205         DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK,
 206         DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN,
 207 };
 208 
 209 enum devlink_param_reset_dev_on_drv_probe_value {
 210         DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN,
 211         DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS,
 212         DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER,
 213         DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK,
 214 };
 215 
 216 enum {
 217         DEVLINK_ATTR_STATS_RX_PACKETS,          /* u64 */
 218         DEVLINK_ATTR_STATS_RX_BYTES,            /* u64 */
 219 
 220         __DEVLINK_ATTR_STATS_MAX,
 221         DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1
 222 };
 223 
 224 /**
 225  * enum devlink_trap_action - Packet trap action.
 226  * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
 227  *                            sent to the CPU.
 228  * @DEVLINK_TRAP_ACTION_TRAP: The sole copy of the packet is sent to the CPU.
 229  */
 230 enum devlink_trap_action {
 231         DEVLINK_TRAP_ACTION_DROP,
 232         DEVLINK_TRAP_ACTION_TRAP,
 233 };
 234 
 235 /**
 236  * enum devlink_trap_type - Packet trap type.
 237  * @DEVLINK_TRAP_TYPE_DROP: Trap reason is a drop. Trapped packets are only
 238  *                          processed by devlink and not injected to the
 239  *                          kernel's Rx path.
 240  * @DEVLINK_TRAP_TYPE_EXCEPTION: Trap reason is an exception. Packet was not
 241  *                               forwarded as intended due to an exception
 242  *                               (e.g., missing neighbour entry) and trapped to
 243  *                               control plane for resolution. Trapped packets
 244  *                               are processed by devlink and injected to
 245  *                               the kernel's Rx path.
 246  */
 247 enum devlink_trap_type {
 248         DEVLINK_TRAP_TYPE_DROP,
 249         DEVLINK_TRAP_TYPE_EXCEPTION,
 250 };
 251 
 252 enum {
 253         /* Trap can report input port as metadata */
 254         DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT,
 255 };
 256 
 257 enum devlink_attr {
 258         /* don't change the order or add anything between, this is ABI! */
 259         DEVLINK_ATTR_UNSPEC,
 260 
 261         /* bus name + dev name together are a handle for devlink entity */
 262         DEVLINK_ATTR_BUS_NAME,                  /* string */
 263         DEVLINK_ATTR_DEV_NAME,                  /* string */
 264 
 265         DEVLINK_ATTR_PORT_INDEX,                /* u32 */
 266         DEVLINK_ATTR_PORT_TYPE,                 /* u16 */
 267         DEVLINK_ATTR_PORT_DESIRED_TYPE,         /* u16 */
 268         DEVLINK_ATTR_PORT_NETDEV_IFINDEX,       /* u32 */
 269         DEVLINK_ATTR_PORT_NETDEV_NAME,          /* string */
 270         DEVLINK_ATTR_PORT_IBDEV_NAME,           /* string */
 271         DEVLINK_ATTR_PORT_SPLIT_COUNT,          /* u32 */
 272         DEVLINK_ATTR_PORT_SPLIT_GROUP,          /* u32 */
 273         DEVLINK_ATTR_SB_INDEX,                  /* u32 */
 274         DEVLINK_ATTR_SB_SIZE,                   /* u32 */
 275         DEVLINK_ATTR_SB_INGRESS_POOL_COUNT,     /* u16 */
 276         DEVLINK_ATTR_SB_EGRESS_POOL_COUNT,      /* u16 */
 277         DEVLINK_ATTR_SB_INGRESS_TC_COUNT,       /* u16 */
 278         DEVLINK_ATTR_SB_EGRESS_TC_COUNT,        /* u16 */
 279         DEVLINK_ATTR_SB_POOL_INDEX,             /* u16 */
 280         DEVLINK_ATTR_SB_POOL_TYPE,              /* u8 */
 281         DEVLINK_ATTR_SB_POOL_SIZE,              /* u32 */
 282         DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE,    /* u8 */
 283         DEVLINK_ATTR_SB_THRESHOLD,              /* u32 */
 284         DEVLINK_ATTR_SB_TC_INDEX,               /* u16 */
 285         DEVLINK_ATTR_SB_OCC_CUR,                /* u32 */
 286         DEVLINK_ATTR_SB_OCC_MAX,                /* u32 */
 287         DEVLINK_ATTR_ESWITCH_MODE,              /* u16 */
 288         DEVLINK_ATTR_ESWITCH_INLINE_MODE,       /* u8 */
 289 
 290         DEVLINK_ATTR_DPIPE_TABLES,              /* nested */
 291         DEVLINK_ATTR_DPIPE_TABLE,               /* nested */
 292         DEVLINK_ATTR_DPIPE_TABLE_NAME,          /* string */
 293         DEVLINK_ATTR_DPIPE_TABLE_SIZE,          /* u64 */
 294         DEVLINK_ATTR_DPIPE_TABLE_MATCHES,       /* nested */
 295         DEVLINK_ATTR_DPIPE_TABLE_ACTIONS,       /* nested */
 296         DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED,      /* u8 */
 297 
 298         DEVLINK_ATTR_DPIPE_ENTRIES,             /* nested */
 299         DEVLINK_ATTR_DPIPE_ENTRY,               /* nested */
 300         DEVLINK_ATTR_DPIPE_ENTRY_INDEX,         /* u64 */
 301         DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES,  /* nested */
 302         DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES, /* nested */
 303         DEVLINK_ATTR_DPIPE_ENTRY_COUNTER,       /* u64 */
 304 
 305         DEVLINK_ATTR_DPIPE_MATCH,               /* nested */
 306         DEVLINK_ATTR_DPIPE_MATCH_VALUE,         /* nested */
 307         DEVLINK_ATTR_DPIPE_MATCH_TYPE,          /* u32 */
 308 
 309         DEVLINK_ATTR_DPIPE_ACTION,              /* nested */
 310         DEVLINK_ATTR_DPIPE_ACTION_VALUE,        /* nested */
 311         DEVLINK_ATTR_DPIPE_ACTION_TYPE,         /* u32 */
 312 
 313         DEVLINK_ATTR_DPIPE_VALUE,
 314         DEVLINK_ATTR_DPIPE_VALUE_MASK,
 315         DEVLINK_ATTR_DPIPE_VALUE_MAPPING,       /* u32 */
 316 
 317         DEVLINK_ATTR_DPIPE_HEADERS,             /* nested */
 318         DEVLINK_ATTR_DPIPE_HEADER,              /* nested */
 319         DEVLINK_ATTR_DPIPE_HEADER_NAME,         /* string */
 320         DEVLINK_ATTR_DPIPE_HEADER_ID,           /* u32 */
 321         DEVLINK_ATTR_DPIPE_HEADER_FIELDS,       /* nested */
 322         DEVLINK_ATTR_DPIPE_HEADER_GLOBAL,       /* u8 */
 323         DEVLINK_ATTR_DPIPE_HEADER_INDEX,        /* u32 */
 324 
 325         DEVLINK_ATTR_DPIPE_FIELD,               /* nested */
 326         DEVLINK_ATTR_DPIPE_FIELD_NAME,          /* string */
 327         DEVLINK_ATTR_DPIPE_FIELD_ID,            /* u32 */
 328         DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH,      /* u32 */
 329         DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE,  /* u32 */
 330 
 331         DEVLINK_ATTR_PAD,
 332 
 333         DEVLINK_ATTR_ESWITCH_ENCAP_MODE,        /* u8 */
 334         DEVLINK_ATTR_RESOURCE_LIST,             /* nested */
 335         DEVLINK_ATTR_RESOURCE,                  /* nested */
 336         DEVLINK_ATTR_RESOURCE_NAME,             /* string */
 337         DEVLINK_ATTR_RESOURCE_ID,               /* u64 */
 338         DEVLINK_ATTR_RESOURCE_SIZE,             /* u64 */
 339         DEVLINK_ATTR_RESOURCE_SIZE_NEW,         /* u64 */
 340         DEVLINK_ATTR_RESOURCE_SIZE_VALID,       /* u8 */
 341         DEVLINK_ATTR_RESOURCE_SIZE_MIN,         /* u64 */
 342         DEVLINK_ATTR_RESOURCE_SIZE_MAX,         /* u64 */
 343         DEVLINK_ATTR_RESOURCE_SIZE_GRAN,        /* u64 */
 344         DEVLINK_ATTR_RESOURCE_UNIT,             /* u8 */
 345         DEVLINK_ATTR_RESOURCE_OCC,              /* u64 */
 346         DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID,   /* u64 */
 347         DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS,/* u64 */
 348 
 349         DEVLINK_ATTR_PORT_FLAVOUR,              /* u16 */
 350         DEVLINK_ATTR_PORT_NUMBER,               /* u32 */
 351         DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER, /* u32 */
 352 
 353         DEVLINK_ATTR_PARAM,                     /* nested */
 354         DEVLINK_ATTR_PARAM_NAME,                /* string */
 355         DEVLINK_ATTR_PARAM_GENERIC,             /* flag */
 356         DEVLINK_ATTR_PARAM_TYPE,                /* u8 */
 357         DEVLINK_ATTR_PARAM_VALUES_LIST,         /* nested */
 358         DEVLINK_ATTR_PARAM_VALUE,               /* nested */
 359         DEVLINK_ATTR_PARAM_VALUE_DATA,          /* dynamic */
 360         DEVLINK_ATTR_PARAM_VALUE_CMODE,         /* u8 */
 361 
 362         DEVLINK_ATTR_REGION_NAME,               /* string */
 363         DEVLINK_ATTR_REGION_SIZE,               /* u64 */
 364         DEVLINK_ATTR_REGION_SNAPSHOTS,          /* nested */
 365         DEVLINK_ATTR_REGION_SNAPSHOT,           /* nested */
 366         DEVLINK_ATTR_REGION_SNAPSHOT_ID,        /* u32 */
 367 
 368         DEVLINK_ATTR_REGION_CHUNKS,             /* nested */
 369         DEVLINK_ATTR_REGION_CHUNK,              /* nested */
 370         DEVLINK_ATTR_REGION_CHUNK_DATA,         /* binary */
 371         DEVLINK_ATTR_REGION_CHUNK_ADDR,         /* u64 */
 372         DEVLINK_ATTR_REGION_CHUNK_LEN,          /* u64 */
 373 
 374         DEVLINK_ATTR_INFO_DRIVER_NAME,          /* string */
 375         DEVLINK_ATTR_INFO_SERIAL_NUMBER,        /* string */
 376         DEVLINK_ATTR_INFO_VERSION_FIXED,        /* nested */
 377         DEVLINK_ATTR_INFO_VERSION_RUNNING,      /* nested */
 378         DEVLINK_ATTR_INFO_VERSION_STORED,       /* nested */
 379         DEVLINK_ATTR_INFO_VERSION_NAME,         /* string */
 380         DEVLINK_ATTR_INFO_VERSION_VALUE,        /* string */
 381 
 382         DEVLINK_ATTR_SB_POOL_CELL_SIZE,         /* u32 */
 383 
 384         DEVLINK_ATTR_FMSG,                      /* nested */
 385         DEVLINK_ATTR_FMSG_OBJ_NEST_START,       /* flag */
 386         DEVLINK_ATTR_FMSG_PAIR_NEST_START,      /* flag */
 387         DEVLINK_ATTR_FMSG_ARR_NEST_START,       /* flag */
 388         DEVLINK_ATTR_FMSG_NEST_END,             /* flag */
 389         DEVLINK_ATTR_FMSG_OBJ_NAME,             /* string */
 390         DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE,       /* u8 */
 391         DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA,       /* dynamic */
 392 
 393         DEVLINK_ATTR_HEALTH_REPORTER,                   /* nested */
 394         DEVLINK_ATTR_HEALTH_REPORTER_NAME,              /* string */
 395         DEVLINK_ATTR_HEALTH_REPORTER_STATE,             /* u8 */
 396         DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT,         /* u64 */
 397         DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT,     /* u64 */
 398         DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS,           /* u64 */
 399         DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD,   /* u64 */
 400         DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER,      /* u8 */
 401 
 402         DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME,    /* string */
 403         DEVLINK_ATTR_FLASH_UPDATE_COMPONENT,    /* string */
 404         DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG,   /* string */
 405         DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE,  /* u64 */
 406         DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL, /* u64 */
 407 
 408         DEVLINK_ATTR_PORT_PCI_PF_NUMBER,        /* u16 */
 409         DEVLINK_ATTR_PORT_PCI_VF_NUMBER,        /* u16 */
 410 
 411         DEVLINK_ATTR_STATS,                             /* nested */
 412 
 413         DEVLINK_ATTR_TRAP_NAME,                         /* string */
 414         /* enum devlink_trap_action */
 415         DEVLINK_ATTR_TRAP_ACTION,                       /* u8 */
 416         /* enum devlink_trap_type */
 417         DEVLINK_ATTR_TRAP_TYPE,                         /* u8 */
 418         DEVLINK_ATTR_TRAP_GENERIC,                      /* flag */
 419         DEVLINK_ATTR_TRAP_METADATA,                     /* nested */
 420         DEVLINK_ATTR_TRAP_GROUP_NAME,                   /* string */
 421 
 422         DEVLINK_ATTR_RELOAD_FAILED,                     /* u8 0 or 1 */
 423 
 424         DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS,        /* u64 */
 425         /* add new attributes above here, update the policy in devlink.c */
 426 
 427         __DEVLINK_ATTR_MAX,
 428         DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1
 429 };
 430 
 431 /* Mapping between internal resource described by the field and system
 432  * structure
 433  */
 434 enum devlink_dpipe_field_mapping_type {
 435         DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE,
 436         DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX,
 437 };
 438 
 439 /* Match type - specify the type of the match */
 440 enum devlink_dpipe_match_type {
 441         DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT,
 442 };
 443 
 444 /* Action type - specify the action type */
 445 enum devlink_dpipe_action_type {
 446         DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY,
 447 };
 448 
 449 enum devlink_dpipe_field_ethernet_id {
 450         DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC,
 451 };
 452 
 453 enum devlink_dpipe_field_ipv4_id {
 454         DEVLINK_DPIPE_FIELD_IPV4_DST_IP,
 455 };
 456 
 457 enum devlink_dpipe_field_ipv6_id {
 458         DEVLINK_DPIPE_FIELD_IPV6_DST_IP,
 459 };
 460 
 461 enum devlink_dpipe_header_id {
 462         DEVLINK_DPIPE_HEADER_ETHERNET,
 463         DEVLINK_DPIPE_HEADER_IPV4,
 464         DEVLINK_DPIPE_HEADER_IPV6,
 465 };
 466 
 467 enum devlink_resource_unit {
 468         DEVLINK_RESOURCE_UNIT_ENTRY,
 469 };
 470 
 471 #endif /* _UAPI_LINUX_DEVLINK_H_ */

/* [<][>][^][v][top][bottom][index][help] */