summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Eshenko <dmitriy.eshenko@accel-ppp.org>2024-05-31 22:27:39 +0300
committerGitHub <noreply@github.com>2024-05-31 22:27:39 +0300
commit997a942f7dc4c3161aab2cca920f4faa7c608d5e (patch)
treefb4dc97eb101629e707636d21ddc43a429890d84
parentbf7b43e7d10d2a5719438a27cb8a3400ce52e06e (diff)
parentbc85fe18e6066814d95d1bdc1a3dfe8cc8f9786f (diff)
downloadaccel-ppp-997a942f7dc4c3161aab2cca920f4faa7c608d5e.tar.gz
accel-ppp-997a942f7dc4c3161aab2cca920f4faa7c608d5e.zip
Merge pull request #144 from svlobanov/tbf-leaf-qdisc
shaper: add leaf-qdisc support for tbf rate-limiter
-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 {