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