]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/tc/qdisc.h
network tc: Add support to conkfigure CoDel - Controlled-Delay Active Queue Managemen...
[thirdparty/systemd.git] / src / network / tc / qdisc.h
1 /* SPDX-License-Identifier: LGPL-2.1+
2 * Copyright © 2019 VMware, Inc. */
3 #pragma once
4
5 #include "conf-parser.h"
6 #include "fq-codel.h"
7 #include "netem.h"
8 #include "networkd-link.h"
9 #include "networkd-network.h"
10 #include "networkd-util.h"
11 #include "sfq.h"
12 #include "tbf.h"
13
14 typedef struct QDisc {
15 NetworkConfigSection *section;
16 Network *network;
17
18 Link *link;
19
20 int family;
21
22 uint32_t handle;
23 uint32_t parent;
24
25 char *tca_kind;
26 bool has_network_emulator:1;
27 bool has_token_buffer_filter:1;
28 bool has_stochastic_fairness_queueing:1;
29 bool has_fair_queuing_controlled_delay:1;
30
31 NetworkEmulator ne;
32 TokenBufferFilter tbf;
33 StochasticFairnessQueueing sfq;
34 FairQueuingControlledDelay fq_codel;
35 } QDisc;
36
37 void qdisc_free(QDisc *qdisc);
38 int qdisc_new_static(Network *network, const char *filename, unsigned section_line, QDisc **ret);
39
40 int qdisc_configure(Link *link, QDisc *qdisc);
41
42 int qdisc_section_verify(QDisc *qdisc, bool *has_root, bool *has_clsact);
43
44 DEFINE_NETWORK_SECTION_FUNCTIONS(QDisc, qdisc_free);
45
46 CONFIG_PARSER_PROTOTYPE(config_parse_tc_qdiscs_parent);