Commit b360afd0 authored by Raymond Knopp's avatar Raymond Knopp

fixes for RRU/RAU function after changes for monolithic eNB (some things...

fixes for RRU/RAU function after changes for monolithic eNB (some things during init were broken for RRU)
parent b219be2e
Branches unavailable
2024.w06 2024.w05 2024.w04 2024.w03 2024.w02 2024.w01 2023.w51 2023.w50 2023.w49 2023.w48 2023.w47 2023.w45 2023.w43 2023.w42 2023.w41 2023.w40 2023.w39 2023.w38 2023.w37 2023.w36 2023.w34 2023.w33 2023.w32 2023.w31 2023.w30 2023.w29 2023.w28 2023.w27 2023.w26 2023.w25 2023.w24 2023.w23 2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 2021.wk46 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w51_c 2021.w51_a 2021.w50_a 2021.w49_b 2021.w49_a 2021.w48 2021.w47 2021.w46 2021.w46-powder 2021.w45 2021.w45_b 2021.w44 2021.w43 2021.w42 2021.w37 2021.w36 2021.w35 2021.w34 2021.w33 2021.w32 2021.w31 2021.w30 2021.w29 2021.w28 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 2019.w08 2019.w07 2019.w06 2019.w04 2019.w03 2018.w51 2018.w48 2018.w47 2018.w46 2018.w44 2018.w41 2018.w40 2018.w39 2018.w36 2018.w33 2018.w31 2018.w29 2018.w25 2018.w19 2018.w15 2018.w12 2018.w11 2018.w10 2018.w09 2018.w08 2018.w07 2018.w06 2018.w05 2018.w04 2018.w03 2018.w02 2017.w48 2017.w46 2017.w43 2017.w42 v2.1.0 v2.0.0 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 v1.0.3 v1.0.2 v1.0.1 v1.0.0 setparam osa-etsi-ws-ue osa-etsi-ws-try2 osa-etsi-ws-try1 osa-etsi-ws-gNB oai_nr_sync nr-ip-over-lte nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 flexran-eol develop-nr-pdcch develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 develop-nr-2019w28 develop-nr-2019w23 benetel_phase_rotation benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 benetel_enb_rel_1.0
No related merge requests found
...@@ -517,27 +517,31 @@ void RCconfig_RU() { ...@@ -517,27 +517,31 @@ void RCconfig_RU() {
AssertFatal (0, AssertFatal (0,
"Failed to parse configuration file %s, RU %d config !\n", "Failed to parse configuration file %s, RU %d config !\n",
RC.config_file_name, j); RC.config_file_name, j);
continue; // FIXME will prevent segfaults below, not sure what happens at function exit... continue;
} }
} }
AssertFatal((setting_eNB_list = config_setting_get_member(setting_ru, CONFIG_STRING_RU_ENB_LIST))!=NULL,"No RU<->eNB mappings\n"); if (RC.nb_L1_inst>0) {
AssertFatal((setting_eNB_list = config_setting_get_member(setting_ru, CONFIG_STRING_RU_ENB_LIST))!=NULL,"No RU<->eNB mappings\n");
if (setting_eNB_list != NULL) num_eNB4RU = config_setting_length(setting_eNB_list);
else num_eNB4RU=0;
AssertFatal(num_eNB4RU>0,"Number of eNBs is zero\n");
for (i=0;i<num_eNB4RU;i++) { if (setting_eNB_list != NULL) num_eNB4RU = config_setting_length(setting_eNB_list);
setting_eNB_list_elem = config_setting_get_elem(setting_eNB_list,i); else num_eNB4RU=0;
eNB_list[i] = config_setting_get_int(setting_eNB_list_elem); AssertFatal(num_eNB4RU>0,"Number of eNBs is zero\n");
printf("RU %d: eNB %d\n",j,eNB_list[i]);
for (i=0;i<num_eNB4RU;i++) {
setting_eNB_list_elem = config_setting_get_elem(setting_eNB_list,i);
eNB_list[i] = config_setting_get_int(setting_eNB_list_elem);
printf("RU %d: eNB %d\n",j,eNB_list[i]);
}
} }
config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_TX, &att_tx);
config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_RX, &att_rx);
if ( !( if ( !(
config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_TX, &nb_tx) config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_TX, &nb_tx)
&& config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_RX, &nb_rx) && config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_RX, &nb_rx)
&& config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_TX, &att_tx)
&& config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_RX, &att_rx)
&& config_setting_lookup_string(setting_ru, CONFIG_STRING_RU_LOCAL_RF,(const char **)&local_rf) && config_setting_lookup_string(setting_ru, CONFIG_STRING_RU_LOCAL_RF,(const char **)&local_rf)
)) { )) {
AssertFatal (0, AssertFatal (0,
...@@ -560,24 +564,37 @@ void RCconfig_RU() { ...@@ -560,24 +564,37 @@ void RCconfig_RU() {
if (fronthaul_flag == CONFIG_FALSE) { if (fronthaul_flag == CONFIG_FALSE) {
RC.ru[j]->if_south = LOCAL_RF; RC.ru[j]->if_south = LOCAL_RF;
RC.ru[j]->function = eNodeB_3GPP; RC.ru[j]->function = eNodeB_3GPP;
printf("Setting function for RU %d to eNodeB_3GPP\n",j);
} }
else { else {
RC.ru[j]->eth_params.local_if_name = strdup(if_name);
RC.ru[j]->eth_params.my_addr = strdup(ipv4);
RC.ru[j]->eth_params.remote_addr = strdup(ipv4_remote);
RC.ru[j]->eth_params.my_portc = local_portc;
RC.ru[j]->eth_params.remote_portc = remote_portc;
RC.ru[j]->eth_params.my_portd = local_portd;
RC.ru[j]->eth_params.remote_portd = remote_portd;
if (strcmp(tr_preference, "udp") == 0) { if (strcmp(tr_preference, "udp") == 0) {
RC.ru[j]->if_south = LOCAL_RF; RC.ru[j]->if_south = LOCAL_RF;
RC.ru[j]->function = NGFI_RRU_IF5; RC.ru[j]->function = NGFI_RRU_IF5;
RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE; RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j);
} else if (strcmp(tr_preference, "raw") == 0) { } else if (strcmp(tr_preference, "raw") == 0) {
RC.ru[j]->if_south = LOCAL_RF; RC.ru[j]->if_south = LOCAL_RF;
RC.ru[j]->function = NGFI_RRU_IF5; RC.ru[j]->function = NGFI_RRU_IF5;
RC.ru[j]->eth_params.transp_preference = ETH_RAW_MODE; RC.ru[j]->eth_params.transp_preference = ETH_RAW_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j);
} else if (strcmp(tr_preference, "udp_if4p5") == 0) { } else if (strcmp(tr_preference, "udp_if4p5") == 0) {
RC.ru[j]->if_south = LOCAL_RF; RC.ru[j]->if_south = LOCAL_RF;
RC.ru[j]->function = NGFI_RRU_IF4p5; RC.ru[j]->function = NGFI_RRU_IF4p5;
RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j);
} else if (strcmp(tr_preference, "raw_if4p5") == 0) { } else if (strcmp(tr_preference, "raw_if4p5") == 0) {
RC.ru[j]->if_south = LOCAL_RF; RC.ru[j]->if_south = LOCAL_RF;
RC.ru[j]->function = NGFI_RRU_IF4p5; RC.ru[j]->function = NGFI_RRU_IF4p5;
RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j);
} }
} }
...@@ -738,6 +755,7 @@ void RCconfig_L1() { ...@@ -738,6 +755,7 @@ void RCconfig_L1() {
printf("Initializing northbound interface for L1\n"); printf("Initializing northbound interface for L1\n");
l1_north_init_eNB(); l1_north_init_eNB();
} }
return;
} }
void RCconfig_macrlc() { void RCconfig_macrlc() {
...@@ -868,6 +886,7 @@ void RCconfig_macrlc() { ...@@ -868,6 +886,7 @@ void RCconfig_macrlc() {
} }
}// j=0..num_inst }// j=0..num_inst
} }
return;
} }
int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
...@@ -1157,19 +1176,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { ...@@ -1157,19 +1176,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id; RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id;
/*
if (strcmp(cell_type, "CELL_MACRO_ENB") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_MACRO_ENB;
} else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_HOME_ENB;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
lib_config_file_name_pP, i, cell_type);
}
enb_properties_loc.properties[enb_properties_loc_index]->eNB_name = strdup(enb_name);
*/
RRC_CONFIGURATION_REQ (msg_p).tac = (uint16_t)atoi(tac); RRC_CONFIGURATION_REQ (msg_p).tac = (uint16_t)atoi(tac);
RRC_CONFIGURATION_REQ (msg_p).mcc = (uint16_t)atoi(mcc); RRC_CONFIGURATION_REQ (msg_p).mcc = (uint16_t)atoi(mcc);
RRC_CONFIGURATION_REQ (msg_p).mnc = (uint16_t)atoi(mnc); RRC_CONFIGURATION_REQ (msg_p).mnc = (uint16_t)atoi(mnc);
...@@ -1273,43 +1280,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { ...@@ -1273,43 +1280,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
} }
nb_cc++; nb_cc++;
/*
if (strcmp(cc_node_function, "eNodeB_3GPP") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_function[j] = eNodeB_3GPP;
} else if (strcmp(cc_node_function, "eNodeB_3GPP_BBU") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_function[j] = eNodeB_3GPP_BBU;
} else if (strcmp(cc_node_function, "NGFI_RCC_IF4p5") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_function[j] = NGFI_RCC_IF4p5;
} else if (strcmp(cc_node_function, "NGFI_RAU_IF4p5") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_function[j] = NGFI_RAU_IF4p5;
} else if (strcmp(cc_node_function, "NGFI_RRU_IF4p5") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_function[j] = NGFI_RRU_IF4p5;
} else if (strcmp(cc_node_function, "NGFI_RRU_IF5") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_function[j] = NGFI_RRU_IF5;
} else {
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for node_function choice: eNodeB_3GPP or eNodeB_3GPP_BBU or NGFI_IF4_RCC or NGFI_IF4_RRU or NGFI_IF5_RRU !\n",
lib_config_file_name_pP, i, cc_node_function);
}
if (strcmp(cc_node_timing, "synch_to_ext_device") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_timing[j] = synch_to_ext_device;
} else if (strcmp(cc_node_timing, "synch_to_other") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_timing[j] = synch_to_other;
} else {
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for node_function choice: SYNCH_TO_DEVICE or SYNCH_TO_OTHER !\n",
lib_config_file_name_pP, i, cc_node_timing);
}
if ((cc_node_synch_ref >= -1) && (cc_node_synch_ref < num_component_carriers)) {
enb_properties_loc.properties[enb_properties_loc_index]->cc_node_synch_ref[j] = (int16_t) cc_node_synch_ref;
} else {
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for node_synch_ref choice: valid CC_id or -1 !\n",
lib_config_file_name_pP, i, cc_node_synch_ref);
}
*/
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config;
...@@ -2699,308 +2670,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { ...@@ -2699,308 +2670,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
rrc->srb1_poll_byte = PollByte_kBinfinity; rrc->srb1_poll_byte = PollByte_kBinfinity;
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8;
} }
/*
// Network Controller
subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG);
if (subsetting != NULL) {
if ( (
config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME,
(const char **)&flexran_agent_interface_name)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS,
(const char **)&flexran_agent_ipv4_address)
&& config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT,
&flexran_agent_port)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE,
(const char **)&flexran_agent_cache)
)
) {
enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name);
cidr = flexran_agent_ipv4_address;
address = strtok(cidr, "/");
//enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address = strdup(address);
if (address) {
IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" );
}
enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_port = flexran_agent_port;
enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_cache = strdup(flexran_agent_cache);
}
}
*/
/*
// OTG _CONFIG
setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG);
if (setting_otg != NULL) {
num_otg_elements = config_setting_length(setting_otg);
printf("num otg elements %d \n", num_otg_elements);
enb_properties_loc.properties[enb_properties_loc_index]->num_otg_elements = 0;
for (j = 0; j < num_otg_elements; j++) {
subsetting_otg=config_setting_get_elem(setting_otg, j);
if (config_setting_lookup_int(subsetting_otg, ENB_CONF_STRING_OTG_UE_ID, &otg_ue_id)) {
enb_properties_loc.properties[enb_properties_loc_index]->otg_ue_id[j] = otg_ue_id;
} else {
enb_properties_loc.properties[enb_properties_loc_index]->otg_ue_id[j] = 1;
}
if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_APP_TYPE, (const char **)&otg_app_type)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = map_str_to_int(otg_app_type_names,otg_app_type))== -1) {
enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = BCBR;
}
} else {
enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = NO_PREDEFINED_TRAFFIC; // 0
}
if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_BG_TRAFFIC, (const char **)&otg_bg_traffic)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j] = map_str_to_int(switch_names,otg_bg_traffic)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j]=0;
}
} else {
enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j] = 0;
printf("otg bg %s\n", otg_bg_traffic);
}
enb_properties_loc.properties[enb_properties_loc_index]->num_otg_elements+=1;
}
}
// log_config
subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG);
if (subsetting != NULL) {
// global
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_LEVEL, (const char **) &glog_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->glog_level = map_str_to_int(log_level_names, glog_level)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO;
}
//printf( "\tGlobal log level :\t%s->%d\n",glog_level, enb_properties_loc.properties[enb_properties_loc_index]->glog_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,(const char **) &glog_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = map_str_to_int(log_verbosity_names, glog_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED;
}
//printf( "\tGlobal log verbosity:\t%s->%d\n",glog_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED;
}
// HW
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_LEVEL, (const char **) &hw_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = map_str_to_int(log_level_names,hw_log_level)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO;
}
//printf( "\tHW log level :\t%s->%d\n",hw_log_level,enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_VERBOSITY, (const char **) &hw_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = map_str_to_int(log_verbosity_names,hw_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED;
}
//printf( "\tHW log verbosity:\t%s->%d\n",hw_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED;
}
// phy
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_LEVEL,(const char **) &phy_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = map_str_to_int(log_level_names,phy_log_level)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO;
}
//printf( "\tPHY log level :\t%s->%d\n",phy_log_level,enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_VERBOSITY, (const char **)&phy_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = map_str_to_int(log_verbosity_names,phy_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED;
}
//printf( "\tPHY log verbosity:\t%s->%d\n",phy_log_level,enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED;
}
//mac
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_LEVEL, (const char **)&mac_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = map_str_to_int(log_level_names,mac_log_level)) == -1 ) {
enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO;
}
//printf( "\tMAC log level :\t%s->%d\n",mac_log_level,enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_VERBOSITY, (const char **)&mac_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = map_str_to_int(log_verbosity_names,mac_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED;
}
//printf( "\tMAC log verbosity:\t%s->%d\n",mac_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED;
}
//rlc
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_LEVEL, (const char **)&rlc_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = map_str_to_int(log_level_names,rlc_log_level)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO;
}
//printf( "\tRLC log level :\t%s->%d\n",rlc_log_level, enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_VERBOSITY, (const char **)&rlc_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = map_str_to_int(log_verbosity_names,rlc_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED;
}
//printf( "\tRLC log verbosity:\t%s->%d\n",rlc_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED;
}
//pdcp
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_LEVEL, (const char **)&pdcp_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = map_str_to_int(log_level_names,pdcp_log_level)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO;
}
//printf( "\tPDCP log level :\t%s->%d\n",pdcp_log_level, enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_VERBOSITY, (const char **)&pdcp_log_verbosity)) {
enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = map_str_to_int(log_verbosity_names,pdcp_log_verbosity);
//printf( "\tPDCP log verbosity:\t%s->%d\n",pdcp_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = LOG_MED;
}
//rrc
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_LEVEL, (const char **)&rrc_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = map_str_to_int(log_level_names,rrc_log_level)) == -1 ) {
enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO;
}
//printf( "\tRRC log level :\t%s->%d\n",rrc_log_level,enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_VERBOSITY, (const char **)&rrc_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = map_str_to_int(log_verbosity_names,rrc_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED;
}
//printf( "\tRRC log verbosity:\t%s->%d\n",rrc_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_LEVEL, (const char **)&gtpu_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = map_str_to_int(log_level_names,gtpu_log_level)) == -1 ) {
enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO;
}
//printf( "\tGTPU log level :\t%s->%d\n",gtpu_log_level,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_VERBOSITY, (const char **)&gtpu_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = map_str_to_int(log_verbosity_names,gtpu_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED;
}
//printf( "\tGTPU log verbosity:\t%s->%d\n",gtpu_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_LEVEL, (const char **)&udp_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = map_str_to_int(log_level_names,udp_log_level)) == -1 ) {
enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO;
}
//printf( "\tUDP log level :\t%s->%d\n",udp_log_level,enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_VERBOSITY, (const char **)&udp_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = map_str_to_int(log_verbosity_names,udp_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED;
}
//printf( "\tUDP log verbosity:\t%s->%d\n",udp_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_LEVEL, (const char **)&osa_log_level)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = map_str_to_int(log_level_names,osa_log_level)) == -1 ) {
enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO;
}
//printf( "\tOSA log level :\t%s->%d\n",osa_log_level,enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO;
}
if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_VERBOSITY, (const char **)&osa_log_verbosity)) {
if ((enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = map_str_to_int(log_verbosity_names,osa_log_verbosity)) == -1) {
enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED;
}
//printf( "\tOSA log verbosity:\t%s->%d\n",osa_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gosa_log_verbosity);
} else {
enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED;
}
} else { // not configuration is given
enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED;
enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO;
enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED;
}
*/
break; break;
} }
} }
...@@ -3343,24 +3013,6 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { ...@@ -3343,24 +3013,6 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address); strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address);
/*
in_addr_t ipv4_address;
if (address) {
IPV4_STR_ADDR_TO_INT_NWBO ( address, ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" );
}
strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, inet_ntoa(ipv4_address));
// S1AP_REGISTER_ENB_REQ (msg_p).enb_port_for_S1U = enb_port_for_S1U;
S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1_MME = strdup(enb_interface_name_for_S1_MME);
cidr = enb_ipv4_address_for_S1_MME;
address = strtok(cidr, "/");
if (address) {
IPV4_STR_ADDR_TO_INT_NWBO ( address, S1AP_REGISTER_ENB_REQ(msg_p).enb_ipv4_address_for_S1_MME, "BAD IP ADDRESS FORMAT FOR eNB S1_MME !\n" );
}
*/
} }
} }
...@@ -3373,6 +3025,7 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { ...@@ -3373,6 +3025,7 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
} }
} }
} }
return;
} }
void RCConfig(const char *config_file_name) { void RCConfig(const char *config_file_name) {
...@@ -3425,4 +3078,5 @@ void RCConfig(const char *config_file_name) { ...@@ -3425,4 +3078,5 @@ void RCConfig(const char *config_file_name) {
AssertFatal(0,"Configuration file is null\n"); AssertFatal(0,"Configuration file is null\n");
} }
return;
} }
...@@ -1788,17 +1788,18 @@ void init_RU(const char *rf_config_file) { ...@@ -1788,17 +1788,18 @@ void init_RU(const char *rf_config_file) {
eNB0 = ru->eNB_list[0]; eNB0 = ru->eNB_list[0];
if ((ru->function != NGFI_RRU_IF5) || (ru->function != NGFI_RRU_IF4p5)) if ((ru->function != NGFI_RRU_IF5) && (ru->function != NGFI_RRU_IF4p5))
AssertFatal(eNB0!=NULL,"eNB0 is null!\n"); AssertFatal(eNB0!=NULL,"eNB0 is null!\n");
if (eNB0) { if (eNB0) {
LOG_I(PHY,"Copying frame parms from eNB %d to ru %d\n",eNB0->Mod_id,ru->idx); LOG_I(PHY,"Copying frame parms from eNB %d to ru %d\n",eNB0->Mod_id,ru->idx);
memcpy((void*)&ru->frame_parms,(void*)&eNB0->frame_parms,sizeof(LTE_DL_FRAME_PARMS)); memcpy((void*)&ru->frame_parms,(void*)&eNB0->frame_parms,sizeof(LTE_DL_FRAME_PARMS));
}
// attach all RU to all eNBs in its list/ // attach all RU to all eNBs in its list/
for (i=0;i<ru->num_eNB;i++) { for (i=0;i<ru->num_eNB;i++) {
eNB0 = ru->eNB_list[i]; eNB0 = ru->eNB_list[i];
eNB0->RU_list[eNB0->num_RU++] = ru; eNB0->RU_list[eNB0->num_RU++] = ru;
}
} }
// LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],eNB_timing[ru->if_timing],ru->function); // LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],eNB_timing[ru->if_timing],ru->function);
...@@ -1863,9 +1864,11 @@ void init_RU(const char *rf_config_file) { ...@@ -1863,9 +1864,11 @@ void init_RU(const char *rf_config_file) {
ru->start_rf = start_rf; // need to start the local RF interface ru->start_rf = start_rf; // need to start the local RF interface
printf("configuring ru_id %d (start_rf %p)\n",ru_id,start_rf); printf("configuring ru_id %d (start_rf %p)\n",ru_id,start_rf);
fill_rf_config(ru,rf_config_file); if (ru->function == eNodeB_3GPP) { // configure RF parameters only for 3GPP eNodeB, we need to get them from RAU otherwise
init_frame_parms(&ru->frame_parms,1); fill_rf_config(ru,rf_config_file);
phy_init_RU(ru); init_frame_parms(&ru->frame_parms,1);
phy_init_RU(ru);
}
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg); ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
if (setup_RU_buffers(ru)!=0) { if (setup_RU_buffers(ru)!=0) {
......
...@@ -1361,7 +1361,7 @@ int main( int argc, char **argv ) ...@@ -1361,7 +1361,7 @@ int main( int argc, char **argv )
#endif #endif
} else { } else {
printf("configuring for RAU\n"); printf("configuring for RAU/RRU\n");
set_comp_log(HW, hw_log_level, hw_log_verbosity, 1); set_comp_log(HW, hw_log_level, hw_log_verbosity, 1);
set_comp_log(PHY, phy_log_level, phy_log_verbosity, 1); set_comp_log(PHY, phy_log_level, phy_log_verbosity, 1);
...@@ -1706,21 +1706,9 @@ int main( int argc, char **argv ) ...@@ -1706,21 +1706,9 @@ int main( int argc, char **argv )
} }
} }
AssertFatal(RC.eNB[0][0]->UL_INFO.crc_ind.crc_pdu_list!=NULL,
"RC.eNB[0][0]->UL_INFO.crc_ind.crc_pdu_list is null\n");
AssertFatal(RC.eNB[0][0]->UL_INFO.rx_ind.rx_pdu_list!=NULL,
"RC.eNB[0][0]->UL_INFO.rx_ind.rx_pdu_list is null\n");
wait_RUs(); wait_RUs();
AssertFatal(RC.eNB[0][0]->UL_INFO.crc_ind.crc_pdu_list!=NULL,
"RC.eNB[0][0]->UL_INFO.crc_ind.crc_pdu_list is null\n");
AssertFatal(RC.eNB[0][0]->UL_INFO.rx_ind.rx_pdu_list!=NULL,
"RC.eNB[0][0]->UL_INFO.rx_ind.rx_pdu_list is null\n");
// once all RUs are ready intiailize the rest of the eNBs ((dependence on final RU parameters after configuration) // once all RUs are ready intiailize the rest of the eNBs ((dependence on final RU parameters after configuration)
init_eNB_afterRU(); init_eNB_afterRU();
AssertFatal(RC.eNB[0][0]->UL_INFO.crc_ind.crc_pdu_list!=NULL,
"RC.eNB[0][0]->UL_INFO.crc_ind.crc_pdu_list is null\n");
AssertFatal(RC.eNB[0][0]->UL_INFO.rx_ind.rx_pdu_list!=NULL,
"RC.eNB[0][0]->UL_INFO.rx_ind.rx_pdu_list is null\n");
} }
......
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