Commit d8e16e37 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/develop' into eMTC-testing

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parents cd5e140e e1d40791
...@@ -329,13 +329,13 @@ pipeline { ...@@ -329,13 +329,13 @@ pipeline {
stage ("Test physical simulators") { stage ("Test physical simulators") {
steps { steps {
script { script {
gitlabCommitStatus(name: "Test phy-sim") { timeout (time: 20, unit: 'MINUTES') {
timeout (time: 20, unit: 'MINUTES') { try {
try { gitlabCommitStatus(name: "Test phy-sim") {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} }
} }
} }
...@@ -360,13 +360,13 @@ pipeline { ...@@ -360,13 +360,13 @@ pipeline {
stage ("Test basic simulator") { stage ("Test basic simulator") {
steps { steps {
script { script {
gitlabCommitStatus(name: "Test basic-sim") { timeout (time: 30, unit: 'MINUTES') {
timeout (time: 30, unit: 'MINUTES') { try {
try { gitlabCommitStatus(name: "Test basic-sim") {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} }
} }
} }
...@@ -375,13 +375,13 @@ pipeline { ...@@ -375,13 +375,13 @@ pipeline {
stage ("Test L2 simulator") { stage ("Test L2 simulator") {
steps { steps {
script { script {
gitlabCommitStatus(name: "Test L2-sim") { timeout (time: 30, unit: 'MINUTES') {
timeout (time: 30, unit: 'MINUTES') { try {
try { gitlabCommitStatus(name: "Test L2-sim") {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} }
} }
} }
...@@ -399,7 +399,8 @@ pipeline { ...@@ -399,7 +399,8 @@ pipeline {
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
booleanParam(name: 'eNB_mergeRequest', value: true) booleanParam(name: 'eNB_mergeRequest', value: true),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
] ]
} }
} else { } else {
...@@ -444,7 +445,8 @@ pipeline { ...@@ -444,7 +445,8 @@ pipeline {
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
booleanParam(name: 'eNB_mergeRequest', value: true) booleanParam(name: 'eNB_mergeRequest', value: true),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
] ]
} }
} else { } else {
...@@ -489,7 +491,8 @@ pipeline { ...@@ -489,7 +491,8 @@ pipeline {
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
booleanParam(name: 'eNB_mergeRequest', value: true) booleanParam(name: 'eNB_mergeRequest', value: true),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
] ]
} }
} else { } else {
...@@ -534,7 +537,8 @@ pipeline { ...@@ -534,7 +537,8 @@ pipeline {
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
booleanParam(name: 'eNB_mergeRequest', value: true) booleanParam(name: 'eNB_mergeRequest', value: true),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
] ]
} }
} else { } else {
......
...@@ -115,8 +115,10 @@ pipeline { ...@@ -115,8 +115,10 @@ pipeline {
} else { } else {
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) { for (xmlFile in myXmlTestSuite) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " " if (fileExists("ci-scripts/" + xmlFile)) {
echo "Test XML file : ${xmlFile}" mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
}
} }
} }
// If not present picking a default Stage Name // If not present picking a default Stage Name
...@@ -191,6 +193,13 @@ pipeline { ...@@ -191,6 +193,13 @@ pipeline {
if (allParametersPresent) { if (allParametersPresent) {
echo "All parameters are present" echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else { } else {
echo "Some parameters are missing" echo "Some parameters are missing"
sh "./ci-scripts/fail.sh" sh "./ci-scripts/fail.sh"
...@@ -211,6 +220,7 @@ pipeline { ...@@ -211,6 +220,7 @@ pipeline {
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}" sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) { for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try { try {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}" sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
} catch (Exception e) { } catch (Exception e) {
...@@ -218,6 +228,7 @@ pipeline { ...@@ -218,6 +228,7 @@ pipeline {
buildStageStatus = false buildStageStatus = false
} }
} }
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
} }
} }
......
...@@ -180,7 +180,7 @@ echo "Checking build status" ...@@ -180,7 +180,7 @@ echo "Checking build status"
echo "############################################################" echo "############################################################"
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4 NB_PATTERN_FILES=7
LOG_FILES=`ls $ARCHIVES_LOC/*.txt` LOG_FILES=`ls $ARCHIVES_LOC/*.txt`
STATUS=0 STATUS=0
...@@ -204,12 +204,13 @@ then ...@@ -204,12 +204,13 @@ then
STATUS=-1 STATUS=-1
fi fi
echo "COMMAND: build_oai -I -w USRP --eNB" > $ARCHIVES_LOC/build_final_status.log
if [ $STATUS -eq 0 ] if [ $STATUS -eq 0 ]
then then
echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log echo "BUILD_OK" >> $ARCHIVES_LOC/build_final_status.log
echo "STATUS seems OK" echo "STATUS seems OK"
else else
echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log echo "BUILD_KO" >> $ARCHIVES_LOC/build_final_status.log
echo "STATUS failed?" echo "STATUS failed?"
fi fi
exit $STATUS exit $STATUS
...@@ -103,6 +103,11 @@ esac ...@@ -103,6 +103,11 @@ esac
done done
if [[ $TARGET_COMMIT_ID == "latest" ]]
then
TARGET_COMMIT_ID=`git log -n1 --pretty=format:%H origin/$TARGET_BRANCH`
fi
echo "Source Branch is : $SOURCE_BRANCH" echo "Source Branch is : $SOURCE_BRANCH"
echo "Source Commit ID is : $SOURCE_COMMIT_ID" echo "Source Commit ID is : $SOURCE_COMMIT_ID"
echo "Target Branch is : $TARGET_BRANCH" echo "Target Branch is : $TARGET_BRANCH"
......
...@@ -69,7 +69,7 @@ VM_MEMORY=2048 ...@@ -69,7 +69,7 @@ VM_MEMORY=2048
VM_CPU=4 VM_CPU=4
ARCHIVES_LOC=enb_usrp ARCHIVES_LOC=enb_usrp
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4 NB_PATTERN_FILES=7
BUILD_OPTIONS="--eNB -w USRP" BUILD_OPTIONS="--eNB -w USRP"
KEEP_VM_ALIVE=0 KEEP_VM_ALIVE=0
RUN_OPTIONS="none" RUN_OPTIONS="none"
...@@ -231,7 +231,7 @@ case $key in ...@@ -231,7 +231,7 @@ case $key in
VM_NAME=ci-enb-usrp VM_NAME=ci-enb-usrp
ARCHIVES_LOC=enb_usrp ARCHIVES_LOC=enb_usrp
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4 NB_PATTERN_FILES=7
BUILD_OPTIONS="--eNB -w USRP --mu" BUILD_OPTIONS="--eNB -w USRP --mu"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
shift shift
...@@ -272,7 +272,7 @@ case $key in ...@@ -272,7 +272,7 @@ case $key in
VM_NAME=ci-enb-ethernet VM_NAME=ci-enb-ethernet
ARCHIVES_LOC=enb_eth ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6 NB_PATTERN_FILES=8
BUILD_OPTIONS="--eNB -t ETHERNET --noS1" BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
shift shift
...@@ -281,7 +281,7 @@ case $key in ...@@ -281,7 +281,7 @@ case $key in
VM_NAME=ci-ue-ethernet VM_NAME=ci-ue-ethernet
ARCHIVES_LOC=ue_eth ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6 NB_PATTERN_FILES=8
BUILD_OPTIONS="--UE -t ETHERNET --noS1" BUILD_OPTIONS="--UE -t ETHERNET --noS1"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
shift shift
...@@ -292,7 +292,7 @@ case $key in ...@@ -292,7 +292,7 @@ case $key in
VM_CPU=8 VM_CPU=8
ARCHIVES_LOC=l2_sim ARCHIVES_LOC=l2_sim
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4 NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET" BUILD_OPTIONS="--eNB -t ETHERNET"
RUN_OPTIONS="complex" RUN_OPTIONS="complex"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
...@@ -314,7 +314,7 @@ case $key in ...@@ -314,7 +314,7 @@ case $key in
VM_NAME=ci-enb-usrp VM_NAME=ci-enb-usrp
ARCHIVES_LOC=enb_usrp ARCHIVES_LOC=enb_usrp
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4 NB_PATTERN_FILES=7
BUILD_OPTIONS="--eNB -w USRP --mu" BUILD_OPTIONS="--eNB -w USRP --mu"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
;; ;;
...@@ -351,7 +351,7 @@ case $key in ...@@ -351,7 +351,7 @@ case $key in
VM_NAME=ci-enb-ethernet VM_NAME=ci-enb-ethernet
ARCHIVES_LOC=enb_eth ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6 NB_PATTERN_FILES=8
BUILD_OPTIONS="--eNB -t ETHERNET --noS1" BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
;; ;;
...@@ -359,7 +359,7 @@ case $key in ...@@ -359,7 +359,7 @@ case $key in
VM_NAME=ci-ue-ethernet VM_NAME=ci-ue-ethernet
ARCHIVES_LOC=ue_eth ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6 NB_PATTERN_FILES=8
BUILD_OPTIONS="--UE -t ETHERNET --noS1" BUILD_OPTIONS="--UE -t ETHERNET --noS1"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
;; ;;
...@@ -369,7 +369,7 @@ case $key in ...@@ -369,7 +369,7 @@ case $key in
VM_CPU=8 VM_CPU=8
ARCHIVES_LOC=l2_sim ARCHIVES_LOC=l2_sim
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4 NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET" BUILD_OPTIONS="--eNB -t ETHERNET"
RUN_OPTIONS="complex" RUN_OPTIONS="complex"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
...@@ -510,13 +510,16 @@ else ...@@ -510,13 +510,16 @@ else
fi fi
fi fi
# Checking uvt-kvm is installed if [ $REPORT_BUILD_CMD -ne 1 ] && [ $REPORT_TEST_CMD -ne 1 ]
UVT_KVM_PATH=`which uvt-kvm | grep -c uvt-kvm`
if [ $UVT_KVM_PATH -eq 0 ]
then then
echo "Error: uvt-kvm is not installed" # Checking uvt-kvm is installed
top_usage UVT_KVM_PATH=`which uvt-kvm | grep -c uvt-kvm`
exit 1 if [ $UVT_KVM_PATH -eq 0 ]
then
echo "Error: uvt-kvm is not installed"
top_usage
exit 1
fi
fi fi
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ] if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
......
...@@ -143,13 +143,21 @@ function summary_table_header { ...@@ -143,13 +143,21 @@ function summary_table_header {
echo " <h3>$1</h3>" >> ./build_results.html echo " <h3>$1</h3>" >> ./build_results.html
if [ -f $2/build_final_status.log ] if [ -f $2/build_final_status.log ]
then then
if [ `grep -c COMMAND $2/build_final_status.log` -eq 1 ]
then
COMMAND=`grep COMMAND $2/build_final_status.log | sed -e "s#COMMAND: ##"`
else
COMMAND="Unknown"
fi
if [ `grep -c BUILD_OK $2/build_final_status.log` -eq 1 ] if [ `grep -c BUILD_OK $2/build_final_status.log` -eq 1 ]
then then
echo " <div class=\"alert alert-success\">" >> ./build_results.html echo " <div class=\"alert alert-success\">" >> ./build_results.html
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <span class=\"glyphicon glyphicon-arrow-right\"></span> " >> ./build_results.html
echo " <strong>BUILD was SUCCESSFUL <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html echo " <strong>BUILD was SUCCESSFUL <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
echo " </div>" >> ./build_results.html echo " </div>" >> ./build_results.html
else else
echo " <div class=\"alert alert-danger\">" >> ./build_results.html echo " <div class=\"alert alert-danger\">" >> ./build_results.html
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <span class=\"glyphicon glyphicon-arrow-right\"></span> " >> ./build_results.html
echo " <strong>BUILD was a FAILURE! <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html echo " <strong>BUILD was a FAILURE! <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
echo " </div>" >> ./build_results.html echo " </div>" >> ./build_results.html
fi fi
...@@ -220,6 +228,13 @@ function sca_summary_table_header { ...@@ -220,6 +228,13 @@ function sca_summary_table_header {
NB_WARNINGS=`egrep -c "severity=\"warning\"" $1` NB_WARNINGS=`egrep -c "severity=\"warning\"" $1`
ADDED_ERRORS="0" ADDED_ERRORS="0"
ADDED_WARNINGS="0" ADDED_WARNINGS="0"
FINAL_LOG=`echo $1 | sed -e "s#cppcheck\.xml#build_final_status.log#"`
if [ `grep -c COMMAND $FINAL_LOG` -eq 1 ]
then
COMMAND=`grep COMMAND $FINAL_LOG | sed -e "s#COMMAND: ##"`
else
COMMAND="Unknown"
fi
if [ $MR_TRIG -eq 1 ] if [ $MR_TRIG -eq 1 ]
then then
if [ -d ../../cppcheck_archives ] if [ -d ../../cppcheck_archives ]
...@@ -237,12 +252,14 @@ function sca_summary_table_header { ...@@ -237,12 +252,14 @@ function sca_summary_table_header {
if [ $NB_ERRORS -eq 0 ] && [ $NB_WARNINGS -eq 0 ] if [ $NB_ERRORS -eq 0 ] && [ $NB_WARNINGS -eq 0 ]
then then
echo " <div class=\"alert alert-success\">" >> ./build_results.html echo " <div class=\"alert alert-success\">" >> ./build_results.html
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <br><br>" >> ./build_results.html
echo " <strong>CPPCHECK found NO error and NO warning <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html echo " <strong>CPPCHECK found NO error and NO warning <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
echo " </div>" >> ./build_results.html echo " </div>" >> ./build_results.html
else else
if [ $NB_ERRORS -eq 0 ] if [ $NB_ERRORS -eq 0 ]
then then
echo " <div class=\"alert alert-warning\">" >> ./build_results.html echo " <div class=\"alert alert-warning\">" >> ./build_results.html
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <br><br>" >> ./build_results.html
if [ $PU_TRIG -eq 1 ] if [ $PU_TRIG -eq 1 ]
then then
echo " <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html echo " <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
...@@ -259,6 +276,7 @@ function sca_summary_table_header { ...@@ -259,6 +276,7 @@ function sca_summary_table_header {
echo " </div>" >> ./build_results.html echo " </div>" >> ./build_results.html
else else
echo " <div class=\"alert alert-danger\">" >> ./build_results.html echo " <div class=\"alert alert-danger\">" >> ./build_results.html
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <br><br>" >> ./build_results.html
if [ $PU_TRIG -eq 1 ] if [ $PU_TRIG -eq 1 ]
then then
echo " <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html echo " <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
...@@ -543,7 +561,8 @@ function report_build { ...@@ -543,7 +561,8 @@ function report_build {
summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_usrp/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_usrp_row4.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row5.html
summary_table_footer summary_table_footer
summary_table_header "OAI Build basic simulator option" ./archives/basic_sim summary_table_header "OAI Build basic simulator option" ./archives/basic_sim
...@@ -586,6 +605,8 @@ function report_build { ...@@ -586,6 +605,8 @@ function report_build {
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 "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 "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_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
...@@ -595,6 +616,8 @@ function report_build { ...@@ -595,6 +616,8 @@ function report_build {
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 "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 "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_footer summary_table_footer
if [ -e ./archives/red_hat ] if [ -e ./archives/red_hat ]
...@@ -605,7 +628,8 @@ function report_build { ...@@ -605,7 +628,8 @@ function report_build {
summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html summary_table_row "OAI ETHERNET transport - Release 14" ./archives/red_hat/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_usrp_rh_row4.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row5.html
summary_table_footer summary_table_footer
fi fi
......
...@@ -377,7 +377,7 @@ function report_test { ...@@ -377,7 +377,7 @@ function report_test {
fi fi
PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'`
if [[ $PERF_INT -lt 90 ]] if [[ $PERF_INT -lt 70 ]]
then then
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
else else
......
This diff is collapsed.
...@@ -185,10 +185,16 @@ function check_on_vm_build { ...@@ -185,10 +185,16 @@ function check_on_vm_build {
fi fi
fi fi
if [[ "$VM_NAME" == *"-cppcheck"* ]]
then
echo "COMMAND: cppcheck $BUILD_OPTIONS . 2> cppcheck.xml" > $ARCHIVES_LOC/build_final_status.log
else
echo "COMMAND: build_oai -I $BUILD_OPTIONS" > $ARCHIVES_LOC/build_final_status.log
fi
if [[ $STATUS -eq 0 ]] if [[ $STATUS -eq 0 ]]
then then
echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log echo "BUILD_OK" >> $ARCHIVES_LOC/build_final_status.log
else else
echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log echo "BUILD_KO" >> $ARCHIVES_LOC/build_final_status.log
fi fi
} }
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<class>Ping</class> <class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc> <desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args> <ping_args>-c 20</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold> <ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase> </testCase>
<testCase id="040601"> <testCase id="040601">
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)</desc> <desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)</desc>
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args> <iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold> <iperf_packetloss_threshold>80</iperf_packetloss_threshold>
<iperf_profile>unbalanced</iperf_profile> <iperf_profile>unbalanced</iperf_profile>
</testCase> </testCase>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<class>Ping</class> <class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc> <desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args> <ping_args>-c 20</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold> <ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase> </testCase>
<testCase id="040602"> <testCase id="040602">
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
# Author: laurent THOMAS, Lionel GAUTHIER # Author: laurent THOMAS, Lionel GAUTHIER
cmake_minimum_required (VERSION 2.8) cmake_minimum_required (VERSION 3.0)
############################################# #############################################
# Base directories, compatible with legacy OAI building # Base directories, compatible with legacy OAI building
...@@ -169,11 +169,12 @@ endif() ...@@ -169,11 +169,12 @@ endif()
set(CMAKE_C_FLAGS set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ") "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ")
# add autotools definitions that were maybe used! # add autotools definitions that were maybe used!
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
set(CMAKE_C_FLAGS set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'" "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER}"
) )
set(CMAKE_CXX_FLAGS set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'" "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -D${MKVER}"
) )
add_definitions("-DASN_DISABLE_OER_SUPPORT") add_definitions("-DASN_DISABLE_OER_SUPPORT")
...@@ -469,6 +470,7 @@ add_library(X2AP_ENB ...@@ -469,6 +470,7 @@ add_library(X2AP_ENB
${X2AP_DIR}/x2ap_eNB_itti_messaging.c ${X2AP_DIR}/x2ap_eNB_itti_messaging.c
${X2AP_DIR}/x2ap_eNB_management_procedures.c ${X2AP_DIR}/x2ap_eNB_management_procedures.c
${X2AP_DIR}/x2ap_eNB_generate_messages.c ${X2AP_DIR}/x2ap_eNB_generate_messages.c
${X2AP_DIR}/x2ap_ids.c
) )
add_dependencies(X2AP_ENB rrc_flag x2_flag) add_dependencies(X2AP_ENB rrc_flag x2_flag)
...@@ -477,7 +479,8 @@ add_dependencies(X2AP_ENB rrc_flag x2_flag) ...@@ -477,7 +479,8 @@ add_dependencies(X2AP_ENB rrc_flag x2_flag)
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4") add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4") add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "EXMIMO" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR") add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "EXMIMO" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR" "OAI_SIMU")
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET") add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
#NOKIA config enhancement #NOKIA config enhancement
...@@ -585,6 +588,8 @@ set(HWLIB_TCP_BRIDGE_OAI_SOURCE ...@@ -585,6 +588,8 @@ set(HWLIB_TCP_BRIDGE_OAI_SOURCE
add_library(tcp_bridge_oai MODULE ${HWLIB_TCP_BRIDGE_OAI_SOURCE} ) add_library(tcp_bridge_oai MODULE ${HWLIB_TCP_BRIDGE_OAI_SOURCE} )
set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
add_library(rfsimulator MODULE ${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c)
########################################################## ##########################################################
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON") include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
...@@ -1283,7 +1288,7 @@ set(L2_SRC ...@@ -1283,7 +1288,7 @@ set(L2_SRC
${RLC_DIR}/rlc.c ${RLC_DIR}/rlc.c
${RLC_DIR}/rlc_rrc.c ${RLC_DIR}/rlc_rrc.c
${RLC_DIR}/rlc_mpls.c ${RLC_DIR}/rlc_mpls.c
${RRC_DIR}/rrc_UE.c # ${RRC_DIR}/rrc_UE.c
${RRC_DIR}/rrc_eNB.c ${RRC_DIR}/rrc_eNB.c
${RRC_DIR}/rrc_eNB_S1AP.c ${RRC_DIR}/rrc_eNB_S1AP.c
${RRC_DIR}/rrc_eNB_UE_context.c ${RRC_DIR}/rrc_eNB_UE_context.c
...@@ -1949,6 +1954,8 @@ add_executable(lte-softmodem ...@@ -1949,6 +1954,8 @@ add_executable(lte-softmodem
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
......
This diff is collapsed.
...@@ -289,7 +289,7 @@ void usage(void) { ...@@ -289,7 +289,7 @@ void usage(void) {
" -max-sib <n> report at maximum n SIBs\n" " -max-sib <n> report at maximum n SIBs\n"
" -live run live\n" " -live run live\n"
" -live-ip <IP address> tracee's IP address (default %s)\n" " -live-ip <IP address> tracee's IP address (default %s)\n"
" -live-port <por> tracee's port (default %d)\n" " -live-port <port> tracee's port (default %d)\n"
"-i and -live are mutually exclusive options. One of them must be provided\n" "-i and -live are mutually exclusive options. One of them must be provided\n"
"but not both.\n", "but not both.\n",
DEFAULT_IP, DEFAULT_IP,
......
...@@ -77,17 +77,17 @@ paramdef_t telnetoptions[] = { ...@@ -77,17 +77,17 @@ paramdef_t telnetoptions[] = {
/* configuration parameters for telnet utility */ /* configuration parameters for telnet utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
{"listenaddr", "<listen ip address>", 0, uptr:&telnetparams.listenaddr, defstrval:"0.0.0.0", TYPE_IPV4ADDR, 0 }, {"listenaddr", "<listen ip address>\n", 0, uptr:&telnetparams.listenaddr, defstrval:"0.0.0.0", TYPE_IPV4ADDR, 0 },
{"listenport", "<local port>", 0, uptr:&(telnetparams.listenport), defuintval:9090, TYPE_UINT, 0 }, {"listenport", "<local port>\n", 0, uptr:&(telnetparams.listenport), defuintval:9090, TYPE_UINT, 0 },
{"priority", "<scheduling policy (0-99)", 0, iptr:&telnetparams.priority, defuintval:0, TYPE_INT, 0 }, {"priority", "<scheduling policy (0-99)\n", 0, iptr:&telnetparams.priority, defuintval:0, TYPE_INT, 0 },
{"debug", "<debug level>", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0 }, {"debug", "<debug level>\n", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0 },
{"loopcount", "<loop command iterations>", 0, uptr:&(telnetparams.loopcount), defuintval:10, TYPE_UINT, 0 }, {"loopcount", "<loop command iterations>\n", 0, uptr:&(telnetparams.loopcount), defuintval:10, TYPE_UINT, 0 },
{"loopdelay", "<loop command delay (ms)>", 0, uptr:&(telnetparams.loopdelay), defuintval:5000, TYPE_UINT, 0 }, {"loopdelay", "<loop command delay (ms)>\n", 0, uptr:&(telnetparams.loopdelay), defuintval:5000, TYPE_UINT, 0 },
{"histfile", "<history file name>", PARAMFLAG_NOFREE, strptr:&(telnetparams.histfile), defstrval:"oaitelnet.history", TYPE_STRING, 0 }, {"histfile", "<history file name>\n", PARAMFLAG_NOFREE, strptr:&(telnetparams.histfile), defstrval:"oaitelnet.history", TYPE_STRING, 0 },
{"histsize", "<history sizes>", 0, iptr:&(telnetparams.histsize), defuintval:50, TYPE_INT, 0 }, {"histsize", "<history sizes>\n", 0, iptr:&(telnetparams.histsize), defuintval:50, TYPE_INT, 0 },
{"phypbsize", "<phy dump buff size (bytes)>",0, uptr:&(telnetparams.phyprntbuff_size),defuintval:65000, TYPE_UINT, 0 }, {"phypbsize", "<phy dump buff size (bytes)>\n",0, uptr:&(telnetparams.phyprntbuff_size),defuintval:65000, TYPE_UINT, 0 },
{"staticmod", "<static modules selection>", 0, strlistptr:NULL, defstrlistval:telnet_defstatmod,TYPE_STRINGLIST,(sizeof(telnet_defstatmod)/sizeof(char *))}, {"staticmod", "<static modules selection>\n", 0, strlistptr:NULL, defstrlistval:telnet_defstatmod,TYPE_STRINGLIST,(sizeof(telnet_defstatmod)/sizeof(char *))},
{"shrmod", "<dynamic modules selection>", 0, strlistptr:NULL, defstrlistval:NULL,TYPE_STRINGLIST,0 } {"shrmod", "<dynamic modules selection>\n", 0, strlistptr:NULL, defstrlistval:NULL,TYPE_STRINGLIST,0 }
}; };
int get_phybsize(void) { int get_phybsize(void) {
...@@ -355,7 +355,7 @@ int setgetvar(int moduleindex,char getorset,char *params) { ...@@ -355,7 +355,7 @@ int setgetvar(int moduleindex,char getorset,char *params) {
char varname[TELNET_CMD_MAXSIZE]; char varname[TELNET_CMD_MAXSIZE];
char *varval=NULL; char *varval=NULL;
memset(varname,0,sizeof(varname)); memset(varname,0,sizeof(varname));
n = sscanf(params,"%19s %ms",varname,&varval); n = sscanf(params,"%9s %ms",varname,&varval);
for ( i=0 ; telnetparams.CmdParsers[moduleindex].var[i].varvalptr != NULL ; i++) { for ( i=0 ; telnetparams.CmdParsers[moduleindex].var[i].varvalptr != NULL ; i++) {
if ( strncasecmp(telnetparams.CmdParsers[moduleindex].var[i].varname,varname,strlen(telnetparams.CmdParsers[moduleindex].var[i].varname)) == 0) { if ( strncasecmp(telnetparams.CmdParsers[moduleindex].var[i].varname,varname,strlen(telnetparams.CmdParsers[moduleindex].var[i].varname)) == 0) {
...@@ -475,7 +475,7 @@ int process_command(char *buf) { ...@@ -475,7 +475,7 @@ int process_command(char *buf) {
memset(cmdb,0,sizeof(cmdb)); memset(cmdb,0,sizeof(cmdb));
bufbck=strdup(buf); bufbck=strdup(buf);
rt=CMDSTATUS_NOTFOUND; rt=CMDSTATUS_NOTFOUND;
j = sscanf(buf,"%9s %9s %2000[^\t\n]",modulename,cmd,cmdb); j = sscanf(buf,"%9s %9s %9[^\t\n]",modulename,cmd,cmdb);
if (telnetparams.telnetdbg > 0) if (telnetparams.telnetdbg > 0)
printf("process_command: %i words, module=%s cmd=%s, parameters= %s\n",j,modulename,cmd,cmdb); printf("process_command: %i words, module=%s cmd=%s, parameters= %s\n",j,modulename,cmd,cmdb);
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file common/utils/telnetsrv/telnetsrv_ltemeasur_def.h
* \brief: definitions of macro used to initialize the telnet_ltemeasurdef_t
* \ strucures arrays which are then used by the display functions
* \ in telnetsrv_measurements.c.
* \author Francois TABURET
* \date 2019
* \version 0.1
* \company NOKIA BellLabs France
* \email: francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
#define LTEMAC_MEASURE \
{ \
{"total_num_bcch_pdu", &(macstatptr->total_num_bcch_pdu),TELNET_VARTYPE_INT32,0},\
{"bcch_buffer", &(macstatptr->bcch_buffer),TELNET_VARTYPE_INT32,0},\
{"total_bcch_buffer", &(macstatptr->total_bcch_buffer),TELNET_VARTYPE_INT32,0},\
{"bcch_mcs", &(macstatptr->bcch_mcs),TELNET_VARTYPE_INT32,0},\
{"total_num_ccch_pdu", &(macstatptr->total_num_ccch_pdu),TELNET_VARTYPE_INT32,0},\
{"ccch_buffer", &(macstatptr->ccch_buffer),TELNET_VARTYPE_INT32,0},\
{"total_ccch_buffer", &(macstatptr->total_ccch_buffer),TELNET_VARTYPE_INT32,0},\
{"ccch_mcs", &(macstatptr->ccch_mcs),TELNET_VARTYPE_INT32,0},\
{"total_num_pcch_pdu", &(macstatptr->total_num_pcch_pdu),TELNET_VARTYPE_INT32,0},\
{"pcch_buffer", &(macstatptr->pcch_buffer),TELNET_VARTYPE_INT32,0},\
{"total_pcch_buffer", &(macstatptr->total_pcch_buffer),TELNET_VARTYPE_INT32,0},\
{"pcch_mcs", &(macstatptr->pcch_mcs),TELNET_VARTYPE_INT32,0},\
{"num_dlactive_UEs", &(macstatptr->num_dlactive_UEs),TELNET_VARTYPE_INT16,0},\
{"available_prbs", &(macstatptr->available_prbs),TELNET_VARTYPE_INT16,0},\
{"total_available_prbs", &(macstatptr->total_available_prbs),TELNET_VARTYPE_INT32,0},\
{"available_ncces", &(macstatptr->available_ncces),TELNET_VARTYPE_INT16,0},\
{"dlsch_bitrate", &(macstatptr->dlsch_bitrate),TELNET_VARTYPE_INT32,0},\
{"dlsch_bytes_tx", &(macstatptr->dlsch_bytes_tx),TELNET_VARTYPE_INT32,0},\
{"dlsch_pdus_tx", &(macstatptr->dlsch_pdus_tx),TELNET_VARTYPE_INT32,0},\
{"total_dlsch_bitrate", &(macstatptr->total_dlsch_bitrate),TELNET_VARTYPE_INT32,0},\
{"total_dlsch_bytes_tx", &(macstatptr->total_dlsch_bytes_tx),TELNET_VARTYPE_INT32,0},\
{"total_dlsch_pdus_tx", &(macstatptr->total_dlsch_pdus_tx),TELNET_VARTYPE_INT32,0},\
{"ulsch_bitrate", &(macstatptr->ulsch_bitrate),TELNET_VARTYPE_INT32,0},\
{"ulsch_bytes_rx", &(macstatptr->ulsch_bytes_rx),TELNET_VARTYPE_INT32,0},\
{"ulsch_pdus_rx", &(macstatptr->ulsch_pdus_rx),TELNET_VARTYPE_INT32,0},\
{"total_ulsch_bitrate", &(macstatptr->total_ulsch_bitrate),TELNET_VARTYPE_INT32,0},\
{"total_ulsch_bytes_rx", &(macstatptr->total_ulsch_bytes_rx),TELNET_VARTYPE_INT32,0},\
{"total_ulsch_pdus_rx", &(macstatptr->total_ulsch_pdus_rx),TELNET_VARTYPE_INT32,0},\
{"sched_decisions", &(macstatptr->sched_decisions),TELNET_VARTYPE_INT32,0},\
{"missed_deadlines", &(macstatptr->missed_deadlines),TELNET_VARTYPE_INT32,0},\
}
#define LTEMAC_UEMEASURE \
{ \
{"dlsch_mcs1", &(macuestatptr->dlsch_mcs1),TELNET_VARTYPE_INT8,0},\
{"dlsch_mcs2", &(macuestatptr->dlsch_mcs2),TELNET_VARTYPE_INT8,0},\
{"rbs_used", &(macuestatptr->rbs_used),TELNET_VARTYPE_INT32,0},\
{"rbs_used_retx", &(macuestatptr->rbs_used_retx),TELNET_VARTYPE_INT16,0},\
{"total_rbs_used", &(macuestatptr->total_rbs_used),TELNET_VARTYPE_INT16,0},\
{"ncce_used", &(macuestatptr->ncce_used),TELNET_VARTYPE_INT16,0},\
{"ncce_used_retx", &(macuestatptr->ncce_used_retx),TELNET_VARTYPE_INT16,0},\
{"TBS", &(macuestatptr->TBS),TELNET_VARTYPE_INT32,0},\
{"total_pdu_bytes", &(macuestatptr->total_pdu_bytes),TELNET_VARTYPE_INT64,0},\
{"total_num_pdus", &(macuestatptr->total_num_pdus),TELNET_VARTYPE_INT32,0},\
{"overhead_bytes", &(macuestatptr->overhead_bytes),TELNET_VARTYPE_INT64,0},\
{"crnti", &(macuestatptr->crnti),TELNET_VARTYPE_INT16,0},\
{"normalized_rx_power", &(macuestatptr->normalized_rx_power),TELNET_VARTYPE_INT32,0},\
{"target_rx_power", &(macuestatptr->target_rx_power),TELNET_VARTYPE_INT32,0},\
{"ulsch_mcs1", &(macuestatptr->ulsch_mcs1),TELNET_VARTYPE_INT8,0},\
{"ulsch_mcs2", &(macuestatptr->ulsch_mcs2),TELNET_VARTYPE_INT8,0},\
{"rbs_used_rx", &(macuestatptr->rbs_used_rx),TELNET_VARTYPE_INT32,0},\
{"rbs_used_retx_rx", &(macuestatptr->rbs_used_retx_rx),TELNET_VARTYPE_INT32,0},\
{"total_rbs_used_rx", &(macuestatptr->total_rbs_used_rx),TELNET_VARTYPE_INT32,0},\
{"ulsch_TBS", &(macuestatptr->ulsch_TBS),TELNET_VARTYPE_INT32,0},\
{"total_pdu_bytes_rx", &(macuestatptr->total_pdu_bytes_rx),TELNET_VARTYPE_INT64,0},\
{"total_num_pdus_rx", &(macuestatptr->total_num_pdus_rx),TELNET_VARTYPE_INT32,0},\
{"num_errors_rx", &(macuestatptr->num_errors_rx),TELNET_VARTYPE_INT32,0},\
}
#define LTE_RLCMEASURE \
{ \
{"rlc_mode", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_pdcp_sdu", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_pdcp_bytes", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_pdcp_sdu_discarded", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_pdcp_bytes_discarded", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_data_pdu", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_data_bytes", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_retransmit_pdu_by_status", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_retransmit_bytes_by_status", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_retransmit_pdu", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_retransmit_bytes", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_control_pdu", NULL, TELNET_VARTYPE_UINT, 0},\
{"tx_control_bytes", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_pdcp_sdu", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_pdcp_bytes", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_pdus_duplicate", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_bytes_duplicate", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_pdu", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_bytes", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_pdu_dropped", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_bytes_dropped", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_pdu_out_of_window", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_data_bytes_out_of_window", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_control_pdu", NULL, TELNET_VARTYPE_UINT, 0},\
{"rx_control_bytes", NULL, TELNET_VARTYPE_UINT, 0},\
{"timer_reorder_tout", NULL, TELNET_VARTYPE_UINT, 0},\
{"timer_poll_retrans_tout", NULL, TELNET_VARTYPE_UINT, 0},\
{"timer_status_prohibit_tout", NULL, TELNET_VARTYPE_UINT, 0},\
}
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* \note * \note
* \warning * \warning
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
#include <string.h> #include <string.h>
#include <pthread.h> #include <pthread.h>
...@@ -39,88 +39,104 @@ ...@@ -39,88 +39,104 @@
#define TELNETSRV_PHYCMD_MAIN #define TELNETSRV_PHYCMD_MAIN
#include "telnetsrv_phycmd.h" #include "telnetsrv_phycmd.h"
char *prnbuff; char *prnbuff;
extern int dump_eNB_l2_stats(char *buffer, int length); extern int dump_eNB_stats(PHY_VARS_eNB *eNB, char* buffer, int length);
void init_phytelnet(void) { void init_phytelnet(void)
prnbuff=malloc(get_phybsize() ); {
prnbuff=malloc(get_phybsize() );
if (prnbuff == NULL) { if (prnbuff == NULL)
fprintf(stderr,"Error %s on malloc in init_phytelnet()\n",strerror(errno)); {
} fprintf(stderr,"Error %s on malloc in init_phytelnet()\n",strerror(errno));
}
} }
void display_uestatshead( telnet_printfunc_t prnt) { void display_uestatshead( telnet_printfunc_t prnt)
prnt("cc ue rnti Dmcs Umcs tao tau Dbr Dtb \n"); {
prnt("cc ue rnti Dmcs Umcs tao tau Dbr Dtb \n");
} }
void dump_uestats(int debug, telnet_printfunc_t prnt, uint8_t prntflag) { void dump_uestats(int debug, telnet_printfunc_t prnt, uint8_t prntflag)
int p; {
prnbuff=malloc(20480);
p=dump_eNB_l2_stats( prnbuff, 20480); int p;
if(prntflag>=1) p=dump_eNB_l2_stats( prnbuff, 0);
prnt("%s\n",prnbuff); if(prntflag>=1)
prnt("%s\n",prnbuff);
if(debug>=1)
prnt("%i bytes printed\n",p);
if(debug>=1)
prnt("%i bytes printed\n",p);
free(prnbuff);
} }
void display_uestats(int debug, telnet_printfunc_t prnt, int ue) { void display_uestats(int debug, telnet_printfunc_t prnt, int ue)
for (int cc=0; cc<1 ; cc++) { {
} for (int cc=0; cc<1 ; cc++)
{
}
} }
void display_phycounters(char *buf, int debug, telnet_printfunc_t prnt) { void display_phycounters(char *buf, int debug, telnet_printfunc_t prnt)
prnt(" DLSCH kb DLSCH kb/s\n"); {
dump_uestats(debug, prnt,0); prnt(" DLSCH kb DLSCH kb/s\n");
dump_uestats(debug, prnt,0);
} }
int dump_phyvars(char *buf, int debug, telnet_printfunc_t prnt) { int dump_phyvars(char *buf, int debug, telnet_printfunc_t prnt)
if (debug > 0) {
prnt("phy interface module received %s\n",buf);
if (strcasestr(buf,"phycnt") != NULL) {
display_phycounters(buf, debug, prnt); if (debug > 0)
} prnt("phy interface module received %s\n",buf);
if (strcasestr(buf,"phycnt") != NULL)
if (strcasestr(buf,"uestat") != NULL) { {
char *cptr=strcasestr(buf+sizeof("uestat"),"UE"); display_phycounters(buf, debug, prnt);
display_uestatshead(prnt); }
if (strcasestr(buf,"uestat") != NULL)
if (cptr != NULL) { {
int ueidx = strtol( cptr+sizeof("UE"), NULL, 10); char *cptr=strcasestr(buf+sizeof("uestat"),"UE");
display_uestatshead(prnt);
if (ueidx < NUMBER_OF_UE_MAX && ueidx >= 0) { if (cptr != NULL)
display_uestats(debug, prnt,ueidx); {
} int ueidx = strtol( cptr+sizeof("UE"), NULL, 10);
} /* if cptr != NULL */ if (ueidx < NUMBER_OF_UE_MAX && ueidx >= 0)
else { {
for (int ue=0; ue<NUMBER_OF_UE_MAX ; ue++) { display_uestats(debug, prnt,ueidx);
display_uestats(debug, prnt,ue); }
} } /* if cptr != NULL */
} /* else cptr != NULL */ else
} /* uestat */ {
for (int ue=0; ue<NUMBER_OF_UE_MAX ; ue++)
if (strcasestr(buf,"uedump") != NULL) { {
dump_uestats(debug, prnt,1); display_uestats(debug, prnt,ue);
} }
} /* else cptr != NULL */
return 0; } /* uestat */
if (strcasestr(buf,"uedump") != NULL)
{
dump_uestats(debug, prnt,1);
}
return 0;
} }
telnetshell_cmddef_t phy_cmdarray[] = { telnetshell_cmddef_t phy_cmdarray[] = {
{"disp","[phycnt,uedump,uestat UE<x>]", dump_phyvars}, {"disp","[phycnt,uedump,uestat UE<x>]", dump_phyvars},
{"","",NULL}, {"","",NULL},
}; };
/*-------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------*/
void add_phy_cmds(void) { void add_phy_cmds(void)
init_phytelnet(); {
add_telnetcmd("phy", phy_vardef, phy_cmdarray);
init_phytelnet();
add_telnetcmd("phy", phy_vardef, phy_cmdarray);
} }
...@@ -183,7 +183,7 @@ struct dirent *entry; ...@@ -183,7 +183,7 @@ struct dirent *entry;
{ {
if(entry->d_name[0] == '.') if(entry->d_name[0] == '.')
continue; continue;
snprintf(aname, sizeof(aname), "/proc/%d/task/%s/stat", getpid(),entry->d_name); snprintf(aname, sizeof(aname), "/proc/%d/task/%.*s/stat", getpid(),(int)(sizeof(aname)-24),entry->d_name);
read_statfile(aname,debug,prnt); read_statfile(aname,debug,prnt);
} /* while entry != NULL */ } /* while entry != NULL */
closedir(proc_dir); closedir(proc_dir);
......
...@@ -33,31 +33,29 @@ ...@@ -33,31 +33,29 @@
#include "phy_init.h" #include "phy_init.h"
#include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "targets/RT/USER/lte-softmodem.h"
extern PHY_VARS_eNB *eNB; extern PHY_VARS_eNB *eNB;
extern PHY_VARS_UE *UE; extern PHY_VARS_UE *UE;
extern RU_t *ru; extern RU_t *ru;
extern void phy_init_RU(RU_t*); extern void phy_init_RU(RU_t *);
void lte_param_init(PHY_VARS_eNB **eNBp, void lte_param_init(PHY_VARS_eNB **eNBp,
PHY_VARS_UE **UEp, PHY_VARS_UE **UEp,
RU_t **rup, RU_t **rup,
unsigned char N_tx_port_eNB, unsigned char N_tx_port_eNB,
unsigned char N_tx_phy, unsigned char N_tx_phy,
unsigned char N_rx_ru, unsigned char N_rx_ru,
unsigned char N_rx_ue, unsigned char N_rx_ue,
unsigned char transmission_mode, unsigned char transmission_mode,
uint8_t extended_prefix_flag, uint8_t extended_prefix_flag,
frame_t frame_type, frame_t frame_type,
uint16_t Nid_cell, uint16_t Nid_cell,
uint8_t tdd_config, uint8_t tdd_config,
uint8_t N_RB_DL, uint8_t N_RB_DL,
uint8_t pa, uint8_t pa,
uint8_t threequarter_fs, uint8_t threequarter_fs,
uint8_t osf, uint8_t osf,
uint32_t perfect_ce) uint32_t perfect_ce) {
{
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
int i; int i;
PHY_VARS_eNB *eNB; PHY_VARS_eNB *eNB;
...@@ -71,23 +69,16 @@ void lte_param_init(PHY_VARS_eNB **eNBp, ...@@ -71,23 +69,16 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
UE = *UEp; UE = *UEp;
ru = *rup; ru = *rup;
printf("eNB %p, UE %p, ru %p\n",eNB,UE,ru); printf("eNB %p, UE %p, ru %p\n",eNB,UE,ru);
memset((void *)eNB,0,sizeof(PHY_VARS_eNB));
memset((void *)UE,0,sizeof(PHY_VARS_UE));
memset((void *)ru,0,sizeof(RU_t));
memset((void*)eNB,0,sizeof(PHY_VARS_eNB));
memset((void*)UE,0,sizeof(PHY_VARS_UE));
memset((void*)ru,0,sizeof(RU_t));
ru->eNB_list[0] = eNB; ru->eNB_list[0] = eNB;
eNB->RU_list[0] = ru; eNB->RU_list[0] = ru;
ru->num_eNB=1; ru->num_eNB=1;
srand(0); srand(0);
randominit(0); randominit(0);
set_taus_seed(0); set_taus_seed(0);
frame_parms = &(eNB->frame_parms); frame_parms = &(eNB->frame_parms);
frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
frame_parms->N_RB_UL = N_RB_DL; frame_parms->N_RB_UL = N_RB_DL;
frame_parms->threequarter_fs = threequarter_fs; frame_parms->threequarter_fs = threequarter_fs;
...@@ -106,13 +97,9 @@ void lte_param_init(PHY_VARS_eNB **eNBp, ...@@ -106,13 +97,9 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
// frame_parms->Bsrs = 0; // frame_parms->Bsrs = 0;
// frame_parms->kTC = 0;44 // frame_parms->kTC = 0;44
// frame_parms->n_RRC = 0; // frame_parms->n_RRC = 0;
init_frame_parms(frame_parms,osf); init_frame_parms(frame_parms,osf);
//copy_lte_parms_to_phy_framing(frame_parms, &(PHY_config->PHY_framing)); //copy_lte_parms_to_phy_framing(frame_parms, &(PHY_config->PHY_framing));
// phy_init_top(frame_parms); //allocation // phy_init_top(frame_parms); //allocation
UE->is_secondary_ue = 0; UE->is_secondary_ue = 0;
UE->frame_parms = *frame_parms; UE->frame_parms = *frame_parms;
UE->frame_parms.nb_antennas_rx=N_rx_ue; UE->frame_parms.nb_antennas_rx=N_rx_ue;
...@@ -121,14 +108,10 @@ void lte_param_init(PHY_VARS_eNB **eNBp, ...@@ -121,14 +108,10 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
ru->nb_tx = N_tx_phy; ru->nb_tx = N_tx_phy;
ru->nb_rx = N_rx_ru; ru->nb_rx = N_rx_ru;
ru->if_south = LOCAL_RF; ru->if_south = LOCAL_RF;
eNB->configured=1; eNB->configured=1;
eNB->transmission_mode[0] = transmission_mode; eNB->transmission_mode[0] = transmission_mode;
UE->transmission_mode[0] = transmission_mode; UE->transmission_mode[0] = transmission_mode;
dump_frame_parms(frame_parms); dump_frame_parms(frame_parms);
UE->measurements.n_adj_cells=0; UE->measurements.n_adj_cells=0;
UE->measurements.adj_cell_id[0] = Nid_cell+1; UE->measurements.adj_cell_id[0] = Nid_cell+1;
UE->measurements.adj_cell_id[1] = Nid_cell+2; UE->measurements.adj_cell_id[1] = Nid_cell+2;
...@@ -144,7 +127,6 @@ void lte_param_init(PHY_VARS_eNB **eNBp, ...@@ -144,7 +127,6 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
phy_init_RU(ru); phy_init_RU(ru);
generate_pcfich_reg_mapping(&UE->frame_parms); generate_pcfich_reg_mapping(&UE->frame_parms);
generate_phich_reg_mapping(&UE->frame_parms); generate_phich_reg_mapping(&UE->frame_parms);
// DL power control init // DL power control init
//if (transmission_mode == 1) { //if (transmission_mode == 1) {
UE->pdsch_config_dedicated->p_a = pa; UE->pdsch_config_dedicated->p_a = pa;
...@@ -166,17 +148,13 @@ void lte_param_init(PHY_VARS_eNB **eNBp, ...@@ -166,17 +148,13 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
if (eNB->frame_parms.N_RB_DL == 100) ru->N_TA_offset = 624; if (eNB->frame_parms.N_RB_DL == 100) ru->N_TA_offset = 624;
else if (eNB->frame_parms.N_RB_DL == 50) ru->N_TA_offset = 624/2; else if (eNB->frame_parms.N_RB_DL == 50) ru->N_TA_offset = 624/2;
else if (eNB->frame_parms.N_RB_DL == 25) ru->N_TA_offset = 624/4; else if (eNB->frame_parms.N_RB_DL == 25) ru->N_TA_offset = 624/4;
} } else ru->N_TA_offset=0;
else ru->N_TA_offset=0;
#if BASIC_SIMULATOR if (IS_SOFTMODEM_BASICSIM)
/* this is required for the basic simulator in TDD mode /* this is required for the basic simulator in TDD mode
* TODO: find a proper cleaner solution * TODO: find a proper cleaner solution
*/ */
UE->N_TA_offset = 0; UE->N_TA_offset = 0;
#endif
printf("Done lte_param_init\n"); printf("Done lte_param_init\n");
} }
This diff is collapsed.
...@@ -38,72 +38,65 @@ ...@@ -38,72 +38,65 @@
//#include "defs.h" //#include "defs.h"
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "targets/RT/USER/lte-softmodem.h"
int generate_pss(int32_t **txdataF, int generate_pss(int32_t **txdataF,
short amp, short amp,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
unsigned short symbol, unsigned short symbol,
unsigned short slot_offset) unsigned short slot_offset) {
{
unsigned int Nsymb; unsigned int Nsymb;
unsigned short k,m,aa,a; unsigned short k,m,aa,a;
uint8_t Nid2; uint8_t Nid2;
short *primary_sync; short *primary_sync;
Nid2 = frame_parms->Nid_cell % 3; Nid2 = frame_parms->Nid_cell % 3;
switch (Nid2) { switch (Nid2) {
case 0: case 0:
primary_sync = primary_synch0; primary_sync = primary_synch0;
break; break;
case 1: case 1:
primary_sync = primary_synch1; primary_sync = primary_synch1;
break; break;
case 2: case 2:
primary_sync = primary_synch2; primary_sync = primary_synch2;
break; break;
default: default:
LOG_E(PHY,"[PSS] eNb_id has to be 0,1,2\n"); LOG_E(PHY,"[PSS] eNb_id has to be 0,1,2\n");
return(-1); return(-1);
} }
a = (frame_parms->nb_antenna_ports_eNB == 1) ? amp: (amp*ONE_OVER_SQRT2_Q15)>>15; a = (frame_parms->nb_antenna_ports_eNB == 1) ? amp: (amp*ONE_OVER_SQRT2_Q15)>>15;
//printf("[PSS] amp=%d, a=%d\n",amp,a); //printf("[PSS] amp=%d, a=%d\n",amp,a);
#if BASIC_SIMULATOR if (IS_SOFTMODEM_BASICSIM)
/* a hack to remove at some point (the UE doesn't synch with 100 RBs) */ /* a hack to remove at some point (the UE doesn't synch with 100 RBs) */
a = (frame_parms->nb_antenna_ports_eNB == 1) ? 4*amp: (amp*ONE_OVER_SQRT2_Q15)>>15; a = (frame_parms->nb_antenna_ports_eNB == 1) ? 4*amp: (amp*ONE_OVER_SQRT2_Q15)>>15;
#endif
Nsymb = (frame_parms->Ncp==NORMAL)?14:12; Nsymb = (frame_parms->Ncp==NORMAL)?14:12;
for (aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) { for (aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
// aa = 0; // aa = 0;
// The PSS occupies the inner 6 RBs, which start at // The PSS occupies the inner 6 RBs, which start at
k = frame_parms->ofdm_symbol_size-3*12+5; k = frame_parms->ofdm_symbol_size-3*12+5;
//printf("[PSS] k = %d\n",k); //printf("[PSS] k = %d\n",k);
for (m=5; m<67; m++) { for (m=5; m<67; m++) {
((short*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size + ((short *)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
symbol*frame_parms->ofdm_symbol_size + k)] = symbol*frame_parms->ofdm_symbol_size + k)] =
(a * primary_sync[2*m]) >> 15; (a * primary_sync[2*m]) >> 15;
((short*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size + ((short *)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
symbol*frame_parms->ofdm_symbol_size + k) + 1] = symbol*frame_parms->ofdm_symbol_size + k) + 1] =
(a * primary_sync[2*m+1]) >> 15; (a * primary_sync[2*m+1]) >> 15;
k+=1; k+=1;
if (k >= frame_parms->ofdm_symbol_size) { if (k >= frame_parms->ofdm_symbol_size) {
k++; //skip DC k++; //skip DC
k-=frame_parms->ofdm_symbol_size; k-=frame_parms->ofdm_symbol_size;
} }
} }
} }
......
...@@ -63,7 +63,6 @@ struct msghdr nas_msg_rx; ...@@ -63,7 +63,6 @@ struct msghdr nas_msg_rx;
#define GRAAL_NETLINK_ID 31 #define GRAAL_NETLINK_ID 31
static int tun_alloc(char *dev) { static int tun_alloc(char *dev) {
struct ifreq ifr; struct ifreq ifr;
int fd, err; int fd, err;
...@@ -93,12 +92,12 @@ static int tun_alloc(char *dev) { ...@@ -93,12 +92,12 @@ static int tun_alloc(char *dev) {
return fd; return fd;
} }
int netlink_init_tun(void) { int netlink_init_tun(char *ifprefix) {
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 < NUMBER_OF_UE_MAX; i++) {
sprintf(ifname, "oaitun_ue%d",i+1); sprintf(ifname, "oaitun_%.3s%d",ifprefix,i+1);
nas_sock_fd[i] = tun_alloc(ifname); nas_sock_fd[i] = tun_alloc(ifname);
if (nas_sock_fd[i] == -1) { if (nas_sock_fd[i] == -1) {
......
...@@ -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(void); int netlink_init_tun(char *ifsuffix);
#endif /* EMU_PROTO_H_ */ #endif /* EMU_PROTO_H_ */
...@@ -782,13 +782,15 @@ int main(int argc, char **argv) { ...@@ -782,13 +782,15 @@ int main(int argc, char **argv) {
break; break;
case 'u': case 'u':
dual_stream_UE=1; dual_stream_UE=1;
if (UE != NULL)
UE->use_ia_receiver = 1; if (UE != NULL)
UE->use_ia_receiver = 1;
else { else {
printf("UE is NULL\n"); printf("UE is NULL\n");
exit(-1); exit(-1);
} }
if ((n_tx_port!=2) || (transmission_mode!=5)) { if ((n_tx_port!=2) || (transmission_mode!=5)) {
printf("IA receiver only supported for TM5!"); printf("IA receiver only supported for TM5!");
exit(-1); exit(-1);
...@@ -951,8 +953,8 @@ int main(int argc, char **argv) { ...@@ -951,8 +953,8 @@ int main(int argc, char **argv) {
fl_set_object_label(form_ue->button_0, "IA Receiver ON"); fl_set_object_label(form_ue->button_0, "IA Receiver ON");
fl_set_object_color(form_ue->button_0, FL_GREEN, FL_GREEN); fl_set_object_color(form_ue->button_0, FL_GREEN, FL_GREEN);
} else { } else {
printf("UE is NULL\n"); printf("UE is NULL\n");
exit(-1); exit(-1);
} }
} }
} }
...@@ -2139,5 +2141,7 @@ int main(int argc, char **argv) { ...@@ -2139,5 +2141,7 @@ int main(int argc, char **argv) {
else else
return(0); return(0);
} }
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
uint64_t get_softmodem_optmask(void) {
return 0;
}
...@@ -1211,9 +1211,7 @@ int main(int argc, char **argv) { ...@@ -1211,9 +1211,7 @@ int main(int argc, char **argv) {
} }
dump_ulsch(eNB,eNB->proc.frame_rx,subframe,0,round); dump_ulsch(eNB,eNB->proc.frame_rx,subframe,0,round);
round=5; round=5;
} }
if (n_frames==1) printf("round %d errors %u/%u\n",round,errs[round],trials); if (n_frames==1) printf("round %d errors %u/%u\n",round,errs[round],trials);
...@@ -1509,5 +1507,7 @@ int main(int argc, char **argv) { ...@@ -1509,5 +1507,7 @@ int main(int argc, char **argv) {
return(0); return(0);
} }
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
uint64_t get_softmodem_optmask(void) {
return 0;
}
...@@ -72,3 +72,6 @@ MESSAGE_DEF(NAS_CONN_ESTABLI_CNF, MESSAGE_PRIORITY_MED, NasConnEstab ...@@ -72,3 +72,6 @@ MESSAGE_DEF(NAS_CONN_ESTABLI_CNF, MESSAGE_PRIORITY_MED, NasConnEstab
MESSAGE_DEF(NAS_CONN_RELEASE_IND, MESSAGE_PRIORITY_MED, NasConnReleaseInd, nas_conn_release_ind) MESSAGE_DEF(NAS_CONN_RELEASE_IND, MESSAGE_PRIORITY_MED, NasConnReleaseInd, nas_conn_release_ind)
MESSAGE_DEF(NAS_UPLINK_DATA_CNF, MESSAGE_PRIORITY_MED, NasUlDataCnf, nas_ul_data_cnf) MESSAGE_DEF(NAS_UPLINK_DATA_CNF, MESSAGE_PRIORITY_MED, NasUlDataCnf, nas_ul_data_cnf)
MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, NasDlDataInd, nas_dl_data_ind) MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, NasDlDataInd, nas_dl_data_ind)
// eNB: realtime -> RRC messages
MESSAGE_DEF(RRC_SUBFRAME_PROCESS, MESSAGE_PRIORITY_MED, RrcSubframeProcess, rrc_subframe_process)
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
#define NAS_UPLINK_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_cnf #define NAS_UPLINK_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_cnf
#define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind #define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind
#define RRC_SUBFRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.rrc_subframe_process
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
typedef struct RrcStateInd_s { typedef struct RrcStateInd_s {
Rrc_State_t state; Rrc_State_t state;
...@@ -399,4 +401,10 @@ typedef nas_release_ind_t NasConnReleaseInd; ...@@ -399,4 +401,10 @@ typedef nas_release_ind_t NasConnReleaseInd;
typedef ul_info_transfer_cnf_t NasUlDataCnf; typedef ul_info_transfer_cnf_t NasUlDataCnf;
typedef dl_info_transfer_ind_t NasDlDataInd; typedef dl_info_transfer_ind_t NasDlDataInd;
// eNB: realtime -> RRC messages
typedef struct rrc_subframe_process_s {
protocol_ctxt_t ctxt;
int CC_id;
} RrcSubframeProcess;
#endif /* RRC_MESSAGES_TYPES_H_ */ #endif /* RRC_MESSAGES_TYPES_H_ */
...@@ -40,3 +40,6 @@ MESSAGE_DEF(X2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, x2ap_der ...@@ -40,3 +40,6 @@ MESSAGE_DEF(X2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, x2ap_der
/* handover messages X2AP <-> RRC */ /* handover messages X2AP <-> RRC */
MESSAGE_DEF(X2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, x2ap_handover_req_t , x2ap_handover_req) MESSAGE_DEF(X2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, x2ap_handover_req_t , x2ap_handover_req)
MESSAGE_DEF(X2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_handover_req_ack_t , x2ap_handover_req_ack) MESSAGE_DEF(X2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_handover_req_ack_t , x2ap_handover_req_ack)
/* handover messages X2AP <-> S1AP */
MESSAGE_DEF(X2AP_UE_CONTEXT_RELEASE , MESSAGE_PRIORITY_MED, x2ap_ue_context_release_t , x2ap_ue_context_release)
...@@ -33,11 +33,21 @@ ...@@ -33,11 +33,21 @@
#define X2AP_HANDOVER_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req_ack #define X2AP_HANDOVER_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req_ack
#define X2AP_REGISTER_ENB_CNF(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_cnf #define X2AP_REGISTER_ENB_CNF(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_cnf
#define X2AP_DEREGISTERED_ENB_IND(mSGpTR) (mSGpTR)->ittiMsg.x2ap_deregistered_enb_ind #define X2AP_DEREGISTERED_ENB_IND(mSGpTR) (mSGpTR)->ittiMsg.x2ap_deregistered_enb_ind
#define X2AP_UE_CONTEXT_RELEASE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ue_context_release
#define X2AP_MAX_NB_ENB_IP_ADDRESS 2 #define X2AP_MAX_NB_ENB_IP_ADDRESS 2
// eNB application layer -> X2AP messages // eNB application layer -> X2AP messages
/* X2AP UE CONTEXT RELEASE */
typedef struct x2ap_ue_context_release_s {
/* used for X2AP->RRC in source and RRC->X2AP in target */
int rnti;
int source_assoc_id;
} x2ap_ue_context_release_t;
typedef struct x2ap_register_enb_req_s { typedef struct x2ap_register_enb_req_s {
/* Unique eNB_id to identify the eNB within EPC. /* Unique eNB_id to identify the eNB within EPC.
* For macro eNB ids this field should be 20 bits long. * For macro eNB ids this field should be 20 bits long.
...@@ -128,12 +138,12 @@ typedef struct x2ap_lastvisitedcell_info_s { ...@@ -128,12 +138,12 @@ typedef struct x2ap_lastvisitedcell_info_s {
uint64_t time_UE_StayedInCell; uint64_t time_UE_StayedInCell;
}x2ap_lastvisitedcell_info_t; }x2ap_lastvisitedcell_info_t;
//used for src
typedef struct x2ap_handover_req_s { typedef struct x2ap_handover_req_s {
int source_rnti; /* TODO: to be fixed/remove */ /* used for RRC->X2AP in source eNB */
int source_x2id; /* TODO: to be fixed/remove */ int rnti;
int old_eNB_ue_x2ap_id; /* used for X2AP->RRC in target eNB */
int x2_id;
LTE_PhysCellId_t target_physCellId; LTE_PhysCellId_t target_physCellId;
...@@ -167,15 +177,17 @@ typedef struct x2ap_handover_req_s { ...@@ -167,15 +177,17 @@ typedef struct x2ap_handover_req_s {
uint8_t rrc_buffer[1024 /* arbitrary, big enough */]; uint8_t rrc_buffer[1024 /* arbitrary, big enough */];
int rrc_buffer_size; int rrc_buffer_size;
/* TODO: this parameter has to be removed */ int target_assoc_id;
int target_mod_id;
} x2ap_handover_req_t; } x2ap_handover_req_t;
typedef struct x2ap_handover_req_ack_s { typedef struct x2ap_handover_req_ack_s {
int source_rnti; /* TODO: to be fixed/remove */ /* used for RRC->X2AP in target and X2AP->RRC in source */
int source_x2id; /* TODO: to be fixed/remove */ int rnti;
/* TODO: this parameter has to be removed */
int target_mod_id; /* used for RRC->X2AP in target */
int x2_id_target;
int source_assoc_id;
uint8_t nb_e_rabs_tobesetup; uint8_t nb_e_rabs_tobesetup;
......
This diff is collapsed.
...@@ -883,7 +883,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -883,7 +883,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
rntiP, -1 rntiP, -1
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, ,
-1 0
#endif #endif
)) == -1) )) == -1)
{ {
......
This diff is collapsed.
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#define LINK_ENB_PDCP_TO_IP_DRIVER_BIT (1<< 13) #define LINK_ENB_PDCP_TO_IP_DRIVER_BIT (1<< 13)
#define LINK_ENB_PDCP_TO_GTPV1U_BIT (1<< 14) #define LINK_ENB_PDCP_TO_GTPV1U_BIT (1<< 14)
#define UE_NAS_USE_TUN_BIT (1<< 15) #define UE_NAS_USE_TUN_BIT (1<< 15)
#define ENB_NAS_USE_TUN_BIT (1<< 16)
typedef struct { typedef struct {
uint64_t optmask; uint64_t optmask;
} pdcp_params_t; } pdcp_params_t;
...@@ -63,6 +64,7 @@ typedef struct { ...@@ -63,6 +64,7 @@ typedef struct {
#define LINK_ENB_PDCP_TO_IP_DRIVER ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_IP_DRIVER_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) #define LINK_ENB_PDCP_TO_GTPV1U ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_GTPV1U_BIT)
#define UE_NAS_USE_TUN ( get_pdcp_optmask() & UE_NAS_USE_TUN_BIT) #define UE_NAS_USE_TUN ( get_pdcp_optmask() & UE_NAS_USE_TUN_BIT)
#define ENB_NAS_USE_TUN ( get_pdcp_optmask() & ENB_NAS_USE_TUN_BIT)
uint64_t get_pdcp_optmask(void); uint64_t get_pdcp_optmask(void);
extern pthread_t pdcp_thread; extern pthread_t pdcp_thread;
......
...@@ -125,7 +125,9 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) { ...@@ -125,7 +125,9 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
sizeof(sidelink_pc5s_element), 0, (struct sockaddr *)&prose_pdcp_addr,sizeof(prose_pdcp_addr) ); sizeof(sidelink_pc5s_element), 0, (struct sockaddr *)&prose_pdcp_addr,sizeof(prose_pdcp_addr) );
} else if (UE_NAS_USE_TUN) { } else if (UE_NAS_USE_TUN) {
ret = write(nas_sock_fd[ctxt_pP->module_id], &(sdu_p->data[sizeof(pdcp_data_ind_header_t)]),sizeToWrite ); ret = write(nas_sock_fd[ctxt_pP->module_id], &(sdu_p->data[sizeof(pdcp_data_ind_header_t)]),sizeToWrite );
} else if (PDCP_USE_NETLINK) {//UE_NAS_USE_TUN } else if (ENB_NAS_USE_TUN) {
ret = write(nas_sock_fd[0], &(sdu_p->data[sizeof(pdcp_data_ind_header_t)]),sizeToWrite );
} else if (PDCP_USE_NETLINK) {
memcpy(NLMSG_DATA(nas_nlh_tx), (uint8_t *) sdu_p->data, sizeToWrite); memcpy(NLMSG_DATA(nas_nlh_tx), (uint8_t *) sdu_p->data, sizeToWrite);
nas_nlh_tx->nlmsg_len = sizeToWrite; nas_nlh_tx->nlmsg_len = sizeToWrite;
ret = sendmsg(nas_sock_fd[0],&nas_msg_tx,0); ret = sendmsg(nas_sock_fd[0],&nas_msg_tx,0);
...@@ -144,7 +146,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) { ...@@ -144,7 +146,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) { int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
pdcp_data_req_header_t pdcp_read_header_g; pdcp_data_req_header_t pdcp_read_header_g;
if (UE_NAS_USE_TUN) { if (UE_NAS_USE_TUN || ENB_NAS_USE_TUN) {
protocol_ctxt_t ctxt = *ctxt_pP; protocol_ctxt_t ctxt = *ctxt_pP;
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE; hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc; hashtable_rc_t h_rc;
...@@ -155,20 +157,29 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) { ...@@ -155,20 +157,29 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
do { do {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ, 1 );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER, 1 );
len = read(nas_sock_fd[ctxt_pP->module_id], &nl_rx_buf, NL_MAX_PAYLOAD); len = read(UE_NAS_USE_TUN?nas_sock_fd[ctxt_pP->module_id]:nas_sock_fd[0], &nl_rx_buf, NL_MAX_PAYLOAD);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER, 0 );
if (len<=0) continue; if (len<=0) continue;
if (UE_NAS_USE_TUN) {
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
} else {
ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[0];
ctxt.enb_flag=ENB_FLAG_YES;
ctxt.module_id=0;
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_YES);
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
}
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n", LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
ctxt.module_id, ctxt.rnti, ctxt.enb_flag); ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
if (h_rc == HASH_TABLE_OK) { if (h_rc == HASH_TABLE_OK) {
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %d \n", LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %d \n",
ctxt.frame, ctxt.instance, len, rab_id); ctxt.frame, ctxt.instance, len, rab_id);
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB %u]\n", LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %u]\n",
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id, ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
ctxt.rnti, rab_id); ctxt.rnti, rab_id);
MSC_LOG_RX_MESSAGE((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, MSC_LOG_RX_MESSAGE((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
...@@ -192,7 +203,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) { ...@@ -192,7 +203,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
MSC_AS_TIME_ARGS(ctxt_pP), MSC_AS_TIME_ARGS(ctxt_pP),
ctxt.instance, rab_id, rab_id, len); ctxt.instance, rab_id, rab_id, len);
LOG_D(PDCP, LOG_D(PDCP,
"[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %u] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n", "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %u] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id, ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
ctxt.rnti, rab_id, key); ctxt.rnti, rab_id, key);
} }
......
...@@ -584,14 +584,12 @@ void rlc_data_ind ( ...@@ -584,14 +584,12 @@ void rlc_data_ind (
const sdu_size_t sdu_sizeP, const sdu_size_t sdu_sizeP,
mem_block_t *sdu_pP) { mem_block_t *sdu_pP) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if defined(TRACE_RLC_PAYLOAD)
LOG_D(RLC, PROTOCOL_CTXT_FMT"[%s %u] Display of rlc_data_ind: size %u\n", LOG_D(RLC, PROTOCOL_CTXT_FMT"[%s %u] Display of rlc_data_ind: size %u\n",
PROTOCOL_CTXT_ARGS(ctxt_pP), PROTOCOL_CTXT_ARGS(ctxt_pP),
(srb_flagP) ? "SRB" : "DRB", (srb_flagP) ? "SRB" : "DRB",
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);
#endif
#if T_TRACER #if T_TRACER
if (ctxt_pP->enb_flag) if (ctxt_pP->enb_flag)
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
#define NAS_INET6_ADDRSTRLEN 46 #define NAS_INET6_ADDRSTRLEN 46
#define NAS_INET_ADDRSTRLEN 16 #define NAS_INET_ADDRSTRLEN 16
#define NAS_CX_MAX 128 // 32 //Identical to RRC constant #define NAS_CX_MAX 32 //128 //Identical to RRC constant: no you cannot
/* increase to 128 without risking stack problems: KEEP ATTENTION TO COMPILATION WARNINGS */
//#define NAS_CX_MULTICAST_ALLNODE 2 //#define NAS_CX_MULTICAST_ALLNODE 2
#define NAS_RETRY_LIMIT_DEFAULT 5 #define NAS_RETRY_LIMIT_DEFAULT 5
......
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
// Max number of entry of a message list // Max number of entry of a message list
#define NAS_LIST_CX_MAX 32 #define NAS_LIST_CX_MAX 32
#define NAS_LIST_RB_MAX 32 #define NAS_LIST_RB_MAX 32
#define NAS_LIST_CLASS_MAX 32 #define NAS_LIST_CLASS_MAX 16 // 32 is too high!!:
/* risk of stack problems: KEEP ATTENTION TO COMPILATION WARNINGS */
typedef unsigned short nasMsgType_t; typedef unsigned short nasMsgType_t;
......
...@@ -801,7 +801,6 @@ rrc_ue_establish_drb( ...@@ -801,7 +801,6 @@ rrc_ue_establish_drb(
(void)ip_addr_offset4; (void)ip_addr_offset4;
LOG_I(RRC,"[UE %d] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d\n", LOG_I(RRC,"[UE %d] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d\n",
ue_mod_idP, frameP, DRB_config->drb_Identity, (int)*DRB_config->logicalChannelIdentity); ue_mod_idP, frameP, DRB_config->drb_Identity, (int)*DRB_config->logicalChannelIdentity);
/* /*
rrc_pdcp_config_req (ue_mod_idP+NB_eNB_INST, frameP, 0, CONFIG_ACTION_ADD, rrc_pdcp_config_req (ue_mod_idP+NB_eNB_INST, frameP, 0, CONFIG_ACTION_ADD,
(eNB_index * NB_RB_MAX) + *DRB_config->logicalChannelIdentity, UNDEF_SECURITY_MODE); (eNB_index * NB_RB_MAX) + *DRB_config->logicalChannelIdentity, UNDEF_SECURITY_MODE);
...@@ -810,34 +809,34 @@ rrc_ue_establish_drb( ...@@ -810,34 +809,34 @@ rrc_ue_establish_drb(
(eNB_index * NB_RB_MAX) + *DRB_config->logicalChannelIdentity, (eNB_index * NB_RB_MAX) + *DRB_config->logicalChannelIdentity,
RADIO_ACCESS_BEARER,Rlc_info_um); RADIO_ACCESS_BEARER,Rlc_info_um);
*/ */
if(PDCP_USE_NETLINK) { // if(!EPC_MODE_ENABLED) {
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET) && !defined(LINK_ENB_PDCP_TO_GTPV1U) //# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET) && !defined(LINK_ENB_PDCP_TO_GTPV1U)
ip_addr_offset3 = 0; ip_addr_offset3 = 0;
ip_addr_offset4 = 1; ip_addr_offset4 = 1;
LOG_I(OIP,"[UE %d] trying to bring up the OAI interface oai%d, IP 10.0.%d.%d\n", ue_mod_idP, ip_addr_offset3+ue_mod_idP, LOG_I(OIP,"[UE %d] trying to bring up the OAI interface oip%d, IP 10.0.%d.%d\n", ue_mod_idP, ip_addr_offset3+ue_mod_idP,
ip_addr_offset3+ue_mod_idP+1,ip_addr_offset4+ue_mod_idP+1); ip_addr_offset3+ue_mod_idP+1,ip_addr_offset4+ue_mod_idP+1);
oip_ifup=nas_config(ip_addr_offset3+ue_mod_idP, // interface_id oip_ifup=nas_config(ip_addr_offset3+ue_mod_idP+1, // interface_id
ip_addr_offset3+ue_mod_idP+1, // third_octet ip_addr_offset3+ue_mod_idP+1, // third_octet
ip_addr_offset4+ue_mod_idP+1); // fourth_octet ip_addr_offset4+ue_mod_idP+1, // fourth_octet
"oip"); // interface suffix
if (oip_ifup == 0 ) { // interface is up --> send a config the DRB
LOG_I(OIP,"[UE %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack\n", if (oip_ifup == 0 && (!UE_NAS_USE_TUN)) { // interface is up --> send a config the DRB
ue_mod_idP, LOG_I(OIP,"[UE %d] Config the ue net interface %d to send/receive pkt on DRB %ld to/from the protocol stack\n",
ip_addr_offset3+ue_mod_idP, ue_mod_idP,
(long int)((eNB_index * maxDRB) + DRB_config->drb_Identity)); ip_addr_offset3+ue_mod_idP,
rb_conf_ipv4(0,//add (long int)((eNB_index * LTE_maxDRB) + DRB_config->drb_Identity));
ue_mod_idP,//cx align with the UE index rb_conf_ipv4(0,//add
ip_addr_offset3+ue_mod_idP,//inst num_enb+ue_index ue_mod_idP,//cx align with the UE index
(eNB_index * maxDRB) + DRB_config->drb_Identity,//rb ip_addr_offset3+ue_mod_idP,//inst num_enb+ue_index
0,//dscp (eNB_index * LTE_maxDRB) + DRB_config->drb_Identity,//rb
ipv4_address(ip_addr_offset3+ue_mod_idP+1,ip_addr_offset4+ue_mod_idP+1),//saddr 0,//dscp
ipv4_address(ip_addr_offset3+ue_mod_idP+1,eNB_index+1));//daddr ipv4_address(ip_addr_offset3+ue_mod_idP+1,ip_addr_offset4+ue_mod_idP+1),//saddr
LOG_D(RRC,"[UE %d] State = Attached (eNB %d)\n",ue_mod_idP,eNB_index); ipv4_address(ip_addr_offset3+ue_mod_idP+1,eNB_index+1));//daddr
} LOG_D(RRC,"[UE %d] State = Attached (eNB %d)\n",ue_mod_idP,eNB_index);
# endif
} }
//# endif
// }
return(0); return(0);
} }
...@@ -1930,7 +1929,7 @@ rrc_ue_process_rrcConnectionReconfiguration( ...@@ -1930,7 +1929,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
for (i=0; ( for (i=0; (
i<rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.count) i<rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.count)
&& (i < maxDRB); i++) { && (i < LTE_maxDRB); i++) {
// why minus 1 in RRC code for drb_identity ? // why minus 1 in RRC code for drb_identity ?
connection_reestablishment_ind.drb_id[i] = connection_reestablishment_ind.drb_id[i] =
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.array[i]->drb_Identity; rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.array[i]->drb_Identity;
...@@ -2241,7 +2240,7 @@ rrc_ue_decode_dcch( ...@@ -2241,7 +2240,7 @@ rrc_ue_decode_dcch(
for (i=0; ( for (i=0; (
i<dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.count) i<dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.count)
&& (i < maxDRB); i++) { && (i < LTE_maxDRB); i++) {
// why minus 1 in RRC code for drb_identity ? // why minus 1 in RRC code for drb_identity ?
connection_reconfiguration_ho_ind.drb_id[i] = connection_reconfiguration_ho_ind.drb_id[i] =
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.array[i]->drb_Identity; dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.array[i]->drb_Identity;
...@@ -2295,7 +2294,7 @@ rrc_ue_decode_dcch( ...@@ -2295,7 +2294,7 @@ rrc_ue_decode_dcch(
for (i=0; ( for (i=0; (
i<dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.count) i<dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.count)
&& (i < maxDRB); i++) { && (i < LTE_maxDRB); i++) {
// why minus 1 in RRC code for drb_identity ? // why minus 1 in RRC code for drb_identity ?
connection_reconfiguration_ind.drb_id[i] = connection_reconfiguration_ind.drb_id[i] =
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.array[i]->drb_Identity; dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList->list.array[i]->drb_Identity;
......
...@@ -343,7 +343,8 @@ typedef enum HO_STATE_e { ...@@ -343,7 +343,8 @@ typedef enum HO_STATE_e {
HO_COMPLETE, // initiated by the target eNB HO_COMPLETE, // initiated by the target eNB
HO_REQUEST, HO_REQUEST,
HO_ACK, HO_ACK,
HO_CONFIGURED HO_CONFIGURED,
HO_RELEASE
} HO_STATE_t; } HO_STATE_t;
typedef enum SL_TRIGGER_e { typedef enum SL_TRIGGER_e {
...@@ -450,12 +451,14 @@ typedef struct HANDOVER_INFO_s { ...@@ -450,12 +451,14 @@ typedef struct HANDOVER_INFO_s {
HO_STATE_t state; //current state of handover HO_STATE_t state; //current state of handover
uint32_t modid_s; //module_idP of serving cell uint32_t modid_s; //module_idP of serving cell
uint32_t modid_t; //module_idP of target cell uint32_t modid_t; //module_idP of target cell
int assoc_id;
uint8_t ueid_s; //UE index in serving cell uint8_t ueid_s; //UE index in serving cell
uint8_t ueid_t; //UE index in target cell uint8_t ueid_t; //UE index in target cell
LTE_AS_Config_t as_config; /* these two parameters are taken from 36.331 section 10.2.2: HandoverPreparationInformation-r8-IEs */ LTE_AS_Config_t as_config; /* these two parameters are taken from 36.331 section 10.2.2: HandoverPreparationInformation-r8-IEs */
LTE_AS_Context_t as_context; /* They are mandatory for HO */ LTE_AS_Context_t as_context; /* They are mandatory for HO */
uint8_t buf[RRC_BUF_SIZE]; /* ASN.1 encoded handoverCommandMessage */ uint8_t buf[RRC_BUF_SIZE]; /* ASN.1 encoded handoverCommandMessage */
int size; /* size of above message in bytes */ int size; /* size of above message in bytes */
int x2_id; /* X2AP UE ID in the target eNB */
} HANDOVER_INFO; } HANDOVER_INFO;
#define RRC_HEADER_SIZE_MAX 64 #define RRC_HEADER_SIZE_MAX 64
......
This diff is collapsed.
This diff is collapsed.
...@@ -270,4 +270,8 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP, ...@@ -270,4 +270,8 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP); rrc_eNB_ue_context_t *const ue_context_pP);
int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p, const char *msg_name, instance_t instance); int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p, const char *msg_name, instance_t instance);
int rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP);
int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id);
#endif /* RRC_ENB_S1AP_H_ */ #endif /* RRC_ENB_S1AP_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -48,6 +48,10 @@ static int x2ap_eNB_decode_initiating_message(X2AP_X2AP_PDU_t *pdu) ...@@ -48,6 +48,10 @@ static int x2ap_eNB_decode_initiating_message(X2AP_X2AP_PDU_t *pdu)
//asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_X2AP_X2AP_PDU, pdu); //asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_X2AP_X2AP_PDU, pdu);
X2AP_INFO("x2ap_eNB_decode_initiating_message!\n"); X2AP_INFO("x2ap_eNB_decode_initiating_message!\n");
break; break;
case X2AP_ProcedureCode_id_uEContextRelease:
//asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_X2AP_X2AP_PDU, pdu);
X2AP_INFO("x2ap_eNB_decode_initiating_message!\n");
break;
default: default:
X2AP_ERROR("Unknown procedure ID (%d) for initiating message\n", X2AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include "sctp_eNB_defs.h" #include "sctp_eNB_defs.h"
#include "x2ap_ids.h"
#ifndef X2AP_ENB_DEFS_H_ #ifndef X2AP_ENB_DEFS_H_
#define X2AP_ENB_DEFS_H_ #define X2AP_ENB_DEFS_H_
...@@ -114,6 +116,10 @@ typedef struct x2ap_eNB_data_s { ...@@ -114,6 +116,10 @@ typedef struct x2ap_eNB_data_s {
/* SCTP association id */ /* SCTP association id */
int32_t assoc_id; int32_t assoc_id;
/* Nid cells */
uint32_t Nid_cell[MAX_NUM_CCs];
int num_cc;
/* Only meaningfull in virtual mode */ /* Only meaningfull in virtual mode */
struct x2ap_eNB_instance_s *x2ap_eNB_instance; struct x2ap_eNB_instance_s *x2ap_eNB_instance;
} x2ap_eNB_data_t; } x2ap_eNB_data_t;
...@@ -163,7 +169,6 @@ typedef struct x2ap_eNB_instance_s { ...@@ -163,7 +169,6 @@ typedef struct x2ap_eNB_instance_s {
uint32_t downlink_frequency[MAX_NUM_CCs]; uint32_t downlink_frequency[MAX_NUM_CCs];
int32_t uplink_frequency_offset[MAX_NUM_CCs]; int32_t uplink_frequency_offset[MAX_NUM_CCs];
uint32_t Nid_cell[MAX_NUM_CCs]; uint32_t Nid_cell[MAX_NUM_CCs];
uint32_t Nid_target_cell[MAX_NUM_CCs];
int16_t N_RB_DL[MAX_NUM_CCs]; int16_t N_RB_DL[MAX_NUM_CCs];
lte_frame_type_t frame_type[MAX_NUM_CCs]; lte_frame_type_t frame_type[MAX_NUM_CCs];
uint32_t fdd_earfcn_DL[MAX_NUM_CCs]; uint32_t fdd_earfcn_DL[MAX_NUM_CCs];
...@@ -177,6 +182,8 @@ typedef struct x2ap_eNB_instance_s { ...@@ -177,6 +182,8 @@ typedef struct x2ap_eNB_instance_s {
uint16_t sctp_out_streams; uint16_t sctp_out_streams;
uint32_t enb_port_for_X2C; uint32_t enb_port_for_X2C;
int multi_sd; int multi_sd;
x2ap_id_manager id_manager;
} x2ap_eNB_instance_t; } x2ap_eNB_instance_t;
typedef struct { typedef struct {
......
This diff is collapsed.
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
int x2ap_eNB_generate_x2_setup_request(x2ap_eNB_instance_t *instance_p, int x2ap_eNB_generate_x2_setup_request(x2ap_eNB_instance_t *instance_p,
x2ap_eNB_data_t *x2ap_eNB_data_p); x2ap_eNB_data_t *x2ap_eNB_data_p);
int x2ap_eNB_generate_x2_setup_response(x2ap_eNB_data_t *x2ap_eNB_data_p); int x2ap_eNB_generate_x2_setup_response(x2ap_eNB_instance_t *instance_p, x2ap_eNB_data_t *x2ap_eNB_data_p);
int x2ap_eNB_generate_x2_setup_failure(instance_t instance, int x2ap_eNB_generate_x2_setup_failure(instance_t instance,
uint32_t assoc_id, uint32_t assoc_id,
...@@ -47,12 +47,13 @@ int x2ap_eNB_set_cause (X2AP_Cause_t * cause_p, ...@@ -47,12 +47,13 @@ int x2ap_eNB_set_cause (X2AP_Cause_t * cause_p,
X2AP_Cause_PR cause_type, X2AP_Cause_PR cause_type,
long cause_value); long cause_value);
int x2ap_eNB_generate_x2_handover_request (x2ap_eNB_data_t *x2ap_eNB_data_p, int x2ap_eNB_generate_x2_handover_request (x2ap_eNB_instance_t *instance_p, x2ap_eNB_data_t *x2ap_eNB_data_p,
x2ap_handover_req_t *x2ap_handover_req); x2ap_handover_req_t *x2ap_handover_req, int ue_id);
int x2ap_eNB_generate_x2_handover_request_ack (x2ap_eNB_data_t *x2ap_eNB_data_p, int x2ap_eNB_generate_x2_handover_request_ack (x2ap_eNB_instance_t *instance_p, x2ap_eNB_data_t *x2ap_eNB_data_p,
x2ap_handover_req_ack_t *x2ap_handover_req_ack); x2ap_handover_req_ack_t *x2ap_handover_req_ack);
int x2ap_eNB_generate_x2_ue_context_release (x2ap_eNB_data_t *x2ap_eNB_data_p); int x2ap_eNB_generate_x2_ue_context_release (x2ap_eNB_instance_t *instance_p, x2ap_eNB_data_t *x2ap_eNB_data_p,
x2ap_ue_context_release_t *x2ap_ue_context_release);
#endif /* X2AP_ENB_GENERATE_MESSAGES_H_ */ #endif /* X2AP_ENB_GENERATE_MESSAGES_H_ */
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.
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