Qosify: new package for DSCP marking + cake

How do I tell Qosify to use all the cores on my router?

Not sure about the eBPF component, but cake itself is not able to be spread over multiple CPUs, at best you can separate the ingress and egress cake instances to different CPUs

but would it have any improvement or would it be the same?

If you are running out of CPU shaping traffic, it will help.

and how do i activate it?

Quick note, over in another thread it seems port based marking can work in a very simple qosify configuration: https://forum.openwrt.org/t/sqm-cable-docsis-3-1-settings-packet-prioritization/126790/80?u=moeller0

Could it be that the port based marking is simply over-ruled/overwritten by a rule executed later?

so this is my qosify config:

Did i do something wrong or are there any optimizations for my config ? I´m on a 1000/50 cable connection and i just want my gaming traffic to be prioritized so what i need would be some method that can port match and listen to ports and prioritize the ingress and egress packets. Is there some way to do that ?

I had attempted to create a priority list of the different options a while back. Not sure it is still accurate, or if it ever was accurate.

Thanks. In that list has 1 higher or lower priority than 2.?

1 is higher priority than 2.

Thanks, than priority is not the cause why port rules sometimes do not seem to work....

1 Like

Ports are always considered to be the “remote” port from the interface’s perspective. The code checks src or dst port, depending on ingress or egress direction of the flow.

https://git.openwrt.org/?p=project/qosify.git;a=blob;f=qosify-bpf.c;h=407485bb055797d614f7633e08668088298d378d;hb=HEAD#l268

2 Likes

Thanks! Given the prevalence of NAT for IPv4 that decision makes some sense (as the internal host's port might be re-mapped arbitrarily (so that the internal port number varies depending on which side of the NAT boundary a packet is looked at) and hence is not reliably predictable)...

Hello, how does one use this package?
I couldn't seem to get any hints or guides. Either that or something's wrong with my installation.

Environment is
x86/64 OpenWrt SNAPSHOT r19704-efff48529b / LuCI Master git-22.137.71281-d6dbedd

My OpenWRT setup is a transparent CAKE bridge between my ONT and downstream router.
I was previously using CAKE-autorate in combination with luci-sqm-scripts. Ingress interface is br-lan.4001 and egress is br-lan.4000.

qosify is marked as running in services, and is enabled. I have tried installing the latest qosify package in snapshot for x86_64. I haven't had any luck with ubus calls. Either they error or don't return a thing. ubus call qosify dump works.

ubus call qosify config returns nothing, trying ubus call qosify config reset returns Command failed: Parsing message data failed. ubus call qosify reset returns Command failed: Method not found.

qosify-status returns nothing.

Does anyone have a guide to get it working or something? I'm lost.

Hey guys I am trying to get GeforceNOW streaming service into the video bucket. I tried reinstalling, reboot and reload from the terminal but I still cannot get it the right bucket. I tried removing the plus sign also from the conf. Initially i had it using AF41 but change it to +video but still cannot get packets into the video bucket. Everything seems to just move to best effort bucket.

root@openwrt:~# qosify-status
===== interface wan: active =====
egress status:
qdisc cake 8001: root refcnt 9 bandwidth 940Mbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 44 mpu 84
 Sent 1775067802 bytes 11643046 pkt (dropped 0, overlimits 163299 requeues 14)
 backlog 0b 0p requeues 14
 memory used: 88096b of 15140Kb
 capacity estimate: 940Mbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:       84 /    1544
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh      58750Kbit      940Mbit      470Mbit      235Mbit
  target            5ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay          0us          8us          1us          4us
  av_delay          0us          3us          0us          1us
  sp_delay          0us          2us          0us          1us
  backlog            0b           0b           0b           0b
  pkts                0     11637948            2         5096
  bytes               0   1774605932          108       461762
  way_inds            0      5403063            0            0
  way_miss            0        77567            2          466
  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            5            1            1
  bk_flows            0            1            0            0
  un_flows            0            0            0            0
  max_len             0        27252           54          132
  quantum          1514         1514         1514         1514


ingress status:
qdisc cake 8002: root refcnt 2 bandwidth 940Mbit diffserv4 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100ms noatm overhead 44 mpu 84
 Sent 53579288614 bytes 39800133 pkt (dropped 17, overlimits 17701976 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 1957760b of 15140Kb
 capacity estimate: 940Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       90 /    1544
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh      58750Kbit      940Mbit      470Mbit      235Mbit
  target            5ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay          0us         69us          5us         14us
  av_delay          0us         15us          0us          6us
  sp_delay          0us          1us          0us          2us
  backlog            0b           0b           0b           0b
  pkts                0     39799346            2          802
  bytes               0  53579254954          120        56500
  way_inds            0       607963            0            0
  way_miss            0       100126            2          264
  way_cols            0            0            0            0
  drops               0           17            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            5            1            0
  bk_flows            0            1            0            0
  un_flows            0            0            0            0
  max_len             0        68130           60          130
  quantum          1514         1514         1514         1514

/etc/qosify/00-defaults.conf

# DNS
tcp:53		voice
tcp:5353	voice
udp:53		voice
udp:5353	voice

# GFN
tcp:49003-49007		+video
udp:49003-49007		+video

# NTP
udp:123		voice

# SSH
tcp:22		+video

# HTTP/QUIC
tcp:80		+besteffort
tcp:443		+besteffort
udp:80		+besteffort
udp:443		+besteffort

/etc/config/qosify

config defaults
	list defaults /etc/qosify/*.conf
	option dscp_prio video
	option dscp_icmp +besteffort
	option dscp_default_udp besteffort
	option prio_max_avg_pkt_len 500

config class besteffort
	option ingress CS0
	option egress CS0

config class bulk
	option ingress LE
	option egress LE

config class video
	option ingress AF41
	option egress AF41

config class voice
	option ingress CS6
	option egress CS6
	option bulk_trigger_pps 100
	option bulk_trigger_timeout 5
	option dscp_bulk CS0

config interface wan
	option name wan
	option disabled 0
	option bandwidth_up 940mbit
	option bandwidth_down 940mbit
	option overhead_type ethernet
	# defaults:
	option ingress 1
	option egress 1
	option mode diffserv4
	option nat 1
	option host_isolate 1
	option autorate_ingress 0
	option ingress_options ""
	option egress_options ""
	option options "overhead 44"

config device wandev
	option disabled 1
	option name wan
	option bandwidth 100mbit

By default, the wan interface is disabled in /etc/config/qosify. Set disabled to 0 and review other settings there.

Customize IPs, ports or DNS names in /etc/qosify/00-defaults.conf.

Tech readme at:
https://git.openwrt.org/?p=project/qosify.git;a=blob;f=README;h=10d0c55b8a4d067b3d65ae9974e599c26aead763;hb=HEAD

Are these the remote destination ports (versus the local machine’s ports)? Qosify only works with remote port numbers. Also remove the + to ensure it always matches, regardless of original DSCP value.

Sorry. managed to get it working. I'm a complete newbie to OpenWRT. Setting disabled to 0 worked. Then I tried to change the interface to the br-lan.4000. Couldn't get that to work, so I tried using device instead, and it worked.

I suppose what confused me was the lack of error messages of probably invalid config. Is there any way to have the program act more verbose next time I change the settings?

Yes, I believe those are remote ports. I followed the guide on bottom of https://nvidia.custhelp.com/app/answers/detail/a_id/4504/ for the necessary ports needed to prioritise service.

From the linked text:
'Turn off any network firewalls. Some Firewalls can affect performance or even prevent you from connecting to our data centers.'

In all honesty I recommend to NOT use nvidia's streaming game service until they remove such actively misleading advice from their recommendations page. They clearly are part of the problem here....

Other than that I would recommend to use tcpdump on the router while playing to confirm the port (ranges) actually used and check whether these are local and/or remote ports.

2 Likes