MikroTik follows no particular convention at all, I think. Everything RouterOS does is just copying certain fields into others, it is up to the user to assign meaning to that.
The "priority" field is just a field assigned to each packet, it does not change the handling of the packet by itself.
There are some places where it is used:
- it is copied into the 802.1q VLAN header where it may be used by a switch. usually in the switch it will be used to determine priority according to the scheme above.
- it can be used by Wireless when WMM is enabled. effectively the top 2 bits will be used to select one of 4 queues, again using that scheme.
When you want to use it in a queue, you are on your own. There is no direct way of using the priority field to determine priority in a queue tree.
Linux does support that, and it has a mapping table for it which you would then again fill with that strange sequence.
In RouterOS you need to use packet marks to accomplish that, like this:
/ip firewall mangleadd action=set-priority chain=postrouting comment="From dscp high 3 bits" \
new-priority=from-dscp-high-3-bits passthrough=yes
add action=mark-packet chain=postrouting comment="Priority 0" \
new-packet-mark=prio0 passthrough=no priority=0
add action=mark-packet chain=postrouting comment="Priority 1" \
new-packet-mark=prio1 passthrough=no priority=1
add action=mark-packet chain=postrouting comment="Priority 2" \
new-packet-mark=prio2 passthrough=no priority=2
add action=mark-packet chain=postrouting comment="Priority 3" \
new-packet-mark=prio3 passthrough=no priority=3
add action=mark-packet chain=postrouting comment="Priority 4" \
new-packet-mark=prio4 passthrough=no priority=4
add action=mark-packet chain=postrouting comment="Priority 5" \
new-packet-mark=prio5 passthrough=no priority=5
add action=mark-packet chain=postrouting comment="Priority 6" \
new-packet-mark=prio6 passthrough=no priority=6
add action=mark-packet chain=postrouting comment="Priority 7" \
new-packet-mark=prio7 passthrough=no priority=7
/queue tree
add limit-at=30M max-limit=30M name=inet parent=pppoe-inet
wireless-default
add limit-at=8M max-limit=28M name=inet-p1 packet-mark=prio7 parent=inet \
priority=1 queue=default
add limit-at=8M max-limit=28M name=inet-p2 packet-mark=prio6 parent=inet \
priority=2 queue=default
add limit-at=8M max-limit=28M name=inet-p3 packet-mark=prio5 parent=inet \
priority=3 queue=default
add limit-at=8M max-limit=28M name=inet-p4 packet-mark=prio4 parent=inet \
priority=4 queue=default
add limit-at=8M max-limit=28M name=inet-p5 packet-mark=prio3 parent=inet \
priority=5 queue=default
add limit-at=8M max-limit=28M name=inet-p6 packet-mark=prio0 parent=inet \
priority=6 queue=pcq-upload-default
add limit-at=8M max-limit=28M name=inet-p7 packet-mark=prio2 parent=inet \
priority=7 queue=default
add limit-at=8M max-limit=28M name=inet-p8 packet-mark=prio1 parent=inet \
queue=default
Note that the mark "prio2" refers to "top 3 bits of DSCP have value 002" here and that this is then translated into priority 7 for the queues.
It is a bit confusing that in the packet priority field higher value generally indicates higher priority, while in the queue tree priority field lower values is higher priority.
Here they are mapped by a series of rules, while in Linux itself you could do that with a single "priomap" table.