* 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
This commit is contained in:
Navid Nikaein
2014-11-28 13:54:46 +00:00
parent 0b9c724ab4
commit 91dbe8d6f1
20 changed files with 670 additions and 280 deletions
+54 -3
View File
@@ -43,6 +43,8 @@
#include "log_extern.h"
#include "assertions.h"
#include "enb_config.h"
#include "UTIL/OTG/otg.h"
#include "UTIL/OTG/otg_externs.h"
#if defined(OAI_EMU)
# include "OCG.h"
# include "OCG_extern.h"
@@ -162,6 +164,11 @@
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
#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
#define ENB_CONFIG_STRING_LOG_CONFIG "log_config"
@@ -185,8 +192,6 @@
#define ENB_CONFIG_STRING_UDP_LOG_VERBOSITY "udp_log_verbosity"
#define KHz (1000UL)
#define MHz (1000 * KHz)
@@ -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]);
}
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( "\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));
@@ -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_address = 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 enb_properties_index = 0;
int num_enbs;
int num_mme_address;
int num_otg_elements =0;
int num_component_carriers =0;
int i;
int j;
@@ -523,6 +536,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
char *address = NULL;
char *cidr = 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_verbosity = NULL;
char* hw_log_level = NULL;
@@ -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
subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG);
if(subsetting != NULL) {
+11 -3
View File
@@ -30,9 +30,9 @@
/*
enb_config.h
-------------------
AUTHOR : Lionel GAUTHIER, Laurent Winckel
AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
*/
#ifndef ENB_CONFIG_H_
@@ -42,6 +42,7 @@
#include "commonDef.h"
#include "platform_types.h"
#include "PHY/impl_defs_lte.h"
#include "PHY/impl_defs_top.h"
#include "s1ap_messages_types.h"
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
@@ -181,7 +182,14 @@ typedef struct Enb_properties_s {
char *enb_interface_name_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_verbosity;
int16_t hw_log_level;
+30 -31
View File
@@ -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++) {
/* 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){
tmp_offset = eNB_offset;
}
else
{
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*/) {
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",
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 {
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",
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) {
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", \
ue_mod_idP, frameP, eNB_index,
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[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;
//LOG_D(RRC,"PHY_ID: %d \n",UE_rrc_inst->HandoverInfoUe.targetCellId);
return 1;
}
// else{
// LOG_D(RRC,"Condition does not hold\n");
// }
if(eNB_offset<eNB_index){
tmp_offset = eNB_offset;
}
else {
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*/) {
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",
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 {
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",
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) {
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", \
ue_mod_idP, frameP, eNB_index,
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[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;
//LOG_D(RRC,"PHY_ID: %d \n",UE_rrc_inst->HandoverInfoUe.targetCellId);
return 1;
}
// else{
// LOG_D(RRC,"Condition does not hold\n");
// }
}
}
return 0;
+2 -2
View File
@@ -58,8 +58,8 @@ This header file must be included */
#define project_include
#include "UTIL/LOG/log_if.h"
// #include "UTIL/LOG/log_extern.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
//#include "PHY/defs.h"
//#include "PHY/extern.h"
#include "PHY/impl_defs_lte.h"
#endif
+19 -2
View File
@@ -42,13 +42,30 @@
# define __OTG_EXTERNS_H__
/*!< \brief main log variables */
extern otg_t *g_otg; /*!< \brief global params */
extern otg_multicast_t *g_otg_multicast; /*!< \brief global params */
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_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
+1 -1
View File
@@ -40,7 +40,7 @@
*/
#include "otg_form.h"
#include "otg_vars.h"
#include "otg_externs.h"
#include "otg_kpi.h"
extern unsigned char NB_eNB_INST;
+1 -1
View File
@@ -39,7 +39,7 @@
*/
#include "otg_rx.h"
#include "otg_vars.h"
#include "otg_externs.h"
#include "../UTIL/MATH/oml.h"
#include <math.h>
#include "otg_form.h"
+2 -1
View File
@@ -41,11 +41,12 @@
#include "UTIL/MATH/oml.h"
#include "otg_tx.h"
#include "otg_vars.h"
#include "otg_externs.h"
extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST;
// char string for payload gen
const char HEADER_STRING[] = "048717272261061594909177115977673656394812939088509638561159848103044447631759621785741859753883189837913087874397230808338408049820398430984093477437879374893649639479575023646394693665969273071047";
const char PAYLOAD_STRING[] = "UVk5miARQfZGDFKf1wS0dt57kHigd0fXNrUZCjIhpyOS4pZWMHOP1GPdgXmlPtarLUjd3Rmkg05bhUZWtDDmdhrl5EzMZz6DkhIg0Uq7NlaU8ZGrt9EzgVLdr9SiBOLLXiTN3aMInMrlDYFYZ8n5WYbfZTnpz13lbMY4OBE4eWfIMLvBLLyzzzEqjUGILBVMfKGVccPi0VSCyg28RqAiR3z1P6zryk4FWFp0G78AUT1hZWhGcGOTDcKj9bCzny592m1Dj123KWczIm5KVLupO7AP83flqamimfLz6GtHrz5ZN2BAEVQjUhYSc35s5jDhofIlL2U4qPT3Ilsd7amTjaCl5zE0L89ZeIcPCWKSEuNdH5gG8sojuSvph1hU0gG4QOLhCk15IE8eCeMCz2LTL68U0hEQqeM6UmgmA9j7Eid7oPzQHbzj8A30HzGXGhWpt4CT3MSwWVvcCWSbYjkYGgOhHj5csTsONWyGAh5l3qquf8v3jGRSRu0nGXqYILCkw1SX9Na46qodrN6BnPl49djH2AuAaYKAStoR9oL7I1aZG6rVLFPMIZiAqF1tuDVcX9VWnyTVpTMXR6GtBp5bgfDyKuT4ZE9MDUASikGA5hoMfX5Gf2Ml7eLGBtEqZF4rouczHI0DRfgX4ev967n6dYFFkaXbFTvWdykN5bfMinzcrWeqVrmZhTvtUkvq3Rc9enM9qTNz6cDo0HHM0VD8EYtpaPH3yG2CYGDgogHlkaCcHaOyViyq8RH8wf4WQWoHuTNG1kWdkpgTrWic5Gv5p24O9YAPMOn6A1IsdvwpOF85qj8nPvj4nfIo385HOjGfadzfBXueruaKEa0lvbhLgS1bQWKv5fE7k2cMPzQ8USIpUyBhBGUHsLKaykvsr1qDTueAUWAGH8VqyozZZkyhWahjmFEEwU6hhcK1Z9wv9jOAAeqopQvbQFm4aQzzBwGIAhBqhZMiarIBwYPOFdPmK1hKHIa94GGtQbMZ0n83IGt6w8K3dqfOhmpQWqSRZscFwPuo4uhC0ByoC9hFpnizCBfoRZ7Gj9cGOzVLT2eMtD0XC8rUnDiR3p7Ke4ho6lWMLHmtCr7VWYIpY19dtiWoyU0FQ7VMlHoWeBhIUfuG54WVVX0h5Mvvvo0cnLQzh4knysVhAfQw9EhXq94mLrI9GydUaTihOvydQikfq2CrvLeNK81msBlYYoK0aT7OewTUI51YYufj7kYGkPVDf7t5n3VnMV3ShMERKwFyTNHQZyo9ccFibYdoT1FyMAfVeMDO89bUMKAD7RFaT9kUZpaIiH5W7dIbPcPPdSBSr1krKPtuQEeHVgf4OcQLfpOWtsEya4ftXpNw76RPCXmp4rjKt1mCh0pBiTYkQ5GDnj2khLZMzb1uua6R1ika8ACglrs1n0vDbnNjZEVpIMK4OGLFOXIOn9UBserI4Pa63PhUl49TGLNjiqQWdnAsolTKrcjnSklN1swcmyVU8B5gTO4Y3vhkG2U2";
+105
View File
@@ -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_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 */
#endif