5NP4G
Egress Enqueuer / Dequeuer / Scheduler
6.3.3.1 Exponentially Weighted Moving Average
The hardware generates exponentially weighted moving average (EWMA) values for the Free queue count
and the P0/P1 twin counts, thus removing the burden of this calculation from the picocode. In general, EWMA
for a counter X is calculated as follows:
EWMA_X = (1 - K) * EWMA_X + K * X
This calculation occurs for a configured sample period and K ∈ {1, 1/2, 1/4, 1/8}.
6.3.3.2 Flow Control Hardware Actions
When the picocode enqueues a packet to be transmitted to a target port, the flow control logic examines the
state of the target port TH_PQ+FQ, and the priority of the enqueued packet to determine if any flow control
actions are required.
• If the FCInfo field of the FCBPage of the enqueued packet is set to x‘F’, flow control is disabled and the
packet is forwarded without regard to any of the congestion indicators.
• For priority 0 packets, if target port TH_PQ+FQ or P0 Twin Count Threshold is exceeded, then the packet
is discarded. The picocode must set up a counter block to count these discards.
• For priority 1 packets, if P1 Twin Count Threshold is exceeded, then the packet will be discarded. Other-
wise the transmit probability found in the QCB (available only when the Scheduler is enabled) and the
transmit probability table are accessed. The smaller of these values is compared against a random num-
ber ( ∈ { 0 ... 1} ) generated by the hardware. When the transmit probability is zero or is less than the ran-
dom number, the packet is discarded. The picocode must set up a counter block to count these discards.
The index into the transmit probability table is TTCCFP, where:
TT
CC
F
Packet type (Egress FCBpage FCInfo field bits 3:2).
DSCP assigned color (Egress FCBpage FCInfo field bits 1:0)
Threshold exceeded status of the target flow queue (QCB threshold exceeded)
P
Threshold exceeded status of the target port queue (Target port TH_PQ+FQ
exceeded)
5NP4G Network Processor, Data Sheet, DS-0125-02
January 2006
Egress Enqueuer / Dequeuer / Scheduler
Page 181 of 607