introduce dedicated nr pdcp tick thread for F1 split
Currently, NR PDCP ticks are active only with monolithic gNB, triggered by the MAC scheduler in gNB_scheduler.c. In F1 split mode, as there is no MAC, there’s no source to advance the NR PDCP timer via "nr_pdcp_wakeup_timer_thread()". This commit introduces a dedicated thread for NR PDCP ticks in gNB-CU and CU-UP mode. Without it, packet losses at the F1 uplink would cause indefinite buffering, as t-Reordering won't expire due to the lack of NR PDCP timer ticks.
This commit is contained in:
@@ -277,7 +277,7 @@ void mac_top_init_gNB(ngran_node_t node_type,
|
||||
AssertFatal(rlc_module_init(1) == 0,"Could not initialize RLC layer\n");
|
||||
|
||||
// These should be out of here later
|
||||
if (get_softmodem_params()->usim_test == 0 ) nr_pdcp_layer_init(false);
|
||||
if (get_softmodem_params()->usim_test == 0 ) nr_pdcp_layer_init();
|
||||
|
||||
if(IS_SOFTMODEM_NOS1 && get_softmodem_params()->phy_test) {
|
||||
// get default noS1 configuration
|
||||
|
||||
@@ -566,7 +566,7 @@ void pdcp_layer_init(void)
|
||||
abort();
|
||||
}
|
||||
|
||||
void nr_pdcp_layer_init(bool uses_e1)
|
||||
void nr_pdcp_layer_init(void)
|
||||
{
|
||||
/* hack: be sure to initialize only once */
|
||||
static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
|
||||
@@ -586,10 +586,12 @@ void nr_pdcp_layer_init(bool uses_e1)
|
||||
if ((RC.nrrrc == NULL) || (!NODE_IS_CU(node_type))) {
|
||||
init_nr_rlc_data_req_queue();
|
||||
}
|
||||
|
||||
nr_pdcp_e1_if_init(uses_e1);
|
||||
nr_pdcp_e1_if_init(node_type == ngran_gNB_CUUP || node_type == ngran_gNB_CUCP);
|
||||
init_nr_pdcp_data_ind_queue();
|
||||
nr_pdcp_init_timer_thread(nr_pdcp_ue_manager);
|
||||
if (NODE_IS_CU(node_type)) {
|
||||
nr_pdcp_init_tick_thread();
|
||||
}
|
||||
}
|
||||
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "pdcp.h"
|
||||
#include "nr_pdcp_ue_manager.h"
|
||||
|
||||
void nr_pdcp_layer_init(bool uses_e1);
|
||||
void nr_pdcp_layer_init(void);
|
||||
uint64_t nr_pdcp_module_init(uint64_t _pdcp_optmask, int id);
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
@@ -70,6 +70,26 @@ static void *nr_pdcp_timer_thread(void *_nr_pdcp_ue_manager)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *nr_pdcp_tick_thread() {
|
||||
pthread_setname_np(pthread_self(),"nr_pdcp_tick_thread");
|
||||
uint64_t curr_time = 0;
|
||||
while (1) {
|
||||
usleep(1000);
|
||||
curr_time++;
|
||||
nr_pdcp_wakeup_timer_thread(curr_time);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void nr_pdcp_init_tick_thread()
|
||||
{
|
||||
pthread_t t;
|
||||
if (pthread_create(&t, NULL, nr_pdcp_tick_thread, NULL) != 0) {
|
||||
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void nr_pdcp_init_timer_thread(nr_pdcp_ue_manager_t *nr_pdcp_ue_manager)
|
||||
{
|
||||
pthread_t t;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void nr_pdcp_init_tick_thread();
|
||||
void nr_pdcp_init_timer_thread(nr_pdcp_ue_manager_t *nr_pdcp_ue_manager);
|
||||
void nr_pdcp_wakeup_timer_thread(uint64_t time);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user