Configuring Priority-based Flow Control (PFC)

Overview

Priority-based Flow Control (PFC) is a type of flow control mechanism. The advantage of PFC over traditional flow control mechanisms is that PFC provides flow control based on per-code-point (priority). In other words, PFC offers a more granular form of flow control. This means that if traffic from one particular priority suffers from congestion, only that traffic is paused until the congestion clears, while traffic for other priorities continues unhindered. On each physical port, there are 8 (0 to 7) Class of Service (CoS) queues. If congestion is detected on the egress physical port, the ingress port will send a PAUSE frame to the transmitting node to pause transmission until the receiving node is ready to accept packets again. PFC applies only to packets entering a port.

PFC has a higher priority than traditional flow control. For example, if both flow control and PFC are configured on the same port, PFC will take precedence over traditional flow control.

PFC uses the IEEE 802.1p CoS values in the IEEE 802.1Q VLAN tag to generate the flow control frame with the corresponding priority on the ingress physical port when the egress physical port suffers congestion. This indicates that the ingress port requires CoS classifier configuration.

Key Features of PFC

  1. Lossless Transmission: PFC ensures lossless transmission for high-priority traffic classes by pausing traffic when congestion is detected, preventing packet loss.

  2. Per-Priority Flow Control: Unlike traditional Ethernet flow control, which applies to all traffic on a link, PFC operates on individual traffic priorities, allowing selective flow control.

  3. Congestion Management: By preventing packet loss for specific traffic classes, PFC helps manage congestion and improve overall network performance.

Working Mechanism of PFC

PFC operates using the following key components and steps:

  1. Traffic Classification: Network traffic is classified into different priorities based on the IEEE 802.1p standard, which defines eight priority levels (0-7). Each priority level corresponds to a specific type of traffic, such as storage, voice, or best-effort data.

  2. Priority Mapping: The switch maps traffic to these priority levels using VLAN tags (802.1Q) or Differentiated Services Code Point (DSCP) values. Each priority level is associated with a separate queue within the switch.

  3. Congestion Detection: When a switch detects congestion in one of its priority queues (e.g., due to high traffic volume or insufficient buffer space), it generates a PFC frame for that specific priority level.

  4. PFC Frame Transmission: The PFC frame, also known as a PAUSE frame, is sent to the upstream device (e.g., another switch or a network interface card in a server). This frame instructs the upstream device to pause the transmission of traffic for the specified priority level.

  5. Traffic Pause: Upon receiving the PFC frame, the upstream device temporarily stops sending traffic of the specified priority to the congested switch. Other traffic classes (priorities) continue to flow without interruption, ensuring that only the affected traffic is paused.

  6. Congestion Alleviation: The switch continues to process and forward the paused traffic until the congestion is alleviated. Once the buffer space is available, the switch sends another PFC frame to the upstream device to resume the paused traffic flow.

  7. Resume Transmission: The upstream device resumes sending traffic for the previously paused priority, restoring normal traffic flow.

Advantages of PFC

  1. Improved Performance: By preventing packet loss for high-priority traffic, PFC ensures that critical applications, such as storage and real-time communications, perform reliably.

  2. Enhanced Network Efficiency: PFC allows network devices to manage congestion more effectively, reducing the likelihood of network bottlenecks and improving overall network efficiency.

  3. Coexistence of Traffic Types: PFC enables different types of traffic to coexist on the same network infrastructure without interfering with each other, supporting the convergence of storage, data, and voice traffic.

Restrictions and Guidelines

When you configure PFC, follow these restrictions and guidelines:

  • It is essential to ensure that the PFC functionality is enabled on all ports through which the packets flow.

  • To prevent packet loss due to congestion during transmission, please configure the same PFC settings on all ports through which the packets flow.

Configuring PFC

Procedure

Step 1         Configure PFC Profile.

By default, PFC is enabled.

PFC is disabled when drop value is set to true and enabled when drop value is set to false. The default value of drop is false. 

set class-of-service pfc-profile <pfc-profile-name> code-point <cos> drop <true | false>

Step 2         Apply PFC profile to the interface.

set class-of-service interface <interface-name> pfc-profile <pfc-profile-name>

Step 3         Commit the configuration.   

commit

Show PFC Frame Statistics on Port

After complete the configuration, the command run show class-of-service interface <interface-name> can be used to show the class of service statistics information on specified interface.

Configuration Example

The following commands complete the configurations:

  • Configure PFC profile pfc1.

  • Apply PFC profile to the port ge-1/1/1.

admin@PICOS# set class-of-service pfc-profile pfc1 admin@PICOS#set class-of-service interface ge-1/1/1 pfc-profile pfc1
  • Show the class of service statistics information on specified interface.

The class 0~7 in PFC frame corresponds to the following "802.1P" item. The value of ”RxPFC“ item will be incremented by 1 if ge-1/1/1 receives a PFC frame. The value of ”TxPFC“ item will be incremented by 1 if ge-1/1/1 sends out a PFC frame.

admin@PICOS# run show class-of-service interface ge-1/1/1 Interface : ge-1/1/1 802.1P Priority Flow Control RxPFC TxPFC ----------- --------------------- --------------- --------------- 0 false 0 500 1 false 0 0 2 false 0 71 3 false 0 0 4 false 0 0 5 false 0 0 6 false 0 102 7 false 0 0 trust mode : no-trust Default ieee-802.1 : 0 Default dscp : 0 Default inet-precedence : 0 Local-priority Queue-Schedule Code-points -------------- --------------------------- ------------------------- 0 SP,0kbps 1 SP,0kbps 2 SP,0kbps 3 SP,0kbps 4 SP,0kbps 5 SP,0kbps 6 SP,0kbps 7 SP,0kbps

 

Copyright © 2024 Pica8 Inc. All Rights Reserved.