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 { ...@@ -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") { stage ("Start VM -- phy-sim") {
steps { steps {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
...@@ -235,7 +227,7 @@ pipeline { ...@@ -235,7 +227,7 @@ pipeline {
steps { steps {
gitlabCommitStatus(name: "Build eNb-ethernet") { gitlabCommitStatus(name: "Build eNb-ethernet") {
timeout (time: 20, unit: 'MINUTES') { 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 { ...@@ -244,20 +236,11 @@ pipeline {
steps { steps {
gitlabCommitStatus(name: "Build UE-ethernet") { gitlabCommitStatus(name: "Build UE-ethernet") {
timeout (time: 20, unit: 'MINUTES') { 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") { stage ("Build physical simulators") {
steps { steps {
gitlabCommitStatus(name: "Build phy-sim") { 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 { ...@@ -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 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
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 rm -f $VM_CMDS
} }
...@@ -201,13 +201,13 @@ eNBs = ...@@ -201,13 +201,13 @@ eNBs =
MACRLCs = ( MACRLCs = (
{ {
num_cc = 1; num_cc = 1;
local_s_if_name = "lo:"; local_s_if_name = "ens3";
remote_s_address = "127.0.0.1"; remote_s_address = "CI_UE_IP_ADDR";
local_s_address = "127.0.0.2"; local_s_address = "CI_ENB_IP_ADDR";
local_s_portc = 50001; local_s_portc = 50001;
remote_s_portc = 50000; remote_s_portc = 50000;
local_s_portd = 50011; local_s_portd = 50011;
remote_s_portd = 50010; remote_s_portd = 50010;
tr_s_preference = "nfapi"; tr_s_preference = "nfapi";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
} }
...@@ -216,7 +216,7 @@ MACRLCs = ( ...@@ -216,7 +216,7 @@ MACRLCs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #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" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -20,14 +20,14 @@ L1s = ( ...@@ -20,14 +20,14 @@ L1s = (
{ {
num_cc = 1; num_cc = 1;
tr_n_preference = "nfapi"; tr_n_preference = "nfapi";
local_n_if_name = "lo"; local_n_if_name = "ens3";
remote_n_address = "127.0.0.2"; remote_n_address = "CI_ENB_IP_ADDR";
local_n_address = "127.0.0.1"; local_n_address = "CI_UE_IP_ADDR";
local_n_portc = 50000; local_n_portc = 50000;
remote_n_portc = 50001; remote_n_portc = 50001;
local_n_portd = 50010; local_n_portd = 50010;
remote_n_portd = 50011; remote_n_portd = 50011;
} }
); );
RUs = ( RUs = (
......
...@@ -34,14 +34,18 @@ function top_usage { ...@@ -34,14 +34,18 @@ function top_usage {
} }
function variant_usage { function variant_usage {
echo " # OpenAirInterface Build Variants"
echo " --variant enb-usrp OR -v1" echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2" echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3" echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4" echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7" echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8" echo " --variant ue-ethernet OR -v8"
echo " --variant l2-sim OR -v9" echo " # non-OSA Build Variants"
echo " --variant flexran-rtc OR -v10" 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)) MY_DIR=$(dirname $(readlink -f $0))
...@@ -270,31 +274,23 @@ case $key in ...@@ -270,31 +274,23 @@ case $key in
;; ;;
-v7) -v7)
VM_NAME=ci-enb-ethernet VM_NAME=ci-enb-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=enb_eth ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8 NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET --noS1" BUILD_OPTIONS="--eNB -t ETHERNET"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
shift shift
;; ;;
-v8) -v8)
VM_NAME=ci-ue-ethernet VM_NAME=ci-ue-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=ue_eth ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8 NB_PATTERN_FILES=10
BUILD_OPTIONS="--UE -t ETHERNET --noS1" BUILD_OPTIONS="--UE -t ETHERNET"
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"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
shift shift
;; ;;
...@@ -307,6 +303,20 @@ case $key in ...@@ -307,6 +303,20 @@ case $key in
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
shift 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)
variant="$2" variant="$2"
case $variant in case $variant in
...@@ -349,29 +359,22 @@ case $key in ...@@ -349,29 +359,22 @@ case $key in
;; ;;
enb-ethernet) enb-ethernet)
VM_NAME=ci-enb-ethernet VM_NAME=ci-enb-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=enb_eth ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8 NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET --noS1" BUILD_OPTIONS="--eNB -t ETHERNET"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
;; ;;
ue-ethernet) ue-ethernet)
VM_NAME=ci-ue-ethernet VM_NAME=ci-ue-ethernet
VM_MEMORY=4096
VM_CPU=4
ARCHIVES_LOC=ue_eth ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=8 NB_PATTERN_FILES=10
BUILD_OPTIONS="--UE -t ETHERNET --noS1" BUILD_OPTIONS="--UE -t ETHERNET"
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"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
;; ;;
flexran-rtc) flexran-rtc)
...@@ -382,6 +385,18 @@ case $key in ...@@ -382,6 +385,18 @@ case $key in
BUILD_OPTIONS="cmake . && make -j2" BUILD_OPTIONS="cmake . && make -j2"
NBARGS=$[$NBARGS+256] 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 ""
echo "Syntax Error: Invalid Variant option -> $variant" echo "Syntax Error: Invalid Variant option -> $variant"
...@@ -536,11 +551,23 @@ ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC} ...@@ -536,11 +551,23 @@ ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
STATUS=0 STATUS=0
if [ $CREATE_CMD -eq 1 ] if [ $CREATE_CMD -eq 1 ]
then then
create_vm if [[ $VM_NAME =~ .*-l2-sim.* ]]
then
echo "Selected variant is no more a build variant"
exit 0
else
create_vm
fi
fi fi
if [ $BUILD_CMD -eq 1 ] if [ $BUILD_CMD -eq 1 ]
then then
build_on_vm 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 ] if [ $DAEMON -eq 0 ] && [ $STATUS -eq 0 ]
then then
check_on_vm_build check_on_vm_build
...@@ -548,7 +575,13 @@ then ...@@ -548,7 +575,13 @@ then
fi fi
if [ $WAIT_CMD -eq 1 ] if [ $WAIT_CMD -eq 1 ]
then then
wait_on_vm_build 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 ] if [ $STATUS -eq 0 ]
then then
check_on_vm_build check_on_vm_build
......
...@@ -599,25 +599,25 @@ function report_build { ...@@ -599,25 +599,25 @@ function report_build {
fi fi
summary_table_header "OAI Build eNB -- ETHERNET transport option" ./archives/enb_eth 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 "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 "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 "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 "RF Simulator - Release 14" ./archives/enb_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./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 "TCP OAI Bridge - Release 14" ./archives/enb_eth/tcp_bridge_oai.Rel14.txt "Built target tcp_bridge_oai" ./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_footer summary_table_footer
summary_table_header "OAI Build UE -- ETHERNET transport option" ./archives/ue_eth 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 "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 "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 "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 "RF Simulator - Release 14" ./archives/ue_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./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 "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 "RF Simulator - Release 14" ./archives/ue_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./ue_eth_row7.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 "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 "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 summary_table_footer
if [ -e ./archives/red_hat ] 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 { ...@@ -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 echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $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 rm -f $VM_CMDS
} }
...@@ -124,11 +124,16 @@ function check_on_vm_build { ...@@ -124,11 +124,16 @@ function check_on_vm_build {
if [ $KEEP_VM_ALIVE -eq 0 ] if [ $KEEP_VM_ALIVE -eq 0 ]
then then
if [[ "$VM_NAME" == *"-enb-ethernet"* ]] || [[ "$VM_NAME" == *"-ue-ethernet"* ]]
then
echo "Hack to not destroy in current pipeline"
else
echo "############################################################" echo "############################################################"
echo "Destroying VM" echo "Destroying VM"
echo "############################################################" echo "############################################################"
uvt-kvm destroy $VM_NAME uvt-kvm destroy $VM_NAME
ssh-keygen -R $VM_IP_ADDR ssh-keygen -R $VM_IP_ADDR
fi
fi fi
rm -f $VM_CMDS rm -f $VM_CMDS
......
...@@ -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;
......
/* /*
* Copyright 2017 Cisco Systems, Inc. * Copyright 2017 Cisco Systems, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -20,48 +20,62 @@ ...@@ -20,48 +20,62 @@
#include "nfapi_interface.h" #include "nfapi_interface.h"
typedef enum { typedef enum {
P5_VENDOR_EXT_REQ = NFAPI_VENDOR_EXT_MSG_MIN, P5_VENDOR_EXT_REQ = NFAPI_VENDOR_EXT_MSG_MIN,
P5_VENDOR_EXT_RSP, P5_VENDOR_EXT_RSP,
P7_VENDOR_EXT_REQ, P7_VENDOR_EXT_REQ,
P7_VENDOR_EXT_IND P7_VENDOR_EXT_IND
} vendor_ext_message_id_e; } vendor_ext_message_id_e;
typedef struct { typedef struct {
nfapi_p4_p5_message_header_t header; nfapi_p4_p5_message_header_t header;
uint16_t dummy1; uint16_t dummy1;
uint16_t dummy2; uint16_t dummy2;
} vendor_ext_p5_req; } vendor_ext_p5_req;
typedef struct { typedef struct {
nfapi_p4_p5_message_header_t header; nfapi_p4_p5_message_header_t header;
uint16_t error_code; uint16_t error_code;
} vendor_ext_p5_rsp; } vendor_ext_p5_rsp;
typedef struct { typedef struct {
nfapi_p7_message_header_t header; nfapi_p7_message_header_t header;
uint16_t dummy1; uint16_t dummy1;
uint16_t dummy2; uint16_t dummy2;
} vendor_ext_p7_req; } vendor_ext_p7_req;
typedef struct { typedef struct {
nfapi_p7_message_header_t header; nfapi_p7_message_header_t header;
uint16_t error_code; uint16_t error_code;
} vendor_ext_p7_ind; } vendor_ext_p7_ind;
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint32_t dummy; uint32_t dummy;
} vendor_ext_tlv_1; } vendor_ext_tlv_1;
#define VENDOR_EXT_TLV_1_TAG 0xF001 #define VENDOR_EXT_TLV_1_TAG 0xF001
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint32_t dummy; uint32_t dummy;
} vendor_ext_tlv_2; } vendor_ext_tlv_2;
#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_
...@@ -59,6 +59,7 @@ int lte_segmentation(unsigned char *input_buffer, ...@@ -59,6 +59,7 @@ int lte_segmentation(unsigned char *input_buffer,
} }
if ((*C)>MAX_NUM_DLSCH_SEGMENTS) { 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); LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
return(-1); 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 ...@@ -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); 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; break;
case NFAPI_DL_DCI_FORMAT_1: 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 ...@@ -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 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->round = 0;
dlsch0->harq_mask =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 ((dlsch0->harq_mask & (1 << rel13->harq_process)) > 0) {
if ((rel13->new_data_indicator != dlsch0_harq->ndi)||(dci_alloc->ra_flag==1)) 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 ...@@ -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]; 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 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]; 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->active = 1;
dlsch0->harq_mask |= (1 << rel13->harq_process); dlsch0->harq_mask |= (1 << rel13->harq_process);
......
...@@ -571,6 +571,8 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -571,6 +571,8 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
unsigned int L,C,B; unsigned int L,C,B;
B = dlsch->harq_processes[dlsch->harq_ids[frame%2][subframe]]->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) { if(B<=6144) {
L=0; L=0;
C=1; C=1;
...@@ -703,7 +705,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB, ...@@ -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]->Ndi == 1) { // this is a new packet
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
#ifdef DEBUG_DLSCH_CODING #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 #endif
/* /*
int i; int i;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -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,9 +49,8 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p ...@@ -51,9 +49,8 @@ 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;
if (ue->ul_power_control_dedicated[eNB_id].deltaMCS_Enabled == 1) { if (ue->ul_power_control_dedicated[eNB_id].deltaMCS_Enabled == 1) {
// This is the formula from Section 5.1.1.1 in 36.213 10*log10(deltaIF_PUSCH = (2^(MPR*Ks)-1)*beta_offset_pusch) // This is the formula from Section 5.1.1.1 in 36.213 10*log10(deltaIF_PUSCH = (2^(MPR*Ks)-1)*beta_offset_pusch)
...@@ -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,10 +91,9 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_ ...@@ -104,10 +91,9 @@ 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;
if (ue->ulsch[eNB_id]->PHR < -23) if (ue->ulsch[eNB_id]->PHR < -23)
ue->ulsch[eNB_id]->PHR = -23; ue->ulsch[eNB_id]->PHR = -23;
...@@ -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; // l1l2 simulator => ideal conditions
return 40; // For nfapi_mode=3 consider 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.
...@@ -672,8 +672,10 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -672,8 +672,10 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
mcs = 7; mcs = 7;
} else if (bcch_sdu_length <= 49) { } else if (bcch_sdu_length <= 49) {
mcs = 8; 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]; dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
......
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.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*******************************************************************************/ *******************************************************************************/
/*! \file proto_agent.h /*! \file proto_agent.h
* \brief top level protocol agent * \brief top level protocol agent
* \author Navid Nikaein and Xenofon Foukas * \author Navid Nikaein and Xenofon Foukas
* \date 2016 * \date 2016
* \version 0.1 * \version 0.1
...@@ -41,18 +41,18 @@ ...@@ -41,18 +41,18 @@
#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);
#endif #endif
...@@ -330,8 +330,6 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP, ...@@ -330,8 +330,6 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
#endif #endif
) { ) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
mem_block_t *new_sdu_p = NULL; mem_block_t *new_sdu_p = NULL;
rlc_mode_t rlc_mode = RLC_MODE_NONE; rlc_mode_t rlc_mode = RLC_MODE_NONE;
rlc_union_t *rlc_union_p = NULL; rlc_union_t *rlc_union_p = NULL;
...@@ -599,34 +597,27 @@ void rlc_data_ind ( ...@@ -599,34 +597,27 @@ void rlc_data_ind (
rb_idP, rb_idP,
sdu_sizeP); sdu_sizeP);
rlc_util_print_hex_octets(RLC, (unsigned char *)sdu_pP->data, sdu_sizeP); rlc_util_print_hex_octets(RLC, (unsigned char *)sdu_pP->data, sdu_sizeP);
#if T_TRACER
if (ctxt_pP->enb_flag) if (ctxt_pP->enb_flag) {
#if T_TRACER
T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP)); T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP));
#endif #endif
const ngran_node_t type = RC.rrc[ctxt_pP->module_id]->node_type;
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU,
"Can't be CU, bad node type %d\n", type);
if (NODE_IS_DU(type) && srb_flagP == 1) {
MessageDef *msg = itti_alloc_new_message(TASK_RLC_ENB, F1AP_UL_RRC_MESSAGE);
F1AP_UL_RRC_MESSAGE(msg).rnti = ctxt_pP->rnti;
F1AP_UL_RRC_MESSAGE(msg).srb_id = rb_idP;
F1AP_UL_RRC_MESSAGE(msg).rrc_container = sdu_pP->data;
F1AP_UL_RRC_MESSAGE(msg).rrc_container_length = sdu_sizeP;
itti_send_msg_to_task(TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
return;
}
} // case monolithic eNodeB or UE
#ifndef UETARGET get_pdcp_data_ind_func()(ctxt_pP, srb_flagP, MBMS_flagP, rb_idP, sdu_sizeP, sdu_pP,NULL,NULL);
const ngran_node_t type = RC.rrc[ctxt_pP->module_id]->node_type;
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU,
"Can't be CU, bad node type %d\n", type);
if (NODE_IS_DU(type)) {
if (srb_flagP == 1) {
MessageDef *msg = itti_alloc_new_message(TASK_RLC_ENB, F1AP_UL_RRC_MESSAGE);
F1AP_UL_RRC_MESSAGE(msg).rnti = ctxt_pP->rnti;
F1AP_UL_RRC_MESSAGE(msg).srb_id = rb_idP;
F1AP_UL_RRC_MESSAGE(msg).rrc_container = sdu_pP->data;
F1AP_UL_RRC_MESSAGE(msg).rrc_container_length = sdu_sizeP;
itti_send_msg_to_task(TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
} else {
proto_agent_send_pdcp_data_ind (ctxt_pP, srb_flagP, MBMS_flagP, rb_idP, sdu_sizeP, sdu_pP);
}
} else
#endif
{ // case monolithic eNodeB or UE
pdcp_data_ind(ctxt_pP, srb_flagP, MBMS_flagP, rb_idP, sdu_sizeP, sdu_pP);
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void rlc_data_conf (const protocol_ctxt_t *const ctxt_pP, void rlc_data_conf (const protocol_ctxt_t *const ctxt_pP,
...@@ -671,12 +662,12 @@ rlc_module_init (void) { ...@@ -671,12 +662,12 @@ rlc_module_init (void) {
} }
} }
for (k=0; k < RLC_MAX_MBMS_LC; k++) { for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_eNB[0][k].service_id = 0; rlc_mbms_lcid2service_session_id_eNB[0][k].service_id = 0;
rlc_mbms_lcid2service_session_id_eNB[0][k].session_id = 0; rlc_mbms_lcid2service_session_id_eNB[0][k].session_id = 0;
} }
for (k=0; k < NB_RB_MBMS_MAX; k++) { for (k=0; k < NB_RB_MBMS_MAX; k++) {
rlc_mbms_rbid2lcid_eNB[0][k] = RLC_LC_UNALLOCATED; rlc_mbms_rbid2lcid_eNB[0][k] = RLC_LC_UNALLOCATED;
} }
......
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