* fix few bugs in oaisim and UL scheduling

* update the CBA operation (non standard feature)
* update OTG 
* add a set of templates for different combination of packet sizes and inter-departure time
 


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6351 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Navid Nikaein
2015-01-12 23:54:15 +00:00
parent 699563f24f
commit c76b846beb
51 changed files with 2016 additions and 430 deletions
+2 -2
View File
@@ -235,7 +235,7 @@ int logInit (void)
g_log->log_component[OTG_GP].interval = 1;
g_log->log_component[OTG_GP].fd = 0;
g_log->log_component[OTG_GP].filelog = 0;
g_log->log_component[OTG_GP].filelog_name = "/tmp/otg_GP.dat";
g_log->log_component[OTG_GP].filelog_name = "/tmp/otg_goodput.dat";
g_log->log_component[OTG_GP_BG].name = "OTG_GP_BG";
g_log->log_component[OTG_GP_BG].level = LOG_EMERG;
@@ -243,7 +243,7 @@ int logInit (void)
g_log->log_component[OTG_GP_BG].interval = 1;
g_log->log_component[OTG_GP_BG].fd = 0;
g_log->log_component[OTG_GP_BG].filelog = 0;
g_log->log_component[OTG_GP_BG].filelog_name = "/tmp/otg_GP_bg.dat";
g_log->log_component[OTG_GP_BG].filelog_name = "/tmp/otg_goodput_bg.dat";
g_log->log_component[OTG_JITTER].name = "OTG_JITTER";
g_log->log_component[OTG_JITTER].level = LOG_EMERG;
+2 -1
View File
@@ -73,7 +73,8 @@ return random;
double uniform_dist(int min, int max) {
double uniform_rn;
uniform_rn = (max - min) * uniform_rng() + min;
LOG_T(OTG,"Uniform Random Nb = %lf, (min %d, max %d)\n", uniform_rn, min, max);
// LOG_T(OTG,"Uniform Random Nb = %lf, (min %d, max %d)\n", uniform_rn, min, max);
//printf("Uniform Random Nb = %lf, (min %d, max %d)\n", uniform_rn, min, max);
return uniform_rn;
}
+1
View File
@@ -706,6 +706,7 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
char *vcd_file;
unsigned char eMBMS_active_state;
unsigned char cba_group_active;
unsigned char cba_backoff;
unsigned char handover_active;
char * otg_traffic;
unsigned char otg_bg_traffic_enabled;
+1 -1
View File
@@ -52,7 +52,7 @@ temp=split(strrep(inputf,"\\","/"),"/");
outputf=split(deblank(temp(size(temp,1),:)),".");
ylbl=outputf(1,:);
ylbl(1,1)=toupper(ylbl(1,1));
#ylbl(1,1)=toupper(ylbl(1,1));
ylabel(ylbl);
xlabel("Time (ms)");
+17 -13
View File
@@ -239,7 +239,7 @@ void kpi_gen() {
int num_active_source=0;
int dl_ok=0,ul_ok=0;
int dl_ok=1,ul_ok=1;
char traffic_type[12];
char traffic[30];
@@ -637,9 +637,11 @@ if ((g_otg->background_stats==1)&&(otg_info->tx_num_bytes_background[i][j]>0)){
LOG_I(OTG,"[DATA] Estimated E2E JITTER AVG ms= %lf \n", otg_info->average_jitter_dl_e2e/(float)num_active_source );
LOG_I(OTG,"[DATA] TX throughput = %.7f(Kbit/s) \n", ((double)tx_total_bytes_dl*1000*8)/(otg_info->ctime*1024));
LOG_I(OTG,"[DATA] RX throughput = %.7f(Kbit/s) \n", ((double)rx_total_bytes_dl*1000*8)/(otg_info->ctime*1024));
LOG_I(OTG,"[DATA] NB lost packet = %d \n", tx_total_pkts_dl - rx_total_pkts_dl );
if (tx_total_pkts_dl - rx_total_pkts_dl < (int) (tx_total_pkts_dl / 10) ) // below 10% of loss
dl_ok=1;
LOG_I(OTG,"[DATA] NB lost packet = %d \n", tx_total_pkts_dl - rx_total_pkts_dl);
if ( (tx_total_pkts_dl > 0) &&
((10*(tx_total_pkts_dl - rx_total_pkts_dl)) > tx_total_pkts_dl)) // below 10% of loss
dl_ok=0;
if ((g_otg->background_stats==1)&&(tx_total_pkts_dl_background>0)){
LOG_I(OTG,"[BACKGROUND] Total packets(TX)= %d \n", tx_total_pkts_dl_background);
LOG_I(OTG,"[BACKGROUND] Total bytes(TX)= %d \n", tx_total_bytes_dl_background);
@@ -708,8 +710,9 @@ if ((g_otg->background_stats==1)&&(otg_info->tx_num_bytes_background[i][j]>0)){
LOG_I(OTG,"[DATA] TX throughput = %.7f(Kbit/s) \n", ((double)tx_total_bytes_ul*1000*8)/(otg_info->ctime*1024));
LOG_I(OTG,"[DATA] RX throughput = %.7f(Kbit/s) \n", ((double)rx_total_bytes_ul*1000*8)/(otg_info->ctime*1024));
LOG_I(OTG,"[DATA] NB lost packet = %d \n", tx_total_pkts_ul - rx_total_pkts_ul );
if ((tx_total_pkts_ul - rx_total_pkts_ul) < (int)(tx_total_pkts_ul / 10) )
ul_ok=1;
if ( (tx_total_pkts_ul > 0 ) &&
((10*(tx_total_pkts_ul - rx_total_pkts_ul)) > tx_total_pkts_ul))
ul_ok=0;
if ((g_otg->background_stats==1)&&(tx_total_pkts_ul_background>0)){
LOG_I(OTG,"[BACKGROUND] Total packets(TX)= %d \n", tx_total_pkts_ul_background);
@@ -720,7 +723,7 @@ if ((g_otg->background_stats==1)&&(otg_info->tx_num_bytes_background[i][j]>0)){
LOG_I(OTG,"[BACKGROUND] RX throughput = %.7f(Kbit/s) \n", ((double)rx_total_bytes_ul_background*1000*8)/(otg_info->ctime*1024));
}
LOG_F(OTG,"**************** TOTAL UL RESULTS ******************\n");
LOG_F(OTG,"**************** TOTAL UL RESULTS ******************\n");
LOG_F(OTG,"Total Time (ms)= %d \n", otg_info->ctime+1);
LOG_F(OTG,"[DATA] Total packets(TX)= %d \n", tx_total_pkts_ul);
LOG_F(OTG,"[DATA] Total packets(RX)= %d \n", rx_total_pkts_ul);
@@ -735,6 +738,7 @@ if ((g_otg->background_stats==1)&&(otg_info->tx_num_bytes_background[i][j]>0)){
LOG_F(OTG,"[DATA] TX throughput = %.7f(Kbit/s) \n", ((double)tx_total_bytes_ul*1000*8)/(otg_info->ctime*1024));
LOG_F(OTG,"[DATA] RX throughput = %.7f(Kbit/s) \n", ((double)rx_total_bytes_ul*1000*8)/(otg_info->ctime*1024));
LOG_F(OTG,"[DATA] NB lost packet = %d \n", tx_total_pkts_ul - rx_total_pkts_ul );
if ((g_otg->background_stats==1)&&(tx_total_pkts_ul_background>0)){
LOG_F(OTG,"[BACKGROUND] Total packets(TX)= %d \n", tx_total_pkts_ul_background);
LOG_F(OTG,"[BACKGROUND] Total bytes(TX)= %d \n", tx_total_bytes_ul_background);
@@ -748,7 +752,7 @@ if ((g_otg->background_stats==1)&&(otg_info->tx_num_bytes_background[i][j]>0)){
if ((dl_ok == 1 ) && (ul_ok ==1))
LOG_I(OTG,"************ DL and UL loss rate below 10 *************\n");
else
LOG_I(OTG,"************ DL and UL loss rate above 10 *************\n");
LOG_I(OTG,"************ DL(%d) and UL(%d) loss rate above 10 *************\n",dl_ok,ul_ok);
#endif
}
@@ -781,7 +785,7 @@ void add_log_metric(int src, int dst, int ctime, double metric, unsigned int lab
LOG_E(OTG, "File label unknown %d \n", label);
}
LOG_F(label,"%d ", ctime);
LOG_F(label,"%d ", ctime);
for (i=0; i<=(NB_eNB_INST + NB_UE_INST); i++){
for (j=0; j<=(NB_eNB_INST + NB_UE_INST); j++){
node_actif=0;
@@ -789,9 +793,9 @@ void add_log_metric(int src, int dst, int ctime, double metric, unsigned int lab
node_actif=1;
if ((node_actif>0) && ((i==src) && (j==dst)))
LOG_F(label," %f ", metric);
LOG_F(label,"%f ", metric);
if ((node_actif>0) && ((i!=src) || (j!=dst)))
LOG_F(label," %d ", 0);
LOG_F(label,"%d ", 0);
}
}
LOG_F(label,"%f\n", metric);
@@ -806,14 +810,14 @@ void add_log_label(unsigned int label, unsigned int * start_log_metric){
if (*start_log_metric==0){
*start_log_metric=1;
LOG_F(label,"Time ");
LOG_F(label,"Time ");
for (i=0; i<=(NB_eNB_INST + NB_UE_INST); i++){
for (j=0; j<=(NB_eNB_INST + NB_UE_INST); j++){
node_actif=0;
if (g_otg->idt_dist[i][j][0][PE_STATE]>0 )
node_actif++;
if (node_actif>0)
LOG_F(label,"%d->%d ", i, j);
LOG_F(label,"%d->%d ", i, j);
}
}
LOG_F(label,"Aggregated\n");
+5 -5
View File
@@ -40,7 +40,7 @@
#include "otg_rx.h"
#include "otg_externs.h"
#include "../UTIL/MATH/oml.h"
#include "UTIL/MATH/oml.h"
#include <math.h>
#include "otg_form.h"
#include "otg_kpi.h"
@@ -70,8 +70,7 @@ int otg_rx_pkt( int src, int dst, int ctime, char *buffer_tx, unsigned int size)
unsigned int seq_num_rx;
unsigned int nb_loss_pkts;
unsigned int lost_packet=0;
//int header_size;
if (buffer_tx!=NULL) {
otg_hdr_info_rx = (otg_hdr_info_t *) (&buffer_tx[bytes_read]);
bytes_read += sizeof (otg_hdr_info_t);
@@ -299,9 +298,10 @@ float owd_const_application_v=owd_const_application()/2;
/*measurements are done for the data and background traffic */
if (g_otg->latency_metric) {
if (g_otg->owd_radio_access==0)
if (g_otg->owd_radio_access==0){
add_log_metric(src, dst, otg_hdr_rx->time, otg_info->rx_pkt_owd[src][dst], OTG_LATENCY);
else {
add_log_metric(src, dst, otg_hdr_rx->time, otg_info->rx_pkt_jitter_e2e[src][dst], OTG_JITTER);
} else {
add_log_metric(src, dst, otg_hdr_rx->time, otg_info->radio_access_delay[src][dst], OTG_LATENCY);
add_log_metric(src, dst, otg_hdr_rx->time, otg_info->rx_pkt_jitter[src][dst], OTG_JITTER);
}
+3 -3
View File
@@ -413,14 +413,14 @@ int check_data_transmit(int src,int dst, int app, int ctime){
//g_ otg->flow_start_flag[src][dst][app]=1;
LOG_T(OTG,"Flow start time not reached : do not generate packet for this pair of src=%d, dst =%d, start %d < ctime %d \n",
src, dst,g_otg->flow_start[src][dst][app], ctime);
size+=0;
size=0;
}else if (g_otg->flow_duration[src][dst][app] + g_otg->flow_start[src][dst][app] < ctime ){
LOG_T(OTG,"Flow duration reached: do not generate packet for this pair of src=%d, dst =%d, duration %d < ctime %d + start %d\n",
src, dst,g_otg->flow_duration[src][dst][app], ctime, g_otg->flow_start[src][dst][app]);
size+=0;
size=0;
}else if ((g_otg->application_type[src][dst][app]==0)&&(g_otg->idt_dist[src][dst][app][PE_STATE]==0)){
LOG_T(OTG,"Do not generate packet for this pair of src=%d, dst =%d, IDT zero and app %d not specificed\n", src, dst, app);
size+=0;
size=0;
}
else if ((g_otg->application_type[src][dst][app] >0) || (g_otg->idt_dist[src][dst][app][PE_STATE] > 0)) {