Znyx Networks bh5700 User Manual

Page 66

Advertising
background image

qdisc pfifo 100: dev zhp0 limit 32p

The tc command is applied to a device, so dev zhp0 must be specified. Note that a VLAN,
such as zhp0, and a port, such as zre0, are each treated as devices. Breakdown of the options:

handle 100:0

Defines the handle for the queuing discipline. This handle may be used to reference the pfifo

queue. Note that the handle is included with the output of the qdisc ls command.
(100:0 and 100: are equivalent in tc.) The choice of handle is significant for zqosd.

root

Tells tc that this is the base queuing discipline for the device, not a child of another queuing

discipline.

pfifo limit 32

Specifies a packet-limited FIFO queue with an upper bound of 32 packets.

Now, delete the queuing discipline from zhp0 and confirm that it has been removed:

tc qdisc del dev zhp0 root

tc qdisc ls

Thus far, tc has been used without zqosd. It is not sufficient to install software rules on the
OpenArchitect switch though, because the normal case is for packets to be switched in hardware.
For that reason, zqosd must be used to shadow tc configuration into hardware. Like
zfilterd, zqosd works with ztmd, which provides the actual hardware interaction.

If ztmd is not already running, start it:, then initiate the zqosd daemon with no parameters:

ztmd

zqosd

Now, repeat the same tc command as before, to install a packet-limited FIFO queue:

tc qdisc add dev zhp0 handle 100:0 root pfifo limit 32

When this command is processed, zqosd detects the state change and generates output.

For each port belonging to zhp0, the queue size has changed to 32 packets. Under the default
switch configuration, all ports other than the CPU port belong to zhp0; so all queues other than
the CPU queue are affected.

As before, remove the tc configuration with the command:

tc qdisc del dev zhp0 root

Note that zqosd detects this state change. In fact, examining the CoS configuration on the
switch reveals that the queue sizes have reverted to their default values.

Ethernet Switch Blade User's Guide

release 3.2.2j

page 66

Advertising