DexterLab

🚨 New downloadable modules coming soon📘 Electrical Signaling & PHY Interfaces — new overview📘 Electrical I/O Standards — new overview📘 Integration between Theory and Design Library in progress

Reassembly & Segmentation — Architecture & Use Cases

Introduction

Reassembly and segmentation are complementary mechanisms that allow communication systems to adapt data units to protocol constraints, buffer limitations, and transport‑layer requirements.
Segmentation divides large data streams into smaller packets suitable for transmission, while reassembly reconstructs the original data from multiple received segments.
These mechanisms are essential for protocols that enforce maximum packet sizes, support variable payloads, or rely on reliability and ordering guarantees.

This page describes the architecture of segmentation and reassembly, their role in the packet‑processing pipeline, the interaction with flow control and transport layers, and practical considerations for high‑performance implementations.

Why Segmentation and Reassembly Are Needed

Maximum Packet Size Constraints

Protocols impose limits such as:

  • Maximum Transmission Unit (MTU)
  • Maximum Payload Size (MPS)
  • Maximum TLP size (PCIe)
  • Frame size limits (Ethernet)

Segmentation ensures compliance with these constraints.

Buffer and Flow Control Limitations

Downstream components may have:

  • limited buffer space
  • credit‑based flow control
  • strict latency requirements

Segmentation allows packets to fit within available resources.

Reliability and Ordering

Transport layers often require:

  • sequence numbering
  • retransmission of individual segments
  • ordered delivery

Reassembly ensures that the original data stream is reconstructed correctly.

Segmentation Architecture

1. Data Input

Segmentation receives:

  • continuous data streams
  • large DMA transfers
  • application‑level messages
  • transport‑layer segments

The input may exceed protocol limits.

2. Boundary Determination

Segmentation boundaries are determined by:

  • maximum payload size
  • flow control state
  • available credits
  • protocol‑specific rules
  • latency constraints

This ensures that each segment is valid and transmittable.

3. Header Generation

Each segment receives its own header containing:

  • sequence numbers
  • length fields
  • protocol identifiers
  • flow control metadata

This allows segments to be processed independently.

4. Payload Slicing

The payload is sliced into chunks that fit within the allowed size.
Variable‑length segmentation may be used to optimize throughput.

5. Trailer Generation

Each segment receives:

  • CRC or checksum
  • optional FEC metadata
  • end‑of‑segment markers

This ensures integrity at the segment level.

6. Segment Dispatch

Segments are forwarded to:

  • MAC
  • transport layer
  • scheduler
  • flow control engine

Each segment is treated as an independent packet.

Reassembly Architecture

1. Segment Reception

Reassembly receives segments from:

  • MAC
  • transport layer
  • depacketizer

Segments may arrive:

  • out of order
  • with gaps
  • with duplicates

2. Sequence Number Tracking

Reassembly uses:

  • sequence numbers
  • segment IDs
  • flow IDs

These ensure correct ordering and detection of missing segments.

3. Buffering

Segments are stored in:

  • per‑flow reassembly buffers
  • sliding windows
  • reorder queues

Buffer management is critical for performance.

4. Integrity Checks

Each segment is validated using:

  • CRC
  • length checks
  • protocol‑specific rules

Invalid segments trigger retransmission or discard.

5. Stream Reconstruction

Once all segments are received:

  • payloads are concatenated
  • headers and trailers are removed
  • the original data stream is restored

6. Delivery

The reassembled data is delivered to:

  • application layer
  • DMA engine
  • memory subsystem
  • protocol handler

This completes the receive path.

Interaction with Flow Control

Segmentation and reassembly interact closely with flow control mechanisms:

  • Credit‑based flow control limits the number of outstanding segments.
  • Sliding windows define how many segments can be in flight.
  • Retransmission logic operates at segment granularity.
  • Congestion management uses segment‑level metrics.

Segmentation must adapt dynamically to flow control state to avoid overflow or deadlock.

Error Handling

Segmentation Errors

  • invalid payload size
  • insufficient credits
  • buffer overflow
  • protocol violations

Reassembly Errors

  • missing segments
  • duplicate segments
  • out‑of‑window segments
  • CRC failures
  • timeout or reassembly expiration

Error Responses

Depending on the protocol:

  • retransmission
  • packet discard
  • flow control updates
  • error counters
  • link‑level recovery

Robust error handling ensures reliable communication.

Performance Considerations

Throughput

Segmentation and reassembly must sustain:

  • line‑rate throughput
  • multi‑lane parallelism
  • minimal backpressure

Parallel reassembly engines are common in high‑speed systems.

Latency

Reassembly latency depends on:

  • segment arrival order
  • buffer availability
  • retransmission delays

Protocols with strict latency requirements use fixed‑size segments.

Resource Usage

These mechanisms consume:

  • memory for reassembly buffers
  • logic for sequence tracking
  • counters and timers
  • metadata bandwidth

Efficient buffer management is essential for scalability.

Real‑World Examples

Ethernet

  • fragmentation at higher layers (IP)
  • reassembly in IP/TCP layers
  • MTU enforcement

PCIe

  • segmentation into TLPs
  • strict MPS limits
  • reassembly in the Transaction Layer

USB4

  • packet segmentation for virtual channels
  • reassembly based on routing IDs and sequence numbers

JESD204

  • deterministic latency segmentation
  • multi‑lane reassembly
  • frame and multiframe alignment

Each protocol adapts segmentation and reassembly to its performance and reliability goals.

Related Pages

Summary

Segmentation and reassembly enable communication systems to adapt data units to protocol constraints, buffer limitations, and reliability requirements.
Segmentation divides large data streams into manageable packets, while reassembly reconstructs the original data from multiple segments.
Together, they ensure efficient, reliable, and scalable data transport across diverse protocols and architectures.