Commit bb04e1d4 authored by Vijay Chadachan's avatar Vijay Chadachan Committed by Vijay C

Additional changes for crash fix

parent b828a72c
...@@ -319,7 +319,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB, ...@@ -319,7 +319,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
int tem_proc_ccid = proc->CC_id; int tem_proc_ccid = proc->CC_id;
/* MultiCell: Function modify for Multiple CC */ /* MultiCell: Function modify for Multiple CC */
for (int CC_id=0; CC_id<RC.nb_CC[eNB->Mod_id]; CC_id++) { for (int CC_id=0; CC_id<RC.nb_mac_CC[eNB->Mod_id]; CC_id++) {
eNB->UL_INFO.CC_id = CC_id; eNB->UL_INFO.CC_id = CC_id;
proc->CC_id = CC_id;//Temp solution need to be fixed later proc->CC_id = CC_id;//Temp solution need to be fixed later
eNB->if_inst->UL_indication(&eNB->UL_INFO, (void*)proc); eNB->if_inst->UL_indication(&eNB->UL_INFO, (void*)proc);
...@@ -964,7 +964,7 @@ void init_eNB_proc(int inst) { ...@@ -964,7 +964,7 @@ void init_eNB_proc(int inst) {
pthread_attr_t *attr_prach_br=NULL; pthread_attr_t *attr_prach_br=NULL;
LOG_I(PHY,"%s(inst:%d) RC.nb_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_CC[inst]); LOG_I(PHY,"%s(inst:%d) RC.nb_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_CC[inst]);
for (CC_id=0; CC_id<RC.nb_CC[inst]; CC_id++) { for (CC_id=0; CC_id<RC.nb_mac_CC[inst]; CC_id++) {
eNB = RC.eNB[inst][CC_id]; eNB = RC.eNB[inst][CC_id];
LOG_I(PHY,"Initializing eNB processes instance:%d CC_id %d \n",inst,CC_id); LOG_I(PHY,"Initializing eNB processes instance:%d CC_id %d \n",inst,CC_id);
proc = &eNB->proc; proc = &eNB->proc;
...@@ -1253,10 +1253,10 @@ void init_eNB_afterRU(void) { ...@@ -1253,10 +1253,10 @@ void init_eNB_afterRU(void) {
LOG_I(PHY,"%s() RC.nb_inst:%d\n", __FUNCTION__, RC.nb_inst); LOG_I(PHY,"%s() RC.nb_inst:%d\n", __FUNCTION__, RC.nb_inst);
for (inst=0; inst<RC.nb_inst; inst++) { for (inst=0; inst<RC.nb_inst; inst++) {
LOG_I(PHY,"RC.nb_CC[inst]:%d\n", RC.nb_CC[inst]); LOG_I(PHY,"RC.nb_mac_CC[inst]:%d\n", RC.nb_mac_CC[inst]);
for (CC_id=0; CC_id<RC.nb_CC[inst]; CC_id++) { for (CC_id=0; CC_id<RC.nb_mac_CC[inst]; CC_id++) {
LOG_I(PHY,"RC.nb_CC[inst:%d][CC_id:%d]:%p\n", inst, CC_id, RC.eNB[inst][CC_id]); LOG_I(PHY,"RC.nb_mac_CC[inst:%d][CC_id:%d]:%p\n", inst, CC_id, RC.eNB[inst][CC_id]);
eNB = RC.eNB[inst][CC_id]; eNB = RC.eNB[inst][CC_id];
// map antennas and PRACH signals to eNB RX // map antennas and PRACH signals to eNB RX
LOG_I(PHY,"Mapping RX ports from %d RUs to eNB %d\n",eNB->num_RU,eNB->Mod_id); LOG_I(PHY,"Mapping RX ports from %d RUs to eNB %d\n",eNB->num_RU,eNB->Mod_id);
......
...@@ -207,7 +207,7 @@ void oai_create_enb(void) { ...@@ -207,7 +207,7 @@ void oai_create_enb(void) {
int bodge_counter=0; int bodge_counter=0;
int FAPI_configured_for_a_CC = 0; int FAPI_configured_for_a_CC = 0;
/* MultiCell: Function modify for Multiple CC */ /* MultiCell: Function modify for Multiple CC */
for (int CC_id=0; CC_id<RC.nb_CC[0]; CC_id++) { for (int CC_id=0; CC_id<RC.nb_mac_CC[0]; CC_id++) {
PHY_VARS_eNB *eNB = RC.eNB[0][CC_id]; PHY_VARS_eNB *eNB = RC.eNB[0][CC_id];
if (eNB == NULL) if (eNB == NULL)
{ {
...@@ -236,7 +236,7 @@ void oai_create_enb(void) { ...@@ -236,7 +236,7 @@ void oai_create_enb(void) {
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() Waiting for eNB to become configured (by RRC/PHY) - need to wait otherwise NFAPI messages won't contain correct values\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() Waiting for eNB to become configured (by RRC/PHY) - need to wait otherwise NFAPI messages won't contain correct values\n", __FUNCTION__);
usleep(50000); usleep(50000);
} while(eNB->configured != 1 && !FAPI_configured_for_a_CC); } while(eNB->configured != 1 && !FAPI_configured_for_a_CC);
//Set if the 1 CC is configured //Set if the 1 CC is configured
FAPI_configured_for_a_CC = 1; FAPI_configured_for_a_CC = 1;
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() eNB Cell %d is now configured\n", __FUNCTION__,CC_id); NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() eNB Cell %d is now configured\n", __FUNCTION__,CC_id);
} }
...@@ -261,7 +261,7 @@ void oai_create_gnb(void) { ...@@ -261,7 +261,7 @@ void oai_create_gnb(void) {
RC.gNB[0] = (PHY_VARS_gNB *) calloc(1, sizeof(PHY_VARS_gNB)); RC.gNB[0] = (PHY_VARS_gNB *) calloc(1, sizeof(PHY_VARS_gNB));
LOG_D(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",0,RC.gNB[0]); LOG_D(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",0,RC.gNB[0]);
} }
PHY_VARS_gNB *gNB = RC.gNB[0]; PHY_VARS_gNB *gNB = RC.gNB[0];
RC.nb_nr_CC = (int *)malloc(sizeof(int)); // TODO: find a better function to place this in RC.nb_nr_CC = (int *)malloc(sizeof(int)); // TODO: find a better function to place this in
...@@ -1814,7 +1814,7 @@ void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { ...@@ -1814,7 +1814,7 @@ void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port) {
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() vnf.p7_vnfs[0].config:%p VNF ADDRESS:%s:%d\n", __FUNCTION__, vnf.p7_vnfs[0].config, vnf_addr, vnf_p5_port); NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() vnf.p7_vnfs[0].config:%p VNF ADDRESS:%s:%d\n", __FUNCTION__, vnf.p7_vnfs[0].config, vnf_addr, vnf_p5_port);
strcpy(vnf.p7_vnfs[0].local_addr, vnf_addr); strcpy(vnf.p7_vnfs[0].local_addr, vnf_addr);
//vnf.p7_vnfs[0].local_port = vnf.p7_vnfs[0].local_port; // 50001; // TODO: remove hardcode //vnf.p7_vnfs[0].local_port = vnf.p7_vnfs[0].local_port; // 50001; // TODO: remove hardcode
vnf.p7_vnfs[0].local_port = 50611; vnf.p7_vnfs[0].local_port = 50611;
//vnf.p7_vnfs[0].local_port = 50011; //vnf.p7_vnfs[0].local_port = 50011;
vnf.p7_vnfs[0].mac = (mac_t *)malloc(sizeof(mac_t)); vnf.p7_vnfs[0].mac = (mac_t *)malloc(sizeof(mac_t));
nfapi_vnf_config_t *config = nfapi_vnf_config_create(); nfapi_vnf_config_t *config = nfapi_vnf_config_create();
......
...@@ -163,7 +163,7 @@ void rrc_send_cnf_to_ss(MessageDef *msg_p) ...@@ -163,7 +163,7 @@ void rrc_send_cnf_to_ss(MessageDef *msg_p)
break; break;
} }
itti_send_msg_to_task(TASK_SYS, instance, message_p); itti_send_msg_to_task(TASK_SYS, instance, message_p);
LOG_I(RRC, "Sent Message to SYS_TASK\n"); LOG_I(RRC, "Sent Message to SYS_TASK\n");
} }
...@@ -6751,7 +6751,10 @@ char openair_rrc_eNB_configuration( ...@@ -6751,7 +6751,10 @@ char openair_rrc_eNB_configuration(
} }
for (CC_id = 0; CC_id < RC.nb_CC[0]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_CC[0]; CC_id++) {
if (RC.ss.CC_update_flag[CC_id]) {
init_SI(&ctxt, CC_id, configuration); init_SI(&ctxt, CC_id, configuration);
RC.ss.CC_update_flag[CC_id] = 0;
}
} }
if(need_init) { if(need_init) {
...@@ -10078,8 +10081,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -10078,8 +10081,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
case RRC_AS_SECURITY_CONFIG_REQ: case RRC_AS_SECURITY_CONFIG_REQ:
LOG_A(RRC,"[eNB %ld] Received %s : %p, Integrity_Algo: %d, Ciphering_Algo: %ld \n", LOG_A(RRC,"[eNB %ld] Received %s : %p, Integrity_Algo: %d, Ciphering_Algo: %ld \n",
instance, instance,
msg_name_p, msg_name_p,
&RRC_AS_SECURITY_CONFIG_REQ(msg_p), &RRC_AS_SECURITY_CONFIG_REQ(msg_p),
RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.integrity_algorithm, RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.integrity_algorithm,
RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.ciphering_algorithm); RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.ciphering_algorithm);
......
...@@ -82,7 +82,8 @@ int get_cell_index_pci(uint16_t physCellId, SS_Cell_Context_t SSCell_list[]){ ...@@ -82,7 +82,8 @@ int get_cell_index_pci(uint16_t physCellId, SS_Cell_Context_t SSCell_list[]){
void init_ss_context(SS_Cell_Context_t SSCell_list[]){ void init_ss_context(SS_Cell_Context_t SSCell_list[]){
memset(SSCell_list, 0, (sizeof(SS_Cell_Context_t) * 8)); memset(SSCell_list, 0, (sizeof(SS_Cell_Context_t) * 8));
memset(RC.ss.l1macind,0,sizeof(RC.ss.l1macind)); memset(RC.ss.l1macind,0,sizeof(RC.ss.l1macind));
memset(RC.ss.CC_update_flag,0, (sizeof(RC.ss.CC_update_flag)));
memset(RC.ss.CC_conf_flag,0, (sizeof(RC.ss.CC_conf_flag)));
for(int Cell_idx = 0; Cell_idx < 8; Cell_idx++){ for(int Cell_idx = 0; Cell_idx < 8; Cell_idx++){
SSCell_list[Cell_idx].eutra_cellId = -1; SSCell_list[Cell_idx].eutra_cellId = -1;
} }
...@@ -95,24 +96,24 @@ void init_cell_context(int cell_index, int enb_id, MessageDef *msg_p ) ...@@ -95,24 +96,24 @@ void init_cell_context(int cell_index, int enb_id, MessageDef *msg_p )
//Need to add the initialization of all parameters from RCconfig_RRC() function (enb_config.c ) //Need to add the initialization of all parameters from RCconfig_RRC() function (enb_config.c )
//RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration; //RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
LOG_A(ENB_APP, "[SYS] CC-MGMT init_cell_context cell_index %d \n",cell_index); LOG_A(ENB_APP, "[SYS] CC-MGMT init_cell_context cell_index %d \n",cell_index);
// Cell params, MIB/SIB1 in DU // Cell params, MIB/SIB1 in DU
RRC_CONFIGURATION_REQ(msg_p).tdd_config[cell_index] = RRC_CONFIGURATION_REQ(msg_p).tdd_config[init_cell_id]; RRC_CONFIGURATION_REQ(msg_p).tdd_config[cell_index] = RRC_CONFIGURATION_REQ(msg_p).tdd_config[init_cell_id];
RRC_CONFIGURATION_REQ(msg_p).tdd_config_s[cell_index] = RRC_CONFIGURATION_REQ(msg_p).tdd_config_s[init_cell_id]; RRC_CONFIGURATION_REQ(msg_p).tdd_config_s[cell_index] = RRC_CONFIGURATION_REQ(msg_p).tdd_config_s[init_cell_id];
RRC_CONFIGURATION_REQ(msg_p).prefix_type[cell_index] = RRC_CONFIGURATION_REQ(msg_p).prefix_type[init_cell_id]; RRC_CONFIGURATION_REQ(msg_p).prefix_type[cell_index] = RRC_CONFIGURATION_REQ(msg_p).prefix_type[init_cell_id];
RRC_CONFIGURATION_REQ(msg_p).pbch_repetition[cell_index] = RRC_CONFIGURATION_REQ(msg_p).pbch_repetition[init_cell_id]; RRC_CONFIGURATION_REQ(msg_p).pbch_repetition[cell_index] = RRC_CONFIGURATION_REQ(msg_p).pbch_repetition[init_cell_id];
RRC_CONFIGURATION_REQ(msg_p).eutra_band[cell_index] = RRC_CONFIGURATION_REQ(msg_p).eutra_band[init_cell_id] ; RRC_CONFIGURATION_REQ(msg_p).eutra_band[cell_index] = RRC_CONFIGURATION_REQ(msg_p).eutra_band[init_cell_id] ;
RRC_CONFIGURATION_REQ(msg_p).downlink_frequency[cell_index] = RRC_CONFIGURATION_REQ(msg_p).downlink_frequency[init_cell_id] ; RRC_CONFIGURATION_REQ(msg_p).downlink_frequency[cell_index] = RRC_CONFIGURATION_REQ(msg_p).downlink_frequency[init_cell_id] ;
RRC_CONFIGURATION_REQ(msg_p).uplink_frequency_offset[cell_index] = RRC_CONFIGURATION_REQ(msg_p).uplink_frequency_offset[init_cell_id] ; RRC_CONFIGURATION_REQ(msg_p).uplink_frequency_offset[cell_index] = RRC_CONFIGURATION_REQ(msg_p).uplink_frequency_offset[init_cell_id] ;
RRC_CONFIGURATION_REQ(msg_p).Nid_cell[cell_index] = RRC_CONFIGURATION_REQ(msg_p).Nid_cell[init_cell_id] ; RRC_CONFIGURATION_REQ(msg_p).Nid_cell[cell_index] = RRC_CONFIGURATION_REQ(msg_p).Nid_cell[init_cell_id] ;
RRC_CONFIGURATION_REQ(msg_p).N_RB_DL[cell_index] =RRC_CONFIGURATION_REQ(msg_p).N_RB_DL[init_cell_id]; RRC_CONFIGURATION_REQ(msg_p).N_RB_DL[cell_index] =RRC_CONFIGURATION_REQ(msg_p).N_RB_DL[init_cell_id];
RRC_CONFIGURATION_REQ(msg_p).frame_type[cell_index] = RRC_CONFIGURATION_REQ(msg_p).frame_type[init_cell_id]; RRC_CONFIGURATION_REQ(msg_p).frame_type[cell_index] = RRC_CONFIGURATION_REQ(msg_p).frame_type[init_cell_id];
//if (config_check_band_frequencies(cell_index, //if (config_check_band_frequencies(cell_index,
......
...@@ -1058,6 +1058,7 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req) ...@@ -1058,6 +1058,7 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req)
{ {
//The flag is used to initilize the cell in the RRC layer during init_SI funciton //The flag is used to initilize the cell in the RRC layer during init_SI funciton
RC.ss.CC_conf_flag[cell_index] = 1; RC.ss.CC_conf_flag[cell_index] = 1;
RC.ss.CC_update_flag[cell_index] = 1;
returnState = SS_STATE_CELL_CONFIGURED; returnState = SS_STATE_CELL_CONFIGURED;
//Increment nb_cc only from 2nd cell as the initilization is done for 1 CC //Increment nb_cc only from 2nd cell as the initilization is done for 1 CC
if (cell_index) if (cell_index)
...@@ -1071,11 +1072,17 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req) ...@@ -1071,11 +1072,17 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req)
//Set the number of MAC_CC to current configured CC value //Set the number of MAC_CC to current configured CC value
//*RC.nb_mac_CC= RC.nb_CC[0]; //*RC.nb_mac_CC= RC.nb_CC[0];
LOG_I (ENB_SS_SYS_TASK,"[SYS] CC-MGMT nb_cc is incremented current Configured CC are %d current CC_index %d nb_mac_CC %d\n", LOG_I (ENB_SS_SYS_TASK,"[SYS] CC-MGMT nb_cc is incremented current Configured RC.nb_CC %d current CC_index %d RC.nb_mac_CC %d\n",
RC.nb_CC[0],cell_index,*RC.nb_mac_CC); RC.nb_CC[0],cell_index,*RC.nb_mac_CC);
} }
} }
} }
else
{
RC.ss.CC_update_flag[cell_index] = 1;
LOG_I (ENB_SS_SYS_TASK,"[SYS] CC-MGMT configured RC.nb_CC %d current updated CC_index %d RC.nb_mac_CC %d\n",
RC.nb_CC[0],cell_index,*RC.nb_mac_CC);
}
break; break;
......
...@@ -58,7 +58,7 @@ typedef struct RrcHOAsSecurityConfigReq_s { ...@@ -58,7 +58,7 @@ typedef struct RrcHOAsSecurityConfigReq_s {
bool isCipheringInfoPresent; bool isCipheringInfoPresent;
AS_CipheringInfo Ciphering; AS_CipheringInfo Ciphering;
int rnti; int rnti;
}RrcHOAsSecurityConfig_t; }RrcHOAsSecurityConfig_t;
typedef struct ss_config_s { typedef struct ss_config_s {
/** SS mode of operation */ /** SS mode of operation */
...@@ -92,6 +92,7 @@ typedef struct ss_config_s { ...@@ -92,6 +92,7 @@ typedef struct ss_config_s {
ss_rrc_pdcp_api_t *ss_pdcp_api; ss_rrc_pdcp_api_t *ss_pdcp_api;
ss_crnti_config_t ss_crnti[MAX_NUM_CCs]; ss_crnti_config_t ss_crnti[MAX_NUM_CCs];
RrcHOAsSecurityConfig_t HOASSecurityCOnfig; RrcHOAsSecurityConfig_t HOASSecurityCOnfig;
uint8_t CC_update_flag[MAX_NUM_CCs];
} ss_config_t; } ss_config_t;
/** /**
typedef enum { typedef enum {
......
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