The default, upstream DPAA kernel driver provides hardware offloading of packets prioritization. The driver’s documentation gives only a single paragraph regarding this feature:
The driver has support for multiple prioritized Tx traffic classes. Priorities range from 0 (lowest) to 3 (highest). These are mapped to HW workqueues with strict priority levels. Each traffic class contains NR_CPU TX queues. By default, only one traffic class is enabled and the lowest priority Tx queues are used. Higher priority traffic classes can be enabled with the mqprio qdisc. For example, all four traffic classes are enabled on an interface with the following command. Furthermore, skb priority levels are mapped to traffic classes as follows:
priorities 0 to 3 - traffic class 0 (low priority)
priorities 4 to 7 - traffic class 1 (medium-low priority)
priorities 8 to 11 - traffic class 2 (medium-high priority)
priorities 12 to 15 - traffic class 3 (high priority)
Code Block tc qdisc add dev <int> root handle 1: \ mqprio num_tc 4 map 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 hw 1
This section aims to elaborate on this topic by providing:
a detailed description of how the
tc
command can be used, what configuration exactly does it result in, how to control and debug it and how it relates to the DPAA architectural details,practical examples of using this feature with Linux’ cgroups and
iptables
,results of the experiments showcasing WHLE’s behavior in different traffic prioritization scenarios which should help evaluate the usefulness of this feature in specific cases.