{%hackmd ElOJTlJjTg-GQtxooVV5iw %}
# Control Plane of DPDK W2

## Study of DPDK in 5G
### RAN
#### Centralized Unit (CU)
##### CU-UP

1. Components:
* UE Manager: Custom component for managing connected UEs in the CU-UP. Responsible for adding and removing UEs and providing relevant UE information to other processes. Communicates information to/from the CU-CP, DU and Core.
* GTP-U: The GPRS Tunneling Protocol - User Plane (GTP-U) is responsible for transporting User Plane traffic to and from the UPF of the 5G Core via the N3 interface.
* SDAP: The Service Data Adaptation Protocol (SDAP) is responsible for adaption and mapping of Quality of Service (QoS) requirements on User Plan traffic.
* PDCP: The Packet Data Convergence Protocol (PDCP) is responsible for handling the User Plane data before/ after it enters the DU-high.
2. Interfaces:
* E2: Interface with the near-RT RIC.
* E1: Interface with the CU-CP.
* F1-u: User plane interface with the DU.
* N3: User plane interface with the 5G Core (UPF).
##### PDCP
DPDK provides a library for PDCP protocol processing. The library utilizes other DPDK libraries such as cryptodev, reorder, etc., to provide the application with a transparent and high performant PDCP protocol processing library.
The library abstracts complete PDCP protocol processing conforming to ETSI TS 138 323 V17.1.0 (2022-08).
PDCP would involve the following operations:
1. Transfer of user plane data
2. Transfer of control plane data
3. Header compression
4. Uplink data compression
5. Ciphering and integrity protection

PDCP library would abstract the protocol offload features of the cryptodev and would provide a uniform interface and consistent API usage to work with cryptodev irrespective of the protocol offload features supported.
##### PDCP Main Functions Summary
**Header Compression and Decompression**
- Compresses and decompresses IP data flow headers.
- Supports specific protocols and network layer combinations.
- Uses Robust Header Compression (ROHC) for IP/UDP/RTP headers, crucial for VoIP efficiency.
**Transmission of User Data**
- Aggregates data between users.
- Receives data from RABM, assembles into PDUs, and sends to RLC.
- During uplink, assembles data into SDUs and sends to RABM.
- Supports SRNS relocation, maintaining SDU sequence numbers to avoid data loss.
**Security Features**
- **Encryption and Decryption:** For user and control plane data.
- **Integrity Protection:** For control-plane data only.
**Handover Support**
- Ensures sequential transmission and reordering during handover.
- Provides lossless handover with RLC in acknowledgment mode.
**Packet Drop**
- Uses a timer-based discarding mechanism.
- Prevents transmission delay and queuing by discarding SDUs when transmission is not initiated in time.
**Reordering and Sequence Numbers**
- PDUs have sequence numbers (SN) for ordered transmission and reception.
- Maintains reordering windows to handle packet reordering and duplication, especially during handovers.
These functions collectively ensure efficient data transmission, robust security, and seamless handovers in LTE networks.
#### Distributed Unit (DU)
##### PDCP Session Configuration
Here is the code for creating PDCP session configuration using `rte_security_session_conf` struct
the struct API is like below
```
struct rte_security_session_conf {
}
```
## Propose Architecture

This image shows my plan of project topic. Implementing DPDK function to 5G CP or UP. Also have plan on FlexRIC if possible.
## DPDK API Sequence

## OpenAirInterface
### Try to use DPDK to Process OAI function

In this task, I will migrate specific processes, such as packet forwarding and handling, from the Centralized User Plane (CUUP) in OpenAirInterface (OAI) to Data Plane Development Kit (DPDK) processes. This will be achieved by utilizing DPDK's logical cores (lcores) to enhance performance and efficiency in packet processing.

1. Try to Run CUUP and CUCP
- CU-CP

- CU-UP

2. Wireshark Sniff
- E1AP

- F1AP

- NGAP
#### Metrics Before and After
## OSC