sqm-scripts: change default for qdisc target parameter
Alan Jenkins noted a bug in the smq luci GUI that effectively
erased several configuration paramters if two checkboxes were deselected.
This behaviour seems consistent in luci but certainly has the potential
to confuse users. While confusion can not really be avoided generally
it seems wise to change the default interpretation for empty or non-existent
itarget and etarget variables from the qdisc's default (5ms in the case of
one of the codels) to automatic determination of tghis variable dependent on
the configured bandwidth, as codels target variable should be large enough
to contain at least one full packet. With this change sqm-scripts will
do the right thing by default, but will yet allow the user to specify
over-ridding values (as long as the user does not un-check the
entry-field exposing check boxes). Survives light testing...
This change set also changes the sqm-scripts luci gui to note the user
of the change. For compatibility with existing setups sqm-scripts
will still honor "auto" as an alternative explicit way of requesting
automatic target selection. This might turn into a warning in the future
and might be phased out...
Signed-off-by: Sebastian Moeller <moeller0@gmx.de>
ad2=s:taboption("tab_qdisc",Flag,"qdisc_really_really_advanced",translate("Show and Use Dangerous Configuration"))
ad2.default=false
ad2.rmempty=true
ad2:depends("qdisc_advanced","1")
@ -140,12 +140,12 @@ elim.rmempty = true
elim:depends("qdisc_really_really_advanced","1")
itarg=s:taboption("tab_qdisc",Value,"itarget",translate("Latency target for ingress, e.g 5ms [units: s, ms, or us]; leave empty for default, or auto for automatic selection."))
itarg=s:taboption("tab_qdisc",Value,"itarget",translate("Latency target for ingress, e.g 5ms [units: s, ms, or us]; leave empty for automatic selection, put in the word default for the qdisc's default."))
itarg.datatype="string"
itarg.rmempty=true
itarg:depends("qdisc_really_really_advanced","1")
etarg=s:taboption("tab_qdisc",Value,"etarget",translate("Latency target for egress, e.g. 5ms [units: s, ms, or us]; leave empty for default, or auto for automatic selection."))
etarg=s:taboption("tab_qdisc",Value,"etarget",translate("Latency target for egress, e.g. 5ms [units: s, ms, or us]; leave empty for automatic selection, put in the word default for the qdisc's default."))
[ -z "$AUTO_TARGET"]&& sqm_logger "${CUR_TARGET} is not a well formed tc target specifier; e.g.: 5ms (or s, us), or the string auto."
[ -z "$AUTO_TARGET"]&& sqm_logger "${CUR_TARGET} is not a well formed tc target specifier; e.g.: 5ms (or s, us), or one of the strings auto or default."