Commit f386d79a authored by laurent's avatar laurent Committed by frtabu

remove some cleanup, in case it made regression

parent 74e8ceaa
......@@ -630,6 +630,7 @@ add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSIO
add_boolean_option(ENABLE_USE_CPU_EXECUTION_TIME True "Add data in vcd traces: disable it if perf issues")
add_boolean_option(ENABLE_VCD True "always true now, time measurements of proc calls and var displays")
add_boolean_option(ENABLE_VCD_FIFO True "time measurements of proc calls and var displays sent to FIFO (one more thread)")
add_boolean_option(LINUX False "used in weird memcpy() in pdcp.c ???")
add_boolean_option(LINUX_LIST False "used only in lists.c: either use OAI implementation of lists or Linux one (should be True, but it is False")
add_boolean_option(OPENAIR_LTE True "Seems legacy: keep it to true")
......
......@@ -177,6 +177,7 @@ Usage (Regular):
NI/ETTUS B201 + OAI ENB : ./build_oai --eNB -x -w USRP"
}
function main() {
......@@ -389,29 +390,43 @@ function main() {
#########################################################
# to be discussed
if [ "$eNB" = "1" ] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_fatal "Define a local radio head (e.g. -w EXMIMO) or a transport protocol (e.g. -t ETHERNET) to communicate with a remote radio head!"
fi
[ "$HW" = "None" ] && echo_info "No radio head has been selected (HW set to $HW)"
[ "$TP" = "None" ] && echo_info "No transport protocol has been selected (TP set to $TP)"
if [ "$eNB" = "1" ] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_fatal "Define a local radio head (e.g. -w EXMIMO) or a transport protocol (e.g. -t ETHERNET) to communicate with a remote radio head!"
fi
if [ "$HW" = "None" ] ; then
echo_info "No radio head has been selected (HW set to $HW)"
fi
if [ "$TP" = "None" ] ; then
echo_info "No transport protocol has been selected (TP set to $TP)"
fi
fi
echo_info "RF HW set to $HW"
#Now we set flags to enable deadline scheduler settings
#By default: USRP: disable,
#By default: BLADERF: enable,
#By default: EXMIMO: enable
if [ "$FORCE_DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
case "$HW" in
"EXMIMO")
DEADLINE_SCHEDULER_FLAG_USER="True"
;;
*)
DEADLINE_SCHEDULER_FLAG_USER="False"
;;
esac
else
#By default: EXMIMO: enable
if [ "$FORCE_DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
if [ "$HW" = "EXMIMO" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="True"
elif [ "$HW" = "ETHERNET" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_USRP" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_BLADERF" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_LMSSDR" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_IRIS" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "None" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
else
echo_error "Unknown HW type $HW. Exiting now..."
exit
fi
else
DEADLINE_SCHEDULER_FLAG_USER=$FORCE_DEADLINE_SCHEDULER_FLAG_USER
fi
......@@ -521,8 +536,9 @@ function main() {
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( UESIM_EXPANSION $UESIM_EXPANSION )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
......@@ -925,6 +941,7 @@ function main() {
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
echo "set (LINUX True )" >> $cmake_file
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
......
......@@ -37,9 +37,29 @@ phy_adjust_gain (PHY_VARS_UE *ue, uint32_t rx_power_fil_dB, uint8_t eNB_id)
// Adjust gain in ue->rx_vars[0].rx_total_gain_dB
if (rx_power_fil_dB < TARGET_RX_POWER - 5) //&& (ue->rx_total_gain_dB < MAX_RF_GAIN) )
ue->rx_total_gain_dB= min( ue->rx_total_gain_dB+5, MAX_RF_GAIN);
ue->rx_total_gain_dB+=5;
else if (rx_power_fil_dB > TARGET_RX_POWER + 5) //&& (ue->rx_total_gain_dB > MIN_RF_GAIN) )
ue->rx_total_gain_dB= max( ue->rx_total_gain_dB-5, MIN_RF_GAIN);
ue->rx_total_gain_dB-=5;
if (ue->rx_total_gain_dB>MAX_RF_GAIN) {
/*
if ((openair_daq_vars.rx_rf_mode==0) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=1;
ue->rx_total_gain_dB = max(MIN_RF_GAIN,MAX_RF_GAIN-25);
}
else {
*/
ue->rx_total_gain_dB = MAX_RF_GAIN;
} else if (ue->rx_total_gain_dB<MIN_RF_GAIN) {
/*
if ((openair_daq_vars.rx_rf_mode==1) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=0;
ue->rx_total_gain_dB = min(MAX_RF_GAIN,MIN_RF_GAIN+25);
}
else {
*/
ue->rx_total_gain_dB = MIN_RF_GAIN;
}
LOG_D(PHY,"Gain control: rx_total_gain_dB = %d (max %d,rxpf %d)\n",ue->rx_total_gain_dB,MAX_RF_GAIN,rx_power_fil_dB);
......
......@@ -39,6 +39,14 @@
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
#endif
#ifdef LARGE_SCALE
# define NB_MODULES_MAX 128
# define NB_NODE_MAX 128
#else
# define NB_MODULES_MAX 32
# define NB_NODE_MAX 32
#endif
#ifdef JUMBO_FRAME
# define MAX_IP_PACKET_SIZE 10000 // 9000
#else
......@@ -51,6 +59,9 @@
# define MAX_IP_PACKET_SIZE 1500 // 3000
# endif
#endif
// overwrite the previous deinitions
# define MAX_MODULES NB_MODULES_MAX
#ifndef UE_EXPANSION
// TODO:L2 FAPI simulator.
......@@ -135,6 +146,8 @@
#define UNUSED_PARAM_MBMS_SESSION_ID 0
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
#define printk printf
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
#endif /* __PLATFORM_CONSTANTS_H__ */
......@@ -62,6 +62,7 @@ extern int otg_enabled;
#include "assertions.h"
#ifdef PDCP_USE_NETLINK
#include <sys/socket.h>
#include <linux/netlink.h>
#include "NETWORK_DRIVER/UE_IP/constant.h"
......@@ -85,6 +86,7 @@ extern uint8_t nfapi_mode;
#ifdef UESIM_EXPANSION
extern uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
#endif
#endif
......
......@@ -263,7 +263,7 @@ void *pdcp_netlink_thread_fct(void *arg)
if (pdcp_netlink_nb_element_enb[module_id]
> PDCP_QUEUE_NB_ELEMENTS) {
LOG_E(PDCP, "[NETLINK_THREAD][Mod %02x] We reached maximum number of elements in eNB pdcp queue (%d)\n",
module_id, pdcp_netlink_nb_element_enb[module_id]);
module_id, pdcp_netlink_nb_element_enb);
}
LOG_I(PDCP,"[NETLINK_THREAD] IP->PDCP : En-queueing packet for eNB module id %d\n", module_id);
......@@ -276,7 +276,7 @@ void *pdcp_netlink_thread_fct(void *arg)
if (pdcp_netlink_nb_element_ue[module_id]
> PDCP_QUEUE_NB_ELEMENTS) {
LOG_E(PDCP, "[NETLINK_THREAD][Mod %02x] We reached maximum number of elements in UE pdcp queue (%d)\n",
module_id, pdcp_netlink_nb_element_ue[module_id]);
module_id, pdcp_netlink_nb_element_ue);
}
LOG_I(PDCP,"[NETLINK_THREAD] IP->PDCP : En-queueing packet for UE module id %d\n", module_id);
......
This diff is collapsed.
......@@ -53,8 +53,10 @@
struct net_device *nasdev[NB_INSTANCES_MAX];
#ifdef PDCP_USE_NETLINK
extern void nas_netlink_release(void);
extern int nas_netlink_init(void);
#endif
//int bytes_wrote;
//int bytes_read;
......
......@@ -184,7 +184,9 @@ extern struct net_device *nasdev[NB_INSTANCES_MAX];
extern uint8_t NAS_NULL_IMEI[14];
//global variables shared with RRC
#ifndef PDCP_USE_NETLINK
extern int pdcp_2_nas_irq;
#endif
//extern uint8_t nas_IMEI[14];
#endif
......@@ -613,7 +613,7 @@ void UL_indication(UL_IND_t *UL_info)
IF_Module_t *IF_Module_init(int Mod_id){
AssertFatal(Mod_id==0,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
AssertFatal(Mod_id<MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
LOG_D(PHY,"Installing callbacks for IF_Module - UL_indication\n");
......@@ -632,7 +632,7 @@ IF_Module_t *IF_Module_init(int Mod_id){
void IF_Module_kill(int Mod_id) {
AssertFatal(Mod_id==0,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
AssertFatal(Mod_id>MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
if (if_inst[Mod_id]!=NULL) free(if_inst[Mod_id]);
}
......@@ -6296,6 +6296,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
//-----------------------------------------------------------------------------
{
int i, drb_id;
#ifdef PDCP_USE_NETLINK
int oip_ifup = 0;
int dest_ip_offset = 0;
/* avoid gcc warnings */
(void)oip_ifup;
(void)dest_ip_offset;
#endif
uint8_t *kRRCenc = NULL;
uint8_t *kRRCint = NULL;
uint8_t *kUPenc = NULL;
......@@ -6424,14 +6431,14 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
LOG_I(OIP, "[eNB %d] trying to bring up the OAI interface oai%d\n",
ctxt_pP->module_id,
ctxt_pP->module_id);
int oip_ifup = nas_config(
oip_ifup = nas_config(
ctxt_pP->module_id, // interface index
ctxtReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA_pP->module_id + 1, // thrid octet
ctxt_pP->module_id + 1); // fourth octet
if (oip_ifup == 0) { // interface is up --> send a config the DRB
module_id_t ue_module_id;
int dest_ip_offset = 8;
dest_ip_offset = 8;
LOG_I(OIP,
"[eNB %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack\n",
ctxt_pP->module_id, ctxt_pP->module_id,
......
......@@ -31,6 +31,7 @@
#ifndef RRC_ENB_S1AP_H_
#define RRC_ENB_S1AP_H_
# if defined(ENABLE_USE_MME)
#include "LTE_UL-DCCH-Message.h"
......@@ -273,4 +274,5 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t* const ctxt_pP,
int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p, const char *msg_name, instance_t instance);
# endif
# endif /* defined(ENABLE_USE_MME) */
#endif /* RRC_ENB_S1AP_H_ */
......@@ -203,6 +203,9 @@ int nas_timer_init(void)
(void) sigdelset (&act.sa_mask, SIGILL);
(void) sigdelset (&act.sa_mask, SIGTRAP);
(void) sigdelset (&act.sa_mask, SIGIOT);
# ifndef LINUX
(void) sigdelset (&act.sa_mask, SIGEMT);
# endif
(void) sigdelset (&act.sa_mask, SIGFPE);
(void) sigdelset (&act.sa_mask, SIGBUS);
(void) sigdelset (&act.sa_mask, SIGSEGV);
......
......@@ -280,6 +280,9 @@ static int _set_signal_handler(int signal, void (handler)(int))
(void) sigdelset (&act.sa_mask, SIGILL);
(void) sigdelset (&act.sa_mask, SIGTRAP);
(void) sigdelset (&act.sa_mask, SIGIOT);
#ifndef LINUX
(void) sigdelset (&act.sa_mask, SIGEMT);
#endif
(void) sigdelset (&act.sa_mask, SIGFPE);
(void) sigdelset (&act.sa_mask, SIGBUS);
(void) sigdelset (&act.sa_mask, SIGSEGV);
......
......@@ -353,6 +353,9 @@ static int _set_signal_handler(int signal, void (handler)(int))
(void) sigdelset (&act.sa_mask, SIGILL);
(void) sigdelset (&act.sa_mask, SIGTRAP);
(void) sigdelset (&act.sa_mask, SIGIOT);
#ifndef LINUX
(void) sigdelset (&act.sa_mask, SIGEMT);
#endif
(void) sigdelset (&act.sa_mask, SIGFPE);
(void) sigdelset (&act.sa_mask, SIGBUS);
(void) sigdelset (&act.sa_mask, SIGSEGV);
......
......@@ -258,6 +258,9 @@ static int _set_signal_handler(int signal, void (handler)(int))
(void) sigdelset (&act.sa_mask, SIGILL);
(void) sigdelset (&act.sa_mask, SIGTRAP);
(void) sigdelset (&act.sa_mask, SIGIOT);
#ifndef LINUX
(void) sigdelset (&act.sa_mask, SIGEMT);
#endif
(void) sigdelset (&act.sa_mask, SIGFPE);
(void) sigdelset (&act.sa_mask, SIGBUS);
(void) sigdelset (&act.sa_mask, SIGSEGV);
......
......@@ -348,6 +348,9 @@ static int _nas_set_signal_handler(int signal, void (handler)(int))
(void) sigdelset (&act.sa_mask, SIGILL);
(void) sigdelset (&act.sa_mask, SIGTRAP);
(void) sigdelset (&act.sa_mask, SIGIOT);
#ifndef LINUX
(void) sigdelset (&act.sa_mask, SIGEMT);
#endif
(void) sigdelset (&act.sa_mask, SIGFPE);
(void) sigdelset (&act.sa_mask, SIGBUS);
(void) sigdelset (&act.sa_mask, SIGSEGV);
......
......@@ -100,9 +100,9 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
char *libname;
if (flag == RAU_LOCAL_RADIO_HEAD) {
if (getenv("RFSIMULATOR") != NULL)
libname="rfsimulator";
libname="rfsimulator";
else
libname=OAI_RF_LIBNAME;
libname=OAI_RF_LIBNAME;
shlib_fdesc[0].fname="device_init";
} else {
libname=OAI_TP_LIBNAME;
......
......@@ -1293,9 +1293,8 @@ extern "C" {
samples/=10000;
LOG_I(PHY,"RF board max packet size %u, size for 100µs jitter %d \n", max, samples);
if ( samples < max ) {
if ( samples < max )
stream_args_rx.args["spp"] = str(boost::format("%d") % samples );
}
LOG_I(PHY,"rx_max_num_samps %zu\n",
s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps());
......
#ifndef OPENAIRINTERFACE5G_LIMITS_H_
#define OPENAIRINTERFACE5G_LIMITS_H_
#include <platform_constants.h>
#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_ENB
#define NUMBER_OF_CONNECTED_eNB_MAX MAX_MANAGED_ENB_PER_MOBILE
#define NUMBER_OF_eNB_MAX MAX_eNB
#if defined(MANAGED_RF)
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR)
# define NUMBER_OF_eNB_MAX 1
# define NUMBER_OF_RU_MAX 2
# ifndef UE_EXPANSION
// TODO:L2 FAPI simulator.
// UESIM_EXPANSION is used to be same value of NUMBER_OF_UE_MAX
// in eNB and UE.
// now , if we use --mu option in UE, compiling error will occur.
// This problem will be fixed in the future.
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
#else
# define NUMBER_OF_eNB_MAX 7
# define NUMBER_OF_RU_MAX 32
# ifndef UE_EXPANSION
/* if the value of MAX_MOBILES_PER_ENB and NUMBER_OF_UE_MAX is different,
eNB process will exit because unexpected access happens.
Now some parts are using NUMBER_OF_UE_MAX
and the other are using MAX_MOBILES_PER_ENB in for-loop.
*/
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# if defined(STANDALONE) && STANDALONE==1
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_UE_MAX
# undef NUMBER_OF_RU_MAX
# define NUMBER_OF_eNB_MAX 3
# define NUMBER_OF_UE_MAX 3
# define NUMBER_OF_RU_MAX 3
# endif
# if defined(LARGE_SCALE) && LARGE_SCALE
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_UE_MAX
# undef NUMBER_OF_CONNECTED_eNB_MAX
# undef NUMBER_OF_RU_MAX
# define NUMBER_OF_eNB_MAX 2
# define NUMBER_OF_UE_MAX 120
# define NUMBER_OF_RU_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
# endif
#endif
......
......@@ -83,7 +83,9 @@
#if defined(ENABLE_ITTI)
#if defined(ENABLE_USE_MME)
#include "s1ap_eNB.h"
#ifdef PDCP_USE_NETLINK
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#endif
#endif
#endif
......
......@@ -99,7 +99,9 @@ static int DEFENBS[] = {0};
#if defined(ENABLE_ITTI)
# if defined(ENABLE_USE_MME)
# include "s1ap_eNB.h"
#ifdef PDCP_USE_NETLINK
# include "SIMULATION/ETH_TRANSPORT/proto.h"
#endif
# endif
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment