Commit 91dbe8d6 authored by nikaeinn's avatar nikaeinn

* Change the Linux Sched policy to SCHED_DEADLINE for the kernel version > 3.14

* Add MAC/RRC wireshark interface to LTE softmodem
* Add OTG support to the eNB App, and some cleanup


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6115 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0b9c724a
...@@ -56,18 +56,29 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti ...@@ -56,18 +56,29 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
if (first_time == 0) { if (first_time == 0) {
first_time=1; first_time=1;
fprintf(stderr, "%25s %25s %25s %20s %15s %6f\n","Name","Total","Average/Frame","Trials","CPU_F_GHz", cpu_freq_GHz); if ((total_exec_time == NULL) || (sf_exec_time== NULL))
fprintf(stderr, "%25s %25s %25s %25s %6f\n","Name","Total","Per Trials", "Num Trials","CPU_F_GHz", cpu_freq_GHz);
else
fprintf(stderr, "%25s %25s %25s %20s %15s %6f\n","Name","Total","Average/Frame","Trials","CPU_F_GHz", cpu_freq_GHz);
} }
if (ts->trials>0) { if (ts->trials>0) {
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials); //printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
fprintf(stderr, "%25s: %15.3f ms (%5.2f%%); %15.3f us (%5.2f%%); %15d;\n", if ((total_exec_time == NULL) || (sf_exec_time== NULL)){
name, fprintf(stderr, "%25s: %15.3f ms ; %15.3f us; %15d;\n",
(ts->diff/cpu_freq_GHz/1000000.0), name,
((ts->diff/cpu_freq_GHz/1000000.0)/(total_exec_time->diff/cpu_freq_GHz/1000000.0))*100, // percentage (ts->diff/cpu_freq_GHz/1000000.0),
(ts->diff/ts->trials/cpu_freq_GHz/1000.0), (ts->diff/ts->trials/cpu_freq_GHz/1000.0),
((ts->diff/ts->trials/cpu_freq_GHz/1000.0)/(sf_exec_time->diff/sf_exec_time->trials/cpu_freq_GHz/1000.0))*100, // percentage ts->trials);
ts->trials); }else {
fprintf(stderr, "%25s: %15.3f ms (%5.2f%%); %15.3f us (%5.2f%%); %15d;\n",
name,
(ts->diff/cpu_freq_GHz/1000000.0),
((ts->diff/cpu_freq_GHz/1000000.0)/(total_exec_time->diff/cpu_freq_GHz/1000000.0))*100, // percentage
(ts->diff/ts->trials/cpu_freq_GHz/1000.0),
((ts->diff/ts->trials/cpu_freq_GHz/1000.0)/(sf_exec_time->diff/sf_exec_time->trials/cpu_freq_GHz/1000.0))*100, // percentage
ts->trials);
}
} }
} }
......
...@@ -302,6 +302,11 @@ typedef struct PHY_VARS_eNB_s{ ...@@ -302,6 +302,11 @@ typedef struct PHY_VARS_eNB_s{
time_stats_t phy_proc; time_stats_t phy_proc;
time_stats_t phy_proc_tx; time_stats_t phy_proc_tx;
time_stats_t phy_proc_rx; time_stats_t phy_proc_rx;
/*
time_stats_t phy_proc_sf[10]; // for each subframe
time_stats_t phy_proc_tx_sf[10];
time_stats_t phy_proc_rx_sf[10];
*/
time_stats_t rx_prach; time_stats_t rx_prach;
time_stats_t ofdm_mod_stats; time_stats_t ofdm_mod_stats;
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include "log_extern.h" #include "log_extern.h"
#include "assertions.h" #include "assertions.h"
#include "enb_config.h" #include "enb_config.h"
#include "UTIL/OTG/otg.h"
#include "UTIL/OTG/otg_externs.h"
#if defined(OAI_EMU) #if defined(OAI_EMU)
# include "OCG.h" # include "OCG.h"
# include "OCG_extern.h" # include "OCG_extern.h"
...@@ -162,6 +164,11 @@ ...@@ -162,6 +164,11 @@
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying" #define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info" #define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info"
// OTG config per ENB-UE DL
#define ENB_CONF_STRING_OTG_CONFIG "otg_config"
#define ENB_CONF_STRING_OTG_UE_ID "ue_id"
#define ENB_CONF_STRING_OTG_APP_TYPE "app_type"
#define ENB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
// per eNB configuration // per eNB configuration
#define ENB_CONFIG_STRING_LOG_CONFIG "log_config" #define ENB_CONFIG_STRING_LOG_CONFIG "log_config"
...@@ -185,8 +192,6 @@ ...@@ -185,8 +192,6 @@
#define ENB_CONFIG_STRING_UDP_LOG_VERBOSITY "udp_log_verbosity" #define ENB_CONFIG_STRING_UDP_LOG_VERBOSITY "udp_log_verbosity"
#define KHz (1000UL) #define KHz (1000UL)
#define MHz (1000 * KHz) #define MHz (1000 * KHz)
...@@ -345,7 +350,12 @@ static void enb_config_display(void) { ...@@ -345,7 +350,12 @@ static void enb_config_display(void) {
printf( "\tue_TimersAndConstants_n311 for CC %d:\t%d:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_n311[j]); printf( "\tue_TimersAndConstants_n311 for CC %d:\t%d:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_n311[j]);
} }
for (j=0; j < enb_properties.properties[i]->num_otg_elements; j++){
printf( "\n\tOTG Destination UE ID: \t%d", enb_properties.properties[i]->otg_ue_id[j]);
printf( "\n\tOTG App Type: \t%d", enb_properties.properties[i]->otg_app_type[j]);
printf( "\n\tOTG Background Traffic: \t%s\n", (enb_properties.properties[i]->otg_bg_traffic[j]==1) ? "Enabled" : "Disabled");
}
printf( "\n\tGlobal log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->glog_level)); printf( "\n\tGlobal log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->glog_level));
printf( "\tHW log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->hw_log_level)); printf( "\tHW log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->hw_log_level));
printf( "\tPHY log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->phy_log_level)); printf( "\tPHY log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->phy_log_level));
...@@ -420,10 +430,13 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -420,10 +430,13 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
config_setting_t *setting_mme_addresses = NULL; config_setting_t *setting_mme_addresses = NULL;
config_setting_t *setting_mme_address = NULL; config_setting_t *setting_mme_address = NULL;
config_setting_t *setting_enb = NULL; config_setting_t *setting_enb = NULL;
config_setting_t *setting_otg = NULL;
config_setting_t *subsetting_otg = NULL;
int num_enb_properties = 0; int num_enb_properties = 0;
int enb_properties_index = 0; int enb_properties_index = 0;
int num_enbs; int num_enbs;
int num_mme_address; int num_mme_address;
int num_otg_elements =0;
int num_component_carriers =0; int num_component_carriers =0;
int i; int i;
int j; int j;
...@@ -523,6 +536,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -523,6 +536,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
char *address = NULL; char *address = NULL;
char *cidr = NULL; char *cidr = NULL;
char *astring = NULL; char *astring = NULL;
libconfig_int otg_ue_id = 0;
char* otg_app_type = NULL;
char* otg_bg_traffic = NULL;
char* glog_level = NULL; char* glog_level = NULL;
char* glog_verbosity = NULL; char* glog_verbosity = NULL;
char* hw_log_level = NULL; char* hw_log_level = NULL;
...@@ -1634,6 +1650,41 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -1634,6 +1650,41 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
} }
} }
} }
// OTG _CONFIG
setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG);
if(setting_otg != NULL) {
num_otg_elements = config_setting_length(setting_otg);
printf("num otg elements %d \n", num_otg_elements);
enb_properties.properties[enb_properties_index]->num_otg_elements = 0;
for (j = 0; j < num_otg_elements; j++) {
subsetting_otg=config_setting_get_elem(setting_otg, j);
if(config_setting_lookup_int(subsetting_otg, ENB_CONF_STRING_OTG_UE_ID, &otg_ue_id))
enb_properties.properties[enb_properties_index]->otg_ue_id[j] = otg_ue_id;
else
enb_properties.properties[enb_properties_index]->otg_ue_id[j] = 1;
if(config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_APP_TYPE, (const char **)&otg_app_type)){
if ((enb_properties.properties[enb_properties_index]->otg_app_type[j] = map_str_to_int(otg_app_type_names,otg_app_type))== -1)
enb_properties.properties[enb_properties_index]->otg_app_type[j] = BCBR;
}else
enb_properties.properties[enb_properties_index]->otg_app_type[j] = NO_PREDEFINED_TRAFFIC; // 0
if(config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_BG_TRAFFIC, (const char **)&otg_bg_traffic)){
if ((enb_properties.properties[enb_properties_index]->otg_bg_traffic[j] = map_str_to_int(switch_names,otg_bg_traffic)) == -1){
enb_properties.properties[enb_properties_index]->otg_bg_traffic[j]=0;
}
}else{
enb_properties.properties[enb_properties_index]->otg_bg_traffic[j] = 0;
printf("otg bg %s\n", otg_bg_traffic);
}
enb_properties.properties[enb_properties_index]->num_otg_elements+=1;
}
}
// log_config // log_config
subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG); subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG);
if(subsetting != NULL) { if(subsetting != NULL) {
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
/* /*
enb_config.h enb_config.h
------------------- -------------------
AUTHOR : Lionel GAUTHIER, Laurent Winckel AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel
COMPANY : EURECOM COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
*/ */
#ifndef ENB_CONFIG_H_ #ifndef ENB_CONFIG_H_
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "commonDef.h" #include "commonDef.h"
#include "platform_types.h" #include "platform_types.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#include "PHY/impl_defs_top.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h" #include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
...@@ -181,7 +182,14 @@ typedef struct Enb_properties_s { ...@@ -181,7 +182,14 @@ typedef struct Enb_properties_s {
char *enb_interface_name_for_S1_MME; char *enb_interface_name_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME; in_addr_t enb_ipv4_address_for_S1_MME;
// log config // otg config
/* Nb of OTG elements */
uint8_t num_otg_elements;
/* element config*/
uint16_t otg_ue_id[NUMBER_OF_UE_MAX+1];
uint8_t otg_app_type[NUMBER_OF_UE_MAX+1];
uint8_t otg_bg_traffic[NUMBER_OF_UE_MAX+1];
// log config
int16_t glog_level; int16_t glog_level;
int16_t glog_verbosity; int16_t glog_verbosity;
int16_t hw_log_level; int16_t hw_log_level;
......
...@@ -2627,37 +2627,36 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t ...@@ -2627,37 +2627,36 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t
//for (eNB_offset = 1;(eNB_offset<1+mac_xface->get_n_adj_cells(ue_mod_idP,0));eNB_offset++) { //for (eNB_offset = 1;(eNB_offset<1+mac_xface->get_n_adj_cells(ue_mod_idP,0));eNB_offset++) {
/* RHS: Verify that idx 0 corresponds to currentCellIndex in rsrp array */ /* RHS: Verify that idx 0 corresponds to currentCellIndex in rsrp array */
if((eNB_offset!=eNB_index)&&(eNB_offset<NB_eNB_INST)){ if((eNB_offset!=eNB_index)&&(eNB_offset<NB_eNB_INST)){
if(eNB_offset<eNB_index){ if(eNB_offset<eNB_index){
tmp_offset = eNB_offset; tmp_offset = eNB_offset;
} }
else else {
{ tmp_offset = eNB_offset-1;
tmp_offset = eNB_offset-1; }
} if(UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]+ofn+ocn-hys > UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_index]+ofs+ocs-1/*+a3_offset*/) {
if(UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]+ofn+ocn-hys > UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_index]+ofs+ocs-1/*+a3_offset*/) { UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] += 2; //Called every subframe = 2ms
UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] += 2; //Called every subframe = 2ms LOG_D(RRC,"[UE %d] Frame %d: Entry measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n",
LOG_D(RRC,"[UE %d] Frame %d: Entry measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n", ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset);
ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset); }
} else {
else { UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] = 0; //Exit condition: Resetting the measurement timer
UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] = 0; //Exit condition: Resetting the measurement timer LOG_D(RRC,"[UE %d] Frame %d: Exit measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n",
LOG_D(RRC,"[UE %d] Frame %d: Exit measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n", ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset);
ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset); }
} if (UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] >= ttt) {
if (UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] >= ttt) { UE_rrc_inst->HandoverInfoUe.targetCellId = get_adjacent_cell_id(ue_mod_idP,tmp_offset); //WARNING!!!...check this!
UE_rrc_inst->HandoverInfoUe.targetCellId = get_adjacent_cell_id(ue_mod_idP,tmp_offset); //WARNING!!!...check this! LOG_D(RRC,"[UE %d] Frame %d eNB %d: Handover triggered: targetCellId: %d currentCellId: %d eNB_offset: %d rsrp source: %3.1f rsrp target: %3.1f\n", \
LOG_D(RRC,"[UE %d] Frame %d eNB %d: Handover triggered: targetCellId: %d currentCellId: %d eNB_offset: %d rsrp source: %3.1f rsrp target: %3.1f\n", \ ue_mod_idP, frameP, eNB_index,
ue_mod_idP, frameP, eNB_index, UE_rrc_inst->HandoverInfoUe.targetCellId,ue_cnx_index,eNB_offset,
UE_rrc_inst->HandoverInfoUe.targetCellId,ue_cnx_index,eNB_offset, (dB_fixed_times10(UE_rrc_inst[ue_mod_idP].rsrp_db[0])/10.0)-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)-dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12),
(dB_fixed_times10(UE_rrc_inst[ue_mod_idP].rsrp_db[0])/10.0)-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)-dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12), (dB_fixed_times10(UE_rrc_inst[ue_mod_idP].rsrp_db[eNB_offset])/10.0)-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)-dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12));
(dB_fixed_times10(UE_rrc_inst[ue_mod_idP].rsrp_db[eNB_offset])/10.0)-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)-dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12)); UE_rrc_inst->Info[0].handoverTarget = eNB_offset;
UE_rrc_inst->Info[0].handoverTarget = eNB_offset; //LOG_D(RRC,"PHY_ID: %d \n",UE_rrc_inst->HandoverInfoUe.targetCellId);
//LOG_D(RRC,"PHY_ID: %d \n",UE_rrc_inst->HandoverInfoUe.targetCellId); return 1;
return 1; }
} // else{
// else{ // LOG_D(RRC,"Condition does not hold\n");
// LOG_D(RRC,"Condition does not hold\n"); // }
// }
} }
} }
return 0; return 0;
......
...@@ -58,8 +58,8 @@ This header file must be included */ ...@@ -58,8 +58,8 @@ This header file must be included */
#define project_include #define project_include
#include "UTIL/LOG/log_if.h" #include "UTIL/LOG/log_if.h"
// #include "UTIL/LOG/log_extern.h" // #include "UTIL/LOG/log_extern.h"
#include "PHY/defs.h" //#include "PHY/defs.h"
#include "PHY/extern.h" //#include "PHY/extern.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#endif #endif
......
...@@ -42,13 +42,30 @@ ...@@ -42,13 +42,30 @@
# define __OTG_EXTERNS_H__ # define __OTG_EXTERNS_H__
/*!< \brief main log variables */ /*!< \brief main log variables */
extern otg_t *g_otg; /*!< \brief global params */ extern otg_t *g_otg; /*!< \brief global params */
extern otg_multicast_t *g_otg_multicast; /*!< \brief global params */ extern otg_multicast_t *g_otg_multicast; /*!< \brief global params */
extern otg_info_t *otg_info; /*!< \brief info otg */ extern otg_info_t *otg_info; /*!< \brief info otg */
extern otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */ extern otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */
extern otg_forms_info_t *otg_forms_info;
extern mapping otg_multicast_app_type_names[] ;
extern mapping otg_app_type_names[];
extern mapping otg_transport_protocol_names[];
extern mapping otg_ip_version_names[];
extern mapping otg_multicast_app_type_names[];
extern mapping otg_distribution_names[];
extern mapping frame_type_names[];
extern mapping switch_names[] ;
extern mapping packet_gen_names[];
#endif #endif
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
*/ */
#include "otg_form.h" #include "otg_form.h"
#include "otg_vars.h" #include "otg_externs.h"
#include "otg_kpi.h" #include "otg_kpi.h"
extern unsigned char NB_eNB_INST; extern unsigned char NB_eNB_INST;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
*/ */
#include "otg_rx.h" #include "otg_rx.h"
#include "otg_vars.h" #include "otg_externs.h"
#include "../UTIL/MATH/oml.h" #include "../UTIL/MATH/oml.h"
#include <math.h> #include <math.h>
#include "otg_form.h" #include "otg_form.h"
......
...@@ -41,11 +41,12 @@ ...@@ -41,11 +41,12 @@
#include "UTIL/MATH/oml.h" #include "UTIL/MATH/oml.h"
#include "otg_tx.h" #include "otg_tx.h"
#include "otg_vars.h" #include "otg_externs.h"
extern unsigned char NB_eNB_INST; extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST; extern unsigned char NB_UE_INST;
// char string for payload gen // char string for payload gen
const char HEADER_STRING[] = "048717272261061594909177115977673656394812939088509638561159848103044447631759621785741859753883189837913087874397230808338408049820398430984093477437879374893649639479575023646394693665969273071047"; const char HEADER_STRING[] = "048717272261061594909177115977673656394812939088509638561159848103044447631759621785741859753883189837913087874397230808338408049820398430984093477437879374893649639479575023646394693665969273071047";
const char PAYLOAD_STRING[] = "UVk5miARQfZGDFKf1wS0dt57kHigd0fXNrUZCjIhpyOS4pZWMHOP1GPdgXmlPtarLUjd3Rmkg05bhUZWtDDmdhrl5EzMZz6DkhIg0Uq7NlaU8ZGrt9EzgVLdr9SiBOLLXiTN3aMInMrlDYFYZ8n5WYbfZTnpz13lbMY4OBE4eWfIMLvBLLyzzzEqjUGILBVMfKGVccPi0VSCyg28RqAiR3z1P6zryk4FWFp0G78AUT1hZWhGcGOTDcKj9bCzny592m1Dj123KWczIm5KVLupO7AP83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6hhcK1Z9wv9jOAAeqopQvbQFm4aQzzBwGIAhBqhZMiarIBwYPOFdPmK1hKHIa94GGtQbMZ0n83IGt6w8K3dqfOhmpQWqSRZscFwPuo4uhC0ByoC9hFpnizCBfoRZ7Gj9cGOzVLT2eMtD0XC8rUnDiR3p7Ke4ho6lWMLHmtCr7VWYIpY19dtiWoyU0FQ7VMlHoWeBhIUfuG54WVVX0h5Mvvvo0cnLQzh4knysVhAfQw9EhXq94mLrI9GydUaTihOvydQikfq2CrvLeNK81msBlYYoK0aT7OewTUI51YYufj7kYGkPVDf7t5n3VnMV3ShMERKwFyTNHQZyo9ccFibYdoT1FyMAfVeMDO89bUMKAD7RFaT9kUZpaIiH5W7dIbPcPPdSBSr1krKPtuQEeHVgf4OcQLfpOWtsEya4ftXpNw76RPCXmp4rjKt1mCh0pBiTYkQ5GDnj2khLZMzb1uua6R1ika8ACglrs1n0vDbnNjZEVpIMK4OGLFOXIOn9UBserI4Pa63PhUl49TGLNjiqQWdnAsolTKrcjnSklN1swcmyVU8B5gTO4Y3vhkG2U2";
......
...@@ -48,8 +48,113 @@ otg_info_t *otg_info; /*!< \brief info otg: measurements about the simulation ...@@ -48,8 +48,113 @@ otg_info_t *otg_info; /*!< \brief info otg: measurements about the simulation
otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */ otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */
otg_forms_info_t *otg_forms_info; otg_forms_info_t *otg_forms_info;
mapping otg_app_type_names[] =
{
{"no_predefined_traffic", 0},
{"m2m", 1},
{"scbr", 2},
{"mcbr", 3},
{"bcbr", 4},
{"auto_pilot", 5},
{"bicycle_race", 6},
{"open_arena", 7},
{"team_fortress", 8},
{"full_buffer", 9},
{"m2m_traffic", 10},
{"auto_pilot_l",11},
{"auto_pilot_m", 12},
{"auto_pilot_h", 13},
{"auto_pilot_e", 14},
{"virtual_game_l", 15},
{"virtual_game_m", 16},
{"virtual_game_h", 17},
{"virtual_game_f", 18},
{"alarm_humidity", 19},
{"alarm_smoke",20},
{"alarm_temperature", 21},
{"openarena_dl", 22},
{"openarena_ul", 23},
{"voip_g711", 24},
{"voip_g729", 25},
{"iqsim_mango", 26},
{"iqsim_newsteo", 27},
{"openarena_dl_tarma", 28},
{"video_vbr_10mbps", 29},
{"video_vbr_4mbps", 30},
{"video_vbr_2mbps", 31},
{"video_vbr_768kbps", 32},
{"video_vbr_384kbps", 33},
{"video_vbr_192kpbs", 34},
{"background_users", 35},
{NULL, -1}
};
mapping otg_transport_protocol_names[] =
{
{"no_proto", 0},
{"udp", 1},
{"tcp", 2},
{NULL, -1}
};
mapping otg_ip_version_names[] =
{
{"no_ip", 0},
{"ipv4", 1},
{"ipv6", 2},
{NULL, -1}
};
mapping otg_multicast_app_type_names[] = {
{"no_predefined_multicast_traffic", 0},
{"mscbr", 1},
{"mmcbr", 2},
{"mbcbr", 3},
{"msvbr", 4},
{"mmvbr", 5},
{"mbvbr", 6},
{"mvideo_vbr_4mbps", 7},
{NULL, -1}
} ;
mapping otg_distribution_names[] =
{
{"no_customized_traffic", 0},
{"uniform", 1},
{"gaussian", 2},
{"exponential", 3},
{"poisson", 4},
{"fixed", 5},
{"weibull", 6},
{"pareto", 7},
{"gamma", 8},
{"cauchy",9},
{"log_normal",10},
{"tarma",11},
{"video",12},
{"background_dist",13},
{NULL, -1}
};
mapping frame_type_names[] =
{
{"TDD", 1},
{"FDD", 0},
{NULL, -1}
};
mapping switch_names[] =
{
{"disable", 0},
{"enable", 1},
{NULL, -1}
};
mapping packet_gen_names[] =
{
{"repeat_string", 0},
{"substract_string", 1},
{"random_position", 2},
{"random_string", 3},
{NULL, -1}
};
//int ptime; /*!< \brief ptime is uses to compute the local simulation time */ //int ptime; /*!< \brief ptime is uses to compute the local simulation time */
#endif #endif
...@@ -120,7 +120,20 @@ eNBs = ...@@ -120,7 +120,20 @@ eNBs =
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.82/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.82/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
/*
otg_config = (
{
ue_id =1;
app_type ="scbr";
bg_traffic ="disable";
},
{
ue_id =2;
app_type ="bcbr";
bg_traffic ="enable";
}
);
*/
log_config : log_config :
{ {
global_log_level ="info"; global_log_level ="info";
......
...@@ -18,6 +18,16 @@ ifeq "$(GCCVERSION)" "4.6.1" ...@@ -18,6 +18,16 @@ ifeq "$(GCCVERSION)" "4.6.1"
CFLAGS += -Wno-packed-bitfield-compat CFLAGS += -Wno-packed-bitfield-compat
endif endif
KERNEL_VERSION=$(shell echo `uname -r | cut -d. -f-2`)
KERNEL_TYPE=$(shell echo `uname -r | cut -d. -f-3 | cut -d- -f3`)
LOWLATENCY_KERNEL=$(shell if [ $(KERNEL_TYPE) = "lowlatency" ]; then echo "1" ; else echo "0" ; fi)
ifdef LOWLATENCY # this ifdef is to be removed after the debugging
ifeq ($(LOWLATENCY_KERNEL),1)
CFLAGS+=-DLOWLATENCY
endif
endif
ifndef USRP ifndef USRP
USRP=0 USRP=0
endif endif
...@@ -115,7 +125,7 @@ OBJ += $(LOG_OBJS) ...@@ -115,7 +125,7 @@ OBJ += $(LOG_OBJS)
ifeq ($(OPENAIR2),1) ifeq ($(OPENAIR2),1)
ASN1_MSG_OBJS1=$(addprefix $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/, $(ASN1_MSG_OBJS)) ASN1_MSG_OBJS1=$(addprefix $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/, $(ASN1_MSG_OBJS))
OBJ += $(L2_OBJS) $(LIST_OBJ) $(TIMER_OBJ) $(MEM_OBJ) $(OTG_OBJS) $(MATH_OBJS) $(OSA_OBJS) OBJ += $(L2_OBJS) $(LIST_OBJ) $(TIMER_OBJ) $(MEM_OBJ) $(OTG_OBJS) $(MATH_OBJS) $(OSA_OBJS) $(OPT_OBJS)
OBJ += $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/netlink_init.o OBJ += $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/netlink_init.o
#OBJ += $(PDCP_DIR)/pdcp_thread.o #OBJ += $(PDCP_DIR)/pdcp_thread.o
CFLAGS += -DOPENAIR2 -DNO_RRM -DPUCCH -DMAC_CONTEXT=1 CFLAGS += -DOPENAIR2 -DNO_RRM -DPUCCH -DMAC_CONTEXT=1
...@@ -404,6 +414,7 @@ show: ...@@ -404,6 +414,7 @@ show:
@echo IS_REL10 is $(IS_REL10) @echo IS_REL10 is $(IS_REL10)
@echo openssl $(OPENSSL_FOUND) @echo openssl $(OPENSSL_FOUND)
@echo nettle $(NETTLE_FOUND) @echo nettle $(NETTLE_FOUND)
@echo lowlatency kernel: $(LOWLATENCY_KERNEL)
beautiful: beautiful:
astyle --style=gnu -s2 $(SRC) astyle --style=gnu -s2 $(SRC)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
[dumpfile] "/tmp/openair_dump_eNB.vcd" [dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Wed Sep 17 09:52:33 2014" [dumpfile_mtime] "Wed Sep 17 09:52:33 2014"
[dumpfile_size] 53042998 [dumpfile_size] 53042998
[savefile] "/homes/knopp/Devel/openair4G/trunk/targets/RT/USER/eNB.gtkw" [savefile] "$OPENAIR_TARGETS/RT/USER/eNB.gtkw"
[timestart] 13048857000 [timestart] 13048857000
[size] 1005 600 [size] 1005 600
[pos] -1 -1 [pos] -1 -1
......
This diff is collapsed.
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
*******************************************************************************/ *******************************************************************************/
/*! \file rt_wrapper.h /*! \file rt_wrapper.h
* \brief provides a wrapper for the timing function for real-time opeartions depending on weather RTAI is used or not * \brief provides a wrapper for the timing function for real-time opeartions depending on weather RTAI is used or not. It also implements an API for the SCHED_DEADLINE kernel scheduler.
* \author F. Kaltenberger * \author F. Kaltenberger and Navid Nikaein
* \date 2013 * \date 2013
* \version 0.1 * \version 0.1
* \company Eurecom * \company Eurecom
* \email: florian.kaltenberger@eurecom.fr * \email: florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
* \note * \note
* \warning * \warning This code will be removed when a legacy libc API becomes available.
*/ */
#ifndef RTAI #ifndef RTAI
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
#include <linux/kernel.h>
#include <linux/types.h>
#define RTIME long long int #define RTIME long long int
...@@ -54,6 +56,51 @@ int rt_sleep_ns (RTIME x); ...@@ -54,6 +56,51 @@ int rt_sleep_ns (RTIME x);
void check_clock(void); void check_clock(void);
/**
* see https://www.kernel.org/doc/Documentation/scheduler/sched-deadline.txt or
* http://www.blaess.fr/christophe/2014/04/05/utiliser-un-appel-systeme-inconnu-de-la-libc/
*/
#ifdef LOWLATENCY
#define gettid() syscall(__NR_gettid)
#define SCHED_DEADLINE 6
/* XXX use the proper syscall numbers */
#ifdef __x86_64__
#define __NR_sched_setattr 314
#define __NR_sched_getattr 315
#endif
#ifdef __i386__
#define __NR_sched_setattr 351
#define __NR_sched_getattr 352
#endif
struct sched_attr {
__u32 size;
__u32 sched_policy;
__u64 sched_flags;
/* SCHED_NORMAL, SCHED_BATCH */
__s32 sched_nice;
/* SCHED_FIFO, SCHED_RR */
__u32 sched_priority;
/* SCHED_DEADLINE (nsec) */
__u64 sched_runtime;
__u64 sched_deadline;
__u64 sched_period;