Commit 85f9d566 authored by Wang Tsu-Han's avatar Wang Tsu-Han

testing for multi L1

parent bf55d13c
...@@ -118,6 +118,7 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, ...@@ -118,6 +118,7 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
MessageDef *msg_p; MessageDef *msg_p;
uint32_t register_enb_pending = 0; uint32_t register_enb_pending = 0;
printf("~~~~~~~~~~~~~~~~~~~~~~~~ enb_id_start = %d, enb_id_end = %d", enb_id_start, enb_id_end);
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) { for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
{ {
/* note: there is an implicit relationship between the data structure and the message name */ /* note: there is an implicit relationship between the data structure and the message name */
...@@ -216,6 +217,12 @@ void *eNB_app_task(void *args_p) ...@@ -216,6 +217,12 @@ void *eNB_app_task(void *args_p)
configure_rrc(enb_id); configure_rrc(enb_id);
} }
/* Start the agent. If it is turned off in the configuration, it won't start */
/*RCconfig_flexran();
for (i = 0; i < RC.nb_L1_inst; i++) {
flexran_agent_start(i);
}*/
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
/* Try to register each eNB */ /* Try to register each eNB */
registered_enb = 0; registered_enb = 0;
......
...@@ -151,6 +151,13 @@ void RCconfig_flexran() { ...@@ -151,6 +151,13 @@ void RCconfig_flexran() {
paramdef_t ENBSParams[] = ENBSPARAMS_DESC; paramdef_t ENBSParams[] = ENBSPARAMS_DESC;
config_get(ENBSParams, sizeof(ENBSParams)/sizeof(paramdef_t), NULL); config_get(ENBSParams, sizeof(ENBSParams)/sizeof(paramdef_t), NULL);
num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
/*~~~~~~~~~~~~~~~~~~ what's being added for test ~~~~~~~~~~~~~~~~~~*/
paramlist_def_t L1ParamList = {CONFIG_STRING_L1_LIST,NULL,0};
config_getlist( &L1ParamList,NULL,0, NULL);
int nb_L1_inst = L1ParamList.numelt;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/* for eNB ID */ /* for eNB ID */
paramdef_t ENBParams[] = ENBPARAMS_DESC; paramdef_t ENBParams[] = ENBPARAMS_DESC;
paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST, NULL, 0}; paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST, NULL, 0};
...@@ -176,6 +183,7 @@ void RCconfig_flexran() { ...@@ -176,6 +183,7 @@ void RCconfig_flexran() {
} }
for (i = 0; i < num_enbs; i++) { for (i = 0; i < num_enbs; i++) {
//for (i = 0; i < nb_L1_inst; i++){
RC.flexran[i] = calloc(1, sizeof(flexran_agent_info_t)); RC.flexran[i] = calloc(1, sizeof(flexran_agent_info_t));
AssertFatal(RC.flexran[i], AssertFatal(RC.flexran[i],
"can't ALLOCATE %zu Bytes for flexran agent info (iteration %d/%d)\n", "can't ALLOCATE %zu Bytes for flexran agent info (iteration %d/%d)\n",
...@@ -2291,6 +2299,8 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { ...@@ -2291,6 +2299,8 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
if (ENBParamList.numelt > 0) { if (ENBParamList.numelt > 0) {
for (k = 0; k < ENBParamList.numelt; k++) { for (k = 0; k < ENBParamList.numelt; k++) {
if (k != i) continue;
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
// Calculate a default eNB ID // Calculate a default eNB ID
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define OPENAIRINTERFACE5G_LIMITS_H_ #define OPENAIRINTERFACE5G_LIMITS_H_
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR) #if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR)
# define NUMBER_OF_eNB_MAX 1 # define NUMBER_OF_eNB_MAX 2
# define NUMBER_OF_RU_MAX 2 # define NUMBER_OF_RU_MAX 2
# ifndef UE_EXPANSION # ifndef UE_EXPANSION
# define NUMBER_OF_UE_MAX 16 # define NUMBER_OF_UE_MAX 16
......
...@@ -1068,10 +1068,10 @@ int main( int argc, char **argv ) ...@@ -1068,10 +1068,10 @@ int main( int argc, char **argv )
#endif #endif
/* Start the agent. If it is turned off in the configuration, it won't start */ /* Start the agent. If it is turned off in the configuration, it won't start */
RCconfig_flexran(); /*RCconfig_flexran();
for (i = 0; i < RC.nb_L1_inst; i++) { for (i = 0; i < RC.nb_L1_inst; i++) {
flexran_agent_start(i); flexran_agent_start(i);
} }*/
// init UE_PF_PO and mutex lock // init UE_PF_PO and mutex lock
pthread_mutex_init(&ue_pf_po_mutex, NULL); pthread_mutex_init(&ue_pf_po_mutex, NULL);
......
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