Using DSCP for QoS

I don't think there IS a receive side, WMM only affects transmit? Or at least not sure what you mean here.

Your point about rate limits and starvation are well taken. At least for the AP you can sanitize dscp at the border router, this is the intent of DSCP, that it's not really end to end but only local domain specific with reclassification at the border.

On the other hand, for something like a rogue client device it's impossible to prevent an Android phone from sending everything in the VO queue. But that's already true regardless of what you do in the AP.

Good point, I had hoped for a marking in the over-the-air frames that contain information about the sender's intention. I also tried to figure out on my macbook whether I could get the tx statistics that would be the missing receive stats frm the router's perspective, but there I got stuck...

Well, if I understand the qos_map correctly, it will be distributed to the stations and override the local mappings. But I have not figured out how to actually measure whether that works yet.... I guess that just slightly increases the required level of rogue-ness...

Best Regards

Ah, I wasn't aware of that.

In any case, I can't figure out any way to actually put this qos_map into the hostapd file that's created in /tmp/run/hostapd-phyx.conf etc on OpenWRT. I tried grepping to trace through some of the scripts that must generate this file, but it's too opaque for me. It'd be nice to be able to set this from UCI or even just to put customizations in some template file somewhere that are merged in or whatever. My goal is just to have my prioritizations on my network be consistent end-to-end from Router to Client device, and/or to turn off all qos on my guest network.

qos_map doesn't work with hostapd that comes with openwrt. (missing some includes?)

1 Like

Okay, that is a) a bit sad and b) thank god that I did not spend any more time on this project yet. Time to get a non openwrt machine equipped with a wifi adapter and install "proper" hostapd for testing, and only after that try to get this going in openwrt...

Correction:
qos_map is enabled/part of "interworking" feature.
So CONFIG_INTERWORKING has to be enabled in hostapd configure configs.
But the compilation fails afterwards.
I didn't spend any more time to figure out what is going on :<

1 Like

Supposing some version has it enabled on openwrt, how do you get the config into the hostapd file?

Hmm maybe something like this:

Edit:
/lib/netifd/hostapd.sh

Add line 268:
append bss_conf "qos_map_set=0,3,255,255,8,15,255,255,16,23,24,39,40,45,46,63,255,255" "$N"

This works.

But i would like to make this work through uci config file.

In
hostapd_common_add_bss_config
(Line 142)
I added
config_add_string qos_map

In
hostapd_set_bss_options
i added qos_map under json_get_vars (line 226-235)

Also added (line 270)
[ -n "$qos_map" ] && append bss_conf "qos_map_set=$qos_map" "$N"

In /etc/config/wifi
added
option qos_map '0,3,255,255,8,15,255,255,16,23,24,39,40,45,46,63,255,255'

But it doesn't work :expressionless:

Digging this discuss up because it's relevant to a recent thread on QoS: Ultimate SQM settings: Layer_cake + DSCP marks

It looks like since we had this discussion OpenWrt 18 series came out, did that improve the situation with qos_map in OpenWrt?

I didn't test the qos_map feature with 18.06 yet. But i guess it is still not working because the interworking feature is still not build in. I wonder if WMM is even working without that...
Last time i tested only 1 queue seems to get used...

I also need to update the script, because it's now possible to directly assign packets/traffic to the cake tins with tc.

What packages did you use?