Avoid double call of gtpu task and call it only for the NSA and SA scenarios

This commit is contained in:
Raymond Knopp
2021-06-15 16:36:54 +02:00
parent 1198ef18dc
commit 66ab8e12a5
+8 -5
View File
@@ -370,10 +370,10 @@ int create_gNB_tasks(uint32_t gnb_nb) {
}
}
if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
/*if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1;
}
}*/
}
}
@@ -388,9 +388,12 @@ int create_gNB_tasks(uint32_t gnb_nb) {
LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n");
return -1;
}
if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1;
//Use check on x2ap to consider the NSA scenario and check on AMF_MODE_ENABLED for the SA scenario
if(is_x2ap_enabled() || AMF_MODE_ENABLED){
if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1;
}
}
}