EDIT: After a couple days of playing with it, I'm shutting this experiment down. Thanks for engaging with me.
I've been reviewing old discussions and PMs about CAKE when @RMerlin was adding it to the firmware earlier this year. One idea RMerlin had was to see if it was technically feasible to use CAKE in combination with Adaptive QoS marks. Since I've had a renewed interest in CAKE this week, I decided to see what could be done.
What I have below is a script that you can run after setting up Adaptive QoS on your router (not CAKE). This script will remove the htb+sfq setup of Adaptive QoS and replace it with CAKE using diffserv4. Streaming will be sent to Video. File Transfers will be sent to Bulk. IM, Gaming and Video Conferencing will be sent to Voice. Download shaping happens on the br0 bridge. Router to LAN traffic is excluded from CAKE.
I do not disable runner or flow cache. I can get CAKE to shape at roughly 385Mbit on my router, even though it's configured for 470Mbit. That's considerably more than the ~220Mbit I might expect with the default CAKE setup on an AC86U.
This might be a big turd, or it might be the start of something cool. If you're brave, you can copy/paste it onto your router and run it after plain Adaptive QoS is running.
If anyone else can reproduce my results (i.e. better performance and tinning than default CAKE or even CakeQOS-Merlin), then we'll see where we go from here. This might become a feature of FlexQoS 3.0. All the Adaptive QoS marks are available to use, but I only included the ones I thought should not be sent to besteffort.
Copy this script to a new file. Upload it to the router (e.g. /jffs/addons/flexcake.sh). Fix line endings (dos2unix /jffs/addons/flexcake.sh). Change permissions (chmod 755 /jffs/addons/flexcake.sh). Run the script once Adaptive QoS is running (sh /jffs/addons/flexcake.sh). Run a fast.com speedtest and see if the traffic ends up in the Video tin on br0 (tc -s qdisc show dev br0)
I've been reviewing old discussions and PMs about CAKE when @RMerlin was adding it to the firmware earlier this year. One idea RMerlin had was to see if it was technically feasible to use CAKE in combination with Adaptive QoS marks. Since I've had a renewed interest in CAKE this week, I decided to see what could be done.
What I have below is a script that you can run after setting up Adaptive QoS on your router (not CAKE). This script will remove the htb+sfq setup of Adaptive QoS and replace it with CAKE using diffserv4. Streaming will be sent to Video. File Transfers will be sent to Bulk. IM, Gaming and Video Conferencing will be sent to Voice. Download shaping happens on the br0 bridge. Router to LAN traffic is excluded from CAKE.
I do not disable runner or flow cache. I can get CAKE to shape at roughly 385Mbit on my router, even though it's configured for 470Mbit. That's considerably more than the ~220Mbit I might expect with the default CAKE setup on an AC86U.
This might be a big turd, or it might be the start of something cool. If you're brave, you can copy/paste it onto your router and run it after plain Adaptive QoS is running.
If anyone else can reproduce my results (i.e. better performance and tinning than default CAKE or even CakeQOS-Merlin), then we'll see where we go from here. This might become a feature of FlexQoS 3.0. All the Adaptive QoS marks are available to use, but I only included the ones I thought should not be sent to besteffort.
Bash:
#!/bin/sh
DL="$(nvram get qos_ibw)"
UL="$(nvram get qos_obw)"
OH="overhead $(nvram get qos_overhead)"
ATM="$(nvram get qos_atm)"
case ${ATM} in
1) OH="${OH} atm" ;;
2) OH="${OH} ptm" ;;
esac
OH="${OH} mpu $(nvram get qos_mpu)"
WAN=eth0
fc disable
fc flush
# Setup download
tc qdisc del dev br0 root
tc qdisc add dev br0 root handle 1: htb default 1
tc class add dev br0 parent 1: classid 1:2 htb prio 0 rate 10Gbit ceil 10Gbit
tc filter add dev br0 parent 1: protocol all prio 1 u32 match mark 0x0000 0xc0000000 flowid 1:2
tc class add dev br0 parent 1: classid 1:1 htb prio 0 rate 10Gbit ceil 10Gbit
tc qdisc add dev br0 parent 1:1 handle 110: cake bandwidth ${DL}kbit diffserv4 dual-dsthost ingress wash raw no-split-gso ${OH}
# Bulk :1
tc filter add dev br0 parent 110: protocol all prio 1 u32 match mark 0x80010000 0xc03f0000 action skbedit priority 110:1 # P2P
tc filter add dev br0 parent 110: protocol all prio 2 u32 match mark 0x80030000 0xc03f0000 action skbedit priority 110:1 # File Sharing
tc filter add dev br0 parent 110: protocol all prio 3 u32 match mark 0x800e0000 0xc03f0000 action skbedit priority 110:1 # Update downloads
# Video :3
tc filter add dev br0 parent 110: protocol all prio 4 u32 match mark 0x80160000 0xc03f0000 action skbedit priority 110:3 # Adult
tc filter add dev br0 parent 110: protocol all prio 5 u32 match mark 0x80040000 0xc03f0000 action skbedit priority 110:3 # Media Streaming
tc filter add dev br0 parent 110: protocol all prio 5 u32 match mark 0x801400ac 0xc03fffff action skbedit priority 110:3 # STUN
# Voice :4
tc filter add dev br0 parent 110: protocol all prio 6 u32 match mark 0x80060000 0xc03f0000 action skbedit priority 110:4 # Video Chat
tc filter add dev br0 parent 110: protocol all prio 7 u32 match mark 0x80080000 0xc03f0000 action skbedit priority 110:4 # Gaming
tc filter add dev br0 parent 110: protocol all prio 8 u32 match mark 0x80110000 0xc03f0000 action skbedit priority 110:4 # Video Conferencing
# Besteffort :2
tc filter add dev br0 parent 110: protocol all prio 99 matchall action skbedit priority 110:2
# Setup upload
tc qdisc del dev ${WAN} root
tc qdisc add dev ${WAN} root handle 120: cake bandwidth ${UL}kbit diffserv4 dual-srchost nat raw no-split-gso ${OH}
# Bulk :1
tc filter add dev ${WAN} parent 120: protocol all prio 1 u32 match mark 0x40010000 0xc03f0000 action skbedit priority 120:1 # P2P
tc filter add dev ${WAN} parent 120: protocol all prio 2 u32 match mark 0x40030000 0xc03f0000 action skbedit priority 120:1 # File Sharing
tc filter add dev ${WAN} parent 120: protocol all prio 3 u32 match mark 0x400e0000 0xc03f0000 action skbedit priority 120:1 # Update downloads
# Video :3
tc filter add dev ${WAN} parent 120: protocol all prio 4 u32 match mark 0x40160000 0xc03f0000 action skbedit priority 120:3 # Adult
tc filter add dev ${WAN} parent 120: protocol all prio 5 u32 match mark 0x40040000 0xc03f0000 action skbedit priority 120:3 # Media Streaming
tc filter add dev ${WAN} parent 120: protocol all prio 5 u32 match mark 0x401400ac 0xc03fffff action skbedit priority 120:3 # STUN
# Voice :4
tc filter add dev ${WAN} parent 120: protocol all prio 6 u32 match mark 0x40060000 0xc03f0000 action skbedit priority 120:4 # Video Chat
tc filter add dev ${WAN} parent 120: protocol all prio 7 u32 match mark 0x40080000 0xc03f0000 action skbedit priority 120:4 # Gaming
tc filter add dev ${WAN} parent 120: protocol all prio 8 u32 match mark 0x40110000 0xc03f0000 action skbedit priority 120:4 # Video Conferencing
# Besteffort :2
# tc filter add dev ${WAN} parent 120: protocol all prio 99 matchall action skbedit priority 120:2
Last edited: