fix OTG issues in oaisim without s1
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7526 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -754,7 +754,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
|
||||
ctxt_pP->subframe,
|
||||
src_id);
|
||||
|
||||
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",
|
||||
LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d/%x) pkt size %d for pdcp mode %d\n",
|
||||
ctxt.module_id,
|
||||
ctxt.frame,
|
||||
pkt_cnt_enb++,
|
||||
@@ -762,6 +762,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
|
||||
rb_id,
|
||||
src_id,
|
||||
dst_id,
|
||||
oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id][dst_id],
|
||||
pkt_size,
|
||||
pdcp_mode);
|
||||
result = pdcp_data_req(&ctxt,
|
||||
@@ -779,20 +780,21 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
|
||||
//rb_id= eNB_index * MAX_NUM_RB + DTCH;
|
||||
|
||||
|
||||
LOG_D(OTG,"[UE %d] Frame %d: sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d\n",
|
||||
LOG_D(OTG,"[UE %d] Frame %d: sending packet %d from module %d on rab id %d (src %d/%x, dst %d) pkt size %d\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->frame,
|
||||
pkt_cnt_ue++,
|
||||
ctxt_pP->module_id,
|
||||
rb_id,
|
||||
ctxt_pP->module_id,
|
||||
src_id,
|
||||
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id], // [src_id]
|
||||
dst_id,
|
||||
pkt_size);
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(
|
||||
&ctxt,
|
||||
src_id,
|
||||
ctxt_pP->module_id, //src_id,
|
||||
ENB_FLAG_NO,
|
||||
pdcp_UE_UE_module_id_to_rnti[src_id],
|
||||
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id],// [src_id]
|
||||
ctxt_pP->frame,
|
||||
ctxt_pP->subframe,
|
||||
dst_id);
|
||||
|
||||
@@ -54,9 +54,20 @@ extern unsigned char NB_UE_INST;
|
||||
void tx_throughput(int src, int dst, int application)
|
||||
{
|
||||
|
||||
if (otg_info->tx_num_bytes[src][dst][application]>0)
|
||||
otg_info->tx_throughput[src][dst][application]=((double)otg_info->tx_num_bytes[src][dst][application] *1000*8)/ (get_ctime()*1024); // unit Kbit/sec, if ctime in ms
|
||||
|
||||
if (otg_info->tx_num_bytes[src][dst][application]>0) {
|
||||
// otg_info->tx_throughput[src][dst][application]=((double)otg_info->tx_num_bytes[src][dst][application] *1000*8)/ (get_ctime()*1024); // unit Kbit/sec, if ctime in ms
|
||||
if ((g_otg->flow_start[src][dst][application]+g_otg->flow_duration[src][dst][application]) < get_ctime() )
|
||||
otg_info->tx_throughput[src][dst][application]=((double)otg_info->tx_num_bytes[src][dst][application] *1000*8)/ ((g_otg->flow_start[src][dst][application]+g_otg->flow_duration[src][dst][application])*1024); // unit Kbit/sec, if ctime in ms
|
||||
else if (g_otg->flow_start[src][dst][application] < get_ctime() )
|
||||
otg_info->tx_throughput[src][dst][application]=((double)otg_info->tx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024);
|
||||
else
|
||||
LOG_W("[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
|
||||
src, dst, application,
|
||||
g_otg->flow_start[src][dst][application],
|
||||
g_otg->flow_duration[src][dst][application],
|
||||
get_ctime());
|
||||
}
|
||||
|
||||
if (otg_info->tx_num_bytes_background[src][dst]>0)
|
||||
otg_info->tx_throughput_background[src][dst]=((double)otg_info->tx_num_bytes_background[src][dst]*1000*8)/ (get_ctime()*1024); // unit Kbit/sec, if ctime in ms
|
||||
|
||||
@@ -76,8 +87,19 @@ void tx_throughput(int src, int dst, int application)
|
||||
void rx_goodput(int src, int dst, int application)
|
||||
{
|
||||
|
||||
if (otg_info->rx_num_bytes[src][dst][application]>0)
|
||||
otg_info->rx_goodput[src][dst][application]=((double)otg_info->rx_num_bytes[src][dst][application]*1000*8)/(get_ctime()*1024); // unit kB/sec, if ctime in ms
|
||||
if (otg_info->rx_num_bytes[src][dst][application]>0) {
|
||||
// otg_info->rx_goodput[src][dst][application]=((double)otg_info->rx_num_bytes[src][dst][application]*1000*8)/(get_ctime()*1024); // unit kB/sec, if ctime in ms
|
||||
if ((g_otg->flow_start[src][dst][application]+g_otg->flow_duration[src][dst][application]) < get_ctime() )
|
||||
otg_info->rx_goodput[src][dst][application]=((double)otg_info->rx_num_bytes[src][dst][application] *1000*8)/ ((g_otg->flow_start[src][dst][application]+g_otg->flow_duration[src][dst][application])*1024); // unit Kbit/sec, if ctime in ms
|
||||
else if (g_otg->flow_start[src][dst][application] < get_ctime() )
|
||||
otg_info->rx_goodput[src][dst][application]=((double)otg_info->rx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024);
|
||||
else
|
||||
LOG_W("[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
|
||||
src, dst, application,
|
||||
g_otg->flow_start[src][dst][application],
|
||||
g_otg->flow_duration[src][dst][application],
|
||||
get_ctime());
|
||||
}
|
||||
|
||||
if (otg_info->rx_num_bytes_background[src][dst]>0)
|
||||
otg_info->rx_goodput_background[src][dst]=((double)otg_info->rx_num_bytes_background[src][dst] *1000*8)/(get_ctime()*1024); // unit kB/sec, if ctime in ms
|
||||
|
||||
Reference in New Issue
Block a user