summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
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/load-fragment.c
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/load-fragment.c')
-rw-r--r--src/core/load-fragment.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 8e5ef935f7..5a71fc0dda 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3122,47 +3122,6 @@ int config_parse_blockio_bandwidth(
return 0;
}
-int config_parse_netclass(
- const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
-
- CGroupContext *c = data;
- unsigned v;
- int r;
-
- assert(filename);
- assert(lvalue);
- assert(rvalue);
-
- if (streq(rvalue, "auto")) {
- c->netclass_type = CGROUP_NETCLASS_TYPE_AUTO;
- return 0;
- }
-
- r = safe_atou32(rvalue, &v);
- if (r < 0) {
- log_syntax(unit, LOG_ERR, filename, line, r, "Netclass '%s' invalid. Ignoring.", rvalue);
- return 0;
- }
-
- if (v > CGROUP_NETCLASS_FIXED_MAX)
- log_syntax(unit, LOG_ERR, filename, line, 0,
- "Fixed netclass %" PRIu32 " out of allowed range (0-%d). Applying anyway.", v, (uint32_t) CGROUP_NETCLASS_FIXED_MAX);
-
- c->netclass_id = v;
- c->netclass_type = CGROUP_NETCLASS_TYPE_FIXED;
-
- return 0;
-}
-
DEFINE_CONFIG_PARSE_ENUM(config_parse_job_mode, job_mode, JobMode, "Failed to parse job mode");
int config_parse_job_mode_isolate(