diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
index 616288b74b..6064abaf79 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
@@ -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);
diff --git a/openair2/UTIL/OTG/otg_kpi.c b/openair2/UTIL/OTG/otg_kpi.c
index 29a76f148a..f69c6940ff 100644
--- a/openair2/UTIL/OTG/otg_kpi.c
+++ b/openair2/UTIL/OTG/otg_kpi.c
@@ -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
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_5.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_5.xml
index bf5d14653b..32526c6f6e 100644
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_5.xml
+++ b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_5.xml
@@ -3,8 +3,8 @@
urban
- 3.67
- -128
+ 2.67
+ -100
AWGN
@@ -29,8 +29,8 @@
- 500
- 500
+ 1000
+ 1000
@@ -38,14 +38,12 @@
2
- STATIC
+ RWP
1
- 200
+ 2
0.1
- 5.0
- 0.1
- 10
+ 15.0
@@ -61,32 +59,46 @@
- 0
- scbr
- 1:2
-
-
- 1:2
- scbr
- 0
+ 0
+ mcbr
+ 1:2
+ 100
+ 6000
+
+
+ 1:2
+ udp
+ 100
+ 6000
+ ipv4
+ 0
+ uniform
+ 10
+ 100
+ uniform
+ 64
+ 1024
+
10000
+ disable
- 1
+ enable
+ enable
+ enable
- debug
- medium
- 1
-
+ info
+ low
+
0
- OCM_OMG
+ OCM_OMG_OTG
diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c
index 7707d4807c..8e1e3a98c9 100644
--- a/targets/SIMU/USER/oaisim.c
+++ b/targets/SIMU/USER/oaisim.c
@@ -1198,10 +1198,7 @@ l2l1_task (void *args_p)
//end of frame
stop_meas (&oaisim_stats);
-
-#if defined(ENABLE_ITTI)
- itti_terminate_tasks(TASK_L2L1);
-#endif
+ oai_shutdown ();
#ifdef PRINT_STATS
@@ -1226,6 +1223,10 @@ l2l1_task (void *args_p)
#endif
+#if defined(ENABLE_ITTI)
+ itti_terminate_tasks(TASK_L2L1);
+#endif
+
return NULL;
}
@@ -1364,7 +1365,7 @@ main (int argc, char **argv)
">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU Ending <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
raise (SIGINT);
- oai_shutdown ();
+ // oai_shutdown ();
return (0);
}
@@ -1808,9 +1809,10 @@ oai_shutdown (void)
#endif
//Perform KPI measurements
- if (oai_emulation.info.otg_enabled == 1)
+ if (oai_emulation.info.otg_enabled == 1){
+ LOG_N(EMU,"calling OTG kpi gen .... \n");
kpi_gen ();
-
+ }
if (oai_emulation.info.opp_enabled == 1)
print_opp_meas ();
diff --git a/targets/SIMU/USER/oaisim_config.c b/targets/SIMU/USER/oaisim_config.c
index d812fca536..dfaf025080 100644
--- a/targets/SIMU/USER/oaisim_config.c
+++ b/targets/SIMU/USER/oaisim_config.c
@@ -450,14 +450,14 @@ int olg_config(void)
//set_log(OCM, LOG_INFO, 20);
//set_log(OTG, LOG_INFO, 1);
set_comp_log(OCG, LOG_ERR, 0x15,1);
- set_comp_log(EMU, LOG_ERR, 0x15,20);
+ set_comp_log(EMU, LOG_DEBUG, 0x15,20);
set_comp_log(MAC, LOG_TRACE, 0x15,1);
set_comp_log(RLC, LOG_TRACE, 0x15,1);
set_comp_log(PHY, LOG_TRACE, 0x15, 1);
set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
set_comp_log(RRC, LOG_DEBUG, 0x15,1);
set_comp_log(OCM, LOG_ERR, 0x15,20);
- set_comp_log(OTG, LOG_INFO, 0x15,1);
+ set_comp_log(OTG, LOG_DEBUG, 0x15,1);
set_comp_log(OMG, LOG_INFO, 0x15,1);
set_comp_log(OPT, LOG_ERR, 0x15,1);
diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c
index 11d52ad6c8..a1fda46114 100644
--- a/targets/SIMU/USER/oaisim_functions.c
+++ b/targets/SIMU/USER/oaisim_functions.c
@@ -1268,6 +1268,8 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
{
#if defined(USER_MODE) && defined(OAI_EMU)
+ int rrc_state=0;
+
if (oai_emulation.info.otg_enabled ==1 ) {
int dst_id, app_id;
@@ -1277,9 +1279,11 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
for_times += 1;
// generate traffic if the ue is rrc reconfigured state
- if (mac_eNB_get_rrc_status(enb_module_idP, dst_id) > 2 /*RRC_CONNECTED*/ ) {
- if_times += 1;
-
+ //if ((rrc_state=mac_eNB_get_rrc_status(enb_module_idP, dst_id)) > 2 /*RRC_CONNECTED*/ ) {
+ if (mac_eNB_get_rrc_status(enb_module_idP, oai_emulation.info.eNB_ue_module_id_to_rnti[enb_module_idP][dst_id]) > 2 ){
+
+ if_times += 1;
+
for (app_id=0; app_id