Design

Software architecture

The Fast Path QoS Advanced can work in two modes:

  • Post-stack scheduling

  • In-stack scheduling

The modes are exclusive and can be changed only when no scheduler are active.

Post-stack scheduling

Post-stack QoS scheduling is performed after all network stack processing and only applies to physical interfaces.

Each CPU core may run as:

  • a worker core: it performes all usual fast path processing (packet receive, routing, filtering, encapsulation, IPsec, QoS classification…), following a run-to-completion model.

  • a scheduler core: it schedules packets and submits them to the NIC.

  • or both.

A packet is first processed by a worker core. If the packet needs to be sent out a physical interface with QoS enabled, it is processed by a classification stage, an optional per-interface and per-class metering stage, then is enqueued in an intercore packet queue (one per QoS class).

The QoS class queues are polled by scheduler cores, and packets are sent on the physical network interface according to a scheduling algorithm.

Each scheduler of a given QoS enabled physical interface is bound to a scheduler core.

../../../_images/qos-arch.svg

In-stack scheduling

In-stack scheduling is performed by any CPU core doing usual fast path processing. It applies to all types of physical and logical interfaces.

Whenever a scheduler is enabled on a interface, its packets are processed by a classification stage, an optional per-interface and per-class metering stage, then are enqueued in an intercore packet queue (one per QoS class).

Then either the core that enqueued the packet or another fast path core will schedule the packets according to the QoS policy, and resume the actual interface processing, so that the packets continue their lifecycle in the stack.

An interface QoS scheduler can run on any fast path core but runs only on a single one at any time.