Help me update my HFSC shaper scripts for fw4/nftables

This is not the whole output.

1 Like

if i try to copy from the bottom, it cut's out a part.
any tip please? using puTTY

then show me:

tc -s qdisc
1 Like

fix it, it was a puTTY setting.

Global configuration section already exists.
Enabled option already exists.
Config files have been added to sysupgrade.conf for preservation.

This script prioritizes the UDP packets from / to a set of gaming
machines into a real-time HFSC queue with guaranteed total bandwidth

Based on your settings:

Game upload guarantee = 400 kbps
Game download guarantee = 800 kbps

Download direction only works if you install this on a *wired* router
and there is a separate AP wired into your network, because otherwise
there are multiple parallel queues for traffic to leave your router
heading to the LAN.

Based on your link total bandwidth, the **minimum** amount of jitter
you should expect in your network is about:

UP = 9 ms

DOWN = 4 ms

In order to get lower minimum jitter you must upgrade the speed of
your link, no queuing system can help.

Please note for your display rate that:

at 30Hz, one on screen frame lasts:   33.3 ms
at 60Hz, one on screen frame lasts:   16.6 ms
at 144Hz, one on screen frame lasts:   6.9 ms

This means the typical gamer is sensitive to as little as on the order
of 5ms of jitter. To get 5ms minimum jitter you should have bandwidth
in each direction of at least:

7200 kbps

The queue system can ONLY control bandwidth and jitter in the link
between your router and the VERY FIRST device in the ISP
network. Typically you will have 5 to 10 devices between your router
and your gaming server, any of those can have variable delay and ruin
your gaming, and there is NOTHING that your router can do about it.

adding fq_codel qdisc for non-game traffic
adding fq_codel qdisc for non-game traffic
DONE!
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 hfsc 1: dev eth0 root refcnt 17 default 13
 Sent 356 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 801c: dev eth0 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 0 bytes 0 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 801a: dev eth0 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 162 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 162 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc pfifo 10: dev eth0 parent 1:11 limit 67p
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8019: dev eth0 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
qdisc pfifo 10: dev ifb-usb0 parent 1:11 limit 67p
 Sent 408154 bytes 669 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 803b: dev ifb-usb0 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 7621 bytes 9 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1332 drop_overlimit 0 new_flow_count 7 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc fq_codel 803a: dev ifb-usb0 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 40960 bytes 290 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 308 drop_overlimit 0 new_flow_count 268 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc fq_codel 803c: dev ifb-usb0 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 0 bytes 0 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

==== Nftables Ruleset: dscptag ====
        chain dscptag {
                type filter hook forward priority filter; policy accept;
                ip dscp set cs0 counter packets 88718 bytes 69227229
                ip6 dscp set cs0 counter packets 0 bytes 0
                ip protocol udp udp sport 51413 ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr udp udp sport 51413 ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol udp udp dport 51413 ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr udp udp dport 51413 ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp tcp sport { 6881-6889, 51413 } ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr tcp tcp sport { 6881-6889, 51413 } ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp tcp dport { 6881-6889, 51413 } ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr tcp tcp dport { 6881-6889, 51413 } ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @xfst4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 20000/second } counter packets 0 bytes 0 jump drop995
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @fast4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 2000/second } counter packets 0 bytes 0 jump drop95
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @med4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 200/second } counter packets 1620 bytes 98414 jump drop50
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @slow4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 200/second } counter packets 788 bytes 47935 jump drop50
                ip protocol udp udp dport { 53, 3478-3479, 5938, 8801-8802, 10000, 19302-19309 } ip dscp set cs4 counter packets 0 bytes 0
                ip6 nexthdr udp udp dport { 53, 3478-3479, 5938, 8801-8802, 10000, 19302-19309 } ip6 dscp set cs4 counter packets 0 bytes 0
                ip protocol udp ip daddr 192.168.1.2 ip dscp set cs5 counter packets 5654 bytes 5329767
                ip protocol udp ip saddr 192.168.1.2 ip dscp set cs5 counter packets 3735 bytes 898528
                ip6 nexthdr udp ip6 daddr fd90::129a ip6 dscp set cs5 counter packets 0 bytes 0
                ip6 nexthdr udp ip6 saddr fd90::129a ip6 dscp set cs5 counter packets 0 bytes 0
                ip protocol udp ip daddr 192.168.109.2 ip dscp set cs2 counter packets 0 bytes 0
                ip protocol udp ip saddr 192.168.109.2 ip dscp set cs2 counter packets 0 bytes 0
                ip6 nexthdr udp ip6 daddr fd90::129a ip6 dscp set cs2 counter packets 0 bytes 0
                ip6 nexthdr udp ip6 saddr fd90::129a ip6 dscp set cs2 counter packets 0 bytes 0
                ip protocol udp ip dscp > cs2 add @udp_meter4 { ip saddr . ip daddr . udp sport . udp dport limit rate over 450/second } counter packets 148 bytes 118353 ip dscp set cs2 counter packets 148 bytes 118353
                ip6 nexthdr udp ip6 dscp > cs2 add @udp_meter6 { ip6 saddr . ip6 daddr . udp sport . udp dport limit rate over 450/second } counter packets 0 bytes 0 ip6 dscp set cs2 counter packets 0 bytes 0
                ip protocol tcp ct bytes < 562500 ip dscp < cs4 ip dscp set cs2 counter packets 30240 bytes 19984179
                ip protocol tcp ct bytes > 11250000 ip dscp < cs4 ip dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp add @slowtcp4 { ip saddr . ip daddr . tcp sport . tcp dport limit rate 150/second burst 150 packets } ip dscp set cs4 counter packets 77618 bytes 62268549
                ip6 nexthdr tcp add @slowtcp6 { ip6 saddr . ip6 daddr . tcp sport . tcp dport limit rate 150/second burst 150 packets } ip6 dscp set cs4 counter packets 0 bytes 0
                meta priority set ip dscp map @priomap counter packets 87486 bytes 69152362
                meta priority set ip6 dscp map @priomap counter packets 0 bytes 0
                meta nfproto ipv4 ct mark set @nh,8,8 & 0xfc [invalid type] | 0x80 counter packets 87486 bytes 69152362
                meta nfproto ipv6 ct mark set @nh,0,16 & 0xfc0 [invalid type] | 0x80 counter packets 0 bytes 0
                oifname "usb0" ip dscp set cs0
                oifname "usb0" ip6 dscp set cs0
        }
}

Here is the output after getting it to work yesterday, still no wifi.

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 fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 115733052 bytes 117818 pkt (dropped 0, overlimits 0 requeues 73)
 backlog 0b 0p requeues 73
  maxpacket 1292 drop_overlimit 0 new_flow_count 65 ecn_mark 0
  new_flows_len 0 old_flows_len 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 eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc hfsc 1: dev eth0.2 root refcnt 2 default 13
 Sent 1758010 bytes 9408 pkt (dropped 263, overlimits 4621 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8005: dev eth0.2 parent 1:14 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 0 bytes 0 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 8003: dev eth0.2 parent 1:12 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 0 bytes 0 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 pfifo 10: dev eth0.2 parent 1:11 limit 11p
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8004: dev eth0.2 parent 1:13 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 1758010 bytes 9408 pkt (dropped 258, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1696 drop_overlimit 257 new_flow_count 536 ecn_mark 0 drop_overmemory 257
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 8006: dev eth0.2 parent 1:15 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 0 bytes 0 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 ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 45141697 bytes 36964 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev wlan0 root
 Sent 6911 bytes 85 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 wlan0 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 6911 bytes 85 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 wlan0 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 wlan0 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 hfsc 1: dev ifb-eth0.2 root refcnt 2 default 13
 Sent 51026704 bytes 35906 pkt (dropped 1049, overlimits 63561 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8007: dev ifb-eth0.2 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 250000b ecn drop_batch 64
 Sent 14575 bytes 60 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 371 drop_overlimit 0 new_flow_count 56 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc fq_codel 8009: dev ifb-eth0.2 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 250000b ecn drop_batch 64
 Sent 0 bytes 0 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 pfifo 10: dev ifb-eth0.2 parent 1:11 limit 74p
 Sent 41340 bytes 260 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 800a: dev ifb-eth0.2 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 250000b ecn drop_batch 64
 Sent 0 bytes 0 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 8008: dev ifb-eth0.2 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 250000b ecn drop_batch 64
 Sent 50968828 bytes 35578 pkt (dropped 1048, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1696 drop_overlimit 302 new_flow_count 678 ecn_mark 0 drop_overmemory 302
  new_flows_len 1 old_flows_len 3

This doesn't seem right.. There should be your wan interface for the egress interface...
Please reboot the router and then show me the output again...

1 Like

i guess it looks better now

==== Traffic Control (tc) Queues ====
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 mq 0: dev eth0 root
 Sent 464818 bytes 640 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 parent :10 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :f limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :e limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :d limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :c limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :b limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :a limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :9 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :8 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :7 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :6 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 463106 bytes 624 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 eth0 parent :5 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :4 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 1712 bytes 16 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 eth0 parent :3 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :2 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :1 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 noqueue 0: dev lan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc hfsc 1: dev usb0 root refcnt 2 default 13
 Sent 69939 bytes 322 pkt (dropped 0, overlimits 72 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8016: dev usb0 parent 1:13 limit 10240p flows 1024 quantum 3000 target 5ms interval 106ms memory_limit 100000b ecn drop_batch 64
 Sent 2000 bytes 17 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 122 drop_overlimit 0 new_flow_count 17 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc fq_codel 8018: dev usb0 parent 1:15 limit 10240p flows 1024 quantum 3000 target 5ms interval 106ms memory_limit 100000b ecn drop_batch 64
 Sent 0 bytes 0 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 pfifo 10: dev usb0 parent 1:11 limit 32p
 Sent 32826 bytes 66 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8015: dev usb0 parent 1:12 limit 10240p flows 1024 quantum 3000 target 5ms interval 106ms memory_limit 100000b ecn drop_batch 64
 Sent 34812 bytes 238 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1922 drop_overlimit 0 new_flow_count 7 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 8017: dev usb0 parent 1:14 limit 10240p flows 1024 quantum 3000 target 5ms interval 106ms memory_limit 100000b ecn drop_batch 64
 Sent 301 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 301 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc ingress ffff: dev usb0 parent ffff:fff1 ----------------
 Sent 403025 bytes 443 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 phy1-sta0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc hfsc 1: dev ifb-usb0 root refcnt 2 default 13
 Sent 426947 bytes 443 pkt (dropped 0, overlimits 262 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 801c: dev ifb-usb0 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 0 bytes 0 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 801a: dev ifb-usb0 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 4202 bytes 21 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 350 drop_overlimit 0 new_flow_count 21 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc pfifo 10: dev ifb-usb0 parent 1:11 limit 67p
 Sent 27294 bytes 61 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8019: dev ifb-usb0 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 394169 bytes 360 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1456 drop_overlimit 0 new_flow_count 6 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 801b: dev ifb-usb0 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 225000b ecn drop_batch 64
 Sent 1282 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1282 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 1 old_flows_len 0

==== Nftables Ruleset: dscptag ====
        chain dscptag {
                type filter hook forward priority filter; policy accept;
                ip dscp set cs0 counter packets 752 bytes 453522
                ip6 dscp set cs0 counter packets 0 bytes 0
                ip protocol udp udp sport 51413 ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr udp udp sport 51413 ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol udp udp dport 51413 ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr udp udp dport 51413 ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp tcp sport { 6881-6889, 51413 } ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr tcp tcp sport { 6881-6889, 51413 } ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp tcp dport { 6881-6889, 51413 } ip dscp set cs1 counter packets 0 bytes 0
                ip6 nexthdr tcp tcp dport { 6881-6889, 51413 } ip6 dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @xfst4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 20000/second } counter packets 0 bytes 0 jump drop995
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @fast4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 2000/second } counter packets 0 bytes 0 jump drop95
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @med4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 200/second } counter packets 32 bytes 2368 jump drop50
                ip protocol tcp tcp flags & ack == ack meta length < 100 add @slow4ack { ip daddr . ip saddr . tcp dport . tcp sport limit rate over 200/second } counter packets 14 bytes 1048 jump drop50
                ip protocol udp udp dport { 53, 3478-3479, 5938, 8801-8802, 10000, 19302-19309 } ip dscp set cs4 counter packets 0 bytes 0
                ip6 nexthdr udp udp dport { 53, 3478-3479, 5938, 8801-8802, 10000, 19302-19309 } ip6 dscp set cs4 counter packets 0 bytes 0
                ip protocol udp ip daddr 192.168.1.2 ip dscp set cs5 counter packets 62 bytes 25228
                ip protocol udp ip saddr 192.168.1.2 ip dscp set cs5 counter packets 67 bytes 29509
                ip6 nexthdr udp ip6 daddr fd90::129a ip6 dscp set cs5 counter packets 0 bytes 0
                ip6 nexthdr udp ip6 saddr fd90::129a ip6 dscp set cs5 counter packets 0 bytes 0
                ip protocol udp ip daddr 192.168.109.2 ip dscp set cs2 counter packets 0 bytes 0
                ip protocol udp ip saddr 192.168.109.2 ip dscp set cs2 counter packets 0 bytes 0
                ip6 nexthdr udp ip6 daddr fd90::129a ip6 dscp set cs2 counter packets 0 bytes 0
                ip6 nexthdr udp ip6 saddr fd90::129a ip6 dscp set cs2 counter packets 0 bytes 0
                ip protocol udp ip dscp > cs2 add @udp_meter4 { ip saddr . ip daddr . udp sport . udp dport limit rate over 450/second } counter packets 2 bytes 301 ip dscp set cs2 counter packets 2 bytes 301
                ip6 nexthdr udp ip6 dscp > cs2 add @udp_meter6 { ip6 saddr . ip6 daddr . udp sport . udp dport limit rate over 450/second } counter packets 0 bytes 0 ip6 dscp set cs2 counter packets 0 bytes 0
                ip protocol tcp ct bytes < 562500 ip dscp < cs4 ip dscp set cs2 counter packets 596 bytes 396797
                ip protocol tcp ct bytes > 11250000 ip dscp < cs4 ip dscp set cs1 counter packets 0 bytes 0
                ip protocol tcp add @slowtcp4 { ip saddr . ip daddr . tcp sport . tcp dport limit rate 150/second burst 150 packets } ip dscp set cs4 counter packets 596 bytes 396797
                ip6 nexthdr tcp add @slowtcp6 { ip6 saddr . ip6 daddr . tcp sport . tcp dport limit rate 150/second burst 150 packets } ip6 dscp set cs4 counter packets 0 bytes 0
                meta priority set ip dscp map @priomap counter packets 725 bytes 451534
                meta priority set ip6 dscp map @priomap counter packets 0 bytes 0
                meta nfproto ipv4 ct mark set @nh,8,8 & 0xfc [invalid type] | 0x80 counter packets 725 bytes 451534
                meta nfproto ipv6 ct mark set @nh,0,16 & 0xfc0 [invalid type] | 0x80 counter packets 0 bytes 0
                oifname "usb0" ip dscp set cs0
                oifname "usb0" ip6 dscp set cs0
        }
}

Looks better now.

1 Like

Seems like the script is running/working now.

What is the output of:

service SimpleHFSCgamerscript status

and

tc filter show dev eth0.2 ingress

Then you will have to troubleshoot

  • edit /etc/hfscscript to add any additional rules you want to use for custom DSCP tagging - examples are in the config

when you mentioned this location, did you mean instead /etc/config/hfscscript?

1 Like

Sorry, yea you are right. This is a typo in the readme. Just fixed it

1 Like

Other thing, when changing DOWNRATE and UPRATE, do i need to restart the router? cause i tried to restart the service and the settings haven't applied.

Also the majority of the traffic will be categorized to cs3 automatically, only if i specify otherwise, is that correct?

No, how do you restart the script?

Almost correct. The majority of the the traffic is sent to the default class 1:13 but won't "automatically" be marked with cs3.

root@OpenWrt:/etc# service SimpleHFSCgamerscript restart
tcpdump: listening on usb0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
11:06:45.431389 IP (tos 0xb8, ttl 127, id 13605, offset 0, flags [none], proto ICMP (1), length 60)


tcpdump: listening on ifb-usb0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
11:07:57.108135 IP (tos 0xb8, ttl 55, id 22134, offset 0, flags [none], proto ICMP (1), length 60)

i presume this is the result u want?

This is the complicated part for me. Do i have to specify every single aplication, and organizing it per cs class? Or should i only be concerned sending my games to the cs5.

Also i'm finding it difficult to understand the following step:

  1. Use watch -n 2 'tc -s qdisc | grep -A 2 "parent 1:11"' (replace 1:11 with the desired class) to check if packets are landing in the correct traffic control (tc) queue. The packet count should increase with the ping in both directions.

The packet count increases with the ping on both directions on every class.

==== Traffic Control (tc) Queues ====
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 fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 66601394 bytes 70013 pkt (dropped 0, overlimits 0 requeues 6)
 backlog 0b 0p requeues 6
  maxpacket 874 drop_overlimit 0 new_flow_count 5 ecn_mark 0
  new_flows_len 0 old_flows_len 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 eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc hfsc 1: dev eth0.2 root refcnt 2 default 13
 Sent 1457447 bytes 5935 pkt (dropped 27, overlimits 1938 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8005: dev eth0.2 parent 1:12 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 0 bytes 0 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 8007: dev eth0.2 parent 1:14 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 0 bytes 0 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 pfifo 10: dev eth0.2 parent 1:11 limit 11p
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8006: dev eth0.2 parent 1:13 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 1457288 bytes 5934 pkt (dropped 21, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1696 drop_overlimit 21 new_flow_count 1218 ecn_mark 5 drop_overmemory 21
  new_flows_len 1 old_flows_len 1
qdisc fq_codel 8008: dev eth0.2 parent 1:15 limit 10240p flows 1024 quantum 3000 target 8ms interval 124ms memory_limit 25000b ecn drop_batch 64
 Sent 0 bytes 0 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 ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 17020252 bytes 16581 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev wlan0 root
 Sent 16624832 bytes 14203 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 wlan0 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 16624832 bytes 14203 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 wlan0 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 wlan0 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 hfsc 1: dev ifb-eth0.2 root refcnt 2 default 13
 Sent 20103748 bytes 16462 pkt (dropped 112, overlimits 26010 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8009: dev ifb-eth0.2 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 275000b ecn drop_batch 64
 Sent 255672 bytes 801 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1696 drop_overlimit 0 new_flow_count 108 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 800b: dev ifb-eth0.2 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 275000b ecn drop_batch 64
 Sent 0 bytes 0 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 pfifo 10: dev ifb-eth0.2 parent 1:11 limit 81p
 Sent 36888 bytes 232 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 800a: dev ifb-eth0.2 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 275000b ecn drop_batch 64
 Sent 19809015 bytes 15420 pkt (dropped 110, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1749 drop_overlimit 0 new_flow_count 1038 ecn_mark 0
  new_flows_len 1 old_flows_len 2
qdisc fq_codel 800c: dev ifb-eth0.2 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 102ms memory_limit 275000b ecn drop_batch 64
 Sent 0 bytes 0 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

==== Nftables Ruleset: dscptag ====


filter parent ffff: protocol all pref 49152 matchall chain 0
filter parent ffff: protocol all pref 49152 matchall chain 0 handle 0x1
  not_in_hw
        action order 1: ctinfo zone 0 pipe
         index 1 ref 1 bind 1 dscp 0x0000003f 0x00000080

        action order 2: mirred (Egress Redirect to device ifb-eth0.2) stolen
        index 1 ref 1 bind 1

-About troubleshooting, what should i do if i get no wifi? change the downshaping method or..? Clueless honestly.

This is right! What ouput do you get when you restart the service?

If your goal was to mark ICMP traffic with "EF," it is working. However, I would use this only for testing purposes and not prioritize all ICMP traffic.

Start by only prioritizing your game traffic. See here:

Watch is an application that makes it easier to see if marked packets really are hitting your queues. This command uses:

tc -s qdisc

every 2 seconds and only shows the relevant lines of the realtime class (1:11)

Then everything should be working

root@OpenWrt:/etc# service SimpleHFSCgamerscript restart
Stopping service SimpleHFSCgamerscript...
Removing veth interface configuration...
uci: Entry not found
Checking for LAN firewall zone to remove veth interface...
veth interface removed from LAN firewall zone.
Reloading network service...
'radio0' is disabled
'radio0' is disabled
Downloading 'https://raw.githubusercontent.com/hudra0/routerperf/master/13-SimpleHFSCGamerScriptHotplug'
Connecting to 185.199.111.133:443
Writing to '/etc/hotplug.d/iface/13-SimpleHFSCGamerScriptHotplug'
/etc/hotplug.d/iface 100% |*******************************|   516   0:00:00 ETA
Download completed (516 bytes)
Global configuration section already exists.
Enabled option already exists.
Config files have been added to sysupgrade.conf for preservation.

This script prioritizes the UDP packets from / to a set of gaming
machines into a real-time HFSC queue with guaranteed total bandwidth

Based on your settings:

Game upload guarantee = 400 kbps
Game download guarantee = 800 kbps

Download direction only works if you install this on a *wired* router
and there is a separate AP wired into your network, because otherwise
there are multiple parallel queues for traffic to leave your router
heading to the LAN.

Based on your link total bandwidth, the **minimum** amount of jitter
you should expect in your network is about:

UP = 0 ms

DOWN = 0 ms

In order to get lower minimum jitter you must upgrade the speed of
your link, no queuing system can help.

Please note for your display rate that:

at 30Hz, one on screen frame lasts:   33.3 ms
at 60Hz, one on screen frame lasts:   16.6 ms
at 144Hz, one on screen frame lasts:   6.9 ms

This means the typical gamer is sensitive to as little as on the order
of 5ms of jitter. To get 5ms minimum jitter you should have bandwidth
in each direction of at least:

7200 kbps

The queue system can ONLY control bandwidth and jitter in the link
between your router and the VERY FIRST device in the ISP
network. Typically you will have 5 to 10 devices between your router
and your gaming server, any of those can have variable delay and ruin
your gaming, and there is NOTHING that your router can do about it.

adding fq_codel qdisc for non-game traffic
adding fq_codel qdisc for non-game traffic
DONE!
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 mq 0: dev eth0 root
 Sent 444924130 bytes 408302 pkt (dropped 0, overlimits 0 requeues 2)
 backlog 0b 0p requeues 2
qdisc fq_codel 0: dev eth0 parent :10 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :f limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :e limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :d limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :c limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :b limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :a limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :9 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :8 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :7 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :6 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 444922418 bytes 408286 pkt (dropped 0, overlimits 0 requeues 2)
 backlog 0b 0p requeues 2
  maxpacket 64 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :4 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 1712 bytes 16 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 eth0 parent :3 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :2 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 eth0 parent :1 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 0 bytes 0 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 noqueue 0: dev lan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc hfsc 1: dev usb0 root refcnt 2 default 13
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8035: dev usb0 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 1000000b ecn drop_batch 6                                                                                              4
 Sent 0 bytes 0 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 8037: dev usb0 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 1000000b ecn drop_batch 6                                                                                              4
 Sent 0 bytes 0 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 pfifo 10: dev usb0 parent 1:11 limit 282p
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8038: dev usb0 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 1000000b ecn drop_batch 6                                                                                              4
 Sent 0 bytes 0 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 8036: dev usb0 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 1000000b ecn drop_batch 6                                                                                              4
 Sent 0 bytes 0 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 ingress ffff: dev usb0 parent ffff:fff1 ----------------
 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 phy1-sta0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc hfsc 1: dev ifb-usb0 root refcnt 2 default 13
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8039: dev ifb-usb0 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2250000b ecn drop_bat                                                                                              ch 64
 Sent 0 bytes 0 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 pfifo 10: dev ifb-usb0 parent 1:11 limit 630p
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 803b: dev ifb-usb0 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2250000b ecn drop_bat                                                                                              ch 64
 Sent 0 bytes 0 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 803a: dev ifb-usb0 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2250000b ecn drop_bat                                                                                              ch 64
 Sent 0 bytes 0 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 803c: dev ifb-usb0 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2250000b ecn drop_bat                                                                                              ch 64
 Sent 0 bytes 0 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
Network configuration successfully completed.
Automatically including '/usr/share/nftables.d/ruleset-post/dscptag.nft'
root@OpenWrt:/etc#

You have no nftables rules... so there is clearly something wrong with your setup... Do you even use nftables and fw4?

what is the ouput of:

nft --version

No, don't use any other downshaping method. The script should not interfere with your WiFi network, unless you are using the veth method.