Qosify: new package for DSCP marking + cake

Qosify configures the cake qdisc which provides most of the underlying queueing logic...

But you do not need other cake launch scripts like SQM.

1 Like

how do I know what qosify is working ? or if active

root@OpenWrt:~# qosify status
libbpf: loading /lib/bpf/qosify-bpf.o
libbpf: elf: section(2) classifier, size 3424, link 0, flags 6, type=1
libbpf: sec 'classifier': found program 'classify' at insn offset 0 (0 bytes), code size 428 insns (3424 bytes)
libbpf: elf: section(3) .rodata, size 4, link 0, flags 2, type=1
libbpf: elf: section(4) license, size 4, link 0, flags 3, type=1
libbpf: license of /lib/bpf/qosify-bpf.o is GPL
libbpf: elf: section(5) .maps, size 296, link 0, flags 3, type=1
libbpf: elf: section(6) .BTF, size 6509, link 0, flags 0, type=1
libbpf: elf: section(7) .BTF.ext, size 3472, link 0, flags 0, type=1
libbpf: elf: section(8) .symtab, size 1488, link 12, flags 0, type=2
libbpf: elf: section(9) .relclassifier, size 208, link 8, flags 0, type=9
libbpf: looking for externs among 62 symbols...
libbpf: collected 0 externs total
libbpf: map 'config': at sec_idx 5, offset 0.
libbpf: map 'config': found type = 2.
libbpf: map 'config': found pinning = 1.
libbpf: map 'config': found key [8], sz = 4.
libbpf: map 'config': found value [11], sz = 1.
libbpf: map 'config': found max_entries = 1.
libbpf: map 'flow_map': at sec_idx 5, offset 40.
libbpf: map 'flow_map': found type = 9.
libbpf: map 'flow_map': found pinning = 1.
libbpf: map 'flow_map': found key [8], sz = 4.
libbpf: map 'flow_map': found value [21], sz = 16.
libbpf: map 'flow_map': found max_entries = 8192.
libbpf: map 'tcp_ports': at sec_idx 5, offset 80.
libbpf: map 'tcp_ports': found type = 2.
libbpf: map 'tcp_ports': found pinning = 1.
libbpf: map 'tcp_ports': found key [8], sz = 4.
libbpf: map 'tcp_ports': found value [14], sz = 1.
libbpf: map 'tcp_ports': found max_entries = 65536.
libbpf: map 'udp_ports': at sec_idx 5, offset 120.
libbpf: map 'udp_ports': found type = 2.
libbpf: map 'udp_ports': found pinning = 1.
libbpf: map 'udp_ports': found key [8], sz = 4.
libbpf: map 'udp_ports': found value [14], sz = 1.
libbpf: map 'udp_ports': found max_entries = 65536.
libbpf: map 'ipv4_map': at sec_idx 5, offset 160.
libbpf: map 'ipv4_map': found type = 1.
libbpf: map 'ipv4_map': found pinning = 1.
libbpf: map 'ipv4_map': found key_size = 4.
libbpf: map 'ipv4_map': found value [36], sz = 2.
libbpf: map 'ipv4_map': found max_entries = 100000.
libbpf: map 'ipv4_map': found map_flags = 1.
libbpf: map 'ipv6_map': at sec_idx 5, offset 208.
libbpf: map 'ipv6_map': found type = 1.
libbpf: map 'ipv6_map': found pinning = 1.
libbpf: map 'ipv6_map': found key_size = 16.
libbpf: map 'ipv6_map': found value [36], sz = 2.
libbpf: map 'ipv6_map': found max_entries = 100000.
libbpf: map 'ipv6_map': found map_flags = 1.
libbpf: map 'class_map': at sec_idx 5, offset 256.
libbpf: map 'class_map': found type = 2.
libbpf: map 'class_map': found pinning = 1.
libbpf: map 'class_map': found key [8], sz = 4.
libbpf: map 'class_map': found value [46], sz = 12.
libbpf: map 'class_map': found max_entries = 18.
libbpf: map 'qosify_b.rodata' (global data): at sec_idx 3, offset 0, flags 480.
libbpf: map 7 is "qosify_b.rodata"
libbpf: sec '.relclassifier': collecting relocation for section(2) 'classifier'
libbpf: sec '.relclassifier': relo #0: insn #1 against '.rodata'
libbpf: prog 'classify': found data map 7 (qosify_b.rodata, sec 3, off 0) for insn 1
libbpf: sec '.relclassifier': relo #1: insn #8 against 'config'
libbpf: prog 'classify': found map 0 (config, sec 5, off 0) for insn #8
libbpf: sec '.relclassifier': relo #2: insn #87 against 'tcp_ports'
libbpf: prog 'classify': found map 2 (tcp_ports, sec 5, off 80) for insn #87
libbpf: sec '.relclassifier': relo #3: insn #93 against 'udp_ports'
libbpf: prog 'classify': found map 3 (udp_ports, sec 5, off 120) for insn #93
libbpf: sec '.relclassifier': relo #4: insn #106 against 'ipv4_map'
libbpf: prog 'classify': found map 4 (ipv4_map, sec 5, off 160) for insn #106
libbpf: sec '.relclassifier': relo #5: insn #149 against 'tcp_ports'
libbpf: prog 'classify': found map 2 (tcp_ports, sec 5, off 80) for insn #149
libbpf: sec '.relclassifier': relo #6: insn #155 against 'udp_ports'
libbpf: prog 'classify': found map 3 (udp_ports, sec 5, off 120) for insn #155
libbpf: sec '.relclassifier': relo #7: insn #164 against 'ipv6_map'
libbpf: prog 'classify': found map 5 (ipv6_map, sec 5, off 208) for insn #164
libbpf: sec '.relclassifier': relo #8: insn #185 against 'class_map'
libbpf: prog 'classify': found map 6 (class_map, sec 5, off 256) for insn #185
libbpf: sec '.relclassifier': relo #9: insn #257 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #257
libbpf: sec '.relclassifier': relo #10: insn #270 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #270
libbpf: sec '.relclassifier': relo #11: insn #275 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #275
libbpf: sec '.relclassifier': relo #12: insn #377 against 'class_map'
libbpf: prog 'classify': found map 6 (class_map, sec 5, off 256) for insn #377
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/config'
libbpf: map 'config': created successfully, fd=4
libbpf: pinned map '/sys/fs/bpf/qosify_data/config'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/flow_map'
libbpf: map 'flow_map': created successfully, fd=5
libbpf: pinned map '/sys/fs/bpf/qosify_data/flow_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/tcp_ports'
libbpf: map 'tcp_ports': created successfully, fd=6
libbpf: pinned map '/sys/fs/bpf/qosify_data/tcp_ports'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/udp_ports'
libbpf: map 'udp_ports': created successfully, fd=7
libbpf: pinned map '/sys/fs/bpf/qosify_data/udp_ports'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/ipv4_map'
libbpf: Error in bpf_create_map_xattr(ipv4_map):Invalid argument(-22). Retrying without BTF.
libbpf: map 'ipv4_map': created successfully, fd=8
libbpf: pinned map '/sys/fs/bpf/qosify_data/ipv4_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/ipv6_map'
libbpf: Error in bpf_create_map_xattr(ipv6_map):Invalid argument(-22). Retrying without BTF.
libbpf: map 'ipv6_map': created successfully, fd=9
libbpf: pinned map '/sys/fs/bpf/qosify_data/ipv6_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/class_map'
libbpf: map 'class_map': created successfully, fd=10
libbpf: pinned map '/sys/fs/bpf/qosify_data/class_map'
libbpf: map 'qosify_b.rodata': created successfully, fd=11

The command qosify-status gives you better view.
Pretty much the same output as "tc -s -d qdisc show", but filtered just for the interface that qosify is configured for.

It shows you how much traffic gets classified into which cake tin

 OpenWrt SNAPSHOT, r18371-5a4685cfa2
 -----------------------------------------------------
root@router1:~# qosify-status
===== interface wan: active =====
egress status:
qdisc cake 1: root refcnt 2 bandwidth 57Mbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms raw overhead 0
 Sent 94776984 bytes 272698 pkt (dropped 10, overlimits 35025 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 179008b of 4Mb
 capacity estimate: 57Mbit
 min/max network layer size:           42 /    1514
 min/max overhead-adjusted size:       42 /    1514
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh       3562Kbit       57Mbit    28500Kbit    14250Kbit
  target         5.11ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay          0us        151us          0us         58us
  av_delay          0us         31us          0us         41us
  sp_delay          0us         22us          0us         20us
  backlog            0b           0b           0b           0b
  pkts                0       263222            0         9486
  bytes               0     94065544            0       726240
  way_inds            0         2341            0          190
  way_miss            0        14620            0         8186
  way_cols            0            0            0            0
  drops               0           10            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            1            0            2
  bk_flows            0            1            0            0
  un_flows            0            0            0            0
  max_len             0        35376            0          132
  quantum           300         1514          869          434


ingress status:
qdisc cake 1: root refcnt 2 bandwidth 195Mbit diffserv4 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100ms raw overhead 0
 Sent 436589494 bytes 453100 pkt (dropped 124, overlimits 9001 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 1492764b of 9750000b
 capacity estimate: 195Mbit
 min/max network layer size:           48 /    1514
 min/max overhead-adjusted size:       48 /    1514
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh      12187Kbit      195Mbit    97500Kbit    48750Kbit
  target            5ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay         37us       3.38ms         64us         91us
  av_delay          2us       1.29ms         20us         39us
  sp_delay          2us         22us         20us         20us
  backlog            0b           0b           0b           0b
  pkts               22       443497          244         9461
  bytes            1374    435298807        15338      1444050
  way_inds            0         2261            0          190
  way_miss           16        18617          173         8175
  way_cols            0            0            0            0
  drops               0          124            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            1            0            2
  bk_flows            0            1            0            0
  un_flows            0            0            0            0
  max_len            74        68582           74          429
  quantum           371         1514         1514         1487
1 Like

and how do I set " wan " if my network is docsis ?

In /etc/config/qosify, under wan section.

option overhead_type docsis
1 Like

this shows qosify status

root@OpenWrt:~# qosify status
libbpf: loading /lib/bpf/qosify-bpf.o
libbpf: elf: section(2) classifier, size 3424, link 0, flags 6, type=1
libbpf: sec 'classifier': found program 'classify' at insn offset 0 (0 bytes), code size 428 insns (3424 bytes)
libbpf: elf: section(3) .rodata, size 4, link 0, flags 2, type=1
libbpf: elf: section(4) license, size 4, link 0, flags 3, type=1
libbpf: license of /lib/bpf/qosify-bpf.o is GPL
libbpf: elf: section(5) .maps, size 296, link 0, flags 3, type=1
libbpf: elf: section(6) .BTF, size 6509, link 0, flags 0, type=1
libbpf: elf: section(7) .BTF.ext, size 3472, link 0, flags 0, type=1
libbpf: elf: section(8) .symtab, size 1488, link 12, flags 0, type=2
libbpf: elf: section(9) .relclassifier, size 208, link 8, flags 0, type=9
libbpf: looking for externs among 62 symbols...
libbpf: collected 0 externs total
libbpf: map 'config': at sec_idx 5, offset 0.
libbpf: map 'config': found type = 2.
libbpf: map 'config': found pinning = 1.
libbpf: map 'config': found key [8], sz = 4.
libbpf: map 'config': found value [11], sz = 1.
libbpf: map 'config': found max_entries = 1.
libbpf: map 'flow_map': at sec_idx 5, offset 40.
libbpf: map 'flow_map': found type = 9.
libbpf: map 'flow_map': found pinning = 1.
libbpf: map 'flow_map': found key [8], sz = 4.
libbpf: map 'flow_map': found value [21], sz = 16.
libbpf: map 'flow_map': found max_entries = 8192.
libbpf: map 'tcp_ports': at sec_idx 5, offset 80.
libbpf: map 'tcp_ports': found type = 2.
libbpf: map 'tcp_ports': found pinning = 1.
libbpf: map 'tcp_ports': found key [8], sz = 4.
libbpf: map 'tcp_ports': found value [14], sz = 1.
libbpf: map 'tcp_ports': found max_entries = 65536.
libbpf: map 'udp_ports': at sec_idx 5, offset 120.
libbpf: map 'udp_ports': found type = 2.
libbpf: map 'udp_ports': found pinning = 1.
libbpf: map 'udp_ports': found key [8], sz = 4.
libbpf: map 'udp_ports': found value [14], sz = 1.
libbpf: map 'udp_ports': found max_entries = 65536.
libbpf: map 'ipv4_map': at sec_idx 5, offset 160.
libbpf: map 'ipv4_map': found type = 1.
libbpf: map 'ipv4_map': found pinning = 1.
libbpf: map 'ipv4_map': found key_size = 4.
libbpf: map 'ipv4_map': found value [36], sz = 2.
libbpf: map 'ipv4_map': found max_entries = 100000.
libbpf: map 'ipv4_map': found map_flags = 1.
libbpf: map 'ipv6_map': at sec_idx 5, offset 208.
libbpf: map 'ipv6_map': found type = 1.
libbpf: map 'ipv6_map': found pinning = 1.
libbpf: map 'ipv6_map': found key_size = 16.
libbpf: map 'ipv6_map': found value [36], sz = 2.
libbpf: map 'ipv6_map': found max_entries = 100000.
libbpf: map 'ipv6_map': found map_flags = 1.
libbpf: map 'class_map': at sec_idx 5, offset 256.
libbpf: map 'class_map': found type = 2.
libbpf: map 'class_map': found pinning = 1.
libbpf: map 'class_map': found key [8], sz = 4.
libbpf: map 'class_map': found value [46], sz = 12.
libbpf: map 'class_map': found max_entries = 18.
libbpf: map 'qosify_b.rodata' (global data): at sec_idx 3, offset 0, flags 480.
libbpf: map 7 is "qosify_b.rodata"
libbpf: sec '.relclassifier': collecting relocation for section(2) 'classifier'
libbpf: sec '.relclassifier': relo #0: insn #1 against '.rodata'
libbpf: prog 'classify': found data map 7 (qosify_b.rodata, sec 3, off 0) for insn 1
libbpf: sec '.relclassifier': relo #1: insn #8 against 'config'
libbpf: prog 'classify': found map 0 (config, sec 5, off 0) for insn #8
libbpf: sec '.relclassifier': relo #2: insn #87 against 'tcp_ports'
libbpf: prog 'classify': found map 2 (tcp_ports, sec 5, off 80) for insn #87
libbpf: sec '.relclassifier': relo #3: insn #93 against 'udp_ports'
libbpf: prog 'classify': found map 3 (udp_ports, sec 5, off 120) for insn #93
libbpf: sec '.relclassifier': relo #4: insn #106 against 'ipv4_map'
libbpf: prog 'classify': found map 4 (ipv4_map, sec 5, off 160) for insn #106
libbpf: sec '.relclassifier': relo #5: insn #149 against 'tcp_ports'
libbpf: prog 'classify': found map 2 (tcp_ports, sec 5, off 80) for insn #149
libbpf: sec '.relclassifier': relo #6: insn #155 against 'udp_ports'
libbpf: prog 'classify': found map 3 (udp_ports, sec 5, off 120) for insn #155
libbpf: sec '.relclassifier': relo #7: insn #164 against 'ipv6_map'
libbpf: prog 'classify': found map 5 (ipv6_map, sec 5, off 208) for insn #164
libbpf: sec '.relclassifier': relo #8: insn #185 against 'class_map'
libbpf: prog 'classify': found map 6 (class_map, sec 5, off 256) for insn #185
libbpf: sec '.relclassifier': relo #9: insn #257 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #257
libbpf: sec '.relclassifier': relo #10: insn #270 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #270
libbpf: sec '.relclassifier': relo #11: insn #275 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #275
libbpf: sec '.relclassifier': relo #12: insn #377 against 'class_map'
libbpf: prog 'classify': found map 6 (class_map, sec 5, off 256) for insn #377
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/config'
libbpf: map 'config': created successfully, fd=4
libbpf: pinned map '/sys/fs/bpf/qosify_data/config'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/flow_map'
libbpf: map 'flow_map': created successfully, fd=5
libbpf: pinned map '/sys/fs/bpf/qosify_data/flow_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/tcp_ports'
libbpf: map 'tcp_ports': created successfully, fd=6
libbpf: pinned map '/sys/fs/bpf/qosify_data/tcp_ports'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/udp_ports'
libbpf: map 'udp_ports': created successfully, fd=7
libbpf: pinned map '/sys/fs/bpf/qosify_data/udp_ports'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/ipv4_map'
libbpf: Error in bpf_create_map_xattr(ipv4_map):Invalid argument(-22). Retrying without BTF.
libbpf: map 'ipv4_map': created successfully, fd=8
libbpf: pinned map '/sys/fs/bpf/qosify_data/ipv4_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/ipv6_map'
libbpf: Error in bpf_create_map_xattr(ipv6_map):Invalid argument(-22). Retrying without BTF.
libbpf: map 'ipv6_map': created successfully, fd=9
libbpf: pinned map '/sys/fs/bpf/qosify_data/ipv6_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/class_map'
libbpf: map 'class_map': created successfully, fd=10
libbpf: pinned map '/sys/fs/bpf/qosify_data/class_map'
libbpf: map 'qosify_b.rodata': created successfully, fd=11
qosify status != qosify-status

Edit: hmm, just qosify-status

1 Like
root@OpenWrt:~# qosify status != qosify-status
libbpf: loading /lib/bpf/qosify-bpf.o
libbpf: elf: section(2) classifier, size 3424, link 0, flags 6, type=1
libbpf: sec 'classifier': found program 'classify' at insn offset 0 (0 bytes), code size 428 insns (3424 bytes)
libbpf: elf: section(3) .rodata, size 4, link 0, flags 2, type=1
libbpf: elf: section(4) license, size 4, link 0, flags 3, type=1
libbpf: license of /lib/bpf/qosify-bpf.o is GPL
libbpf: elf: section(5) .maps, size 296, link 0, flags 3, type=1
libbpf: elf: section(6) .BTF, size 6509, link 0, flags 0, type=1
libbpf: elf: section(7) .BTF.ext, size 3472, link 0, flags 0, type=1
libbpf: elf: section(8) .symtab, size 1488, link 12, flags 0, type=2
libbpf: elf: section(9) .relclassifier, size 208, link 8, flags 0, type=9
libbpf: looking for externs among 62 symbols...
libbpf: collected 0 externs total
libbpf: map 'config': at sec_idx 5, offset 0.
libbpf: map 'config': found type = 2.
libbpf: map 'config': found pinning = 1.
libbpf: map 'config': found key [8], sz = 4.
libbpf: map 'config': found value [11], sz = 1.
libbpf: map 'config': found max_entries = 1.
libbpf: map 'flow_map': at sec_idx 5, offset 40.
libbpf: map 'flow_map': found type = 9.
libbpf: map 'flow_map': found pinning = 1.
libbpf: map 'flow_map': found key [8], sz = 4.
libbpf: map 'flow_map': found value [21], sz = 16.
libbpf: map 'flow_map': found max_entries = 8192.
libbpf: map 'tcp_ports': at sec_idx 5, offset 80.
libbpf: map 'tcp_ports': found type = 2.
libbpf: map 'tcp_ports': found pinning = 1.
libbpf: map 'tcp_ports': found key [8], sz = 4.
libbpf: map 'tcp_ports': found value [14], sz = 1.
libbpf: map 'tcp_ports': found max_entries = 65536.
libbpf: map 'udp_ports': at sec_idx 5, offset 120.
libbpf: map 'udp_ports': found type = 2.
libbpf: map 'udp_ports': found pinning = 1.
libbpf: map 'udp_ports': found key [8], sz = 4.
libbpf: map 'udp_ports': found value [14], sz = 1.
libbpf: map 'udp_ports': found max_entries = 65536.
libbpf: map 'ipv4_map': at sec_idx 5, offset 160.
libbpf: map 'ipv4_map': found type = 1.
libbpf: map 'ipv4_map': found pinning = 1.
libbpf: map 'ipv4_map': found key_size = 4.
libbpf: map 'ipv4_map': found value [36], sz = 2.
libbpf: map 'ipv4_map': found max_entries = 100000.
libbpf: map 'ipv4_map': found map_flags = 1.
libbpf: map 'ipv6_map': at sec_idx 5, offset 208.
libbpf: map 'ipv6_map': found type = 1.
libbpf: map 'ipv6_map': found pinning = 1.
libbpf: map 'ipv6_map': found key_size = 16.
libbpf: map 'ipv6_map': found value [36], sz = 2.
libbpf: map 'ipv6_map': found max_entries = 100000.
libbpf: map 'ipv6_map': found map_flags = 1.
libbpf: map 'class_map': at sec_idx 5, offset 256.
libbpf: map 'class_map': found type = 2.
libbpf: map 'class_map': found pinning = 1.
libbpf: map 'class_map': found key [8], sz = 4.
libbpf: map 'class_map': found value [46], sz = 12.
libbpf: map 'class_map': found max_entries = 18.
libbpf: map 'qosify_b.rodata' (global data): at sec_idx 3, offset 0, flags 480.
libbpf: map 7 is "qosify_b.rodata"
libbpf: sec '.relclassifier': collecting relocation for section(2) 'classifier'
libbpf: sec '.relclassifier': relo #0: insn #1 against '.rodata'
libbpf: prog 'classify': found data map 7 (qosify_b.rodata, sec 3, off 0) for insn 1
libbpf: sec '.relclassifier': relo #1: insn #8 against 'config'
libbpf: prog 'classify': found map 0 (config, sec 5, off 0) for insn #8
libbpf: sec '.relclassifier': relo #2: insn #87 against 'tcp_ports'
libbpf: prog 'classify': found map 2 (tcp_ports, sec 5, off 80) for insn #87
libbpf: sec '.relclassifier': relo #3: insn #93 against 'udp_ports'
libbpf: prog 'classify': found map 3 (udp_ports, sec 5, off 120) for insn #93
libbpf: sec '.relclassifier': relo #4: insn #106 against 'ipv4_map'
libbpf: prog 'classify': found map 4 (ipv4_map, sec 5, off 160) for insn #106
libbpf: sec '.relclassifier': relo #5: insn #149 against 'tcp_ports'
libbpf: prog 'classify': found map 2 (tcp_ports, sec 5, off 80) for insn #149
libbpf: sec '.relclassifier': relo #6: insn #155 against 'udp_ports'
libbpf: prog 'classify': found map 3 (udp_ports, sec 5, off 120) for insn #155
libbpf: sec '.relclassifier': relo #7: insn #164 against 'ipv6_map'
libbpf: prog 'classify': found map 5 (ipv6_map, sec 5, off 208) for insn #164
libbpf: sec '.relclassifier': relo #8: insn #185 against 'class_map'
libbpf: prog 'classify': found map 6 (class_map, sec 5, off 256) for insn #185
libbpf: sec '.relclassifier': relo #9: insn #257 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #257
libbpf: sec '.relclassifier': relo #10: insn #270 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #270
libbpf: sec '.relclassifier': relo #11: insn #275 against 'flow_map'
libbpf: prog 'classify': found map 1 (flow_map, sec 5, off 40) for insn #275
libbpf: sec '.relclassifier': relo #12: insn #377 against 'class_map'
libbpf: prog 'classify': found map 6 (class_map, sec 5, off 256) for insn #377
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/config'
libbpf: map 'config': created successfully, fd=4
libbpf: pinned map '/sys/fs/bpf/qosify_data/config'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/flow_map'
libbpf: map 'flow_map': created successfully, fd=5
libbpf: pinned map '/sys/fs/bpf/qosify_data/flow_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/tcp_ports'
libbpf: map 'tcp_ports': created successfully, fd=6
libbpf: pinned map '/sys/fs/bpf/qosify_data/tcp_ports'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/udp_ports'
libbpf: map 'udp_ports': created successfully, fd=7
libbpf: pinned map '/sys/fs/bpf/qosify_data/udp_ports'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/ipv4_map'
libbpf: Error in bpf_create_map_xattr(ipv4_map):Invalid argument(-22). Retrying without BTF.
libbpf: map 'ipv4_map': created successfully, fd=8
libbpf: pinned map '/sys/fs/bpf/qosify_data/ipv4_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/ipv6_map'
libbpf: Error in bpf_create_map_xattr(ipv6_map):Invalid argument(-22). Retrying without BTF.
libbpf: map 'ipv6_map': created successfully, fd=9
libbpf: pinned map '/sys/fs/bpf/qosify_data/ipv6_map'
libbpf: found no pinned map to reuse at '/sys/fs/bpf/qosify_data/class_map'
libbpf: map 'class_map': created successfully, fd=10
libbpf: pinned map '/sys/fs/bpf/qosify_data/class_map'
libbpf: map 'qosify_b.rodata': created successfully, fd=11

Please just run "qosify-status" with "-" there...

( "!=" means "not equal" in some programming languages. That was not intended to be a full command, but advice for you...)

1 Like
root@OpenWrt:~# qosify-status
===== interface wan: active =====
egress status:
qdisc cake 1: root refcnt 6 bandwidth 23Mbit diffserv4 dual-srchost nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 36 mpu 64
 Sent 105949 bytes 1165 pkt (dropped 0, overlimits 341 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 6400b of 4Mb
 capacity estimate: 23Mbit
 min/max network layer size:           40 /    1423
 min/max overhead-adjusted size:       76 /    1459
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh       1437Kbit       23Mbit    11500Kbit     5750Kbit
  target         12.6ms          5ms          5ms          5ms
  interval        108ms        100ms        100ms        100ms
  pk_delay          0us         48us          0us          2us
  av_delay          0us          6us          0us          0us
  sp_delay          0us          4us          0us          0us
  backlog            0b           0b           0b           0b
  pkts                0         1164            0            1
  bytes               0       105858            0           91
  way_inds            0           82            0            0
  way_miss            0           37            0            1
  way_cols            0            0            0            0
  drops               0            0            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            3            0            1
  bk_flows            0            1            0            0
  un_flows            0            0            0            0
  max_len             0         1437            0           91
  quantum           300          701          350          300


ingress status:
qdisc cake 1: root refcnt 2 bandwidth 99Mbit diffserv4 dual-dsthost nonat nowash ingress no-ack-filter split-gso rtt 100ms noatm overhead 36 mpu 64
 Sent 1543306 bytes 1226 pkt (dropped 0, overlimits 364 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 18260b of 4950000b
 capacity estimate: 99Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       82 /    1536
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh       6187Kbit       99Mbit    49500Kbit    24750Kbit
  target            5ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay          2us        385us          0us          3us
  av_delay          0us         39us          0us          0us
  sp_delay          0us          5us          0us          0us
  backlog            0b           0b           0b           0b
  pkts                2         1219            0            5
  bytes             171      1542788            0          347
  way_inds            0            0            0            0
  way_miss            2           34            0            2
  way_cols            0            0            0            0
  drops               0            0            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            1            3            0            1
  bk_flows            0            1            0            0
  un_flows            0            0            0            0
  max_len           105         3096            0          107
  quantum           300         1514         1510          755

How can I reduce the bandwidth when someone downloads large files or torrent and vice versa when someone uploads large files to the cloud or backups or when someone sends heavy videos on WhatsApp or telegram or drive?

Read and learn what are DSCP marks. Then you will understand what this program do.

1 Like

I really would, but I don't have time, so I don't know if you could help me.

Since WhatsApp and Instagram is now owned by Facebook .fbcdn.net domain should be enough for them two.

# Facebook - WhatsApp - Instagram
dns:*.fbcdn.net  bulk

# Discord
dns:cdn.discordapp.com  bulk

Telegram, Signal is all IP based however qosify hasnt got to stage for IPs yet.

If any can help you with DSCP marking, Telegram have a set of CDIR with port 443 for uploads and downloads.

config rule
	option name 'Telegram'
	option family 'ipv4'
	option src 'lan'
	option dest 'wan'
	list dest_ip '149.154.160.0/20'
	option dest_port '443'
	option target 'DSCP'
	option set_dscp 'AF42'
3 Likes

this parameter where can I modify it?

/etc/qosify/00-defaults.conf

2 Likes

Ah, that would be why then. I'm using the "official" 21.02.1 release right now.

I'll have a go at grabbing the IPKs and installing manually

Does this work with native dualstack pppoe? Because i have to add the interface WAN but i have a virtual interface called WAN_6 which gets autocreated after a login. is that script also automatically active for ipv6 virtual interface?

Is there something like a MAN page for this addon btw?

thats what i have right now but its hard to test if its working or not:

config interface WAN
        option name wan
        option disabled 0
        option bandwidth_up 40mbit
        option bandwidth_down 100mbit
        option overhead_type pppoe-ptm
        option overhead_vlan 1
        # defaults:
        option ingress 1
        option egress 1
        option mode diffserv4
        option nat 1
        option host_isolate 1
        option autorate_ingress 1
        option ingress_options ""
        option egress_options ""
        option options ""

config device pppoe-wan
        option disabled 0
        option name wan
        option bandwidth 100mbit

Would anyone be kind as to share a common 00-defaults.conf of streaming services and common sites? Kindly appreciated.