5G NR RLC Acknowledged Mode

Deep dive into the 5G Radio Link Control in Acknowledged Mode

EventHelix
5G NR
12 min readOct 5, 2019

--

The RLC layer in the 5G NR stack is responsible for:

  • Transfer of upper layer PDUs in Acknowledged Mode (AM), Unacknowledged Mode (UM) and Transparent Mode (TM)
  • Error correction via retransmission of lost RLC PDUs (AM)
  • Segmentation and reassembly of RLC SDUs (UM and AM)
  • Re-segmentation of RLC data PDUs when a complete RLC PDU cannot be transmitted (AM).
  • Reordering of RLC data PDUs (UM and AM)

Here we will take a deep dive into the RLC AM procedures. The procedures are explained with flow charts that are based on the 3GPP specification 38.322 V15.5.0.

RLC entity handling

The RLC entity is established from the RRC layer whenever a radio bearer needs to be setup. The establishment involves creating the RLC entity and then initializing all the protocol state variables. Once the initialization is completed, the RLC entity moves into the ACTIVE state.

In the ACTIVE state, the RRC layer can:

  • Re-establish the RLC entity if the session has been reinitialized due to a radio link failure.
  • Release the RLC entity if the radio bearer is released at the RRC level.

Re-establishment and release result in the discard of all RLC SDUs, RLC SDU segments, and RLC PDUs.

RLC entity establishment, re-establishment, and release
RLC entity establishment, re-establishment, and release

Segmentation and transmit

The transmit operations in the AM mode consist of the following operations:

RLC SDU receive

  1. RLC SDU is received from the PDCP layer
  2. RLC SDU is assigned sequence-number SN equal to TX_Next.
  3. Increment TX_Next.
  4. Update the data backlog to the MAC layer. The MAC scheduler will use this information to grant transmission resources.

Scheduling

  1. Based on the backlog and QoS requirements of the bearer, the MAC scheduler grants resources to the RLC layer for AMD PDU transmission.
  2. Based on the grant size, the RLC layer segments the RLC SDU(s) to fit into the assigned AMD PDU.
  3. The RLC SDU’s sequence number (SN) is assigned to the AMD PDU.
  4. The AMD PDU is transmitted to the MAC layer.

Acknowledgment

  1. The peer RLC layer sends a STATUS PDU with acknowledgments for the received RLC SDUs and RLC SDU segments.
  2. The RLC layer iterates through the received acknowledgments in the STATUS PDU and performs the following steps for the positively acknowledged RLC SDUs.
  3. Notify the PDCP layer that the RLC SDU has been acknowledged.
  4. Update the TX_Next_Ack for the next to be acknowledged RLC SDU.
  5. Stop the t-PollRetransmit timer as the acknowledgment has been received.
5G NR RLC SDU transmission and acknowledgment handling.
5G NR RLC SDU transmission and acknowledgment handling

Receive and reassembly

AMD PDU receive

  1. The AMD PDU is received from the MAC layer.
  2. The RLC layer proceeds as the RLC PDU SN is within the receive window.
  3. The RLC layer also checks if the AMD PDU carried the RLC SDU segment bytes that have already been received. It moves ahead with the processing as the received AMD PDU contains new data bytes.
  4. The RLC layer places the AMD PDU in the reception buffer (describe below).
Actions when an AMD PDU is received from the lower layers
Actions when an AMD PDU is received from the lower layers

Placing the AMD PDU in a reception buffer

  1. An AMD PDU with SN=x needs to be saved in the reception buffer.
  2. If the received SN x is greater than or equal to RX_Next_Highest, RX_Next_Highest is incremented. Note that RX_Next_Highest is one past the highest received sequence number.
  3. Since all bytes of the RLC SDU (SN=x) have been received, reassemble the RLC SDU and report it to the upper layer.
  4. If x matches the RX_Highest_Status, this signifies that all SNs before x have also been successfully received. Now update the RX_Highest_Status to the SN of the first RLC SDU with SN > current RX_Highest_SN for which not all bytes have been received. Note that RX_Highest_Status points to the oldest SN for which all bytes have not been received.
  5. By the same reasoning, if x matches RX_Next, RX_Next is updated to the SN of the first RLC PDU > current RX_Next for which all bytes have not been received.
  6. If t-Reassembly is running, stop and reset the timer if any of the following condition is met:
    • RX_Next_Status_Trigger == RX_Next
    • RX_Next_Status_Trigger == RX_Next + 1 and there is no missing byte segment of the SDU associated with SN = RX_Next before the last byte of all received segments of this SDU.
    • RX_Next_Status_Trigger falls outside of the receiving window and RX_Next_Status_Trigger is not equal to RX_Next + AM_Window_Size.
    Note: RX_Next_Status_Trigger is one past the SN of the last PDU that triggered t-Reassembly.
  7. If t-Reassembly is not running, start t-Reassembly if:
    • RX_Next_Highest > RX_Next +1
    • RX_Next_Highest = RX_Next + 1 and there is at least one missing
    byte segment of the SDU associated with SN = RX_Next before the last
    byte of all received segments of this SDU.
Actions when an AMD PDU is received from PDCP.
Actions when an AMD PDU is received from PDCP

Actions when t-Reassembly expires

  1. Update the RX_Highest_Status to the SN that is past the last trigger for t-Reassembly and is the first SN for which all bytes have not been received.
  2. If the above operation resulted in RX_Next_Status moving beyond RX_Highest_Status + 1:
    •Start the t-Reassembly timer.
    •Update the RX_Next_Status_Trigger to record the SN that triggered the starting of the t-Reassembly timer.
  3. If the above operation results in RX_Next_Highest moving to RX_Highest_Status+1 and there is at least one-byte segment missing for SN = RX_Highest_Status:
    •Start the t-Reassembly timer.
    •Update the RX_Next_Status_Trigger to record the SN that triggered the starting of the t-Reassembly timer.
Actions when t-Reassembly expires
Actions when t-Reassembly expires

Retransmission

  1. The RLC layer receives a Status PDU that negatively acknowledges RLC SDUs.
  2. The RLC layer iterates through positive and negative acknowledgments. The RLC layer makes sure that the acknowledged SN are within the expected range.
  3. If a negative acknowledgment is received, initialize the RETX_COUNT to 0 for the first retransmission. The RETX_COUNT is incremented in subsequent retransmissions.
  4. If the RETX_COUNT has reached the maxRetxThreshold, the RLC layer is notified that the MAX retransmission limit has been reached for this RLC SDU or RLC SDU segment.
  5. If the RETX_COUNT limit has not been reached, the RLC layer decides to retransmit the RLC SDU or RLC SDU segment.
  6. If the transmission opportunity from the MAC layer is smaller than the size of the RLC SDU/RLC SDU segment, the RLC layer segments the RLC SDU/RLC SDU segment.
  7. The RLC layer then forms the AMD PDU that fits the available transmission opportunity.
  8. The RLC layer then decides if the polling flag in the RLC header needs to be updated (see the following section).
  9. The RLC layer transmits the AMD PDU to the MAC layer.
5G NR RLC retransmission
5G NR RLC retransmission

Polling

The RLC layer uses the Polling flag in the header to solicit a STATUS PDU from the peer RLC. The Polling flag is set if:

  • Total PDUs transmitted since the last poll exceeds pollPDU.
  • Total bytes transmitted since the last poll exceeds pollByte.
  • Transmission and retransmission buffer will become empty after the transmission of the current AMD PDU.
  • The window will stall after the transmission of the current AMD PDU.

The t-PollRetransmit timer is started after a poll has been sent.

5G NR RLC polling
5G NR RLC polling

Expiry of t-PollRetransmit

If the t-PollRetransmit timer expires:

  • Send a poll if the transmission and retransmission buffers are empty.
  • Send a poll if the window is stalled. Include either the highest SN that has been submitted for retransmission or any RLC SDU that has not been positively acknowledged.
Expiry of t-PollRetransmit
Expiry of t-PollRetransmit

Triggering a STATUS report

A STATUS PDU is sent to the peer RLC layer to acknowledge received RLC SDUs and RLC SDU segments. A STATUS PDU is triggered in the following cases:

  • The peer RLC layer sets the Polling flag (P) in an AMD PDU. Thus, soliciting a STATUS PDU.
  • The t-Reassembly timer expires.
  • The t-StatusProhibit timer expires
RLC AM Status Reporting
RLC AM Status Reporting

If STATUS PDU is triggered, send the message only of t-StatusProhibit is not running.

Trigger STATUS PDU
Trigger STATUS PDU

Sending a STATUS PDU

  1. Start t-StatusProhibit timer to prevent future STATUS PDU transmissions until the t-StatusProhibit timer expires.
  2. Iterate through all RLC SDUs from RX_Highest_Next to the RX_Next. Basically, iterate from the oldest unacknowledged SN to the last received SN. Prepare the RLC SDU by the following rules:
  3. Include a NACK_SN if no bytes have been received for the RLC SDU.
  4. If a continuous sequence of bytes has not been received for a partially received RLC SDU, include NACK_SN, SOstart and SOend. This signals the part of the RLC SDU that needs to be retransmitted. SOstart and SOend identify the byte offsets of the missing bytes.
  5. If a continuous sequence of RLC SDUs have not been received, include a NACK_SN and NACK range in the message. If required, SOstart and SOend are included as well.
  6. After iterating through the SN, set the ACK_SN to signal the starting point of negatively acknowledged RLC SDUs and RLC SDU segments. All SN before ACK_SN are deemed acknowledged.
  7. Once the STATUS PDU is completed, it is sent to the peer RLC layer.
Submit RLC Status PDU to lower layers
Submit RLC Status PDU to lower layers

RLC SDU Discard

The PDCP layer signals to the RLC layer if an RLC SDU has waited for transmission for more than the maximum allowed discard time. The RLC layer will discard the RLC SDU if it had not assigned an RLC SN to the RLC SDU.

RLC SDU discard handling
RLC SDU discard handling

RLC PDUs

Now that we have looked into the RLC AM procedures. Let’s briefly look into the PDUs that are exchanged during the procedures.

AMD PDU

The AMD PDUs are used to transport the RLC SDUs. The following figure shows the structure of an AMD PDU with 18-bit SN.

5G NR AMD PDU with 18 bit SN
Figure 6.2.2.4–2: AMD PDU with 18-bit SN (No SO)

When the RLC SDU gets segmented, a segment offset (SO) field is also present in the message. The following message shows an AMD PDU with the SO field.

AMD PDU with 18 bit SN and SO
Figure 6.2.2.4–4: AMD PDU with 18-bit SN with SO

AMD PDU fields

  • D/C: The D/C (Data/Control) field indicates whether the RLC PDU is an RLC data PDU (1) or RLC control PDU (0).
  • P: The P (Poll) field indicates whether or not the transmitting side of an AM RLC entity requests a STATUS report from its peer AM RLC entity. A value of 1 signals that a STATUS report is being solicited.
  • R: Reserved. Should be set to 0.
  • SN: The SN (Sequence Number) field indicates the sequence number of the corresponding RLC SDU. For RLC AM, the sequence number is incremented by one for every RLC SDU.
  • SO: The SO (Segment Offset) field indicates the position within the original RLC SDU to which the first byte of the RLC SDU segment in the Data field corresponds.

STATUS PDU

The STATUS PDU acknowledges the AMD PDUs and AMD PDU segments received from the peer RLC layer.

The message offers a lot of flexibility in acknowledging RLC SDUs:

  • The first ACK_SN in the message implicitly acknowledges the RLC SDUs that preceded this SN.
  • Individual RLC SDUs can be negatively acknowledged.
  • RLC SDU segments with information about segment start and end are used to negatively acknowledge parts of an RLC SDU.
  • Adjacent NACK_SN fields implicitly acknowledge the RLC SDUs that lie between the two NACK_SN fields.
  • Finally, a range of RLC SDUs can be negatively acknowledged with the NACK range field.
STATUS PDU with 18-bit SN
Figure 6.2.2.5–2: STATUS PDU with 18-bit SN

STATUS PDU fields

  • D/C: The D/C (Data/Control) field indicates whether the RLC PDU is an RLC data PDU (1) or RLC control PDU (0).
  • CPT: Control PDU Type (0 — STATUS PDU, 1 to 7 — Reserved)
  • ACK_SN: The Acknowledgement SN field indicates the SN of the next not received RLC SDU which is not reported as missing in the STATUS PDU.
  • E1: The E1 = 1 indicates that a set of NACK_SN, E1, E2, and E3 follows.
  • R: Reserved. Should be set to 0.
  • NACK_SN: The Negative Acknowledgement SN field indicates the SN of the RLC SDU (or RLC SDU segment) that has been detected as lost at the receiving side of the AM RLC entity.
  • E2: The E2 = 1 indicates that a set of SOstart and SOend follows.
  • E3: The E3 = 1 signals that a continuous sequence of RLC SDUs (NACK range) that have not been received follows.
  • NACK range: The NACK range field is the number of consecutively lost RLC SDUs starting from and including NACK_SN.

RLC AM transmit state variables

Transmit state variables are used to manage the transmit RLC state machine.

TX_Next_Ack — Acknowledgement state variable

This state variable holds the value of the SN of the next RLC SDU for which a positive acknowledgment is to be received in-sequence, and it serves as the lower edge of the transmitting window. It is initially set to0 and is updated whenever the AM RLC entity receives a positive acknowledgment for an RLC SDU with SN = TX_Next_Ack.

TX_Next — Send state variable

This state variable holds the value of the SN to be assigned for the next newly generated AMD PDU. It is initially set to 0 and is updated whenever the AM RLC entity constructs an AMD PDU with SN = TX_Next and contains an RLC SDU or the last segment of an RLC SDU.

POLL_SN — Poll send state variable

This state variable holds the value of the highest SN of the AMD PDU among the AMD PDUs submitted to the lower layer when POLL_SN is set. It is initially set to 0.

RLC AM transmit counters

Transmit counters are used to keep track of various events during the RLC transmit procedures.

PDU_WITHOUT_POLL — Counter

This counter is initially set to 0. It counts the number of AMD PDUs sent since the most recent poll bit was transmitted.

BYTE_WITHOUT_POLL — Counter

This counter is initially set to 0. It counts the number of data bytes sent since the most recent poll bit was transmitted.

RETX_COUNT — Counter

This counter counts the number of retransmissions of an RLC SDU or RLC SDU segment. There is one RETX_COUNT counter maintained per RLC SDU.

RLC AM receive state variables

The receive state variables manage the receive RLC state machine.

RX_Next — Receive state variable

This state variable holds the value of the SN following the last in-sequence completely received RLC SDU, and it serves as the lower edge of the receiving window. It is initially set to 0 and is updated whenever the AM RLC entity receives an RLC SDU with SN = RX_Next.

RX_Next_Status_Trigger — t-Reassembly state variable

This state variable holds the value of the SN following the SN of the RLC SDU which triggered t-Reassembly.

RX_Highest_Status — Maximum STATUS transmit state variable

This state variable holds the highest possible value of the SN which can be indicated by “ACK_SN” when a STATUS PDU needs to be constructed. It is initially set to 0.

RX_Next_Highest — Highest received state variable

This state variable holds the value of the SN following the SN of the RLC SDU with the highest SN among received RLC SDUs. It is initially set to 0.

RLC AM timers

The RLC layer uses the following timers to manage the RLC state machine.

t-PollRetransmit

This timer is used by the transmitting side of an AM RLC entity to retransmit a poll.

t-Reassembly

This timer is used by the receiving side of an AM RLC entity and receiving UM RLC entity to detect loss of RLC PDUs at the lower layers. If t-Reassembly is running, t-Reassembly shall not be started additionally, i.e. only one t-Reassembly per RLC entity is running at a given time.

t-StatusProhibit

This timer is used by the receiving side of an AM RLC entity to prohibit transmission of a STATUS PDU.

RLC AM configurable parameters

The RLC state machine operations can be customized by the following configurable parameters:

maxRetxThreshold

This parameter is used by the transmitting side of each AM RLC entity to limit the number of retransmissions corresponding to an RLC SDU, including its segments.

pollPDU

This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollPDU PDUs.

pollByte

This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollByte bytes.

--

--

Responses (3)