DPDK 学习4 -- DPDK的QOS框架

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

 
  1. Output Ethernet port 1/10/40 GbE.
  2. Multiple ports are scheduled in round robin order with all ports having equal priority.

2

Subport

Configurable (default: 8)

  1. Traffic shaping using token bucket algorithm (one token bucket per subport).
  2. Upper limit enforced per Traffic Class (TC) at the subport level.
  3. Lower priority TCs able to reuse subport bandwidth currently unused by higher priority TCs.

3

Pipe

Configurable (default: 4K)

  1. Traffic shaping using the token bucket algorithm (one token bucket per pipe.

4

Traffic Class (TC)

4

  1. TCs of the same pipe handled in strict priority order.
  2. Upper limit enforced per TC at the pipe level.
  3. Lower priority TCs able to reuse pipe bandwidth currently unused by higher priority TCs.
  4. When subport TC is oversubscribed (configuration time event), pipe TC upper limit is capped to a dynamically adjusted value that is shared by all the subport pipes.

5

Queue

4

  1. Queues of the same TC are serviced using Weighted Round Robin (WRR) according to predefined weights.

 

从上面描述可以了解DPDK 支持5级HQOS,每一级的调度方式已经固化,没有上面的LINUX QOS框架的灵活性,每一个层级解释如下:

1、Port代表物理网口,每个Port下最多64Subport(默认8个),每一个Subport可以代表一组用户,Port层使用RR调度,说明当前的DPDK的QOS出队不是每个Port单独调度的,而是所有的Port一起调度。

2、每个Subport节点下最多有1MPipe节点(默认4K),一个节点可以代表一组用户中的某个用户, Subport层,使用RR调度,使用TB限速。

3、每个Pipe节点下有4TC(traffic class)节点,每一个节点代表用户中的某一种流量类型,如数据、语音、媒体等业务流量类型,其中每一种TC可以有不同的速率、 延迟、抖动要求,Pipe使用RR调度,使用TB限速。

4、每一个TC节点下有4Queue节点,每个Queue节点代表一个真实的队列,TC层使用SP调度,使用TB限速。

5、Queue 层4个,采用WRR调度,Queue层才是真正的叶子节点,存放真正的报文。

猜你喜欢

转载自blog.csdn.net/armlinuxww/article/details/89392569