Issue setting QoS with morsectrl

Running into issue setting QoS with morse_ctrl.

Says output buffer too small when setting qos on queue ID 0, and then changes values on queue ID 2.

On reboot, QoS goes to default. How do I set QoS globally? And how do I define which QoS ID the application layer packets use? I’m sending video data, but when using Morse as a sniffer, on the PCAP it shows that the queue ID is 0 (best effort)

Hi @alexb

I’d recommend using hostap to configure QoS rather than morsectrl. morsectrl is for test purposes only.

We set the following defaults in our hostapd.conf for our OpenWrt evaluation kits

	set_default wmm_ac_bk_aifs 7
	set_default wmm_ac_bk_cwmin 4
	set_default wmm_ac_bk_cwmax 10
	set_default wmm_ac_bk_txop_limit 469
	set_default wmm_ac_bk_acm 0

	set_default wmm_ac_be_aifs 3
	set_default wmm_ac_be_cwmin 4
	set_default wmm_ac_be_cwmax 10
	set_default wmm_ac_be_txop_limit 469
	set_default wmm_ac_be_acm 0

	set_default wmm_ac_vi_aifs 2
	set_default wmm_ac_vi_cwmin 3
	set_default wmm_ac_vi_cwmax 4
	set_default wmm_ac_vi_txop_limit 469
	set_default wmm_ac_vi_acm 0

	set_default wmm_ac_vo_aifs 2
	set_default wmm_ac_vo_cwmin 2
	set_default wmm_ac_vo_cwmax 3
	set_default wmm_ac_vo_txop_limit 469
	set_default wmm_ac_vo_acm 0

        set_default wmm_enabled 1

From morse-feed/essentials/netifd-morse/lib/netifd/morse/morse_overrides.sh at 76f92454aa62f6ad0fa7bfa047dbe433a2a477d2 · MorseMicro/morse-feed · GitHub

The stations will follow the wmm settings of the AP if wmm_enabled is set in their supplicant config.

And how do I define which QoS ID the application layer packets use?

This is usually set by the application setting DSCP for the traffic. In C this might look something like below:

int dscp = 46 << 2; // Expedited Forwarding (EF)
setsockopt(sock, IPPROTO_IP, IP_TOS, &dscp, sizeof(dscp));

But if you don’t have control of the application source, then you could try iptables:

iptables -t mangle -A OUTPUT -p udp --dport 5060 -j DSCP --set-dscp-class EF

Note that I have not attempted either of the above yet, so I may have made some errors!