Read RU config before FlexRAN to allow split identification
This commit is contained in:
@@ -3104,4 +3104,6 @@ void read_config_and_init(void) {
|
|||||||
memset((void *)RC.rrc[enb_id], 0, sizeof(eNB_RRC_INST));
|
memset((void *)RC.rrc[enb_id], 0, sizeof(eNB_RRC_INST));
|
||||||
RCconfig_RRC(enb_id, RC.rrc[enb_id],macrlc_has_f1[enb_id]);
|
RCconfig_RRC(enb_id, RC.rrc[enb_id],macrlc_has_f1[enb_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RCconfig_flexran();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2683,13 +2683,9 @@ void init_RU(char *rf_config_file, clock_source_t clock_source, clock_source_t t
|
|||||||
PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL;
|
PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL;
|
||||||
LTE_DL_FRAME_PARMS *fp = (LTE_DL_FRAME_PARMS *)NULL;
|
LTE_DL_FRAME_PARMS *fp = (LTE_DL_FRAME_PARMS *)NULL;
|
||||||
// create status mask
|
// create status mask
|
||||||
RC.ru_mask = 0;
|
RC.ru_mask= (1 << RC.nb_RU) - 1;
|
||||||
pthread_mutex_init(&RC.ru_mutex,NULL);
|
pthread_mutex_init(&RC.ru_mutex,NULL);
|
||||||
pthread_cond_init(&RC.ru_cond,NULL);
|
pthread_cond_init(&RC.ru_cond,NULL);
|
||||||
// read in configuration file)
|
|
||||||
printf("configuring RU from file\n");
|
|
||||||
RCconfig_RU();
|
|
||||||
LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_nprocs());
|
|
||||||
|
|
||||||
if (RC.nb_CC != 0)
|
if (RC.nb_CC != 0)
|
||||||
for (i=0; i<RC.nb_L1_inst; i++)
|
for (i=0; i<RC.nb_L1_inst; i++)
|
||||||
@@ -2919,8 +2915,6 @@ void RCconfig_RU(void) {
|
|||||||
|
|
||||||
if ( RUParamList.numelt > 0) {
|
if ( RUParamList.numelt > 0) {
|
||||||
RC.ru = (RU_t **)malloc(RC.nb_RU*sizeof(RU_t *));
|
RC.ru = (RU_t **)malloc(RC.nb_RU*sizeof(RU_t *));
|
||||||
RC.ru_mask=(1<<RC.nb_RU) - 1;
|
|
||||||
printf("Set RU mask to %lx\n",RC.ru_mask);
|
|
||||||
|
|
||||||
for (int j = 0; j < RC.nb_RU; j++) {
|
for (int j = 0; j < RC.nb_RU; j++) {
|
||||||
RC.ru[j] = (RU_t *)malloc(sizeof(RU_t));
|
RC.ru[j] = (RU_t *)malloc(sizeof(RU_t));
|
||||||
|
|||||||
@@ -585,9 +585,22 @@ int main ( int argc, char **argv )
|
|||||||
/* Read configuration */
|
/* Read configuration */
|
||||||
if (RC.nb_inst > 0) {
|
if (RC.nb_inst > 0) {
|
||||||
read_config_and_init();
|
read_config_and_init();
|
||||||
/* Start the agent. If it is turned off in the configuration, it won't start */
|
} else {
|
||||||
RCconfig_flexran();
|
printf("RC.nb_inst = 0, Initializing L1\n");
|
||||||
|
RCconfig_L1();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We need to read RU configuration before FlexRAN starts so it knows what
|
||||||
|
* splits to report. Actual RU start comes later. */
|
||||||
|
if (RC.nb_RU > 0 && NFAPI_MODE != NFAPI_MODE_VNF) {
|
||||||
|
RCconfig_RU();
|
||||||
|
LOG_I(PHY,
|
||||||
|
"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",
|
||||||
|
RC.nb_L1_inst, RC.nb_RU, get_nprocs());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RC.nb_inst > 0) {
|
||||||
|
/* Start the agent. If it is turned off in the configuration, it won't start */
|
||||||
for (i = 0; i < RC.nb_inst; i++) {
|
for (i = 0; i < RC.nb_inst; i++) {
|
||||||
flexran_agent_start(i);
|
flexran_agent_start(i);
|
||||||
}
|
}
|
||||||
@@ -607,9 +620,6 @@ int main ( int argc, char **argv )
|
|||||||
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||||
}
|
}
|
||||||
node_type = RC.rrc[0]->node_type;
|
node_type = RC.rrc[0]->node_type;
|
||||||
} else {
|
|
||||||
printf("RC.nb_inst = 0, Initializing L1\n");
|
|
||||||
RCconfig_L1();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RC.nb_inst > 0 && NODE_IS_CU(node_type)) {
|
if (RC.nb_inst > 0 && NODE_IS_CU(node_type)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user