1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2 /* Do not edit directly, auto-generated from: */
3 /*	Documentation/netlink/specs/net_shaper.yaml */
4 /* YNL-GEN uapi header */
5 
6 #ifndef _UAPI_LINUX_NET_SHAPER_H
7 #define _UAPI_LINUX_NET_SHAPER_H
8 
9 #define NET_SHAPER_FAMILY_NAME		"net-shaper"
10 #define NET_SHAPER_FAMILY_VERSION	1
11 
12 /**
13  * enum net_shaper_scope - Defines the shaper @id interpretation.
14  * @NET_SHAPER_SCOPE_UNSPEC: The scope is not specified.
15  * @NET_SHAPER_SCOPE_NETDEV: The main shaper for the given network device.
16  * @NET_SHAPER_SCOPE_QUEUE: The shaper is attached to the given device queue,
17  *   the @id represents the queue number.
18  * @NET_SHAPER_SCOPE_NODE: The shaper allows grouping of queues or other node
19  *   shapers; can be nested in either @netdev shapers or other @node shapers,
20  *   allowing placement in any location of the scheduling tree, except leaves
21  *   and root.
22  */
23 enum net_shaper_scope {
24 	NET_SHAPER_SCOPE_UNSPEC,
25 	NET_SHAPER_SCOPE_NETDEV,
26 	NET_SHAPER_SCOPE_QUEUE,
27 	NET_SHAPER_SCOPE_NODE,
28 
29 	/* private: */
30 	__NET_SHAPER_SCOPE_MAX,
31 	NET_SHAPER_SCOPE_MAX = (__NET_SHAPER_SCOPE_MAX - 1)
32 };
33 
34 /**
35  * enum net_shaper_metric - Different metric supported by the shaper.
36  * @NET_SHAPER_METRIC_BPS: Shaper operates on a bits per second basis.
37  * @NET_SHAPER_METRIC_PPS: Shaper operates on a packets per second basis.
38  */
39 enum net_shaper_metric {
40 	NET_SHAPER_METRIC_BPS,
41 	NET_SHAPER_METRIC_PPS,
42 };
43 
44 enum {
45 	NET_SHAPER_A_HANDLE = 1,
46 	NET_SHAPER_A_METRIC,
47 	NET_SHAPER_A_BW_MIN,
48 	NET_SHAPER_A_BW_MAX,
49 	NET_SHAPER_A_BURST,
50 	NET_SHAPER_A_PRIORITY,
51 	NET_SHAPER_A_WEIGHT,
52 	NET_SHAPER_A_IFINDEX,
53 	NET_SHAPER_A_PARENT,
54 	NET_SHAPER_A_LEAVES,
55 
56 	__NET_SHAPER_A_MAX,
57 	NET_SHAPER_A_MAX = (__NET_SHAPER_A_MAX - 1)
58 };
59 
60 enum {
61 	NET_SHAPER_A_HANDLE_SCOPE = 1,
62 	NET_SHAPER_A_HANDLE_ID,
63 
64 	__NET_SHAPER_A_HANDLE_MAX,
65 	NET_SHAPER_A_HANDLE_MAX = (__NET_SHAPER_A_HANDLE_MAX - 1)
66 };
67 
68 enum {
69 	NET_SHAPER_A_CAPS_IFINDEX = 1,
70 	NET_SHAPER_A_CAPS_SCOPE,
71 	NET_SHAPER_A_CAPS_SUPPORT_METRIC_BPS,
72 	NET_SHAPER_A_CAPS_SUPPORT_METRIC_PPS,
73 	NET_SHAPER_A_CAPS_SUPPORT_NESTING,
74 	NET_SHAPER_A_CAPS_SUPPORT_BW_MIN,
75 	NET_SHAPER_A_CAPS_SUPPORT_BW_MAX,
76 	NET_SHAPER_A_CAPS_SUPPORT_BURST,
77 	NET_SHAPER_A_CAPS_SUPPORT_PRIORITY,
78 	NET_SHAPER_A_CAPS_SUPPORT_WEIGHT,
79 
80 	__NET_SHAPER_A_CAPS_MAX,
81 	NET_SHAPER_A_CAPS_MAX = (__NET_SHAPER_A_CAPS_MAX - 1)
82 };
83 
84 enum {
85 	NET_SHAPER_CMD_GET = 1,
86 	NET_SHAPER_CMD_SET,
87 	NET_SHAPER_CMD_DELETE,
88 	NET_SHAPER_CMD_GROUP,
89 	NET_SHAPER_CMD_CAP_GET,
90 
91 	__NET_SHAPER_CMD_MAX,
92 	NET_SHAPER_CMD_MAX = (__NET_SHAPER_CMD_MAX - 1)
93 };
94 
95 #endif /* _UAPI_LINUX_NET_SHAPER_H */
96