5G PDCP Complete Guide — Functions, Headers, Timers, Reordering, and Data Recovery (Article + Video)

5G PDCP Complete Guide — Functions, Headers, Timers, Reordering, and Data Recovery (Article + Video)

Introduction

PDCP is one of the most important layers in the 5G user-plane stack. It sits above RLC/MAC and directly impacts security, header size, packet ordering, and end-to-end latency.

In this article, the focus is PDCP deep dive: the PDCP header, PDCP functions, key timers (especially discardTimer and t-Reordering), and how PDCP interacts with upper layers like TCP at a high level.

[Figure 1: PDCP position in the user-plane protocol stack (UE/gNB: PDCP–RLC–MAC–PHY)

What you will learn:

This article will cover:

  • Where PDCP sits in the 5G user plane (E2E view)
  • PDCP header fields (D/C, PDCP SN, MAC-I)
  • PDCP functions overview (compression, integrity, ciphering, duplication, split bearers, reordering)
  • discardTimer (PDCP transmission buffer) and why it matters
  • Header compression (ROHC): concept + DT verification
  • Split bearers, routing, and duplication (ENDC / Dual Connectivity)
  • PDCP reordering: t-Reordering and its impact on latency/throughput
  • outOfOrderDelivery flag (when PDCP can deliver out of sequence)
  • Common RAN causes of out-of-order packets
  • PDCP retransmission (Data Recovery) during mobility
  • PDCP state variables (TX_NEXT, RX_NEXT, RX_DELIV, RX_REORD)

(1) High-level concept

What is PDCP and where is it used?

  • PDCP is part of the user-plane protocol stack between SDAP and RLC (in 5G SA architecture, PDCP is hosted in the gNB-CU while RLC/MAC/PHY are in the gNB-DU).
    • The PDCP Layer supports a maximum SDU size of 9000 bytes. This allows the transfer of Ethernet Jumbo frames which have a maximum size of 9000 bytes and are typically used on networks supporting at least 1 Gbps (Standard Ethernet frames have a maximum size of 1522 bytes)
    • Each Radio Bearer is allocated a single PDCP Entity which is responsible for processing the uplink and downlink data
  • PDCP adds a header including PDCP SN, which is used for reordering at the receiver.
  • PDCP is also where you typically see security features (integrity/ciphering) and header compression.

(2) PDCP layer tasks (what happens to a packet)

What is the primary function of PDCP?

PDCP main tasks include:

  1. Transmission buffer + SN allocation
  2. Header compression (ROHC) (optional)
  3. Integrity protection (mandatory for SRB1/SRB2, optional for DRB)
  4. Ciphering (optional for DRB; can be disabled for a specific DRB)
  5. Routing / split bearers (Dual Connectivity scenarios)
  6. Duplication (send same packet on multiple legs for reliability)
  7. Reordering + in-order delivery (receiver-side buffering controlled by t-Reordering)
  8. Data recovery (PDCP retransmission) for lossless mobility

[Figure 2: PDCP functions overview list


(3) Detailed technical breakdown (Header and Main functions)

3.1 PDCP header (Data PDU)

The session starts by simplifying the PDCP header (compared to RLC, PDCP header is simpler).

Main fields shown:

  • D/C: identifies whether it is a Data or Control PDU
    • D/C = 0 → Control PDU
    • D/C = 1 → Data PDU (main focus in the session)
  • R: reserved bits
  • PDCP SN: used for tracking, reordering, and duplicate detection
  • DATA: payload (may be compressed and/or ciphered)
  • MAC-I: used with integrity/ciphering
    • Mandatory for control plane
    • Optional for user-plane DRBs (can be enabled/disabled depending on configuration)
[Figure 3: PDCP Data PDU header (D/C, R, PDCP SN, DATA, MAC-I)

3.2 PDCP transmission buffer and discardTimer

When PDCP receives a packet (SDU) from upper layers, it is buffered in the PDCP transmission buffer.

Key points:

  • discardTimer represents the maximum time the RAN allows to successfully deliver a packet.
  • The PDCP SDU stays buffered until:
    • A status report indicates successful reception, or
    • discardTimer expires
  • If discardTimer expires, the packet is discarded from PDCP buffer.

Important practical note highlighted:

  • If a discarded packet already had a PDCP SN assigned, discarding can create a sequence number gap.
  • This gap can trigger PDCP reordering delay at the receiver (because the receiver may wait for the missing SN).
[Figure 4: PDCP discard timer concept + buffer illustration


3.3 PDCP header compression (ROHC)

ROHC is used to reduce the size of IP headers (especially useful for small payload packets like voice).

Key points shown:

  • ROHC can reduce header size to about 1–3 bytes.
  • Benefits:
    • Improves capacity (smaller packets)
    • Can improve BLER behavior by effectively allowing more power per bit (as described in the slide)
  • The example shows a context-based compression idea (shared context between compressor and decompressor).
  • ROHC is highlighted as user-plane only.
[Figure 5: ROHC framework + “reduce header to 1–3 bytes”


3.4 How to verify ROHC in DT logs (UE capability + configuration)

Two checks are shown:

  1. UE capability message: verify the UE supports ROHC profiles
  2. RRC Reconfiguration: verify whether header compression is activated/deactivated for the DRB
[Figure 6: DT verification (UE capability + RRC Reconfig showing ROHC profiles)

3.5 Split bearers, routing, and duplication (ENDC / Dual Connectivity)

This section is mainly tied to Dual Connectivity / ENDC behavior.

Key points :

  • PDCP can route packets to different RLC entities.
  • In ENDC, the PDCP in the 5G node may route packets via X2 to RLC entities in the 4G node.
  • PDCP can generate duplicate packets for parallel transmission over different legs (4G and 5G).
    • This increases reliability but adds overhead.
    • Receiver discards duplicates if both copies arrive successfully.
  • In uplink, the UE may split uplink traffic when PDCP/RLC data volume exceeds ul-DataSplitThreshold.
[Figure 7: ENDC split bearer routing + duplication diagram
💡
*ul-DataSplitThreshold= infinity means no uplink data split

3.6 PDCP reordering and in-order delivery (t-Reordering)

t-Reordering is a receiver-side timer that controls how long PDCP buffers packets while waiting for missing PDCP SNs.

Example explained below:

  • Receiver gets PDCP SN 0 and SN 1, but SN 2 is missing.
  • Receiver also receives SN 3.
  • SN 3 is delayed (buffered) while PDCP waits for SN 2 and starts t-Reordering.
  • Once t-Reordering expires, SN 3 is delivered to upper layers (out of sequence).
  • This buffering delay can:
    • Increase latency
    • May Reduce TCP window size incase of frequent out of sequence packet delivery
[Figure 8: PDCP reordering example (missing SN 2 → delay SN 3 until timer expiry)


3.7 outOfOrderDelivery flag

At the UE/Receiver Side (DL DATA), the outOfOrderDelivery flag can be used to specify that receiving PDCP is not required to provide in-sequence delivery.

If enabled (flag true in the example):

  • PDCP can deliver packets immediately without waiting for missing packets.
  • This can improve latency if upper layers can operate without strict in-sequence delivery.

As shown in the below figure, the buffered packets are passed directly to the higher layer of PDCP SN=3

[Figure 9: outOfOrderDelivery behavior (deliver SN 3 without waiting for SN 2)
Full TCP behavior analysis (reordering, SACK, RTO dynamics, congestion window impact): will be covered in another article

3.8 Possible causes of out-of-order packets (RAN perspective)

The slide provides a practical list of common causes:

  • Carrier Aggregation (CA) (MAC): different CC latencies
  • Dual Connectivity (DC) (PDCP): split across LTE/NR (e.g., ENDC) or between two NR nodes
  • HARQ retransmissions (MAC): earlier packets may arrive later after retransmission
  • RLC retransmissions (RLC AM): missing PDUs retransmitted after newer packets already arrived
  • Flow control (PDCP/RLC): discarding a PDCP SDU with an assigned SN creates SN gaps → increases reordering delay
  • X2 interface status (PDCP to RLC): delay/congestion on X2 impacts DC legs
[Figure 10: Table of possible causes for out-of-order packets

3.9 PDCP retransmission (Data Recovery) during mobility

PDCP retransmission can be used as a data recovery and is especially important for lossless mobility scenarios.

Key points:

  • PDCP data recovery retransmits all unacknowledged PDCP Data PDUs.
  • Unlike ARQ/HARQ (which retransmit specific packets), PPDCP data recovery handles a broader retransmission of unconfirmed data.
  • This is crucial during handovers between DUs (lossless handover).
  • In 5G SA architecture, there is no direct DU-to-DU interface for data forwarding, so PDCP handles recovery.
  • Source gNB-DU sends a Downlink Data Delivery Status frame to inform gNB-CU about unsuccessfully transmitted downlink data.
[Figure 11: PDCP data recovery during inter-gNB-DU mobility

(4) Key parameters (and where to find them)

ParameterWhat it controlsWhere it appears (RRC / logs)Practical note
discardTimerMax time a PDCP SDU can stay in TX bufferPDCP-Config in RRC Reconfiguration / DT logsToo low can cause SN gaps → more reordering delay
pdcp-SN-SizeUL / pdcp-SN-SizeDLPDCP SN size (12 or 18 bits)PDCP-ConfigImpacts SN space and ordering behavior
headerCompressionNot used / ROHC / uplinkOnlyROHCPDCP-Config + UE capabilityMust confirm UE supports ROHC profiles
integrityProtectionEnable integrityPDCP-ConfigMandatory for SRB1/SRB2; optional for DRB
statusReportRequiredStatus report behaviorPDCP-ConfigShown as configurable in the table
outOfOrderDeliveryAllow out-of-sequence deliveryPDCP-ConfigImproves latency but may shift burden to upper layers
moreThanoneRLC (primaryPath, logicalChannel)Multiple RLC legs mappingPDCP-Config (DC scenarios)Relevant for split bearers
ul-DataSplitThresholdUL threshold to start splitting trafficPDCP-Config“infinity” means no UL data split
pdcp-DuplicationEnable/disable duplicationPDCP-ConfigImproves reliability but adds overhead
t-ReorderingReceiver buffering timer for missing PDCP SNPDCP-ConfigDirect impact on latency and TCP behavior
cipheringDisabledDisable ciphering for a DRBPDCP-ConfigShown as configurable in the table
[Figure 12: PDCP-Config parameter table (values list)

(5) KPI / design impact

Based on the explained behaviors:

  • Latency
    • t-Reordering buffering directly increases latency when packets arrive out of sequence.
    • outOfOrderDelivery can reduce latency by delivering packets immediately.
  • Throughput (TCP impact)
    • Packet loss or long delays can trigger upper-layer reactions (high level is mentioned; deep TCP details are next Article).
  • Capacity
    • ROHC can reduce header size significantly (1–3 bytes in the example), improving capacity.
    • Duplication increases reliability but adds overhead.

(6) Common issues + optimization tips

Symptom → likely cause → what to check

SymptomLikely cause (from the session)What to check
High latency spikesPDCP buffering waiting for missing SN (t-Reordering running)t-Reordering value + evidence of missing SN in traces
Frequent out-of-order receptionCA, DC split, HARQ/RLC retransmissions, X2 delayCheck “Possible Causes” list and the radio/DC conditions
“Stall” until timer expiresMissing SN creates buffering of later SNsVerify whether the missing SN is loss, retrans delay, or discarded
Packet gaps that trigger reorderingdiscardTimer discards an SDU after SN assignmentdiscardTimer value and PDCP buffer behavior
Need higher reliability at edgeDuplication enabledConfirm duplication config and measure overhead

Summary (Key takeaways)

  • PDCP adds a compact header (D/C, PDCP SN) and supports optional MAC-I for integrity/ciphering on DRBs.
  • discardTimer controls how long packets can stay in PDCP transmission buffer; too low can create SN gaps and increase reordering delay.
  • ROHC (header compression) can reduce headers to 1–3 bytes and is validated via UE capability + RRC configuration.
  • Dual Connectivity/ENDC introduces routing, split bearers, and optional duplication, which can impact ordering and latency.
  • t-Reordering is a major latency driver when packets arrive out of sequence.
  • outOfOrderDelivery can reduce latency by delivering packets immediately, if upper layers can handle it.
  • PDCP data recovery (retransmission) is crucial for lossless mobility between DUs where DU-to-DU forwarding is not available.

FAQ

1) Is PDCP reordering done at transmitter or receiver?

Receiver. PDCP reordering and t-Reordering are maintained at the receiving PDCP entity.

2) What happens if one PDCP SN is missing?

Later packets can be buffered, and t-Reordering starts. When it expires, buffered packets may be delivered out of sequence.

3) What does outOfOrderDelivery change?

It removes the “must deliver in order” requirement, so PDCP can deliver packets without waiting for missing SNs.

4) How do I confirm ROHC is really enabled?

Check UE capability for ROHC profile support, then check RRC Reconfiguration (PDCP-Config) for headerCompression activation.

5) When does PDCP retransmit (data recovery)?

Mainly during mobility/handovers between DUs for lossless transitions, retransmitting all unacknowledged PDCP PDUs.


Video for the same


References

  • 3GPP TS 38.323 (NR PDCP)
  • 3GPP TS 38.331 (RRC configuration: PDCP-Config parameters)
  • RFC 5795 / RFC 3095 / RFC 4815 / RFC 3843 / RFC 6846 / RFC 5225 (ROHC profiles)
  • 5G NR in Bullets
  • PDCP LTE: https://wiki.wireshark.org/PDCP-LTE

Read more