Each buffer pool supports a high-priority RED slope and a low-priority RED slope. The high-priority RED slope manages access to the shared portion of the buffer pool for high-priority or in-profile packets. The low-priority RED slope manages access to the shared portion of the buffer pool for low-priority or out-of-profile packets. In addition, egress access, network pools, and megapools support a highplus slope that manages access to the shared portion of the buffer pool for inplus-profile packets and an exceed slope that manages access to the shared portion of the buffer pool for exceed-profile packets.
For access and network buffer pools, the percentage of the buffers that are to be reserved for CBS buffers is configurable. This setting indirectly assigns the number of shared buffers on the pool. This is an important function that controls the ultimate average and total shared buffer utilization value calculation used for RED slope operation. The CBS setting can be used to dynamically maintain the buffer space on which the RED slopes operate.
When a queue depth exceeds the queue’s CBS, packets received on that queue must contend with other queues exceeding their CBS for shared buffers. To resolve this contention, the buffer pool uses two RED slopes to determine buffer availability on a packet-by-packet basis.
Packets that were either classified as high priority or considered in-profile are handled by the high-priority RED slope. This slope should be configured with RED parameters that prioritize buffer availability over packets associated with the low-priority RED slope. Packets that had been classified as low-priority or out-of-profile are handled by this low-priority RED slope. At egress, the highplus slope should be configured with RED parameters that prioritize the inplus priority above the other priority traffic and the exceed-slope should be configured with RED parameters that prioritize the high-priority and low-priority traffic above the exceed-profile traffic.
The following is a simplified overview of how a RED slope determines shared buffer availability on a packet basis:
The RED function keeps track of shared buffer utilization (SBU) and Shared Buffer Average Utilization (SBAU).
At initialization, the SBU is zero and the SBAU is zero.
When each packet is received, the current SBAU is plotted on the slope to determine the packet’s discard probability.
A random number is generated associated with the packet and is compared to the discard probability.
The lower the discard probability, the lower the chances are that the random number is within the discard range.
If the random number is within the range, the packet is discarded, which results in no change to the utilization or average utilization of the shared buffers.
A packet is discarded if the utilization variable is equal to the shared buffer size or if the used CBS (actually in use by queues, not just defined by the CBS) is oversubscribed and has stolen buffers from the shared size, lowering the effective shared buffer size equal to the SBU size.
If the packet is queued, a new SBAU is calculated using the time-average-factor (TAF) for the buffer pool. The TAF describes the weighting between the previous SBAU result and the new SBU in determining the new SBAU (see Tuning the SBAU calculation).
The new SBAU is used as the SBAU the next time that a packet’s probability is plotted on the RED slope.
When a packet is removed from a queue (if the buffers returned to the buffer pool are from the shared buffers), the SBU is reduced by the number of buffers returned. If the buffers are from the CBS portion of the queue, the returned buffers do not result in a change in the SBU.
A RED slope is a graph with an X (horizontal) and Y (vertical) axis. The X-axis plots the percentage of shared buffer average utilization, going from 0 to 100%. The Y-axis plots the probability of packet discard marked as 0 to 1. The actual slope can be defined as four sections in (X, Y) points. Figure: RED slope characteristics shows the RED slope characteristics:
Section A is (0, 0) to (start-avg, 0). This is the part of the slope where the packet discard value is always 0, preventing the RED function from discarding packets when the shared buffer average utilization falls between 0 and start-avg.
Section B is (start-avg, 0) to (max-avg, max-prob). This part of the slope describes a linear slope where packet discard probability increases from 0 to max-prob.
Section C is (max-avg, max-prob) to (max-avg, 1). This part of the slope describes the instantaneous increase of packet discard probability from max-prob to 1. A packet discard probability of 1 results in an automatic discard of the packet.
Section D is (max-avg, 1) to (100%, 1). On this part of the slope, the shared buffer average utilization value of max-avg to 100% results in a packet discard probability of 1.
Plotting any value of shared buffer average utilization results in a value for packet discard probability from 0 to 1. Changing the values for start-avg, max-avg, and max-prob allows the adaptation of the RED slope to the needs of the access or network queues using the shared portion of the buffer pool, including disabling the RED slope.