Commit a315f995 authored by Anta Huang's avatar Anta Huang

eNB ho stats

parent e38d2c4a
...@@ -439,6 +439,10 @@ typedef struct eNB_RRC_INST_s { ...@@ -439,6 +439,10 @@ typedef struct eNB_RRC_INST_s {
/// localization list for aggregated measurements from PHY /// localization list for aggregated measurements from PHY
struct list loc_list; struct list loc_list;
#endif #endif
// X2 HO stats and measurements
uint32_t rrc_enb_x2_ms; // from idle to connected
struct list rrc_enb_x2_list;
} eNB_RRC_INST; } eNB_RRC_INST;
#define MAX_UE_CAPABILITY_SIZE 255 #define MAX_UE_CAPABILITY_SIZE 255
...@@ -531,12 +535,10 @@ typedef struct UE_RRC_INST_s { ...@@ -531,12 +535,10 @@ typedef struct UE_RRC_INST_s {
e_SecurityAlgorithmConfig__cipheringAlgorithm ciphering_algorithm; e_SecurityAlgorithmConfig__cipheringAlgorithm ciphering_algorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm; e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
// X2 HO stats and measurments // X2 HO stats and measurements
uint8_t rrc_ue_do_meas; // flag to start the meas only once uint8_t rrc_ue_do_meas; // flag to start the meas only once
time_stats_t rrc_ue_x2_src_enb; // form connected to idle : include x2 delay
uint32_t rrc_ue_x2_src_enb_ms; // form connected to idle : include x2 delay uint32_t rrc_ue_x2_src_enb_ms; // form connected to idle : include x2 delay
struct list rrc_ue_x2_src_enb_list; struct list rrc_ue_x2_src_enb_list;
time_stats_t rrc_ue_x2_target_enb; // from idle to connected
uint32_t rrc_ue_x2_target_enb_ms; // from idle to connected uint32_t rrc_ue_x2_target_enb_ms; // from idle to connected
struct list rrc_ue_x2_target_enb_list; struct list rrc_ue_x2_target_enb_list;
} UE_RRC_INST; } UE_RRC_INST;
......
...@@ -1968,10 +1968,13 @@ rrc_ue_decode_dcch( ...@@ -1968,10 +1968,13 @@ rrc_ue_decode_dcch(
if (target_eNB_index != 0xFF) { if (target_eNB_index != 0xFF) {
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas=0; UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas=0;
// Stop to measure (delay to the UE-->source)
//stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb); //stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
//double t_x2_src_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb.p_time/get_cpu_freq_GHz()/1000.0; //double t_x2_src_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb.p_time/get_cpu_freq_GHz()/1000.0;
double t_x2_src_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms; double t_x2_src_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms;
push_front(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_list, t_x2_src_enb); push_front(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_list, t_x2_src_enb);
// Start to measure (delay to the UE-->target)
//start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb); //start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe ; UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe ;
init_meas_timers(ctxt_pP); // Initialize handover measurement timers init_meas_timers(ctxt_pP); // Initialize handover measurement timers
...@@ -3696,8 +3699,9 @@ void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, con ...@@ -3696,8 +3699,9 @@ void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, con
if (UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas == 0 ){ if (UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas == 0 ){
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas = 1; UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas = 1;
// Start to measure (delay to the UE-->source)
//start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb); //start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe ; UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe;
} }
rrc_ue_generate_MeasurementReport( rrc_ue_generate_MeasurementReport(
ctxt_pP, ctxt_pP,
......
...@@ -82,9 +82,7 @@ openair_rrc_on( ...@@ -82,9 +82,7 @@ openair_rrc_on(
} else { } else {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
reset_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
reset_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
for (i = 0; i < NB_eNB_INST; i++) { for (i = 0; i < NB_eNB_INST; i++) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" Activating CCCH (eNB %d)\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" Activating CCCH (eNB %d)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), i); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), i);
...@@ -361,33 +359,74 @@ rrc_top_cleanup( ...@@ -361,33 +359,74 @@ rrc_top_cleanup(
free (eNB_rrc_inst); free (eNB_rrc_inst);
} }
uint8_t module_id=0; uint8_t module_id=0;
uint8_t i=0;
LOG_I(RRC,"[SRC]median;q1;q3;min;max;\n"); double x2_src_avg;
double x2_src_median=0.0;
double x2_src_q1=0.0;
double x2_src_q3=0.0;
double x2_src_min=0.0;
double x2_src_max=0.0;
double x2_target_avg;
double x2_target_median=0.0;
double x2_target_q1=0.0;
double x2_target_q3=0.0;
double x2_target_min=0.0;
double x2_target_max=0.0;
LOG_I(RRC,"[SRC]median;q1;q3;min;max;avg;\n");
for (module_id = 0; module_id < NB_UE_INST; module_id++) { for (module_id = 0; module_id < NB_UE_INST; module_id++) {
x2_src_avg=0.0;
double x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size]; double x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size];
totable(x2_src_table, &UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list); totable(x2_src_table, &UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list);
qsort (x2_src_table, UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size, sizeof(double), &compare); qsort (x2_src_table, UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size, sizeof(double), &compare);
// create stats // create stats
double x2_src_median = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/2]; x2_src_median = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/2];
double x2_src_q1 = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/4]; // Q1 x2_src_q1 = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/4]; // Q1
double x2_src_q3 = x2_src_table[3*UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/4]; // Q3 x2_src_q3 = x2_src_table[3*UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/4]; // Q3
double x2_src_min = x2_src_table[0]; // Q3 x2_src_min = x2_src_table[0]; // Q3
double x2_src_max = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size-1]; // Q3 x2_src_max = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size-1]; // Q3
LOG_I(RRC,"%lf;%lf;%lf;%d;%d;\n",x2_src_median,x2_src_q1,x2_src_q3,x2_src_min,x2_src_max); for (i=0;i<UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size;i++){
x2_src_avg+=x2_src_table[i];
}
x2_src_avg/=UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size;
LOG_I(RRC,"[SRC]%lf;%lf;%lf;%lf;%lf;%lf\n",x2_src_median,x2_src_q1,x2_src_q3,x2_src_min,x2_src_max,x2_src_avg);
} }
LOG_I(RRC,"[DST]median;q1;q3;min;max;\n"); LOG_I(RRC,"[DST]median;q1;q3;min;max;\n");
for (module_id = 0; module_id < NB_UE_INST; module_id++) { for (module_id = 0; module_id < NB_UE_INST; module_id++) {
x2_target_avg=0.0;
double x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size]; double x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size];
totable(x2_target_table, &UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list); totable(x2_target_table, &UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list);
qsort (x2_target_table, UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size, sizeof(double), &compare); qsort (x2_target_table, UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size, sizeof(double), &compare);
// create stats // create stats
double x2_target_median = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/2]; x2_target_median = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/2];
double x2_target_q1 = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/4]; // Q1 x2_target_q1 = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/4]; // Q1
double x2_target_q3 = x2_target_table[3*UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/4]; // Q3 x2_target_q3 = x2_target_table[3*UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/4]; // Q3
double x2_target_min = x2_target_table[0]; // MIN x2_target_min = x2_target_table[0]; // MIN
double x2_target_max = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size-1]; // mAX x2_target_max = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size-1]; // mAX
LOG_I(RRC,"%lf;%lf;%lf;%d;%d;\n",x2_target_median,x2_target_q1,x2_target_q3,x2_target_min, x2_target_max);
for (i=0;i<UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size;i++){
x2_target_avg+=x2_target_table[i];
}
x2_target_avg/=UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size;
LOG_I(RRC,"[DST]%lf;%lf;%lf;%lf;%lf;%lf\n",x2_target_median,x2_target_q1,x2_target_q3,x2_target_min,x2_target_max,x2_target_avg);
}
LOG_I(RRC,"[X2]median;q1;q3;min;max;\n");
for (module_id = 0; module_id < NB_eNB_INST; module_id++) {
double x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size];
totable(x2_table, &eNB_rrc_inst[module_id].rrc_enb_x2_list);
qsort (x2_table, eNB_rrc_inst[module_id].rrc_enb_x2_list.size, sizeof(double), &compare);
// create stats
double x2_median = x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size/2];
double x2_q1 = x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size/4]; // Q1
double x2_q3 = x2_table[3*eNB_rrc_inst[module_id].rrc_enb_x2_list.size/4]; // Q3
double x2_min = x2_table[0]; // MIN
double x2_max = x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size-1]; // mAX
LOG_I(RRC,"[X2]%lf;%lf;%lf;%d;%d;\n",x2_median,x2_q1,x2_q3,x2_min,x2_max);
} }
} }
......
...@@ -1485,7 +1485,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration( ...@@ -1485,7 +1485,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
} }
else{ else{
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger =
TimeToTrigger_ms40; TimeToTrigger_ms80;
//LOG_D(RRC,"Time to trigger for eNB %d is set to %d\n",ctxt_pP->module_id,TimeToTrigger_ms40); //LOG_D(RRC,"Time to trigger for eNB %d is set to %d\n",ctxt_pP->module_id,TimeToTrigger_ms40);
} }
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A3); ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A3);
...@@ -2140,6 +2140,9 @@ check_handovers( ...@@ -2140,6 +2140,9 @@ check_handovers(
X2AP_HANDOVER_RESP(msg).target_mod_id = 1 - ctxt_pP->module_id; X2AP_HANDOVER_RESP(msg).target_mod_id = 1 - ctxt_pP->module_id;
X2AP_HANDOVER_RESP(msg).source_x2id = ue_context_p->ue_context.handover_info->source_x2id; X2AP_HANDOVER_RESP(msg).source_x2id = ue_context_p->ue_context.handover_info->source_x2id;
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg); itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
// Stop to measure (x2 delay)
double t_x2_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - eNB_rrc_inst[ue_context_p->ue_context.handover_info->modid_s].rrc_enb_x2_ms;
push_front(&eNB_rrc_inst[ctxt_pP->module_id].rrc_enb_x2_list, t_x2_enb);
} }
...@@ -2925,7 +2928,7 @@ rv[1] = (global_rnti>>8) & 255; ...@@ -2925,7 +2928,7 @@ rv[1] = (global_rnti>>8) & 255;
} }
else{ else{
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger =
TimeToTrigger_ms40; TimeToTrigger_ms80;
//LOG_D(RRC,"Time to trigger for eNB %d is set to %d\n",ctxt_pP->module_id,TimeToTrigger_ms40); //LOG_D(RRC,"Time to trigger for eNB %d is set to %d\n",ctxt_pP->module_id,TimeToTrigger_ms40);
} }
...@@ -4248,6 +4251,8 @@ rrc_eNB_decode_dcch( ...@@ -4248,6 +4251,8 @@ rrc_eNB_decode_dcch(
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
DCCH, DCCH,
sdu_sizeP); sdu_sizeP);
// Start to measure (x2 delay)
eNB_rrc_inst[ctxt_pP->module_id].rrc_enb_x2_ms = ctxt_pP->frame*10+ctxt_pP->subframe;
rrc_eNB_process_MeasurementReport( rrc_eNB_process_MeasurementReport(
ctxt_pP, ctxt_pP,
ue_context_p, ue_context_p,
...@@ -4294,6 +4299,7 @@ rrc_eNB_decode_dcch( ...@@ -4294,6 +4299,7 @@ rrc_eNB_decode_dcch(
rrcConnectionReconfigurationComplete_r8); rrcConnectionReconfigurationComplete_r8);
if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION){ if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION){
// Stop to measure (delay to the UE-->target)
//stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb); //stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
//double t_x2_target_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb.p_time/get_cpu_freq_GHz()/1000.0; //double t_x2_target_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb.p_time/get_cpu_freq_GHz()/1000.0;
double t_x2_target_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms; double t_x2_target_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms;
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
</APPLICATION_CONFIG> </APPLICATION_CONFIG>
<EMULATION_CONFIG> <EMULATION_CONFIG>
<EMULATION_TIME_ms>6000</EMULATION_TIME_ms> <EMULATION_TIME_ms>11000</EMULATION_TIME_ms>
<CURVE>disable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes <CURVE>disable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes
are ploted in real time (UL and DL) of WOD and throughput measurement for each packet --> are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
......
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