Skip to content

Commit 87efee8

Browse files
committed
Set qdisc to fq_codel when algorithm is bbr
1 parent 43d80c6 commit 87efee8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

module/service.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ EOF
6363
fi
6464
}
6565

66+
set_qdisc() {
67+
local iface="$1"
68+
local qdisc="$2"
69+
if run_as_su "tc qdisc replace dev $iface root $qdisc"; then
70+
log_print "Applied qdisc: $qdisc ($iface)"
71+
else
72+
log_print "Failed to apply qdisc: $qdisc ($iface)"
73+
fi
74+
}
75+
6676
set_congestion() {
6777
local algo="$1"
6878
local mode="$2"
@@ -87,6 +97,9 @@ apply_wifi_settings() {
8797
for algo in $congestion_algorithms; do
8898
if [ -f "$MODPATH/wlan_$algo" ]; then
8999
set_congestion "$algo" "Wi-Fi"
100+
if [ "$algo" = "bbr" ]; then
101+
set_qdisc "$iface" "fq_codel"
102+
fi
90103
set_max_initcwnd_initrwnd "$iface"
91104
applied=1
92105
break
@@ -102,6 +115,9 @@ apply_cellular_settings() {
102115
for algo in $congestion_algorithms; do
103116
if [ -f "$MODPATH/rmnet_data_$algo" ]; then
104117
set_congestion "$algo" "Cellular"
118+
if [ "$algo" = "bbr" ]; then
119+
set_qdisc "$iface" "fq_codel"
120+
fi
105121
set_max_initcwnd_initrwnd "$iface"
106122
applied=1
107123
break

0 commit comments

Comments
 (0)