PDCP throughput statistics in log
This commit is contained in:
@@ -533,7 +533,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
|
|||||||
|
|
||||||
dlsch0->harq_mask |= (1 << rel8->harq_process);
|
dlsch0->harq_mask |= (1 << rel8->harq_process);
|
||||||
|
|
||||||
if (rel8->rnti != SI_RNTI) LOG_I(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding,
|
if (rel8->rnti != SI_RNTI) LOG_D(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding,
|
||||||
rel8->redundancy_version_1,rel8->rnti,rel8->harq_process);
|
rel8->redundancy_version_1,rel8->rnti,rel8->harq_process);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1122,7 +1122,7 @@ void dump_ulsch_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) {
|
|||||||
char output[16384];
|
char output[16384];
|
||||||
int stroff=0;
|
int stroff=0;
|
||||||
for (int i=0;i<NUMBER_OF_ULSCH_MAX;i++)
|
for (int i=0;i<NUMBER_OF_ULSCH_MAX;i++)
|
||||||
if (eNB->ulsch_stats[i].rnti>0) {
|
if (eNB->ulsch_stats[i].rnti>0 && eNB->ulsch_stats[i].round_trials[0]>100) {
|
||||||
for (int aa=0;aa<eNB->frame_parms.nb_antennas_rx;aa++)
|
for (int aa=0;aa<eNB->frame_parms.nb_antennas_rx;aa++)
|
||||||
stroff+=sprintf(output+stroff,"ULSCH RNTI %x: ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n",
|
stroff+=sprintf(output+stroff,"ULSCH RNTI %x: ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n",
|
||||||
eNB->ulsch_stats[i].rnti, aa,eNB->ulsch_stats[i].ulsch_power[aa],aa,eNB->ulsch_stats[i].ulsch_noise_power[aa]);
|
eNB->ulsch_stats[i].rnti, aa,eNB->ulsch_stats[i].ulsch_power[aa],aa,eNB->ulsch_stats[i].ulsch_noise_power[aa]);
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ void prach_procedures(PHY_VARS_eNB *eNB,
|
|||||||
} else {
|
} else {
|
||||||
if ((eNB->prach_energy_counter == 100) &&
|
if ((eNB->prach_energy_counter == 100) &&
|
||||||
(max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
|
(max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
|
||||||
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
|
LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
|
||||||
eNB->Mod_id,
|
eNB->Mod_id,
|
||||||
eNB->CC_id,
|
eNB->CC_id,
|
||||||
frame,
|
frame,
|
||||||
|
|||||||
@@ -1295,7 +1295,7 @@ initiate_ra_proc(module_id_t module_idP,
|
|||||||
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_I(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d, timing offset %d\n",
|
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d, timing offset %d\n",
|
||||||
module_idP, CC_id, frameP, subframeP, preamble_index, timing_offset);
|
module_idP, CC_id, frameP, subframeP, preamble_index, timing_offset);
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
|
|||||||
@@ -651,7 +651,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
eNB_UE_stats->rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
eNB_UE_stats->rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||||
eNB_UE_stats->harq_pid = harq_pid;
|
eNB_UE_stats->harq_pid = harq_pid;
|
||||||
eNB_UE_stats->harq_round = round_DL;
|
eNB_UE_stats->harq_round = round_DL;
|
||||||
|
eNB_UE_stats->dlsch_rounds[round_DL&7]++;
|
||||||
if (eNB_UE_stats->rrc_status < RRC_RECONFIGURED) {
|
if (eNB_UE_stats->rrc_status < RRC_RECONFIGURED) {
|
||||||
ue_sched_ctrl->uplane_inactivity_timer = 0;
|
ue_sched_ctrl->uplane_inactivity_timer = 0;
|
||||||
}
|
}
|
||||||
@@ -792,7 +792,6 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
// No TX request for retransmission (check if null request for FAPI)
|
// No TX request for retransmission (check if null request for FAPI)
|
||||||
}
|
}
|
||||||
|
|
||||||
//eNB_UE_stats->dlsch_trials[round]++;
|
|
||||||
eNB_UE_stats->num_retransmission += 1;
|
eNB_UE_stats->num_retransmission += 1;
|
||||||
eNB_UE_stats->rbs_used_retx = nb_rb;
|
eNB_UE_stats->rbs_used_retx = nb_rb;
|
||||||
eNB_UE_stats->total_rbs_used_retx += nb_rb;
|
eNB_UE_stats->total_rbs_used_retx += nb_rb;
|
||||||
@@ -1064,10 +1063,10 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
ue_template->pucch_tpc_tx_frame = frameP;
|
ue_template->pucch_tpc_tx_frame = frameP;
|
||||||
ue_template->pucch_tpc_tx_subframe = subframeP;
|
ue_template->pucch_tpc_tx_subframe = subframeP;
|
||||||
|
|
||||||
if (snr > target_snr + 4) {
|
if (snr > target_snr + PUCCH_PCHYST) {
|
||||||
tpc = 0; //-1
|
tpc = 0; //-1
|
||||||
ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--;
|
ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--;
|
||||||
} else if (snr < target_snr - 4) {
|
} else if (snr < target_snr - PUCCH_PCHYST) {
|
||||||
tpc = 2; //+1
|
tpc = 2; //+1
|
||||||
ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--;
|
ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--;
|
||||||
} else {
|
} else {
|
||||||
@@ -1701,9 +1700,9 @@ schedule_ue_spec_br(module_id_t module_idP,
|
|||||||
UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP;
|
UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP;
|
||||||
UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP;
|
UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP;
|
||||||
|
|
||||||
if (snr > target_snr + 4) {
|
if (snr > target_snr + PUCCH_PCHYST) {
|
||||||
tpc = 0; //-1
|
tpc = 0; //-1
|
||||||
} else if (snr < target_snr - 4) {
|
} else if (snr < target_snr - PUCCH_PCHYST) {
|
||||||
tpc = 2; //+1
|
tpc = 2; //+1
|
||||||
} else {
|
} else {
|
||||||
tpc = 1; //0
|
tpc = 1; //0
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
AssertFatal(mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx > 1,
|
AssertFatal(mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx > 1,
|
||||||
"maxHARQ %d should be greater than 1\n",
|
"maxHARQ %d should be greater than 1\n",
|
||||||
(int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx);
|
(int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx);
|
||||||
LOG_I(MAC, "[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu (%s) round %d from PHY (rnti %x, RA_id %d) ul_cqi %d, timing advance %d\n",
|
LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu (%s) round %d from PHY (rnti %x, RA_id %d) ul_cqi %d, timing advance %d\n",
|
||||||
enb_mod_idP,
|
enb_mod_idP,
|
||||||
harq_pid,
|
harq_pid,
|
||||||
CC_idP,
|
CC_idP,
|
||||||
@@ -1430,10 +1430,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
UE_template_ptr->pusch_tpc_tx_frame = frameP;
|
UE_template_ptr->pusch_tpc_tx_frame = frameP;
|
||||||
UE_template_ptr->pusch_tpc_tx_subframe = subframeP;
|
UE_template_ptr->pusch_tpc_tx_subframe = subframeP;
|
||||||
|
|
||||||
if (snr > target_snr + 4) {
|
if (snr > target_snr + PUSCH_PCHYST) {
|
||||||
tpc = 0; // -1
|
tpc = 0; // -1
|
||||||
UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]--;
|
UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]--;
|
||||||
} else if (snr < target_snr - 4) {
|
} else if (snr < target_snr - PUSCH_PCHYST) {
|
||||||
tpc = 2; // +1
|
tpc = 2; // +1
|
||||||
UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]++;
|
UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]++;
|
||||||
}
|
}
|
||||||
@@ -1501,6 +1501,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
const uint8_t ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator
|
const uint8_t ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator
|
||||||
const uint8_t mcs = UE_template_ptr->pre_assigned_mcs_ul;
|
const uint8_t mcs = UE_template_ptr->pre_assigned_mcs_ul;
|
||||||
UE_template_ptr->oldNDI_UL[harq_pid] = ndi;
|
UE_template_ptr->oldNDI_UL[harq_pid] = ndi;
|
||||||
|
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0]++;
|
||||||
UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
||||||
UE_info->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
UE_info->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
||||||
UE_template_ptr->mcs_UL[harq_pid] = mcs;
|
UE_template_ptr->mcs_UL[harq_pid] = mcs;
|
||||||
@@ -1522,8 +1523,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
|
|
||||||
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
|
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
|
||||||
|
|
||||||
while (rb_table[rb_table_index] > 45 && rb_table_index > 0)
|
|
||||||
rb_table_index--;
|
|
||||||
|
|
||||||
UE_template_ptr->TBS_UL[harq_pid] = get_TBS_UL(mcs, rb_table[rb_table_index]);
|
UE_template_ptr->TBS_UL[harq_pid] = get_TBS_UL(mcs, rb_table[rb_table_index]);
|
||||||
UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += rb_table[rb_table_index];
|
UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += rb_table[rb_table_index];
|
||||||
|
|||||||
@@ -94,7 +94,12 @@ pthread_t pdcp_stats_thread_desc;
|
|||||||
void *pdcp_stats_thread(void *param) {
|
void *pdcp_stats_thread(void *param) {
|
||||||
|
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
|
int old_byte_cnt[MAX_MOBILES_PER_ENB][NB_RB_MAX],old_byte_cnt_rx[MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||||
|
for (int i=0;i<MAX_MOBILES_PER_ENB;i++)
|
||||||
|
for (int j=0;j<NB_RB_MAX;j++) {
|
||||||
|
old_byte_cnt[i][j]=0;
|
||||||
|
old_byte_cnt_rx[i][j]=0;
|
||||||
|
}
|
||||||
while (!oai_exit) {
|
while (!oai_exit) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
||||||
@@ -103,33 +108,18 @@ void *pdcp_stats_thread(void *param) {
|
|||||||
int drb_id=3;
|
int drb_id=3;
|
||||||
for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
|
for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
|
||||||
if (pdcp_enb[0].rnti[UE_id]>0) {
|
if (pdcp_enb[0].rnti[UE_id]>0) {
|
||||||
fprintf(fd,"UE CRNTI %x: tx_window %dms, tx_bytes %d, tx_bytes_w %d, tx_bytes_tmp_w %d\n",
|
fprintf(fd,"PDCP: CRNTI %x, DRB %d: tx_bytes %d, DL Throughput %e\n",
|
||||||
pdcp_enb[0].rnti[UE_id],
|
pdcp_enb[0].rnti[UE_id],drb_id,
|
||||||
Pdcp_stats_tx_window_ms[0][UE_id],
|
|
||||||
Pdcp_stats_tx_bytes[0][UE_id][drb_id],
|
Pdcp_stats_tx_bytes[0][UE_id][drb_id],
|
||||||
Pdcp_stats_tx_bytes_w[0][UE_id][drb_id],
|
(double)((Pdcp_stats_tx_bytes[0][UE_id][drb_id]-old_byte_cnt[UE_id][drb_id])<<3));
|
||||||
Pdcp_stats_tx_bytes_tmp_w[0][UE_id][drb_id]);
|
fprintf(fd," rx_bytes %d, UL Throughput %e\n",
|
||||||
fprintf(fd," tx %d, tx_w %d, tx_tmp_w %d, tx_sn %d, tx throughput %d\n",
|
Pdcp_stats_rx_bytes[0][UE_id][drb_id],
|
||||||
Pdcp_stats_tx[0][UE_id][drb_id],
|
(double)((Pdcp_stats_rx_bytes[0][UE_id][drb_id]-old_byte_cnt_rx[UE_id][drb_id])<<3));
|
||||||
Pdcp_stats_tx_w[0][UE_id][drb_id],
|
}
|
||||||
Pdcp_stats_tx_tmp_w[0][UE_id][drb_id],
|
}
|
||||||
Pdcp_stats_tx_sn[0][UE_id][drb_id],
|
fclose(fd);
|
||||||
Pdcp_stats_tx_throughput_w[0][UE_id][drb_id]);
|
|
||||||
fprintf(fd," rx_window %dms, rx_bytes %d, rx_bytes_w %d, rx_bytes_tmp_w %d\n",
|
|
||||||
Pdcp_stats_rx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB],
|
|
||||||
Pdcp_stats_rx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX],
|
|
||||||
Pdcp_stats_rx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX],
|
|
||||||
Pdcp_stats_rx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
|
||||||
fprintf(fd," rx %d, rx_w %d, rx_tmp_w %d, rx_sn %d, rx goodput %d\n",
|
|
||||||
Pdcp_stats_rx[0][UE_id][drb_id],
|
|
||||||
Pdcp_stats_rx_w[0][UE_id][drb_id],
|
|
||||||
Pdcp_stats_rx_tmp_w[0][UE_id][drb_id],
|
|
||||||
Pdcp_stats_rx_sn[0][UE_id][drb_id],
|
|
||||||
Pdcp_stats_rx_goodput_w[0][UE_id][drb_id]);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t get_pdcp_optmask(void) {
|
uint64_t get_pdcp_optmask(void) {
|
||||||
@@ -512,7 +502,7 @@ boolean_t pdcp_data_req(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//LOG_I(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, rb_idP+rb_offset, current_sn);
|
LOG_D(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, (int)(rb_idP+rb_offset), current_sn);
|
||||||
Pdcp_stats_tx[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
|
Pdcp_stats_tx[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
|
||||||
Pdcp_stats_tx_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
|
Pdcp_stats_tx_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
|
||||||
Pdcp_stats_tx_bytes[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=sdu_buffer_sizeP;
|
Pdcp_stats_tx_bytes[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=sdu_buffer_sizeP;
|
||||||
@@ -2342,6 +2332,8 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
|
|||||||
LOG_E(PDCP, "ENB pdcp will not use tun interface\n");
|
LOG_E(PDCP, "ENB pdcp will not use tun interface\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pthread_create(&pdcp_stats_thread_desc,NULL,pdcp_stats_thread,NULL);
|
||||||
|
|
||||||
return pdcp_params.optmask ;
|
return pdcp_params.optmask ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user