VPP HQOS处理报文整体框架如下图所示:
上图的QOS就是DPDK实现的HQOS,它的层次如下,官网摘录:
The scheduling hierarchy As shown below. The first level of the hierarchy is the Ethernet TX port 1/10/40 GbE, with subsequent hierarchy levels defined as subport, pipe, traffic class and queue.
Typically, each subport represents a predefined group of users, while each pipe represents an individual user/subscriber. Each traffic class is the representation of a different traffic type with specific loss rate, delay and jitter requirements, such as voice, video or data transfers. Each queue hosts packets from one or multiple connections of the same type belonging to the same user.
The functionality of each hierarchical level is detailed in the following table.
# |
Level |
Siblings per Parent |
Functional Description |
1 |
Port |
|
|
2 |
Subport |
Configurable (default: 8) |
|
3 |
Pipe |
Configurable (default: 4K) |
|
4 |
Traffic Class (TC) |
4 |
|
5 |
Queue |
4 |
|
从上面描述可以了解DPDK 支持5级HQOS,每一级的调度方式已经固化,没有上面的LINUX QOS框架的灵活性,每一个层级解释如下:
1、Port代表物理网口,每个Port下最多64个Subport(默认8个),每一个Subport可以代表一组用户,Port层使用RR调度,说明当前的DPDK的QOS出队不是每个Port单独调度的,而是所有的Port一起调度。
2、每个Subport节点下最多有1M个Pipe节点(默认4K),一个节点可以代表一组用户中的某个用户, Subport层,使用RR调度,使用TB限速。
3、每个Pipe节点下有4个 TC(traffic class)节点,每一个节点代表用户中的某一种流量类型,如数据、语音、媒体等业务流量类型,其中每一种TC可以有不同的速率、 延迟、抖动要求,Pipe层使用RR调度,使用TB限速。
4、每一个TC节点下有4个Queue节点,每个Queue节点代表一个真实的队列,TC层使用SP调度,使用TB限速。
5、Queue 层4个,采用WRR调度,Queue层才是真正的叶子节点,存放真正的报文。