summaryrefslogtreecommitdiff
path: root/src/core/cgroup.h
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2016-02-10 15:44:01 +0100
committerDaniel Mack <daniel@zonque.org>2016-02-10 16:38:56 +0100
commit50f48ad37aad99c54de4db34b07c3825cdedcf41 (patch)
treec0a07c9391acf5d1aa9968cd9e25eda9eab58785 /src/core/cgroup.h
parent16a798deb3b560f8b27848fe292a76b362c0b581 (diff)
cgroup: remove support for NetClass= directive
Support for net_cls.class_id through the NetClass= configuration directive has been added in v227 in preparation for a per-unit packet filter mechanism. However, it turns out the kernel people have decided to deprecate the net_cls and net_prio controllers in v2. Tejun provides a comprehensive justification for this in his commit, which has landed during the merge window for kernel v4.5: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bd1060a1d671 As we're aiming for full support for the v2 cgroup hierarchy, we can no longer support this feature. Userspace tool such as nftables are moving over to setting rules that are specific to the full cgroup path of a task, which obsoletes these controllers anyway. This commit removes support for tweaking details in the net_cls controller, but keeps the NetClass= directive around for legacy compatibility reasons.
Diffstat (limited to 'src/core/cgroup.h')
-rw-r--r--src/core/cgroup.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index 2157cffe9d..360bbca30f 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -24,11 +24,6 @@
#include "list.h"
#include "time-util.h"
-/* Maximum value for fixed (manual) net class ID assignment,
- * and also the value at which the range of automatic assignments starts
- */
-#define CGROUP_NETCLASS_FIXED_MAX UINT32_C(65535)
-
typedef struct CGroupContext CGroupContext;
typedef struct CGroupDeviceAllow CGroupDeviceAllow;
typedef struct CGroupBlockIODeviceWeight CGroupBlockIODeviceWeight;
@@ -50,17 +45,6 @@ typedef enum CGroupDevicePolicy {
_CGROUP_DEVICE_POLICY_INVALID = -1
} CGroupDevicePolicy;
-typedef enum CGroupNetClassType {
- /* Default - do not assign a net class */
- CGROUP_NETCLASS_TYPE_NONE,
-
- /* Automatically assign a net class */
- CGROUP_NETCLASS_TYPE_AUTO,
-
- /* Assign the net class that was provided by the user */
- CGROUP_NETCLASS_TYPE_FIXED,
-} CGroupNetClassType;
-
struct CGroupDeviceAllow {
LIST_FIELDS(CGroupDeviceAllow, device_allow);
char *path;
@@ -102,9 +86,6 @@ struct CGroupContext {
CGroupDevicePolicy device_policy;
LIST_HEAD(CGroupDeviceAllow, device_allow);
- CGroupNetClassType netclass_type;
- uint32_t netclass_id;
-
uint64_t tasks_max;
bool delegate;
@@ -116,7 +97,7 @@ struct CGroupContext {
void cgroup_context_init(CGroupContext *c);
void cgroup_context_done(CGroupContext *c);
void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix);
-void cgroup_context_apply(CGroupContext *c, CGroupMask mask, const char *path, uint32_t netclass_id, ManagerState state);
+void cgroup_context_apply(CGroupContext *c, CGroupMask mask, const char *path, ManagerState state);
CGroupMask cgroup_context_get_mask(CGroupContext *c);
@@ -144,9 +125,6 @@ int unit_watch_cgroup(Unit *u);
int unit_attach_pids_to_cgroup(Unit *u);
-int unit_add_to_netclass_cgroup(Unit *u);
-int unit_remove_from_netclass_cgroup(Unit *u);
-
int manager_setup_cgroup(Manager *m);
void manager_shutdown_cgroup(Manager *m, bool delete);