What Is Credit-based Flow Control (CFC)?
Credit-based Flow Control (CFC) is a technology that implements flow control based on proactive credit authorization. CFC establishes a credit authorization mechanism between the sender and receiver to ensure that the sender does not send data that exceeds the buffer capability of the receiver, preventing buffer overflow on the receiver.
Why Do We Need CFC?
Traditional PFC is a passive backpressure mechanism. It sends a PFC frame when the buffer usage reaches the threshold. During the period from the time when a device sends a PFC frame to the time when the device stops receiving traffic from the peer device, the device must have sufficient buffer space to absorb the traffic sent from the peer device, so as to ensure lossless transmission. CFC establishes a credit authorization mechanism between the sender and receiver, ensuring that the amount of data from the sender does not exceed the credit (available buffer size) of the receiver. Specifically, the sender sends packets to the receiver based on the credit authorized by the receiver. This ensures that the sender does not send data that exceeds the buffer capability of the receiver, preventing buffer overflow on the receiver. Compared with PFC, CFC saves buffer resources and supports lossless transmission over longer distances.
How Does CFC Work?
CFC controls traffic transmission based on credit authorization. A device sends traffic only when the credit authorized by the receiver is sufficient. This prevents the transmitted traffic from exceeding the buffer capability of the receiver.
CFC implementation
The preceding figure shows the CFC working process, which is described as follows:
- The sender sets an initial credit based on the queue buffer capability of the receiver.
- The sender sends a packet to the receiver. After the packet leaves the queue, the sender calculates the credit to be consumed based on the packet length, and then subtracts the consumed amount from its credit. For example, if the original credit of the sender is 1000, after the sender sends a packet that consumes a credit of 5, the remaining credit is 995 (1000 - 5 = 995).
The sender sends a packet only when the remaining credit is sufficient. If the remaining credit is insufficient (for example, the remaining credit is 3, but the credit to be consumed by the packet to be sent is 5), the sender does not send the packet.
- After receiving the packet, the receiver calculates the credit of the packet based on the same rule after the packet leaves the queue, and then returns the credit to the sender through an ACK packet.
- After receiving the ACK packet, the sender reclaims the credit, increasing its credit by the amount carried in the ACK packet. If the sender's remaining credit is 995 and the credit returned by the ACK packet is 5, then the credit after reclamation is 1000 (995 + 5 = 1000).
- Author: Gao Yangyang
- Updated on: 2026-04-17
- Views: 3049
- Average rating:
Export PDF