Znyx Networks bh5700 ユーザーズマニュアル

ページ / 359
The byte-limited FIFO queue case differs only slightly from the packet-limited FIFO case.  The 
syntax is almost identical.  In hardware the limit is based on 128-byte cells. The specified byte 
limit is divided by 128 to determine the cell limit. Always specify a byte limit of at least 128 
bytes to avoid setting the queue length to zero.
For example, to set the byte limit for zhp0 to 4096,
tc qdisc add dev zhp0 handle 100:0 root bfifo limit 4096
Tear down any installed rules before proceeding with the next example:
tc qdisc del dev zhp0 root
PRIO and WRR queues
The FIFO examples used a single queue for each interface.  In fact, the Ethernet Switch Blade 
fabric switch is capable of attaching 1 to 8 queues to each port, with either priority or weighted 
round robin (WRR) scheduling, and classification based on a priority map. 
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 final example in this document 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 is the 
Ethernet Switch Blade User's Guide
release  3.2.2j
page 67