Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • Part 4: Flow Control17
    • Why Flow Control
    • On/Off Flow Control
    • Credit-Based Flow Control
    • Credit Initialisation
    • The Credit Loop and Buffer Sizing
    • Credit Classes and Pools
    • Credit Return Latency and Batching
    • Credit Bugs
    • Window Flow Control
    • Rate-Based Shaping
    • Hop-by-Hop or End-to-End
    • Lossless or Lossy
    • Switching Modes
    • Head-of-Line Blocking
    • Choosing Flow Control
    • Protocols Compared: Flow Control
    • Drills: Flow Control
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 4: Flow Control
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 4: Flow Control
  4. Lossless or Lossy

Part 4 · Flow Control · Working (W)

Lossless or Lossy

A full buffer can stop the sender or drop the packet. What each choice costs, why on-chip networks never drop and Ethernet usually does, and the new failures a lossless network brings.

On this page

    Note

    Level: Working (W) · Answers: How much may I send before I hear back?

    Before this: Hop-by-Hop or End-to-End

    An on-chip network never drops a packet: if a buffer is full, the sender waits. A data-centre Ethernet switch, faced with the same full buffer, drops the frame and lets the endpoints sort it out. Both are well-engineered. They made opposite choices for the same moment, and each choice brings its own failures.

    When a buffer is full, should the network stop the sender or drop the packet?

    The obvious answer, and why it breaks

    Dropping data sounds like a bug, so the obvious answer is never to drop: make every link lossless. But a lossless network replaces lost packets with waiting, and waiting spreads. The back-pressure tree of lesson 4.11 can reach across a whole network, and if the waits form a cycle, nothing moves at all. Dropping is crude, but it keeps a congested part of the network from freezing the rest. Neither choice is free.

    The idea: two answers to a full buffer

    Lossless

    Lossy

    When the buffer is full

    The sender is stopped (credits, ready, PAUSE)

    The packet is dropped

    Who recovers

    Nobody needs to: nothing was lost

    The endpoints, by detecting the loss and resending (Part 10)

    Latency

    Low and predictable while uncongested; waits spread under congestion

    Low while uncongested; a loss costs a timeout or a round trip

    Congestion spreads?

    Yes, as back-pressure through shared buffers

    No: the congested buffer drops and stays local

    Deadlock possible?

    Yes, if buffer waits form a cycle (Part 9)

    No buffer deadlock: drops break every cycle

    Needs

    Per-hop flow control, careful buffer and channel design

    Reliable delivery at the ends, and tolerance of jitter

    Lossless networks wait; lossy networks drop and rely on the endpoints to resend.

    Why each world chose as it did

    • On chip, losing a packet is unaffordable. A dropped cache-line read or write must be recovered by hardware that does not otherwise exist; the round trips are a few cycles, so per-hop credits are cheap; and the topology is fixed, so deadlock can be designed out. On-chip networks are lossless.

    • Across a large network, per-hop control is costly and congestion is common. Links are long, topologies change, and many independent flows share switches. Dropping keeps congestion local, and the endpoints already need reliability for other reasons (the end-to-end argument, lesson 0.7). Classic Ethernet is lossy.

    • Some networks need both properties. Storage and remote-memory traffic hates losses (a resend costs far more than the wait), so those fabrics are built lossless even when they are large, and then must manage the costs.

    How real protocols chose

    Protocol or network

    Choice

    On-chip networks, PCI Express

    Lossless: per-link credits mean a packet is never sent without room for it. (PCIe's replay mechanism recovers from bit errors, not from full buffers.)

    InfiniBand, Fibre Channel

    Lossless: credit-based link-level flow control.

    Classic Ethernet

    Lossy: a switch with a full buffer drops the frame, and frames with a bad check sequence are dropped; TCP at the ends recovers.

    Ethernet for RDMA (RoCEv2)

    Made lossless with priority flow control (PAUSE per traffic class), which brought pause storms and deadlocks at data-centre scale.

    What breaks

    • Lossless: congestion spreading and deadlock. When Ethernet for remote memory access was made lossless with priority flow control, operators at data-centre scale saw a single misbehaving receiver send PAUSE frames that spread across many switches (a pause storm), and cyclic buffer dependencies that froze traffic entirely (a PFC deadlock). These are exactly the failures a lossless network trades drops for.

    • Lossy: losses that are too expensive. A lossy network carrying traffic whose endpoints recover slowly, with long timeouts, turns each drop into a stall of many round trips. If loss is rare, that is fine; under steady congestion it can collapse throughput.

    Why this matters

    Senior lens. Choosing lossless means taking on deadlock freedom and congestion spreading as design problems: you need a deadlock argument (Part 9), isolation between traffic classes, and a plan for a stuck endpoint. Choosing lossy means the endpoints must detect and recover from loss quickly, and the latency tail includes the recovery time. Write down which one a link is, because every buffer, timeout and verification plan depends on it.

    Interview

    Asked: "Why are on-chip networks lossless while Ethernet is lossy?"

    Weak answer: On-chip networks are more reliable.

    Strong answer: It is about recovery and cost. On chip, a dropped request would need recovery hardware that doesn't exist, round trips are a few cycles so credits are cheap, and the topology is fixed so deadlock can be designed out. In large Ethernet networks per-hop control over long links is costly, congestion is common, dropping keeps it local, and the endpoints already run reliable transport. When Ethernet is made lossless for RDMA with priority flow control, it gains the lossless failure modes: pause storms and deadlock from cyclic buffer dependencies.

    Follow-ups: (1) What new failure does a lossless network add? (2) Is PCIe lossless if it has a replay buffer?

    Check yourself Why can a lossless network deadlock when a lossy one cannot?

    In a lossless network a full buffer makes its upstream wait; if the waits form a cycle, no buffer can drain. A lossy network drops instead of waiting, which breaks every such cycle.

    Check yourself PCI Express has a replay buffer. Does that make it lossy?

    No. Credits ensure a packet is never sent without room, so full buffers never cause loss. Replay recovers from bit errors on the wire, a different kind of loss.

    Check yourself Name one cost a lossy network pushes onto its endpoints.

    Reliable delivery: detecting the loss (sequence numbers, timeouts) and resending, with the recovery time showing up in the latency tail.

    Key takeaways

    • A full buffer either stops the sender (lossless) or drops the packet (lossy).

    • Lossless avoids recovery but spreads congestion and can deadlock; lossy keeps congestion local but needs recovery at the ends.

    • On-chip networks and PCIe are lossless; classic Ethernet is lossy; lossless Ethernet for RDMA inherits pause storms and deadlock.

    Keep going

    Next: Lesson 4.13, Switching Modes. Wait for the whole packet, or forward as soon as the header arrives? Latency and buffering of three switching modes.

    Related topics

    • Part 4 overview: Flow Control

    Previous

    62 / 234

    Next: Switching Modes

    Up next

    Up nextSwitching Modes

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Why Flow Control
    • On/Off Flow Control
    • Credit-Based Flow Control