From a1e1405ee6f46cf87bc2eb4a35b6834e4956862c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 17 Apr 2025 09:57:44 +0200 Subject: [PATCH] Start E1 before gNB_app In phy-test and do-ra modes, we will trigger a UE context creation after F1 Setup (because the DU is ready), in a later commit. However, before this commit, E1 is started after the gnb_app (which triggers F1 Setup). E1 starts an (integrated) CU-UP; if the E1 Setup arrives after the F1 setup (which creates a UE context), then the E1 setup handler will drop the newly created RRC context for a do-ra/phy-test mode. Avoid/minimize this by starting E1 first, so that E1 setup is done before F1 Setup is completed (this does not make sure the problem does not happen, but lowers the risk of the above problem). --- executables/nr-softmodem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 5a8464b60c..b9302392ab 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -305,11 +305,6 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf } if (gnb_nb > 0) { - if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) { - LOG_E(GNB_APP, "Create task for gNB APP failed\n"); - return -1; - } - if (!NODE_IS_DU(node_type)) { if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) { LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n"); @@ -333,6 +328,11 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf itti_free(TASK_UNKNOWN, msg); } + if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) { + LOG_E(GNB_APP, "Create task for gNB APP failed\n"); + return -1; + } + //Use check on x2ap to consider the NSA scenario if((is_x2ap_enabled() || IS_SA_MODE(get_softmodem_params())) && (node_type != ngran_gNB_CUCP)) { if (itti_create_task (TASK_GTPV1_U, >pv1uTask, NULL) < 0) {