blob: 11886045529608a6ed379e96768fedf04abb1715 [file] [log] [blame]
Christopher Ferris106b3a82016-08-24 12:15:38 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_DEVLINK_H_
20#define _UAPI_LINUX_DEVLINK_H_
21#define DEVLINK_GENL_NAME "devlink"
22#define DEVLINK_GENL_VERSION 0x1
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
25enum devlink_command {
26 DEVLINK_CMD_UNSPEC,
27 DEVLINK_CMD_GET,
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 DEVLINK_CMD_SET,
30 DEVLINK_CMD_NEW,
31 DEVLINK_CMD_DEL,
32 DEVLINK_CMD_PORT_GET,
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 DEVLINK_CMD_PORT_SET,
35 DEVLINK_CMD_PORT_NEW,
36 DEVLINK_CMD_PORT_DEL,
37 DEVLINK_CMD_PORT_SPLIT,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 DEVLINK_CMD_PORT_UNSPLIT,
40 DEVLINK_CMD_SB_GET,
41 DEVLINK_CMD_SB_SET,
42 DEVLINK_CMD_SB_NEW,
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 DEVLINK_CMD_SB_DEL,
45 DEVLINK_CMD_SB_POOL_GET,
46 DEVLINK_CMD_SB_POOL_SET,
47 DEVLINK_CMD_SB_POOL_NEW,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 DEVLINK_CMD_SB_POOL_DEL,
50 DEVLINK_CMD_SB_PORT_POOL_GET,
51 DEVLINK_CMD_SB_PORT_POOL_SET,
52 DEVLINK_CMD_SB_PORT_POOL_NEW,
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 DEVLINK_CMD_SB_PORT_POOL_DEL,
55 DEVLINK_CMD_SB_TC_POOL_BIND_GET,
56 DEVLINK_CMD_SB_TC_POOL_BIND_SET,
57 DEVLINK_CMD_SB_TC_POOL_BIND_NEW,
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 DEVLINK_CMD_SB_TC_POOL_BIND_DEL,
60 DEVLINK_CMD_SB_OCC_SNAPSHOT,
61 DEVLINK_CMD_SB_OCC_MAX_CLEAR,
Christopher Ferris49f525c2016-12-12 14:55:36 -080062 DEVLINK_CMD_ESWITCH_MODE_GET,
Christopher Ferris106b3a82016-08-24 12:15:38 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -080064 DEVLINK_CMD_ESWITCH_MODE_SET,
65 __DEVLINK_CMD_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -070066 DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
67};
Christopher Ferris49f525c2016-12-12 14:55:36 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070069enum devlink_port_type {
70 DEVLINK_PORT_TYPE_NOTSET,
Christopher Ferris106b3a82016-08-24 12:15:38 -070071 DEVLINK_PORT_TYPE_AUTO,
72 DEVLINK_PORT_TYPE_ETH,
Christopher Ferris49f525c2016-12-12 14:55:36 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070074 DEVLINK_PORT_TYPE_IB,
75};
Christopher Ferris106b3a82016-08-24 12:15:38 -070076enum devlink_sb_pool_type {
77 DEVLINK_SB_POOL_TYPE_INGRESS,
Christopher Ferris49f525c2016-12-12 14:55:36 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070079 DEVLINK_SB_POOL_TYPE_EGRESS,
80};
Christopher Ferris106b3a82016-08-24 12:15:38 -070081enum devlink_sb_threshold_type {
82 DEVLINK_SB_THRESHOLD_TYPE_STATIC,
Christopher Ferris49f525c2016-12-12 14:55:36 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070084 DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC,
85};
Christopher Ferris106b3a82016-08-24 12:15:38 -070086#define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20
Christopher Ferris49f525c2016-12-12 14:55:36 -080087enum devlink_eswitch_mode {
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 DEVLINK_ESWITCH_MODE_LEGACY,
90 DEVLINK_ESWITCH_MODE_SWITCHDEV,
91};
Christopher Ferris106b3a82016-08-24 12:15:38 -070092enum devlink_attr {
Christopher Ferris49f525c2016-12-12 14:55:36 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070094 DEVLINK_ATTR_UNSPEC,
95 DEVLINK_ATTR_BUS_NAME,
Christopher Ferris106b3a82016-08-24 12:15:38 -070096 DEVLINK_ATTR_DEV_NAME,
97 DEVLINK_ATTR_PORT_INDEX,
Christopher Ferris49f525c2016-12-12 14:55:36 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070099 DEVLINK_ATTR_PORT_TYPE,
100 DEVLINK_ATTR_PORT_DESIRED_TYPE,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700101 DEVLINK_ATTR_PORT_NETDEV_IFINDEX,
102 DEVLINK_ATTR_PORT_NETDEV_NAME,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -0700104 DEVLINK_ATTR_PORT_IBDEV_NAME,
105 DEVLINK_ATTR_PORT_SPLIT_COUNT,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700106 DEVLINK_ATTR_PORT_SPLIT_GROUP,
107 DEVLINK_ATTR_SB_INDEX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -0700109 DEVLINK_ATTR_SB_SIZE,
110 DEVLINK_ATTR_SB_INGRESS_POOL_COUNT,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700111 DEVLINK_ATTR_SB_EGRESS_POOL_COUNT,
112 DEVLINK_ATTR_SB_INGRESS_TC_COUNT,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -0700114 DEVLINK_ATTR_SB_EGRESS_TC_COUNT,
115 DEVLINK_ATTR_SB_POOL_INDEX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700116 DEVLINK_ATTR_SB_POOL_TYPE,
117 DEVLINK_ATTR_SB_POOL_SIZE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -0700119 DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE,
120 DEVLINK_ATTR_SB_THRESHOLD,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700121 DEVLINK_ATTR_SB_TC_INDEX,
122 DEVLINK_ATTR_SB_OCC_CUR,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -0800124 DEVLINK_ATTR_SB_OCC_MAX,
125 DEVLINK_ATTR_ESWITCH_MODE,
126 __DEVLINK_ATTR_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700127 DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1
Christopher Ferris49f525c2016-12-12 14:55:36 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -0700129};
130#endif