Commit aa4d373c authored by winckel's avatar winckel

Updated some log messages format.

Added PHY_FIND_CELL_REQ sent to PHY when starting RRC.
Fixed an issue with ITTI tasks creation with RTAI builds.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4726 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b610aa4c
...@@ -208,7 +208,7 @@ static Enb_properties_t *enb_properties[] = ...@@ -208,7 +208,7 @@ static Enb_properties_t *enb_properties[] =
}; };
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
static void configure_rrc() static void configure_rrc(void)
{ {
uint32_t eNB_id_start = 0; uint32_t eNB_id_start = 0;
uint32_t eNB_id_end = 1; uint32_t eNB_id_end = 1;
......
...@@ -709,8 +709,6 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -709,8 +709,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
uint8_t MBMS_flag uint8_t MBMS_flag
#endif #endif
) { ) {
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part,*sib3_part; struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part,*sib3_part;
#ifdef Rel10 #ifdef Rel10
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib13_part; struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib13_part;
...@@ -723,23 +721,23 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -723,23 +721,23 @@ uint8_t do_SIB23(uint8_t Mod_id,
if (bcch_message) if (bcch_message)
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t)); memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
else { else {
LOG_E(RRC,"BCCH_MESSAGE is null, exiting\n"); LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id);
exit(-1); exit(-1);
} }
if (!sib2) { if (!sib2) {
LOG_E(RRC,"sib2 is null, exiting\n"); LOG_E(RRC,"[eNB %d] sib2 is null, exiting\n", Mod_id);
exit(-1); exit(-1);
} }
if (!sib3) { if (!sib3) {
LOG_E(RRC,"sib3 is null, exiting\n"); LOG_E(RRC,"[eNB %d] sib3 is null, exiting\n", Mod_id);
exit(-1); exit(-1);
} }
#ifdef Rel10 #ifdef Rel10
LOG_I(RRC,"Configuration SIB2/3, MBMS = %d\n",MBMS_flag); LOG_I(RRC,"[eNB %d] Configuration SIB2/3, MBMS = %d\n", Mod_id, MBMS_flag);
#else #else
LOG_I(RRC,"Configuration SIB2/3\n"); LOG_I(RRC,"[eNB %d] Configuration SIB2/3\n", Mod_id);
#endif #endif
sib2_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member)); sib2_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
sib3_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member)); sib3_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
......
...@@ -2431,7 +2431,7 @@ void *rrc_ue_task(void *args_p) { ...@@ -2431,7 +2431,7 @@ void *rrc_ue_task(void *args_p) {
/* MAC messages */ /* MAC messages */
case RRC_MAC_IN_SYNC_IND: case RRC_MAC_IN_SYNC_IND:
LOG_I(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name,
RRC_MAC_IN_SYNC_IND (msg_p).frame, RRC_MAC_IN_SYNC_IND (msg_p).enb_index); RRC_MAC_IN_SYNC_IND (msg_p).frame, RRC_MAC_IN_SYNC_IND (msg_p).enb_index);
UE_rrc_inst[Mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].N310_cnt = 0; UE_rrc_inst[Mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].N310_cnt = 0;
...@@ -2447,7 +2447,7 @@ void *rrc_ue_task(void *args_p) { ...@@ -2447,7 +2447,7 @@ void *rrc_ue_task(void *args_p) {
break; break;
case RRC_MAC_BCCH_DATA_IND: case RRC_MAC_BCCH_DATA_IND:
LOG_I(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frame %d, eNB %d\n", Mod_id, msg_name,
RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index); RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index);
decode_BCCH_DLSCH_Message (Mod_id, RRC_MAC_BCCH_DATA_IND (msg_p).frame, decode_BCCH_DLSCH_Message (Mod_id, RRC_MAC_BCCH_DATA_IND (msg_p).frame,
...@@ -2525,12 +2525,23 @@ void *rrc_ue_task(void *args_p) { ...@@ -2525,12 +2525,23 @@ void *rrc_ue_task(void *args_p) {
itti_send_msg_to_task(TASK_L2L1, NB_eNB_INST + Mod_id, message_p); itti_send_msg_to_task(TASK_L2L1, NB_eNB_INST + Mod_id, message_p);
UE_rrc_inst[Mod_id].RrcState = RRC_STATE_IDLE; UE_rrc_inst[Mod_id].RrcState = RRC_STATE_IDLE;
break; /* Fall through to next case */
} }
case RRC_STATE_IDLE: case RRC_STATE_IDLE:
{
/* Ask to layer 1 to find a cell matching the criterion */ /* Ask to layer 1 to find a cell matching the criterion */
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_CELL_REQ);
PHY_FIND_CELL_REQ (message_p).earfcn_start = 1;
PHY_FIND_CELL_REQ (message_p).earfcn_end = 1;
itti_send_msg_to_task(TASK_PHY_UE, NB_eNB_INST + Mod_id, message_p);
break; break;
}
case RRC_STATE_CONNECTED: case RRC_STATE_CONNECTED:
/* should not happen */ /* should not happen */
......
...@@ -186,7 +186,7 @@ static void init_SI (u8 Mod_id ...@@ -186,7 +186,7 @@ static void init_SI (u8 Mod_id
); );
else else
{ {
LOG_E (RRC, "[eNB] init_SI: FATAL, no memory for SIB1 allocated\n"); LOG_E (RRC, "[eNB %d] init_SI: FATAL, no memory for SIB1 allocated\n", Mod_id);
mac_xface->macphy_exit (""); mac_xface->macphy_exit ("");
} }
/* /*
...@@ -200,16 +200,12 @@ static void init_SI (u8 Mod_id ...@@ -200,16 +200,12 @@ static void init_SI (u8 Mod_id
eNB_rrc_inst[Mod_id].SIB23 = (u8 *) malloc16 (64); eNB_rrc_inst[Mod_id].SIB23 = (u8 *) malloc16 (64);
if (eNB_rrc_inst[Mod_id].SIB23) { if (eNB_rrc_inst[Mod_id].SIB23) {
eNB_rrc_inst[Mod_id].sizeof_SIB23 = do_SIB23 (Mod_id, eNB_rrc_inst[Mod_id].sizeof_SIB23 = do_SIB23 (Mod_id,
mac_xface-> mac_xface->
lte_frame_parms, lte_frame_parms,
eNB_rrc_inst[Mod_id]. eNB_rrc_inst[Mod_id].SIB23,
SIB23, &eNB_rrc_inst[Mod_id].systemInformation,
&eNB_rrc_inst[Mod_id]. &eNB_rrc_inst[Mod_id].sib2,
systemInformation,
&eNB_rrc_inst[Mod_id].
sib2,
&eNB_rrc_inst[Mod_id].sib3 &eNB_rrc_inst[Mod_id].sib3
#ifdef Rel10 #ifdef Rel10
, ,
...@@ -259,10 +255,8 @@ static void init_SI (u8 Mod_id ...@@ -259,10 +255,8 @@ static void init_SI (u8 Mod_id
eNB_rrc_inst[Mod_id].sib2->radioResourceConfigCommon. eNB_rrc_inst[Mod_id].sib2->radioResourceConfigCommon.
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift); pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
#ifdef Rel10 #ifdef Rel10
if (eNB_rrc_inst[Mod_id].MBMS_flag > 0) { if (eNB_rrc_inst[Mod_id].MBMS_flag > 0) {
for (i=0; for (i=0;
i< eNB_rrc_inst[Mod_id].sib2->mbsfn_SubframeConfigList->list.count; i< eNB_rrc_inst[Mod_id].sib2->mbsfn_SubframeConfigList->list.count;
i++){ i++){
...@@ -289,13 +283,11 @@ static void init_SI (u8 Mod_id ...@@ -289,13 +283,11 @@ static void init_SI (u8 Mod_id
eNB_rrc_inst[Mod_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9); eNB_rrc_inst[Mod_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
LOG_D (RRC, "[eNB %d] MCCH Offset: %d\n", Mod_id, LOG_D (RRC, "[eNB %d] MCCH Offset: %d\n", Mod_id,
eNB_rrc_inst[Mod_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9); eNB_rrc_inst[Mod_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
} }
} }
#endif #endif
LOG_D (RRC, LOG_D (RRC, "[MSC_MSG][FRAME unknown][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SIB1.tdd & SIB2 params) --->][MAC_UE][MOD %02d][]\n",
"[MSC_MSG][FRAME unknown][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SIB1.tdd & SIB2 params) --->][MAC_UE][MOD %02d][]\n",
Mod_id, Mod_id); Mod_id, Mod_id);
rrc_mac_config_req (Mod_id, 1, 0, 0, rrc_mac_config_req (Mod_id, 1, 0, 0,
...@@ -2421,6 +2413,8 @@ char openair_rrc_lite_eNB_init (u8 Mod_id) ...@@ -2421,6 +2413,8 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
LOG_D (RRC, "[MSC_NEW][FRAME 00000][RRC_eNB][MOD %02d][]\n", Mod_id); LOG_D (RRC, "[MSC_NEW][FRAME 00000][RRC_eNB][MOD %02d][]\n", Mod_id);
LOG_D (RRC, "[MSC_NEW][FRAME 00000][IP][MOD %02d][]\n", Mod_id); LOG_D (RRC, "[MSC_NEW][FRAME 00000][IP][MOD %02d][]\n", Mod_id);
DevAssert(eNB_rrc_inst != NULL);
for (j = 0; j < NUMBER_OF_UE_MAX; j++) for (j = 0; j < NUMBER_OF_UE_MAX; j++)
eNB_rrc_inst[Mod_id].Info.UE[j].Status = RRC_IDLE; //CH_READY; eNB_rrc_inst[Mod_id].Info.UE[j].Status = RRC_IDLE; //CH_READY;
...@@ -2460,15 +2454,14 @@ char openair_rrc_lite_eNB_init (u8 Mod_id) ...@@ -2460,15 +2454,14 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
/// System Information INIT /// System Information INIT
LOG_I (RRC, "Checking release \n"); LOG_I (RRC, "[eNB %d] Checking release \n", Mod_id);
#ifdef Rel10 #ifdef Rel10
// Thishas to come from some top-level configuration // This has to come from some top-level configuration
printf ("Rel10 RRC detected, MBMS flag %d\n", LOG_I (RRC, "[eNB %d] Rel10 RRC detected, MBMS flag %d\n", Mod_id, eNB_rrc_inst[Mod_id].MBMS_flag);
eNB_rrc_inst[Mod_id].MBMS_flag);
#else #else
printf ("Rel8 RRC\n"); LOG_I (RRC, "[eNB %d] Rel8 RRC\n", Mod_id);
#endif #endif
#ifdef CBA #ifdef CBA
for (j = 0; j < NUM_MAX_CBA_GROUP; j++) for (j = 0; j < NUM_MAX_CBA_GROUP; j++)
...@@ -2477,8 +2470,7 @@ char openair_rrc_lite_eNB_init (u8 Mod_id) ...@@ -2477,8 +2470,7 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
if (eNB_rrc_inst[Mod_id].num_active_cba_groups > NUM_MAX_CBA_GROUP) if (eNB_rrc_inst[Mod_id].num_active_cba_groups > NUM_MAX_CBA_GROUP)
eNB_rrc_inst[Mod_id].num_active_cba_groups = NUM_MAX_CBA_GROUP; eNB_rrc_inst[Mod_id].num_active_cba_groups = NUM_MAX_CBA_GROUP;
LOG_D (RRC, LOG_D (RRC, "[eNB %d] Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
"[eNB %d] Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
Mod_id, eNB_rrc_inst[Mod_id].cba_rnti[0], Mod_id, eNB_rrc_inst[Mod_id].cba_rnti[0],
eNB_rrc_inst[Mod_id].cba_rnti[1], eNB_rrc_inst[Mod_id].cba_rnti[2], eNB_rrc_inst[Mod_id].cba_rnti[1], eNB_rrc_inst[Mod_id].cba_rnti[2],
eNB_rrc_inst[Mod_id].cba_rnti[3], eNB_rrc_inst[Mod_id].cba_rnti[3],
......
...@@ -755,12 +755,6 @@ int main(int argc, char **argv) ...@@ -755,12 +755,6 @@ int main(int argc, char **argv)
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info,
messages_definition_xml, itti_dump_file); messages_definition_xml, itti_dump_file);
if (create_tasks(1, 0)) {
exit(EXIT_FAILURE); // need a softer mode
}
printf("After create tasks\n");
#endif #endif
#ifdef NAS_NETLINK #ifdef NAS_NETLINK
...@@ -948,6 +942,12 @@ int main(int argc, char **argv) ...@@ -948,6 +942,12 @@ int main(int argc, char **argv)
mac_xface->macphy_exit = &exit_fun; mac_xface->macphy_exit = &exit_fun;
#if defined(ENABLE_ITTI)
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
exit(-1); // need a softer mode
}
printf("ITTI tasks created\n");
#endif
number_of_cards = openair0_num_detected_cards; number_of_cards = openair0_num_detected_cards;
if (p_exmimo_id->board_exmimoversion==1) { //ExpressMIMO1 if (p_exmimo_id->board_exmimoversion==1) { //ExpressMIMO1
...@@ -1088,6 +1088,7 @@ int main(int argc, char **argv) ...@@ -1088,6 +1088,7 @@ int main(int argc, char **argv)
// rt_sleep_ns(FRAME_PERIOD); // rt_sleep_ns(FRAME_PERIOD);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
printf("Entering ITTI signals handler\n");
itti_wait_tasks_end(); itti_wait_tasks_end();
#else #else
rt_sem_wait(mutex); rt_sem_wait(mutex);
......
...@@ -1248,10 +1248,6 @@ int main(int argc, char **argv) { ...@@ -1248,10 +1248,6 @@ int main(int argc, char **argv) {
} }
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, itti_dump_file); itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, itti_dump_file);
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
exit(-1); // need a softer mode
}
#endif #endif
#ifdef NAS_NETLINK #ifdef NAS_NETLINK
...@@ -1486,8 +1482,6 @@ int main(int argc, char **argv) { ...@@ -1486,8 +1482,6 @@ int main(int argc, char **argv) {
// frame_parms->rfmode[i] = rf_mode_max[i]; // frame_parms->rfmode[i] = rf_mode_max[i];
rf_mode[i] = (rf_mode[i] & (~LNAGAINMASK)) | LNAMax; rf_mode[i] = (rf_mode[i] & (~LNAGAINMASK)) | LNAMax;
} }
} }
// Initialize card // Initialize card
...@@ -1603,7 +1597,14 @@ int main(int argc, char **argv) { ...@@ -1603,7 +1597,14 @@ int main(int argc, char **argv) {
mac_xface->macphy_exit = &exit_fun; mac_xface->macphy_exit = &exit_fun;
#ifdef OPENAIR2 #if defined(ENABLE_ITTI)
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
exit(-1); // need a softer mode
}
printf("ITTI tasks created\n");
#endif
#ifdef OPENAIR2
//if (otg_enabled) { //if (otg_enabled) {
init_all_otg(0); init_all_otg(0);
g_otg->seed = 0; g_otg->seed = 0;
...@@ -1853,6 +1854,7 @@ int main(int argc, char **argv) { ...@@ -1853,6 +1854,7 @@ int main(int argc, char **argv) {
//getchar(); //getchar();
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
printf("Entering ITTI signals handler\n");
itti_wait_tasks_end(); itti_wait_tasks_end();
#else #else
while (oai_exit==0) while (oai_exit==0)
......
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