mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Refactor TUN Interface Management and Move to SDAP Layer
This commit refactors the TUN interface management by moving its creation and configuration from the PDCP layer to the SDAP layer for UE. Key changes include: - Introduced `tun_generate_ue_ifname` and `tun_destroy` functions for better TUN interface lifecycle management. - Added support for creating and destroying UE-specific TUN interfaces in SDAP. - Refactored `nr_pdcp_module_init` to remove TUN-related logic and moved it to SDAP. - Updated NAS and SDAP layers to handle PDU session-specific TUN interface creation and configuration. - Enhanced SDAP entity management to include TUN socket handling and thread lifecycle. - Updated NAS message handling to initialize default PDU session TUN interfaces in NOS1 mode. - Use a single SDAP thread function for gNB and UE - Allow noS1 mode also in SA on gNB These changes improve modularity by isolating TUN interface management within the SDAP layer, aligning with the 3GPP architecture, and simplifying the PDCP layer. Co-Authored-By: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit is contained in:
@@ -85,6 +85,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "utils.h"
|
||||
#include "x2ap_eNB.h"
|
||||
#include "openair1/SCHED_NR/sched_nr.h"
|
||||
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
|
||||
|
||||
pthread_cond_t nfapi_sync_cond;
|
||||
pthread_mutex_t nfapi_sync_mutex;
|
||||
@@ -497,11 +498,8 @@ static void wait_nfapi_init(char *thread_name)
|
||||
}
|
||||
|
||||
void init_pdcp(void) {
|
||||
uint32_t pdcp_initmask = IS_SOFTMODEM_NOS1 ? ENB_NAS_USE_TUN_BIT : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
|
||||
if (!NODE_IS_DU(get_node_type())) {
|
||||
nr_pdcp_layer_init();
|
||||
nr_pdcp_module_init(pdcp_initmask, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user