FORWARDING Chain supports all of them.
tc
and
zqosd
tc
, which stands for Traffic Control, is a mechanism for enabling Quality of Service on Linux.
tc
uses three functional objects: queuing
disciplines
, 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
).
FIFO Queues (pfifo and bfifo disciplines)
The simplest configuration for
tc
involves no classes or filters, and only a single FIFO queue.
With
tc
, queue sizes may be specified in bytes or packets. The first example defines a packet-
limited FIFO. This example begins with only
tc
and then illustrates
tc
in conjunction with
zqosd
.
As a first step, confirm that no
tc
configuration is active on the switch, by listing any queue
disciplines:
tc qdisc ls
The command should return nothing. Now, add a single packet-limited FIFO queue to
zhp0
and
confirm that it has been installed to software:
tc qdisc add dev zhp0 handle 100:0 root pfifo limit 32
tc qdisc ls
The output should display the following,
Ethernet Switch Blade User's Guide
release 3.2.2j
page 65
Downloaded from
www.Manualslib.com
manuals search engine