queue number + 1 after the qdisc handle. So the highest priority queue in this example is 105:8.

NOTE: 16 values must be provided for the priomap list. This is a feature of the Linux priority system, which uses 16 priority levels. The last eight values given will be ignored.

Weighted Round Robin Qdisc

A weighted round robin qdisc builds on the above definition by adding the list of weights which determine the order of scheduling from the queues:

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 wrr 1 1 4 2 3 3 3 3

The weights apply to the eight queues in order, with the lowest numbered queue being given the first weight. The weights determine the relative number of packets which will be sent from each queue. In this example, assuming each queue has the necessary packets, the order of transmission by queue number is:

7 6 5 4 3 2 1 0 7 6 5 4 3 2 7 6 5 4 2 2

This pattern repeats as long as there are packets to be transmitted in the queues.

Although the weights can be any integer value, they will be scaled so that the largest value is 15 or less and the smallest is at least 1.

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,

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:

Ethernet Switch Blade User's Guide

release 3.2.2j

page 114

Page 114
Image 114
Znyx Networks bh5700 manual Weighted Round Robin Qdisc, Fifo Queues pfifo and bfifo disciplines