Skip to content

Commit

Permalink
gnb: fix cu-cp start up when running without core
Browse files Browse the repository at this point in the history
the cu-cp start is a blocking call and was delaying the gnb startup
when the AMF connection was not established.

however, the call to signal the AMF connection in the no_core=true case
was after the start of the CU-CP causing a 10s delay.
  • Loading branch information
andrepuschmann committed Jan 12, 2024
1 parent ec15763 commit eb62d6e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/gnb/gnb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,18 @@ int main(int argc, char** argv)
// Connect F1-C to CU-CP.
f1c_gw.attach_cu_cp(cu_cp_obj->get_connected_dus());

// Signal AMF connection for instant CU-CP start and to make sure test UEs do not get rejected
if (gnb_cfg.amf_cfg.no_core) {
cu_cp_obj->get_cu_cp_ngap_handler().handle_amf_connection();
}

// start CU-CP
gnb_logger.info("Starting CU-CP...");
cu_cp_obj->start();
gnb_logger.info("CU-CP started successfully");

if (gnb_cfg.amf_cfg.no_core) {
// Signal AMF connection so test UEs do not get rejected
cu_cp_obj->get_cu_cp_ngap_handler().handle_amf_connection();
} else {
if (not cu_cp_obj->get_cu_cp_ngap_connection_interface().amf_is_connected()) {
report_error("CU-CP failed to connect to AMF");
}
if (not cu_cp_obj->get_cu_cp_ngap_connection_interface().amf_is_connected()) {
report_error("CU-CP failed to connect to AMF");
}

// Create CU-UP config.
Expand Down

0 comments on commit eb62d6e

Please sign in to comment.