Commit 9e247f3f authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/ci-improve-l2-sim' into develop_integration_2019_w15

parents ee547c1d a05255d2
......@@ -178,14 +178,6 @@ pipeline {
}
}
stage ("Start VM -- L2-Sim") {
steps {
timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
}
}
}
stage ("Start VM -- phy-sim") {
steps {
timeout (time: 5, unit: 'MINUTES') {
......@@ -235,7 +227,7 @@ pipeline {
steps {
gitlabCommitStatus(name: "Build eNb-ethernet") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
......@@ -244,20 +236,11 @@ pipeline {
steps {
gitlabCommitStatus(name: "Build UE-ethernet") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
stage ("Build L2-Simulator-eNB") {
steps {
//gitlabCommitStatus(name: "Build UE-ethernet") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
//}
}
}
stage ("Build physical simulators") {
steps {
gitlabCommitStatus(name: "Build phy-sim") {
......
BEGIN{lineIdx=0;captureUEDesc=0}
{
if ($0 ~/UE0/) {
captureUEDesc = 1
}
if (captureUEDesc == 1) {
captureLine[lineIdx] = $0
lineIdx = lineIdx + 1
}
print $0
}
END {
for (ueIdx = 1; ueIdx < num_ues; ueIdx++) {
print ""
for (k = 0; k < lineIdx; k++) {
if (captureLine[k] ~/UE0/) {
mLine = captureLine[k]
gsub("UE0", "UE"ueIdx, mLine)
print mLine
} else {
if (captureLine[k] ~/MSIN=/) {
mLine = captureLine[k]
MSIN=sprintf("%08d", 1111+int(ueIdx))
gsub("00001111", MSIN, mLine)
print mLine
} else {
print captureLine[k]
}
}
}
}
}
BEGIN{lineIdx=0}
{
captureLine[lineIdx] = $0
lineIdx = lineIdx + 1
print $0
}
END{
for (ueIdx = 1; ueIdx < num_ues; ueIdx++) {
for (k = 0; k < lineIdx; k++) {
if (captureLine[k] ~/UserName=/) {
mLine = captureLine[k]
MSIN=sprintf("%08d", 1111+int(ueIdx))
gsub("00001111", MSIN, mLine)
print mLine
} else {
if (captureLine[k] ~/SubscriptionIndex/) {
mLine = captureLine[k]
MSIN=sprintf("%d", 111+int(ueIdx))
gsub("111", MSIN, mLine)
print mLine
} else {
print captureLine[k]
}
}
}
}
}
......@@ -213,6 +213,6 @@ function build_on_vm {
echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS
fi
fi
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
ssh -T -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
rm -f $VM_CMDS
}
......@@ -201,9 +201,9 @@ eNBs =
MACRLCs = (
{
num_cc = 1;
local_s_if_name = "lo:";
remote_s_address = "127.0.0.1";
local_s_address = "127.0.0.2";
local_s_if_name = "ens3";
remote_s_address = "CI_UE_IP_ADDR";
local_s_address = "CI_ENB_IP_ADDR";
local_s_portc = 50001;
remote_s_portc = 50000;
local_s_portd = 50011;
......@@ -216,7 +216,7 @@ MACRLCs = (
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
......
......@@ -20,9 +20,9 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "lo";
remote_n_address = "127.0.0.2";
local_n_address = "127.0.0.1";
local_n_if_name = "ens3";
remote_n_address = "CI_ENB_IP_ADDR";
local_n_address = "CI_UE_IP_ADDR";
local_n_portc = 50000;
remote_n_portc = 50001;
local_n_portd = 50010;
......
......@@ -34,14 +34,18 @@ function top_usage {
}
function variant_usage {
echo " # OpenAirInterface Build Variants"
echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo " --variant l2-sim OR -v9"
echo " # non-OSA Build Variants"
echo " --variant flexran-rtc OR -v10"
echo " # OpenAirInterface Test Variants"
echo " --variant rf-sim OR -v21"
echo " --variant l2-sim OR -v22"
}
MY_DIR=$(dirname $(readlink -f $0))
......@@ -270,31 +274,23 @@ case $key in
;;
-v7)
VM_NAME=ci-enb-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET"
NBARGS=$[$NBARGS+256]
shift
;;
-v8)
VM_NAME=ci-ue-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
NBARGS=$[$NBARGS+256]
shift
;;
-v9)
VM_NAME=ci-l2-sim
VM_MEMORY=8192
VM_CPU=8
ARCHIVES_LOC=l2_sim
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET"
RUN_OPTIONS="complex"
NB_PATTERN_FILES=10
BUILD_OPTIONS="--UE -t ETHERNET"
NBARGS=$[$NBARGS+256]
shift
;;
......@@ -307,6 +303,20 @@ case $key in
NBARGS=$[$NBARGS+256]
shift
;;
-v21)
VM_NAME=ci-rf-sim
ARCHIVES_LOC=rf_sim
RUN_OPTIONS="complex"
NBARGS=$[$NBARGS+256]
shift
;;
-v22)
VM_NAME=ci-l2-sim
ARCHIVES_LOC=l2_sim
RUN_OPTIONS="complex"
NBARGS=$[$NBARGS+256]
shift
;;
--variant)
variant="$2"
case $variant in
......@@ -349,29 +359,22 @@ case $key in
;;
enb-ethernet)
VM_NAME=ci-enb-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET"
NBARGS=$[$NBARGS+256]
;;
ue-ethernet)
VM_NAME=ci-ue-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
NBARGS=$[$NBARGS+256]
;;
l2-sim)
VM_NAME=ci-l2-sim
VM_MEMORY=8192
VM_CPU=8
ARCHIVES_LOC=l2_sim
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET"
RUN_OPTIONS="complex"
NB_PATTERN_FILES=10
BUILD_OPTIONS="--UE -t ETHERNET"
NBARGS=$[$NBARGS+256]
;;
flexran-rtc)
......@@ -382,6 +385,18 @@ case $key in
BUILD_OPTIONS="cmake . && make -j2"
NBARGS=$[$NBARGS+256]
;;
rf-sim)
VM_NAME=ci-rf-sim
ARCHIVES_LOC=rf_sim
RUN_OPTIONS="complex"
NBARGS=$[$NBARGS+256]
;;
l2-sim)
VM_NAME=ci-l2-sim
ARCHIVES_LOC=l2_sim
RUN_OPTIONS="complex"
NBARGS=$[$NBARGS+256]
;;
*)
echo ""
echo "Syntax Error: Invalid Variant option -> $variant"
......@@ -536,11 +551,23 @@ ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
STATUS=0
if [ $CREATE_CMD -eq 1 ]
then
if [[ $VM_NAME =~ .*-l2-sim.* ]]
then
echo "Selected variant is no more a build variant"
exit 0
else
create_vm
fi
fi
if [ $BUILD_CMD -eq 1 ]
then
if [[ $VM_NAME =~ .*-l2-sim.* ]]
then
echo "Selected variant is no more a build variant"
exit 0
else
build_on_vm
fi
if [ $DAEMON -eq 0 ] && [ $STATUS -eq 0 ]
then
check_on_vm_build
......@@ -548,7 +575,13 @@ then
fi
if [ $WAIT_CMD -eq 1 ]
then
if [[ $VM_NAME =~ .*-l2-sim.* ]]
then
echo "Selected variant is no more a build variant"
exit 0
else
wait_on_vm_build
fi
if [ $STATUS -eq 0 ]
then
check_on_vm_build
......
......@@ -599,25 +599,25 @@ function report_build {
fi
summary_table_header "OAI Build eNB -- ETHERNET transport option" ./archives/enb_eth
summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
summary_table_row "LTE SoftModem - Release 14" ./archives/enb_eth/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
summary_table_row "RF Simulator - Release 14" ./archives/enb_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./enb_eth_row7.html
summary_table_row "TCP OAI Bridge - Release 14" ./archives/enb_eth/tcp_bridge_oai.Rel14.txt "Built target tcp_bridge_oai" ./enb_eth_row8.html
summary_table_row "RF Simulator - Release 14" ./archives/enb_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./enb_eth_row5.html
summary_table_row "TCP OAI Bridge - Release 14" ./archives/enb_eth/tcp_bridge_oai.Rel14.txt "Built target tcp_bridge_oai" ./enb_eth_row6.html
summary_table_footer
summary_table_header "OAI Build UE -- ETHERNET transport option" ./archives/ue_eth
summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
summary_table_row "LTE UE SoftModem - Release 14" ./archives/ue_eth/lte-uesoftmodem.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
summary_table_row "RF Simulator - Release 14" ./archives/ue_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./ue_eth_row7.html
summary_table_row "TCP OAI Bridge - Release 14" ./archives/ue_eth/tcp_bridge_oai.Rel14.txt "Built target tcp_bridge_oai" ./ue_eth_row8.html
summary_table_row "RF Simulator - Release 14" ./archives/ue_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./ue_eth_row5.html
summary_table_row "TCP OAI Bridge - Release 14" ./archives/ue_eth/tcp_bridge_oai.Rel14.txt "Built target tcp_bridge_oai" ./ue_eth_row6.html
summary_table_row "Conf 2 UE Data - Release 14" ./archives/ue_eth/conf2uedata.Rel14.txt "Built target conf2uedata" ./ue_eth_row7.html
summary_table_row "NVRAM - Release 14" ./archives/ue_eth/nvram.Rel14.txt "Built target nvram" ./ue_eth_row8.html
summary_table_row "UE IP - Release 14" ./archives/ue_eth/ue_ip.Rel14.txt "Built target ue_ip" ./ue_eth_row9.html
summary_table_row "USIM - Release 14" ./archives/ue_eth/usim.Rel14.txt "Built target usim" ./ue_eth_row9a.html
summary_table_footer
if [ -e ./archives/red_hat ]
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -98,7 +98,7 @@ function wait_on_vm_build {
echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
fi
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
ssh -T -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
rm -f $VM_CMDS
}
......@@ -124,12 +124,17 @@ function check_on_vm_build {
if [ $KEEP_VM_ALIVE -eq 0 ]
then
if [[ "$VM_NAME" == *"-enb-ethernet"* ]] || [[ "$VM_NAME" == *"-ue-ethernet"* ]]
then
echo "Hack to not destroy in current pipeline"
else
echo "############################################################"
echo "Destroying VM"
echo "############################################################"
uvt-kvm destroy $VM_NAME
ssh-keygen -R $VM_IP_ADDR
fi
fi
rm -f $VM_CMDS
echo "############################################################"
......
......@@ -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(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
##########################
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
${T_SOURCE}
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
${NFAPI_USER_DIR}/nfapi.c
)
target_link_libraries (${myExe}
......
......@@ -70,7 +70,6 @@ DISABLE_LOG_X="False"
USRP_REC_PLAY="False"
BUILD_ECLIPSE=0
UE_NAS_USE_TUN="False"
UETARGET="False"
BASIC_SIMULATOR=0
trap handle_ctrl_c INT
......@@ -219,7 +218,6 @@ function main() {
shift;;
--UE)
UE=1
UETARGET="True"
echo_info "Will compile UE"
shift;;
--mu)
......@@ -549,9 +547,6 @@ 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
if [ "$UE" = 1 ] ; then
echo "set (UETARGET $UETARGET )" >> $cmake_file
fi
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
echo "set (LINUX True )" >> $cmake_file
......@@ -945,7 +940,6 @@ function main() {
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 (UETARGET True )" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
# echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
......
......@@ -21,31 +21,55 @@
#include <stdio.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)
{
//printf("%s(priority:%d)\n", __FUNCTION__, priority);
typedef struct {
nfapi_mode_t nfapi_mode;
} 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;
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");
}
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");
}
pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED);
struct sched_param thread_params;
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");
}
}
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 @@
#include <unistd.h>
#include "debug.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "nfapi_pnf_interface.h"
#include "nfapi.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
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 uint8_t nfapi_mode;
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
// to keep only the necessary just to keep the nfapi FSM rolling by sending a dummy response.
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];
fp = &eNB->frame_parms;
} else {
......@@ -647,7 +648,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
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] Simulating PHY CONFIG - DJP\n");
PHY_Config_t phy_config;
......@@ -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);
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);
return 0;
......@@ -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->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->ul_config_req = &memcpy_ul_config_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
//phy_init_RU(RC.ru[0]);
printf("[PNF] About to call init_eNB_afterRU()\n");
if (nfapi_mode != 3) {
if (NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
init_eNB_afterRU();
}
......@@ -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) {
printf("%s() PNF\n\n\n\n\n\n", __FUNCTION__);
if(nfapi_mode!=3) {
nfapi_mode = 1; // PNF!
if(NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
nfapi_setmode(NFAPI_PNF); // PNF!
}
nfapi_pnf_config_t *config = nfapi_pnf_config_create();
......
......@@ -904,10 +904,10 @@ void vnf_start_thread(void *ptr) {
}
static vnf_info vnf;
extern uint8_t nfapi_mode;
/*------------------------------------------------------------------------------*/
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.p7_vnfs, 0, sizeof(vnf.p7_vnfs));
vnf.p7_vnfs[0].timing_window = 32;
......
......@@ -64,4 +64,18 @@ typedef struct {
#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_
......@@ -59,6 +59,7 @@ int lte_segmentation(unsigned char *input_buffer,
}
if ((*C)>MAX_NUM_DLSCH_SEGMENTS) {
printf("%d\n",*(int*)0);
LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
return(-1);
}
......
This diff is collapsed.
......@@ -528,7 +528,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0->harq_mask |= (1 << rel8->harq_process);
if (rel8->rnti_type == 1) LOG_D(PHY,"DCI 1A: round %d, mcs %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,rel8->resource_block_coding,rel8->redundancy_version_1,rel8->rnti,rel8->harq_process);
if (rel8->rnti_type == 1) LOG_D(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding,rel8->redundancy_version_1,rel8->rnti,rel8->harq_process);
break;
case NFAPI_DL_DCI_FORMAT_1:
......@@ -1750,6 +1750,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
if (dlsch0->rnti != rel13->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry
dlsch0_harq->round = 0;
dlsch0->harq_mask =0;
printf("*********************** rnti %x => %x, pos %d\n",rel13->rnti,dlsch0->rnti,UE_id);
}
if ((dlsch0->harq_mask & (1 << rel13->harq_process)) > 0) {
if ((rel13->new_data_indicator != dlsch0_harq->ndi)||(dci_alloc->ra_flag==1))
......@@ -1768,7 +1769,8 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][1];
else if (rel13->tpc == 1) //N1A_PRB=3, get TBS from table using mcs and nb_rb=3
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][2];
LOG_D(PHY,"TBS = %d(%d)\n",dlsch0_harq->TBS,dlsch0_harq->mcs);
else AssertFatal(1==0,"Don't know how to set TBS (TPC %d)\n",rel13->tpc);
LOG_D(PHY,"fill_mdci_and_dlsch : TBS = %d(%d) %p, %x\n",dlsch0_harq->TBS,dlsch0_harq->mcs,dlsch0,rel13->rnti);
}
dlsch0->active = 1;
dlsch0->harq_mask |= (1 << rel13->harq_process);
......
......@@ -571,6 +571,8 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
unsigned int L,C,B;
B = dlsch->harq_processes[dlsch->harq_ids[frame%2][subframe]]->B;
LOG_D(PHY,"B %d, harq_pid %d\n",B,dlsch->harq_ids[frame%2][subframe]);
if(B<=6144) {
L=0;
C=1;
......@@ -703,7 +705,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
#ifdef DEBUG_DLSCH_CODING
printf("encoding thinks this is a new packet for harq_pid %d (%p) \n",harq_pid,dlsch->harq_processes[harq_pid]->b);
printf("encoding thinks this is a new packet for harq_pid %d (%p), A %d \n",harq_pid,dlsch,A);
#endif
/*
int i;
......
This diff is collapsed.
This diff is collapsed.
......@@ -37,6 +37,7 @@
#include "fapi_l1.h"
#include "nfapi_pnf.h"
#include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
......@@ -46,10 +47,9 @@
#include <time.h>
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#include "intertask_interface.h"
#endif
extern uint32_t nfapi_mode;
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
......@@ -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 i;
int frame,subframe;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag==1) {
subframe = eNB->proc.subframe_prach_br;
frame = eNB->proc.frame_prach_br;
pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles=0;
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
}
else
} else
#endif
{
pthread_mutex_lock(&eNB->UL_INFO_mutex);
......@@ -80,24 +79,23 @@ void prach_procedures(PHY_VARS_eNB *eNB
subframe = eNB->proc.subframe_prach;
frame = eNB->proc.frame_prach;
}
RU_t *ru;
int aa=0;
int ru_aa;
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];
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];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int ce_level;
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
}
}
......@@ -114,20 +112,17 @@ void prach_procedures(PHY_VARS_eNB *eNB
,br_flag
#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",
frame,subframe,br_flag,
max_preamble[0],
max_preamble_energy[0]/10,
max_preamble_delay[0],
eNB->prach_energy_counter);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag==1) {
int prach_mask;
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;
int ind = 0;
int ce_level = 0;
......@@ -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->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->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[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
......@@ -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);
}
}
/*
ind++;
}
} */// ce_level
}
else
} else
#endif
{
if ((eNB->prach_energy_counter == 100) &&
(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",
eNB->Mod_id,
eNB->CC_id,
......@@ -180,18 +172,14 @@ void prach_procedures(PHY_VARS_eNB *eNB
max_preamble_energy[0]/10,
max_preamble_energy[0]%10,
max_preamble_delay[0]);
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]));
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.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.header.message_id = NFAPI_RACH_INDICATION;
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.timing_advance = max_preamble_delay[0];
eNB->preamble_list[0].preamble_rel8.preamble = max_preamble[0];
......@@ -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].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",
NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf),
eNB->preamble_list[0].preamble_rel8.timing_advance,
eNB->preamble_list[0].preamble_rel8.preamble,
eNB->preamble_list[0].preamble_rel8.rnti,
eNB->preamble_list[0].preamble_rel13.rach_resource_type);
oai_nfapi_rach_ind(&eNB->UL_INFO.rach_ind);
eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles = 0;
}
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
} // max_preamble_energy > prach_I0 + 100
else {
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 (eNB->prach_energy_counter < 100) eNB->prach_energy_counter++;
}
} // else br_flag
......
......@@ -36,12 +36,10 @@
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.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 *
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
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
// 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) ?
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
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,
proc->frame_tx,
proc->subframe_tx);
uint8_t nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb;
int16_t PL;
// 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
// else
// P_opusch(0) = PO_NOMINAL_PUSCH(j) + P_O_UE_PUSCH(j)
PL = get_PL(ue->Mod_id,ue->CC_id,eNB_id);
ue->ulsch[eNB_id]->Po_PUSCH = (hundred_times_log10_NPRB[nb_rb-1]+
get_hundred_times_delta_IF(ue,eNB_id,harq_pid) +
100*ue->ulsch[eNB_id]->f_pusch)/100;
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);
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,
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_
100*ue->ulsch[eNB_id]->f_pusch);
} else if (j==0) { // SPS 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 += 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;
......@@ -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,
ue->ulsch[eNB_id]->f_pusch);
}
}
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index)
{
if(nfapi_mode!=3)
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index) {
if(NFAPI_MODE!=NFAPI_UE_STUB_PNF)
return PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->PHR;
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) {
return fd;
}
int netlink_init_tun(char *ifprefix) {
int netlink_init_tun(char *ifprefix, int num_if) {
int ret;
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);
nas_sock_fd[i] = tun_alloc(ifname);
......
......@@ -62,6 +62,6 @@ int multicast_link_read_data_from_sock(uint8_t eNB_flag);
void clear_eNB_transport_info(uint8_t);
void clear_UE_transport_info(uint8_t);
int netlink_init(void);
int netlink_init_tun(char *ifsuffix);
int netlink_init_tun(char *ifsuffix, int num_if);
#endif /* EMU_PROTO_H_ */
......@@ -66,7 +66,7 @@
#include "SCHED_UE/sched_UE.h"
#include "common/config/config_load_configmodule.h"
#include "PHY/INIT/phy_init.h"
#include "nfapi/oai_integration/vendor_ext.h"
void feptx_ofdm(RU_t *ru);
void feptx_prec(RU_t *ru);
......@@ -471,7 +471,7 @@ int n_users = 1;
int subframe=7;
int num_common_dci=0,num_ue_spec_dci=0,num_dci=0,num_pdcch_symbols=1;
uint16_t n_rnti=0x1234;
int nfapi_mode=0;
int abstx=0;
int Nid_cell=0;
int N_RB_DL=25;
......
......@@ -55,7 +55,7 @@
#include "PHY/TOOLS/lte_phy_scope.h"
#include "dummy_functions.c"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/config/config_load_configmodule.h"
double cpuf;
#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 */
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_rx_dropped = 0; /*!< \brief initial max process time for rx */
int nfapi_mode = 0;
extern void fep_full(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.
......@@ -672,8 +672,10 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
mcs = 7;
} else if (bcch_sdu_length <= 49) {
mcs = 8;
} else if (bcch_sdu_length <= 59) {
mcs = 9;
}
else AssertFatal(1==0,"Cannot Assign mcs for bcch_sdu_length %d (max mcs 9)\n",bcch_sdu_length);
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0,
......
This diff is collapsed.
......@@ -40,6 +40,7 @@
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/eNB_scheduler_fairRR.h"
#include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
......@@ -49,7 +50,7 @@
#include "T.h"
extern uint8_t nfapi_mode;
#ifdef PHY_TX_THREAD
extern volatile int16_t phy_tx_txdataF_end;
extern int oai_exit;
......@@ -841,7 +842,6 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
#ifdef DEBUG_eNB_SCHEDULER
int k;
#endif
start_meas(&eNB->schedule_dlsch);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN);
......@@ -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)),
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]];
} else {
eNB_UE_stats->dlsch_mcs1 = cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]];
......
This diff is collapsed.
......@@ -39,12 +39,12 @@
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "RRC/LTE/rrc_defs.h"
#include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "common/ran_context.h"
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);
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,
}
// 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.crc_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.sr_mutex,NULL);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -51,6 +51,17 @@
#include "LTE_PMCH-InfoList-r9.h"
#endif
typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
const srb_flag_t, const MBMS_flag_t,
const rb_id_t, const mui_t,
confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const);
typedef boolean_t (*pdcp_data_ind_func_t)( const protocol_ctxt_t *, const srb_flag_t,
const MBMS_flag_t, const rb_id_t, const sdu_size_t,
mem_block_t *,const uint32_t *const, const uint32_t *const);
/* maximum number of tun interfaces that will be created to emulates UEs */
/* UEs beyond that will be multiplexed on the same tun */
#define MAX_NUMBER_NETIF 16
#define PDCP_USE_NETLINK_BIT (1<< 11)
#define LINK_ENB_PDCP_TO_IP_DRIVER_BIT (1<< 13)
#define LINK_ENB_PDCP_TO_GTPV1U_BIT (1<< 14)
......@@ -58,8 +69,12 @@
#define ENB_NAS_USE_TUN_BIT (1<< 16)
typedef struct {
uint64_t optmask;
send_rlc_data_req_func_t send_rlc_data_req_func;
pdcp_data_ind_func_t pdcp_data_ind_func;
} pdcp_params_t;
#define PDCP_USE_NETLINK ( get_pdcp_optmask() & PDCP_USE_NETLINK_BIT)
#define LINK_ENB_PDCP_TO_IP_DRIVER ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_IP_DRIVER_BIT)
#define LINK_ENB_PDCP_TO_GTPV1U ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_GTPV1U_BIT)
......@@ -202,10 +217,6 @@ typedef struct pdcp_s {
* which is not also a valid sequence number
*/
short int first_missing_pdu;
/*
* decipher using a different rx_hfn
*/
} pdcp_t;
......@@ -401,7 +412,9 @@ int pdcp_fifo_flush_sdus ( const protocol_ctxt_t *const ct
int pdcp_fifo_read_input_sdus_remaining_bytes ( const protocol_ctxt_t *const ctxt_pP);
int pdcp_fifo_read_input_sdus ( const protocol_ctxt_t *const ctxt_pP);
void pdcp_fifo_read_input_sdus_from_otg ( const protocol_ctxt_t *const ctxt_pP);
void pdcp_set_rlc_funcptr(send_rlc_data_req_func_t send_rlc_data_req,
pdcp_data_ind_func_t pdcp_data_ind);
pdcp_data_ind_func_t get_pdcp_data_ind_func(void);
//-----------------------------------------------------------------------------
/*
......
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.
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.
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