blob: 5de703c57ec16aff77b451b4ab4a53d5c17b841c [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 Ferris48af7cb2017-02-21 12:35:09 -080092enum devlink_eswitch_inline_mode {
Christopher Ferris49f525c2016-12-12 14:55:36 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080094 DEVLINK_ESWITCH_INLINE_MODE_NONE,
95 DEVLINK_ESWITCH_INLINE_MODE_LINK,
96 DEVLINK_ESWITCH_INLINE_MODE_NETWORK,
97 DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT,
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};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800100enum devlink_attr {
101 DEVLINK_ATTR_UNSPEC,
102 DEVLINK_ATTR_BUS_NAME,
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 DEVLINK_ATTR_DEV_NAME,
105 DEVLINK_ATTR_PORT_INDEX,
106 DEVLINK_ATTR_PORT_TYPE,
107 DEVLINK_ATTR_PORT_DESIRED_TYPE,
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 DEVLINK_ATTR_PORT_NETDEV_IFINDEX,
110 DEVLINK_ATTR_PORT_NETDEV_NAME,
111 DEVLINK_ATTR_PORT_IBDEV_NAME,
112 DEVLINK_ATTR_PORT_SPLIT_COUNT,
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 DEVLINK_ATTR_PORT_SPLIT_GROUP,
115 DEVLINK_ATTR_SB_INDEX,
116 DEVLINK_ATTR_SB_SIZE,
117 DEVLINK_ATTR_SB_INGRESS_POOL_COUNT,
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 DEVLINK_ATTR_SB_EGRESS_POOL_COUNT,
120 DEVLINK_ATTR_SB_INGRESS_TC_COUNT,
121 DEVLINK_ATTR_SB_EGRESS_TC_COUNT,
122 DEVLINK_ATTR_SB_POOL_INDEX,
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 DEVLINK_ATTR_SB_POOL_TYPE,
125 DEVLINK_ATTR_SB_POOL_SIZE,
126 DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE,
127 DEVLINK_ATTR_SB_THRESHOLD,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 DEVLINK_ATTR_SB_TC_INDEX,
130 DEVLINK_ATTR_SB_OCC_CUR,
131 DEVLINK_ATTR_SB_OCC_MAX,
132 DEVLINK_ATTR_ESWITCH_MODE,
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 DEVLINK_ATTR_ESWITCH_INLINE_MODE,
135 __DEVLINK_ATTR_MAX,
136 DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1
137};
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -0700139#endif