PDCP 功能与基本概念

Posted yyl_woniu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PDCP 功能与基本概念相关的知识,希望对你有一定的参考价值。

pdcp的功能:

  • 介于RLC 与高层 Higher U-Plane interface间,用户面与控制面数据的发送
  • PDCP SN序列号的维护
  • 发送pdcp  SN Status 状态(for use Upon Handover)
  • · ROHC (Robust Header Compression)
  • 在重建立过程中用于数据向高层的按序递交
  • 确保在重建立过程中AM模式下,用于数据向高层的按序递交 SDUs 数据不重复
  • 用户PDCP数据的加解密(U面C面)
  • C面数据的完整性保护与校验
  • 基于定时器的丢包机制
  • 对重复包的丢弃
  • For split and LWA bearers, 路由与重排序功能

PDCP架构 

        参考 36323 4.2.1 每个RB承载(i.e. DRB, SLRB and SRB, except for SRB0 and SRB1bis)都会有一个PDCP实体与其关联,同时,根据RB承载的特性,一个PDCP实体又可以关联一个或两个RLC实体。For LWA bearers, each PDCP entity is associated with an AM RLC entity and the LWAAP entity. The PDCP entities are located in the PDCP sublayer。

PDCP entities

        一个UE可以存在多个PDCP实体。每个PDCP实体携带的用户面数据都可以配置使用头压缩机制.

        每个PDCP实体都会携带一个RB承载的数据,目前PDCP仅支持ROHC投压缩机制。同时一个实体只会使用一个ROHC实例进行头压缩与解压缩。

        至于pdcp实体携带的是用户数据还是控制数据主要依赖与其关联的RB承载携带的数据类型。

 上图大概描述了PDCP实体的主要功能与处理流程。对于RNs,PDCPd对所有数据都支持完整性保护与校验。

        For split bearers, routing is performed in the transmitting PDCP entity, and reordering is performed in the receiving PDCP entity. When requested by lower layers to submit PDCP PDUs, the transmitting PDCP entity shall:

-     if ul-DataSplitThreshold is configured and the data available for transmission is larger than or equal to ul-DataSplitThreshold:

-     submit the PDCP PDUs to either the associated AM RLC entity configured for SCG or the associated AM RLC entity configured for MCG, whichever the PDUs were requested by;

-     else:

-     if ul-DataSplitDRB-ViaSCG is set to TRUE by upper layers [3]:

-     if the PDUs were requested by the associated lower layers configured for SCG:

-     submit the PDCP PDUs to the associated AM RLC entity configured for SCG;

-     else:

-     if the PDUs were requested by the associated lower layers configured for MCG:

-     submit the PDCP PDUs to the associated AM RLC entity configured for MCG.

        For LWA bearers, routing is performed in the transmitting PDCP entity and reordering is performed in the receiving PDCP entity. The transmitting PDCP entity of the UE shall only submit the PDCP PDUs to the associated AM RLC entity.

在PDCP中,最大支持的SDU字节数为8188字节,对于NB-IoT最大支持字节数为1600字节。

协议数据单元

PDCP Data PDU:

pdcp数据单元用于携带,

       1)pdcp数据的sn号,

        2)for SLRBs used for one-to-many communication, PGK Index, PTK Identity, and SDU type; or

3)for SLRBs used for one-to-one communication, KD-sess Identity, and SDU type; 

4)用户面数据携带的通过压缩或者未压缩的SDU数据;

5)控制面数据

6)针对SRBs承载的 MAC-I指示或者对SLRB需要一对一连接的完成性保护以及一个MAC-I指示

7) for RNs, a MAC-I field for DRB (if integrity protection is configured);

PDCP Control PDU:

1) 一个PDCP 状态报告包括非PDCP重建立流程中的PDCP SDUs 丢包信息

2)头压缩控制信息,

3)a LWA status report

PDCP协议数据格式 

PDCP pdu是以字节为单位是bit流,PDU最重要的信息分别在数据流的两端,PDU的解析读取顺序从左到右。

Control plane PDCP Data PDU

User plane PDCP Data PDU with long PDCP SN(12bit)

        This format is applicable for PDCP Data PDUs carrying data from DRBs mapped on RLC AM or RLC UM

 User plane PDCP Data PDU with short PDCP SN(7bit)

        This format is applicable for PDCP Data PDUs carrying data from DRBs mapped on RLC UM or in NB-IoT DRBs mapped on RLC AM

 PDCP Control PDU for interspersed ROHC feedback packet

PDCP Control PDU for PDCP status report

pdcp状态报告PDU用于DRB承载映射为RLC AM模式,针对不同的SN长度相应的状态报告格式与其对应,

 

Parameters参数

PDCP SN:

        pdcp的SN号包括 5, 7, 12, 15, 16, or 18 bits长度,其中NB-IoT which uses 7 bit PDCP SN for DRB.

 MAC-I:

        MAC-I字段携带用于完成性校验的算法信息,对于控制面数据即使不存在完整性保护, MAC-I也会存在,只是该字段会填0。

COUNT:

Length: 32 bits

        COUNT用于加密与完整性保护,COUNT值由HFN and the PDCP SN共同组成,其长度由改成参数配置完成,结构如下:(在COUNT数不足32bit 时,将不足32bit的部分补0)

        NOTE:      When performing comparison of values related to COUNT, the UE takes into account that COUNT is a 32-bit value, which may wrap around (e.g., COUNT value of 232 - 1 is less than COUNT value of 0).

 

PDU type:对C控制PDU有作用,D数据PDU不包含该字段,具体含义如下:

FMS:指示PDCP SN of the first missing PDCP SDU,第一个丢失的 SDU的SN序列号,对不同的PDCP SN序列长度,改字段长度不同。

Bitmap:该字段动态可变,其长度可以为0.

        使用规则如下:通过bitmap的高8位,完成 SDU SN号为 (FMS +1)mode(Maximum_PDCP_SN + 1)对应的SDU是否收到,以及解压正确。同样通过低8位,完成SN 号为 (FMS + 8)mode(Maximum_PDCP_SN + 1)对应的SDU是否完成接收与正确解压。

        UE通过对bitmap中相关字段置0,指示对应的PDCP SDU丢失或者解压失败,置1指示成功。

interspersed ROHC feedback(ROHC反馈):用于间断性的反馈解压缩情况,告知压缩方是否正确解压,压缩方可以据此调整数据流的压缩状态。

PDCP涉及变量 常量 以及定时器

State variables状态变量:

在pdcp中的状态变量分成发送侧与接收侧变量,且所有常量都是非负数

发送侧:

a)   Next_PDCP_TX_SN

该参数指示pdcp实体,下一次要发送的pdcp sdu数据对应的PDCP SN号,PDCP实体创建时初始为0。

b) TX_HFN

The variable TX_HFN indicates the HFN value for the generation of the COUNT value used for PDCP PDUs for a given PDCP entity. At establishment of the PDCP entity, the UE shall set TX_HFN to 0.

接收:

a) Next_PDCP_RX_SN

该参数指示pdcp实体,下一次期望接收的pdcp sdu数据对应的PDCP SN号,PDCP实体创建时初始为0。

b)RX_HFN

The variable RX_HFN indicates the HFN value for the generation of the COUNT value used for the received PDCP PDUs for a given PDCP entity. At establishment of the PDCP entity, the UE shall set RX_HFN to 0.

c) Last_Submitted_PDCP_RX_SN

        针对DRB承载模式为AM模式时,Last_Submitted_PDCP_RX_SN 变量指示以及向高层递交的PDCP SDU的SN序列号 PDCP实体创建完成时,接收侧实体会将改变量初始化为Maximum_PDCP_SN。

d) Reordering_PDCP_RX_COUNT

        在重排序功能开启时,Reordering_PDCP_RX_COUNT会被使用。该参数指示触发t-Reordering的PDCP pdu 后面待重排序的pdu个数。

定时器:

DRB承载PDCP发送侧维护定时器

a) discardTimer

        定时器时长由高层定义,在发送侧,当收到一个高层过来的SDU数据时,会触发一个对应的丢弃定时器。

接收侧定时器;

b) t-Reordering

在接收侧开启重排序功能时, t-Reordering会起作用。同样该定时器也是由高层配置,This timer is used to detect loss of PDCP PDUs as specified in the subclause 5.1.2.1.4. If t-Reordering is running, t-Reordering shall not be started additionally, i.e. only one t-Reordering per PDCP entity is running at a given time.

The receiving side of each PDCP entity associated with LWA bearers shall maintain the following timers:

c) t-StatusReportType1

The duration of the timer is configured by upper layers (statusPDU-Periodicity-Type1 [3]). This timer is used to trigger status report transmission for LWA as specified in the subclause 5.10.

d) t-StatusReportType2

The duration of the timer is configured by upper layers (statusPDU-Periodicity-Type2 and statusPDU-Periodicity-Offset [3]). If statusPDU-Periodicity-Offset is configured and it is the first run of the timer after (re)configuration, the duration of the timer is the sum of statusPDU-Periodicity-Type2 and statusPDU-Periodicity-Offset [3], otherwise the duration of the timer is statusPDU-Periodicity-Type2. When configured, this timer is used to trigger status report transmission for LWA as specified in the subclause 5.10.

常量:

a) Reordering_Window重排序窗口

        Indicates the size of the reordering window. The size equals to 2048 when a 12 bit SN length is used, 16384 when a 15 bit SN length is used, or 131072 when 18 bit SN length is used, i.e. half of the PDCP SN space, for radio bearers that are mapped on RLC AM.

b) Maximum_PDCP_SN is:

-     262143 if the PDCP entity is configured for the use of 18 bits SNs

-     65535 if the PDCP entity is configured for the use of 16 bits SNs

-     32767 if the PDCP entity is configured for the use of 15 bits SNs

-     4095 if the PDCP entity is configured for the use of 12 bit SNs

-     127 if the PDCP entity is configured for the use of 7 bit SNs

-     31 if the PDCP entity is configured for the use of 5 bit SNs

        

 

 

 

以上是关于PDCP 功能与基本概念的主要内容,如果未能解决你的问题,请参考以下文章

PDCP 功能与基本概念

5G安全系列AS层PDCP完整性保护与加密流程

5G安全系列AS层PDCP完整性保护与加密流程

NR PDCP duplication

AVR单片机教程——走向高层

高层管理者的必备技能