To make this work perfectly, the settings in the ASUS QoS GUI must match the script’s parameters:
1. QoS Mode: Set to CAKE in the GUI.
2. Bandwidth: Set to the same values as the script (550 Down / 275 Up).
3. Overhead: Must be set to 34 (for VDSL/FTTH PPPoE) in the WAN packet overhead field in the GUI.
The logic is simple: I let the ASUS GUI initialize the CAKE qdiscs first, and then my JFFS script runs to apply the Core Steering (RPS/SMP Affinity) and fine-tune the qdisc parameters. This combination is what delivers the rock-solid +0ms Bufferbloat at 500+ Mbps
#!/bin/sh
sleep 20
# Disable Hardware Acceleration to allow CAKE to work
fc disable 2>/dev/null
runner disable 2>/dev/null
echo 65536 > /proc/sys/net/core/rps_sock_flow_entries
# Core Steering: Offloading from Core 1 to Cores 2, 3, 4 (Mask 'e')
for iface in eth0 ppp0; do
if [ -d "/sys/class/net/$iface/queues" ]; then
for q in /sys/class/net/$iface/queues/rx-*; do
echo e > $q/rps_cpus 2>/dev/null
echo 32768 > $q/rps_flow_cnt 2>/dev/null
done
fi
done
# IRQ Steering: Moving ppp0/eth0 interrupts away from Core 1
for irq in $(grep -E 'ppp0|eth0' /proc/interrupts | cut -d: -f1); do
echo e > /proc/irq/$irq/smp_affinity 2>/dev/null
done
# Applying CAKE settings (550/275 for a 500/250 line)
tc qdisc del dev ppp0 root 2>/dev/null
tc qdisc del dev ifb4ppp0 root 2>/dev/null
tc qdisc del dev ppp0 handle ffff: ingress 2>/dev/null
tc qdisc add dev ppp0 handle ffff: ingress
tc filter add dev ppp0 parent ffff: protocol all u32 match u32 0 0 action mirred egress redirect dev ifb4ppp0
tc qdisc replace dev ppp0 root cake bandwidth 275mbit diffserv3 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 34
tc qdisc replace dev ifb4ppp0 root cake bandwidth 550mbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100ms noatm overhead 34
logger "LAB_PERFECT_ACTIVE"