summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorSergey V. Lobanov <sergey@lobanov.in>2024-05-26 00:22:04 +0200
committerSergey V. Lobanov <sergey@lobanov.in>2024-05-26 00:22:04 +0200
commitbc85fe18e6066814d95d1bdc1a3dfe8cc8f9786f (patch)
tree8a6c93a6a77508f3c080b935c59989cc11a394a4 /accel-pppd
parent61fe62707c3eee66d9c228f7e0f2126575b83692 (diff)
downloadaccel-ppp-bc85fe18e6066814d95d1bdc1a3dfe8cc8f9786f.tar.gz
accel-ppp-bc85fe18e6066814d95d1bdc1a3dfe8cc8f9786f.zip
shaper: add leaf-qdisc support for tbf rate-limiter
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/accel-ppp.conf.52
-rw-r--r--accel-pppd/shaper/limiter.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/accel-ppp.conf.5 b/accel-pppd/accel-ppp.conf.5
index 1c7fb9fd..72376c35 100644
--- a/accel-pppd/accel-ppp.conf.5
+++ b/accel-pppd/accel-ppp.conf.5
@@ -1243,7 +1243,7 @@ Specifes upstream rate limiting method.
Specifies downstream rate limiting method. \fIclsact\fR is a policer
.TP
.BI "leaf-qdisc=" "qdisc parameters"
-In case if htb is used as up-limiter or down-limiter specified leaf qdisc can be attached automatically.
+In case if tbf is used as down-limiter or htb is used as up-limiter or down-limiter specified leaf qdisc can be attached automatically.
At present sfq and fq_codel qdiscs are implemented. Parameters are same as for tc:
.br
sfq [ limit NUMBER ] [ perturn SECS ] [ quantum BYTES ]
diff --git a/accel-pppd/shaper/limiter.c b/accel-pppd/shaper/limiter.c
index 5527a12c..647e03f5 100644
--- a/accel-pppd/shaper/limiter.c
+++ b/accel-pppd/shaper/limiter.c
@@ -554,6 +554,8 @@ int install_limiter(struct ap_session *ses, int down_speed, int down_burst, int
if (conf_down_limiter == LIM_TBF)
r = install_tbf(rth, ses->ifindex, down_speed, down_burst);
+ if (r == 0)
+ r = install_leaf_qdisc(rth, ses->ifindex, 0x00010000, 0x00020000);
else if (conf_down_limiter == LIM_CLSACT)
r = install_clsact(rth, ses->ifindex, down_speed, down_burst);
else {