Configuring PFC Buffer
Overview
The buffer is configured to implement traffic control and PFC watchdog, which is based on interface and priority queue. The storage space of each interface is divided into different buffers independently and a certain action will be executed after the number of accumulated packets reaches the buffer threshold.
Guaranteed: the dedicated buffer available for a specified queue. This buffer space cannot be used by other queues.
Shared: the public buffer available for all queues. The shared buffer will be occupied when the guaranteed buffer reaches the threshold.
Headroom: the maximum number of cell resources available for packets with a specific 802.1p priority. When the occupied shared buffer reaches the threshold, the packets will be saved in the headroom buffer.
Threshold and Execution action
After the PFC function is enabled, the default storage space is available for a specified queue of an interface. To flexibly control the PFC function and make good use of the storage space, you can configure the thresholds for different buffer types and the correspongding action will be executed. The detailed information is shown as below.
Figure 1. Communication between upstream and downstream switches
Figure 2. Buffer threshold and execution action of an interface
Initially, the packets of a specified queue on an interface are saved in the guaranteed buffer. When the occupied space is higher than the guaranteed buffer threshold, the shared buffer will be occupied.
When the occupied space is higher than the shared buffer threshold, the ingress interface and egress interface of the downstream switch will execute different actions.
a) For the ingress interface, it will generate and send Pause frames to the egress interface of the upstream switch to stop sending packets. The Pause frames will stop being generated when the occupied space is reduced to a certain level (the shared threshold minus the offset value). When the occupied space is higher than the global threshold, the packets will be saved in the headroom buffer.
b) For the egress interface, the packets will be directly saved in the headroom buffer.
When the occupied space is higher than the headroom buffer threshold, the packets will be dropped.
Restrictions and Guidelines
When you configure PFC buffer, follow these restrictions and guidelines:
PFC should be enabled on the interface before configuring PFC buffer.
PFC buffer is only supported on Trident3-X5, Trident3-X7 and Tomahawk3 platforms.
Procedure
Step 1 Enable PFC on the interface before configuring PFC buffer.
set class-of-service pfc-profile <pfc-profile-name> [code-point <cos> drop <true | false>]
set class-of-service interface <interface-name> pfc-profile <pfc-profile-name>
Step 2 Set the upper threshold of guaranteed buffer for a PFC queue on the ingress interface. When the guaranteed buffer threshold is reached, the packets will be saved in the shared service pool.
set interface gigabit-ethernet <interface-name> ethernet-switching-options buffer ingress-queue <queue-id> guaranteed <value>
Step 3 Set the upper threshold of shared buffer for a PFC queue on the ingress interface. When the occupied buffer space exceeds the specified threshold, the Pause frame will be generated and sent to the egress interface. You can specify the threshold in the static (a fixed value) or dynamic (percentage) way.
Only one way can be configured, or the error prompt will appear.
set interface gigabit-ethernet <interface-name> ethernet-switching-options buffer ingress-queue <queue-id> shared-ratio <value>
set interface gigabit-ethernet <interface-name> ethernet-switching-options buffer ingress-queue <queue-id> threshold <value>
Step 4 Set the offset value of shared buffer for a PFC queue on the ingress interface. The Pause frames will stop being generated when the occupied space is reduced to a certain level (the upper threshold minus the offset value).
set interface gigabit-ethernet <interface-name> ethernet-switching-options buffer ingress-queue <queue-id> reset-offset <value>
Step 5 Set the global threshold of shared buffer for a PFC queue on all ingress interfaces. When the global threshold is reached, the packets will be saved in the headroom buffer.
set interface ethernet-switching-options buffer service-pool <pool-id> threshold <value>
Step 6 Set the upper threshold of headroom buffer for a PFC queue on the ingress interface. When the headroom buffer threshold is reached, the interface will drop received packets.
set interface gigabit-ethernet <interface-name> ethernet-switching-options buffer ingress-queue <queue-id> headroom <value>
Step 7 Set the upper threshold of shared buffer for a PFC queue on the egress interface of the downstream switch. When the occupied buffer space exceeds the specified threshold, the packets will be saved in the headroom buffer. You can specify the threshold in the static (a fixed value) or dynamic (percentage) way.
Only one way can be configured, or the error prompt will appear.
set interface gigabit-ethernet <interface-name> ethernet-switching-options buffer egress-queue <queue-id> shared-ratio <value>
set interface gigabit-ethernet <interface-name> ethernet-switching-options buffer egress-queue <queue-id> threshold <value>
Step 8 Commit the configuration.
commit
Copyright © 2024 Pica8 Inc. All Rights Reserved.