DPDK HQoS: Enable Hierarchical Scheduler in VPP 48/2048/10
authorJasvinder Singh <jasvinder.singh@intel.com>
Thu, 21 Jul 2016 16:02:19 +0000 (17:02 +0100)
committerDamjan Marion <dmarion.lists@gmail.com>
Wed, 28 Sep 2016 16:37:28 +0000 (16:37 +0000)
commit85ecc810ca98550a250c74f32244760e459e3f87
tree5c26a0c4f7f382a89e747696c3bd0130f2ebb81f
parentac8146caf1f474f2c440f2316bbcc2d41245ff35
DPDK HQoS: Enable Hierarchical Scheduler in VPP

This commit extends the vpp framework with new thread type "hqos-threads" that
runs the Hierarchical Quality of Service (HQoS) scheduler associted with output
interface.  HQoS Scheduler prioritize the packets from different users and
ensures sufficient bandwidth to pass the more important traffic.

At high level, HQoS scheduler is a buffer that can temporarily store a
large number of packets. In otherwords, it is a collection of large number
of queues organized into hierarchy of 5 levels; the port (i.e. the physical
interface) is at the root of the hierarchy followed by the subport (a set
of users), the pipes (individual users), the traffic classes (each with a
strict priority) and at the leaves, the queues.

In each HQoS scheduler, three operations are performed; classification
(setting HQoS port, subport, pipe, traffic class and queue within traffic
class from packet fields), enqueue (selecting HQoS queue for the packet,
and to drop the packet if the queue is full) and dequeue (schedule the
packet based on its length and available credits, and handover the scheduled
packet to the output interface).

In vpp, the number of hqos threads will be equal to cpu cores specified in
corelist-hqos-threads parameter cpu section of the vpp configuration file.
One hqos thread can run HQoS for multiple output interfaces. A particular HQoS
instance is initialised with default parameters required to configure hqos port,
subport, pipe and queues. Some of them can be re-configured in run-time
through CLI commands as well binary APIs.

Following illustrates the sample startup configuration file with 4x worker
threads feeding 2x hqos threads that handle each HQoS for 1x output interface.
For more details on HQoS configuration please refer to DPDK Programmer's Guide.

dpdk {
socket-mem 16384,16384

dev 0000:02:00.0 {
num-rx-queues 2
hqos
}
dev 0000:06:00.0 {
num-rx-queues 2
hqos
}

num-mbufs 1000000
}

cpu {
  main-core 0
  corelist-workers  1, 2, 3, 4
  corelist-hqos-threads  5, 6
}

Change-Id: I635c3395a7c4ddf0a239ef77b0b0a31a6dfc4767
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
12 files changed:
vnet/Makefile.am
vnet/vnet/devices/dpdk/cli.c
vnet/vnet/devices/dpdk/device.c
vnet/vnet/devices/dpdk/dpdk.h
vnet/vnet/devices/dpdk/format.c
vnet/vnet/devices/dpdk/hqos.c [new file with mode: 0644]
vnet/vnet/devices/dpdk/init.c
vnet/vnet/devices/dpdk/qos_doc.md [new file with mode: 0644]
vpp-api-test/vat/api_format.c
vpp/vpp-api/api.c
vpp/vpp-api/custom_dump.c
vpp/vpp-api/vpe.api