What is Credit-based flow control?

A scheme in which the receiver advertises free buffer space as credits and the sender transmits only within them, so buffers never overflow.

Field: I/O Interfaces & Buses

Japanese name: クレジット方式のフロー制御

How it works

When the link initializes, the receiver tells the sender how much its buffer can hold, expressed as credits. The sender keeps a count of remaining credits, decrements it with every packet, and waits when it runs short. As the receiver processes packets and frees buffer space, it returns the corresponding credits. Because the sender only transmits into known free space, packets are never dropped for lack of buffer space and never need resending for that reason, which makes credit-based flow control the basic mechanism of lossless links.

Buffer size and link speed

Credits come back only after a round trip: the packet's transmission, processing at the receiver, and the credit's return. To keep sending at full bandwidth throughout, the receiver's buffer must hold at least bandwidth × round-trip time worth of data. With a smaller buffer the sender spends time waiting for credits and the effective bandwidth falls. Longer and faster links need larger buffers.

Where it is used, and alternatives

PCI Express tracks credits separately for each request type (Posted, Non-Posted and Completion) and separately for headers and data, updating them with short data-link-layer packets (DLLPs). CXL, InfiniBand and on-chip networks-on-chip use credits too, and keeping separate credits per virtual channel stops congestion in one traffic class from spreading to others. Ethernet PAUSE frames work differently: the receiver asks the sender to stop once a threshold is crossed, so buffer space must be kept free for data already in flight.

Try it: questions about Credit-based flow control

Which describes the credit-based flow control used in PCI Express?

  1. AThe receiver advertises its free buffer space as credits, and the sender transmits packets only within those credits
  2. BThe sender transmits regardless of the receiver, and overflowing packets are discarded
  3. CUsers are billed according to the amount of data sent
Show answer and explanation

Answer: A. The receiver advertises its free buffer space as credits, and the sender transmits packets only within those credits

Sending a packet into a full receive buffer would waste effort in discarding and resending it. With credits, the receiver tells the sender how much more it can accept, the sender transmits only within that amount, and the receiver returns credits as it processes packets and frees buffer space. Overflow never occurs, so there is no discarding and resending.

Books on I/O Interfaces & Buses Ad

As an Amazon Associate I earn from qualifying purchases.

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary