Merged latest develop to nfapi
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
*.log
|
||||
cmake_targets/log/
|
||||
cmake_targets/ran_build/
|
||||
common/utils/T/T_IDs.h
|
||||
common/utils/T/T_messages.txt.h
|
||||
common/utils/T/genids
|
||||
common/utils/T/genids.o
|
||||
targets/bin/
|
||||
+7
-1
@@ -8,5 +8,11 @@ log/
|
||||
lte_build_oai/
|
||||
targets/bin/
|
||||
|
||||
.vscode/*
|
||||
# vscode
|
||||
.vscode
|
||||
|
||||
# Tags for vim/global
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
tags
|
||||
|
||||
@@ -21,3 +21,7 @@ The Regents of the University of California: BSD 3-Clause Licence.
|
||||
|
||||
Niels Provos <provos@citi.umich.edu>: BSD 2-Clause Licence.
|
||||
|
||||
## Credits for source code openair3/GTPV1-U/nw-gtpv1u: ##
|
||||
|
||||
Amit Chawre <http://www.amitchawre.net/contact.html>: BSD 2-Clause Licence.
|
||||
|
||||
|
||||
@@ -30,12 +30,14 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
|
||||
}
|
||||
}
|
||||
|
||||
def doRedHatBuild = false
|
||||
def doFlexranCtrlTest = false
|
||||
|
||||
// Location of the executor node
|
||||
def nodeExecutor = params.nodeExecutor
|
||||
|
||||
// VM Lockable resources
|
||||
def vmResource = params.vmLockableResource
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label nodeExecutor
|
||||
@@ -85,21 +87,6 @@ pipeline {
|
||||
echo "Platform is ${env.TESTPLATFORM_OWNER}"
|
||||
}
|
||||
|
||||
if (params.RedHatRemoteServer == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.RedHatRemoteCredentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.RedHatWorkingPath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (allParametersPresent) {
|
||||
echo "Performing Red Hat Build"
|
||||
doRedHatBuild = true
|
||||
} else {
|
||||
doRedHatBuild = false
|
||||
}
|
||||
if (params.FlexRanRtcGitLabRepository_Credentials != null) {
|
||||
doFlexranCtrlTest = true
|
||||
}
|
||||
@@ -175,65 +162,81 @@ pipeline {
|
||||
|
||||
stage ("Start VM -- basic-sim") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- gnb-usrp") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- nr-ue-usrp") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- enb-usrp") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- phy-sim") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- enb-ethernet") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
lock (vmResource) {
|
||||
timeout (time: 7, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- ue-ethernet") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
lock (vmResource) {
|
||||
timeout (time: 7, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- cppcheck") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
lock (vmResource) {
|
||||
timeout (time: 7, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +282,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build eNB-USRP") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -304,33 +307,14 @@ pipeline {
|
||||
}
|
||||
stage ("Build UE-ethernet") {
|
||||
steps {
|
||||
// This is typically the last one to finish.
|
||||
lock (vmResource) {
|
||||
gitlabCommitStatus(name: "Build UE-ethernet") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build eNB-USRP on Red Hat") {
|
||||
when {
|
||||
expression {doRedHatBuild}
|
||||
}
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build eNB-USRP-RHE") {
|
||||
script {
|
||||
try {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.RedHatRemoteCredentials}", usernameVariable: 'RH_Username', passwordVariable: 'RH_Password']
|
||||
]) {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnRH.sh --workspace $WORKSPACE --job-name ${JOB_NAME} --build-id ${BUILD_ID} --remote-host ${params.RedHatRemoteServer} --remote-path ${params.RedHatWorkingPath} --remote-user-name ${RH_Username} --remote-password ${RH_Password}"
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
echo "Red Hat build failed but we could keep running pipeline if all ubuntu-based build passed"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -392,6 +376,7 @@ pipeline {
|
||||
stages {
|
||||
stage ("Test physical simulators") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
script {
|
||||
timeout (time: 90, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -403,6 +388,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build Flexran Controller") {
|
||||
@@ -410,6 +396,7 @@ pipeline {
|
||||
expression {doFlexranCtrlTest}
|
||||
}
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
script {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -419,10 +406,12 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test basic simulator") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
script {
|
||||
timeout (time: 30, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -434,10 +423,12 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test L1 simulator") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
script {
|
||||
timeout (time: 30, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -449,12 +440,14 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test RF simulator") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
script {
|
||||
timeout (time: 30, unit: 'MINUTES') {
|
||||
timeout (time: 40, unit: 'MINUTES') {
|
||||
try {
|
||||
gitlabCommitStatus(name: "Test RF-sim") {
|
||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant rf-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
@@ -464,10 +457,12 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test L2 simulator") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
script {
|
||||
timeout (time: 30, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -479,11 +474,14 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Destroy all Virtual Machines") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,6 +266,42 @@ pipeline {
|
||||
}
|
||||
stage('Log Collection') {
|
||||
parallel {
|
||||
stage('Log Collection (eNB - Build)') {
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
|
||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (OAI UE - Build)') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m'
|
||||
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (eNB - Run)') {
|
||||
steps {
|
||||
withCredentials([
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
import sys # arg
|
||||
import re # reg
|
||||
import yaml
|
||||
|
||||
import constants as CONST
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Parsing Command Line Arguements
|
||||
|
||||
@@ -59,7 +59,7 @@ if [ $# -eq 0 ]
|
||||
then
|
||||
echo " ---- Checking the whole repository ----"
|
||||
echo ""
|
||||
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted `
|
||||
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted || true`
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
|
||||
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
|
||||
|
||||
@@ -67,17 +67,17 @@ then
|
||||
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define.txt
|
||||
|
||||
# Testing if explicit GNU GPL license banner
|
||||
egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . > files-w-gnu-gpl-license-banner.txt
|
||||
egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . | egrep -v "openair3/NAS/COMMON/milenage.h" > files-w-gnu-gpl-license-banner.txt
|
||||
|
||||
# Looking at exotic/suspect banner
|
||||
LIST_OF_FILES_W_BANNER=`egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
|
||||
if [ -f ./files-w-suspect-banner.txt ]; then rm -f ./files-w-suspect-banner.txt; fi
|
||||
for FILE in $LIST_OF_FILES_W_BANNER
|
||||
do
|
||||
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
|
||||
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE || true`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
@@ -178,7 +178,7 @@ do
|
||||
EXT="${filename##*.}"
|
||||
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
|
||||
then
|
||||
TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted `
|
||||
TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted || true`
|
||||
NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT))
|
||||
if [ $TO_FORMAT -ne 0 ]
|
||||
then
|
||||
@@ -186,20 +186,24 @@ do
|
||||
echo $FULLFILE >> ./oai_rules_result_list.txt
|
||||
fi
|
||||
# Testing if explicit GNU GPL license banner
|
||||
egrep -i "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
|
||||
GNU_EXCEPTION=`echo $FULLFILE | egrep -c "openair3/NAS/COMMON/milenage.h" || true`
|
||||
if [ $GNU_EXCEPTION -eq 0 ]
|
||||
then
|
||||
egrep -il "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
|
||||
fi
|
||||
# Looking at exotic/suspect banner
|
||||
IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE`
|
||||
IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE || true`
|
||||
if [ $IS_BANNER -ne 0 ]
|
||||
then
|
||||
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
|
||||
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
then
|
||||
echo $FILE >> ./files-w-suspect-banner.txt
|
||||
echo $FULLFILE >> ./files-w-suspect-banner.txt
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
+83
-33
@@ -27,61 +27,111 @@
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#to use isfile
|
||||
import os
|
||||
import sys
|
||||
#to use logging.info()
|
||||
import logging
|
||||
#to create a SSH object locally in the methods
|
||||
import sshconnection
|
||||
#time.sleep
|
||||
import time
|
||||
#to load cots_ue dictionary
|
||||
import yaml
|
||||
|
||||
class CotsUe:
|
||||
def __init__(self,model,UEIPAddr,UEUserName,UEPassWord):
|
||||
self.model = model
|
||||
self.UEIPAddr = UEIPAddr
|
||||
self.UEUserName = UEUserName
|
||||
self.UEPassWord = UEPassWord
|
||||
self.runargs = '' #on of off to toggle airplane mode on/off
|
||||
def __init__(self,ADBIPAddr,ADBUserName,ADBPassWord):
|
||||
self.cots_id = '' #cots id from yaml oppo, s10 etc...
|
||||
self.ADBIPAddr = ADBIPAddr
|
||||
self.ADBUserName = ADBUserName
|
||||
self.ADBPassWord = ADBPassWord
|
||||
self.cots_run_mode = '' #on of off to toggle airplane mode on/off
|
||||
self.__cots_cde_dict_file = 'cots_ue_ctl.yaml'
|
||||
self.__SetAirplaneRetry = 3
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
def Check_Airplane(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.UEIPAddr, self.UEUserName, self.UEPassWord)
|
||||
status=mySSH.cde_check_value('sudo adb shell settings get global airplane_mode_on ', ['0','1'],5)
|
||||
mySSH.open(self.ADBIPAddr, self.ADBUserName, self.ADBPassWord)
|
||||
status=mySSH.cde_check_value('adb shell settings get global airplane_mode_on ', ['0','1'],5)
|
||||
mySSH.close()
|
||||
return status
|
||||
|
||||
|
||||
def Set_Airplane(self,target_state_str):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.UEIPAddr, self.UEUserName, self.UEPassWord)
|
||||
mySSH.command('sudo adb start-server','$',5)
|
||||
logging.info("Toggling COTS UE Airplane mode to : "+target_state_str)
|
||||
current_state = self.Check_Airplane()
|
||||
if target_state_str.lower()=="on":
|
||||
target_state=1
|
||||
#simply check if the device id exists in the dictionary
|
||||
#returns true if it exists, false otherwise
|
||||
def Check_Exists(self,target_id):
|
||||
#load cots commands dictionary
|
||||
if (os.path.isfile(self.__cots_cde_dict_file)):
|
||||
yaml_file=self.__cots_cde_dict_file
|
||||
elif (os.path.isfile('ci-scripts/'+self.__cots_cde_dict_file)):
|
||||
yaml_file='ci-scripts/'+self.__cots_cde_dict_file
|
||||
else:
|
||||
target_state=0
|
||||
if current_state != target_state:
|
||||
#toggle state
|
||||
retry = 0
|
||||
while (current_state!=target_state) and (retry < self.__SetAirplaneRetry):
|
||||
mySSH.command('sudo adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS', '\$', 5)
|
||||
mySSH.command('sudo adb shell input keyevent 20', '\$', 5)
|
||||
mySSH.command('sudo adb shell input tap 968 324', '\$', 5)
|
||||
time.sleep(1)
|
||||
current_state = self.Check_Airplane()
|
||||
retry+=1
|
||||
logging.error("COTS UE dictionary yaml file cannot be found")
|
||||
sys.exit("COTS UE dictionary yaml file cannot be found")
|
||||
|
||||
#load cots commands dictionary
|
||||
with open(yaml_file,'r') as file:
|
||||
cots_ue_ctl = yaml.load(file,Loader=yaml.FullLoader)
|
||||
#check if ue id is in the dictionary
|
||||
if target_id in cots_ue_ctl:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def Set_Airplane(self, target_id, target_state_str):
|
||||
#loading cots commands dictionary
|
||||
|
||||
if (os.path.isfile(self.__cots_cde_dict_file)):
|
||||
yaml_file=self.__cots_cde_dict_file
|
||||
elif (os.path.isfile('ci-scripts/'+self.__cots_cde_dict_file)):
|
||||
yaml_file='ci-scripts/'+self.__cots_cde_dict_file
|
||||
else:
|
||||
logging.error("COTS UE dictionary yaml file cannot be found")
|
||||
sys.exit("COTS UE dictionary yaml file cannot be found")
|
||||
|
||||
#load cots commands dictionary
|
||||
with open(yaml_file,'r') as file:
|
||||
cots_ue_ctl = yaml.load(file,Loader=yaml.FullLoader)
|
||||
#check if ue id is in the dictionary
|
||||
if target_id in cots_ue_ctl:
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.ADBIPAddr, self.ADBUserName, self.ADBPassWord)
|
||||
logging.info(str(self.ADBIPAddr)+' '+str(self.ADBUserName)+' '+str(self.ADBPassWord))
|
||||
mySSH.command('adb start-server','\$',5)
|
||||
mySSH.command('adb devices','\$',5)
|
||||
logging.info("Toggling COTS UE Airplane mode to : "+target_state_str)
|
||||
#get current state
|
||||
current_state = self.Check_Airplane()
|
||||
if target_state_str.lower()=="on":
|
||||
target_state=1
|
||||
else:
|
||||
target_state=0
|
||||
if current_state != target_state:
|
||||
logging.error("ATTENTION : Could not toggle to : "+target_state_str)
|
||||
logging.error("Current state is : "+ str(current_state))
|
||||
#toggle state
|
||||
retry = 0
|
||||
while (current_state!=target_state) and (retry < self.__SetAirplaneRetry):
|
||||
#loop over the command list from dictionary for the selected ue, to switch to required state
|
||||
for i in range (0,len(cots_ue_ctl[target_id])):
|
||||
mySSH.command(cots_ue_ctl[target_id][i], '\$', 5)
|
||||
time.sleep(1)
|
||||
current_state = self.Check_Airplane()
|
||||
retry+=1
|
||||
#could not toggle despite the retry
|
||||
if current_state != target_state:
|
||||
logging.error("ATTENTION : Could not toggle to : "+target_state_str)
|
||||
logging.error("Current state is : "+ str(current_state))
|
||||
else:
|
||||
logging.info("Airplane mode is already "+ target_state_str)
|
||||
mySSH.command('adb kill-server','\$',5)
|
||||
mySSH.close()
|
||||
#ue id is NOT in the dictionary
|
||||
else:
|
||||
print("Airplane mode is already "+ target_state_str)
|
||||
mySSH.command('sudo adb kill-server','$',5)
|
||||
mySSH.close()
|
||||
logging.error("COTS UE Id from XML could not be found in UE YAML dictionary " + self.__cots_cde_dict_file)
|
||||
sys.exit("COTS UE Id from XML could not be found in UE YAML dictionary " + self.__cots_cde_dict_file)
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -181,6 +181,7 @@ eNBs = (
|
||||
{
|
||||
ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
|
||||
@@ -181,6 +181,7 @@ eNBs = (
|
||||
{
|
||||
ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
|
||||
@@ -181,6 +181,7 @@ eNBs = (
|
||||
{
|
||||
ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
|
||||
@@ -175,6 +175,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -184,6 +185,8 @@ eNBs =
|
||||
enable_x2 = "yes";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -356,6 +356,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -367,6 +368,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -177,6 +177,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -188,6 +189,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -178,6 +178,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -189,6 +190,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
///M2
|
||||
target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7";
|
||||
|
||||
@@ -136,6 +136,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -147,6 +148,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -136,6 +136,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -147,6 +148,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -136,6 +136,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -147,6 +148,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -136,6 +136,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -145,6 +146,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -173,6 +173,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -184,6 +185,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -176,6 +176,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -187,6 +188,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
target_enb_x2_ip_address = (
|
||||
{ ipv4 = "CI_RCC_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
|
||||
@@ -176,6 +176,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -187,6 +188,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -181,6 +181,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -192,6 +193,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -144,6 +144,11 @@ eNBs =
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
//SSB central frequency of NR secondary cell group (for ENDC NSA)
|
||||
nr_scg_ssb_freq = 641272;
|
||||
>>>>>>> fork_develop_new
|
||||
}
|
||||
);
|
||||
|
||||
@@ -181,6 +186,10 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
port = 36412 ;
|
||||
>>>>>>> fork_develop_new
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -190,6 +199,11 @@ eNBs =
|
||||
enable_x2 = "yes";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
>>>>>>> fork_develop_new
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -176,6 +176,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -187,6 +188,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -175,6 +175,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -183,6 +184,8 @@ eNBs =
|
||||
enable_x2 = "yes";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
target_enb_x2_ip_address = (
|
||||
{ ipv4 = "CI_RCC_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
|
||||
@@ -45,8 +45,8 @@ gNBs =
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=50 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 13475;
|
||||
# this is RBstart=41,L=24 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 6366;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
@@ -59,7 +59,7 @@ gNBs =
|
||||
#initialULBWPmappingType
|
||||
#0=typeA,1=typeB
|
||||
initialDLBWPmappingType_0 = 0;
|
||||
#this is SS=2,L=3
|
||||
#this is SS=1,L=13
|
||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||
|
||||
initialDLBWPk0_1 = 0;
|
||||
@@ -74,7 +74,11 @@ gNBs =
|
||||
|
||||
initialDLBWPk0_3 = 0;
|
||||
initialDLBWPmappingType_3 = 0;
|
||||
<<<<<<< HEAD
|
||||
#this is SS=1,L=4
|
||||
=======
|
||||
#this is SS=1,L=5
|
||||
>>>>>>> fork_develop_new
|
||||
initialDLBWPstartSymbolAndLength_3 = 57;
|
||||
|
||||
#uplinkConfigCommon
|
||||
@@ -89,7 +93,7 @@ gNBs =
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 13475;
|
||||
initialULBWPlocationAndBandwidth = 6366;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
@@ -126,17 +130,17 @@ gNBs =
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2;
|
||||
initialULBWPk2_0 = 6;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=0 L=11
|
||||
initialULBWPstartSymbolAndLength_0 = 55;
|
||||
|
||||
initialULBWPk2_1 = 2;
|
||||
|
||||
initialULBWPk2_1 = 6;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=12
|
||||
initialULBWPstartSymbolAndLength_1 = 69;
|
||||
@@ -145,7 +149,11 @@ gNBs =
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> fork_develop_new
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -204,6 +212,7 @@ gNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -249,7 +258,11 @@ RUs = (
|
||||
eNB_instances = [0];
|
||||
#beamforming 1x4 matrix:
|
||||
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
|
||||
<<<<<<< HEAD
|
||||
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2";
|
||||
=======
|
||||
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
|
||||
>>>>>>> fork_develop_new
|
||||
clock_src = "external";
|
||||
}
|
||||
);
|
||||
|
||||
@@ -201,6 +201,10 @@ gNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
port = 36412 ;
|
||||
>>>>>>> fork_develop_new
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -210,6 +214,11 @@ gNBs =
|
||||
enable_x2 = "yes";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
>>>>>>> fork_develop_new
|
||||
target_enb_x2_ip_address = (
|
||||
{ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
@@ -289,3 +298,9 @@ THREAD_STRUCT = (
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
uicc: {
|
||||
opc = "testopc";
|
||||
};
|
||||
>>>>>>> fork_develop_new
|
||||
|
||||
@@ -173,6 +173,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -184,6 +185,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -174,6 +174,10 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
port = 36412 ;
|
||||
>>>>>>> fork_develop_new
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -185,6 +189,11 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
>>>>>>> fork_develop_new
|
||||
|
||||
////////// MCE parameters:
|
||||
target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7";
|
||||
|
||||
@@ -174,6 +174,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -185,6 +186,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
////////// MCE parameters:
|
||||
target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7";
|
||||
|
||||
@@ -136,6 +136,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -147,6 +148,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -141,6 +141,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -150,6 +151,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -139,6 +139,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -150,6 +151,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -139,6 +139,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -150,6 +151,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -176,6 +176,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -187,6 +188,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -176,6 +176,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -187,6 +188,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -176,6 +176,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -187,6 +188,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -144,6 +144,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.15.130";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -155,6 +156,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
|
||||
////////// MCE parameters:
|
||||
|
||||
@@ -144,6 +144,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -155,6 +156,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
|
||||
////////// MCE parameters:
|
||||
|
||||
@@ -174,6 +174,7 @@ eNBs =
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
@@ -185,6 +186,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
9d690a12: #oppo
|
||||
- adb shell input keyevent KEYCODE_POWER
|
||||
- adb shell input swipe 300 700 300 0
|
||||
- adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
|
||||
- adb shell input keyevent 20
|
||||
- adb shell input tap 968 324
|
||||
002: #s10
|
||||
- adb shell input keyevent KEYCODE_POWER
|
||||
- adb shell input swipe 200 900 200 300
|
||||
- adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
|
||||
- adb shell input tap 968 324
|
||||
003: #s20
|
||||
- adb shell input keyevent KEYCODE_POWER
|
||||
- adb shell input swipe 200 900 200 300
|
||||
- adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
|
||||
- adb shell input tap 968 324
|
||||
004: #xperia
|
||||
- tbd
|
||||
- tbd
|
||||
- tbd
|
||||
@@ -84,6 +84,12 @@ nullPointer:common/utils/T/tracer/multi.c:265
|
||||
arrayIndexOutOfBounds:openair2/LAYER2/rlc_v2/tests/test.c:401
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// this file is used for testing the NR RLC implementation, this error is
|
||||
// not a problem, the programmer has to know what she does when writing
|
||||
// the tests
|
||||
arrayIndexOutOfBounds:openair2/LAYER2/nr_rlc/tests/test.c:451
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// cppcheck does not understand the different lengths of arrays
|
||||
arrayIndexOutOfBounds:openair1/SIMULATION/TOOLS/random_channel.c:705
|
||||
arrayIndexOutOfBounds:openair1/SIMULATION/TOOLS/random_channel.c:706
|
||||
|
||||
+2
-1
@@ -65,6 +65,7 @@ class EPCManagement():
|
||||
self.testCase_id = ''
|
||||
self.MmeIPAddress = ''
|
||||
self.containerPrefix = 'prod'
|
||||
self.mmeConfFile = 'mme.conf'
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
@@ -127,7 +128,7 @@ class EPCManagement():
|
||||
logging.debug('Using the OAI EPC Release 14 MME in Docker')
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup tshark -i eth0 -i lo:s10 -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup ./bin/oai_mme -c ./etc/mme.conf > mme_check_run.log 2>&1"', '\$', 5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup ./bin/oai_mme -c ./etc/' + self.mmeConfFile + ' > mme_check_run.log 2>&1"', '\$', 5)
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 MME')
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
|
||||
+16
-2
@@ -64,6 +64,10 @@ class HTMLManagement():
|
||||
self.htmlTabIcons = []
|
||||
self.testXMLfiles = []
|
||||
|
||||
self.testUnstable = False
|
||||
self.testMinStableId = '999999'
|
||||
self.testStabilityPointReached = False
|
||||
|
||||
self.htmleNBFailureMsg = ''
|
||||
self.htmlUEFailureMsg = ''
|
||||
|
||||
@@ -230,13 +234,20 @@ class HTMLManagement():
|
||||
|
||||
def CreateHtmlTabFooter(self, passStatus):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
testOkEvenIfUnstable = False
|
||||
if self.testUnstable and not passStatus:
|
||||
if self.testStabilityPointReached or self.testMinStableId == '999999':
|
||||
testOkEvenIfUnstable = True
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th bgcolor = "#33CCFF" colspan=3>Final Tab Status</th>\n')
|
||||
if passStatus:
|
||||
self.htmlFile.write(' <th bgcolor = "green" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th bgcolor = "red" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
if testOkEvenIfUnstable:
|
||||
self.htmlFile.write(' <th bgcolor = "orange" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">KNOWN UNSTABLE SCENARIO <span class="glyphicon glyphicon-exclamation-sign"></span> </font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th bgcolor = "red" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' </div>\n')
|
||||
@@ -246,7 +257,10 @@ class HTMLManagement():
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
else:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
|
||||
if testOkEvenIfUnstable:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-exclamation-sign\"><\/span>/' test_results.html"
|
||||
else:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
self.htmlFooterCreated = False
|
||||
|
||||
|
||||
+100
-3085
File diff suppressed because it is too large
Load Diff
+56
-14
@@ -90,6 +90,7 @@ class RANManagement():
|
||||
self.epcPcapFile = ''
|
||||
self.htmlObj = None
|
||||
self.epcObj = None
|
||||
self.runtime_stats= ''
|
||||
|
||||
|
||||
|
||||
@@ -132,7 +133,7 @@ class RANManagement():
|
||||
self.air_interface[self.eNB_instance] = 'nr-softmodem'
|
||||
else:
|
||||
self.air_interface[self.eNB_instance] = 'lte-softmodem'
|
||||
|
||||
|
||||
# Worakround for some servers, we need to erase completely the workspace
|
||||
if self.Build_eNB_forced_workspace_cleanup:
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf ' + lSourcePath, '\$', 15)
|
||||
@@ -426,7 +427,7 @@ class RANManagement():
|
||||
# Launch eNB with the modified config file
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd cmake_targets', '\$', 5)
|
||||
if self.air_interface == 'nr':
|
||||
if self.air_interface[self.eNB_instance] == 'nr-softmodem':
|
||||
mySSH.command('if [ -e rbconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm rbconfig.raw; fi', '\$', 5)
|
||||
mySSH.command('if [ -e reconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm reconfig.raw; fi', '\$', 5)
|
||||
# NOTE: WE SHALL do a check if the executable is present (in case build went wrong)
|
||||
@@ -614,7 +615,7 @@ class RANManagement():
|
||||
logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m')
|
||||
logStatus = self.AnalyzeLogFile_eNB(extracted_log_file)
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.eNBLogFiles[int(self.eNB_instance)] = ''
|
||||
else:
|
||||
analyzeFile = False
|
||||
@@ -643,10 +644,10 @@ class RANManagement():
|
||||
return
|
||||
else:
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.eNBmbmsEnables[int(self.eNB_instance)] = False
|
||||
self.eNBstatuses[int(self.eNB_instance)] = -1
|
||||
|
||||
@@ -704,6 +705,11 @@ class RANManagement():
|
||||
systemTime = ''
|
||||
maxPhyMemUsage = ''
|
||||
nbContextSwitches = ''
|
||||
#NSA FR1 check
|
||||
NSA_RAPROC_PUSCH_check = 0
|
||||
#dlsch and ulsch statistics (dictionary)
|
||||
dlsch_ulsch_stats = {}
|
||||
|
||||
for line in enb_log_file.readlines():
|
||||
# Runtime statistics
|
||||
result = re.search('Run time:' ,str(line))
|
||||
@@ -712,16 +718,20 @@ class RANManagement():
|
||||
if runTime != '':
|
||||
result = re.search('Time executing user inst', str(line))
|
||||
if result is not None:
|
||||
userTime = 'to be decoded - 1'
|
||||
fields=line.split(':')
|
||||
userTime = 'userTime : ' + fields[1].replace('\n','')
|
||||
result = re.search('Time executing system inst', str(line))
|
||||
if result is not None:
|
||||
systemTime = 'to be decoded - 2'
|
||||
fields=line.split(':')
|
||||
systemTime = 'systemTime : ' + fields[1].replace('\n','')
|
||||
result = re.search('Max. Phy. memory usage:', str(line))
|
||||
if result is not None:
|
||||
maxPhyMemUsage = 'to be decoded - 3'
|
||||
fields=line.split(':')
|
||||
maxPhyMemUsage = 'maxPhyMemUsage : ' + fields[1].replace('\n','')
|
||||
result = re.search('Number of context switch.*process origin', str(line))
|
||||
if result is not None:
|
||||
nbContextSwitches = 'to be decoded - 4'
|
||||
fields=line.split(':')
|
||||
nbContextSwitches = 'nbContextSwitches : ' + fields[1].replace('\n','')
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__IDLE:
|
||||
result = re.search('target eNB Receives X2 HO Req X2AP_HANDOVER_REQ', str(line))
|
||||
if result is not None:
|
||||
@@ -850,6 +860,20 @@ class RANManagement():
|
||||
result = re.search('MBMS USER-PLANE.*Requesting.*bytes from RLC', str(line))
|
||||
if result is not None:
|
||||
mbmsRequestMsg += 1
|
||||
#FR1 NSA test : add new markers to make sure gNB is used
|
||||
result = re.search('\[gNB [0-9]+\]\[RAPROC\] PUSCH with TC_RNTI [0-9a-fA-F]+ received correctly, adding UE MAC Context UE_id [0-9]+\/RNTI [0-9a-fA-F]+', str(line))
|
||||
if result is not None:
|
||||
NSA_RAPROC_PUSCH_check = 1
|
||||
#dlsch and ulsch statistics
|
||||
#keys below are the markers we are loooking for, loop over this keys list
|
||||
#everytime these markers are found in the log file, the previous ones are overwritten in the dict
|
||||
#eventually we record and print only the last occurence
|
||||
keys = {'dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled'}
|
||||
for k in keys:
|
||||
result = re.search(k, line)
|
||||
if result is not None:
|
||||
#remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char
|
||||
dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip())
|
||||
enb_log_file.close()
|
||||
logging.debug(' File analysis completed')
|
||||
if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):
|
||||
@@ -869,6 +893,23 @@ class RANManagement():
|
||||
statMsg = nodeB_prefix + 'NB ran with TX Write thread enabled'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
#FR1 NSA test : add new markers to make sure gNB is used
|
||||
if NSA_RAPROC_PUSCH_check:
|
||||
statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS '
|
||||
htmlMsg = statMsg+'\n'
|
||||
else:
|
||||
statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL '
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
#ulsch and dlsch statistics
|
||||
if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty
|
||||
statMsg=''
|
||||
for key in dlsch_ulsch_stats: #for each dictionary key
|
||||
statMsg += dlsch_ulsch_stats[key] + '\n'
|
||||
logging.debug(dlsch_ulsch_stats[key])
|
||||
htmleNBFailureMsg += statMsg
|
||||
|
||||
if uciStatMsgCount > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
@@ -978,11 +1019,12 @@ class RANManagement():
|
||||
global_status = CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.htmleNBFailureMsg=htmleNBFailureMsg
|
||||
# Runtime statistics
|
||||
# Runtime statistics for console output and HTML
|
||||
if runTime != '':
|
||||
logging.debug(runTime)
|
||||
logging.debug('Time executing user inst : ' + userTime)
|
||||
logging.debug('Time executing system inst : ' + systemTime)
|
||||
logging.debug('Max Physical Memory Usage : ' + maxPhyMemUsage)
|
||||
logging.debug('Nb Context Switches : ' + nbContextSwitches)
|
||||
logging.debug(userTime)
|
||||
logging.debug(systemTime)
|
||||
logging.debug(maxPhyMemUsage)
|
||||
logging.debug(nbContextSwitches)
|
||||
self.runtime_stats='<pre>'+runTime + '\n'+ userTime + '\n' + systemTime + '\n' + maxPhyMemUsage + '\n' + nbContextSwitches+'</pre>'
|
||||
return global_status
|
||||
|
||||
@@ -470,7 +470,7 @@ function report_test {
|
||||
then
|
||||
NB_UE_TUNNEL_UP=`egrep -c "Interface oaitun_ue1 successfully configured" $UE_LOG`
|
||||
else
|
||||
NB_UE_TUNNEL_UP=`egrep -c "executing ifconfig oaitun_ue1" $UE_LOG`
|
||||
NB_UE_TUNNEL_UP=`egrep -c "ip link set oaitun_ue1 up" $UE_LOG`
|
||||
fi
|
||||
if [ $NB_ENB_GOT_SYNC -gt 0 ] && [ $NB_UE_GOT_SYNC -gt 0 ] && [ $NB_ENB_SYNCED_WITH_UE -gt 0 ]
|
||||
then
|
||||
@@ -765,6 +765,52 @@ function report_test {
|
||||
echo " <td align = \"center\" colspan = 4 >Test without EPC (aka noS1): ${TMODE} -- ${BW}PRB </td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
|
||||
#RA test (--do-ra option)
|
||||
|
||||
#build log files names
|
||||
RA_ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_gnb_ra_test.log
|
||||
RA_UE_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_ue_ra_test.log
|
||||
if [ -f $RA_ENB_LOG ] && [ -f $RA_UE_LOG ]
|
||||
then
|
||||
#get rid of full path
|
||||
NAME_ENB=`echo $RA_ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
NAME_UE=`echo $RA_UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
|
||||
echo " <td>Check if RA proc succeeded</td>" >> ./test_simulator_results.html
|
||||
|
||||
#gNB RA check
|
||||
GNB_RECEIVED=`egrep -c "\[RAPROC\] PUSCH with TC_RNTI (.+) received correctly" $RA_ENB_LOG`
|
||||
#UE RA check
|
||||
UE_RA_PROC_OK=`egrep -c "\[RAPROC\] RA procedure succeeded" $RA_UE_LOG`
|
||||
|
||||
|
||||
if [ $GNB_RECEIVED -gt 0 ] && [ $UE_RA_PROC_OK -gt 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
|
||||
echo " <td><pre>" >> ./test_simulator_results.html
|
||||
if [ $GNB_RECEIVED -gt 0 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- gNB --> RA received</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- gNB RA NOT RECEIVED</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $UE_RA_PROC_OK -gt 0 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- NR UE --> RA procedure succeded</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- NR UE RA procedure failed</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </pre></td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
|
||||
#SYNC test
|
||||
ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_gnb.log
|
||||
UE_LOG=`echo $ENB_LOG | sed -e "s#gnb#ue#"`
|
||||
if [ -f $ENB_LOG ] && [ -f $UE_LOG ]
|
||||
|
||||
+166
-46
@@ -276,6 +276,43 @@ function check_ping_result {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function check_ra_result {
|
||||
local LOC_GNB_LOG=$1
|
||||
local LOC_UE_LOG=$2
|
||||
|
||||
#if log files exist
|
||||
if [ -f $LOC_GNB_LOG ] && [ -f $LOC_UE_LOG ]
|
||||
then
|
||||
|
||||
#gNB RA test
|
||||
#console check
|
||||
echo "Checking gNB Log for RA success"
|
||||
egrep "\[RAPROC\] PUSCH with TC_RNTI (.+) received correctly" $1
|
||||
#script check
|
||||
local GNB_COMPLETE=`egrep -c "\[RAPROC\] PUSCH with TC_RNTI (.+) received correctly" $1`
|
||||
|
||||
#UE RA test
|
||||
#console check
|
||||
echo 'Checking UE Log for RA success'
|
||||
egrep "\[RAPROC\] RA procedure succeeded" $2
|
||||
#script check
|
||||
local UE_COMPLETE=`egrep -c "\[RAPROC\] RA procedure succeeded" $2`
|
||||
|
||||
#generate status
|
||||
if [ $GNB_COMPLETE -eq 0 ] || [ $UE_COMPLETE -eq 0 ]
|
||||
then
|
||||
RA_STATUS=-1
|
||||
echo "RA test FAILED, could not find the markers"
|
||||
fi
|
||||
#case where log files do not exist
|
||||
else
|
||||
echo "RA test log files not present"
|
||||
RA_STATUS=-1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# In DL: iperf server should be on UE side
|
||||
# -B oaitun_ue{j}-IP-Addr
|
||||
# iperf client should be on EPC (S1) or eNB (noS1) side
|
||||
@@ -1172,6 +1209,8 @@ function start_rf_sim_gnb {
|
||||
local LOC_CONF_FILE=$5
|
||||
# 1 is with S1 and 0 without S1 aka noS1
|
||||
local LOC_S1_CONFIGURATION=$6
|
||||
#LOC_RA_TEST=1 will run the RA test check
|
||||
local LOC_RA_TEST=$7
|
||||
|
||||
if [ -e rbconfig.raw ]; then rm -f rbconfig.raw; fi
|
||||
if [ -e reconfig.raw ]; then rm -f reconfig.raw; fi
|
||||
@@ -1181,6 +1220,8 @@ function start_rf_sim_gnb {
|
||||
echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1
|
||||
echo "echo \"source oaienv\"" >> $1
|
||||
echo "source oaienv" >> $1
|
||||
echo "echo \"export RFSIMULATOR=server\"" >> $1
|
||||
echo "export RFSIMULATOR=server" >> $1
|
||||
echo "cd ci-scripts/conf_files/" >> $1
|
||||
echo "cp $LOC_CONF_FILE ci-$LOC_CONF_FILE" >> $1
|
||||
#echo "sed -i -e 's#N_RB_DL.*=.*;#N_RB_DL = $LOC_NB_RBS;#' -e 's#CI_MME_IP_ADDR#$LOC_EPC_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$LOC_ENB_VM_IP_ADDR#' -e 's#CI_UE_IP_ADDR#$LOC_UE_VM_IP_ADDR#' ci-$LOC_CONF_FILE" >> $1
|
||||
@@ -1192,7 +1233,12 @@ function start_rf_sim_gnb {
|
||||
echo "sudo rm -f r*config.raw" >> $1
|
||||
if [ $LOC_S1_CONFIGURATION -eq 0 ]
|
||||
then
|
||||
echo "echo \"RFSIMULATOR=server ./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
if [ $LOC_RA_TEST -eq 0 ] #no RA test => use --phy-test option
|
||||
then
|
||||
echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
else #RA test => use --do-ra option
|
||||
echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --rfsim --do-ra\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
fi
|
||||
fi
|
||||
echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1
|
||||
echo "cat ./my-nr-softmodem-run.sh" >> $1
|
||||
@@ -1202,6 +1248,7 @@ function start_rf_sim_gnb {
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
|
||||
|
||||
local i="0"
|
||||
echo "egrep -c \"got sync\" /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE" > $1
|
||||
while [ $i -lt 10 ]
|
||||
@@ -1224,7 +1271,9 @@ function start_rf_sim_gnb {
|
||||
GNB_SYNC=1
|
||||
echo "RF-SIM gNB is sync'ed: waiting for UE(s) to connect"
|
||||
fi
|
||||
if [ $LOC_S1_CONFIGURATION -eq 0 ]
|
||||
|
||||
# check noS1 config only outside RA test (as it does not support noS1)
|
||||
if [ $LOC_S1_CONFIGURATION -eq 0 ] && [ $LOC_RA_TEST -eq 0 ]
|
||||
then
|
||||
echo "ifconfig oaitun_enb1 | egrep -c \"inet addr\"" > $1
|
||||
# Checking oaitun_enb1 interface has now an IP address
|
||||
@@ -1249,6 +1298,8 @@ function start_rf_sim_gnb {
|
||||
echo "RF-SIM gNB oaitun_enb1 is UP and CONFIGURED"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
sleep 10
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
@@ -1267,6 +1318,8 @@ function start_rf_sim_nr_ue {
|
||||
local LOC_FREQUENCY=$6
|
||||
# 1 is with S1 and 0 without S1 aka noS1
|
||||
local LOC_S1_CONFIGURATION=$7
|
||||
#LOC_RA_TEST=1 will run the RA test check
|
||||
local LOC_RA_TEST=$8
|
||||
|
||||
# Copy the RAW files from the gNB run
|
||||
scp -o StrictHostKeyChecking=no rbconfig.raw ubuntu@$LOC_NR_UE_VM_IP_ADDR:/home/ubuntu/tmp
|
||||
@@ -1274,6 +1327,8 @@ function start_rf_sim_nr_ue {
|
||||
|
||||
echo "echo \"sudo apt-get --yes --quiet install daemon \"" > $1
|
||||
echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1
|
||||
echo "echo \"export RFSIMULATOR=${LOC_GNB_VM_IP_ADDR}\"" >> $1
|
||||
echo "export RFSIMULATOR=${LOC_GNB_VM_IP_ADDR}" >> $1
|
||||
echo "echo \"cd /home/ubuntu/tmp/cmake_targets/ran_build/build/\"" >> $1
|
||||
echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
echo "sudo cp /home/ubuntu/tmp/r*config.raw /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
@@ -1281,7 +1336,12 @@ function start_rf_sim_nr_ue {
|
||||
echo "cd /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
if [ $LOC_S1_CONFIGURATION -eq 0 ]
|
||||
then
|
||||
echo "echo \"RFSIMULATOR=${LOC_GNB_VM_IP_ADDR} ./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/ --log_config.global_log_options level,nocolor --noS1\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
if [ $LOC_RA_TEST -eq 0 ] #no RA test => use --phy-test option
|
||||
then
|
||||
echo "echo \"./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/ --log_config.global_log_options level,nocolor --noS1\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
else #RA test => use --do-ra option
|
||||
echo "echo \"./nr-uesoftmodem --rfsim --do-ra --log_config.global_log_options level,nocolor --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
fi
|
||||
fi
|
||||
echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1
|
||||
echo "cat ./my-nr-softmodem-run.sh" >> $1
|
||||
@@ -1314,11 +1374,13 @@ function start_rf_sim_nr_ue {
|
||||
else
|
||||
echo "RF-SIM NR-UE is sync'ed w/ gNB"
|
||||
fi
|
||||
# Checking oaitun_ue1 interface has now an IP address
|
||||
i="0"
|
||||
echo "ifconfig oaitun_ue1 | egrep -c \"inet addr\"" > $1
|
||||
while [ $i -lt 10 ]
|
||||
do
|
||||
# Checking oaitun_ue1 interface has now an IP address (only outside RA test)
|
||||
if [ $LOC_RA_TEST -eq 0 ]
|
||||
then
|
||||
i="0"
|
||||
echo "ifconfig oaitun_ue1 | egrep -c \"inet addr\"" > $1
|
||||
while [ $i -lt 10 ]
|
||||
do
|
||||
sleep 5
|
||||
CONNECTED=`ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_NR_UE_VM_IP_ADDR < $1`
|
||||
if [ $CONNECTED -eq 1 ]
|
||||
@@ -1327,19 +1389,20 @@ function start_rf_sim_nr_ue {
|
||||
else
|
||||
i=$[$i+1]
|
||||
fi
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_NR_UE_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
if [ $i -lt 50 ]
|
||||
then
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_NR_UE_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
if [ $i -lt 50 ]
|
||||
then
|
||||
NR_UE_SYNC=0
|
||||
echo "RF-SIM NR-UE oaitun_ue1 is DOWN or NOT CONFIGURED"
|
||||
else
|
||||
else
|
||||
echo "RF-SIM NR-UE oaitun_ue1 is UP and CONFIGURED"
|
||||
fi
|
||||
sleep 10
|
||||
fi
|
||||
sleep 10
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -2027,30 +2090,6 @@ function run_test_on_vm {
|
||||
|
||||
done
|
||||
|
||||
full_l2_sim_destroy
|
||||
|
||||
echo "############################################################"
|
||||
echo "Checking run status"
|
||||
echo "############################################################"
|
||||
|
||||
if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi
|
||||
if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi
|
||||
if [ $MBMS_STATUS -eq 0 ]
|
||||
then
|
||||
echo "LTE MBMS RFSIM seems OK"
|
||||
else
|
||||
echo "LTE MBMS RFSIM seems to FAIL"
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo "LTE RFSIM seems OK"
|
||||
echo "LTE: TEST_OK" > $ARCHIVES_LOC/test_final_status.log
|
||||
else
|
||||
echo "LTE RFSIM seems to FAIL"
|
||||
echo "LTE: TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||
fi
|
||||
|
||||
####################
|
||||
## FeMBMS CASE noS1 ##
|
||||
####################
|
||||
@@ -2123,6 +2162,13 @@ function run_test_on_vm {
|
||||
|
||||
if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi
|
||||
if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi
|
||||
if [ $MBMS_STATUS -eq 0 ]
|
||||
then
|
||||
echo "LTE MBMS RFSIM seems OK"
|
||||
else
|
||||
echo "LTE MBMS RFSIM seems to FAIL"
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ $FeMBMS_STATUS -eq 0 ]
|
||||
then
|
||||
echo "LTE FeMBMS RFSIM seems OK"
|
||||
@@ -2149,27 +2195,100 @@ function run_test_on_vm {
|
||||
PRB=106
|
||||
FREQUENCY=3510
|
||||
|
||||
if [ ! -d $ARCHIVES_LOC ]
|
||||
then
|
||||
mkdir --parents $ARCHIVES_LOC
|
||||
fi
|
||||
|
||||
local try_cnt="0"
|
||||
NR_STATUS=0
|
||||
|
||||
######### start of loop
|
||||
while [ $try_cnt -lt 1 ]
|
||||
######### start of RA TEST loop
|
||||
while [ $try_cnt -lt 5 ] #5 because it hardly succeed within CI
|
||||
do
|
||||
|
||||
SYNC_STATUS=0
|
||||
RA_STATUS=0
|
||||
rm -f $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}*ra_test.log
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the gNB"
|
||||
echo "############################################################"
|
||||
CURRENT_GNB_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_gnb_ra_test.log
|
||||
#last argument = 1 is to enable --do-ra for RA test
|
||||
start_rf_sim_gnb $GNB_VM_CMDS "$GNB_VM_IP_ADDR" $CURRENT_GNB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG 1
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the NR-UE"
|
||||
echo "############################################################"
|
||||
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue_ra_test.log
|
||||
#last argument = 1 is to enable --do-ra for RA test
|
||||
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 1
|
||||
if [ $NR_UE_SYNC -eq 0 ]
|
||||
then
|
||||
echo "Problem w/ gNB and NR-UE not syncing"
|
||||
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
|
||||
terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
|
||||
SYNC_STATUS=-1
|
||||
try_cnt=$[$try_cnt+1]
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Terminate gNB/NR-UE simulators"
|
||||
echo "############################################################"
|
||||
sleep 20
|
||||
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
|
||||
terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
|
||||
|
||||
#check RA markers in gNB and NR UE log files
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Checking RA on gNB / NR-UE"
|
||||
echo "############################################################"
|
||||
|
||||
# Proper check to be done when RA test is working!
|
||||
check_ra_result $ARCHIVES_LOC/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC/$CURRENT_NR_UE_LOG_FILE
|
||||
if [ $RA_STATUS -ne 0 ]
|
||||
then
|
||||
echo "RA test NOT OK"
|
||||
try_cnt=$[$try_cnt+1]
|
||||
else
|
||||
try_cnt=$[$try_cnt+10]
|
||||
fi
|
||||
done
|
||||
########### end RA test
|
||||
|
||||
sleep 30
|
||||
|
||||
|
||||
######### start of PHY TEST loop
|
||||
try_cnt="0"
|
||||
while [ $try_cnt -lt 4 ]
|
||||
do
|
||||
|
||||
|
||||
SYNC_STATUS=0
|
||||
PING_STATUS=0
|
||||
IPERF_STATUS=0
|
||||
rm -f $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}_gnb.log $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}_ue.log
|
||||
rm -f $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}_ping_gnb_from_nrue.log $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}_ping_from_gnb_nrue.log
|
||||
rm -f $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}_iperf_dl*txt $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}_iperf_ul*txt
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the gNB"
|
||||
echo "############################################################"
|
||||
CURRENT_GNB_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_gnb.log
|
||||
start_rf_sim_gnb $GNB_VM_CMDS "$GNB_VM_IP_ADDR" $CURRENT_GNB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG
|
||||
start_rf_sim_gnb $GNB_VM_CMDS "$GNB_VM_IP_ADDR" $CURRENT_GNB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG 0
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the NR-UE"
|
||||
echo "############################################################"
|
||||
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue.log
|
||||
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG
|
||||
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 0
|
||||
if [ $NR_UE_SYNC -eq 0 ]
|
||||
then
|
||||
echo "Problem w/ gNB and NR-UE not syncing"
|
||||
@@ -2257,6 +2376,7 @@ function run_test_on_vm {
|
||||
echo "Checking run status"
|
||||
echo "############################################################"
|
||||
|
||||
if [ $RA_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $SYNC_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $PING_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $IPERF_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
- COTS_UE_Airplane
|
||||
- Build_PhySim
|
||||
- Run_PhySim
|
||||
- Build_eNB
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<htmlTabName>Test-LTE-M-10MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestUnstable>True</TestUnstable>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040102
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
<htmlTabName>Test-05MHz-TM2</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestUnstable>True</TestUnstable>
|
||||
<TestMinId>040608</TestMinId>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
<htmlTabRef>test-10-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestUnstable>True</TestUnstable>
|
||||
<TestMinId>040615</TestMinId>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<htmlTabName>Test-20MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestUnstable>True</TestUnstable>
|
||||
<TestMinId>040623</TestMinId>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
<htmlTabRef>test-20-tm1-defSched</htmlTabRef>
|
||||
<htmlTabName>Test-20MHz-TM1-default-scheduler</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestUnstable>True</TestUnstable>
|
||||
<TestMinId>040522</TestMinId>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-closure</htmlTabRef>
|
||||
<htmlTabName>EPC-Closure</htmlTabName>
|
||||
<htmlTabIcon>log-out</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
060000 060001 060002
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="060000">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060001">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060002">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,48 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-start-tab</htmlTabRef>
|
||||
<htmlTabName>EPC-Start</htmlTabName>
|
||||
<htmlTabIcon>log-in</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000100 000101 000102
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="000100">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000102">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-start-tab</htmlTabRef>
|
||||
<htmlTabName>EPC-Start</htmlTabName>
|
||||
<htmlTabIcon>log-in</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000100 000101 000102
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="000100">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
<option>mme-verizon.conf</option>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000102">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,119 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-FR1-TM1</htmlTabRef>
|
||||
<htmlTabName>FR1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
010000
|
||||
030000
|
||||
040000
|
||||
010001
|
||||
000001
|
||||
050000
|
||||
050001
|
||||
070001
|
||||
070000
|
||||
010002
|
||||
010003
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010003">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010001">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="030000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>lte</air_interface>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>50</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 5pings in 1sec</desc>
|
||||
<ping_args>-c 5 -i 0.2</ping_args>
|
||||
<ping_packetloss_threshold>50</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>lte</air_interface>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070001">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate gNB</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-05-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
030101 040301 000001 040501 040603 040401 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].plmn_list.[0].mcc 311 --eNBs.[0].plmn_list.[0].mnc 480 --eNBs.[0].plmn_list.[0].mnc_length 3 --eNBs.[0].component_carriers.[0].Nid_cell 10</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040603">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040604">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040605">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040606">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040607">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040641">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040643">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040644">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -25,6 +25,11 @@
|
||||
<htmlTabName>Test-10MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<TestUnstable>True</TestUnstable>
|
||||
<TestMinId>040612</TestMinId>
|
||||
>>>>>>> fork_develop_new
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabName>Test-X2-HO-FDD-05MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestUnstable>True</TestUnstable>
|
||||
<TestCaseRequestedList>
|
||||
030201 030202
|
||||
040101
|
||||
|
||||
+224
-131
@@ -23,6 +23,114 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.0)
|
||||
|
||||
|
||||
# System packages that are required
|
||||
# We use either the cmake buildin, in ubuntu are in: /usr/share/cmake*/Modules/
|
||||
# or cmake provide a generic interface to pkg-config that widely used
|
||||
###################################
|
||||
include(FindPkgConfig)
|
||||
|
||||
pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
|
||||
include_directories(${LIBXML2_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(LIBXSLT libxslt REQUIRED)
|
||||
include_directories(${LIBXSLT_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(OPENSSL openssl REQUIRED)
|
||||
include_directories(${OPENSSL_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(CONFIG libconfig REQUIRED)
|
||||
include_directories(${CONFIG_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(CRYPTO libcrypto REQUIRED)
|
||||
include_directories(${CRYPTO_INCLUDE_DIRS})
|
||||
|
||||
#use native cmake method as this package is not in pkg-config
|
||||
if (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
find_package(Boost REQUIRED)
|
||||
include_directories(${LIBBOOST_INCLUDE_DIR})
|
||||
|
||||
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||
include_directories("/usr/local/include/")
|
||||
set(HW_SOURCE ${HW_SOURCE}
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
|
||||
LINK_DIRECTORIES("/usr/local/lib")
|
||||
set(option_HW_lib "-lSoapySDR -rdynamic -ldl")
|
||||
|
||||
endif (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
|
||||
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
|
||||
if(NOT ${OPENPGM_FOUND})
|
||||
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
|
||||
else()
|
||||
include_directories(${OPENPGM_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
pkg_search_module(NETTLE nettle)
|
||||
if(NOT ${NETTLE_FOUND})
|
||||
message( FATAL_ERROR "PACKAGE nettle not found: some targets will fail. Run build_oai -I again!")
|
||||
else()
|
||||
include_directories(${NETTLE_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
message ("NETTLE VERSION_INSTALLED = ${NETTLE_VERSION}")
|
||||
|
||||
string(REGEX REPLACE "([0-9]+).*" "\\1" NETTLE_VERSION_MAJOR ${NETTLE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" NETTLE_VERSION_MINOR ${NETTLE_VERSION})
|
||||
message ("NETTLE_VERSION_MAJOR = ${NETTLE_VERSION_MAJOR}")
|
||||
message ("NETTLE_VERSION_MINOR = ${NETTLE_VERSION_MINOR}")
|
||||
|
||||
if ("${NETTLE_VERSION_MAJOR}" STREQUAL "" OR "${NETTLE_VERSION_MINOR}" STREQUAL "")
|
||||
message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
|
||||
endif()
|
||||
|
||||
add_definitions("-DNETTLE_VERSION_MAJOR=${NETTLE_VERSION_MAJOR}")
|
||||
add_definitions("-DNETTLE_VERSION_MINOR=${NETTLE_VERSION_MINOR}")
|
||||
|
||||
pkg_search_module(XPM xpm)
|
||||
if(NOT ${XPM_FOUND})
|
||||
message("PACKAGE xpm not found: some targets will fail")
|
||||
else()
|
||||
include_directories(${XPM_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Atlas is required by some packages, but not found in pkg-config
|
||||
# So, here are some hacks here. Hope this gets fixed in future!
|
||||
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
|
||||
include_directories("/usr/include/atlas")
|
||||
LINK_DIRECTORIES("/usr/lib/lapack")
|
||||
LINK_DIRECTORIES("/usr/lib64")
|
||||
LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!
|
||||
|
||||
if(EXISTS "/usr/lib64/libblas.so" OR EXISTS "/usr/lib/libblas.so") #Case for CentOS7
|
||||
list(APPEND ATLAS_LIBRARIES blas)
|
||||
|
||||
else() # Case for Ubuntu
|
||||
list(APPEND ATLAS_LIBRARIES cblas)
|
||||
endif()
|
||||
|
||||
if(EXISTS "/usr/lib/atlas/libtatlas.so" OR EXISTS "/usr/lib64/atlas/libtatlas.so") #Case for CentOS7
|
||||
list(APPEND ATLAS_LIBRARIES tatlas)
|
||||
else()
|
||||
list(APPEND ATLAS_LIBRARIES atlas) #Case for Ubuntu
|
||||
endif()
|
||||
|
||||
list(APPEND ATLAS_LIBRARIES lapack)
|
||||
|
||||
# for ubuntu 17.10, directories are different
|
||||
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")
|
||||
|
||||
include_directories("/usr/include/x86_64-linux-gnu")
|
||||
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
|
||||
list(APPEND ATLAS_LIBRARIES cblas)
|
||||
list(APPEND ATLAS_LIBRARIES atlas)
|
||||
list(APPEND ATLAS_LIBRARIES lapack)
|
||||
|
||||
else()
|
||||
message("No Blas/Atlas libs found, some targets will fail")
|
||||
endif()
|
||||
|
||||
#########################################################
|
||||
# Base directories, compatible with legacy OAI building #
|
||||
#########################################################
|
||||
@@ -232,8 +340,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
|
||||
#########################
|
||||
# set a flag for changes in the source code
|
||||
# these changes are related to hardcoded path to include .h files
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -O0 -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")
|
||||
|
||||
set(GIT_BRANCH "UNKNOWN")
|
||||
@@ -302,7 +410,6 @@ set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
||||
add_library(ITTI
|
||||
${OCP_ITTI}/intertask_interface.cpp
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/memory_pools.c
|
||||
)
|
||||
add_dependencies(ITTI rrc_flag)
|
||||
set(ITTI_LIB ITTI)
|
||||
@@ -378,6 +485,7 @@ add_custom_target (
|
||||
|
||||
add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source}
|
||||
${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c
|
||||
${OPENAIR2_DIR}/RRC/NR/nr_ngap_gNB.c
|
||||
)
|
||||
add_dependencies(NR_RRC_LIB nr_rrc_flag)
|
||||
include_directories ("${NR_RRC_FULL_DIR}")
|
||||
@@ -622,7 +730,7 @@ add_library(X2AP_ENB
|
||||
${X2AP_DIR}/x2ap_ids.c
|
||||
${X2AP_DIR}/x2ap_timers.c
|
||||
)
|
||||
add_dependencies(X2AP_ENB rrc_flag x2_flag)
|
||||
add_dependencies(X2AP_ENB X2AP_LIB rrc_flag x2_flag)
|
||||
|
||||
|
||||
# F1AP
|
||||
@@ -813,7 +921,7 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
||||
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
||||
|
||||
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
||||
add_boolean_option(DEADLINE_SCHEDULER True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
|
||||
add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
|
||||
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
|
||||
add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
|
||||
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
|
||||
@@ -825,7 +933,6 @@ add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchang
|
||||
add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION with max 256 UE")
|
||||
add_boolean_option(PHY_TX_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")
|
||||
|
||||
########################
|
||||
# Include order
|
||||
@@ -835,9 +942,9 @@ add_boolean_option(ENB_MODE True "Swap the include directories between openair2
|
||||
##########################
|
||||
# SCHEDULING/REAL-TIME/PERF options
|
||||
##########################
|
||||
add_boolean_option(ENABLE_USE_CPU_EXECUTION_TIME True "Add data in vcd traces: disable it if perf issues")
|
||||
add_boolean_option(ENABLE_VCD True "always true now, time measurements of proc calls and var displays")
|
||||
add_boolean_option(ENABLE_VCD_FIFO True "time measurements of proc calls and var displays sent to FIFO (one more thread)")
|
||||
add_boolean_option(ENABLE_USE_CPU_EXECUTION_TIME False "Add data in vcd traces: disable it if perf issues")
|
||||
add_boolean_option(ENABLE_VCD False "always true now, time measurements of proc calls and var displays")
|
||||
add_boolean_option(ENABLE_VCD_FIFO False "time measurements of proc calls and var displays sent to FIFO (one more thread)")
|
||||
add_boolean_option(LINUX False "used in weird memcpy() in pdcp.c ???")
|
||||
add_boolean_option(LINUX_LIST False "used only in lists.c: either use OAI implementation of lists or Linux one (should be True, but it is False")
|
||||
add_boolean_option(OPENAIR_LTE True "Seems legacy: keep it to true")
|
||||
@@ -1095,9 +1202,22 @@ add_library(FLEXRAN_AGENT
|
||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_async.c
|
||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
|
||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c
|
||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_app.c
|
||||
)
|
||||
add_dependencies(FLEXRAN_AGENT rrc_flag)
|
||||
set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT)
|
||||
add_library(flapp_sample SHARED
|
||||
${OPENAIR2_DIR}/ENB_APP/flexran_apps/sample.c
|
||||
)
|
||||
set_target_properties(flapp_sample PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
add_library(flapp_imsi SHARED
|
||||
${OPENAIR2_DIR}/ENB_APP/flexran_apps/imsi.c
|
||||
)
|
||||
set_target_properties(flapp_imsi PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
add_custom_target(flapp_all DEPENDS
|
||||
flapp_sample
|
||||
flapp_imsi
|
||||
)
|
||||
#include_directories(${OPENAIR2_DIR}/ENB_APP)
|
||||
|
||||
set(PROTOBUF_LIB "protobuf-c")
|
||||
@@ -1238,6 +1358,7 @@ set(SECU_OSA_SRC
|
||||
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
|
||||
)
|
||||
add_library(SECU_OSA ${SECU_OSA_SRC})
|
||||
target_link_libraries(SECU_OSA ${NETTLE_LIBRARIES})
|
||||
|
||||
set(SECU_CN_SRC
|
||||
${OPENAIR3_DIR}/SECU/kdf.c
|
||||
@@ -1251,6 +1372,8 @@ set(SECU_CN_SRC
|
||||
)
|
||||
add_library(SECU_CN ${SECU_CN_SRC})
|
||||
|
||||
target_link_libraries(SECU_CN ${NETTLE_LIBRARIES})
|
||||
|
||||
# Physical Channel Procedures Scheduling
|
||||
################################"
|
||||
set(SCHED_SRC
|
||||
@@ -1581,6 +1704,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_csi_rs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
|
||||
@@ -1615,6 +1739,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/sss_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_pbch.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
|
||||
@@ -2019,7 +2144,7 @@ add_dependencies(L2_UE rrc_flag s1ap_flag x2_flag)
|
||||
|
||||
add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} )
|
||||
|
||||
add_library( MAC_NR_COMMON ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c ${OPENAIR2_DIR}/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c)
|
||||
add_library( MAC_NR_COMMON ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c)
|
||||
|
||||
include_directories("${OPENAIR2_DIR}/NR_UE_PHY_INTERFACE")
|
||||
include_directories("${OPENAIR2_DIR}/LAYER2")
|
||||
@@ -2050,6 +2175,11 @@ set (GTPV1U_SRC
|
||||
add_library(GTPV1U ${GTPV1U_SRC})
|
||||
add_dependencies(GTPV1U rrc_flag)
|
||||
|
||||
#add_library (GTPV1U_OCP
|
||||
#${OPENAIR3_DIR}/ocp-gtp/gtp_itf.cpp
|
||||
#)
|
||||
#include_directories(${OPENAIR3_DIR}/ocp-gtp)
|
||||
|
||||
#NR case
|
||||
set (NR_GTPV1U_SRC
|
||||
${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
|
||||
@@ -2353,6 +2483,14 @@ set (SHLIB_LOADER_SOURCES
|
||||
${OPENAIR_DIR}/common/utils/load_module_shlib.c
|
||||
)
|
||||
|
||||
add_library(LIB_5GNAS_GNB
|
||||
${NAS_SRC}/COMMON/nr_common.c
|
||||
${NAS_SRC}/gNB/network_process_nas.c
|
||||
${NAS_SRC}/NR_UE/ue_process_nas.c
|
||||
${OPENAIR3_DIR}//UICC/usim_interface.c
|
||||
)
|
||||
target_link_libraries(LIB_5GNAS_GNB SECU_CN ${CRYPTO_LIBRARIES})
|
||||
|
||||
# Make lfds as a own source code (even if it is a outside library)
|
||||
# For better intergration with compilation flags & structure of cmake
|
||||
###################################################################
|
||||
@@ -2393,6 +2531,7 @@ add_library(LFDS7
|
||||
add_library(SIMU_COMMON
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/phase_noise.c
|
||||
)
|
||||
|
||||
# Simulation library
|
||||
@@ -2428,114 +2567,6 @@ include_directories("${NFAPI_DIR}/nfapi/inc")
|
||||
include_directories("${NFAPI_DIR}/sim_common/inc")
|
||||
include_directories("${NFAPI_DIR}/pnf_sim/inc")
|
||||
|
||||
|
||||
# System packages that are required
|
||||
# We use either the cmake buildin, in ubuntu are in: /usr/share/cmake*/Modules/
|
||||
# or cmake provide a generic interface to pkg-config that widely used
|
||||
###################################
|
||||
include(FindPkgConfig)
|
||||
|
||||
pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
|
||||
include_directories(${LIBXML2_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(LIBXSLT libxslt REQUIRED)
|
||||
include_directories(${LIBXSLT_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(OPENSSL openssl REQUIRED)
|
||||
include_directories(${OPENSSL_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(CONFIG libconfig REQUIRED)
|
||||
include_directories(${CONFIG_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(CRYPTO libcrypto REQUIRED)
|
||||
include_directories(${CRYPTO_INCLUDE_DIRS})
|
||||
|
||||
#use native cmake method as this package is not in pkg-config
|
||||
if (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
find_package(Boost REQUIRED)
|
||||
include_directories(${LIBBOOST_INCLUDE_DIR})
|
||||
|
||||
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||
include_directories("/usr/local/include/")
|
||||
set(HW_SOURCE ${HW_SOURCE}
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
|
||||
LINK_DIRECTORIES("/usr/local/lib")
|
||||
set(option_HW_lib "-lSoapySDR -rdynamic -ldl")
|
||||
|
||||
endif (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
|
||||
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
|
||||
if(NOT ${OPENPGM_FOUND})
|
||||
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
|
||||
else()
|
||||
include_directories(${OPENPGM_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
pkg_search_module(NETTLE nettle)
|
||||
if(NOT ${NETTLE_FOUND})
|
||||
message( FATAL_ERROR "PACKAGE nettle not found: some targets will fail. Run build_oai -I again!")
|
||||
else()
|
||||
include_directories(${NETTLE_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
message ("NETTLE VERSION_INSTALLED = ${NETTLE_VERSION}")
|
||||
|
||||
string(REGEX REPLACE "([0-9]+).*" "\\1" NETTLE_VERSION_MAJOR ${NETTLE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" NETTLE_VERSION_MINOR ${NETTLE_VERSION})
|
||||
message ("NETTLE_VERSION_MAJOR = ${NETTLE_VERSION_MAJOR}")
|
||||
message ("NETTLE_VERSION_MINOR = ${NETTLE_VERSION_MINOR}")
|
||||
|
||||
if ("${NETTLE_VERSION_MAJOR}" STREQUAL "" OR "${NETTLE_VERSION_MINOR}" STREQUAL "")
|
||||
message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
|
||||
endif()
|
||||
|
||||
add_definitions("-DNETTLE_VERSION_MAJOR=${NETTLE_VERSION_MAJOR}")
|
||||
add_definitions("-DNETTLE_VERSION_MINOR=${NETTLE_VERSION_MINOR}")
|
||||
|
||||
pkg_search_module(XPM xpm)
|
||||
if(NOT ${XPM_FOUND})
|
||||
message("PACKAGE xpm not found: some targets will fail")
|
||||
else()
|
||||
include_directories(${XPM_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Atlas is required by some packages, but not found in pkg-config
|
||||
# So, here are some hacks here. Hope this gets fixed in future!
|
||||
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
|
||||
include_directories("/usr/include/atlas")
|
||||
LINK_DIRECTORIES("/usr/lib/lapack")
|
||||
LINK_DIRECTORIES("/usr/lib64")
|
||||
LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!
|
||||
|
||||
if(EXISTS "/usr/lib64/libblas.so" OR EXISTS "/usr/lib/libblas.so") #Case for CentOS7
|
||||
list(APPEND ATLAS_LIBRARIES blas)
|
||||
|
||||
else() # Case for Ubuntu
|
||||
list(APPEND ATLAS_LIBRARIES cblas)
|
||||
endif()
|
||||
|
||||
if(EXISTS "/usr/lib/atlas/libtatlas.so" OR EXISTS "/usr/lib64/atlas/libtatlas.so") #Case for CentOS7
|
||||
list(APPEND ATLAS_LIBRARIES tatlas)
|
||||
else()
|
||||
list(APPEND ATLAS_LIBRARIES atlas) #Case for Ubuntu
|
||||
endif()
|
||||
|
||||
list(APPEND ATLAS_LIBRARIES lapack)
|
||||
|
||||
# for ubuntu 17.10, directories are different
|
||||
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")
|
||||
|
||||
include_directories("/usr/include/x86_64-linux-gnu")
|
||||
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
|
||||
list(APPEND ATLAS_LIBRARIES cblas)
|
||||
list(APPEND ATLAS_LIBRARIES atlas)
|
||||
list(APPEND ATLAS_LIBRARIES lapack)
|
||||
|
||||
else()
|
||||
message("No Blas/Atlas libs found, some targets will fail")
|
||||
endif()
|
||||
|
||||
list(APPEND ATLAS_LIBRARIES lapack lapacke)
|
||||
|
||||
include_directories ("/usr/include/X11")
|
||||
@@ -2642,6 +2673,12 @@ add_executable(measurement_display
|
||||
${OPENAIR_DIR}/common/utils/threadPool/measurement_display.c)
|
||||
target_link_libraries (measurement_display minimal_lib)
|
||||
|
||||
add_executable(test5Gnas
|
||||
${OPENAIR_DIR}/openair3/TEST/test5Gnas.c
|
||||
)
|
||||
target_link_libraries (test5Gnas LIB_5GNAS_GNB CONFIG_LIB minimal_lib )
|
||||
|
||||
|
||||
# lte-softmodem is both eNB and UE implementation
|
||||
###################################################
|
||||
|
||||
@@ -2683,7 +2720,7 @@ target_link_libraries (lte-softmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem ${T_LIB})
|
||||
|
||||
@@ -2722,7 +2759,7 @@ target_link_libraries (ocp-enb
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||
|
||||
add_executable(cu_test
|
||||
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c
|
||||
@@ -2787,14 +2824,14 @@ if (NOT ${NOS1})
|
||||
endif()
|
||||
target_link_libraries (lte-uesoftmodem
|
||||
-Wl,--start-group
|
||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP F1AP_LIB
|
||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP F1AP_LIB
|
||||
GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
||||
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem ${T_LIB})
|
||||
|
||||
@@ -2807,6 +2844,7 @@ add_executable(nr-softmodem
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/nr-gnb.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/nr-ru.c
|
||||
${OPENAIR_DIR}/executables/nr-softmodem.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
@@ -2836,11 +2874,52 @@ target_link_libraries (nr-softmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem ${T_LIB})
|
||||
|
||||
add_dependencies( nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
|
||||
add_executable(ocp-gnb
|
||||
${rrc_h}
|
||||
${nr_rrc_h}
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/ocp-gnb.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${GTPU_need_ITTI}
|
||||
${XFORMS_SOURCE_NR}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
)
|
||||
|
||||
target_link_libraries (ocp-gnb
|
||||
-Wl,--start-group
|
||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS NR_GTPV1U SECU_CN SECU_OSA
|
||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||
S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (ocp-gnb ${LIBXML2_LIBRARIES} )
|
||||
target_link_libraries (ocp-gnb pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (ocp-gnb ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (ocp-gnb ${T_LIB})
|
||||
add_dependencies(ocp-gnb ldpc_orig ldpc_optim ldpc_optim8seg ldpc params_libconfig rfsimulator oai_usrpdevif rfsimulator nrscope)
|
||||
|
||||
|
||||
# nr-uesoftmodem is UE implementation
|
||||
#######################################
|
||||
|
||||
@@ -2876,10 +2955,12 @@ target_link_libraries (nr-uesoftmodem
|
||||
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
|
||||
NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||
NFAPI_USER_LIB S1AP_LIB S1AP_ENB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem ${T_LIB})
|
||||
|
||||
@@ -3038,12 +3119,15 @@ add_executable(nr_dlsim
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_dlsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
@@ -3054,14 +3138,19 @@ add_executable(nr_prachsim
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES})
|
||||
target_link_libraries(nr_prachsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB MAC_UE_NR SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
@@ -3076,16 +3165,20 @@ target_link_libraries(nr_ulschsim
|
||||
|
||||
add_executable(nr_ulsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_ulsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
@@ -3120,7 +3213,7 @@ add_executable(test_epc_generate_scenario
|
||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||
)
|
||||
target_link_libraries (test_epc_generate_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIB}
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
add_executable(test_epc_play_scenario
|
||||
@@ -3139,7 +3232,7 @@ add_executable(test_epc_play_scenario
|
||||
)
|
||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||
target_link_libraries (test_epc_play_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIB}
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
|
||||
@@ -3159,7 +3252,7 @@ foreach(myExe s1ap
|
||||
${OPENAIR3_DIR}/TEST/test_${myExe}.c
|
||||
)
|
||||
target_link_libraries (test_${myExe}
|
||||
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIB}
|
||||
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
endforeach(myExe)
|
||||
|
||||
@@ -3184,7 +3277,7 @@ if (${T_TRACER})
|
||||
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
|
||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_NR MAC_UE_NR
|
||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR
|
||||
CN_UTILS GTPV1U NR_GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts)
|
||||
if (TARGET ${i})
|
||||
|
||||
@@ -1276,7 +1276,10 @@
|
||||
(Test2: MCS 16 50 PRBs),
|
||||
(Test3: MCS 28 50 PRBs),
|
||||
(Test4: MCS 9 217 PRBs),
|
||||
(Test5: MCS 9 273 PRBs)</desc>
|
||||
(Test5: MCS 9 273 PRBs),
|
||||
(Test6: DMRS Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols),
|
||||
(Test7: DMRS Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols),
|
||||
(Test8: DMRS Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols)</desc>
|
||||
<pre_compile_prog></pre_compile_prog>
|
||||
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
|
||||
<compile_prog_args> --phy_simulators -c </compile_prog_args>
|
||||
@@ -1287,8 +1290,11 @@
|
||||
-n100 -m16 -s10
|
||||
-n100 -m28 -s20
|
||||
-n100 -m9 -R217 -r217 -s5
|
||||
-n100 -m9 -R273 -r273 -s5</main_exec_args>
|
||||
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5</tags>
|
||||
-n100 -m9 -R273 -r273 -s5
|
||||
-n100 -s5 -T 2 1 2 -U 2 0 2
|
||||
-n100 -s5 -T 2 2 2 -U 2 1 2
|
||||
-n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3</main_exec_args>
|
||||
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8</tags>
|
||||
<search_expr_true>PUSCH test OK</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
<nruns>3</nruns>
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -147,6 +147,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -149,6 +149,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -149,6 +149,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
@@ -149,6 +149,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
+28
-23
@@ -42,7 +42,6 @@ MSC_GEN=0
|
||||
XFORMS="True"
|
||||
SKIP_SHARED_LIB_FLAG="False"
|
||||
UE_EXPANSION="False"
|
||||
UESIM_EXPANSION="False"
|
||||
PRINT_STATS="False"
|
||||
VCD_TIMING="False"
|
||||
DEADLINE_SCHEDULER_FLAG_USER=""
|
||||
@@ -211,7 +210,7 @@ function main() {
|
||||
GDB=0
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
echo_info "Will Compile with gdb symbols"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
|
||||
shift
|
||||
;;
|
||||
"MinSizeRel")
|
||||
@@ -264,10 +263,6 @@ function main() {
|
||||
UE_EXPANSION="True"
|
||||
echo_info "Will compile with UE_EXPANSION"
|
||||
shift;;
|
||||
--musim)
|
||||
UESIM_EXPANSION="True"
|
||||
echo_info "Will compile with UESIM_EXPANSION"
|
||||
shift;;
|
||||
--UE-conf-nvram)
|
||||
conf_nvram_path=$(readlink -f $2)
|
||||
shift 2;;
|
||||
@@ -488,11 +483,6 @@ function main() {
|
||||
echo_info "Flags for Deadline scheduler: $DEADLINE_SCHEDULER_FLAG_USER"
|
||||
echo_info "Flags for CPU Affinity: $CPU_AFFINITY_FLAG_USER"
|
||||
|
||||
if [ -n "$UHD_IMAGES_DIR" ] && [ -z "$INSTALL_EXTERNAL" ]; then
|
||||
echo_error "UHD images download settings will not be applied without -I present"
|
||||
exit
|
||||
fi
|
||||
|
||||
#######################################################
|
||||
# Setting and printing OAI envs, we should check here #
|
||||
#######################################################
|
||||
@@ -549,9 +539,10 @@ function main() {
|
||||
# flash_firmware_iris
|
||||
#fi
|
||||
fi
|
||||
echo_info "installing protobuf/protobuf-c for flexran agent support"
|
||||
echo_info "Installing protobuf/protobuf-c for flexran agent support"
|
||||
install_protobuf_from_source
|
||||
install_protobuf_c_from_source
|
||||
echo_success "protobuf/protobuf-c installation successful"
|
||||
fi
|
||||
|
||||
if [ "$INSTALL_OPTIONAL" = "1" ] ; then
|
||||
@@ -592,7 +583,6 @@ function main() {
|
||||
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
|
||||
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( UESIM_EXPANSION $UESIM_EXPANSION )" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
|
||||
@@ -647,14 +637,22 @@ function main() {
|
||||
$build_dir coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
|
||||
compilations \
|
||||
$build_dir nasmesh \
|
||||
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
|
||||
|
||||
compilations \
|
||||
$build_dir rb_tool \
|
||||
rb_tool $dbin/rb_tool
|
||||
cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin
|
||||
#check if we run inside a container or not
|
||||
#IS_CONTAINER variable is defined in build_helper file
|
||||
#compile nasmesh and rb_tool only if NOT running in a container
|
||||
if [ $IS_CONTAINER -eq 0 ]
|
||||
then
|
||||
compilations \
|
||||
$build_dir nasmesh \
|
||||
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
|
||||
|
||||
compilations \
|
||||
$build_dir rb_tool \
|
||||
rb_tool $dbin/rb_tool
|
||||
|
||||
cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin
|
||||
fi #IS_CONTAINER
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -662,9 +660,16 @@ function main() {
|
||||
if [ "$UE" = 1 ] ; then
|
||||
|
||||
echo_info "Compiling UE specific part"
|
||||
compilations \
|
||||
$build_dir ue_ip \
|
||||
CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
|
||||
|
||||
if [ $IS_CONTAINER -eq 0 ]
|
||||
then
|
||||
echo_info "Building ue_ip module"
|
||||
compilations \
|
||||
$build_dir ue_ip \
|
||||
CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
|
||||
else
|
||||
echo_info "Bypassing ue_ip build"
|
||||
fi #IS_CONTAINER
|
||||
|
||||
# mkdir -p $DIR/at_commands/build
|
||||
# cd $DIR/at_commands/build
|
||||
|
||||
+505
@@ -0,0 +1,505 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
|
||||
# brief
|
||||
# authors Laurent Thomas
|
||||
#
|
||||
#######################################
|
||||
if [ ! -f /etc/os-release ]; then
|
||||
echo "No /etc/os-release file found. You're likely on an unsupported distro."
|
||||
exit 1
|
||||
fi
|
||||
OS_DISTRO=$(grep "^ID=" /etc/os-release | sed "s/ID=//" | sed "s/\"//g")
|
||||
OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "s/\"//g")
|
||||
case "$OS_DISTRO" in
|
||||
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt"; CMAKE="cmake" ;;
|
||||
esac
|
||||
|
||||
SUDO='sudo -E'
|
||||
|
||||
###############################
|
||||
## echo and family
|
||||
###############################
|
||||
black='\E[30m'
|
||||
red='\E[31m'
|
||||
green='\E[32m'
|
||||
yellow='\E[33m'
|
||||
blue='\E[1;34m'
|
||||
magenta='\E[35m'
|
||||
cyan='\E[36m'
|
||||
white='\E[37m'
|
||||
reset_color='\E[00m'
|
||||
COLORIZE=1
|
||||
|
||||
cecho() {
|
||||
# Color-echo
|
||||
# arg1 = message
|
||||
# arg2 = color
|
||||
local default_msg="No Message."
|
||||
message=${1:-$default_msg}
|
||||
color=${2:-$green}
|
||||
[ "$COLORIZE" = "1" ] && message="$color$message$reset_color"
|
||||
echo -e "$message"
|
||||
return
|
||||
}
|
||||
|
||||
echo_error() { cecho "$* $red" ;}
|
||||
echo_fatal() { cecho "$* $red"; exit 1 ;}
|
||||
echo_warning() { cecho "$* $yellow" ;}
|
||||
echo_success() { cecho "$* $green" ;}
|
||||
echo_info() { cecho "$* $blue" ;}
|
||||
|
||||
########################
|
||||
# distribution helpers #
|
||||
########################
|
||||
|
||||
# This function return a string to identify the distribution we are running
|
||||
# Examples:
|
||||
# ubuntu16.04
|
||||
# debian8.5
|
||||
get_distribution_release() {
|
||||
echo "$OS_DISTRO$OS_RELEASE"
|
||||
}
|
||||
|
||||
check_supported_distribution() {
|
||||
case $(get_distribution_release) in
|
||||
"ubuntu20.04") return 0 ;;
|
||||
esac
|
||||
return 1
|
||||
}
|
||||
|
||||
##################
|
||||
# Error handlers #
|
||||
##################
|
||||
|
||||
handler_EXIT() {
|
||||
local exit_code=$?
|
||||
[ "$exit_code" -eq 0 ] || echo_error "build have failed"
|
||||
exit $exit_code
|
||||
}
|
||||
|
||||
trap handler_EXIT EXIT
|
||||
|
||||
###########################
|
||||
# Cleaners
|
||||
###########################
|
||||
|
||||
clean_kernel() {
|
||||
$SUDO modprobe ip_tables
|
||||
$SUDO modprobe x_tables
|
||||
$SUDO iptables -P INPUT ACCEPT
|
||||
$SUDO iptables -F INPUT
|
||||
$SUDO iptables -P OUTPUT ACCEPT
|
||||
$SUDO iptables -F OUTPUT
|
||||
$SUDO iptables -P FORWARD ACCEPT
|
||||
$SUDO iptables -F FORWARD
|
||||
$SUDO iptables -t nat -F
|
||||
$SUDO iptables -t mangle -F
|
||||
$SUDO iptables -t filter -F
|
||||
$SUDO iptables -t raw -F
|
||||
echo_info "Flushed iptables"
|
||||
$SUDO rmmod nasmesh > /dev/null 2>&1
|
||||
$SUDO rmmod oai_nw_drv > /dev/null 2>&1
|
||||
$SUDO rmmod openair_rf > /dev/null 2>&1
|
||||
$SUDO rmmod ue_ip > /dev/null 2>&1
|
||||
echo_info "removed drivers from kernel"
|
||||
}
|
||||
|
||||
clean_all_files() {
|
||||
set_openair_env
|
||||
rm -rf "$OPENAIR_DIR"/targets/bin/*
|
||||
dir="$OPENAIR_DIR/cmake_targets"
|
||||
rm -rf "$dir"/log/*
|
||||
rm -rf "$dir"/ran_build/build
|
||||
rm -rf "$dir"/ran_build_noLOG/build
|
||||
rm -rf "$dir"/lte-simulators/build
|
||||
rm -rf "$dir"/phy_simulators/build
|
||||
rm -rf "$dir"/nas_sim_tools/build
|
||||
rm -rf "$dir"/oaisim_build_oai/build
|
||||
rm -rf "$dir"/oaisim_build_oai/CMakeLists.txt
|
||||
rm -rf "$dir"/autotests/bin
|
||||
rm -rf "$dir"/autotests/log
|
||||
rm -rf "$dir"/autotests/*/build
|
||||
}
|
||||
|
||||
############################################
|
||||
# External packages installers
|
||||
############################################
|
||||
|
||||
install_protobuf_from_source(){
|
||||
protobuf_install_log=$OPENAIR_DIR/cmake_targets/log/protobuf_install_log.txt
|
||||
echo_info "\nInstalling Google Protobuf from sources. The log file for Protobuf installation is here: $protobuf_install_log "
|
||||
(
|
||||
cd /tmp || exit
|
||||
echo "Downloading protobuf"
|
||||
#rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1
|
||||
#wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
|
||||
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
|
||||
#cd protobuf-2.6.1/
|
||||
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
|
||||
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
||||
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner "$USER" --group "$(groups | cut -d" " -f1)" --no-same-owner
|
||||
cd protobuf-3.3.0/ || exit
|
||||
./configure
|
||||
echo "Compiling protobuf"
|
||||
make -j"$(nproc)"
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
) >& "$protobuf_install_log"
|
||||
}
|
||||
|
||||
install_protobuf_c_from_source(){
|
||||
protobuf_c_install_log=$OPENAIR_DIR/cmake_targets/log/protobuf_c_install_log.txt
|
||||
echo_info "\nInstalling Google Protobuf_C from sources. The log file for Protobuf_C installation is here: $protobuf_c_install_log "
|
||||
(
|
||||
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
fi
|
||||
cd /tmp || exit
|
||||
echo "Downloading protobuf-c"
|
||||
rm -rf /tmp/protobuf-c
|
||||
git clone https://github.com/protobuf-c/protobuf-c.git
|
||||
cd protobuf-c || exit
|
||||
git checkout 2a46af42784abf86804d536f6e0122d47cfeea45
|
||||
./autogen.sh
|
||||
./configure
|
||||
echo "Compiling protobuf-c"
|
||||
make -j"$(nproc)"
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
) >& "$protobuf_c_install_log"
|
||||
}
|
||||
|
||||
install_usrp_uhd_driver_from_source(){
|
||||
uhd_install_log=$OPENAIR_DIR/cmake_targets/log/uhd_install_log.txt
|
||||
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
|
||||
(
|
||||
cd /tmp || exit
|
||||
echo "Downloading UHD driver"
|
||||
rm -rf /tmp/uhd
|
||||
git clone https://github.com/EttusResearch/uhd.git
|
||||
cd uhd || exit
|
||||
git checkout tags/v3.13.0.2
|
||||
mkdir -p host/build
|
||||
cd host/build || exit
|
||||
$CMAKE ../
|
||||
echo "Compiling UHD"
|
||||
make -j"$(nproc)"
|
||||
make test
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
) >& "$uhd_install_log"
|
||||
}
|
||||
|
||||
install_bladerf_driver_from_source(){
|
||||
bladerf_install_log=$OPENAIR_DIR/cmake_targets/log/bladerf_install_log.txt
|
||||
echo_info "\nInstalling BladeRF driver from sources. The log file for BladeRF driver installation is here: $bladerf_install_log "
|
||||
(
|
||||
cd /tmp || exit
|
||||
echo "Downloading BladeRF driver"
|
||||
rm -rf /tmp/bladeRF
|
||||
git clone https://github.com/Nuand/bladeRF.git
|
||||
cd bladeRF || exit
|
||||
git checkout tags/2016.06
|
||||
mkdir -p build
|
||||
cd build || exit
|
||||
$CMAKE ../
|
||||
echo "Compiling BladeRF driver"
|
||||
make -j"$(nproc)"
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
echo "Downloading FPGA and firmware images"
|
||||
cd /tmp/bladeRF || exit
|
||||
wget --tries=3 --retry-connrefused https://www.nuand.com/fx3/bladeRF_fw_latest.img
|
||||
wget --tries=3 --retry-connrefused https://www.nuand.com/fpga/hostedx40-latest.rbf
|
||||
sudo mkdir -p /usr/share/Nuand/bladeRF
|
||||
sudo mv bladeRF_fw_latest.img /usr/share/Nuand/bladeRF/bladeRF_fw.img
|
||||
sudo mv hostedx40-latest.rbf /usr/share/Nuand/bladeRF/hostedx40.rbf
|
||||
) >& "$bladerf_install_log"
|
||||
}
|
||||
|
||||
check_install_bladerf_driver(){
|
||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
$SUDO apt-get install -y bladerf libbladerf-dev
|
||||
$SUDO apt-get install -y bladerf-firmware-fx3
|
||||
$SUDO apt-get install -y bladerf-fpga-hostedx40
|
||||
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||
install_bladerf_driver_from_source
|
||||
else
|
||||
echo_error "BladeRF Installer for OAI does not support automatic build. Install BladeRF compiling sources manually from BladeRF website"
|
||||
fi
|
||||
}
|
||||
|
||||
flash_firmware_bladerf() {
|
||||
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
|
||||
}
|
||||
|
||||
install_soapy_from_source(){
|
||||
soapy_install_log=$OPENAIR_DIR/cmake_targets/log/soapy_install_log.txt
|
||||
echo_info "\nInstalling Soapy EcoSystem from source. The log file for Soapy installation is here: $soapy_install_log "
|
||||
(
|
||||
cd /tmp || exit
|
||||
echo "Downloading SoapySDR"
|
||||
rm -rf /tmp/soapysdr
|
||||
git clone -b soapy-sdr-0.7.0 --single-branch https://github.com/pothosware/SoapySDR.git
|
||||
cd SoapySDR || exit
|
||||
#git checkout tags/release_003_010_001_001
|
||||
mkdir -p build
|
||||
cd build || exit
|
||||
$CMAKE ../
|
||||
echo "Compiling SoapySDR"
|
||||
make -j"$(nproc)"
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
cd /tmp || exit
|
||||
echo "Downloading SoapyRemote"
|
||||
rm -rf /tmp/soapyremote
|
||||
git clone -b soapy-remote-0.5.0 --single-branch https://github.com/pothosware/SoapyRemote.git
|
||||
cd SoapyRemote || exit
|
||||
#git checkout tags/release_003_010_001_001
|
||||
mkdir -p build
|
||||
cd build || exit
|
||||
cmake ../
|
||||
echo "Compiling SoapyRemote"
|
||||
make -j"$(nproc)"
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
) >& "$soapy_install_log"
|
||||
}
|
||||
|
||||
install_soapy_iris_from_source(){
|
||||
iris_install_log=$OPENAIR_DIR/cmake_targets/log/iris_install_log.txt
|
||||
echo_info "\nInstalling Iris driver from source. The log file for Iris driver installation is here: $iris_install_log "
|
||||
(
|
||||
cd /tmp || exit
|
||||
echo "Downloading SoapyIris"
|
||||
rm -rf /tmp/sklk-soapyiris
|
||||
git clone -b soapy-iris-2018.08.0.1 --single-branch https://github.com/skylarkwireless/sklk-soapyiris.git
|
||||
cd sklk-soapyiris || exit
|
||||
mkdir -p build
|
||||
cd build ||exit
|
||||
cmake ../
|
||||
echo "Compiling SoapyIris"
|
||||
make -j"$(nproc)"
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
) >& "$iris_install_log"
|
||||
}
|
||||
|
||||
check_install_soapy () {
|
||||
#if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
#first we remove old installation
|
||||
$SUDO apt-get remove -y soapysdr soapysdr-server libsoapysdr-dev python-soapysdr python3-soapysdr soapysdr-module-remote || true
|
||||
#$SUDO add-apt-repository -y ppa:myriadrf/drivers
|
||||
#$SUDO apt-get update
|
||||
#$SUDO apt-get install -y soapysdr soapysdr-server libsoapysdr-dev python-soapysdr python3-soapysdr soapysdr-module-remote
|
||||
|
||||
#elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||
# $SUDO $INSTALLER -y install software-properties-common python3-software-properties python-software-properties subversion git python3 python-numpy python3-numpy cmake swig python-dev
|
||||
install_soapy_from_source
|
||||
#fi
|
||||
install_soapy_iris_from_source
|
||||
|
||||
}
|
||||
|
||||
check_install_ubuntu_packages() {
|
||||
$SUDO $INSTALLER update -y
|
||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
local LAPACK_LIBNAME="liblapack.so"
|
||||
local LAPACK_TARGET="/usr/lib/atlas-base/atlas/liblapack.so"
|
||||
$SUDO apt install -y software-properties-common
|
||||
case "$(get_distribution_release)" in
|
||||
"ubuntu20.04")
|
||||
specific_packages="libtasn1-6-dev libgnutls28-dev iproute2 libconfig-dev"
|
||||
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
|
||||
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
|
||||
;;
|
||||
esac
|
||||
$SUDO $INSTALLER install -y \
|
||||
$specific_packages \
|
||||
check \
|
||||
dialog \
|
||||
dkms \
|
||||
gawk \
|
||||
libboost-all-dev \
|
||||
libpthread-stubs0-dev \
|
||||
openvpn \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
python-pexpect \
|
||||
sshfs \
|
||||
swig \
|
||||
tshark \
|
||||
uml-utilities \
|
||||
unzip \
|
||||
valgrind \
|
||||
vlan \
|
||||
exuberant-ctags \
|
||||
ntpdate \
|
||||
iperf3 \
|
||||
android-tools-adb \
|
||||
wvdial \
|
||||
python-numpy \
|
||||
sshpass \
|
||||
nscd \
|
||||
bc \
|
||||
ntp \
|
||||
python3-scipy \
|
||||
python3-matplotlib \
|
||||
bison \
|
||||
build-essential \
|
||||
cmake \
|
||||
cmake-curses-gui \
|
||||
ninja-build \
|
||||
doxygen \
|
||||
doxygen-gui \
|
||||
texlive-latex-base \
|
||||
ethtool \
|
||||
flex \
|
||||
gdb \
|
||||
git \
|
||||
graphviz \
|
||||
gtkwave \
|
||||
guile-2.0-dev \
|
||||
iperf \
|
||||
iptables \
|
||||
libxtables-dev \
|
||||
libatlas-base-dev \
|
||||
libblas-dev \
|
||||
liblapack-dev\
|
||||
liblapacke-dev\
|
||||
libffi-dev \
|
||||
libforms-bin \
|
||||
libforms-dev \
|
||||
libgcrypt20-dev \
|
||||
libgmp-dev \
|
||||
libgtk-3-dev \
|
||||
libidn2-0-dev \
|
||||
libidn11-dev \
|
||||
libmysqlclient-dev \
|
||||
libpython2.7-dev \
|
||||
libsctp1 \
|
||||
libsctp-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
libusb-1.0-0-dev \
|
||||
libxml2 \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
mscgen \
|
||||
octave-signal \
|
||||
openssh-client \
|
||||
openssh-server \
|
||||
openssl \
|
||||
python3 \
|
||||
subversion \
|
||||
xmlstarlet \
|
||||
python3-pip \
|
||||
libyaml-dev \
|
||||
wget \
|
||||
libxpm-dev \
|
||||
libboost-all-dev \
|
||||
nettle-dev \
|
||||
nettle-bin
|
||||
fi
|
||||
|
||||
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
||||
|
||||
}
|
||||
|
||||
install_asn1c_from_source(){
|
||||
asn1_install_log=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt
|
||||
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
|
||||
(
|
||||
$SUDO rm -rf /tmp/asn1c
|
||||
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
|
||||
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
|
||||
cd /tmp/asn1c || exit
|
||||
# better to use a given commit than a branch in case the branch
|
||||
# is updated and requires modifications in the source of OAI
|
||||
#git checkout velichkov_s1ap_plus_option_group
|
||||
git checkout f12568d617dbf48497588f8e227d70388fa217c9
|
||||
autoreconf -iv
|
||||
./configure
|
||||
make -j"$(nproc)"
|
||||
$SUDO make install
|
||||
cd - || exit
|
||||
$SUDO ldconfig
|
||||
) > "$asn1_install_log" 2>&1
|
||||
}
|
||||
|
||||
#################################################
|
||||
# 2. compile
|
||||
################################################
|
||||
|
||||
install_nas_tools() {
|
||||
echo_success "generate .ue_emm.nvram .ue.nvram"
|
||||
./nvram --gen -c "$1" -o "$2"
|
||||
./usim --gen -c "$1" -o "$2"
|
||||
}
|
||||
|
||||
|
||||
################################
|
||||
# set_openair_env
|
||||
###############################
|
||||
set_openair_env(){
|
||||
fullpath=$(readlink -f "${BASH_SOURCE[0]}")
|
||||
[ -f "/.$fullpath" ] || fullpath=$(readlink -f "$PWD/$fullpath")
|
||||
openair_path=${fullpath%/cmake_targets/*}
|
||||
openair_path=${openair_path%/targets/*}
|
||||
openair_path=${openair_path%/openair[123]/*}
|
||||
export OPENAIR_DIR=$openair_path
|
||||
export OPENAIR1_DIR=$openair_path/openair1
|
||||
export OPENAIR2_DIR=$openair_path/openair2
|
||||
export OPENAIR3_DIR=$openair_path/openair3
|
||||
export OPENAIR_TARGETS=$openair_path/targets
|
||||
}
|
||||
|
||||
if ! check_supported_distribution; then
|
||||
echo_error "Your distribution $(get_distribution_release) is not supported by oai !"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo_info "Installing packages"
|
||||
check_install_ubuntu_packages
|
||||
|
||||
echo_info "installing ASN.1 compiler"
|
||||
install_asn1c_from_source
|
||||
|
||||
echo_info "installing protobuf/protobuf-c for flexran agent support"
|
||||
install_protobuf_from_source
|
||||
install_protobuf_c_from_source
|
||||
|
||||
if [ "$1" == "USRP" ] ; then
|
||||
echo_info "installing packages for USRP support"
|
||||
install_usrp_uhd_driver
|
||||
fi
|
||||
if [ "$1" == "BLADERF" ] ; then
|
||||
echo_info "installing packages for BLADERF support"
|
||||
check_install_bladerf_driver
|
||||
flash_firmware_bladerf
|
||||
fi
|
||||
if [ "$1" == "IRIS" ] ; then
|
||||
echo_info "installing packages for IRIS support"
|
||||
check_install_soapy
|
||||
# flash_firmware_iris
|
||||
fi
|
||||
@@ -1,11 +1,11 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project (OpenAirInterface)
|
||||
set ( CMAKE_BUILD_TYPE )
|
||||
set ( CFLAGS_PROCESSOR_USER "" )
|
||||
set ( UE_EXPANSION False )
|
||||
set ( PRE_SCD_THREAD False )
|
||||
set ( UESIM_EXPANSION False )
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( RF_BOARD "OAI_USRP")
|
||||
set ( RF_BOARD "None")
|
||||
set ( TRANSP_PRO "None")
|
||||
set ( PACKAGE_NAME "")
|
||||
set ( DEADLINE_SCHEDULER "False" )
|
||||
|
||||
@@ -40,7 +40,15 @@ esac
|
||||
KERNEL_VERSION=$(uname -r | cut -d '.' -f1)
|
||||
KERNEL_MAJOR=$(uname -r | cut -d '.' -f2)
|
||||
|
||||
SUDO='sudo -E'
|
||||
#check if we run inside a container
|
||||
IS_CONTAINER=`egrep -c "docker|podman|kubepods" /proc/self/cgroup || true`
|
||||
#sudo is not needed when we are root
|
||||
if [ "$UID" = 0 ]
|
||||
then
|
||||
SUDO=''
|
||||
else
|
||||
SUDO='sudo -S -E'
|
||||
fi
|
||||
|
||||
###############################
|
||||
## echo and family
|
||||
@@ -104,6 +112,8 @@ check_supported_distribution() {
|
||||
"rhel7") return 0 ;;
|
||||
"rhel7.6") return 0 ;;
|
||||
"rhel7.7") return 0 ;;
|
||||
"rhel7.8") return 0 ;;
|
||||
"rhel8.2") return 0 ;;
|
||||
"centos7") return 0 ;;
|
||||
esac
|
||||
return 1
|
||||
@@ -241,10 +251,21 @@ install_protobuf_from_source(){
|
||||
#wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
|
||||
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
|
||||
#cd protobuf-2.6.1/
|
||||
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
|
||||
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
||||
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $(groups | cut -d" " -f1) --no-same-owner
|
||||
cd protobuf-3.3.0/
|
||||
|
||||
if [ $IS_CONTAINER -eq 0 ]
|
||||
then
|
||||
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
|
||||
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
||||
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $(id -u) --group $(id -g) --no-same-owner
|
||||
cd protobuf-3.3.0/
|
||||
else
|
||||
export LD_LIBRARY_PATH=/usr/local/lib #protoc needs to know where toclook for shared libs
|
||||
rm -rf /tmp/protobuf
|
||||
git clone --depth=1 --branch=v3.3.0 https://github.com/protocolbuffers/protobuf.git /tmp/protobuf
|
||||
cd /tmp/protobuf
|
||||
git submodule update --init --recursive
|
||||
./autogen.sh
|
||||
fi
|
||||
./configure
|
||||
echo "Compiling protobuf"
|
||||
make -j`nproc`
|
||||
@@ -279,12 +300,12 @@ install_usrp_uhd_driver_from_source(){
|
||||
uhd_install_log=$OPENAIR_DIR/cmake_targets/log/uhd_install_log.txt
|
||||
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
|
||||
(
|
||||
cd /tmp
|
||||
pushd /tmp
|
||||
echo "Downloading UHD driver"
|
||||
rm -rf /tmp/uhd
|
||||
git clone https://github.com/EttusResearch/uhd.git
|
||||
cd uhd
|
||||
git checkout tags/v3.13.0.2
|
||||
git checkout tags/v4.0.0.0
|
||||
mkdir -p host/build
|
||||
cd host/build
|
||||
$CMAKE ../
|
||||
@@ -292,7 +313,9 @@ install_usrp_uhd_driver_from_source(){
|
||||
make -j`nproc`
|
||||
make test
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
$SUDO ldconfig -v
|
||||
popd
|
||||
rm -rf /tmp/uhd
|
||||
) >& $uhd_install_log
|
||||
}
|
||||
|
||||
@@ -324,11 +347,20 @@ check_install_usrp_uhd_driver(){
|
||||
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
|
||||
$SUDO apt-get -y install libuhd-dev libuhd003 uhd-host
|
||||
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||
$SUDO $INSTALLER -y install python boost libusb-devel libusbx-devel boost-devel python-mako python-docutils cmake
|
||||
$SUDO -H pip install requests
|
||||
if [ $IS_CONTAINER -eq 0 ]
|
||||
then
|
||||
$SUDO $INSTALLER -y install python boost libusb-devel libusbx-devel boost-devel python-mako python-docutils cmake
|
||||
$SUDO -H pip install requests
|
||||
else
|
||||
$SUDO $INSTALLER -y install boost boost-devel cmake3
|
||||
$SUDO pip3 install mako requests
|
||||
fi
|
||||
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
|
||||
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
|
||||
$SUDO $INSTALLER -y remove uhd uhd-devel uhd-firmware
|
||||
if [ $IS_CONTAINER -eq 0 ]
|
||||
then
|
||||
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
|
||||
$SUDO $INSTALLER -y remove uhd uhd-devel uhd-firmware
|
||||
fi
|
||||
install_usrp_uhd_driver_from_source
|
||||
else
|
||||
$SUDO $INSTALLER -y install uhd uhd-devel uhd-firmware
|
||||
@@ -750,6 +782,8 @@ check_install_oai_software() {
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt-devel \
|
||||
ninja-build \
|
||||
make \
|
||||
openssh-clients \
|
||||
openssh-server \
|
||||
openssl \
|
||||
|
||||
+12
-9
@@ -397,18 +397,21 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
/* define variable only used in LOG macro's */
|
||||
# define LOG_VAR(A,B) A B
|
||||
# else /* T_TRACER: remove all debugging and tracing messages, except errors */
|
||||
# define LOG_I(c, x...) do {logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ; } while(0)/* */
|
||||
# define LOG_W(c, x...) do {logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ; } while(0)/* */
|
||||
# define LOG_E(c, x...) do {logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ; } while(0)/* */
|
||||
# define LOG_D(c, x...) do {logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ; } while(0)/* */
|
||||
# define LOG_T(c, x...) /* */
|
||||
|
||||
# define LOG_DUMPMSG(c, b, s, x...) /* */
|
||||
# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0)
|
||||
# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0)
|
||||
# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0)
|
||||
# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0)
|
||||
# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0)
|
||||
# define VLOG(c,l, f, args) do { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ; } while (0)
|
||||
|
||||
# define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
|
||||
# define LOG_DEBUGFLAG(D) ( 0 )
|
||||
# define LOG_DUMPFLAG(D) ( 0 )
|
||||
# define LOG_DEBUGFLAG(D) (g_log->dump_mask & D)
|
||||
# define LOG_DUMPFLAG(D) (g_log->debug_mask & D)
|
||||
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
||||
|
||||
# define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0)
|
||||
# define LOG_VAR(A,B)
|
||||
# define LOG_VAR(A,B) A B
|
||||
# endif /* T_TRACER */
|
||||
/* avoid warnings for variables only used in LOG macro's but set outside debug section */
|
||||
#define GCC_NOTUSED __attribute__((unused))
|
||||
|
||||
@@ -814,6 +814,7 @@ static inline unsigned long long int vcd_get_time(void)
|
||||
return (long long unsigned int)((time.tv_nsec - g_time_start.tv_nsec)) +
|
||||
((long long unsigned int)time.tv_sec - (long long unsigned int)g_time_start.tv_sec) * 1000000000UL;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void vcd_signal_dumper_create_header(void)
|
||||
|
||||
@@ -601,11 +601,19 @@ extern int ouput_vcd;
|
||||
|
||||
#else /* T_TRACER */
|
||||
|
||||
#if ENABLE_VCD
|
||||
#define VCD_SIGNAL_DUMPER_INIT(aRgUmEnT) vcd_signal_dumper_init(aRgUmEnT)
|
||||
#define VCD_SIGNAL_DUMPER_CLOSE() vcd_signal_dumper_close()
|
||||
#define VCD_SIGNAL_DUMPER_CREATE_HEADER() vcd_signal_dumper_create_header()
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_variable_by_name(vAr1,vAr2)
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_function_by_name(vAr1,vAr2)
|
||||
#else
|
||||
#define VCD_SIGNAL_DUMPER_INIT(aRgUmEnT)
|
||||
#define VCD_SIGNAL_DUMPER_CLOSE()
|
||||
#define VCD_SIGNAL_DUMPER_CREATE_HEADER()
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(vAr1,vAr2)
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(vAr1,vAr2)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* T_TRACER */
|
||||
|
||||
@@ -85,6 +85,10 @@ ID = ENB_PHY_MIB
|
||||
DESC = MIB data
|
||||
GROUP = ALL:PHY:ENB:WIRESHARK
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : buffer,data
|
||||
ID = GNB_PHY_MIB
|
||||
DESC = NR MIB data
|
||||
GROUP = ALL:PHY:GNB:WIRESHARK
|
||||
FORMAT = int,gNB_ID : int,frame : int,slot : buffer,data
|
||||
|
||||
#MAC logs
|
||||
ID = ENB_MAC_UE_DL_SDU
|
||||
@@ -131,6 +135,18 @@ ID = ENB_MAC_UE_DL_RAR_PDU_WITH_DATA
|
||||
DESC = MAC downlink PDU for an UE
|
||||
GROUP = ALL:MAC:ENB:WIRESHARK
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
|
||||
ID = GNB_MAC_DL_PDU_WITH_DATA
|
||||
DESC = NR MAC downlink PDU for an UE
|
||||
GROUP = ALL:MAC:GNB:WIRESHARK
|
||||
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : buffer,data
|
||||
ID = GNB_MAC_UL_PDU_WITH_DATA
|
||||
DESC = NR MAC uplink PDU for an UE
|
||||
GROUP = ALL:MAC:GNB:WIRESHARK
|
||||
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : buffer,data
|
||||
ID = GNB_MAC_DL_RAR_PDU_WITH_DATA
|
||||
DESC = NR MAC downlink PDU for RAR
|
||||
GROUP = ALL:MAC:GNB:WIRESHARK
|
||||
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : buffer,data
|
||||
|
||||
#RLC logs
|
||||
ID = ENB_RLC_DL
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _TRACER_DEFS_H_
|
||||
#define _TRACER_DEFS_H_
|
||||
#ifndef _COMMON_UTILS_T_DEFS_H_
|
||||
#define _COMMON_UTILS_T_DEFS_H_
|
||||
|
||||
/* types of plots */
|
||||
#define PLOT_VS_TIME 0
|
||||
@@ -27,4 +27,4 @@ void *forwarder(char *ip, int port);
|
||||
void forward(void *forwarder, char *buf, int size);
|
||||
void forward_start_client(void *forwarder, int socket);
|
||||
|
||||
#endif /* _TRACER_DEFS_H_ */
|
||||
#endif /* _COMMON_UTILS_T_DEFS_H_ */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _TRACER_DEFS_H_
|
||||
#define _TRACER_DEFS_H_
|
||||
#ifndef _COMMON_UTILS_T_TRACER_DEFS_H_
|
||||
#define _COMMON_UTILS_T_TRACER_DEFS_H_
|
||||
|
||||
/* types of plots */
|
||||
#define PLOT_VS_TIME 0
|
||||
@@ -21,4 +21,4 @@ void t_gui_start(void);
|
||||
void t_gui_set_input_signal(int eNB, int frame, int subframe, int antenna,
|
||||
int size, void *buf);
|
||||
|
||||
#endif /* _TRACER_DEFS_H_ */
|
||||
#endif /* _COMMON_UTILS_T_TRACER_DEFS_H_ */
|
||||
|
||||
@@ -23,6 +23,8 @@ typedef struct {
|
||||
int socket;
|
||||
struct sockaddr_in to;
|
||||
OBUF buf;
|
||||
|
||||
/* LTE traces */
|
||||
/* ul */
|
||||
int ul_rnti;
|
||||
int ul_frame;
|
||||
@@ -46,6 +48,28 @@ typedef struct {
|
||||
int rar_frame;
|
||||
int rar_subframe;
|
||||
int rar_data;
|
||||
|
||||
/* NR traces */
|
||||
/* NR ul */
|
||||
int nr_ul_rnti;
|
||||
int nr_ul_frame;
|
||||
int nr_ul_slot;
|
||||
int nr_ul_data;
|
||||
/* NR dl */
|
||||
int nr_dl_rnti;
|
||||
int nr_dl_frame;
|
||||
int nr_dl_slot;
|
||||
int nr_dl_data;
|
||||
/* NR mib */
|
||||
int nr_mib_frame;
|
||||
int nr_mib_slot;
|
||||
int nr_mib_data;
|
||||
/* NR RAR */
|
||||
int nr_rar_rnti;
|
||||
int nr_rar_frame;
|
||||
int nr_rar_slot;
|
||||
int nr_rar_data;
|
||||
|
||||
/* config */
|
||||
int no_mib;
|
||||
int no_sib;
|
||||
@@ -58,8 +82,13 @@ typedef struct {
|
||||
int cur_sib;
|
||||
} ev_data;
|
||||
|
||||
void trace(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
int frame, int subframe, void *buf, int bufsize, int preamble) {
|
||||
/****************************************************************************/
|
||||
/* LTE */
|
||||
/****************************************************************************/
|
||||
|
||||
void trace_lte(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
int frame, int subframe, void *buf, int bufsize, int preamble)
|
||||
{
|
||||
ssize_t ret;
|
||||
int fsf;
|
||||
int i;
|
||||
@@ -100,15 +129,17 @@ void trace(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
if (ret != d->buf.osize) abort();
|
||||
}
|
||||
|
||||
void ul(void *_d, event e) {
|
||||
void ul(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
|
||||
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
|
||||
e.e[d->ul_data].b, e.e[d->ul_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
trace_lte(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
|
||||
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
|
||||
e.e[d->ul_data].b, e.e[d->ul_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void dl(void *_d, event e) {
|
||||
void dl(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
if (e.e[d->dl_rnti].i == 0xffff) {
|
||||
@@ -119,14 +150,15 @@ void dl(void *_d, event e) {
|
||||
d->cur_sib++;
|
||||
}
|
||||
|
||||
trace(d, DIRECTION_DOWNLINK,
|
||||
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
|
||||
e.e[d->dl_frame].i, e.e[d->dl_subframe].i,
|
||||
e.e[d->dl_data].b, e.e[d->dl_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
trace_lte(d, DIRECTION_DOWNLINK,
|
||||
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
|
||||
e.e[d->dl_frame].i, e.e[d->dl_subframe].i,
|
||||
e.e[d->dl_data].b, e.e[d->dl_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void mib(void *_d, event e) {
|
||||
void mib(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
if (d->no_mib) return;
|
||||
@@ -134,30 +166,141 @@ void mib(void *_d, event e) {
|
||||
if (d->max_mib && d->cur_mib == d->max_mib) return;
|
||||
|
||||
d->cur_mib++;
|
||||
trace(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
|
||||
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
|
||||
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
trace_lte(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
|
||||
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
|
||||
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void preamble(void *_d, event e) {
|
||||
void preamble(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
|
||||
NULL, 0,
|
||||
e.e[d->preamble_preamble].i);
|
||||
trace_lte(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
|
||||
NULL, 0,
|
||||
e.e[d->preamble_preamble].i);
|
||||
}
|
||||
|
||||
void rar(void *_d, event e) {
|
||||
void rar(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
|
||||
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
|
||||
e.e[d->rar_data].b, e.e[d->rar_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
trace_lte(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
|
||||
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
|
||||
e.e[d->rar_data].b, e.e[d->rar_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* NR */
|
||||
/****************************************************************************/
|
||||
|
||||
#define MAC_NR_START_STRING "mac-nr"
|
||||
|
||||
#define MAC_NR_PAYLOAD_TAG 0x01
|
||||
#define MAC_NR_RNTI_TAG 0x02
|
||||
#define MAC_NR_FRAME_SLOT_TAG 0x07
|
||||
|
||||
#define NR_FDD_RADIO 1
|
||||
#define NR_TDD_RADIO 2
|
||||
|
||||
#define NR_DIRECTION_UPLINK 0
|
||||
#define NR_DIRECTION_DOWNLINK 1
|
||||
|
||||
#define NR_NO_RNTI 0
|
||||
#define NR_RA_RNTI 2
|
||||
#define NR_C_RNTI 3
|
||||
|
||||
void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
int frame, int slot, void *buf, int bufsize, int preamble)
|
||||
{
|
||||
ssize_t ret;
|
||||
int i;
|
||||
d->buf.osize = 0;
|
||||
PUTS(&d->buf, MAC_NR_START_STRING);
|
||||
PUTC(&d->buf, NR_TDD_RADIO);
|
||||
PUTC(&d->buf, direction);
|
||||
PUTC(&d->buf, rnti_type);
|
||||
|
||||
if (rnti_type == NR_C_RNTI || rnti_type == NR_RA_RNTI) {
|
||||
PUTC(&d->buf, MAC_NR_RNTI_TAG);
|
||||
PUTC(&d->buf, (rnti>>8) & 255);
|
||||
PUTC(&d->buf, rnti & 255);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* for old versions of wireshark; not sure if correct */
|
||||
int fsf = (frame << 4) + slot;
|
||||
PUTC(&d->buf, 4 /* MAC_NR_FRAME_SUBFRAME_TAG */);
|
||||
PUTC(&d->buf, (fsf>>8) & 255);
|
||||
PUTC(&d->buf, fsf & 255);
|
||||
#else
|
||||
PUTC(&d->buf, MAC_NR_FRAME_SLOT_TAG);
|
||||
PUTC(&d->buf, (frame>>8) & 255);
|
||||
PUTC(&d->buf, frame & 255);
|
||||
PUTC(&d->buf, (slot>>8) & 255);
|
||||
PUTC(&d->buf, slot & 255);
|
||||
#endif
|
||||
|
||||
PUTC(&d->buf, MAC_NR_PAYLOAD_TAG);
|
||||
|
||||
for (i = 0; i < bufsize; i++)
|
||||
PUTC(&d->buf, ((char *)buf)[i]);
|
||||
|
||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||
|
||||
if (ret != d->buf.osize) abort();
|
||||
}
|
||||
|
||||
void nr_ul(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_UPLINK, NR_C_RNTI, e.e[d->nr_ul_rnti].i,
|
||||
e.e[d->nr_ul_frame].i, e.e[d->nr_ul_slot].i,
|
||||
e.e[d->nr_ul_data].b, e.e[d->nr_ul_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void nr_dl(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_C_RNTI, e.e[d->nr_dl_rnti].i,
|
||||
e.e[d->nr_dl_frame].i, e.e[d->nr_dl_slot].i,
|
||||
e.e[d->nr_dl_data].b, e.e[d->nr_dl_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void nr_mib(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
if (d->no_mib) return;
|
||||
|
||||
if (d->max_mib && d->cur_mib == d->max_mib) return;
|
||||
|
||||
d->cur_mib++;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
|
||||
e.e[d->nr_mib_frame].i, e.e[d->nr_mib_slot].i,
|
||||
e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void nr_rar(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_RA_RNTI, e.e[d->nr_rar_rnti].i,
|
||||
e.e[d->nr_rar_frame].i, e.e[d->nr_rar_slot].i,
|
||||
e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
||||
int preamble_id, int rar_id) {
|
||||
int preamble_id, int rar_id,
|
||||
int nr_ul_id, int nr_dl_id, int nr_mib_id, int nr_rar_id)
|
||||
{
|
||||
database_event_format f;
|
||||
int i;
|
||||
d->ul_rnti = -1;
|
||||
@@ -174,10 +317,27 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
||||
d->preamble_frame = -1;
|
||||
d->preamble_subframe = -1;
|
||||
d->preamble_preamble = -1;
|
||||
d->rar_rnti = -1;
|
||||
d->rar_frame = -1;
|
||||
d->rar_subframe = -1;
|
||||
d->rar_data = -1;
|
||||
d->rar_rnti = -1;
|
||||
d->rar_frame = -1;
|
||||
d->rar_subframe = -1;
|
||||
d->rar_data = -1;
|
||||
|
||||
d->nr_ul_rnti = -1;
|
||||
d->nr_ul_frame = -1;
|
||||
d->nr_ul_slot = -1;
|
||||
d->nr_ul_data = -1;
|
||||
d->nr_dl_rnti = -1;
|
||||
d->nr_dl_frame = -1;
|
||||
d->nr_dl_slot = -1;
|
||||
d->nr_dl_data = -1;
|
||||
d->nr_mib_frame = -1;
|
||||
d->nr_mib_slot = -1;
|
||||
d->nr_mib_data = -1;
|
||||
d->nr_rar_rnti = -1;
|
||||
d->nr_rar_frame = -1;
|
||||
d->nr_rar_slot = -1;
|
||||
d->nr_rar_data = -1;
|
||||
|
||||
#define G(var_name, var_type, var) \
|
||||
if (!strcmp(f.name[i], var_name)) { \
|
||||
if (strcmp(f.type[i], var_type)) goto error; \
|
||||
@@ -247,6 +407,60 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
||||
if (d->rar_rnti == -1 || d->rar_frame == -1 || d->rar_subframe == -1 ||
|
||||
d->rar_data == -1) goto error;
|
||||
|
||||
/* NR ul: rnti, frame, slot, data */
|
||||
f = get_format(database, nr_ul_id);
|
||||
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("rnti", "int", d->nr_ul_rnti);
|
||||
G("frame", "int", d->nr_ul_frame);
|
||||
G("slot", "int", d->nr_ul_slot);
|
||||
G("data", "buffer", d->nr_ul_data);
|
||||
}
|
||||
|
||||
if (d->nr_ul_rnti == -1 || d->nr_ul_frame == -1 || d->nr_ul_slot == -1 ||
|
||||
d->nr_ul_data == -1)
|
||||
goto error;
|
||||
|
||||
/* NR dl: rnti, frame, slot, data */
|
||||
f = get_format(database, nr_dl_id);
|
||||
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("rnti", "int", d->nr_dl_rnti);
|
||||
G("frame", "int", d->nr_dl_frame);
|
||||
G("slot", "int", d->nr_dl_slot);
|
||||
G("data", "buffer", d->nr_dl_data);
|
||||
}
|
||||
|
||||
if (d->nr_dl_rnti == -1 || d->nr_dl_frame == -1 || d->nr_dl_slot == -1 ||
|
||||
d->nr_dl_data == -1)
|
||||
goto error;
|
||||
|
||||
/* NR MIB: frame, slot, data */
|
||||
f = get_format(database, nr_mib_id);
|
||||
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("frame", "int", d->nr_mib_frame);
|
||||
G("slot", "int", d->nr_mib_slot);
|
||||
G("data", "buffer", d->nr_mib_data);
|
||||
}
|
||||
|
||||
if (d->nr_mib_frame == -1 || d->nr_mib_slot== -1 || d->nr_mib_data == -1)
|
||||
goto error;
|
||||
|
||||
/* NR RAR: rnti, frame, slot, data */
|
||||
f = get_format(database, nr_rar_id);
|
||||
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("rnti", "int", d->nr_rar_rnti);
|
||||
G("frame", "int", d->nr_rar_frame);
|
||||
G("slot", "int", d->nr_rar_slot);
|
||||
G("data", "buffer", d->nr_rar_data);
|
||||
}
|
||||
|
||||
if (d->nr_rar_rnti == -1 || d->nr_rar_frame == -1 || d->nr_rar_slot == -1 ||
|
||||
d->nr_rar_data == -1)
|
||||
goto error;
|
||||
|
||||
#undef G
|
||||
return;
|
||||
error:
|
||||
@@ -254,7 +468,8 @@ error:
|
||||
abort();
|
||||
}
|
||||
|
||||
void *receiver(void *_d) {
|
||||
void *receiver(void *_d)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
int s;
|
||||
char buf[100000];
|
||||
@@ -279,7 +494,8 @@ void *receiver(void *_d) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void usage(void) {
|
||||
void usage(void)
|
||||
{
|
||||
printf(
|
||||
"options:\n"
|
||||
" -d <database file> this option is mandatory\n"
|
||||
@@ -304,14 +520,16 @@ void usage(void) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int main(int n, char **v) {
|
||||
int main(int n, char **v)
|
||||
{
|
||||
char *database_filename = NULL;
|
||||
char *input_filename = NULL;
|
||||
void *database;
|
||||
event_handler *h;
|
||||
int in;
|
||||
int i;
|
||||
int ul_id, dl_id, mib_id = -1, preamble_id, rar_id;
|
||||
int ul_id, dl_id, mib_id, preamble_id, rar_id;
|
||||
int nr_ul_id, nr_dl_id, nr_mib_id, nr_rar_id;
|
||||
ev_data d;
|
||||
char *ip = DEFAULT_IP;
|
||||
int port = DEFAULT_PORT;
|
||||
@@ -382,6 +600,11 @@ int main(int n, char **v) {
|
||||
on_off(database, "ENB_PHY_INITIATE_RA_PROCEDURE", is_on, 1);
|
||||
on_off(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA", is_on, 1);
|
||||
|
||||
on_off(database, "GNB_MAC_UL_PDU_WITH_DATA", is_on, 1);
|
||||
on_off(database, "GNB_MAC_DL_PDU_WITH_DATA", is_on, 1);
|
||||
on_off(database, "GNB_PHY_MIB", is_on, 1);
|
||||
on_off(database, "GNB_MAC_DL_RAR_PDU_WITH_DATA", is_on, 1);
|
||||
|
||||
/* activate selected traces */
|
||||
if (socket_send(in, &mt, 1) == -1 ||
|
||||
socket_send(in, &number_of_events, sizeof(int)) == -1 ||
|
||||
@@ -398,12 +621,26 @@ int main(int n, char **v) {
|
||||
mib_id = event_id_from_name(database, "ENB_PHY_MIB");
|
||||
preamble_id = event_id_from_name(database, "ENB_PHY_INITIATE_RA_PROCEDURE");
|
||||
rar_id = event_id_from_name(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA");
|
||||
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id);
|
||||
|
||||
nr_ul_id = event_id_from_name(database, "GNB_MAC_UL_PDU_WITH_DATA");
|
||||
nr_dl_id = event_id_from_name(database, "GNB_MAC_DL_PDU_WITH_DATA");
|
||||
nr_mib_id = event_id_from_name(database, "GNB_PHY_MIB");
|
||||
nr_rar_id = event_id_from_name(database, "GNB_MAC_DL_RAR_PDU_WITH_DATA");
|
||||
|
||||
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id,
|
||||
nr_ul_id, nr_dl_id, nr_mib_id, nr_rar_id);
|
||||
|
||||
register_handler_function(h, ul_id, ul, &d);
|
||||
register_handler_function(h, dl_id, dl, &d);
|
||||
register_handler_function(h, mib_id, mib, &d);
|
||||
register_handler_function(h, preamble_id, preamble, &d);
|
||||
register_handler_function(h, rar_id, rar, &d);
|
||||
|
||||
register_handler_function(h, nr_ul_id, nr_ul, &d);
|
||||
register_handler_function(h, nr_dl_id, nr_dl, &d);
|
||||
register_handler_function(h, nr_mib_id, nr_mib, &d);
|
||||
register_handler_function(h, nr_rar_id, nr_rar, &d);
|
||||
|
||||
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
if (d.socket == -1) {
|
||||
@@ -424,8 +661,10 @@ int main(int n, char **v) {
|
||||
|
||||
if (e.type == -1) break;
|
||||
|
||||
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
|
||||
e.type == preamble_id || e.type == rar_id)) continue;
|
||||
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
|
||||
e.type == preamble_id || e.type == rar_id ||
|
||||
e.type == nr_ul_id || e.type == nr_dl_id ||
|
||||
e.type == nr_mib_id || e.type == nr_rar_id)) continue;
|
||||
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
@@ -101,11 +101,11 @@ static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) {
|
||||
|
||||
shift = ((asn->size - 1) * 8) - asn->bits_unused;
|
||||
for (index = 0; index < (asn->size - 1); index++) {
|
||||
result |= asn->buf[index] << shift;
|
||||
result |= ((uint64_t)asn->buf[index]) << shift;
|
||||
shift -= 8;
|
||||
}
|
||||
|
||||
result |= asn->buf[index] >> asn->bits_unused;
|
||||
result |= ((uint64_t)asn->buf[index]) >> asn->bits_unused;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,490 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "assertions.h"
|
||||
#include "memory_pools.h"
|
||||
|
||||
#if T_TRACER
|
||||
#include <string.h>
|
||||
#include "T.h"
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
const static int mp_debug = 0;
|
||||
|
||||
# define MP_DEBUG(x, args...) do { if (mp_debug) fprintf(stdout, "[MP][D]"x, ##args); fflush (stdout); } \
|
||||
while(0)
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
#ifndef CHARS_TO_UINT32
|
||||
#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4))
|
||||
#endif
|
||||
|
||||
#define MEMORY_POOL_ITEM_INFO_NUMBER 2
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
typedef int32_t items_group_position_t;
|
||||
typedef int32_t items_group_index_t;
|
||||
|
||||
typedef union items_group_positions_u {
|
||||
uint64_t all;
|
||||
struct {
|
||||
items_group_position_t put;
|
||||
items_group_position_t get;
|
||||
} ind;
|
||||
} items_group_positions_t;
|
||||
|
||||
typedef struct items_group_s {
|
||||
items_group_position_t number_plus_one;
|
||||
volatile uint32_t minimum;
|
||||
volatile items_group_positions_t positions;
|
||||
volatile items_group_index_t *indexes;
|
||||
} items_group_t;
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
//static const items_group_position_t ITEMS_GROUP_POSITION_INVALID = -1;
|
||||
static const items_group_index_t ITEMS_GROUP_INDEX_INVALID = -1;
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
typedef uint32_t pool_item_start_mark_t;
|
||||
typedef uint32_t pool_item_end_mark_t;
|
||||
|
||||
typedef uint32_t memory_pool_data_t;
|
||||
|
||||
typedef uint32_t pool_start_mark_t;
|
||||
|
||||
typedef uint32_t pools_start_mark_t;
|
||||
|
||||
typedef uint8_t pool_id_t;
|
||||
typedef uint8_t item_status_t;
|
||||
|
||||
typedef struct memory_pool_item_start_s {
|
||||
pool_item_start_mark_t start_mark;
|
||||
|
||||
pool_id_t pool_id;
|
||||
item_status_t item_status;
|
||||
uint16_t info[MEMORY_POOL_ITEM_INFO_NUMBER];
|
||||
} memory_pool_item_start_t;
|
||||
|
||||
typedef struct memory_pool_item_end_s {
|
||||
pool_item_end_mark_t end_mark;
|
||||
} memory_pool_item_end_t;
|
||||
|
||||
typedef struct memory_pool_item_s {
|
||||
memory_pool_item_start_t start;
|
||||
memory_pool_data_t data[0];
|
||||
memory_pool_item_end_t end;
|
||||
} memory_pool_item_t;
|
||||
|
||||
typedef struct memory_pool_s {
|
||||
pool_start_mark_t start_mark;
|
||||
|
||||
pool_id_t pool_id;
|
||||
uint32_t item_data_number;
|
||||
uint32_t pool_item_size;
|
||||
items_group_t items_group_free;
|
||||
memory_pool_item_t *items;
|
||||
} memory_pool_t;
|
||||
|
||||
|
||||
typedef struct memory_pools_s {
|
||||
pools_start_mark_t start_mark;
|
||||
|
||||
uint32_t pools_number;
|
||||
uint32_t pools_defined;
|
||||
memory_pool_t *pools;
|
||||
} memory_pools_t;
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
static const uint32_t MAX_POOLS_NUMBER = 20;
|
||||
static const uint32_t MAX_POOL_ITEMS_NUMBER = 200 * 1000;
|
||||
static const uint32_t MAX_POOL_ITEM_SIZE = 100 * 1000;
|
||||
|
||||
static const pool_item_start_mark_t POOL_ITEM_START_MARK = CHARS_TO_UINT32 ('P', 'I', 's', 't');
|
||||
static const pool_item_end_mark_t POOL_ITEM_END_MARK = CHARS_TO_UINT32 ('p', 'i', 'E', 'N');
|
||||
|
||||
static const item_status_t ITEM_STATUS_FREE = 'F';
|
||||
static const item_status_t ITEM_STATUS_ALLOCATED = 'a';
|
||||
|
||||
static const pool_start_mark_t POOL_START_MARK = CHARS_TO_UINT32 ('P', '_', 's', 't');
|
||||
|
||||
static const pools_start_mark_t POOLS_START_MARK = CHARS_TO_UINT32 ('P', 'S', 's', 't');
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
static inline uint32_t items_group_number_items (items_group_t *items_group) {
|
||||
return items_group->number_plus_one - 1;
|
||||
}
|
||||
|
||||
static inline uint32_t items_group_free_items (items_group_t *items_group) {
|
||||
items_group_positions_t positions;
|
||||
uint32_t free_items;
|
||||
positions.all = items_group->positions.all;
|
||||
free_items = items_group->number_plus_one + positions.ind.put - positions.ind.get;
|
||||
free_items %= items_group->number_plus_one;
|
||||
return free_items;
|
||||
}
|
||||
|
||||
static inline items_group_index_t items_group_get_free_item (items_group_t *items_group) {
|
||||
items_group_position_t get_raw;
|
||||
items_group_position_t put;
|
||||
items_group_position_t get;
|
||||
items_group_position_t free_items;
|
||||
items_group_index_t index = ITEMS_GROUP_INDEX_INVALID;
|
||||
/* Get current put position */
|
||||
put = items_group->positions.ind.put % items_group->number_plus_one;
|
||||
/* Get current get position and increase it */
|
||||
get_raw = __sync_fetch_and_add (&items_group->positions.ind.get, 1);
|
||||
get = get_raw % items_group->number_plus_one;
|
||||
|
||||
if(put == get) {
|
||||
/* No more item free, restore previous position */
|
||||
__sync_fetch_and_sub (&items_group->positions.ind.get, 1);
|
||||
} else {
|
||||
/* Get index at current get position */
|
||||
index = items_group->indexes[get];
|
||||
|
||||
if (index <= ITEMS_GROUP_INDEX_INVALID) {
|
||||
/* Index has not yet been completely freed, restore previous get position */
|
||||
__sync_fetch_and_sub (&items_group->positions.ind.get, 1);
|
||||
} else {
|
||||
if (get_raw == items_group->number_plus_one) {
|
||||
/* Wrap get position */
|
||||
__sync_fetch_and_sub (&items_group->positions.ind.get, items_group->number_plus_one);
|
||||
}
|
||||
|
||||
free_items = items_group_free_items(items_group);
|
||||
|
||||
/* Updates minimum free items if needed */
|
||||
while (items_group->minimum > free_items) {
|
||||
items_group->minimum = free_items;
|
||||
}
|
||||
|
||||
/* Clear index at current get position to indicate that item is free */
|
||||
items_group->indexes[get] = ITEMS_GROUP_INDEX_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
return (index);
|
||||
}
|
||||
|
||||
static inline int items_group_put_free_item (items_group_t *items_group, items_group_index_t index) {
|
||||
items_group_position_t put_raw;
|
||||
items_group_position_t put;
|
||||
/* Get current put position and increase it */
|
||||
put_raw = __sync_fetch_and_add (&items_group->positions.ind.put, 1);
|
||||
put = put_raw % items_group->number_plus_one;
|
||||
|
||||
if (put_raw == items_group->number_plus_one) {
|
||||
/* Wrap position */
|
||||
__sync_fetch_and_sub (&items_group->positions.ind.put, items_group->number_plus_one);
|
||||
}
|
||||
|
||||
AssertError (items_group->indexes[put] <= ITEMS_GROUP_INDEX_INVALID, return (EXIT_FAILURE),
|
||||
"Index at current put position (%d) is not marked as free (%d)!\n", put, items_group->number_plus_one);
|
||||
/* Save freed item index at current put position */
|
||||
items_group->indexes[put] = index;
|
||||
return (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
static inline memory_pools_t *memory_pools_from_handler (memory_pools_handle_t memory_pools_handle) {
|
||||
memory_pools_t *memory_pools;
|
||||
/* Recover memory_pools */
|
||||
memory_pools = (memory_pools_t *) memory_pools_handle;
|
||||
/* Sanity check on passed handle */
|
||||
AssertError (memory_pools->start_mark == POOLS_START_MARK, memory_pools = NULL,
|
||||
"Handle %p is not a valid memory pools handle, start mark is missing!\n", memory_pools_handle);
|
||||
return (memory_pools);
|
||||
}
|
||||
|
||||
static inline memory_pool_item_t *memory_pool_item_from_handler (memory_pool_item_handle_t memory_pool_item_handle) {
|
||||
void *address;
|
||||
memory_pool_item_t *memory_pool_item;
|
||||
/* Recover memory_pools */
|
||||
address = memory_pool_item_handle - sizeof(memory_pool_item_start_t);
|
||||
memory_pool_item = (memory_pool_item_t *) address;
|
||||
/* Sanity check on passed handle */
|
||||
AssertError (memory_pool_item->start.start_mark == POOL_ITEM_START_MARK, memory_pool_item = NULL,
|
||||
"Handle %p is not a valid memory pool item handle, start mark is missing!\n", memory_pool_item);
|
||||
return (memory_pool_item);
|
||||
}
|
||||
|
||||
static inline memory_pool_item_t *memory_pool_item_from_index (memory_pool_t *memory_pool, items_group_index_t index) {
|
||||
void *address;
|
||||
address = (void *) memory_pool->items;
|
||||
address += index * memory_pool->pool_item_size;
|
||||
return (address);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
memory_pools_handle_t memory_pools_create (uint32_t pools_number) {
|
||||
memory_pools_t *memory_pools;
|
||||
pool_id_t pool;
|
||||
AssertFatal (pools_number <= MAX_POOLS_NUMBER, "Too many memory pools requested (%d/%d)!\n", pools_number, MAX_POOLS_NUMBER); /* Limit to a reasonable number of pools */
|
||||
/* Allocate memory_pools */
|
||||
memory_pools = malloc (sizeof(memory_pools_t));
|
||||
AssertFatal (memory_pools != NULL, "Memory pools structure allocation failed!\n");
|
||||
/* Initialize memory_pools */
|
||||
{
|
||||
memory_pools->start_mark = POOLS_START_MARK;
|
||||
memory_pools->pools_number = pools_number;
|
||||
memory_pools->pools_defined = 0;
|
||||
/* Allocate pools */
|
||||
memory_pools->pools = calloc (pools_number, sizeof(memory_pool_t));
|
||||
AssertFatal (memory_pools->pools != NULL, "Memory pools allocation failed!\n");
|
||||
|
||||
/* Initialize pools */
|
||||
for (pool = 0; pool < pools_number; pool++) {
|
||||
memory_pools->pools[pool].start_mark = POOL_START_MARK;
|
||||
}
|
||||
}
|
||||
return ((memory_pools_handle_t) memory_pools);
|
||||
}
|
||||
|
||||
char *memory_pools_statistics(memory_pools_handle_t memory_pools_handle) {
|
||||
memory_pools_t *memory_pools;
|
||||
pool_id_t pool;
|
||||
char *statistics;
|
||||
int printed_chars;
|
||||
uint32_t allocated_pool_memory;
|
||||
uint32_t allocated_pools_memory = 0;
|
||||
items_group_t *items_group;
|
||||
uint32_t pool_items_size;
|
||||
/* Recover memory_pools */
|
||||
memory_pools = memory_pools_from_handler (memory_pools_handle);
|
||||
AssertFatal (memory_pools != NULL, "Failed to retrieve memory pool for handle %p!\n", memory_pools_handle);
|
||||
statistics = malloc(memory_pools->pools_defined * 200);
|
||||
printed_chars = sprintf (&statistics[0], "Pool: size, number, minimum, free, address space and memory used in Kbytes\n");
|
||||
|
||||
for (pool = 0; pool < memory_pools->pools_defined; pool++) {
|
||||
items_group = &memory_pools->pools[pool].items_group_free;
|
||||
allocated_pool_memory = items_group_number_items (items_group) * memory_pools->pools[pool].pool_item_size;
|
||||
allocated_pools_memory += allocated_pool_memory;
|
||||
pool_items_size = memory_pools->pools[pool].item_data_number * sizeof(memory_pool_data_t);
|
||||
printed_chars += sprintf (&statistics[printed_chars], " %2u: %6u, %6u, %6u, %6u, [%p-%p] %6u\n",
|
||||
pool, pool_items_size,
|
||||
items_group_number_items (items_group),
|
||||
items_group->minimum,
|
||||
items_group_free_items (items_group),
|
||||
memory_pools->pools[pool].items,
|
||||
((void *) memory_pools->pools[pool].items) + allocated_pool_memory,
|
||||
allocated_pool_memory / (1024));
|
||||
}
|
||||
|
||||
printed_chars = sprintf (&statistics[printed_chars], "Pools memory %u Kbytes\n", allocated_pools_memory / (1024));
|
||||
return (statistics);
|
||||
}
|
||||
|
||||
int memory_pools_add_pool (memory_pools_handle_t memory_pools_handle, uint32_t pool_items_number, uint32_t pool_item_size) {
|
||||
memory_pools_t *memory_pools;
|
||||
memory_pool_t *memory_pool;
|
||||
pool_id_t pool;
|
||||
items_group_index_t item_index;
|
||||
memory_pool_item_t *memory_pool_item;
|
||||
AssertFatal (pool_items_number <= MAX_POOL_ITEMS_NUMBER, "Too many items for a memory pool (%u/%d)!\n", pool_items_number, MAX_POOL_ITEMS_NUMBER); /* Limit to a reasonable number of items */
|
||||
AssertFatal (pool_item_size <= MAX_POOL_ITEM_SIZE, "Item size is too big for memory pool items (%u/%d)!\n", pool_item_size, MAX_POOL_ITEM_SIZE); /* Limit to a reasonable item size */
|
||||
/* Recover memory_pools */
|
||||
memory_pools = memory_pools_from_handler (memory_pools_handle);
|
||||
AssertFatal (memory_pools != NULL, "Failed to retrieve memory pool for handle %p!\n", memory_pools_handle);
|
||||
/* Check number of already created pools */
|
||||
AssertFatal (memory_pools->pools_defined < memory_pools->pools_number, "Can not allocate more memory pool (%d)!\n", memory_pools->pools_number);
|
||||
/* Select pool */
|
||||
pool = memory_pools->pools_defined;
|
||||
memory_pool = &memory_pools->pools[pool];
|
||||
/* Initialize pool */
|
||||
{
|
||||
memory_pool->pool_id = pool;
|
||||
/* Item size in memory_pool_data_t items by excess */
|
||||
memory_pool->item_data_number = (pool_item_size + sizeof(memory_pool_data_t) - 1) / sizeof(memory_pool_data_t);
|
||||
memory_pool->pool_item_size = (memory_pool->item_data_number * sizeof(memory_pool_data_t)) + sizeof(memory_pool_item_t);
|
||||
memory_pool->items_group_free.number_plus_one = pool_items_number + 1;
|
||||
memory_pool->items_group_free.minimum = pool_items_number;
|
||||
memory_pool->items_group_free.positions.ind.put = pool_items_number;
|
||||
memory_pool->items_group_free.positions.ind.get = 0;
|
||||
/* Allocate free indexes */
|
||||
memory_pool->items_group_free.indexes = malloc(memory_pool->items_group_free.number_plus_one * sizeof(items_group_index_t));
|
||||
AssertFatal (memory_pool->items_group_free.indexes != NULL, "Memory pool indexes allocation failed!\n");
|
||||
|
||||
/* Initialize free indexes */
|
||||
for (item_index = 0; item_index < pool_items_number; item_index++) {
|
||||
memory_pool->items_group_free.indexes[item_index] = item_index;
|
||||
}
|
||||
|
||||
/* Last index is not allocated */
|
||||
memory_pool->items_group_free.indexes[item_index] = ITEMS_GROUP_INDEX_INVALID;
|
||||
/* Allocate items */
|
||||
memory_pool->items = calloc (pool_items_number, memory_pool->pool_item_size);
|
||||
AssertFatal (memory_pool->items != NULL, "Memory pool items allocation failed!\n");
|
||||
|
||||
/* Initialize items */
|
||||
for (item_index = 0; item_index < pool_items_number; item_index++) {
|
||||
memory_pool_item = memory_pool_item_from_index (memory_pool, item_index);
|
||||
memory_pool_item->start.start_mark = POOL_ITEM_START_MARK;
|
||||
memory_pool_item->start.pool_id = pool;
|
||||
memory_pool_item->start.item_status = ITEM_STATUS_FREE;
|
||||
memory_pool_item->data[memory_pool->item_data_number] = POOL_ITEM_END_MARK;
|
||||
}
|
||||
}
|
||||
memory_pools->pools_defined ++;
|
||||
return (0);
|
||||
}
|
||||
|
||||
memory_pool_item_handle_t memory_pools_allocate (memory_pools_handle_t memory_pools_handle, uint32_t item_size, uint16_t info_0, uint16_t info_1) {
|
||||
memory_pools_t *memory_pools;
|
||||
memory_pool_item_t *memory_pool_item;
|
||||
memory_pool_item_handle_t memory_pool_item_handle = NULL;
|
||||
pool_id_t pool;
|
||||
items_group_index_t item_index = ITEMS_GROUP_INDEX_INVALID;
|
||||
/* Recover memory_pools */
|
||||
memory_pools = memory_pools_from_handler (memory_pools_handle);
|
||||
AssertError (memory_pools != NULL, {}, "Failed to retrieve memory pool for handle %p!\n", memory_pools_handle);
|
||||
|
||||
for (pool = 0; pool < memory_pools->pools_defined; pool++) {
|
||||
if ((memory_pools->pools[pool].item_data_number * sizeof(memory_pool_data_t)) < item_size) {
|
||||
/* This memory pool has too small items, skip it */
|
||||
continue;
|
||||
}
|
||||
|
||||
item_index = items_group_get_free_item(&memory_pools->pools[pool].items_group_free);
|
||||
|
||||
if (item_index <= ITEMS_GROUP_INDEX_INVALID) {
|
||||
/* Allocation failed, skip this pool */
|
||||
continue;
|
||||
} else {
|
||||
/* Allocation succeed, exit searching loop */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (item_index > ITEMS_GROUP_INDEX_INVALID) {
|
||||
/* Convert item index into memory_pool_item address */
|
||||
memory_pool_item = memory_pool_item_from_index (&memory_pools->pools[pool], item_index);
|
||||
/* Sanity check on item status, must be free */
|
||||
AssertFatal (memory_pool_item->start.item_status == ITEM_STATUS_FREE, "Item status is not set to free (%d) in pool %u, item %d!\n",
|
||||
memory_pool_item->start.item_status, pool, item_index);
|
||||
memory_pool_item->start.item_status = ITEM_STATUS_ALLOCATED;
|
||||
memory_pool_item->start.info[0] = info_0;
|
||||
memory_pool_item->start.info[1] = info_1;
|
||||
memory_pool_item_handle = memory_pool_item->data;
|
||||
MP_DEBUG(" Alloc [%2u][%6d]{%6d}, %3u %3u, %6u, %p, %p, %p\n",
|
||||
pool, item_index,
|
||||
items_group_free_items (&memory_pools->pools[pool].items_group_free),
|
||||
info_0, info_1,
|
||||
item_size,
|
||||
memory_pools->pools[pool].items,
|
||||
memory_pool_item,
|
||||
memory_pool_item_handle);
|
||||
} else {
|
||||
MP_DEBUG(" Alloc [--][------]{------}, %3u %3u, %6u, failed!\n", info_0, info_1, item_size);
|
||||
}
|
||||
|
||||
return memory_pool_item_handle;
|
||||
}
|
||||
|
||||
int memory_pools_free (memory_pools_handle_t memory_pools_handle, memory_pool_item_handle_t memory_pool_item_handle, uint16_t info_0) {
|
||||
memory_pools_t *memory_pools;
|
||||
memory_pool_item_t *memory_pool_item;
|
||||
pool_id_t pool;
|
||||
items_group_index_t item_index;
|
||||
uint32_t item_size;
|
||||
uint32_t pool_item_size;
|
||||
uint16_t info_1;
|
||||
int result;
|
||||
/* Recover memory_pools */
|
||||
memory_pools = memory_pools_from_handler (memory_pools_handle);
|
||||
AssertError (memory_pools != NULL, return (EXIT_FAILURE), "Failed to retrieve memory pools for handle %p!\n", memory_pools_handle);
|
||||
/* Recover memory pool item */
|
||||
memory_pool_item = memory_pool_item_from_handler (memory_pool_item_handle);
|
||||
AssertError (memory_pool_item != NULL, return (EXIT_FAILURE), "Failed to retrieve memory pool item for handle %p!\n", memory_pool_item_handle);
|
||||
info_1 = memory_pool_item->start.info[1];
|
||||
/* Recover pool index */
|
||||
pool = memory_pool_item->start.pool_id;
|
||||
AssertFatal (pool < memory_pools->pools_defined, "Pool index is invalid (%u/%u)!\n", pool, memory_pools->pools_defined);
|
||||
item_size = memory_pools->pools[pool].item_data_number;
|
||||
pool_item_size = memory_pools->pools[pool].pool_item_size;
|
||||
item_index = (((void *) memory_pool_item) - ((void *) memory_pools->pools[pool].items)) / pool_item_size;
|
||||
MP_DEBUG(" Free [%2u][%6d]{%6d}, %3u %3u, %p, %p, %p, %u\n",
|
||||
pool, item_index,
|
||||
items_group_free_items (&memory_pools->pools[pool].items_group_free),
|
||||
memory_pool_item->start.info[0], info_1,
|
||||
memory_pool_item_handle, memory_pool_item,
|
||||
memory_pools->pools[pool].items, ((uint32_t) (item_size * sizeof(memory_pool_data_t))));
|
||||
/* Sanity check on calculated item index */
|
||||
AssertFatal (memory_pool_item == memory_pool_item_from_index(&memory_pools->pools[pool], item_index),
|
||||
"Incorrect memory pool item address (%p, %p) for pool %u, item %d!\n",
|
||||
memory_pool_item,(void *)memory_pool_item_from_index(&memory_pools->pools[pool], item_index), pool, item_index);
|
||||
/* Sanity check on end marker, must still be present (no write overflow) */
|
||||
AssertFatal (memory_pool_item->data[item_size] == POOL_ITEM_END_MARK,
|
||||
"Memory pool item is corrupted, end mark is not present for pool %u, item %d!\n", pool, item_index);
|
||||
/* Sanity check on item status, must be allocated */
|
||||
AssertFatal (memory_pool_item->start.item_status == ITEM_STATUS_ALLOCATED,
|
||||
"Trying to free a non allocated (%x) memory pool item (pool %u, item %d)!\n",
|
||||
memory_pool_item->start.item_status, pool, item_index);
|
||||
memory_pool_item->start.item_status = ITEM_STATUS_FREE;
|
||||
result = items_group_put_free_item(&memory_pools->pools[pool].items_group_free, item_index);
|
||||
AssertError (result == EXIT_SUCCESS, {}, "Failed to free memory pool item (pool %u, item %d)!\n", pool, item_index);
|
||||
return (result);
|
||||
}
|
||||
|
||||
void memory_pools_set_info (memory_pools_handle_t memory_pools_handle, memory_pool_item_handle_t memory_pool_item_handle, int index, uint16_t info) {
|
||||
memory_pools_t *memory_pools;
|
||||
memory_pool_item_t *memory_pool_item;
|
||||
pool_id_t pool;
|
||||
items_group_index_t item_index;
|
||||
uint32_t item_size;
|
||||
uint32_t pool_item_size;
|
||||
AssertFatal (index < MEMORY_POOL_ITEM_INFO_NUMBER, "Incorrect info index (%d/%d)!\n", index, MEMORY_POOL_ITEM_INFO_NUMBER);
|
||||
/* Recover memory pool item */
|
||||
memory_pool_item = memory_pool_item_from_handler (memory_pool_item_handle);
|
||||
AssertFatal (memory_pool_item != NULL, "Failed to retrieve memory pool item for handle %p!\n", memory_pool_item_handle);
|
||||
/* Set info[1] */
|
||||
memory_pool_item->start.info[index] = info;
|
||||
|
||||
/* Check item validity and log (not mandatory) */
|
||||
if (1) {
|
||||
/* Recover memory_pools */
|
||||
memory_pools = memory_pools_from_handler (memory_pools_handle);
|
||||
AssertFatal (memory_pools != NULL, "Failed to retrieve memory pool for handle %p!\n", memory_pools_handle);
|
||||
/* Recover pool index */
|
||||
pool = memory_pool_item->start.pool_id;
|
||||
AssertFatal (pool < memory_pools->pools_defined, "Pool index is invalid (%u/%u)!\n", pool, memory_pools->pools_defined);
|
||||
item_size = memory_pools->pools[pool].item_data_number;
|
||||
pool_item_size = memory_pools->pools[pool].pool_item_size;
|
||||
item_index = (((void *) memory_pool_item) - ((void *) memory_pools->pools[pool].items)) / pool_item_size;
|
||||
MP_DEBUG(" Info [%2u][%6d]{%6d}, %3u %3u, %p, %p, %p, %u\n",
|
||||
pool, item_index,
|
||||
items_group_free_items (&memory_pools->pools[pool].items_group_free),
|
||||
memory_pool_item->start.info[0], memory_pool_item->start.info[1],
|
||||
memory_pool_item_handle, memory_pool_item,
|
||||
memory_pools->pools[pool].items, ((uint32_t) (item_size * sizeof(memory_pool_data_t))));
|
||||
/* Sanity check on calculated item index */
|
||||
AssertFatal (memory_pool_item == memory_pool_item_from_index(&memory_pools->pools[pool], item_index),
|
||||
"Incorrect memory pool item address (%p, %p) for pool %u, item %d!\n",
|
||||
memory_pool_item, (void *)memory_pool_item_from_index(&memory_pools->pools[pool], item_index), pool, item_index);
|
||||
/* Sanity check on end marker, must still be present (no write overflow) */
|
||||
AssertFatal (memory_pool_item->data[item_size] == POOL_ITEM_END_MARK,
|
||||
"Memory pool item is corrupted, end mark is not present for pool %u, item %d!\n", pool, item_index);
|
||||
/* Sanity check on item status, must be allocated */
|
||||
AssertFatal (memory_pool_item->start.item_status == ITEM_STATUS_ALLOCATED,
|
||||
"Trying to free a non allocated (%x) memory pool item (pool %u, item %d)\n",
|
||||
memory_pool_item->start.item_status, pool, item_index);
|
||||
}
|
||||
}
|
||||
@@ -121,9 +121,11 @@ char toksep[2];
|
||||
case SCHED_RR:
|
||||
lptr+=sprintf(lptr,"%s ","rt: rr");
|
||||
break;
|
||||
#ifdef SCHED_DEADLINE
|
||||
case SCHED_DEADLINE:
|
||||
lptr+=sprintf(lptr,"%s ","rt: deadline");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
lptr+=sprintf(lptr,"%s ","????");
|
||||
break;
|
||||
|
||||
@@ -6,10 +6,9 @@ Each worker loop on pick from the same input queue jobs to do.
|
||||
|
||||
When a job is done, the worker sends a return if a return is defined.
|
||||
|
||||
A selective abort allows to cancel parallel jobs (usage: a client pushed jobs, but from a response of one job, the other linked jobs becomes useless).
|
||||
A selective abort allows to cancel parallel jobs (usage: a client pushed jobs, but from a response of one job, the other linked jobs becomes useless).
|
||||
|
||||
All the thread pool functions are thread safe, nevertheless the working functions are implemented by the thread pool client,
|
||||
so the client has to tackle the parallel execution of his functions called "processingFunc" hereafter.
|
||||
All the thread pool functions are thread safe, nevertheless the working functions are implemented by the thread pool client, so the client has to tackle the parallel execution of his functions called "processingFunc" hereafter.
|
||||
|
||||
## license
|
||||
Author:
|
||||
@@ -18,65 +17,187 @@ When a job is done, the worker sends a return if a return is defined.
|
||||
|
||||
# jobs
|
||||
|
||||
A job is a message (notifiedFIFO_elt_t):
|
||||
next:
|
||||
internal FIFO chain, do not set it
|
||||
key:
|
||||
a long int that the client can use to identify a message or a group of messages
|
||||
responseFifo:
|
||||
if the client defines a response FIFO, the message will be posted back after processing
|
||||
processingFunc:
|
||||
any funtion (type void processingFunc(void *)) that the worker will launch
|
||||
msgData:
|
||||
the data passed to processingFunc. It can be added automatically, or you can set it to a buffer you are managing
|
||||
malloced:
|
||||
a boolean that enable internal free in these cases:
|
||||
no return Fifo or Abort feature
|
||||
A job is a message (notifiedFIFO_elt_t):
|
||||
|
||||
The job messages can be created with newNotifiedFIFO_elt() and delNotifiedFIFO_elt() or managed by the client.
|
||||
* next:
|
||||
internal FIFO chain, do not set it
|
||||
* key:
|
||||
a long int that the client can use to identify a message or a group of messages
|
||||
* ResponseFifo:
|
||||
if the client defines a response FIFO, the message will be posted back after processing
|
||||
* processingFunc:
|
||||
any funtion (type void processingFunc(void *)) that the worker will launch
|
||||
* msgData:
|
||||
the data passed to processingFunc. It can be added automatically, or you can set it to a buffer you are managing
|
||||
* malloced:
|
||||
a boolean that enable internal free in these cases:
|
||||
no return Fifo or Abort feature
|
||||
|
||||
The job messages can be created with newNotifiedFIFO_elt() and delNotifiedFIFO_elt() or managed by the client.
|
||||
|
||||
# Queues of jobs
|
||||
|
||||
Queues are type of:
|
||||
notifiedFIFO_t that must be initialized by init_notifiedFIFO()
|
||||
No delete function is required, the creator has only to free the data of type notifiedFIFO_t
|
||||
Queues are type of:
|
||||
|
||||
push_notifiedFIFO() add a job in the queue
|
||||
pull_notifiedFIFO() is blocking, poll_notifiedFIFO() is non blocking
|
||||
* notifiedFIFO_t that must be initialized by init_notifiedFIFO()
|
||||
* No delete function is required, the creator has only to free the data of type notifiedFIFO_t
|
||||
* push_notifiedFIFO() add a job in the queue
|
||||
* pull_notifiedFIFO() is blocking, poll_notifiedFIFO() is non blocking
|
||||
* abort_notifiedFIFO() allows the customer to delete all waiting jobs that match with the key (see key in jobs definition)
|
||||
|
||||
abort_notifiedFIFO() allows the customer to delete all waiting jobs that match with the key (see key in jobs definition)
|
||||
These queues details hereafter
|
||||
|
||||
## Common
|
||||
|
||||
newNotifiedFIFO_elt()
|
||||
|
||||
creates a message, that will later be used in queues/FIFO
|
||||
|
||||
delNotifiedFIFO_elt()
|
||||
|
||||
deletes it
|
||||
|
||||
NotifiedFifoData()
|
||||
|
||||
gives a pointer to the beginning of free usage memory in a message (you can put any data there, up to 'size' parameter you passed to newNotifiedFIFO_elt()
|
||||
|
||||
These 3 calls are not mandatory, you can also use your own memory to save the malloc()/free() that are behind these calls
|
||||
iFirst level: non thread safe FIFO (or queues)
|
||||
|
||||
# low level: fast and simple
|
||||
|
||||
initNotifiedFIFO_nothreadSafe()
|
||||
|
||||
to create a queue
|
||||
|
||||
pushNotifiedFIFO_nothreadSafe()
|
||||
|
||||
Add a element in a queue
|
||||
|
||||
pullNotifiedFIFO_nothreadSafe()
|
||||
|
||||
pull a element from a queue
|
||||
|
||||
As these queues are not thread safe, there is NO blocking mechanism, neither pull() versus poll() calls
|
||||
|
||||
There is no delete for a message queue: you only have to abandon the memory you allocated to call iinitNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf)
|
||||
|
||||
So if you malloced the memory under 'nf' parameter you have to free it, if it is automatic variable (local variable) or global variable, nothing is to be done.
|
||||
|
||||
|
||||
## thread safe queues
|
||||
|
||||
These queues are built on not thread safe queues when we need thread to thread protection
|
||||
|
||||
initNotifiedFIFO()
|
||||
|
||||
to create a queue
|
||||
|
||||
pushNotifiedFIFO()
|
||||
|
||||
Add a element in a queue
|
||||
|
||||
pullNotifiedFIFO()
|
||||
|
||||
pull a element from a queue, this call is blocking until a message arrived
|
||||
|
||||
pollNotifiedFIFO()
|
||||
|
||||
pull a element from a queue, this call is not blocking, so it returns always very shortly
|
||||
|
||||
in 99.9% cases, pull() is better than poll()
|
||||
|
||||
No delete() call, same principle as not thread safe queues
|
||||
|
||||
# Thread pools
|
||||
|
||||
## initialization
|
||||
The clients can create one or more thread pools with init_tpool()
|
||||
the params string structure:
|
||||
describes a list of cores, separated by "," that run a worker thread
|
||||
The clients can create one or more thread pools with init_tpool()
|
||||
|
||||
If the core exists on the CPU, the thread pool initialization sets the affinity between this thread and
|
||||
the related code (use negative values is allowed, so the thread will never be mapped on a specific core).
|
||||
the params string structure: describes a list of cores, separated by "," that run a worker thread
|
||||
|
||||
The threads are all Linux real time scheduler, their name is set automatically is "Tpool_<core id>"
|
||||
If the core exists on the CPU, the thread pool initialization sets the affinity between this thread and the related code (use negative values is allowed, so the thread will never be mapped on a specific core).
|
||||
|
||||
The threads are all Linux real time scheduler, their name is set automatically is "Tpool_<core id>"
|
||||
|
||||
## adding jobs
|
||||
The client create their jobs messages as a notifiedFIFO_elt_t, then they push it with pushTpool() (that internally calls push_notifiedFIFO())
|
||||
The client create their jobs messages as a notifiedFIFO_elt_t, then they push it with pushTpool() (that internally calls push_notifiedFIFO())
|
||||
|
||||
If they need a return, they have to create response queues with init_notifiedFIFO() and set this FIFO pointer in the notifiedFIFO_elt_t before pushing the job.
|
||||
If they need a return, they have to create response queues with init_notifiedFIFO() and set this FIFO pointer in the notifiedFIFO_elt_t before pushing the job.
|
||||
|
||||
## abort
|
||||
|
||||
A abort service abortTpool() allows to abort all jobs that match a key (see jobs "key"). When the abort returns, it garanties no job (matching the key) response will be posted on response queues.
|
||||
A abort service abortTpool() allows to abort all jobs that match a key (see jobs "key"). When the abort returns, it garanties no job (matching the key) response will be posted on response queues.
|
||||
|
||||
Nevertheless, jobs already performed before the return of abortTpool() are pushed in the response Fifo queue.
|
||||
Nevertheless, jobs already performed before the return of abortTpool() are pushed in the response Fifo queue.
|
||||
|
||||
## API details
|
||||
Each thread pool (there can be several in the same process) should be initialized
|
||||
|
||||
### initTpool(char *params,tpool_t *pool, bool performanceMeas) is to be called oncepool
|
||||
|
||||
the configuration parameter is a string, elements separated by ",":
|
||||
|
||||
* N: if a N is in the parameter list, no threads are created
|
||||
The purpose is to keep the same API in any case
|
||||
* a CPU with a little number of cores,
|
||||
or in debugging sessions to simplify the human work
|
||||
* a number that represent a valid CPU core on the target CPU
|
||||
A thread is created and stick on the core (with set affinity)
|
||||
* a number that is not a valid CPU core
|
||||
a floating thread is created (Linux is responsible of the real time core allocation)
|
||||
|
||||
example: "-1,-1,-1"
|
||||
as there is no core number -1, the thread pool is made of 3 floating threads
|
||||
be careful with fix allocation: it is hard to be more clever than Linux kernel
|
||||
|
||||
pool is the memory you allocated before to store the thread pool internal state (same concept as above queues)
|
||||
|
||||
performanceMeas is a flag to enable measurements (well described in documentation)
|
||||
|
||||
### pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg)
|
||||
|
||||
adds a job to do in the thread pool
|
||||
|
||||
The msg data you can set are:
|
||||
|
||||
* key:
|
||||
a value for you that you will find back in the response
|
||||
it is also the key for abortTpool()
|
||||
* reponseFifo
|
||||
if you set it, the message will be sent back on this queue when the job is done
|
||||
if you don't set it, no return is performed, the thread pool frees the message 'msg' when the job is done
|
||||
* processingFunc
|
||||
the function the job will run. the function prototype is void <func>(void *memory)
|
||||
the data part (the pointer returned by NotifiedFifoData(msg)) is passed to the function
|
||||
it is used to send data to the processing function and also to write back results
|
||||
of course, writing back results will lead you to use also a return queue (the parameter reponseFifo)
|
||||
|
||||
### pullTpool() collects job result in a return queue
|
||||
|
||||
you collect results in one result queue: the message you gave to pushTpool(), nevertheless it has been updated by processingFunc()
|
||||
|
||||
An example of multiple return queues, in eNB: I created one single thread pool (because it depends mainly on CPU hardware), but i use two return queues: one for turbo encode, one for turbo decode.
|
||||
|
||||
### tryPullTpool()
|
||||
|
||||
is the same, but not blocking (pollTpool() would have been a better name)
|
||||
|
||||
### abortTpool()
|
||||
|
||||
Is a facility to cancel work you pushed to a thread pool
|
||||
|
||||
I used it once: when eNB performs turbo decode, I push all segments in the thread pool.
|
||||
|
||||
But when I get back the decoding results, if one segment can't be decoded, I don't need the results of the other segments of the same UE.
|
||||
|
||||
## Performance measurements
|
||||
|
||||
A performance measurement is integrated:
|
||||
the pool will automacillay fill timestamps:
|
||||
|
||||
* creationTime:
|
||||
time the request is push to the pool;
|
||||
A performance measurement is integrated:
|
||||
the pool will automacillay fill timestamps:
|
||||
|
||||
* creationTime:
|
||||
time the request is push to the pool;
|
||||
* startProcessingTime:
|
||||
time a worker start to run on the job
|
||||
* endProcessingTime:
|
||||
|
||||
@@ -187,6 +187,8 @@ eNBs =
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
<style type="text/css" rel="stylesheet">
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
color: #fff;
|
||||
background-color: #110F14;
|
||||
}
|
||||
h2 { margin-left: 20px; }
|
||||
h3 { margin-left: 40px; }
|
||||
h4 { margin-left: 60px; }
|
||||
|
||||
.func2 { margin-left: 20px; }
|
||||
.func3 { margin-left: 40px; }
|
||||
.func4 { margin-left: 60px; }
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
This tuto for 5G gNB NAS design
|
||||
{: .text-center}
|
||||
|
||||
# source files
|
||||
|
||||
executables/ocp-gnb.c: a main loop to create a debuggable gNB, see document SW_archi.md
|
||||
openair2/RRC/NR/nr_ngap_gNB.c: skeleton for interface with NGAP
|
||||
openair3/NAS/COMMON/milenage.h: a simple milenage implementation, depend only on crypto library
|
||||
openair3/NAS/COMMON/NR_NAS_defs.h: messages defined for NAS implemented in C: C struct, C enums and automatic conversion to labels for debug messages
|
||||
openair3/NAS/COMMON/nr_common.c: 5G NAS common code between gNB and UE
|
||||
openair3/UICC/usim_interface.c: UICC simulation for USIM messages
|
||||
|
||||
openair3/NAS/NR_UE/ue_process_nas.c: NAS code for UE
|
||||
|
||||
openair3/NAS/gNB/network_process_nas.c: NAS code for gNB running without 5GC
|
||||
|
||||
openair3/TEST/test5Gnas.c: unitary testing of NAS messages: encodes+decode a standard network entry, mixing code from UE and 5GC (or gNB in noCore)
|
||||
|
||||
# USIM simulation
|
||||
A new USIM simulation, that parameters are in regular OAI config files
|
||||
|
||||
## To open the USIM
|
||||
init_uicc() takes a parameter: the name of the block in the config file
|
||||
In case we run several UEs in one process, the variable section name allows to make several UEs configurations in one config file.
|
||||
|
||||
The NAS implementation uses this possibility.
|
||||
|
||||
# UE side
|
||||
UEprocessNAS() is the entry for all messages.
|
||||
It decodes the message type and call the specific function for each messgae
|
||||
|
||||
## Identityrequest + IdentityResponse
|
||||
When the UE receives the request, it stores the 5GC request parameters in the UE context ( UE->uicc pointer)
|
||||
It calls "scheduleNAS", that would trigger a answer (seeing general archtecture, it will probly be a itti message to future RRC or NGAP thread).
|
||||
|
||||
When the scheduler wants to encode the answer, it calls identityResponse()
|
||||
The UE search for a section in the config file called "uicc"
|
||||
it encodes the NAS answer with the IMSI, as a 4G compatible authentication.
|
||||
A future release would encode 5G SUPI as native 5G UICC.
|
||||
|
||||
## Authenticationrequest + authenticationResponse
|
||||
When the UE receives the request, it stores the 5GC request parameters in the UE context ( UE->uicc pointer)
|
||||
It calls "scheduleNAS", that would trigger a answer (seeing general archtecture, it will probly be a itti message to future RRC or NGAP thread).
|
||||
|
||||
When the scheduler wants to encode the answer, it calls authenticationResponse()
|
||||
The UE search for a section in the config file called "uicc"
|
||||
It uses the Milenage parameters of this section to encode a milenage response
|
||||
A future release would encode 5G new authentication cyphering functions.
|
||||
|
||||
## SecurityModeCommand + securityModeComplete
|
||||
When the UE receives the request it will:
|
||||
Selected NAS security algorithms: store it for future encoding
|
||||
Replayed UE security capabilities: check if it is equal to UE capabilities it sent to the 5GC
|
||||
IMEISV request: to implement
|
||||
ngKSI: Key set Indicator, similator to 4G to select a ciphering keys set
|
||||
|
||||
When the scheduler wants to encode the answer, it calls registrationComplete()
|
||||
|
||||
## registrationComplete
|
||||
To be defined in UE, this NAS message is done after RRC sequence completes
|
||||
|
||||
# gNB side
|
||||
gNB NGAP thread receives the NAS message from PHY layers
|
||||
In normal mode, it send it to the core network with no decoding.
|
||||
|
||||
Here after, the gNB mode "noCore" processing in gNB: NGAP calls the entry function: processNAS() instead of forwarding the packet to the 5GC
|
||||
|
||||
## RRCModeComplete + Identityrequest
|
||||
When the gNB completes RRC attach, it sends a first message to NGAP thread.
|
||||
Normal processing sends NGAP initial UE message, in noCore mode, it should call: identityRequest() that encode the NAS identity request inside the gNB.
|
||||
The gNB NGAP thread then should call the piece of code that forward the message to the UE as when it receives a NAS message from 5GC.
|
||||
|
||||
## All NAS coming from UE
|
||||
When NGAP thread receives a NAS message from lower layers, it encapsulates it to forward it to the 5GC. In "noCore" mode it calls processNAS().
|
||||
|
||||
This function stores in the gNB the NAS data, then it should encode the next message (identity, authentication, security mode) or do nothing (registration complete).
|
||||
|
||||
|
||||
<div class="panel panel-info">
|
||||
**Note**
|
||||
{: .panel-heading}
|
||||
<div class="panel-body">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,10 @@ This page is valid on tags starting from **`2019.w09`**.
|
||||
|
||||
# Soft Modem Build Script
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
The OAI EPC is developed in a distinct project with it's own [documentation](https://github.com/OPENAIRINTERFACE/openair-epc-fed/wiki) , it is not described here.
|
||||
>>>>>>> fork_develop_new
|
||||
|
||||
OAI softmodem sources, which aim to implement 3GPP compliant UEs, eNodeB and gNodeB can be downloaded from the Eurecom [gitlab repository](./GET_SOURCES.md).
|
||||
|
||||
|
||||
@@ -254,9 +254,11 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
|
||||
The following features are valid for the gNB and the 5G-NR UE.
|
||||
|
||||
* Static TDD,
|
||||
* FDD
|
||||
* Normal CP
|
||||
* 30 kHz subcarrier spacing
|
||||
* Bandwidths up to 80MHz (217 Physical Resource Blocks)
|
||||
* Intermediate downlink and uplink frequencies to interface with IF equipment
|
||||
* Single antenna port (single beam)
|
||||
* Slot format: 14 OFDM symbols in UL or DL
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 supported)
|
||||
|
||||
+1
-7
@@ -33,12 +33,8 @@ holds the source code for (eNB RAN + UE RAN).
|
||||
For legal issues (licenses), the core network (EPC) source code is now moved away from
|
||||
the above openairinterface5g git repository.
|
||||
|
||||
* A very old version of the EPC is located under the same GitLab Eurecom server (splitted into 2 Git repos):
|
||||
* [openair-cn](https://gitlab.eurecom.fr/oai/openair-cn.git) with apache license
|
||||
* [xtables-addons-oai](https://gitlab.eurecom.fr/oai/xtables-addons-oai.git) with GPL license
|
||||
* **These repositories are no more maintained.**
|
||||
* A more recent version is available under our GitHub domain:
|
||||
* [OAI GitHub openair-cn](https://github.com/OPENAIRINTERFACE/openair-cn)
|
||||
* [OAI GitHub openair-cn domain](https://github.com/OPENAIRINTERFACE)
|
||||
* Check its wiki pages for more details
|
||||
|
||||
Configure git with your name/email address (only important if you are developer and want to contribute/push code to Git Repository):
|
||||
@@ -80,8 +76,6 @@ you do not have account on gitlab.eurecom.fr, please register yourself to gitlab
|
||||
* `git clone git@gitlab.eurecom.fr:oai/openairinterface5g.git`
|
||||
* Clone with user name/password prompt:
|
||||
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openairinterface5g.git`
|
||||
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openair-cn.git`
|
||||
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/xtables-addons-oai.git` (optional, openair-cn build script can do it for you)
|
||||
|
||||
# Which branch to checkout?
|
||||
|
||||
|
||||
+109
@@ -57,6 +57,115 @@ oai supports [number of deployment](FEATURE_SET.md) model, the following are tes
|
||||
2. if4p5 mode, where frequency domain samples are carried over ethernet, from the RRU which implement part of L1(FFT,IFFT,part of PRACH), to a RAU
|
||||
|
||||
# 5G NR
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
As of February 2020, all 5G NR development is part of the develop branch (the branch develop-nr is no longer maintained). This also means that all new development will be merged into there once it passes all the CI.
|
||||
|
||||
## NSA setup with COTS UE
|
||||
|
||||
This setup requires an EPC, an OAI eNB and gNB, and a COTS Phone. A dedicated page describe the setup can be found [here](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home/gNB-COTS-UE-testing).
|
||||
|
||||
### Launch gNB
|
||||
|
||||
```bash sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf```
|
||||
|
||||
### Launch eNB
|
||||
|
||||
```bash sudo ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf```
|
||||
|
||||
|
||||
|
||||
## phy-test setup with OAI UE
|
||||
|
||||
The OAI UE can also be used in front of a OAI gNB without the support of eNB or EPC. In this case both gNB and eNB need to be run with the --phy-test flag. At the gNB this flag does the following
|
||||
- it reads the RRC configuration from the configuration file
|
||||
- it encodes the RRCConfiguration and the RBconfig message and stores them in the binary files rbconfig.raw and reconfig.raw
|
||||
- the MAC uses a pre-configured allocation of PDSCH and PUSCH with randomly generated payload
|
||||
|
||||
At the UE the --phy-test flag will
|
||||
- read the binary files rbconfig.raw and reconfig.raw from the current directory (a different directory can be specified with the flag --rrc_config_path) and process them.
|
||||
|
||||
|
||||
### Launch gNB
|
||||
|
||||
```bash sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test```
|
||||
|
||||
### Launch UE in another window
|
||||
|
||||
```bash sudo ./nr-uesoftmodem --phy-test [--rrc_config_path ../../../ci-scripts/rrc-files]```
|
||||
|
||||
Some other useful paramters of the UE are
|
||||
|
||||
- --ue-fo-compensation: enables the frequency offset compenstation at the UE. This is useful when running over the air and/or without an external clock/time source
|
||||
- --usrp-args: this is the equivalend paramter of sdr_addrs field in the gNB config file and can be used to identify the USRP and set some basic paramters (like the clock source)
|
||||
- --clock-source: sets the clock-source (internal or external).
|
||||
- --time-source: sets the time-source (internal or external).
|
||||
|
||||
## noS1 setup with OAI UE
|
||||
|
||||
Instead of randomly generated payload, in the phy-test mode we can also inject/receive user-plane traffic over a TUN interface. This is the so-called noS1 mode.
|
||||
|
||||
This setup is described in the [rfsimulator page](../targets/ARCH/rfsimulator/README.md#5g-case). In theory this should also work with the real hardware target although this has yet to be tested.
|
||||
|
||||
## do-ra setup with OAI
|
||||
|
||||
The do-ra flag is used to ran the NR Random Access procedures in contention-free mode. Currently OAI implements the RACH process from Msg1 to Msg3.
|
||||
|
||||
In order to run the RA, the following flag is needed for both the gNB and the UE:
|
||||
|
||||
`--do-ra`
|
||||
|
||||
### Run OAI in do-ra mode
|
||||
|
||||
From the `cmake_targets/ran_build/build` folder:
|
||||
|
||||
gNB on machine 1:
|
||||
|
||||
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --do-ra`
|
||||
|
||||
UE on machine 2:
|
||||
|
||||
`sudo ./nr-uesoftmodem --do-ra`
|
||||
|
||||
With the RF simulator (on the same machine):
|
||||
|
||||
`sudo RFSIMULATOR=gnb ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --do-ra --rfsim --parallel-config PARALLEL_SINGLE_THREAD`
|
||||
|
||||
`sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --do-ra --rfsim --parallel-config PARALLEL_SINGLE_THREAD`
|
||||
|
||||
## IF setup with OAI
|
||||
|
||||
The -C and -CO flags can be used together at UE side to set custom downlink and uplink FR1 intermediate frequencies for the IF equipment.
|
||||
|
||||
In order to run this setup, the following flags are needed at the UE side:
|
||||
|
||||
`-C`
|
||||
|
||||
`--CO`
|
||||
|
||||
and the following parameters must be configured in the RUs section of the gNB configuration file:
|
||||
|
||||
`if_freq`
|
||||
|
||||
`if_offset`
|
||||
|
||||
### Run OAI with custom DL/UL intermediate frequencies
|
||||
|
||||
The following example uses DL frequency 2169.080 MHz and UL frequency offset -400 MHz, with a configuration file for band 66 at gNB side.
|
||||
|
||||
From the `cmake_targets/ran_build/build` folder:
|
||||
|
||||
gNB on machine 1:
|
||||
|
||||
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf`
|
||||
|
||||
UE on machine 2:
|
||||
|
||||
`sudo ./nr-uesoftmodem -C 2169080000 --CO -400000000`
|
||||
|
||||
|
||||
>>>>>>> fork_develop_new
|
||||
|
||||
As of February 2020, all 5G NR development is part of the develop branch (the branch develop-nr is no longer maintained). This also means that all new development will be merged into there once it passes all the CI.
|
||||
|
||||
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
<style type="text/css" rel="stylesheet">
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
color: #fff;
|
||||
background-color: #110F14;
|
||||
}
|
||||
h2 { margin-left: 20px; }
|
||||
h3 { margin-left: 40px; }
|
||||
h4 { margin-left: 60px; }
|
||||
|
||||
.func2 { margin-left: 20px; }
|
||||
.func3 { margin-left: 40px; }
|
||||
.func4 { margin-left: 60px; }
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
This tuto for 5G gNB design, with Open Cells main
|
||||
{: .text-center}
|
||||
|
||||
# Top file: executables/ocp-gnb.c
|
||||
|
||||
the function main() initializes the data from configuration file
|
||||
|
||||
# The main thread is in ru_thread()
|
||||
The infinite loop:
|
||||
## rx_rf()
|
||||
Collect radio signal samples from RF board
|
||||
all SDR processing is triggered by I/Q sample reception and it's date (timestamp)
|
||||
TX I/Q samples will have a date in the future, compared to RX timestamp
|
||||
called for each 5G NR slot
|
||||
it blocks until data is available
|
||||
the internal time comes from the RF board sampling numbers
|
||||
(each sample has a incremental number representing a very accurate timing)
|
||||
raw incoming data is in buffer called "rxdata"
|
||||
We derivate frame number, slot number, ... from the RX timestamp
|
||||
{: .func2}
|
||||
## nr_fep_full()
|
||||
"front end processing" of uplink signal
|
||||
performs DFT on the signal
|
||||
same function (duplicates): phy_procedures_gNB_common_RX()
|
||||
it computes the buffer rxdataF (for frequency) from rxdata (samples over time)
|
||||
rxdataF is the rxdata in frequency domain, phase aligned
|
||||
{: .func3}
|
||||
## gNB_top()
|
||||
only compute frame numbre, slot number, ...
|
||||
{: .func3}
|
||||
## ocp_rxtx()
|
||||
main processing for both UL and DL
|
||||
start by calling oai_subframe_ind() that trigger processing in pnf_p7_subframe_ind() purpose ???
|
||||
all the context is in the passed structure UL_INFO
|
||||
the context is not very clear: there is a mutex on it,
|
||||
but not actual coherency (see below handle_nr_rach() assumes data is up-to-date)
|
||||
The first part (in NR_UL_indication, uses the data computed by the lower part (phy_procedures_gNB_uespec_RX), but for the **previous** slot
|
||||
Then, phy_procedures_gNB_uespec_RX will hereafter replace the data for the next run
|
||||
This is very tricky and not thread safe at all.
|
||||
{: .func3}
|
||||
|
||||
### NR_UL_indication()
|
||||
This block processes data already decoded and stored in structures behind UL_INFO
|
||||
{: .func4}
|
||||
|
||||
* handle_nr_rach()
|
||||
process data from RACH primary detection
|
||||
if the input is a UE RACH detection
|
||||
{: .func4}
|
||||
* nr_schedule_msg2()
|
||||
{: .func4}
|
||||
* handle_nr_uci()
|
||||
????
|
||||
{: .func4}
|
||||
* handle_nr_ulsch()
|
||||
handles ulsch data prepared by nr_fill_indication()
|
||||
{: .func4}
|
||||
* gNB_dlsch_ulsch_scheduler ()
|
||||
the **scheduler** is called here, see dedicated chapter
|
||||
{: .func4}
|
||||
* NR_Schedule_response()
|
||||
process as per the scheduler decided
|
||||
{: .func4}
|
||||
|
||||
### L1_nr_prach_procedures()
|
||||
????
|
||||
{: .func4}
|
||||
### phy_procedures_gNB_uespec_RX()
|
||||
* nr_decode_pucch0()
|
||||
actual CCH channel decoding form rxdataF (rx data in frequency domain)
|
||||
populates UL_INFO.uci_ind, actual uci data is in gNB->pucch
|
||||
{: .func4}
|
||||
* nr_rx_pusch()
|
||||
{: .func4}
|
||||
* extracts data from rxdataF (frequency transformed received data)
|
||||
{: .func4}
|
||||
* nr_pusch_channel_estimation()
|
||||
{: .func4}
|
||||
* nr_ulsch_extract_rbs_single()
|
||||
{: .func4}
|
||||
* nr_ulsch_scale_channel()
|
||||
{: .func4}
|
||||
* nr_ulsch_channel_level()
|
||||
{: .func4}
|
||||
* nr_ulsch_channel_compensation()
|
||||
{: .func4}
|
||||
* nr_ulsch_compute_llr()
|
||||
this function creates the "likelyhood ratios"
|
||||
{: .func4}
|
||||
* nr_ulsch_procedures()
|
||||
{: .func4}
|
||||
* actual ULsch decoding
|
||||
{: .func4}
|
||||
* nr_ulsch_unscrambling()
|
||||
{: .func4}
|
||||
* nr_ulsch_decoding()
|
||||
{: .func4}
|
||||
* nr_fill_indication()
|
||||
populate the data for the next call to "NR_UL_indication()"
|
||||
it would be better to call **NR_UL_indication()** now instead of before (on previous slot)
|
||||
{: .func4}
|
||||
|
||||
### phy_procedures_gNB_TX()
|
||||
* nr_common_signal_procedures()
|
||||
generate common signals
|
||||
{: .func4}
|
||||
* nr_generate_dci_top()
|
||||
generate DCI: the scheduling informtion for each UE in both DL and UL
|
||||
{: .func4}
|
||||
* nr_generate_pdsch()
|
||||
generate DL shared channel (user data)
|
||||
{: .func4}
|
||||
|
||||
### nr_feptx_prec()
|
||||
tx precoding
|
||||
{: .func3}
|
||||
### nr_feptx0
|
||||
do the inverse DFT
|
||||
{: .func3}
|
||||
### tx_rf()
|
||||
send radio signal samples to the RF board
|
||||
the samples numbers are the future time for these samples emission on-air
|
||||
{: .func3}
|
||||
|
||||
# Scheduler
|
||||
The scheduler is called by the chain: nr_ul_indication()=>gNB_dlsch_ulsch_scheduler()
|
||||
It calls sub functions to process each physical channel (rach, ...)
|
||||
The scheduler uses and internal map of used RB: vrb_map and vrb_map_UL, so each specific channel scheduler can see the already filled RB in each subframe (the function gNB_dlsch_ulsch_scheduler() clears these two arrays when it starts)
|
||||
|
||||
The scheduler also calls "run_pdcp()", as this is not a autonomous thread, it needs to be called here to update traffic requests (DL) and to propagate waiting UL to upper layers
|
||||
After calling run_pdcp, it updates "rlc" time data but it doesn't actually process rlc
|
||||
it sends a iiti message to activate the thread for RRC, the answer will be asynchronous in ????
|
||||
|
||||
Calls schedule_nr_mib() that calls mac_rrc_nr_data_req() to fill MIB,
|
||||
|
||||
Calls each channel allocation: schedule SI, schedule_ul, schedule_dl, ...
|
||||
this is a major entry for "phy-test" mode: in this mode, the allocation is fixed
|
||||
all these channels goes to mac_rrc_nr_data_req() to get the data to transmit
|
||||
|
||||
nr_schedule_ue_spec() is called
|
||||
* calls nr_simple_dlsch_preprocessor()=> mac_rlc_status_ind() mac_rlc_status_ind() locks and checks directly inside rlc data the quantity of waiting data. So, the scheduler can allocate RBs
|
||||
* calls nr_update_pucch_scheduling()
|
||||
* get_pdsch_to_harq_feedback() to schedule retransmission in DL
|
||||
|
||||
Calls nr_fill_nfapi_dl_pdu() to actually populate what should be done by the lower layers to make the Tx subframe
|
||||
|
||||
|
||||
|
||||
# RRC
|
||||
RRC is a regular thread with itti loop on queue: TASK_RRC_GNB
|
||||
it receives it's configuration in message NRRRC_CONFIGURATION_REQ, then real time mesages for all events: S1/NGAP events, X2AP messages and RRC_SUBFRAME_PROCESS
|
||||
|
||||
RRC_SUBFRAME_PROCESS message is send each subframe
|
||||
|
||||
how does it communicate to scheduler ?
|
||||
|
||||
|
||||
# RLC
|
||||
RLC code is new implementation, not using OAI mechanisms: it is implmented directly on pthreads, ignoring OAI common functions.
|
||||
It runs a thread waiting incoming data, but it is mainly running inside calling thread.
|
||||
It is a library, running in thread RRC (except on itti message: F1AP_UL_RRC_MESSAGE for F1).
|
||||
|
||||
# NGAP
|
||||
NGAP would be a itti thread as is S1AP (+twin thread SCTP that is almost void processing)?
|
||||
About all messages are exchanged with RRC thread
|
||||
|
||||
|
||||
# GTP
|
||||
Gtp + UDP are two twin threads performing the data plane interface to the core network
|
||||
The design is hybrid: thread and inside other threads calls. It should at least be protected by a mutex.
|
||||
## GTP thread
|
||||
Gtp thread has a itti interface: queue TASK_GTPV1_U
|
||||
The interface is about full definition: control messages (create/delet GTP tunnels) and data messages (user plane UL and DL).
|
||||
PDCP layer push to the GTP queue (outside UDP thread that do almost nothing and work only with GTP thread) is to push a UL packet.
|
||||
|
||||
|
||||
## GTP thread running code from other layers
|
||||
gtp thread calls directly pdcp_data_req(), so it runs inside it's context internal pdcp structures updates
|
||||
|
||||
## inside other threads
|
||||
gtpv1u_create_s1u_tunnel(), delete tunnel, ... functions are called inside the other threads, without mutex.
|
||||
|
||||
|
||||
<div class="panel panel-info">
|
||||
**Note**
|
||||
{: .panel-heading}
|
||||
<div class="panel-body">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user