Missing cake in luci-sqm

I'm using 19.0.7.2 at the current 19.07.2 HEAD with iproute2 full

My luci-app-sqm module is showing only fq_codel in the dropdown list of available queuing disciplines, despite the relevant kernel modules being present and being listed in /var/run/sqm/available_qdiscs

Has anyone seen this before or have a suggestion as to what might be causing it? See the last piece of output below, which clearly indicates that there's something missing, although as usual tc is not very eloquent about the reason

root@OpenWrt:/# lsmod | grep ^sch_
sch_cake               32768  0 
sch_codel              16384  0 
sch_dsmark             16384  0 
sch_fq                 20480  0 
sch_gred               20480  0 
sch_hfsc               24576  0 
sch_htb                24576  0 
sch_ingress            16384  0 
sch_multiq             16384  0 
sch_pie                16384  0 
sch_prio               16384  0 
sch_red                16384  0 
sch_sfq                24576  0 
sch_tbf                16384  0 
sch_teql               16384  0 
root@OpenWrt:/# 
root@OpenWrt:/# ls -l /var/run/sqm/available_qdiscs/
-rw-------    1 root     root             0 Apr  1 03:41 cake
-rw-------    1 root     root             0 Apr  1 03:41 codel
-rw-------    1 root     root             0 Apr  1 03:41 fq_codel
-rw-------    1 root     root             0 Apr  1 03:41 pie
-rw-------    1 root     root             0 Apr  1 03:41 sfq
root@OpenWrt:/# 
root@OpenWrt:/# opkg list-installed | grep ip-full
ip-full - 5.0.0-2.1
root@OpenWrt:/# opkg list-installed | grep "^tc "
tc - 5.0.0-2.1
root@OpenWrt:/#
root@OpenWrt:/# tc -s qdisc show dev eth0
qdisc mq 0: root 
 Sent 650719858 bytes 2643611 pkt (dropped 0, overlimits 0 requeues 13) 
 backlog 0b 0p requeues 13
qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 2013158 bytes 20604 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 177226078 bytes 912897 pkt (dropped 0, overlimits 0 requeues 2) 
 backlog 0b 0p requeues 2
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 253212198 bytes 949920 pkt (dropped 0, overlimits 0 requeues 4) 
 backlog 0b 0p requeues 4
  maxpacket 1392 drop_overlimit 0 new_flow_count 2 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 218268424 bytes 760190 pkt (dropped 0, overlimits 0 requeues 7) 
 backlog 0b 0p requeues 7
  maxpacket 3052 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 0 old_flows_len 0
root@OpenWrt:/# 
root@OpenWrt:/# tc qdisc del dev eth0 root
RTNETLINK answers: No such file or directory
root@OpenWrt:/# 

Yes, I've seen it before when going to luci-sqm right after installing luci-app-sqm, if that's the case a reboot will most likely bring it back.

Unfortunately the problem has persisted across multiple reboots...

I'm running my own build (not 19.07.2) and while I don't normally use sqm I have it installed and just checked and mine's not showing cake either, maybe @moeller0 might have an idea of the problem.

Oh, and cake appears to be working, since I can manually replace the fq_codel qdiscs with cake

root@OpenWrt:/usr/lib/sqm# tc qdisc list
qdisc noqueue 0: dev lo root refcnt 2 
qdisc cake 8016: dev eth0 root refcnt 9 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0 
qdisc cake 8017: dev eth1 root refcnt 9 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0 
qdisc cake 8018: dev eth3 root refcnt 9 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0 
qdisc noqueue 0: dev bond0 root refcnt 2 
qdisc noqueue 0: dev br-guest root refcnt 2 
qdisc noqueue 0: dev eth3.5 root refcnt 2 
qdisc noqueue 0: dev br-lan root refcnt 2 
qdisc noqueue 0: dev eth1.101 root refcnt 2 
qdisc cake 8019: dev pppoe-wan2 root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0
root@OpenWrt:/usr/lib/sqm# tc -s qdisc show
qdisc noqueue 0: dev lo root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 8016: dev eth0 root refcnt 9 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0 
 Sent 84461664 bytes 132821 pkt (dropped 0, overlimits 0 requeues 1) 
 backlog 0b 0p requeues 1
 memory used: 26812b of 15140Kb
 capacity estimate: 0bit
 min/max network layer size:           42 /    1514
 min/max overhead-adjusted size:       42 /    1514
 average network hdr offset:           14

                   Bulk  Best Effort        Voice
  thresh           0bit         0bit         0bit
  target          5.0ms        5.0ms        5.0ms
  interval      100.0ms      100.0ms      100.0ms
  pk_delay          0us         14us          6us
  av_delay          0us          5us          0us
  sp_delay          0us          3us          0us
  backlog            0b           0b           0b
  pkts                0       132791           30
  bytes               0     84460308         1356
  way_inds            0            1            0
  way_miss            0          480            3
  way_cols            0            0            0
  drops               0            0            0
  marks               0            0            0
  ack_drop            0            0            0
  sp_flows            0            2            1
  bk_flows            0            1            0
  un_flows            0            0            0
  max_len             0        18168           90
  quantum          1514         1514         1514

Could you check the checkbox labeled "Create log file for this SQM instance under /var/run/sqm/${Interface_name}.[start|stop]-sqm.log." and stop and start sqm and copy and paste the two log files this creates, please? Maybe this gives some clues what is going on.
Both on OpenWrt SNAPSHOT, r12752-258f070d1a, and on TurrisOS 5.0.0, Turris Omnia (should be close to OpenWrt 19.07.02) I see both fq_codel and cake in the drop down box and have configured working layer_cake.qos instances. No idea what is/was going wrong (except I am not using ip-full I believe).

I was actually in the process of doing some debug tracing, so I have the files with tracing set on.

I decided to ignore the luci app, given that I could manually replace the fq_codel with cake, and create an initial "first guess" /etc/config/sqm by hand to see if it worked, which it appears to do. I edited the config file originally generated by luci.

I have two internet links. The first is a 400mbps down / 38 mbps up DOCSIS 3 connection using a bridged cable modem onto my eth0 interface.

The second is a bridged pppoe 55mbps down / 20 mbps up connection via a VDSL2+ FTTC connection.

I enabled tracing verbosity and rebooted. It appears on the face of it that it actually does enable cake, although to what extent it has completed all the setup correctly, I'm not sure. A quick and dirty check with a speed test that measures buffer bloat seems to indicate it is working, as does the qdisc output.

However, going to the luci gui, it replaces cake with fq_codel and will overwrite the explicitly configured cake in the config file if I save it.

/etc/config/sqm


config queue
	option debug_logging '1'
	option enabled '1'
	option interface 'eth0'
	option script 'layer_cake.qos'
	option linklayer 'ethernet'
	option overhead '18'
	option download '402000'
	option upload '38000'
	option ingress_ecn 'ECN'
	option egress_ecn 'ECN'
	option qdisc_advanced '1'
	option linklayer_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'mpu 64'
	option eqdisc_opts 'mpu 64'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '64'
	option linklayer_adaptation_mechanism 'cake'
	option qdisc 'cake'
	option verbosity '10'

config queue
	option debug_logging '1'
	option enabled '1'
	option interface 'pppoe-wan2'
	option script 'layer_cake.qos'
	option linklayer 'atm'
	option overhead '8'
	option download '55000'
	option upload '20000'
	option ingress_ecn 'ECN'
	option egress_ecn 'ECN'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'mpu 64'
	option eqdisc_opts 'mpu 64'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '64'
	option linklayer_adaptation_mechanism 'cake'
	option verbosity '10'
	option qdisc 'cake'

/var/run/sqm/eth0.start-sqm.log

start-sqm: Log for interface eth0: Wed Apr  1 22:03:05 BST 2020

Wed Apr  1 22:03:05 BST 2020: Starting.
Starting SQM script: layer_cake.qos on eth0, in: 402000 Kbps, out: 38000 Kbps
fn_exists: function candidate name: sqm_start
fn_exists: TYPE_OUTPUT: sqm_start: not found
fn_exists: return value: 1
Using generic sqm_start_default function.
fn_exists: function candidate name: sqm_prepare_script
fn_exists: TYPE_OUTPUT: sqm_prepare_script is a function
fn_exists: return value: 0
sqm_start_default: starting sqm_prepare_script
cmd_wrapper: COMMAND: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
QDISC cake is useable.
cmd_wrapper: COMMAND: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: COMMAND: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
QDISC cake is useable.
cmd_wrapper: COMMAND: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: COMMAND: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
sqm_start_default: Starting layer_cake.qos
ifb associated with interface eth0: 
Currently no ifb is associated with eth0, this is normal during starting of the sqm system.
cmd_wrapper: COMMAND: /sbin/ip link add name ifb4eth0 type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name ifb4eth0 type ifb
fn_exists: function candidate name: egress
fn_exists: TYPE_OUTPUT: egress is a function
fn_exists: return value: 0
cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev eth0 root
cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0 root
cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
cake link layer adjustments:  overhead 18 mpu 64
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc add dev eth0 root cake bandwidth 38000kbit overhead 18 mpu 64 diffserv3 mpu 64
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0 root cake bandwidth 38000kbit overhead 18 mpu 64 diffserv3 mpu 64
sqm_start_default: egress shaping activated
cmd_wrapper: COMMAND: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
QDISC ingress is useable.
cmd_wrapper: COMMAND: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: COMMAND: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
fn_exists: function candidate name: ingress
fn_exists: TYPE_OUTPUT: ingress is a function
fn_exists: return value: 0
cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev eth0 handle ffff: ingress
cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0 handle ffff: ingress
cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Invalid argument
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc add dev eth0 handle ffff: ingress
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0 handle ffff: ingress
cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev ifb4eth0 root
cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev ifb4eth0 root
cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
cake link layer adjustments:  overhead 18 mpu 64
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc add dev ifb4eth0 root cake bandwidth 402000kbit overhead 18 mpu 64 diffserv3 besteffort wash mpu 64
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev ifb4eth0 root cake bandwidth 402000kbit overhead 18 mpu 64 diffserv3 besteffort wash mpu 64
cmd_wrapper: COMMAND: /sbin/ip link set dev ifb4eth0 up
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4eth0 up
cmd_wrapper: COMMAND: /usr/sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4eth0
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4eth0
sqm_start_default: ingress shaping activated
layer_cake.qos was started on eth0 successfully

/var/run/sqm/pppoe-wan2.start-sqm.log

start-sqm: Log for interface pppoe-wan2: Wed Apr  1 22:03:05 BST 2020

Wed Apr  1 22:03:05 BST 2020: Starting.
Starting SQM script: layer_cake.qos on pppoe-wan2, in: 55000 Kbps, out: 20000 Kbps
fn_exists: function candidate name: sqm_start
fn_exists: TYPE_OUTPUT: sqm_start: not found
fn_exists: return value: 1
Using generic sqm_start_default function.
fn_exists: function candidate name: sqm_prepare_script
fn_exists: TYPE_OUTPUT: sqm_prepare_script is a function
fn_exists: return value: 0
sqm_start_default: starting sqm_prepare_script
cmd_wrapper: COMMAND: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
QDISC cake is useable.
cmd_wrapper: COMMAND: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: COMMAND: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
QDISC cake is useable.
cmd_wrapper: COMMAND: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: COMMAND: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
sqm_start_default: Starting layer_cake.qos
ifb associated with interface pppoe-wan2: 
Currently no ifb is associated with pppoe-wan2, this is normal during starting of the sqm system.
cmd_wrapper: COMMAND: /sbin/ip link add name ifb4pppoe-wan2 type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name ifb4pppoe-wan2 type ifb
fn_exists: function candidate name: egress
fn_exists: TYPE_OUTPUT: egress is a function
fn_exists: return value: 0
cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev pppoe-wan2 root
cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev pppoe-wan2 root
cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
cake link layer adjustments: atm overhead 8 mpu 64
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc add dev pppoe-wan2 root cake bandwidth 20000kbit atm overhead 8 mpu 64 diffserv3 mpu 64
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev pppoe-wan2 root cake bandwidth 20000kbit atm overhead 8 mpu 64 diffserv3 mpu 64
sqm_start_default: egress shaping activated
cmd_wrapper: COMMAND: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
QDISC ingress is useable.
cmd_wrapper: COMMAND: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
cmd_wrapper: COMMAND: /sbin/ip link delete TMP_IFB_4_SQM type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
fn_exists: function candidate name: ingress
fn_exists: TYPE_OUTPUT: ingress is a function
fn_exists: return value: 0
cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev pppoe-wan2 handle ffff: ingress
cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev pppoe-wan2 handle ffff: ingress
cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Invalid argument
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc add dev pppoe-wan2 handle ffff: ingress
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev pppoe-wan2 handle ffff: ingress
cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev ifb4pppoe-wan2 root
cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev ifb4pppoe-wan2 root
cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
cake link layer adjustments: atm overhead 8 mpu 64
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc add dev ifb4pppoe-wan2 root cake bandwidth 55000kbit atm overhead 8 mpu 64 diffserv3 besteffort wash mpu 64
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev ifb4pppoe-wan2 root cake bandwidth 55000kbit atm overhead 8 mpu 64 diffserv3 besteffort wash mpu 64
cmd_wrapper: COMMAND: /sbin/ip link set dev ifb4pppoe-wan2 up
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4pppoe-wan2 up
cmd_wrapper: COMMAND: /usr/sbin/tc filter add dev pppoe-wan2 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4pppoe-wan2
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc filter add dev pppoe-wan2 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4pppoe-wan2
sqm_start_default: ingress shaping activated
layer_cake.qos was started on pppoe-wan2 successfully

/var/run/sqm/eth0.stop-sqm.log

stop-sqm: Log for interface eth0: Wed Apr  1 22:29:42 BST 2020
  
Wed Apr  1 22:29:42 BST 2020: Stopping.
Stopping SQM on eth0
ifb associated with interface eth0: ifb4eth0
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev eth0 ingress
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev eth0 ingress
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev eth0 root
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev eth0 root
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev ifb4eth0 root
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev ifb4eth0 root
/usr/lib/sqm/stop-sqm: ifb4eth0 shaper deleted
cmd_wrapper: COMMAND: /sbin/ip link set dev ifb4eth0 down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4eth0 down
cmd_wrapper: COMMAND: /sbin/ip link delete ifb4eth0 type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete ifb4eth0 type ifb
/usr/lib/sqm/stop-sqm: ifb4eth0 interface deleted

/var/run/sqm/pppoe-wan2.stop-sqm.log

stop-sqm: Log for interface pppoe-wan2: Wed Apr  1 22:29:42 BST 2020
  
Wed Apr  1 22:29:42 BST 2020: Stopping.
Stopping SQM on pppoe-wan2
ifb associated with interface pppoe-wan2: ifb4pppoe-wan2
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev pppoe-wan2 ingress
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev pppoe-wan2 ingress
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev pppoe-wan2 root
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev pppoe-wan2 root
cmd_wrapper: COMMAND: /usr/sbin/tc qdisc del dev ifb4pppoe-wan2 root
cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc del dev ifb4pppoe-wan2 root
/usr/lib/sqm/stop-sqm: ifb4pppoe-wan2 shaper deleted
cmd_wrapper: COMMAND: /sbin/ip link set dev ifb4pppoe-wan2 down
cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4pppoe-wan2 down
cmd_wrapper: COMMAND: /sbin/ip link delete ifb4pppoe-wan2 type ifb
cmd_wrapper: ip: SUCCESS: /sbin/ip link delete ifb4pppoe-wan2 type ifb
/usr/lib/sqm/stop-sqm: ifb4pppoe-wan2 interface deleted

tc -s qdisc show

Just to help understand the output, eth0 is connected to my cable modem and picks up its IP by DHCP.
eth1 is the physical interface connected to the VDSL modem. It in turn has a software VLAN 101 (eth1.101) bridged to the modem for the pppoe connection.

qdisc noqueue 0: dev lo root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 8017: dev eth0 root refcnt 9 bandwidth 38Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 18 mpu 64 
 Sent 193797694 bytes 464808 pkt (dropped 2731, overlimits 546585 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 252820b of 4Mb
 capacity estimate: 38Mbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:       64 /    1518
 average network hdr offset:           14

                   Bulk  Best Effort        Voice
  thresh       2375Kbit       38Mbit     9500Kbit
  target          7.6ms        5.0ms        5.0ms
  interval      102.6ms      100.0ms      100.0ms
  pk_delay          0us        256us        113us
  av_delay          0us         74us          3us
  sp_delay          0us          3us          2us
  backlog            0b           0b           0b
  pkts                0       467466           73
  bytes               0    197920555         6442
  way_inds            0          167            0
  way_miss            0          435            4
  way_cols            0            0            0
  drops               0         2731            0
  marks               0            0            0
  ack_drop            0            0            0
  sp_flows            0            1            0
  bk_flows            0            1            0
  un_flows            0            0            0
  max_len             0        17054          110
  quantum           300         1159          300

qdisc ingress ffff: dev eth0 parent ffff:fff1 ---------------- 
 Sent 1210419868 bytes 911176 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth1 root 
 Sent 451020 bytes 3958 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth1 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 13328 bytes 196 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 136468 bytes 1023 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 142340 bytes 1034 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 158884 bytes 1705 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth3 root 
 Sent 1261523671 bytes 926571 pkt (dropped 0, overlimits 0 requeues 9) 
 backlog 0b 0p requeues 9
qdisc fq_codel 0: dev eth3 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 397555 bytes 757 pkt (dropped 0, overlimits 0 requeues 1) 
 backlog 0b 0p requeues 1
  maxpacket 117 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 360000202 bytes 268246 pkt (dropped 0, overlimits 0 requeues 3) 
 backlog 0b 0p requeues 3
  maxpacket 1514 drop_overlimit 0 new_flow_count 2 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 562101325 bytes 398852 pkt (dropped 0, overlimits 0 requeues 3) 
 backlog 0b 0p requeues 3
  maxpacket 1514 drop_overlimit 0 new_flow_count 8 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 339024589 bytes 258716 pkt (dropped 0, overlimits 0 requeues 2) 
 backlog 0b 0p requeues 2
  maxpacket 1514 drop_overlimit 0 new_flow_count 2 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev bond0 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-guest root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth3.5 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-lan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth1.101 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 801b: dev pppoe-wan2 root refcnt 2 bandwidth 20Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms atm overhead 8 mpu 64 
 Sent 147707 bytes 1303 pkt (dropped 0, overlimits 18 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 4608b of 4Mb
 capacity estimate: 20Mbit
 min/max network layer size:           53 /     568
 min/max overhead-adjusted size:      106 /     636
 average network hdr offset:            0

                   Bulk  Best Effort        Voice
  thresh       1250Kbit       20Mbit        5Mbit
  target         14.5ms        5.0ms        5.0ms
  interval      109.5ms      100.0ms      100.0ms
  pk_delay          0us         39us         50us
  av_delay          0us          5us          2us
  sp_delay          0us          3us          2us
  backlog            0b           0b           0b
  pkts                0         1193          110
  bytes               0        94074        53633
  way_inds            0            0            0
  way_miss            0         1027            4
  way_cols            0            0            0
  drops               0            0            0
  marks               0            0            0
  ack_drop            0            0            0
  sp_flows            0            1            0
  bk_flows            0            0            0
  un_flows            0            0            0
  max_len             0          123          568
  quantum           300          610          300

qdisc ingress ffff: dev pppoe-wan2 parent ffff:fff1 ---------------- 
 Sent 263081 bytes 1172 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev tun0 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 304 bytes 4 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 8018: dev ifb4eth0 root refcnt 2 bandwidth 402Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 18 mpu 64 
 Sent 1247326246 bytes 911133 pkt (dropped 43, overlimits 762489 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 668Kb of 15140Kb
 capacity estimate: 402Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       64 /    1518
 average network hdr offset:           14

                  Tin 0
  thresh        402Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        114us
  av_delay         11us
  sp_delay          2us
  backlog            0b
  pkts           911176
  bytes      1247391348
  way_inds          150
  way_miss          547
  way_cols            0
  drops              43
  marks               0
  ack_drop            0
  sp_flows            2
  bk_flows            1
  un_flows            0
  max_len         49962
  quantum          1514

qdisc cake 801c: dev ifb4pppoe-wan2 root refcnt 2 bandwidth 55Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms atm overhead 8 mpu 64 
 Sent 263081 bytes 1172 pkt (dropped 0, overlimits 23 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 4608b of 4Mb
 capacity estimate: 55Mbit
 min/max network layer size:           28 /    1492
 min/max overhead-adjusted size:      106 /    1696
 average network hdr offset:            0

                  Tin 0
  thresh         55Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay         38us
  av_delay          5us
  sp_delay          3us
  backlog            0b
  pkts             1172
  bytes          263081
  way_inds            0
  way_miss         1034
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1492
  quantum          1514

Just wanted to mention that I made a new build today and cake is showing in the menu, Version r12792-b74386acc6.

2 Likes

Sidenote, while not impossible having ATM encapsulation on a VDSL2-link is extremely unlikely, so you might want to a) use the ATM_overhead_detector to see whether you actually have ATM/AAL5 encapsulation on your link and b) reconsider

as that really does not fit with pppoe over VDSL2/PTM (nor over ATM for that matter).

Back to your main issue. The fact the luci-app-sqm sort of modifies your config while not properly parsing /var/run/sqm/available_qdiscs/ makes me wonder whether this might be caused by a browser caching issue, so maybe retry with a freshly installed browser (say install chrome/chromium/firefox/"any browser you do not usually use" and try again, so that the browser is forced to get fresh information from LUCI). There should have been no changes to luci-app-sqm and/or sqm-scripts recently that night have caused this behavioral change...

Thanks for the link - I'll download it and give it try. I just plugged a whole lot of values in that I didn't take too much time to validate whether they were correct or not.

I had previously used Firefox, Chrome and Microsoft Edge, as well as deleting the cache / history several times. They all behave the same way, so it doesn't appear to be a caching problem on the face of it. @mike mentioned above that he had a similar problem which went away after doing a new build. There are only a few recent commits I'm missing, but I'll give that a try first and report back.

Fair enough, since you can rule out the browser and command line sqm works as expected, and there are no recent changes in luci-app-sqm I wonder whether there were recent changes in LUCI itself that might have caused this issue transiently?

I have same issue as @dl12345.

NAME="OpenWrt"
VERSION="SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt SNAPSHOT"
VERSION_ID="snapshot"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r12755-19760563f7"
OPENWRT_BOARD="x86/64"
OPENWRT_ARCH="x86_64"
OPENWRT_TAINTS="no-all"
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt SNAPSHOT r12755-19760563f7"

@mike do you know what your previous build ID was? I'd love to have a look at the commits that happened between the one you had where it was not showing and the latest build you referenced above.

The SNAPSHOT r12793 has fixed the issue, cake option is back.

No sorry, that's a good idea but it didn't even occur to me.

Ok, so @leeandy posted a build id that was not working, r12755-19760563f7 and also noted that the current HEAD is working.

Looking at the commits that have taken place since the build reference above, there is one obvious potential candidate: kmod-sched-cake: switch to in-tree cake for 4.19+-b74386a

Of course, it's also possible that one of the luci commits fixed the problem, but no obvious potential candidates jump out at me.

@ldir, perhaps you might have some insight into this problem?

My guess would be a small window where the dependencies on kmod-sched-cake v kmod-sched-cake-oot on sqm-scripts got missed/confused.

It's always a challenge when 'lock step' changes have to occur in more than 1 repository.

@moeller0 I've located the source of the problem.

On Openwrt systems, /var is actually a symlink to /tmp

However, since I have a large SSD in my router, /var is a normal directory so that I don't need to use the limited space in the tmpfs.

However, sqm-cbi.lua is hard coding the path to the available_qdiscs directory via /tmp

local wa = require "luci.tools.webadmin"                                             
local fs = require "nixio.fs"                                                    
local net = require "luci.model.network".init()              
local sys = require "luci.sys"                                                                                 
--local ifaces = net:get_interfaces()                          
local ifaces = sys.net:devices()                                  
local path = "/usr/lib/sqm"                                   
local run_path = "/tmp/run/sqm/available_qdiscs"

I'd suggest in a future release that the run_path variable be changed to /var/run/sqm/available_qdiscs. This will still work on standard OpenWrt systems with the symlink, whereas the existing initialization only works if /var is symlinked to to /tmp and not if it's a separate directory.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.