Commit 30b7c973 authored by frtabu's avatar frtabu

merge nfapi_cleanup

parent cc4aeb6a
...@@ -664,12 +664,7 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w ...@@ -664,12 +664,7 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE") add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE") add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
############################################################################# ########################
# Flag for UE compilation to avoid issues in common eNB/UE PDCP/RLC functions
#############################################################################
add_boolean_option(UETARGET False "set UE as target for compiler")
# Include order # Include order
########################## ##########################
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" ) add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" )
...@@ -2292,6 +2287,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr ...@@ -2292,6 +2287,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
${T_SOURCE} ${T_SOURCE}
${CONFIG_SOURCES} ${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES} ${SHLIB_LOADER_SOURCES}
${NFAPI_USER_DIR}/nfapi.c
) )
target_link_libraries (${myExe} target_link_libraries (${myExe}
......
...@@ -70,7 +70,6 @@ DISABLE_LOG_X="False" ...@@ -70,7 +70,6 @@ DISABLE_LOG_X="False"
USRP_REC_PLAY="False" USRP_REC_PLAY="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
UE_NAS_USE_TUN="False" UE_NAS_USE_TUN="False"
UETARGET="False"
BASIC_SIMULATOR=0 BASIC_SIMULATOR=0
trap handle_ctrl_c INT trap handle_ctrl_c INT
...@@ -219,7 +218,6 @@ function main() { ...@@ -219,7 +218,6 @@ function main() {
shift;; shift;;
--UE) --UE)
UE=1 UE=1
UETARGET="True"
echo_info "Will compile UE" echo_info "Will compile UE"
shift;; shift;;
--mu) --mu)
...@@ -549,9 +547,6 @@ function main() { ...@@ -549,9 +547,6 @@ function main() {
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
if [ "$UE" = 1 ] ; then
echo "set (UETARGET $UETARGET )" >> $cmake_file
fi
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
echo_info "Compiling UE S1 build : enabling Linux and NETLINK" echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
echo "set (LINUX True )" >> $cmake_file echo "set (LINUX True )" >> $cmake_file
...@@ -945,7 +940,6 @@ function main() { ...@@ -945,7 +940,6 @@ function main() {
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
echo "set (LINUX True )" >> $cmake_file echo "set (LINUX True )" >> $cmake_file
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
echo "set (UETARGET True )" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
# echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file # echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
......
...@@ -21,31 +21,55 @@ ...@@ -21,31 +21,55 @@
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LOG/log.h"
static char nfapi_str_mode[6][24] = {"MONOLITHIC","PNF","VNF","UE_STUB_PNF","UE_STUB_OFFNET","<UNKNOWN NFAPI MODE>"};
void set_thread_priority(int priority) typedef struct {
{ nfapi_mode_t nfapi_mode;
//printf("%s(priority:%d)\n", __FUNCTION__, priority); } nfapi_params_t;
pthread_attr_t ptAttr; static nfapi_params_t nfapi_params;
void set_thread_priority(int priority) {
//printf("%s(priority:%d)\n", __FUNCTION__, priority);
pthread_attr_t ptAttr;
struct sched_param schedParam; struct sched_param schedParam;
schedParam.__sched_priority = priority; //79; schedParam.__sched_priority = priority; //79;
if(sched_setscheduler(0, SCHED_RR, &schedParam) != 0)
{ if(sched_setscheduler(0, SCHED_RR, &schedParam) != 0) {
printf("Failed to set scheduler to SCHED_RR\n"); printf("Failed to set scheduler to SCHED_RR\n");
} }
if(pthread_attr_setschedpolicy(&ptAttr, SCHED_RR) != 0) if(pthread_attr_setschedpolicy(&ptAttr, SCHED_RR) != 0) {
{
printf("Failed to set pthread sched policy SCHED_RR\n"); printf("Failed to set pthread sched policy SCHED_RR\n");
} }
pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED); pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED);
struct sched_param thread_params; struct sched_param thread_params;
thread_params.sched_priority = 20; thread_params.sched_priority = 20;
if(pthread_attr_setschedparam(&ptAttr, &thread_params) != 0)
{ if(pthread_attr_setschedparam(&ptAttr, &thread_params) != 0) {
printf("failed to set sched param\n"); printf("failed to set sched param\n");
} }
} }
char *nfapi_get_strmode(void) {
if (nfapi_params.nfapi_mode > NFAPI_MODE_UNKNOWN)
return nfapi_str_mode[NFAPI_MODE_UNKNOWN];
return nfapi_str_mode[nfapi_params.nfapi_mode];
}
void nfapi_logmode() {
LOG_I(ENB_APP,"nfapi running mode: %s\n",nfapi_get_strmode());
}
nfapi_mode_t nfapi_getmode(void) {
return nfapi_params.nfapi_mode;
}
void nfapi_setmode(nfapi_mode_t nfapi_mode) {
nfapi_params.nfapi_mode = nfapi_mode;
nfapi_logmode();
}
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <unistd.h> #include <unistd.h>
#include "debug.h" #include "debug.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "nfapi_pnf_interface.h" #include "nfapi_pnf_interface.h"
#include "nfapi.h" #include "nfapi.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
...@@ -76,7 +77,7 @@ extern void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame, int subfra ...@@ -76,7 +77,7 @@ extern void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame, int subfra
extern void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, L1_rxtx_proc_t *proc, nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu); extern void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, L1_rxtx_proc_t *proc, nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
extern void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu, uint8_t *sdu); extern void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu, uint8_t *sdu);
extern uint8_t nfapi_mode;
nfapi_tx_request_pdu_t *tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus] nfapi_tx_request_pdu_t *tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus]
...@@ -485,7 +486,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap ...@@ -485,7 +486,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
// to keep only the necessary just to keep the nfapi FSM rolling by sending a dummy response. // to keep only the necessary just to keep the nfapi FSM rolling by sending a dummy response.
LTE_DL_FRAME_PARMS *fp; LTE_DL_FRAME_PARMS *fp;
if (nfapi_mode!=3) { if (NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
fp = &eNB->frame_parms; fp = &eNB->frame_parms;
} else { } else {
...@@ -647,7 +648,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap ...@@ -647,7 +648,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
num_tlv++; num_tlv++;
} }
if(nfapi_mode!=3) { if(NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
printf("[PNF] CONFIG_REQUEST[num_tlv:%d] TLVs processed:%d\n", req->num_tlv, num_tlv); printf("[PNF] CONFIG_REQUEST[num_tlv:%d] TLVs processed:%d\n", req->num_tlv, num_tlv);
printf("[PNF] Simulating PHY CONFIG - DJP\n"); printf("[PNF] Simulating PHY CONFIG - DJP\n");
PHY_Config_t phy_config; PHY_Config_t phy_config;
...@@ -672,7 +673,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap ...@@ -672,7 +673,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
nfapi_pnf_config_resp(config, &nfapi_resp); nfapi_pnf_config_resp(config, &nfapi_resp);
printf("[PNF] Sent NFAPI_CONFIG_RESPONSE phy_id:%d\n", phy_info->id); printf("[PNF] Sent NFAPI_CONFIG_RESPONSE phy_id:%d\n", phy_info->id);
if(nfapi_mode ==3) if(NFAPI_MODE==NFAPI_UE_STUB_PNF)
free(fp); free(fp);
return 0; return 0;
...@@ -1023,7 +1024,7 @@ int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi ...@@ -1023,7 +1024,7 @@ int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi
p7_config->tx_req = &pnf_phy_tx_req; p7_config->tx_req = &pnf_phy_tx_req;
p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req; p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req;
if (nfapi_mode==3) { if (NFAPI_MODE==NFAPI_UE_STUB_PNF) {
p7_config->dl_config_req = &memcpy_dl_config_req; p7_config->dl_config_req = &memcpy_dl_config_req;
p7_config->ul_config_req = &memcpy_ul_config_req; p7_config->ul_config_req = &memcpy_ul_config_req;
p7_config->hi_dci0_req = &memcpy_hi_dci0_req; p7_config->hi_dci0_req = &memcpy_hi_dci0_req;
...@@ -1080,7 +1081,7 @@ int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi ...@@ -1080,7 +1081,7 @@ int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi
//phy_init_RU(RC.ru[0]); //phy_init_RU(RC.ru[0]);
printf("[PNF] About to call init_eNB_afterRU()\n"); printf("[PNF] About to call init_eNB_afterRU()\n");
if (nfapi_mode != 3) { if (NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
init_eNB_afterRU(); init_eNB_afterRU();
} }
...@@ -1364,8 +1365,8 @@ void *pnf_start_thread(void *ptr) { ...@@ -1364,8 +1365,8 @@ void *pnf_start_thread(void *ptr) {
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {
printf("%s() PNF\n\n\n\n\n\n", __FUNCTION__); printf("%s() PNF\n\n\n\n\n\n", __FUNCTION__);
if(nfapi_mode!=3) { if(NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
nfapi_mode = 1; // PNF! nfapi_setmode(NFAPI_PNF); // PNF!
} }
nfapi_pnf_config_t *config = nfapi_pnf_config_create(); nfapi_pnf_config_t *config = nfapi_pnf_config_create();
......
...@@ -904,10 +904,10 @@ void vnf_start_thread(void *ptr) { ...@@ -904,10 +904,10 @@ void vnf_start_thread(void *ptr) {
} }
static vnf_info vnf; static vnf_info vnf;
extern uint8_t nfapi_mode;
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) {
nfapi_mode = 2; nfapi_setmode(NFAPI_MODE_VNF);
memset(&vnf, 0, sizeof(vnf)); memset(&vnf, 0, sizeof(vnf));
memset(vnf.p7_vnfs, 0, sizeof(vnf.p7_vnfs)); memset(vnf.p7_vnfs, 0, sizeof(vnf.p7_vnfs));
vnf.p7_vnfs[0].timing_window = 32; vnf.p7_vnfs[0].timing_window = 32;
......
...@@ -64,4 +64,18 @@ typedef struct { ...@@ -64,4 +64,18 @@ typedef struct {
#define VENDOR_EXT_TLV_2_TAG 0xF002 #define VENDOR_EXT_TLV_2_TAG 0xF002
typedef enum {
NFAPI_MONOLITHIC=0,
NFAPI_MODE_PNF,
NFAPI_MODE_VNF,
NFAPI_UE_STUB_PNF,
NFAPI_UE_STUB_OFFNET,
NFAPI_MODE_UNKNOWN
} nfapi_mode_t;
char *nfapi_get_strmode(void);
void nfapi_logmode(void);
nfapi_mode_t nfapi_getmode(void);
void nfapi_setmode(nfapi_mode_t nfapi_mode);
#define NFAPI_MODE (nfapi_getmode())
#endif // _VENDOR_EXT_ #endif // _VENDOR_EXT_
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "fapi_l1.h" #include "fapi_l1.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
...@@ -46,10 +47,9 @@ ...@@ -46,10 +47,9 @@
#include <time.h> #include <time.h>
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
# include "intertask_interface.h" #include "intertask_interface.h"
#endif #endif
extern uint32_t nfapi_mode;
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
...@@ -62,16 +62,15 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -62,16 +62,15 @@ void prach_procedures(PHY_VARS_eNB *eNB
uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4]; uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4];
uint16_t i; uint16_t i;
int frame,subframe; int frame,subframe;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag==1) { if (br_flag==1) {
subframe = eNB->proc.subframe_prach_br; subframe = eNB->proc.subframe_prach_br;
frame = eNB->proc.frame_prach_br; frame = eNB->proc.frame_prach_br;
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles=0; eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles=0;
pthread_mutex_unlock(&eNB->UL_INFO_mutex); pthread_mutex_unlock(&eNB->UL_INFO_mutex);
} } else
else
#endif #endif
{ {
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
...@@ -80,24 +79,23 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -80,24 +79,23 @@ void prach_procedures(PHY_VARS_eNB *eNB
subframe = eNB->proc.subframe_prach; subframe = eNB->proc.subframe_prach;
frame = eNB->proc.frame_prach; frame = eNB->proc.frame_prach;
} }
RU_t *ru; RU_t *ru;
int aa=0; int aa=0;
int ru_aa; int ru_aa;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1);
for (i=0; i<eNB->num_RU; i++) {
for (i=0;i<eNB->num_RU;i++) {
ru=eNB->RU_list[i]; ru=eNB->RU_list[i];
for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) {
for (ru_aa=0,aa=0; ru_aa<ru->nb_rx; ru_aa++,aa++) {
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa]; eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int ce_level; int ce_level;
if (br_flag==1) if (br_flag==1)
for (ce_level=0;ce_level<4;ce_level++) eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[i]->prach_rxsigF_br[ce_level][ru_aa]; for (ce_level=0; ce_level<4; ce_level++) eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[i]->prach_rxsigF_br[ce_level][ru_aa];
#endif #endif
} }
} }
...@@ -114,20 +112,17 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -114,20 +112,17 @@ void prach_procedures(PHY_VARS_eNB *eNB
,br_flag ,br_flag
#endif #endif
); );
LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : BR %d Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n", LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : BR %d Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n",
frame,subframe,br_flag, frame,subframe,br_flag,
max_preamble[0], max_preamble[0],
max_preamble_energy[0]/10, max_preamble_energy[0]/10,
max_preamble_delay[0], max_preamble_delay[0],
eNB->prach_energy_counter); eNB->prach_energy_counter);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag==1) { if (br_flag==1) {
int prach_mask; int prach_mask;
prach_mask = is_prach_subframe (&eNB->frame_parms, eNB->proc.frame_prach_br, eNB->proc.subframe_prach_br); prach_mask = is_prach_subframe (&eNB->frame_parms, eNB->proc.frame_prach_br, eNB->proc.subframe_prach_br);
eNB->UL_INFO.rach_ind_br.rach_indication_body.preamble_list = eNB->preamble_list_br; eNB->UL_INFO.rach_ind_br.rach_indication_body.preamble_list = eNB->preamble_list_br;
int ind = 0; int ind = 0;
int ce_level = 0; int ce_level = 0;
...@@ -144,7 +139,6 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -144,7 +139,6 @@ void prach_procedures(PHY_VARS_eNB *eNB
if (eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) { if (eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) {
if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + eNB->prach_DTX_threshold_emtc[0])) { if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + eNB->prach_DTX_threshold_emtc[0])) {
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles++; eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles++;
eNB->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[ind]; // eNB->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[ind]; //
eNB->preamble_list_br[ind].preamble_rel8.preamble = max_preamble[ind]; eNB->preamble_list_br[ind].preamble_rel8.preamble = max_preamble[ind];
// note: fid is implicitly 0 here, this is the rule for eMTC RA-RNTI from 36.321, Section 5.1.4 // note: fid is implicitly 0 here, this is the rule for eMTC RA-RNTI from 36.321, Section 5.1.4
...@@ -159,18 +153,16 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -159,18 +153,16 @@ void prach_procedures(PHY_VARS_eNB *eNB
eNB->preamble_list_br[ind].preamble_rel8.preamble, eNB->preamble_list_br[ind].preamble_rel8.rnti, eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type); eNB->preamble_list_br[ind].preamble_rel8.preamble, eNB->preamble_list_br[ind].preamble_rel8.rnti, eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type);
} }
} }
/* /*
ind++; ind++;
} }
} */// ce_level } */// ce_level
} } else
else
#endif #endif
{ {
if ((eNB->prach_energy_counter == 100) && if ((eNB->prach_energy_counter == 100) &&
(max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) { (max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
eNB->Mod_id, eNB->Mod_id,
eNB->CC_id, eNB->CC_id,
...@@ -180,18 +172,14 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -180,18 +172,14 @@ void prach_procedures(PHY_VARS_eNB *eNB
max_preamble_energy[0]/10, max_preamble_energy[0]/10,
max_preamble_energy[0]%10, max_preamble_energy[0]%10,
max_preamble_delay[0]); max_preamble_delay[0]);
T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe),
T_INT(max_preamble[0]), T_INT(max_preamble_energy[0]), T_INT(max_preamble_delay[0])); T_INT(max_preamble[0]), T_INT(max_preamble_energy[0]), T_INT(max_preamble_delay[0]));
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles = 1; eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles = 1;
eNB->UL_INFO.rach_ind.rach_indication_body.preamble_list = &eNB->preamble_list[0]; eNB->UL_INFO.rach_ind.rach_indication_body.preamble_list = &eNB->preamble_list[0];
eNB->UL_INFO.rach_ind.rach_indication_body.tl.tag = NFAPI_RACH_INDICATION_BODY_TAG; eNB->UL_INFO.rach_ind.rach_indication_body.tl.tag = NFAPI_RACH_INDICATION_BODY_TAG;
eNB->UL_INFO.rach_ind.header.message_id = NFAPI_RACH_INDICATION; eNB->UL_INFO.rach_ind.header.message_id = NFAPI_RACH_INDICATION;
eNB->UL_INFO.rach_ind.sfn_sf = frame<<4 | subframe; eNB->UL_INFO.rach_ind.sfn_sf = frame<<4 | subframe;
eNB->preamble_list[0].preamble_rel8.tl.tag = NFAPI_PREAMBLE_REL8_TAG; eNB->preamble_list[0].preamble_rel8.tl.tag = NFAPI_PREAMBLE_REL8_TAG;
eNB->preamble_list[0].preamble_rel8.timing_advance = max_preamble_delay[0]; eNB->preamble_list[0].preamble_rel8.timing_advance = max_preamble_delay[0];
eNB->preamble_list[0].preamble_rel8.preamble = max_preamble[0]; eNB->preamble_list[0].preamble_rel8.preamble = max_preamble[0];
...@@ -199,26 +187,24 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -199,26 +187,24 @@ void prach_procedures(PHY_VARS_eNB *eNB
eNB->preamble_list[0].preamble_rel13.rach_resource_type = 0; eNB->preamble_list[0].preamble_rel13.rach_resource_type = 0;
eNB->preamble_list[0].instance_length = 0; //don't know exactly what this is eNB->preamble_list[0].instance_length = 0; //don't know exactly what this is
if (nfapi_mode == 1) { // If NFAPI PNF then we need to send the message to the VNF if (NFAPI_MODE==NFAPI_MODE_PNF) { // If NFAPI PNF then we need to send the message to the VNF
LOG_D(PHY,"Filling NFAPI indication for RACH : SFN_SF:%d TA %d, Preamble %d, rnti %x, rach_resource_type %d\n", LOG_D(PHY,"Filling NFAPI indication for RACH : SFN_SF:%d TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf), NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf),
eNB->preamble_list[0].preamble_rel8.timing_advance, eNB->preamble_list[0].preamble_rel8.timing_advance,
eNB->preamble_list[0].preamble_rel8.preamble, eNB->preamble_list[0].preamble_rel8.preamble,
eNB->preamble_list[0].preamble_rel8.rnti, eNB->preamble_list[0].preamble_rel8.rnti,
eNB->preamble_list[0].preamble_rel13.rach_resource_type); eNB->preamble_list[0].preamble_rel13.rach_resource_type);
oai_nfapi_rach_ind(&eNB->UL_INFO.rach_ind); oai_nfapi_rach_ind(&eNB->UL_INFO.rach_ind);
eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles = 0; eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles = 0;
} }
pthread_mutex_unlock(&eNB->UL_INFO_mutex); pthread_mutex_unlock(&eNB->UL_INFO_mutex);
} // max_preamble_energy > prach_I0 + 100 } // max_preamble_energy > prach_I0 + 100
else { else {
eNB->measurements.prach_I0 = ((eNB->measurements.prach_I0*900)>>10) + ((max_preamble_energy[0]*124)>>10); eNB->measurements.prach_I0 = ((eNB->measurements.prach_I0*900)>>10) + ((max_preamble_energy[0]*124)>>10);
if (frame==0) LOG_I(PHY,"prach_I0 = %d.%d dB\n",eNB->measurements.prach_I0/10,eNB->measurements.prach_I0%10); if (frame==0) LOG_I(PHY,"prach_I0 = %d.%d dB\n",eNB->measurements.prach_I0/10,eNB->measurements.prach_I0%10);
if (eNB->prach_energy_counter < 100) eNB->prach_energy_counter++; if (eNB->prach_energy_counter < 100) eNB->prach_energy_counter++;
} }
} // else br_flag } // else br_flag
......
...@@ -36,12 +36,10 @@ ...@@ -36,12 +36,10 @@
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.h" #include "PHY/phy_extern_ue.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "nfapi/oai_integration/vendor_ext.h"
extern uint8_t nfapi_mode;
int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_pid)
{
int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_pid) {
uint32_t Nre = 2*ue->ulsch[eNB_id]->harq_processes[harq_pid]->Nsymb_initial * uint32_t Nre = 2*ue->ulsch[eNB_id]->harq_processes[harq_pid]->Nsymb_initial *
ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb*12; ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb*12;
...@@ -51,7 +49,6 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p ...@@ -51,7 +49,6 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p
uint32_t MPR_x100 = 100*ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS/Nre; uint32_t MPR_x100 = 100*ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS/Nre;
// Note: MPR=is the effective spectral efficiency of the PUSCH // Note: MPR=is the effective spectral efficiency of the PUSCH
// FK 20140908 sumKr is only set after the ulsch_encoding // FK 20140908 sumKr is only set after the ulsch_encoding
uint16_t beta_offset_pusch = (ue->ulsch[eNB_id]->harq_processes[harq_pid]->control_only == 1) ? uint16_t beta_offset_pusch = (ue->ulsch[eNB_id]->harq_processes[harq_pid]->control_only == 1) ?
ue->ulsch[eNB_id]->beta_offset_cqi_times8:8; ue->ulsch[eNB_id]->beta_offset_cqi_times8:8;
...@@ -67,34 +64,24 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p ...@@ -67,34 +64,24 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p
uint8_t alpha_lut[8] = {0,40,50,60,70,80,90,100}; uint8_t alpha_lut[8] = {0,40,50,60,70,80,90,100};
void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag) void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag) {
{
uint8_t harq_pid = subframe2harq_pid(&ue->frame_parms, uint8_t harq_pid = subframe2harq_pid(&ue->frame_parms,
proc->frame_tx, proc->frame_tx,
proc->subframe_tx); proc->subframe_tx);
uint8_t nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb; uint8_t nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb;
int16_t PL; int16_t PL;
// P_pusch = 10*log10(nb_rb + P_opusch(j)+ alpha(u)*PL + delta_TF(i) + f(i)) // P_pusch = 10*log10(nb_rb + P_opusch(j)+ alpha(u)*PL + delta_TF(i) + f(i))
// //
// P_opusch(0) = P_oPTR + deltaP_Msg3 if PUSCH is transporting Msg3 // P_opusch(0) = P_oPTR + deltaP_Msg3 if PUSCH is transporting Msg3
// else // else
// P_opusch(0) = PO_NOMINAL_PUSCH(j) + P_O_UE_PUSCH(j) // P_opusch(0) = PO_NOMINAL_PUSCH(j) + P_O_UE_PUSCH(j)
PL = get_PL(ue->Mod_id,ue->CC_id,eNB_id); PL = get_PL(ue->Mod_id,ue->CC_id,eNB_id);
ue->ulsch[eNB_id]->Po_PUSCH = (hundred_times_log10_NPRB[nb_rb-1]+ ue->ulsch[eNB_id]->Po_PUSCH = (hundred_times_log10_NPRB[nb_rb-1]+
get_hundred_times_delta_IF(ue,eNB_id,harq_pid) + get_hundred_times_delta_IF(ue,eNB_id,harq_pid) +
100*ue->ulsch[eNB_id]->f_pusch)/100; 100*ue->ulsch[eNB_id]->f_pusch)/100;
if(ue->ulsch_Msg3_active[eNB_id] == 1) { // Msg3 PUSCH if(ue->ulsch_Msg3_active[eNB_id] == 1) { // Msg3 PUSCH
ue->ulsch[eNB_id]->Po_PUSCH += (get_Po_NOMINAL_PUSCH(ue->Mod_id,0) + PL); ue->ulsch[eNB_id]->Po_PUSCH += (get_Po_NOMINAL_PUSCH(ue->Mod_id,0) + PL);
LOG_I(PHY,"[UE %d][RAPROC] frame %d, subframe %d: Msg3 Po_PUSCH %d dBm (%d,%d,100*PL=%d,%d,%d)\n", LOG_I(PHY,"[UE %d][RAPROC] frame %d, subframe %d: Msg3 Po_PUSCH %d dBm (%d,%d,100*PL=%d,%d,%d)\n",
ue->Mod_id,proc->frame_tx,proc->subframe_tx,ue->ulsch[eNB_id]->Po_PUSCH, ue->Mod_id,proc->frame_tx,proc->subframe_tx,ue->ulsch[eNB_id]->Po_PUSCH,
100*get_Po_NOMINAL_PUSCH(ue->Mod_id,0), 100*get_Po_NOMINAL_PUSCH(ue->Mod_id,0),
...@@ -104,7 +91,6 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_ ...@@ -104,7 +91,6 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
100*ue->ulsch[eNB_id]->f_pusch); 100*ue->ulsch[eNB_id]->f_pusch);
} else if (j==0) { // SPS PUSCH } else if (j==0) { // SPS PUSCH
} else if (j==1) { // Normal PUSCH } else if (j==1) { // Normal PUSCH
ue->ulsch[eNB_id]->Po_PUSCH += ((alpha_lut[ue->frame_parms.ul_power_control_config_common.alpha]*PL)/100); ue->ulsch[eNB_id]->Po_PUSCH += ((alpha_lut[ue->frame_parms.ul_power_control_config_common.alpha]*PL)/100);
ue->ulsch[eNB_id]->Po_PUSCH += ue->frame_parms.ul_power_control_config_common.p0_NominalPUSCH; ue->ulsch[eNB_id]->Po_PUSCH += ue->frame_parms.ul_power_control_config_common.p0_NominalPUSCH;
ue->ulsch[eNB_id]->PHR = ue->tx_power_max_dBm-ue->ulsch[eNB_id]->Po_PUSCH; ue->ulsch[eNB_id]->PHR = ue->tx_power_max_dBm-ue->ulsch[eNB_id]->Po_PUSCH;
...@@ -126,13 +112,11 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_ ...@@ -126,13 +112,11 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
get_hundred_times_delta_IF(ue,eNB_id,harq_pid)/100.0, get_hundred_times_delta_IF(ue,eNB_id,harq_pid)/100.0,
ue->ulsch[eNB_id]->f_pusch); ue->ulsch[eNB_id]->f_pusch);
} }
} }
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index) int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index) {
{ if(NFAPI_MODE!=NFAPI_UE_STUB_PNF)
if(nfapi_mode!=3)
return PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->PHR; return PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->PHR;
else else
return 40; // For nfapi_mode=3 consider ideal conditions return 40; // l1l2 simulator => ideal conditions
} }
...@@ -92,11 +92,11 @@ static int tun_alloc(char *dev) { ...@@ -92,11 +92,11 @@ static int tun_alloc(char *dev) {
return fd; return fd;
} }
int netlink_init_tun(char *ifprefix) { int netlink_init_tun(char *ifprefix, int num_if) {
int ret; int ret;
char ifname[64]; char ifname[64];
for (int i = 0; i < NUMBER_OF_UE_MAX; i++) { for (int i = 0; i < num_if; i++) {
sprintf(ifname, "oaitun_%.3s%d",ifprefix,i+1); sprintf(ifname, "oaitun_%.3s%d",ifprefix,i+1);
nas_sock_fd[i] = tun_alloc(ifname); nas_sock_fd[i] = tun_alloc(ifname);
......
...@@ -62,6 +62,6 @@ int multicast_link_read_data_from_sock(uint8_t eNB_flag); ...@@ -62,6 +62,6 @@ int multicast_link_read_data_from_sock(uint8_t eNB_flag);
void clear_eNB_transport_info(uint8_t); void clear_eNB_transport_info(uint8_t);
void clear_UE_transport_info(uint8_t); void clear_UE_transport_info(uint8_t);
int netlink_init(void); int netlink_init(void);
int netlink_init_tun(char *ifsuffix); int netlink_init_tun(char *ifsuffix, int num_if);
#endif /* EMU_PROTO_H_ */ #endif /* EMU_PROTO_H_ */
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#include "SCHED_UE/sched_UE.h" #include "SCHED_UE/sched_UE.h"
#include "common/config/config_load_configmodule.h" #include "common/config/config_load_configmodule.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
#include "nfapi/oai_integration/vendor_ext.h"
void feptx_ofdm(RU_t *ru); void feptx_ofdm(RU_t *ru);
void feptx_prec(RU_t *ru); void feptx_prec(RU_t *ru);
...@@ -471,7 +471,7 @@ int n_users = 1; ...@@ -471,7 +471,7 @@ int n_users = 1;
int subframe=7; int subframe=7;
int num_common_dci=0,num_ue_spec_dci=0,num_dci=0,num_pdcch_symbols=1; int num_common_dci=0,num_ue_spec_dci=0,num_dci=0,num_pdcch_symbols=1;
uint16_t n_rnti=0x1234; uint16_t n_rnti=0x1234;
int nfapi_mode=0;
int abstx=0; int abstx=0;
int Nid_cell=0; int Nid_cell=0;
int N_RB_DL=25; int N_RB_DL=25;
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
#include "PHY/TOOLS/lte_phy_scope.h" #include "PHY/TOOLS/lte_phy_scope.h"
#include "dummy_functions.c" #include "dummy_functions.c"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/config/config_load_configmodule.h" #include "common/config/config_load_configmodule.h"
double cpuf; double cpuf;
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0)) #define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
...@@ -81,7 +81,7 @@ double t_tx_min = 1000000000; /*!< \brief initial min process time for tx */ ...@@ -81,7 +81,7 @@ double t_tx_min = 1000000000; /*!< \brief initial min process time for tx */
double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */ double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
int nfapi_mode = 0;
extern void fep_full(RU_t *ru); extern void fep_full(RU_t *ru);
extern void ru_fep_full_2thread(RU_t *ru); extern void ru_fep_full_2thread(RU_t *ru);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/eNB_scheduler_fairRR.h" #include "LAYER2/MAC/eNB_scheduler_fairRR.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h" #include "UTIL/OPT/opt.h"
#include "OCG.h" #include "OCG.h"
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
#include "T.h" #include "T.h"
extern uint8_t nfapi_mode;
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
extern volatile int16_t phy_tx_txdataF_end; extern volatile int16_t phy_tx_txdataF_end;
extern int oai_exit; extern int oai_exit;
...@@ -841,7 +842,6 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -841,7 +842,6 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
#ifdef DEBUG_eNB_SCHEDULER #ifdef DEBUG_eNB_SCHEDULER
int k; int k;
#endif #endif
start_meas(&eNB->schedule_dlsch); start_meas(&eNB->schedule_dlsch);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN); (VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN);
...@@ -1012,7 +1012,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1012,7 +1012,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
DevCheck(((eNB_UE_stats->dl_cqi < MIN_CQI_VALUE) || (eNB_UE_stats->dl_cqi > MAX_CQI_VALUE)), DevCheck(((eNB_UE_stats->dl_cqi < MIN_CQI_VALUE) || (eNB_UE_stats->dl_cqi > MAX_CQI_VALUE)),
eNB_UE_stats->dl_cqi, MIN_CQI_VALUE, MAX_CQI_VALUE); eNB_UE_stats->dl_cqi, MIN_CQI_VALUE, MAX_CQI_VALUE);
*/ */
if (nfapi_mode) { if (NFAPI_MODE != NFAPI_MONOLITHIC) {
eNB_UE_stats->dlsch_mcs1 = 10;//cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; eNB_UE_stats->dlsch_mcs1 = 10;//cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]];
} else { } else {
eNB_UE_stats->dlsch_mcs1 = cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; eNB_UE_stats->dlsch_mcs1 = cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]];
......
This diff is collapsed.
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
#include "LAYER2/PDCP_v10.1.0/pdcp.h" #include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "common/ran_context.h" #include "common/ran_context.h"
extern FILL_UL_INFO_MUTEX_t fill_ul_mutex; extern FILL_UL_INFO_MUTEX_t fill_ul_mutex;
extern uint8_t nfapi_mode;
extern void openair_rrc_top_init_ue( int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active); extern void openair_rrc_top_init_ue( int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char eNB_index, uint8_t first_sync) { //init as MR void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char eNB_index, uint8_t first_sync) { //init as MR
...@@ -91,7 +91,7 @@ mac_top_init_ue(int eMBMS_active, char *uecap_xer, ...@@ -91,7 +91,7 @@ mac_top_init_ue(int eMBMS_active, char *uecap_xer,
} }
// mutex below are used for multiple UE's L2 FAPI simulation. // mutex below are used for multiple UE's L2 FAPI simulation.
if (nfapi_mode == 3) { if (NFAPI_MODE == NFAPI_UE_STUB_PNF) {
pthread_mutex_init(&fill_ul_mutex.rx_mutex,NULL); pthread_mutex_init(&fill_ul_mutex.rx_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.crc_mutex,NULL); pthread_mutex_init(&fill_ul_mutex.crc_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.sr_mutex,NULL); pthread_mutex_init(&fill_ul_mutex.sr_mutex,NULL);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -41,17 +41,17 @@ ...@@ -41,17 +41,17 @@
#include "proto_agent_common.h" #include "proto_agent_common.h"
void * proto_agent_receive(void *args); void *proto_agent_receive(void *args);
int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p); int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p);
void proto_agent_stop(mod_id_t mod_id); void proto_agent_stop(mod_id_t mod_id);
void proto_agent_send_rlc_data_req( const protocol_ctxt_t* const ctxt_pP, rlc_op_status_t proto_agent_send_rlc_data_req( const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP, const mui_t muiP, confirm_t confirmP, const rb_id_t rb_idP, const mui_t muiP, confirm_t confirmP,
sdu_size_t sdu_sizeP, mem_block_t *sdu_pP); sdu_size_t sdu_sizeP, mem_block_t *sdu_pP);
void proto_agent_send_pdcp_data_ind(const protocol_ctxt_t* const ctxt_pP, void proto_agent_send_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP); const rb_id_t rb_idP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -236,8 +236,8 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname) ...@@ -236,8 +236,8 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname)
char broadcastAddress[20]; char broadcastAddress[20];
char interfaceName[20]; char interfaceName[20];
int returnValue; int returnValue;
sprintf(ipAddress, "10.0.%d.%d", thirdOctet,fourthOctet); sprintf(ipAddress, "%s.%d.%d", baseNetAddress,thirdOctet,fourthOctet);
sprintf(broadcastAddress, "10.0.%d.255", thirdOctet); sprintf(broadcastAddress, "%s.%d.255",baseNetAddress, thirdOctet);
sprintf(interfaceName, "%s%s%d", (UE_NAS_USE_TUN || ENB_NAS_USE_TUN)?"oaitun_":ifname, sprintf(interfaceName, "%s%s%d", (UE_NAS_USE_TUN || ENB_NAS_USE_TUN)?"oaitun_":ifname,
UE_NAS_USE_TUN?"ue": (ENB_NAS_USE_TUN?"enb":""),interface_id); UE_NAS_USE_TUN?"ue": (ENB_NAS_USE_TUN?"enb":""),interface_id);
bringInterfaceUp(interfaceName, 0); bringInterfaceUp(interfaceName, 0);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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