1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add Cake Autorate

This commit is contained in:
Ycarus (Yannick Chabanois) 2022-06-16 19:28:25 +02:00
parent c4157bfc0f
commit b8c8658720
44 changed files with 8689 additions and 7 deletions

View file

@ -914,6 +914,7 @@
local upload = "0"
download = uci:get("network",ifname,"downloadspeed") or "0"
upload = uci:get("network",ifname,"uploadspeed") or "0"
cake = uci:get("sqm",ifname,"qdisc") or "cake"
--if download == "0" or upload == "0" then
-- if nixio.fs.access("/etc/init.d/sqm") then
-- download = uci:get("sqm",ifname,"download")
@ -940,11 +941,27 @@
<div class="cbi-value" data-index="16">
<label class="cbi-value-title"><%:Enable SQM%></label>
<div class="cbi-value-field">
<input class="cbi-input-checkbox" type="checkbox" name="cbid.sqm.<%=ifname%>.enabled" value="1" <% if uci:get("sqm",ifname,"enabled") == "1" then %>checked<% end %> />
<input class="cbi-input-checkbox" type="checkbox" name="cbid.sqm.<%=ifname%>.enabled" id="cbid.sqm.<%=ifname%>.enabled" value="1" <% if uci:get("sqm",ifname,"enabled") == "1" then %>checked<% end %> />
<br />
<div class="cbi-value-description">
<%:SQM control bufferloat: the undesirable latency that arises when the router buffers too much data.%>
<%:You should disable SQM for LTE or any interfaces with variable speed.%>
</div>
</div>
</div>
<div class="cbi-value" data-index="17">
<label class="cbi-value-title"><%:Enable SQM autorate%></label>
<div class="cbi-value-field">
<input class="cbi-input-checkbox" type="checkbox" name="cbid.sqm.<%=ifname%>.autorate" id="cbid.sqm.<%=ifname%>.autorate" value="1" <% if uci:get("sqm",ifname,"autorate") == "1" then %>checked<% end %> />
<br />
<div class="cbi-value-description">
<%:SQM autorate is for LTE and connection without a stable speed.%>
<%
if cake ~= "cake" then
%>
<%:Cake queue discipline is not set, autorate will only work after a reboot if enabled here.%>
<%
end
%>
</div>
</div>
</div>
@ -954,7 +971,7 @@
<%
if qos == "1" then
%>
<div class="cbi-value" data-index="16">
<div class="cbi-value" data-index="18">
<label class="cbi-value-title"><%:Enable QoS%></label>
<div class="cbi-value-field">
<input class="cbi-input-checkbox" type="checkbox" name="cbid.qos.<%=ifname%>.enabled" value="1" <% if uci:get("qos",ifname,"enabled") == "1" then %>checked<% end %> />
@ -967,7 +984,7 @@
<%
end
%>
<div class="cbi-value" data-index="17">
<div class="cbi-value" data-index="19">
<label class="cbi-value-title"><%:Download speed (Kb/s)%></label>
<div class="cbi-value-field">
<input type="text" name="cbid.sqm.<%=ifname%>.download" class="cbi-input-text" value="<%=download%>" data-type="uinteger">
@ -983,7 +1000,7 @@
-->
</div>
</div>
<div class="cbi-value" data-index="18">
<div class="cbi-value" data-index="20">
<label class="cbi-value-title"><%:Upload speed (Kb/s)%></label>
<div class="cbi-value-field">
<input type="text" name="cbid.sqm.<%=ifname%>.upload" class="cbi-input-text" value="<%=upload%>" data-type="uinteger">