ZL50408
Data Sheet
47
Zarlink Semiconductor Inc.
100% of the line rate. This scheme works as long as the overall high priority bandwidth is not over the line rate and
the latency on all the low priority traffic is don’t care. The lowest priority queue is treated as “best effort” queue.
The strict priority queue in the GMAC and CPU ports is similar to RMAC ports other than having 4 queues instead
of 2 queues. The priority queue P0 can be scheduled only if the priority queue P1 is empty, so as to priority queues
P2 and P3.
Because we do not provide any assurances for “best effort” traffic, we do not enforce latency by dropping best effort
traffic. Furthermore, because we assume that strict priority traffic is carefully controlled before entering the
ZL50408, we do not enforce a fair bandwidth partition by dropping strict priority traffic. To summarize, dropping to
enforce bandwidth or delay does not apply to strict priority or best effort queues. We only drop frames from best
effort and strict priority queues when queue size is too long or global / class buffer resources become scarce.
7.2.2
Weighted Fair Queuing
In some environments – for example, in an environment in which delay assurances are not required, but precise
bandwidth partitioning on small time scales is essential, WFQ may be preferable to a strict assurance scheduling
discipline. The ZL50408 provides this kind of scheduling algorithm on GMAC port only. The user sets four WFQ
“weights” such that all weights are whole numbers and sum to 64. This provides per-class bandwidth partitioning
with granular within 2%.
In WFQ mode, though we do not assure frame latency, the ZL50408 still retains a set of dropping rules that helps to
prevent congestion and trigger higher level protocol end-to-end flow control.
7.3
WRED Drop Threshold Management Support
To avoid congestion, the Weighted Random Early Detection (WRED) logic drops packets according to specified
parameters. The following table summarizes the behavior of the WRED logic.
Px is the total byte count, in the priority queue x, can be the strict priority queue of RMAC ports and higher 3 priority
queues for GMAC port. The WRED logic has two drop levels, depending on the value of Px. Each drop level has
defined high-drop and low-drop percentages, which indicate the minimum and maximum percentages of the data
that can be discarded. The X, Y Z percent can be programmed by the register RDRC0, RDRC1. All packets will be
dropped only if the system runs out of the specific buffer resource, per class buffer or per source port buffer. The
WRED thresholds of each queue can be programmed by the QOS control registers (refer to the register group 8).
See Programming QoS Registers application note, ZLAN-42, for more information.
7.4
Shaper
Although traffic shaping is not a primary function of the ZL50408, the chip does implement a shaper for every queue
in the GMAC port. Our goal in shaping is to control the average rate of traffic exiting the ZL50408. If shaper is
enabled, strict priority will be applied to that queue. The priority between two shaped queue is the same as in strict
priority scheduling.
Traffic rate is set using a programmable whole number, no greater than 64. For example, if the setting is 32, then
the traffic rate transmit out of the shaped queue is 32/64 * 1000 Mbps = 500 Mbps. See Programming QoS Register
application note, ZLAN-42, for more information.
Also, when shaping is enabled, it is possible for a queue to explode in length if fed by a greedy source. The reason
is that a shaper is by definition not work-conserving; that is, it may hold back from sending a packet even if the line
Px > WRED_L1
Px > WRED_L2
BM Reject
High Drop
X%
100%
Low Drop
Y%
Z%
100%
Table 8 - WRED Logic Behaviour