Commit be8df443 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Fixes in node config after rebase

parent 6f42ff88
...@@ -182,17 +182,6 @@ gNBs = ...@@ -182,17 +182,6 @@ gNBs =
} }
); );
E1_INTERFACE =
(
{
type = "up";
ipv4_cucp = "127.0.0.100";
port_cucp = 25;
ipv4_cuup = "127.0.0.101";
port_cuup = 25;
}
)
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
......
...@@ -316,7 +316,6 @@ int create_gNB_tasks(void) { ...@@ -316,7 +316,6 @@ int create_gNB_tasks(void) {
for (int gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) { for (int gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
RC.nrrrc[gnb_id] = (gNB_RRC_INST*)calloc(1,sizeof(gNB_RRC_INST)); RC.nrrrc[gnb_id] = (gNB_RRC_INST*)calloc(1,sizeof(gNB_RRC_INST));
LOG_I(PHY, "%s() Creating RRC instance RC.nrrrc[%d]:%p (%d of %d)\n", __FUNCTION__, gnb_id, RC.nrrrc[gnb_id], gnb_id+1, gnb_id_end); LOG_I(PHY, "%s() Creating RRC instance RC.nrrrc[%d]:%p (%d of %d)\n", __FUNCTION__, gnb_id, RC.nrrrc[gnb_id], gnb_id+1, gnb_id_end);
RC.nrrrc[gnb_id]->node_type=set_node_type();
configure_nr_rrc(gnb_id); configure_nr_rrc(gnb_id);
} }
......
...@@ -1132,7 +1132,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { ...@@ -1132,7 +1132,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
printf("NRRRC %d: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr)); printf("NRRRC %d: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr));
rrc->node_type = set_node_type(); rrc->node_type = get_node_type();
if (NODE_IS_CU(rrc->node_type)) { if (NODE_IS_CU(rrc->node_type)) {
paramdef_t SCTPParams[] = GNBSCTPPARAMS_DESC; paramdef_t SCTPParams[] = GNBSCTPPARAMS_DESC;
char aprefix[MAX_OPTNAME_SIZE*2 + 8]; char aprefix[MAX_OPTNAME_SIZE*2 + 8];
...@@ -2291,9 +2291,9 @@ static ngran_node_t get_node_type(void) ...@@ -2291,9 +2291,9 @@ static ngran_node_t get_node_type(void)
config_getlist( &MacRLC_ParamList,MacRLC_Params,sizeof(MacRLC_Params)/sizeof(paramdef_t), NULL); config_getlist( &MacRLC_ParamList,MacRLC_Params,sizeof(MacRLC_Params)/sizeof(paramdef_t), NULL);
config_getlist( &GNBParamList,GNBParams,sizeof(GNBParams)/sizeof(paramdef_t),NULL); config_getlist( &GNBParamList,GNBParams,sizeof(GNBParams)/sizeof(paramdef_t),NULL);
config_getlist( &GNBE1ParamList, GNBE1Params, sizeof(GNBE1Params)/sizeof(paramdef_t), aprefix);
char aprefix[MAX_OPTNAME_SIZE*2 + 8]; char aprefix[MAX_OPTNAME_SIZE*2 + 8];
sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0); sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
config_getlist( &GNBE1ParamList, GNBE1Params, sizeof(GNBE1Params)/sizeof(paramdef_t), aprefix);
if ( MacRLC_ParamList.numelt > 0) { if ( MacRLC_ParamList.numelt > 0) {
RC.nb_nr_macrlc_inst = MacRLC_ParamList.numelt; RC.nb_nr_macrlc_inst = MacRLC_ParamList.numelt;
for (int j = 0; j < RC.nb_nr_macrlc_inst; j++) { for (int j = 0; j < RC.nb_nr_macrlc_inst; j++) {
...@@ -2306,10 +2306,12 @@ static ngran_node_t get_node_type(void) ...@@ -2306,10 +2306,12 @@ static ngran_node_t get_node_type(void)
if (strcmp(*(GNBParamList.paramarray[0][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "f1") == 0) { if (strcmp(*(GNBParamList.paramarray[0][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "f1") == 0) {
if ( GNBE1ParamList.paramarray == NULL || GNBE1ParamList.numelt == 0 ) if ( GNBE1ParamList.paramarray == NULL || GNBE1ParamList.numelt == 0 )
return ngran_gNB_CU; return ngran_gNB_CU;
if (strcmp(*(GNBE1ParamList.paramarray[0][GNB_CONFIG_E1_CU_TYPE_IDX].strptr), "cp") == 0) else if (strcmp(*(GNBE1ParamList.paramarray[0][GNB_CONFIG_E1_CU_TYPE_IDX].strptr), "cp") == 0)
return ngran_gNB_CUCP; return ngran_gNB_CUCP;
if (strcmp(*(GNBE1ParamList.paramarray[0][GNB_CONFIG_E1_CU_TYPE_IDX].strptr), "up") == 0) else if (strcmp(*(GNBE1ParamList.paramarray[0][GNB_CONFIG_E1_CU_TYPE_IDX].strptr), "up") == 0)
return ngran_gNB_CUUP; return ngran_gNB_CUUP;
else
return ngran_gNB_CU;
} else if (macrlc_has_f1 == 0) } else if (macrlc_has_f1 == 0)
return ngran_gNB; return ngran_gNB;
else else
......
...@@ -108,7 +108,6 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i); ...@@ -108,7 +108,6 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i);
int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp); int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update); int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update);
void nr_read_config_and_init(void); void nr_read_config_and_init(void);
ngran_node_t set_node_type(void);
int RCconfig_NR_CU_E1(MessageDef *msg_p, uint32_t i); int RCconfig_NR_CU_E1(MessageDef *msg_p, uint32_t i);
#endif /* GNB_CONFIG_H_ */ #endif /* GNB_CONFIG_H_ */
......
...@@ -203,6 +203,7 @@ static void rrc_gNB_mac_rrc_init(gNB_RRC_INST *rrc) ...@@ -203,6 +203,7 @@ static void rrc_gNB_mac_rrc_init(gNB_RRC_INST *rrc)
{ {
switch (rrc->node_type) { switch (rrc->node_type) {
case ngran_gNB_CUCP: case ngran_gNB_CUCP:
mac_rrc_dl_f1ap_init(&rrc->mac_rrc);
rrc->mac_rrc.nr_e1_bearer_cxt_msg_transfer = bearer_context_setup_e1ap; rrc->mac_rrc.nr_e1_bearer_cxt_msg_transfer = bearer_context_setup_e1ap;
rrc->mac_rrc.nr_e1_ue_cxt_mod_msg_transfer = ue_cxt_mod_send_e1ap; rrc->mac_rrc.nr_e1_ue_cxt_mod_msg_transfer = ue_cxt_mod_send_e1ap;
break; break;
...@@ -210,11 +211,15 @@ static void rrc_gNB_mac_rrc_init(gNB_RRC_INST *rrc) ...@@ -210,11 +211,15 @@ static void rrc_gNB_mac_rrc_init(gNB_RRC_INST *rrc)
// CUUP should not have a RRC instance but we let it for now // CUUP should not have a RRC instance but we let it for now
break; break;
case ngran_gNB_CU: case ngran_gNB_CU:
case ngran_gNB:
mac_rrc_dl_f1ap_init(&rrc->mac_rrc); mac_rrc_dl_f1ap_init(&rrc->mac_rrc);
rrc->mac_rrc.nr_e1_bearer_cxt_msg_transfer = bearer_context_setup_direct; rrc->mac_rrc.nr_e1_bearer_cxt_msg_transfer = bearer_context_setup_direct;
rrc->mac_rrc.nr_e1_ue_cxt_mod_msg_transfer = ue_cxt_mod_direct; rrc->mac_rrc.nr_e1_ue_cxt_mod_msg_transfer = ue_cxt_mod_direct;
break; break;
case ngran_gNB:
mac_rrc_dl_direct_init(&rrc->mac_rrc);
rrc->mac_rrc.nr_e1_bearer_cxt_msg_transfer = bearer_context_setup_direct;
rrc->mac_rrc.nr_e1_ue_cxt_mod_msg_transfer = ue_cxt_mod_direct;
break;
case ngran_gNB_DU: case ngran_gNB_DU:
/* silently drop this, as we currently still need the RRC at the DU. As /* silently drop this, as we currently still need the RRC at the DU. As
* soon as this is not the case anymore, we can add the AssertFatal() */ * soon as this is not the case anymore, we can add the AssertFatal() */
...@@ -369,7 +374,12 @@ rrc_gNB_generate_RRCSetup( ...@@ -369,7 +374,12 @@ rrc_gNB_generate_RRCSetup(
ue_context_pP->ue_context.ue_release_timer_thres = 1000; ue_context_pP->ue_context.ue_release_timer_thres = 1000;
/* TODO: this should go through the E1 interface */ /* TODO: this should go through the E1 interface */
apply_pdcp_config(ue_context_pP,ctxt_pP); nr_pdcp_add_srbs(ctxt_pP->enb_flag,
ctxt_pP->rnti,
ue_context_pP->ue_context.SRB_configList,
0,
NULL,
NULL);
f1ap_dl_rrc_message_t dl_rrc = { f1ap_dl_rrc_message_t dl_rrc = {
.old_gNB_DU_ue_id = 0xFFFFFF, .old_gNB_DU_ue_id = 0xFFFFFF,
...@@ -3670,7 +3680,7 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, c ...@@ -3670,7 +3680,7 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, c
} }
// send the F1 response message up to update F1-U tunnel info // send the F1 response message up to update F1-U tunnel info
rrc->cu_if.nr_e1_ue_cxt_mod_msg_transfer(msg_e1, instance); rrc->mac_rrc.nr_e1_ue_cxt_mod_msg_transfer(msg_e1, instance);
NR_CellGroupConfig_t *cellGroupConfig = NULL; NR_CellGroupConfig_t *cellGroupConfig = NULL;
......
...@@ -1067,7 +1067,7 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ( ...@@ -1067,7 +1067,7 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
} }
} }
rrc->cu_if.nr_e1_bearer_cxt_msg_transfer(bearer_req, instance); rrc->mac_rrc.nr_e1_bearer_cxt_msg_transfer(bearer_req, instance);
return; return;
} }
......
...@@ -199,7 +199,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity, ...@@ -199,7 +199,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
// Pushing SDAP SDU to GTP-U Layer // Pushing SDAP SDU to GTP-U Layer
MessageDef *message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, MessageDef *message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB,
0, 0,
GTPV1U_GNB_TUNNEL_DATA_REQ, GTPV1U_TUNNEL_DATA_REQ,
sizeof(gtpv1u_tunnel_data_req_t) sizeof(gtpv1u_tunnel_data_req_t)
+ size + GTPU_HEADER_OVERHEAD_MAX - offset); + size + GTPU_HEADER_OVERHEAD_MAX - offset);
AssertFatal(message_p != NULL, "OUT OF MEMORY"); AssertFatal(message_p != NULL, "OUT OF MEMORY");
...@@ -209,8 +209,8 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity, ...@@ -209,8 +209,8 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
req->buffer = gtpu_buffer_p; req->buffer = gtpu_buffer_p;
req->length = size - offset; req->length = size - offset;
req->offset = GTPU_HEADER_OVERHEAD_MAX; req->offset = GTPU_HEADER_OVERHEAD_MAX;
req->rnti = ue_id; req->ue_id = ue_id;
req->pdusession_id = pdusession_id; req->bearer_id = pdusession_id;
LOG_D(SDAP, "%s() sending message to gtp size %d\n", __func__, size-offset); LOG_D(SDAP, "%s() sending message to gtp size %d\n", __func__, size-offset);
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
} else { //nrUE } else { //nrUE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment