I don't think it has to do with DSCP. I've tried it with cake/piece of cake, with no DSCP rules in the 'etc/firewall.user' and it has occurred. When running a download on my PS4 (wired directly to router during test), then running a speed test on my laptop and running a ping on 8.8.8.8 (connected via wireless to the router), after a couple of speed tests my PS4 download stalls for a few seconds. The download drops from ~10-20MB/s to about 0.1MB/s, as well as the speed test, and the ping test jumps to >1000ms-3000ms for a few seconds.
The weird thing is, that after this occurs I have tried turning off all SQM instances, and rebooted the router. After the router boots up I have pinged my ISP's gateway and still have had the ping spikes every 10 seconds or so. It does not go away until the modem itself is rebooted.
Here is the SQM config I have tried when on the WAN and LAN instance (eth0 is WAN, eth1 is LAN, 215Mbps down, 21.5Mbp up, TL-WR1043NDv3 running Fast Path, Gwlim's July 2018 build):
config queue
option debug_logging '0'
option verbosity '5'
option interface 'eth1'
option upload '195000'
option qdisc 'cake'
option qdisc_advanced '1'
option ingress_ecn 'NOECN'
option egress_ecn 'ECN'
option qdisc_really_really_advanced '1'
option enabled '1'
option download '0'
option script 'piece_of_cake.qos'
option squash_dscp '1'
option squash_ingress '1'
option eqdisc_opts 'nat dual-dsthost mpu 64'
option linklayer 'ethernet'
option overhead '18'
config queue
option debug_logging '0'
option verbosity '5'
option squash_dscp '1'
option squash_ingress '1'
option egress_ecn 'NOECN'
option interface 'eth0'
option download '0'
option upload '18500'
option qdisc 'cake'
option script 'piece_of_cake.qos'
option qdisc_advanced '1'
option ingress_ecn 'NOECN'
option qdisc_really_really_advanced '1'
option iqdisc_opts 'nat dual-srchost mpu 64'
option linklayer 'ethernet'
option overhead '18'
option enabled '1'
I have tried different overheads of 0, 18, 28 and a combination of such (28 and 18 on WAN interface, 0 on LAN). With and without 'mpu 64' and 'nat dual-*host'.
My current SQM config is:
config queue
option debug_logging '0'
option verbosity '5'
option interface 'eth1'
option upload '195000'
option qdisc 'cake'
option qdisc_advanced '1'
option ingress_ecn 'NOECN'
option egress_ecn 'ECN'
option qdisc_really_really_advanced '1'
option enabled '1'
option script 'layer_cake.qos'
option squash_dscp '0'
option squash_ingress '0'
option linklayer 'none'
option iqdisc_opts 'nat dual-srchost diffserv4'
option download '18500'
option eqdisc_opts 'nat dual-dsthost diffserv4'
It's working just fine. Just needed to make sure that the packets entering the SQM queue that I need to take priority are being marked properly. @dlakelan has provided me how to achieve this by marking them on the AP.
Thank you for all the help provided by everyone. I'm going to mark this topic as solved as the original issue has been resolved. If anyone can see errors in the SQM configuration that uses both the LAN and WAN interface that would cause my modem to stall please feel free to PM me regarding it. Thank you again!