Commit 08c66e0c authored by Florian Kaltenberger's avatar Florian Kaltenberger

fixed bug in OTG

added stats for PDSCH for MAC-PHY interface, removed some duplicate stats


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4113 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 907aac18
...@@ -1305,7 +1305,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1305,7 +1305,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS = 0; phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS = 0;
phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_last = 0; phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_last = 0;
phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits = 0; phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC = 0;
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate = 0; phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate = 0;
phy_vars_eNB->physicalConfigDedicated[UE_id] = NULL; phy_vars_eNB->physicalConfigDedicated[UE_id] = NULL;
......
...@@ -571,14 +571,15 @@ typedef struct { ...@@ -571,14 +571,15 @@ typedef struct {
uint8_t dlsch_mcs1; uint8_t dlsch_mcs1;
/// Target mcs2 after rate-adaptation (used by MAC layer scheduler) /// Target mcs2 after rate-adaptation (used by MAC layer scheduler)
uint8_t dlsch_mcs2; uint8_t dlsch_mcs2;
// SRS_param_t SRS_parameters; /// Total bits received from MAC on PDSCH
int total_TBS_MAC;
/// Total bits acknowledged on PDSCH
int total_TBS; int total_TBS;
// /// Total bits acknowledged on PDSCH (last interval)
int total_TBS_last; int total_TBS_last;
// /// Bitrate on the PDSCH
unsigned int dlsch_bitrate; unsigned int dlsch_bitrate;
// // unsigned int total_transmitted_bits;
unsigned int total_transmitted_bits;
} LTE_eNB_UE_stats; } LTE_eNB_UE_stats;
typedef struct { typedef struct {
......
...@@ -290,23 +290,22 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -290,23 +290,22 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
#ifdef OPENAIR2 #ifdef OPENAIR2
if (phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->rnti>0) { if (phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->rnti>0) {
phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate; phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate;
phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_transmitted_bits; phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits;
phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput; //phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput;
if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH) if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH)
success = success + ((phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]) - (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[3])); success = success + ((phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]) - (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[3]));
} }
#else #else
phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate; phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate;
phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_transmitted_bits; phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits;
phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput; //phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput;
success = success + ((phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]) - (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[3])); success = success + ((phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]) - (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[3]));
#endif #endif
} }
len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH Bitrate for the System %dkbps\n",(phy_vars_eNB->total_dlsch_bitrate/1000)); len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH bits successfully transmitted %d kbits in %d frame(s)\n",(phy_vars_eNB->total_transmitted_bits/1000),phy_vars_eNB->frame+1);
len += sprintf(&buffer[len],"[eNB PROC] Total Bits successfully transitted %dKbits in %dframe(s)\n",(phy_vars_eNB->total_transmitted_bits/1000),phy_vars_eNB->frame+1); len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH average system throughput %d kbps\n",(phy_vars_eNB->total_dlsch_bitrate/1000));
len += sprintf(&buffer[len],"[eNB PROC] Average System Throughput %dKbps\n",(phy_vars_eNB->total_system_throughput)/((phy_vars_eNB->frame+1)*10)); len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH successful transmissions %d in %d frame(s)\n",success,phy_vars_eNB->frame+1);
len += sprintf(&buffer[len],"[eNB PROC] Total Successful DLSCH Transmissions %d in %dframe(s)\n",success,phy_vars_eNB->frame+1);
//len += sprintf(&buffer[len],"[eNB PROC] FULL MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->FULL_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions); //len += sprintf(&buffer[len],"[eNB PROC] FULL MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->FULL_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions); //len += sprintf(&buffer[len],"[eNB PROC] MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] SU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_SUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions); //len += sprintf(&buffer[len],"[eNB PROC] SU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_SUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
...@@ -438,10 +437,9 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -438,10 +437,9 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[3], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[3],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]); phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits)/1000); len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits from MAC: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC)/1000);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH Bitrate %dkbps\n",(phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate/1000)); len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits ack'ed: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS)/1000);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH Average User Throughput %dKbps\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits)/((phy_vars_eNB->frame+1)*10)); len += sprintf(&buffer[len],"[eNB PROC] DLSCH Average throughput (10 frames): %dkbps\n",(phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate/1000));
len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",phy_vars_eNB->transmission_mode[UE_id]); len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",phy_vars_eNB->transmission_mode[UE_id]);
if(phy_vars_eNB->transmission_mode[UE_id] == 5){ if(phy_vars_eNB->transmission_mode[UE_id] == 5){
......
...@@ -1768,6 +1768,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1768,6 +1768,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
phy_vars_eNB->frame, phy_vars_eNB->frame,
phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->rnti, phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->rnti,
0); 0);
phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC += phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->harq_processes[harq_pid]->TBS;
#else #else
DLSCH_pdu = DLSCH_pdu_tmp; DLSCH_pdu = DLSCH_pdu_tmp;
for (i=0;i<input_buffer_length;i++) for (i=0;i<input_buffer_length;i++)
...@@ -2107,9 +2108,10 @@ void process_HARQ_feedback(u8 UE_id, ...@@ -2107,9 +2108,10 @@ void process_HARQ_feedback(u8 UE_id,
ue_stats->total_TBS = ue_stats->total_TBS + ue_stats->total_TBS = ue_stats->total_TBS +
phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->harq_processes[dl_harq_pid[m]]->TBS; phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->harq_processes[dl_harq_pid[m]]->TBS;
/*
ue_stats->total_transmitted_bits = ue_stats->total_transmitted_bits + ue_stats->total_transmitted_bits = ue_stats->total_transmitted_bits +
phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->harq_processes[dl_harq_pid[m]]->TBS; phy_vars_eNB->dlsch_eNB[(u8)UE_id][0]->harq_processes[dl_harq_pid[m]]->TBS;
*/
} }
// Do fine-grain rate-adaptation for DLSCH // Do fine-grain rate-adaptation for DLSCH
......
...@@ -641,7 +641,7 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index ...@@ -641,7 +641,7 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index
// we need to add conditions to avoid transmitting data when the UE is not RRC connected. // we need to add conditions to avoid transmitting data when the UE is not RRC connected.
#if defined(USER_MODE) && defined(OAI_EMU) #if defined(USER_MODE) && defined(OAI_EMU)
if (oai_emulation.info.otg_enabled ==1 ){ if (oai_emulation.info.otg_enabled ==1 ){
module_id = (eNB_flag == 1) ? eNB_index : /*NB_eNB_INST +*/ UE_index ; module_id = (eNB_flag == 1) ? eNB_index : NB_eNB_INST + UE_index ;
//rb_id = (eNB_flag == 1) ? eNB_index * MAX_NUM_RB + DTCH : (NB_eNB_INST + UE_index -1 ) * MAX_NUM_RB + DTCH ; //rb_id = (eNB_flag == 1) ? eNB_index * MAX_NUM_RB + DTCH : (NB_eNB_INST + UE_index -1 ) * MAX_NUM_RB + DTCH ;
if (eNB_flag == 1) { // search for DL traffic if (eNB_flag == 1) { // search for DL traffic
...@@ -655,33 +655,36 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index ...@@ -655,33 +655,36 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index
pdcp_mode = (otg_pkt_info->otg_pkt).mode; pdcp_mode = (otg_pkt_info->otg_pkt).mode;
// generate traffic if the ue is rrc reconfigured state // generate traffic if the ue is rrc reconfigured state
// if (mac_get_rrc_status(module_id, eNB_flag, dst_id ) > 2 /*RRC_CONNECTED*/) { // not needed: this test is already done in update_otg_enb // if (mac_get_rrc_status(module_id, eNB_flag, dst_id ) > 2 /*RRC_CONNECTED*/) { // not needed: this test is already done in update_otg_enb
otg_pkt = (u8*) (otg_pkt_info->otg_pkt).sdu_buffer; otg_pkt = (u8*) (otg_pkt_info->otg_pkt).sdu_buffer;
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size; pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
if (otg_pkt != NULL) { if (otg_pkt != NULL) {
//rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH; //rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH;
LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n", eNB_index, frame, pkt_cnt++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode); LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n", eNB_index, frame, pkt_cnt++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode);
pdcp_data_req(module_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,pdcp_mode); pdcp_data_req(module_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,pdcp_mode);
free(otg_pkt); free(otg_pkt);
} }
// } //else LOG_D(OTG,"frame %d enb %d-> ue %d link not yet established state %d \n", frame, eNB_index,dst_id - NB_eNB_INST, mac_get_rrc_status(module_id, eNB_flag, dst_id - NB_eNB_INST)); // } //else LOG_D(OTG,"frame %d enb %d-> ue %d link not yet established state %d \n", frame, eNB_index,dst_id - NB_eNB_INST, mac_get_rrc_status(module_id, eNB_flag, dst_id - NB_eNB_INST));
}
}
else {
while ((otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]))) != NULL) {
//otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]));
dst_id = (otg_pkt_info->otg_pkt).dst_id;
module_id = (otg_pkt_info->otg_pkt).module_id;
rb_id = (otg_pkt_info->otg_pkt).rb_id;
src_id = module_id;
// if (mac_get_rrc_status(module_id, eNB_flag, eNB_index ) > 2 /*RRC_CONNECTED*/) { // not needed: this test is already done in update_otg_ue
otg_pkt = (u8*) (otg_pkt_info->otg_pkt).sdu_buffer;
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
if (otg_pkt != NULL){
//rb_id= eNB_index * MAX_NUM_RB + DTCH;
LOG_D(OTG,"[UE %d] sending packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", UE_index, src_id, rb_id, src_id, dst_id, pkt_size);
pdcp_data_req(src_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO,pkt_size, otg_pkt, PDCP_DATA_PDU);
free(otg_pkt);
}
//} //else LOG_D(OTG,"frame %d ue %d-> enb %d link not yet established state %d \n", frame, UE_index, eNB_index, mac_get_rrc_status(module_id, eNB_flag, eNB_index ));
} }
} else while ((otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]))) != NULL) {
//otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]));
dst_id = (otg_pkt_info->otg_pkt).dst_id;
module_id = (otg_pkt_info->otg_pkt).module_id;
rb_id = (otg_pkt_info->otg_pkt).rb_id;
src_id = module_id;
if (mac_get_rrc_status(module_id, eNB_flag, eNB_index ) > 2 /*RRC_CONNECTED*/) {
otg_pkt = (u8*) (otg_pkt_info->otg_pkt).sdu_buffer;
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
if (otg_pkt != NULL){
//rb_id= eNB_index * MAX_NUM_RB + DTCH;
LOG_D(OTG,"[UE %d] sending packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", UE_index, src_id, rb_id, src_id, dst_id, pkt_size);
pdcp_data_req(src_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO,pkt_size, otg_pkt, PDCP_DATA_PDU);
free(otg_pkt);
}
} //else LOG_D(OTG,"frame %d ue %d-> enb %d link not yet established state %d \n", frame, UE_index, eNB_index, mac_get_rrc_status(module_id, eNB_flag, eNB_index ));
} }
} }
#else #else
......
...@@ -686,7 +686,7 @@ int ...@@ -686,7 +686,7 @@ int
PHY_vars_UE_g[UE_id]->frame = frame; PHY_vars_UE_g[UE_id]->frame = frame;
//Application //Application
update_otg_UE(UE_id + NB_eNB_INST, oai_emulation.info.time_ms); update_otg_UE(UE_id, oai_emulation.info.time_ms);
//Access layer //Access layer
pdcp_run(frame, 0, UE_id, 0); pdcp_run(frame, 0, UE_id, 0);
......
...@@ -833,24 +833,24 @@ void update_otg_eNB(int module_id, unsigned int ctime) { ...@@ -833,24 +833,24 @@ void update_otg_eNB(int module_id, unsigned int ctime) {
#endif #endif
} }
void update_otg_UE(int module_id, unsigned int ctime) { void update_otg_UE(int UE_id, unsigned int ctime) {
#if defined(USER_MODE) && defined(OAI_EMU) #if defined(USER_MODE) && defined(OAI_EMU)
if (oai_emulation.info.otg_enabled ==1 ) { if (oai_emulation.info.otg_enabled ==1 ) {
int dst_id, src_id; int dst_id, src_id; //dst_id = eNB_index
int eNB_index = 0; //See how phy_procedures_UE_lte is called: 3rd parameter from the right = 0 int module_id = UE_id+NB_eNB_INST;
src_id = module_id; src_id = module_id;
dst_id = eNB_index;
if (mac_get_rrc_status(module_id, 0/*eNB_flag*/, eNB_index ) > 2 /*RRC_CONNECTED*/) { for (dst_id=0;dst_id<NUMBER_OF_eNB_MAX;dst_id++) {
if (mac_get_rrc_status(UE_id, 0/*eNB_flag*/, dst_id ) > 2 /*RRC_CONNECTED*/) {
Packet_otg_elt *otg_pkt = malloc (sizeof(Packet_otg_elt)); Packet_otg_elt *otg_pkt = malloc (sizeof(Packet_otg_elt));
// Manage to add this packet to the tail of your list // Manage to add this packet to the tail of your list
(otg_pkt->otg_pkt).sdu_buffer = (u8*) packet_gen(src_id, dst_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size)); (otg_pkt->otg_pkt).sdu_buffer = (u8*) packet_gen(src_id, dst_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) { if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
(otg_pkt->otg_pkt).rb_id = eNB_index * NB_RB_MAX + DTCH; (otg_pkt->otg_pkt).rb_id = dst_id * NB_RB_MAX + DTCH;
(otg_pkt->otg_pkt).module_id = module_id; (otg_pkt->otg_pkt).module_id = module_id;
//(otg_pkt->otg_pkt).dst_id = dst_id; (otg_pkt->otg_pkt).dst_id = dst_id;
//Adding the packet to the OTG-PDCP buffer //Adding the packet to the OTG-PDCP buffer
(otg_pkt->otg_pkt).mode = PDCP_DATA_PDU; (otg_pkt->otg_pkt).mode = PDCP_DATA_PDU;
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id])); pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id]));
...@@ -859,6 +859,7 @@ void update_otg_UE(int module_id, unsigned int ctime) { ...@@ -859,6 +859,7 @@ void update_otg_UE(int module_id, unsigned int ctime) {
otg_pkt=NULL; otg_pkt=NULL;
} }
} }
}
} }
#endif #endif
} }
......
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