Split out E1AP net config from Setup Request
The E1AP Setup Request contained the network configuration (IP address, ports) as well as the actual E1AP Setup Request application data (Supported PLMNs, ...). This has the drawbacks that - The E1AP Setup Request is stored to retrieve IP addresses in the E1AP module, which is confusing as the Setup Request, per standard, has no IP info - The CU-CP received an E1 Setup Request for configuration during start up, but it did not actually receive such Setup Request, but merely the IP configuration to set up the socket This commit splits the E1AP Setup Request into a "real" Setup Request for application data, and creates a new type e1ap_net_config_t to group all IP configuration data. Further, a new ITTI message type E1AP_REGISTER_REQ is introduced to group both types. What happens is - RCconfig_NR_CU_E1() reads both E1AP application-level data and IP configuration, as previously - The data is sent to the CU-CP. It discards the E1AP Setup Request data, and only uses the network configuration to set up the socket - The data is sent to the CU-UP. It uses the network configuration to connect to the CU-CP, and then sends the E1AP Setup Request to the CU-CP. Currently, the CU-CP still stores the Setup Request locally, which will be changed in the next commit to send it to the RRC.
This commit is contained in:
+13
-11
@@ -68,7 +68,7 @@ static void get_NGU_S1U_addr(char **addr, uint16_t *port)
|
||||
|
||||
MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process)
|
||||
{
|
||||
MessageDef *msgConfig = itti_alloc_new_message(TASK_GNB_APP, 0, E1AP_SETUP_REQ);
|
||||
MessageDef *msgConfig = itti_alloc_new_message(TASK_GNB_APP, 0, E1AP_REGISTER_REQ);
|
||||
if (!msgConfig)
|
||||
return NULL;
|
||||
|
||||
@@ -85,7 +85,7 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process)
|
||||
config_getlist(&GNBParamList, GNBParams, sizeofArray(GNBParams), NULL);
|
||||
paramdef_t *gnbParms = GNBParamList.paramarray[0];
|
||||
AssertFatal(gnbParms[GNB_GNB_ID_IDX].uptr != NULL, "gNB id %d is not defined in configuration file\n", 0);
|
||||
e1ap_setup_req_t *e1Setup = &E1AP_SETUP_REQ(msgConfig);
|
||||
e1ap_setup_req_t *e1Setup = &E1AP_REGISTER_REQ(msgConfig).setup_req;
|
||||
msgConfig->ittiMsgHeader.destinationInstance = 0;
|
||||
e1Setup->gNB_cu_up_id = *(gnbParms[GNB_GNB_ID_IDX].uptr);
|
||||
|
||||
@@ -106,22 +106,24 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process)
|
||||
e1Setup->plmns[I].mnc = *PLMNParamList.paramarray[I][GNB_MOBILE_NETWORK_CODE_IDX].uptr;
|
||||
e1Setup->plmns[I].mnc = *PLMNParamList.paramarray[I][GNB_MNC_DIGIT_LENGTH].u8ptr;
|
||||
}
|
||||
/* TODO add NSSAIs */
|
||||
|
||||
e1Setup->remotePortF1U = *(GNBParamList.paramarray[0][GNB_REMOTE_S_PORTD_IDX].uptr);
|
||||
e1Setup->localAddressF1U = strdup(*(GNBParamList.paramarray[0][GNB_LOCAL_S_ADDRESS_IDX].strptr));
|
||||
e1Setup->localPortF1U = *(GNBParamList.paramarray[0][GNB_LOCAL_S_PORTD_IDX].uptr);
|
||||
get_NGU_S1U_addr(&e1Setup->localAddressN3, &e1Setup->localPortN3);
|
||||
e1Setup->remotePortN3 = e1Setup->localPortN3 ;
|
||||
e1ap_net_config_t *e1ap_nc = &E1AP_REGISTER_REQ(msgConfig).net_config;
|
||||
e1ap_nc->remotePortF1U = *(GNBParamList.paramarray[0][GNB_REMOTE_S_PORTD_IDX].uptr);
|
||||
e1ap_nc->localAddressF1U = strdup(*(GNBParamList.paramarray[0][GNB_LOCAL_S_ADDRESS_IDX].strptr));
|
||||
e1ap_nc->localPortF1U = *(GNBParamList.paramarray[0][GNB_LOCAL_S_PORTD_IDX].uptr);
|
||||
get_NGU_S1U_addr(&e1ap_nc->localAddressN3, &e1ap_nc->localPortN3);
|
||||
e1ap_nc->remotePortN3 = e1ap_nc->localPortN3 ;
|
||||
|
||||
if (separate_CUUP_process) {
|
||||
paramlist_def_t GNBE1ParamList = {GNB_CONFIG_STRING_E1_PARAMETERS, NULL, 0};
|
||||
paramdef_t GNBE1Params[] = GNBE1PARAMS_DESC;
|
||||
config_getlist(&GNBE1ParamList, GNBE1Params, sizeofArray(GNBE1Params), aprefix);
|
||||
paramdef_t *e1Parms = GNBE1ParamList.paramarray[0];
|
||||
strcpy(e1Setup->CUCP_e1_ip_address.ipv4_address, *(e1Parms[GNB_CONFIG_E1_IPV4_ADDRESS_CUCP].strptr));
|
||||
e1Setup->CUCP_e1_ip_address.ipv4 = 1;
|
||||
strcpy(e1Setup->CUUP_e1_ip_address.ipv4_address, *(e1Parms[GNB_CONFIG_E1_IPV4_ADDRESS_CUUP].strptr));
|
||||
e1Setup->CUUP_e1_ip_address.ipv4 = 1;
|
||||
strcpy(e1ap_nc->CUCP_e1_ip_address.ipv4_address, *(e1Parms[GNB_CONFIG_E1_IPV4_ADDRESS_CUCP].strptr));
|
||||
e1ap_nc->CUCP_e1_ip_address.ipv4 = 1;
|
||||
strcpy(e1ap_nc->CUUP_e1_ip_address.ipv4_address, *(e1Parms[GNB_CONFIG_E1_IPV4_ADDRESS_CUUP].strptr));
|
||||
e1ap_nc->CUUP_e1_ip_address.ipv4 = 1;
|
||||
}
|
||||
}
|
||||
return msgConfig;
|
||||
|
||||
Reference in New Issue
Block a user