Skip to content

Commit eb62d6e

Browse files
gnb: fix cu-cp start up when running without core
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.
1 parent ec15763 commit eb62d6e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

apps/gnb/gnb.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -445,18 +445,18 @@ int main(int argc, char** argv)
445445
// Connect F1-C to CU-CP.
446446
f1c_gw.attach_cu_cp(cu_cp_obj->get_connected_dus());
447447

448+
// Signal AMF connection for instant CU-CP start and to make sure test UEs do not get rejected
449+
if (gnb_cfg.amf_cfg.no_core) {
450+
cu_cp_obj->get_cu_cp_ngap_handler().handle_amf_connection();
451+
}
452+
448453
// start CU-CP
449454
gnb_logger.info("Starting CU-CP...");
450455
cu_cp_obj->start();
451456
gnb_logger.info("CU-CP started successfully");
452457

453-
if (gnb_cfg.amf_cfg.no_core) {
454-
// Signal AMF connection so test UEs do not get rejected
455-
cu_cp_obj->get_cu_cp_ngap_handler().handle_amf_connection();
456-
} else {
457-
if (not cu_cp_obj->get_cu_cp_ngap_connection_interface().amf_is_connected()) {
458-
report_error("CU-CP failed to connect to AMF");
459-
}
458+
if (not cu_cp_obj->get_cu_cp_ngap_connection_interface().amf_is_connected()) {
459+
report_error("CU-CP failed to connect to AMF");
460460
}
461461

462462
// Create CU-UP config.

0 commit comments

Comments
 (0)