Znyx Networks bh5700 manual Ethernet Switch Blade Users Guide Release 3.2.2j

Models: bh5700

1 359
Download 359 pages 3.51 Kb
Page 122
Image 122

In tc, the prio queuing discipline establishes multiple queues and specifies their associated priority map. Although WRR support is not part of the standard tc distribution, it has been added to the prio disciplinE.

The following example illustrates WRR. A strict priority scheduler is a simpler case that can be constructed easily from this example.

Examine the existing CoS settings on the switch, noting the number of queues per port, queue sizes, scheduling parameters, and priority map. Each of these values changes with this test.

The full set of commands to install four queues, a priority map, and weights is as follows:

tc qdisc add dev zhp0 handle 100:0 root prio bands 4 priomap 1 2 2 2 3 3 3 3 1 1 1 1 1 1 1 1 wrr 1 2 4 6

tc qdisc add dev zhp0 parent 100:1 pfifo limit 120 tc qdisc add dev zhp0 parent 100:2 pfifo limit 100

tc

qdisc

add

dev

zhp0

parent

100:3

pfifo

limit

80

tc

qdisc

add

dev

zhp0

parent

100:4

pfifo

limit

60

The first command attaches a queuing discipline as the root discipline for zhp0, with a handle of “100:0,” as in the FIFO cases. The “prio” option identifies the type of queuing discipline.

Priority scheduling implies multiple queues and the “bands 4” parameters specify that there are four queues.

The priority map may be read from left to right as Priority n maps to Queue q, where n is the index of the list element (numbering from 0) and q is the value specified by that element. So, this example would read:

Priority 0 maps to Queue 1 Priority 1 maps to Queue 2 Priority 2 maps to Queue 2 Priority 3 maps to Queue 2 Priority 4 maps to Queue 3

NOTE: The tc priority map applies to a 4-bit field. With the Ethernet Switch Blade, the priority map refers to the 802.1p tag, which is a 3-bit field. When translating this tc rule to hardware, only Priorities 0 through 7 are significant; the other eight priorities are ignored.

The parameters wrr 1 2 4 6 specify that WRR scheduling is being used and assigns a relative weight to each queue. The weights are treated as numbers of packets to be sent from each queue. In this example, if the queues have sufficient packets, queue 1 will have twice as

Ethernet Switch Blade User's Guide

release 3.2.2j

page 122

Page 122
Image 122
Znyx Networks bh5700 manual Ethernet Switch Blade Users Guide Release 3.2.2j