Extensions to the default matches, Tc: traffic control, Strict priority qdisc – Znyx Networks bh5700 User Manual

Page 113

Advertising
background image

Extensions to the default matches

These are described in the Linux packet filtering HOWTO at:

http://netfilter.org/documentation/index.html#documentation-howto

ZNYX FORWARDING Chain supports all of them.

tc: Traffic Control

The switch supports up to eight queues for each port, including the cpu port. These queues hold
packets waiting to be transmitted for a given port. A scheduler selects the next packet to be
transmitted from one of these queues based on one of three scheduling algorithms: strict priority,
round robin, and weighted round robin.

tc, which stands for Traffic Control, is a mechanism for enabling Quality of Service on Linux.
tc supports the strict priority and weighted round robin algorithms, which it refers to as queuing
disciplines . tc uses three functional objects: queuing disciplines (qdiscs), which comprise
queuing and scheduling algorithms such as FIFO queues, priority queues, RED queues, and token
buckets; classes, which are leafs in queuing discipline hierarchies; and filters, such as u32 filters
and route filters. In addition to these three building blocks, tc also includes policers and meters,
which may be associated with filters.

The functional elements of tc may be combined to produce complex QoS rules. For example, a
packet may be matched to a filter, metered, policed as in-profile or out-of-profile, remarked,
mapped to a FIFO queue, and transmitted by a priority scheduler. tc is very flexible in the data
paths that it allows.

The utility zqosd is a daemon that monitors Linux QoS policy and shadows the policy rules into
a hardware configuration. When zqosd is running, tc rules are translated into hardware rules.

NOTE: This document does not detail all of the capabilities of the tc command, rather it
explicitly mentions only features that are supported by OpenArchitect-based switches.

The examples that follow assume that the switch is running the standard Layer 2 start-up script,
/etc/rcZ.d/examples/S50layer2, with all ports placed in a single VLAN, zhp0. Note that
this assumption is implied only by the fact that changes to zhp0 are shown to configure all ports.
Neither tc nor zqosd is limited by the interface setup. Each utility works on either VLANs
(zhp) or ports (zre).

Strict Priority Qdisc

A typical tc definition of a strict priority qdisc is:

tc qdisc add dev zre5 handle 105: prio bands 8 priomap 0 1 2 3 4 5 6
7 0 0 0 0 0 0 0 0

This defines a strict priority qdisc for port zre5 with 8 priority queues and a default mapping
from 802.1p packet priority to queue. A strict priority scheduler takes packets from the highest
numbered queue which is not empty. The handle is used to reference the qdisc and the individual
queues which have been declared. The handle for a priority queue is formed by appending the

Ethernet Switch Blade User's Guide

release 3.2.2j

page 113

Advertising