diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab
index d5c526acb3..576ae7b055 100644
--- a/ci-scripts/Jenkinsfile-gitlab
+++ b/ci-scripts/Jenkinsfile-gitlab
@@ -30,8 +30,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
}
}
-def doFlexranCtrlTest = false
-
// Location of the executor node
def nodeExecutor = params.nodeExecutor
@@ -66,9 +64,6 @@ pipeline {
echo "Platform is ${env.TESTPLATFORM_OWNER}"
}
- if (params.FlexRanRtcGitLabRepository_Credentials != null) {
- doFlexranCtrlTest = true
- }
if (fileExists("flexran")) {
sh "rm -Rf flexran > /dev/null 2>&1"
}
@@ -141,15 +136,13 @@ pipeline {
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
sh "./ci-scripts/checkCodingFormattingRules.sh"
}
- if (doFlexranCtrlTest && doMandatoryTests) {
+ // With Mosaic 5G being part of OSA and making all it's repositories public
+ // No need to pass credentials to clone flexran-rtc
+ if (doMandatoryTests) {
sh "mkdir flexran"
dir ('flexran') {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.FlexRanRtcGitLabRepository_Credentials}", usernameVariable: 'git_username', passwordVariable: 'git_password']
- ]) {
- sh "git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
- sh "git checkout develop >> ../git_clone.log 2>&1"
- }
+ sh "git clone https://gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
+ sh "git checkout develop >> ../git_clone.log 2>&1"
sh "zip -r -qq flexran.zip ."
}
}
@@ -315,7 +308,7 @@ pipeline {
stages {
stage ("Build Flexran Controller") {
when {
- expression {doFlexranCtrlTest && doMandatoryTests}
+ expression {doMandatoryTests}
}
steps {
lock (vmResource) {
diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
index 66d12eed33..1e4933838b 100644
--- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
+++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
@@ -33,10 +33,9 @@ def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
-// Name of the phone resource
+// Name of the phone/server resource
def ciSmartPhonesResource1 = params.SmartPhonesResource1
def ciSmartPhonesResource2 = params.SmartPhonesResource2
-def ciSmartPhonesResource3 = params.SmartPhonesResource3
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
@@ -53,7 +52,7 @@ pipeline {
options {
disableConcurrentBuilds()
ansiColor('xterm')
- lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource3]], resource: ciSmartPhonesResource1)
+ lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
}
stages {
stage("Build Init") {
@@ -85,9 +84,6 @@ pipeline {
if (params.SmartPhonesResource2 == null) {
allParametersPresent = false
}
- if (params.SmartPhonesResource3== null) {
- allParametersPresent = false
- }
// 1st eNB parameters
if (params.eNB_IPAddress == null) {
allParametersPresent = false
diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa
index b9172225ca..8f623ffb05 100644
--- a/ci-scripts/Jenkinsfile-trig-nsa
+++ b/ci-scripts/Jenkinsfile-trig-nsa
@@ -36,7 +36,7 @@ pipeline {
stage ("Launcher") {
steps {
script {
- //retrieve MR that are opened nd with tag READY_TO_BE_MERGED
+ //retrieve MR that are opened nd with tag NSA
MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true '
echo "List of selected MR:\n${MR_LIST}"
def MR_ARRAY = MR_LIST.split('\n')
@@ -48,7 +48,7 @@ pipeline {
COMMIT_ID=COMMIT_ID.trim()
echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
//calling NSA sub job
- build job: "RAN-CI-NSA-B210-N310-ModuleUE", wait : false, propagate : false, parameters: [
+ build job: "RAN-NSA-Mini-Module", wait : false, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
@@ -56,13 +56,13 @@ pipeline {
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
]
//calling Benetel sub job
- build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [
- string(name: 'eNB_MR', value: String.valueOf(MR)),
- string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
- string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
- string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
- booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
- ]
+ //build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [
+ // string(name: 'eNB_MR', value: String.valueOf(MR)),
+ // string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
+ // string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
+ // string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
+ // booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
+ //]
}
}
}
diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml
index c778b1cad3..67331fdfb2 100644
--- a/ci-scripts/ci_ueinfra.yaml
+++ b/ci-scripts/ci_ueinfra.yaml
@@ -8,7 +8,7 @@ idefix:
WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup
DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
PLMN : 22201
- UENetwork : enxb22a941dbf00
+ UENetwork : wwan0
HostIPAddress : 192.168.18.188
HostUsername : oaicicd
HostPassword : oaicicd
diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index dff0838d49..f32e8b3864 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -150,6 +150,8 @@ class Containerize():
imageNames.append(('oai-nr-ue', 'nrUE'))
if self.host == 'Red Hat':
imageNames.append(('oai-physim', 'phySim'))
+ if self.host == 'Ubuntu':
+ imageNames.append(('oai-lte-ru', 'lteRU'))
if len(imageNames) == 0:
imageNames.append(('oai-enb', 'eNB'))
diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py
index abfa8c1106..f93cb9f036 100644
--- a/ci-scripts/cls_module_ue.py
+++ b/ci-scripts/cls_module_ue.py
@@ -37,7 +37,7 @@ import time
import re
import subprocess
-
+from datetime import datetime
class Module_UE:
@@ -101,7 +101,7 @@ class Module_UE:
def GetModuleIPAddress(self):
HOST=self.HostIPAddress
response= []
- tentative = 10
+ tentative = 3
while (len(response)==0) and (tentative>0):
COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork
logging.debug(COMMAND)
@@ -126,7 +126,37 @@ class Module_UE:
logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
return -1
+ def EnableTrace(self):
+ mySSH = sshconnection.SSHConnection()
+ mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
+ #delete old artifacts
+ mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5)
+ #start Trace
+ mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5)
+ mySSH.close()
+
+ def DisableTrace(self):
+ mySSH = sshconnection.SSHConnection()
+ mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
+ mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal=SIGINT *QLog*', '\$',5)
+ mySSH.close()
+ def DisableCM(self):
+ mySSH = sshconnection.SSHConnection()
+ mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
+ mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal SIGKILL *'+self.Process['Name']+'*', '\$', 5)
+ mySSH.close()
+ def LogCollect(self):
+ mySSH = sshconnection.SSHConnection()
+ mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
+ #archive qlog to /opt/ci_qlogs with datetime suffix
+ now=datetime.now()
+ now_string = now.strftime("%Y%m%d-%H%M")
+ source='ci_qlog'
+ destination='/opt/ci_qlogs/ci_qlog_'+now_string+'.zip'
+ mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10)
+ mySSH.close()
+ return destination
diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 1d6165db23..ef16b025d7 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -388,18 +388,23 @@ class OaiCiTest():
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
is_module=Module_UE.CheckCMProcess()
if is_module:
+ Module_UE.EnableTrace()
+ time.sleep(5)
Module_UE.Command("wup")
+ logging.debug("Waiting for IP address to be assigned")
+ time.sleep(20)
+ logging.debug("Retrieve IP address")
status=Module_UE.GetModuleIPAddress()
if status==0:
HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK)
logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress)
else: #status==-1 failed to retrieve IP address
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
- def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE):
+ def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
@@ -623,7 +628,7 @@ class OaiCiTest():
HTML.htmlUEFailureMsg='nr-uesoftmodem did NOT synced'
HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', CONST.OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE')
logging.error('\033[91mInitialize OAI UE Failed! \033[0m')
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
def checkDevTTYisUnlocked(self):
SSH = sshconnection.SSHConnection()
@@ -701,7 +706,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
self.checkDevTTYisUnlocked()
- def AttachCatM(self,HTML,RAN,COTS_UE,EPC):
+ def AttachCatM(self,HTML,RAN,COTS_UE,EPC,InfraUE):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
@@ -774,9 +779,9 @@ class OaiCiTest():
html_cell = '
CAT-M module Attachment Failed
'
html_queue.put(html_cell)
HTML.CreateHtmlTestRowQueue('N/A', 'KO', 1, html_queue)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
- def PingCatM(self,HTML,RAN,EPC,COTS_UE):
+ def PingCatM(self,HTML,RAN,EPC,COTS_UE,InfraUE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
@@ -785,7 +790,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
try:
statusQueue = SimpleQueue()
@@ -806,7 +811,7 @@ class OaiCiTest():
moduleIPAddr = result.group('ipaddr')
else:
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
ping_time = re.findall("-c (\d+)",str(self.ping_args))
device_id = 'catm'
@@ -870,7 +875,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', 1, statusQueue)
else:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
except:
os.kill(os.getppid(),signal.SIGUSR1)
@@ -962,7 +967,7 @@ class OaiCiTest():
except:
os.kill(os.getppid(),signal.SIGUSR1)
- def AttachUE(self,HTML,RAN,EPC,COTS_UE):
+ def AttachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
HELP.GenericHelp(CONST.Version)
@@ -972,7 +977,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
multi_jobs = []
status_queue = SimpleQueue()
@@ -991,7 +996,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
else:
attach_status = True
@@ -1020,7 +1025,7 @@ class OaiCiTest():
time.sleep(5)
else:
HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
def DetachUE_common(self, device_id, idx,COTS_UE):
try:
@@ -1054,7 +1059,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
multi_jobs = []
cnt = 0
@@ -1079,7 +1084,10 @@ class OaiCiTest():
else:#if an ID is specified, it is a module from the yaml infrastructure file
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
Module_UE.Command("detach")
- HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
+ Module_UE.DisableTrace()
+ Module_UE.DisableCM()
+ archive_destination=Module_UE.LogCollect()
+ HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK)
@@ -1329,7 +1337,7 @@ class OaiCiTest():
except:
os.kill(os.getppid(),signal.SIGUSR1)
- def CheckStatusUE(self,HTML,RAN,EPC,COTS_UE):
+ def CheckStatusUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
@@ -1376,7 +1384,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow(htmlOptions, 'KO', CONST.ALL_PROCESSES_OK)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
else:
check_status = True
html_queue = SimpleQueue()
@@ -1392,7 +1400,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(htmlOptions, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
def GetAllUEIPAddresses(self):
SSH = sshconnection.SSHConnection()
@@ -1612,14 +1620,14 @@ class OaiCiTest():
html_queue.put(html_cell)
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
- def PingNoS1(self,HTML,RAN,EPC,COTS_UE):
+ def PingNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE):
SSH=sshconnection.SSHConnection()
check_eNB = True
check_OAI_UE = True
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args))
if ping_from_eNB is not None:
@@ -1708,7 +1716,7 @@ class OaiCiTest():
def Ping(self,HTML,RAN,EPC,COTS_UE, InfraUE):
result = re.search('noS1', str(RAN.Initialize_eNB_args))
if result is not None:
- self.PingNoS1(HTML,RAN,EPC,COTS_UE)
+ self.PingNoS1(HTML,RAN,EPC,COTS_UE,InfraUE)
return
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
HELP.GenericHelp(CONST.Version)
@@ -1721,7 +1729,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
if self.ue_id=="":
@@ -1729,7 +1737,7 @@ class OaiCiTest():
ueIpStatus = self.GetAllUEIPAddresses()
if (ueIpStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
else:
self.UEIPAddresses=[]
@@ -1756,7 +1764,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
else:
ping_status = True
html_queue = SimpleQueue()
@@ -1773,7 +1781,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
def Iperf_ComputeTime(self):
result = re.search('-t (?P\d+)', str(self.iperf_args))
@@ -2467,7 +2475,7 @@ class OaiCiTest():
except:
os.kill(os.getppid(),signal.SIGUSR1)
- def IperfNoS1(self,HTML,RAN,EPC,COTS_UE):
+ def IperfNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE):
SSH = sshconnection.SSHConnection()
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '':
HELP.GenericHelp(CONST.Version)
@@ -2477,7 +2485,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
server_on_enb = re.search('-R', str(self.iperf_args))
if server_on_enb is not None:
@@ -2576,12 +2584,12 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
def Iperf(self,HTML,RAN,EPC,COTS_UE, InfraUE):
result = re.search('noS1', str(RAN.Initialize_eNB_args))
if result is not None:
- self.IperfNoS1(HTML,RAN,EPC,COTS_UE)
+ self.IperfNoS1(HTML,RAN,EPC,COTS_UE,InfraUE)
return
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '' or self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
HELP.GenericHelp(CONST.Version)
@@ -2594,14 +2602,14 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
if self.ue_id=="":#is not a module, follow legacy code
ueIpStatus = self.GetAllUEIPAddresses()
if (ueIpStatus < 0):
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
return
else: #is a module
self.UEIPAddresses=[]
@@ -2646,7 +2654,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.ALL_PROCESSES_OK)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfaUE)
else:
iperf_status = True
iperf_noperf = False
@@ -2668,7 +2676,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
def CheckProcessExist(self, check_eNB, check_OAI_UE,RAN,EPC):
multi_jobs = []
@@ -3088,7 +3096,7 @@ class OaiCiTest():
job.join()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
- def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC):
+ def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC, InfraUE):
SSH = sshconnection.SSHConnection()
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5)
@@ -3129,11 +3137,11 @@ class OaiCiTest():
# Not an error then
if (logStatus != CONST.OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
self.Initialize_OAI_UE_args = ''
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
else:
if (logStatus == CONST.OAI_UE_PROCESS_COULD_NOT_SYNC):
self.Initialize_OAI_UE_args = ''
- self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+ self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
else:
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
HTML.htmlUEFailureMsg='' + ueAction + ' Completed\n' + HTML.htmlUEFailureMsg
@@ -3142,7 +3150,14 @@ class OaiCiTest():
else:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
- def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC):
+ def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC,InfraUE):
+ if self.ue_id!='':
+ Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+ Module_UE.Command("detach")
+ Module_UE.DisableTrace()
+ Module_UE.DisableCM()
+ archive_destination=Module_UE.LogCollect()
+ HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK)
if (self.ADBIPAddress != 'none'):
self.testCase_id = 'AUTO-KILL-UE'
HTML.testCase_id=self.testCase_id
@@ -3156,7 +3171,7 @@ class OaiCiTest():
self.desc = 'Automatic Termination of OAI-UE'
HTML.desc='Automatic Termination of OAI-UE'
self.ShowTestID()
- self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC)
+ self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
if (RAN.Initialize_eNB_args != ''):
self.testCase_id = 'AUTO-KILL-RAN'
HTML.testCase_id=self.testCase_id
diff --git a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
index 419598647b..7f6bff304d 100644
--- a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
@@ -19,54 +19,54 @@ eNBs =
tracking_area_code = 1;
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
- ////////// Physical parameters:
+ ////////// Physical parameters:
component_carriers = (
{
- node_function = "NGFI_RCC_IF4p5";
- node_timing = "synch_to_ext_device";
- node_synch_ref = 0;
- frame_type = "TDD";
- tdd_config = 1;
- tdd_config_s = 0;
- prefix_type = "NORMAL";
- eutra_band = 40;
- downlink_frequency = 2350000000L;
- uplink_frequency_offset = 0;
- Nid_cell = 0;
- N_RB_DL = 25;
- Nid_cell_mbsfn = 0;
- nb_antenna_ports = 1;
- nb_antennas_tx = 1;
- nb_antennas_rx = 1;
- tx_gain = 90;
- rx_gain = 125;
- prach_root = 0;
- prach_config_index = 0;
- prach_high_speed = "DISABLE";
- prach_zero_correlation = 1;
- prach_freq_offset = 2;
- pucch_delta_shift = 1;
- pucch_nRB_CQI = 1;
- pucch_nCS_AN = 0;
- pucch_n1_AN = 0;
- pdsch_referenceSignalPower =-27;
- pdsch_p_b = 0;
- pusch_n_SB = 1;
- pusch_enable64QAM = "DISABLE";
- pusch_hoppingMode = "interSubFrame";
- pusch_hoppingOffset = 0;
- pusch_groupHoppingEnabled = "ENABLE";
- pusch_groupAssignment = 0;
- pusch_sequenceHoppingEnabled = "DISABLE";
- pusch_nDMRS1 = 1;
- phich_duration = "NORMAL";
- phich_resource = "ONESIXTH";
- srs_enable = "DISABLE";
- /* srs_BandwidthConfig =;
- srs_SubframeConfig =;
- srs_ackNackST =;
- srs_MaxUpPts =;*/
+ node_function = "NGFI_RCC_IF4p5";
+ node_timing = "synch_to_ext_device";
+ node_synch_ref = 0;
+ frame_type = "TDD";
+ tdd_config = 1;
+ tdd_config_s = 0;
+ prefix_type = "NORMAL";
+ eutra_band = 40;
+ downlink_frequency = 2350000000L;
+ uplink_frequency_offset = 0;
+ Nid_cell = 0;
+ N_RB_DL = 25;
+ Nid_cell_mbsfn = 0;
+ nb_antenna_ports = 1;
+ nb_antennas_tx = 1;
+ nb_antennas_rx = 1;
+ tx_gain = 90;
+ rx_gain = 125;
+ prach_root = 0;
+ prach_config_index = 0;
+ prach_high_speed = "DISABLE";
+ prach_zero_correlation = 1;
+ prach_freq_offset = 2;
+ pucch_delta_shift = 1;
+ pucch_nRB_CQI = 1;
+ pucch_nCS_AN = 0;
+ pucch_n1_AN = 0;
+ pdsch_referenceSignalPower =-27;
+ pdsch_p_b = 0;
+ pusch_n_SB = 1;
+ pusch_enable64QAM = "DISABLE";
+ pusch_hoppingMode = "interSubFrame";
+ pusch_hoppingOffset = 0;
+ pusch_groupHoppingEnabled = "ENABLE";
+ pusch_groupAssignment = 0;
+ pusch_sequenceHoppingEnabled = "DISABLE";
+ pusch_nDMRS1 = 1;
+ phich_duration = "NORMAL";
+ phich_resource = "ONESIXTH";
+ srs_enable = "DISABLE";
+ /* srs_BandwidthConfig =;
+ srs_SubframeConfig =;
+ srs_ackNackST =;
+ srs_MaxUpPts =;*/
pusch_p0_Nominal = -96;
pusch_alpha = "AL1";
@@ -76,7 +76,7 @@ eNBs =
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
- pucch_deltaF_Format2b = "deltaF0";
+ pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
@@ -92,17 +92,17 @@ eNBs =
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
- pcch_default_PagingCycle = 128;
- pcch_nB = "oneT";
- bcch_modificationPeriodCoeff = 2;
- ue_TimersAndConstants_t300 = 1000;
- ue_TimersAndConstants_t301 = 1000;
- ue_TimersAndConstants_t310 = 1000;
- ue_TimersAndConstants_t311 = 10000;
- ue_TimersAndConstants_n310 = 20;
- ue_TimersAndConstants_n311 = 1;
+ pcch_default_PagingCycle = 128;
+ pcch_nB = "oneT";
+ bcch_modificationPeriodCoeff = 2;
+ ue_TimersAndConstants_t300 = 1000;
+ ue_TimersAndConstants_t301 = 1000;
+ ue_TimersAndConstants_t310 = 1000;
+ ue_TimersAndConstants_t311 = 10000;
+ ue_TimersAndConstants_n310 = 20;
+ ue_TimersAndConstants_n311 = 1;
- ue_TransmissionMode = 1;
+ ue_TransmissionMode = 1;
}
);
@@ -148,7 +148,7 @@ eNBs =
enable_measurement_reports = "no";
///X2
- enable_x2 = "no";
+ enable_x2 = "no";
t_reloc_prep = 1000; /* unit: millisecond */
tx2_reloc_overall = 2000; /* unit: millisecond */
t_dc_prep = 1000; /* unit: millisecond */
@@ -186,41 +186,41 @@ eNBs =
}
);
MACRLCs = (
- {
- num_cc = 1;
- tr_s_preference = "local_L1";
- tr_n_preference = "local_RRC";
- scheduler_mode = "fairRR";
- puSch10xSnr = 200;
- puCch10xSnr = 200;
- }
+ {
+ num_cc = 1;
+ tr_s_preference = "local_L1";
+ tr_n_preference = "local_RRC";
+ scheduler_mode = "fairRR";
+ puSch10xSnr = 200;
+ puCch10xSnr = 200;
+ }
);
L1s = (
- {
- num_cc = 1;
- tr_n_preference = "local_mac";
- }
+ {
+ num_cc = 1;
+ tr_n_preference = "local_mac";
+ }
);
RUs = (
- {
- local_if_name = "lo";
- remote_address = "127.0.0.2";
- local_address = "127.0.0.1";
- local_portc = 50000;
- remote_portc = 50000;
- local_portd = 50001;
- remote_portd = 50001;
- local_rf = "no"
- tr_preference = "udp_if4p5"
- nb_tx = 1
- nb_rx = 1
- att_tx = 0
- att_rx = 0;
- eNB_instances = [0];
- }
-);
+ {
+ local_if_name = "lo";
+ remote_address = "127.0.0.2";
+ local_address = "127.0.0.1";
+ local_portc = 50000;
+ remote_portc = 50000;
+ local_portd = 50001;
+ remote_portd = 50001;
+ local_rf = "no"
+ tr_preference = "udp_if4p5"
+ nb_tx = 1
+ nb_rx = 1
+ att_tx = 0
+ att_rx = 0;
+ eNB_instances = [0];
+ }
+);
THREAD_STRUCT = (
{
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
index 2c3c11b84f..574c8b2545 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
@@ -25,51 +25,51 @@ eNBs =
component_carriers = (
{
- node_function = "NGFI_RCC_IF4p5";
- node_timing = "synch_to_ext_device";
- node_synch_ref = 0;
- frame_type = "FDD";
- tdd_config = 3;
- tdd_config_s = 0;
- prefix_type = "NORMAL";
- eutra_band = 7;
- downlink_frequency = 2680000000L;
- uplink_frequency_offset = -120000000;
- Nid_cell = 0;
- N_RB_DL = 25;
- Nid_cell_mbsfn = 0;
- nb_antenna_ports = 1;
- nb_antennas_tx = 1;
- nb_antennas_rx = 1;
- tx_gain = 90;
- rx_gain = 125;
- pbch_repetition = "FALSE";
- prach_root = 0;
- prach_config_index = 0;
- prach_high_speed = "DISABLE";
- prach_zero_correlation = 1;
- prach_freq_offset = 2;
- pucch_delta_shift = 1;
- pucch_nRB_CQI = 0;
- pucch_nCS_AN = 0;
- pucch_n1_AN = 0;
- pdsch_referenceSignalPower = -25;
- pdsch_p_b = 0;
- pusch_n_SB = 1;
- pusch_enable64QAM = "DISABLE";
- pusch_hoppingMode = "interSubFrame";
- pusch_hoppingOffset = 0;
- pusch_groupHoppingEnabled = "ENABLE";
- pusch_groupAssignment = 0;
- pusch_sequenceHoppingEnabled = "DISABLE";
- pusch_nDMRS1 = 1;
- phich_duration = "NORMAL";
- phich_resource = "ONESIXTH";
- srs_enable = "DISABLE";
- /* srs_BandwidthConfig =;
- srs_SubframeConfig =;
- srs_ackNackST =;
- srs_MaxUpPts =;*/
+ node_function = "NGFI_RCC_IF4p5";
+ node_timing = "synch_to_ext_device";
+ node_synch_ref = 0;
+ frame_type = "FDD";
+ tdd_config = 3;
+ tdd_config_s = 0;
+ prefix_type = "NORMAL";
+ eutra_band = 7;
+ downlink_frequency = 2680000000L;
+ uplink_frequency_offset = -120000000;
+ Nid_cell = 0;
+ N_RB_DL = 25;
+ Nid_cell_mbsfn = 0;
+ nb_antenna_ports = 1;
+ nb_antennas_tx = 1;
+ nb_antennas_rx = 1;
+ tx_gain = 90;
+ rx_gain = 125;
+ pbch_repetition = "FALSE";
+ prach_root = 0;
+ prach_config_index = 0;
+ prach_high_speed = "DISABLE";
+ prach_zero_correlation = 1;
+ prach_freq_offset = 2;
+ pucch_delta_shift = 1;
+ pucch_nRB_CQI = 0;
+ pucch_nCS_AN = 0;
+ pucch_n1_AN = 0;
+ pdsch_referenceSignalPower = -25;
+ pdsch_p_b = 0;
+ pusch_n_SB = 1;
+ pusch_enable64QAM = "DISABLE";
+ pusch_hoppingMode = "interSubFrame";
+ pusch_hoppingOffset = 0;
+ pusch_groupHoppingEnabled = "ENABLE";
+ pusch_groupAssignment = 0;
+ pusch_sequenceHoppingEnabled = "DISABLE";
+ pusch_nDMRS1 = 1;
+ phich_duration = "NORMAL";
+ phich_resource = "ONESIXTH";
+ srs_enable = "DISABLE";
+ /* srs_BandwidthConfig =;
+ srs_SubframeConfig =;
+ srs_ackNackST =;
+ srs_MaxUpPts =;*/
pusch_p0_Nominal = -96;
pusch_alpha = "AL1";
@@ -79,7 +79,7 @@ eNBs =
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
- pucch_deltaF_Format2b = "deltaF0";
+ pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
@@ -97,25 +97,25 @@ eNBs =
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
- bcch_modificationPeriodCoeff = 2;
- ue_TimersAndConstants_t300 = 1000;
- ue_TimersAndConstants_t301 = 1000;
- ue_TimersAndConstants_t310 = 1000;
- ue_TimersAndConstants_t311 = 10000;
- ue_TimersAndConstants_n310 = 20;
- ue_TimersAndConstants_n311 = 1;
- ue_TransmissionMode = 1;
+ bcch_modificationPeriodCoeff = 2;
+ ue_TimersAndConstants_t300 = 1000;
+ ue_TimersAndConstants_t301 = 1000;
+ ue_TimersAndConstants_t310 = 1000;
+ ue_TimersAndConstants_t311 = 10000;
+ ue_TimersAndConstants_n310 = 20;
+ ue_TimersAndConstants_n311 = 1;
+ ue_TransmissionMode = 1;
//Parameters for SIB18
- rxPool_sc_CP_Len = "normal";
- rxPool_sc_Period = "sf40";
- rxPool_data_CP_Len = "normal";
- rxPool_ResourceConfig_prb_Num = 20;
- rxPool_ResourceConfig_prb_Start = 5;
- rxPool_ResourceConfig_prb_End = 44;
- rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
- rxPool_ResourceConfig_offsetIndicator_choice = 0;
- rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
+ rxPool_sc_CP_Len = "normal";
+ rxPool_sc_Period = "sf40";
+ rxPool_data_CP_Len = "normal";
+ rxPool_ResourceConfig_prb_Num = 20;
+ rxPool_ResourceConfig_prb_Start = 5;
+ rxPool_ResourceConfig_prb_End = 44;
+ rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
+ rxPool_ResourceConfig_offsetIndicator_choice = 0;
+ rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
@@ -185,7 +185,7 @@ eNBs =
enable_measurement_reports = "no";
///X2
- enable_x2 = "no";
+ enable_x2 = "no";
t_reloc_prep = 1000; /* unit: millisecond */
tx2_reloc_overall = 2000; /* unit: millisecond */
t_dc_prep = 1000; /* unit: millisecond */
@@ -205,21 +205,21 @@ eNBs =
);
MACRLCs = (
- {
- num_cc = 1;
- tr_s_preference = "local_L1";
- tr_n_preference = "local_RRC";
- phy_test_mode = 0;
- puSch10xSnr = 160;
- puCch10xSnr = 160;
- }
+ {
+ num_cc = 1;
+ tr_s_preference = "local_L1";
+ tr_n_preference = "local_RRC";
+ phy_test_mode = 0;
+ puSch10xSnr = 160;
+ puCch10xSnr = 160;
+ }
);
L1s = (
- {
- num_cc = 1;
- tr_n_preference = "local_mac";
- }
+ {
+ num_cc = 1;
+ tr_n_preference = "local_mac";
+ }
);
RUs = (
@@ -260,20 +260,20 @@ NETWORK_CONTROLLER :
FLEXRAN_AWAIT_RECONF = "no";
};
- log_config :
- {
- global_log_level ="info";
- global_log_verbosity ="medium";
- hw_log_level ="info";
- hw_log_verbosity ="medium";
- phy_log_level ="info";
- phy_log_verbosity ="medium";
- mac_log_level ="info";
- mac_log_verbosity ="high";
- rlc_log_level ="info";
- rlc_log_verbosity ="medium";
- pdcp_log_level ="info";
- pdcp_log_verbosity ="medium";
- rrc_log_level ="info";
- rrc_log_verbosity ="medium";
- };
+log_config :
+{
+ global_log_level ="info";
+ global_log_verbosity ="medium";
+ hw_log_level ="info";
+ hw_log_verbosity ="medium";
+ phy_log_level ="info";
+ phy_log_verbosity ="medium";
+ mac_log_level ="info";
+ mac_log_verbosity ="high";
+ rlc_log_level ="info";
+ rlc_log_verbosity ="medium";
+ pdcp_log_level ="info";
+ pdcp_log_verbosity ="medium";
+ rrc_log_level ="info";
+ rrc_log_verbosity ="medium";
+};
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 3f5b57e016..cbd323366b 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -152,6 +152,7 @@ def GetParametersFromXML(action):
RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId
elif action == 'Initialize_eNB':
+ RAN.eNB_Trace=test.findtext('eNB_Trace')
RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args')
eNB_instance=test.findtext('eNB_instance')
if (eNB_instance is None):
@@ -474,7 +475,7 @@ elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
signal.signal(signal.SIGUSR1, receive_signal)
- CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC)
+ CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
HELP.GenericHelp(CONST.Version)
@@ -717,7 +718,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Terminate_UE':
CiTestObj.TerminateUE(HTML,COTS_UE)
elif action == 'Attach_UE':
- CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE)
+ CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'Detach_UE':
CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'DataDisable_UE':
@@ -725,23 +726,23 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'DataEnable_UE':
CiTestObj.DataEnableUE(HTML)
elif action == 'CheckStatusUE':
- CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE)
+ CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'Build_OAI_UE':
CiTestObj.BuildOAIUE(HTML)
elif action == 'Initialize_OAI_UE':
- CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE)
+ CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE,InfraUE)
elif action == 'Terminate_OAI_UE':
- CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC)
+ CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
elif action == 'Initialize_CatM_module':
CiTestObj.InitializeCatM(HTML)
elif action == 'Terminate_CatM_module':
CiTestObj.TerminateCatM(HTML)
elif action == 'Attach_CatM_module':
- CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC)
+ CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC,InfraUE)
elif action == 'Detach_CatM_module':
CiTestObj.TerminateCatM(HTML)
elif action == 'Ping_CatM_module':
- CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC)
+ CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC,InfraUE)
elif action == 'Ping':
CiTestObj.Ping(HTML,RAN,EPC,COTS_UE, InfraUE)
elif action == 'Iperf':
diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py
index 83945b3c17..470572f2ff 100644
--- a/ci-scripts/ran.py
+++ b/ci-scripts/ran.py
@@ -93,6 +93,7 @@ class RANManagement():
self.epcPcapFile = ''
self.runtime_stats= ''
self.datalog_rt_stats={}
+ self.eNB_Trace = '' #if 'yes', Tshark will be launched at initialization
@@ -344,6 +345,22 @@ class RANManagement():
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' ' + self.Initialize_eNB_args, 'KO', self.pStatus)
HTML.CreateHtmlTabFooter(False)
sys.exit(1)
+ #Get pcap on S1 and X2 eNB interface, if enabled in the xml
+ #will not work for gNB at this stage
+ if ((self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb')) and self.eNB_Trace=='yes':
+ mySSH.open(lIpAddr, lUserName, lPassWord)
+ mySSH.command('ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"', '\$', 5)
+ result = re.search('interfaceToUse=(?P[a-zA-Z0-9\-\_]+)done', mySSH.getBefore())
+ if result is not None:
+ eth_interface = result.group('eth_interface')
+ logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + '\u001B[0m')
+ pcapfile = 'enb_' + self.testCase_id + '_s1x2log.pcap'
+ mySSH.command('echo ' + lPassWord + ' | sudo -S rm -f /tmp/' + pcapfile , '\$', 5)
+ mySSH.command('echo $USER; nohup sudo -E tshark -i ' + eth_interface + ' -w /tmp/' + pcapfile + ' 2>&1 &','\$', 5)
+ mySSH.close()
+
+
+
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
result = re.search('T_stdout', str(self.Initialize_eNB_args))
if (result is not None):
@@ -579,6 +596,10 @@ class RANManagement():
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true', '\$', 5)
time.sleep(5)
mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
+ #stopping tshark (valid if eNB and enabled in xml, will not harm otherwise)
+ logging.debug('\u001B[1m Stopping tshark \u001B[0m')
+ mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
+ time.sleep(1)
mySSH.close()
# If tracer options is on, stopping tshark on EPC side
result = re.search('T_stdout', str(self.Initialize_eNB_args))
@@ -597,6 +618,7 @@ class RANManagement():
mySSH.close()
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
mySSH.open(lIpAddr, lUserName, lPassWord)
+ mySSH.command('killall --signal SIGKILL record', '\$', 5)
mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5)
enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
raw_record_file = enbLogFile.replace('.log', '_record.raw')
@@ -650,9 +672,10 @@ class RANManagement():
mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5)
+ mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*_s1x2log.pcap .','\$',20)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5)
- mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log', '\$', 60)
- mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt', '\$', 5)
+ mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 60)
+ mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 5)
mySSH.close()
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML):
@@ -707,6 +730,8 @@ class RANManagement():
real_time_stats = {}
#count "problem receiving samples" msg
pb_receiving_samples_cnt = 0
+ #count "removing UE" msg
+ removing_ue = 0
#NSA specific log markers
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
@@ -903,6 +928,10 @@ class RANManagement():
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
if result is not None:
pb_receiving_samples_cnt += 1
+ #count "Removing UE" msg
+ result = re.search('\[MAC\]\s+Removing UE', str(line))
+ if result is not None:
+ removing_ue += 1
#nsa markers logging
for k in nsa_markers:
@@ -992,6 +1021,11 @@ class RANManagement():
htmleNBFailureMsg += statMsg
else:
+ #Removing UE log
+ statMsg = '[MAC] Removing UE msg count = '+str(removing_ue)
+ htmlMsg = statMsg+'\n'
+ logging.debug(statMsg)
+ htmleNBFailureMsg += htmlMsg
#nsa markers
statMsg = 'logfile line count = ' + str(line_cnt)
htmlMsg = statMsg+'\n'
diff --git a/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml b/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml
index 64c3517166..bfaaceaa2d 100644
--- a/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml
+++ b/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml
@@ -32,7 +32,7 @@
Build_eNB
Build eNB (USRP)
- -w USRP -c --eNB
+ -w USRP -c --eNB --ninja
diff --git a/ci-scripts/xml_files/enb_usrp210_band13_build.xml b/ci-scripts/xml_files/enb_usrp210_band13_build.xml
index 888a1230ae..53066573c8 100644
--- a/ci-scripts/xml_files/enb_usrp210_band13_build.xml
+++ b/ci-scripts/xml_files/enb_usrp210_band13_build.xml
@@ -33,7 +33,7 @@
Build_eNB
Build eNB (USRP)
- -w USRP -c --eNB
+ -w USRP -c --eNB --ninja
diff --git a/ci-scripts/xml_files/enb_usrp210_band40_build.xml b/ci-scripts/xml_files/enb_usrp210_band40_build.xml
index 64c3517166..bfaaceaa2d 100644
--- a/ci-scripts/xml_files/enb_usrp210_band40_build.xml
+++ b/ci-scripts/xml_files/enb_usrp210_band40_build.xml
@@ -32,7 +32,7 @@
Build_eNB
Build eNB (USRP)
- -w USRP -c --eNB
+ -w USRP -c --eNB --ninja
diff --git a/ci-scripts/xml_files/enb_usrp210_band7_build.xml b/ci-scripts/xml_files/enb_usrp210_band7_build.xml
index 64c3517166..bfaaceaa2d 100644
--- a/ci-scripts/xml_files/enb_usrp210_band7_build.xml
+++ b/ci-scripts/xml_files/enb_usrp210_band7_build.xml
@@ -32,7 +32,7 @@
Build_eNB
Build eNB (USRP)
- -w USRP -c --eNB
+ -w USRP -c --eNB --ninja
diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml
index 6c2bd6bd26..fbaa32aea7 100644
--- a/ci-scripts/xml_files/fr1_nsa_quectel.xml
+++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml
@@ -24,21 +24,21 @@
TEST-NSA-FR1-TM1
NSA Ping DL UL with QUECTEL
tasks
- 3
+ 1
030000
040000
000002
010000
+ 000001
050000
050001
000001
070000
000001
- 070000
+ 070001
000001
010002
- 000001
080001
080000
@@ -65,13 +65,14 @@
0
0
lte
+ yes
Initialize_eNB
Initialize gNB
- -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf -q
+ -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q
1
1
nr
diff --git a/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml b/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
index ab221c918d..d383dbb61b 100644
--- a/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
+++ b/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
@@ -33,7 +33,7 @@
Build_eNB
Build eNB (USRP -- Ethernet Fronthaul)
- -w USRP -c --eNB
+ -w USRP -c --eNB --ninja
diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml b/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
index ab221c918d..d383dbb61b 100644
--- a/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
+++ b/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
@@ -33,7 +33,7 @@
Build_eNB
Build eNB (USRP -- Ethernet Fronthaul)
- -w USRP -c --eNB
+ -w USRP -c --eNB --ninja
diff --git a/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml b/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml
index c5a912a33d..0ac6bfcc0d 100644
--- a/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml
+++ b/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml
@@ -42,7 +42,7 @@
Build_eNB
Build Slave eNB (USRP)
- -w USRP -c --eNB
+ -w USRP -c --eNB --ninja
1
1
diff --git a/common/utils/system.c b/common/utils/system.c
index 4c6c1a4dc0..bf87bd45c2 100644
--- a/common/utils/system.c
+++ b/common/utils/system.c
@@ -96,6 +96,54 @@ static void read_pipe(int p, char *b, int size) {
}
}
+static int baseRunTimeCommand(char* cmd) {
+ FILE *fp;
+ size_t retSize = 0;
+
+ fp = popen(cmd, "r");
+ if(fp) {
+ memset(cmd, 1, sizeof(*cmd));
+ retSize = fread(cmd, 1, sizeof(*cmd), fp);
+ fclose(fp);
+ } else {
+ LOG_D(HW,"%s:%d:%s: Cannot open %s\n", __FILE__, __LINE__, __FUNCTION__, cmd);
+ }
+
+ if (retSize == 0) {
+ return 0;
+ }
+ return atoi(cmd);
+}
+
+int checkIfFedoraDistribution(void) {
+ char cmd[200];
+
+ memset(cmd, 1, 200);
+ sprintf(cmd, "cat /etc/os-release | grep ID_LIKE | grep -ic fedora || true");
+ return baseRunTimeCommand(cmd);
+}
+
+int checkIfGenericKernelOnFedora(void) {
+ char cmd[200];
+
+ memset(cmd, 1, 200);
+ sprintf(cmd, "uname -a | grep -c rt || true");
+ return (1 - baseRunTimeCommand(cmd));
+}
+
+int checkIfInsideContainer(void) {
+ char cmd[200];
+ int res = 0;
+
+ memset(cmd, 1, 200);
+ sprintf(cmd, "cat /proc/self/cgroup | egrep -c 'libpod|podman|kubepods' || true");
+ res = baseRunTimeCommand(cmd);
+ if (res > 0)
+ return 1;
+ else
+ return 0;
+}
+
/********************************************************************/
/* background process */
/********************************************************************/
@@ -200,29 +248,38 @@ void start_background_system(void) {
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){
pthread_attr_t attr;
int ret;
+ int settingPriority = 1;
ret=pthread_attr_init(&attr);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
ret=pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
- ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI);
- AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
- if(prioritysched_get_priority_max(SCHED_FIFO)) {
- LOG_E(TMR,"Prio not possible: %d, min is %d, max: %d, forced in the range\n",
- priority,
- sched_get_priority_min(SCHED_OAI),
- sched_get_priority_max(SCHED_OAI));
- if(prioritysched_get_priority_max(SCHED_OAI))
- priority=sched_get_priority_max(SCHED_OAI);
+ if (checkIfFedoraDistribution())
+ if (checkIfGenericKernelOnFedora())
+ if (checkIfInsideContainer())
+ settingPriority = 0;
+
+ if (settingPriority) {
+ ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI);
+ AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
+ if(prioritysched_get_priority_max(SCHED_FIFO)) {
+ LOG_E(TMR,"Prio not possible: %d, min is %d, max: %d, forced in the range\n",
+ priority,
+ sched_get_priority_min(SCHED_OAI),
+ sched_get_priority_max(SCHED_OAI));
+ if(prioritysched_get_priority_max(SCHED_OAI))
+ priority=sched_get_priority_max(SCHED_OAI);
+ }
+ AssertFatal(priority<=sched_get_priority_max(SCHED_OAI),"");
+ struct sched_param sparam={0};
+ sparam.sched_priority = priority;
+ ret=pthread_attr_setschedparam(&attr, &sparam);
+ AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
}
- AssertFatal(priority<=sched_get_priority_max(SCHED_OAI),"");
- struct sched_param sparam={0};
- sparam.sched_priority = priority;
- ret=pthread_attr_setschedparam(&attr, &sparam);
- AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
+
ret=pthread_create(t, &attr, func, param);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
diff --git a/common/utils/system.h b/common/utils/system.h
index fbfd338a1a..c76fef9144 100644
--- a/common/utils/system.h
+++ b/common/utils/system.h
@@ -58,6 +58,14 @@ void thread_top_init(char *thread_name,
uint64_t deadline,
uint64_t period);
+/****************************************************
+ * Functions to check system at runtime.
+ ****************************************************/
+
+int checkIfFedoraDistribution(void);
+int checkIfGenericKernelOnFedora(void);
+int checkIfInsideContainer(void);
+
#ifdef __cplusplus
}
#endif
diff --git a/docker/Dockerfile.lteRU.rhel8.2 b/docker/Dockerfile.lteRU.rhel8.2
new file mode 100644
index 0000000000..35078de007
--- /dev/null
+++ b/docker/Dockerfile.lteRU.rhel8.2
@@ -0,0 +1,99 @@
+#/*
+# * 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
+# */
+#---------------------------------------------------------------------
+#
+# Dockerfile for the Open-Air-Interface BUILD service
+# Valid for RHEL8
+#
+#---------------------------------------------------------------------
+
+FROM ran-build:latest AS ru-build
+
+RUN rm -Rf /oai-ran
+WORKDIR /oai-ran
+COPY . .
+
+#run build_oai to build the target image
+RUN /bin/sh oaienv && \
+ cd cmake_targets && \
+ mkdir -p log && \
+ ./build_oai --RU --ninja -w USRP --verbose-ci
+
+RUN yum install -y python3-pip && \
+ pip3 install --ignore-installed pyyaml && \
+ python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
+
+#start from scratch for target executable
+FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru
+ENV TZ=Europe/Paris
+
+RUN yum update -y && \
+ yum install -y --enablerepo="ubi-8-codeready-builder" \
+ tzdata \
+ atlas \
+ net-tools \
+ iputils \
+ iproute && \
+ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
+ echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
+
+WORKDIR /opt/oai-lte-ru/bin
+COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
+COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
+
+WORKDIR /usr/local/lib/
+COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
+COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
+
+# Copying from the ran-build image the USRP needed packages
+COPY --from=ru-build /lib64/libconfig.so.9 /lib64
+COPY --from=ru-build /lib64/libblas.so.3 /lib64
+COPY --from=ru-build /lib64/liblapack.so.3 /lib64
+COPY --from=ru-build /lib64/liblapacke.so.3 /lib64
+COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_program_options.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_serialization.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_thread.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
+COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64
+COPY --from=ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
+
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
+ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
+ /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
+ ldconfig
+
+# Copy the relevant configuration files for RRU
+WORKDIR /opt/oai-lte-ru/etc
+COPY --from=ru-build /oai-ran/docker/etc/rru* ./
+
+WORKDIR /opt/oai-lte-ru
+
+ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
+CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
diff --git a/docker/Dockerfile.lteRU.ubuntu18 b/docker/Dockerfile.lteRU.ubuntu18
new file mode 100644
index 0000000000..381d63d9f3
--- /dev/null
+++ b/docker/Dockerfile.lteRU.ubuntu18
@@ -0,0 +1,94 @@
+#/*
+# * 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
+# */
+#---------------------------------------------------------------------
+#
+# Dockerfile for the Open-Air-Interface BUILD service
+# Valid for Ubuntu 18.04
+#
+#---------------------------------------------------------------------
+
+FROM ran-build:latest AS ru-build
+
+RUN rm -Rf /oai-ran
+WORKDIR /oai-ran
+COPY . .
+
+#run build_oai to build the target image
+RUN /bin/sh oaienv && \
+ cd cmake_targets && \
+ mkdir -p log && \
+ ./build_oai --RU --ninja -w USRP --verbose-ci
+
+RUN apt-get install -y python3-pip && \
+ pip3 install --ignore-installed pyyaml && \
+ python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
+
+#start from scratch for target executable
+FROM ubuntu:bionic as oai-lte-ru
+ENV DEBIAN_FRONTEND=noninteractive
+ENV TZ=Europe/Paris
+
+RUN apt-get update && \
+ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
+ DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+ tzdata \
+ software-properties-common \
+ libblas3 \
+ libatlas3-base \
+ libconfig9 \
+ net-tools \
+ iputils-ping \
+ iproute2 && \
+ # Install UHD driver from ettus ppa
+ # At time of writing, it is 3.14
+ add-apt-repository ppa:ettusresearch/uhd --yes && \
+ apt-get update && \
+ DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+ python \
+ libusb-1.0-0 \
+ libuhd003 \
+ uhd-host && \
+ rm -rf /var/lib/apt/lists/*
+
+WORKDIR /opt/oai-lte-ru/bin
+COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
+COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
+
+WORKDIR /usr/local/lib/
+COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
+COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
+COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
+ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
+ /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
+ ldconfig
+
+# Copy the relevant configuration files for RRU
+WORKDIR /opt/oai-lte-ru/etc
+COPY --from=ru-build /oai-ran/docker/etc/rru* ./
+
+WORKDIR /opt/oai-lte-ru
+
+ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
+CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
diff --git a/docker/scripts/enb_entrypoint.sh b/docker/scripts/enb_entrypoint.sh
index dbe97360f6..6810a86416 100755
--- a/docker/scripts/enb_entrypoint.sh
+++ b/docker/scripts/enb_entrypoint.sh
@@ -11,6 +11,8 @@ if [[ -v USE_FDD_DU ]]; then ln -s $PREFIX/etc/du.fdd.conf $PREFIX/etc/enb.conf;
if [[ -v USE_FDD_MONO ]]; then ln -s $PREFIX/etc/enb.fdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_TDD_MONO ]]; then ln -s $PREFIX/etc/enb.tdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_FDD_FAPI_RCC ]]; then ln -s $PREFIX/etc/rcc.nfapi.fdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_FDD_IF4P5_RCC ]]; then ln -s $PREFIX/etc/rcc.if4p5.fdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_TDD_IF4P5_RCC ]]; then ln -s $PREFIX/etc/rcc.if4p5.tdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/enb.conf; fi
if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/enb.conf; fi
diff --git a/docker/scripts/enb_parameters.yaml b/docker/scripts/enb_parameters.yaml
index d115d177ab..749600f47d 100644
--- a/docker/scripts/enb_parameters.yaml
+++ b/docker/scripts/enb_parameters.yaml
@@ -25,7 +25,7 @@
dest_dir: docker/etc
- configurations:
- - filePrefix: cu
+ - filePrefix: cu.band7.tm1.25PRB
outputfilename: "cu.fdd.conf"
config:
- key: Active_eNBs
@@ -68,7 +68,7 @@
- key: ENB_IPV4_ADDRESS_FOR_X2C
env: "@F1_CU_IP_ADDRESS@"
- - filePrefix: du
+ - filePrefix: du.band7.tm1.25PRB
outputfilename: "du.fdd.conf"
config:
- key: Active_eNBs
@@ -248,3 +248,89 @@
- key: ENB_IPV4_ADDRESS_FOR_X2C
env: "@F1_CU_IP_ADDRESS@"
+ - filePrefix: "rcc.band7.tm1.if4p5.lo.25PRB"
+ outputfilename: "rcc.if4p5.fdd.conf"
+ config:
+ - key: Active_eNBs
+ env: "@ENB_NAME@"
+ - key: eNB_name
+ env: "@ENB_NAME@"
+ - key: plmn_list
+ env:
+ mcc: "@MCC@"
+ mnc: "@MNC@"
+ mnc_length: "@MNC_LENGTH@"
+ - key: tracking_area_code
+ env: "@TAC@"
+ - key: eutra_band
+ env: "@UTRA_BAND_ID@"
+ - key: downlink_frequency
+ env: "@DL_FREQUENCY_IN_MHZ@000000"
+ - key: uplink_frequency_offset
+ env: "@UL_FREQUENCY_OFFSET_IN_MHZ@000000"
+ - key: Nid_cell
+ env: "@NID_CELL@"
+ - key: N_RB_DL
+ env: "@NB_PRB@"
+ - key: ipv4
+ env: "@MME_S1C_IP_ADDRESS@"
+ - key: ENB_INTERFACE_NAME_FOR_S1_MME
+ env: "@RCC_IF_NAME@"
+ - key: ENB_IPV4_ADDRESS_FOR_S1_MME
+ env: "@RCC_S1C_IP_ADDRESS@"
+ - key: ENB_INTERFACE_NAME_FOR_S1U
+ env: "@RCC_IF_NAME@"
+ - key: ENB_IPV4_ADDRESS_FOR_S1U
+ env: "@RCC_IP_ADDRESS@"
+ - key: ENB_IPV4_ADDRESS_FOR_X2C
+ env: "@RCC_IP_ADDRESS@"
+ - key: local_if_name
+ env: "@IF4P5_IF_NAME@"
+ - key: remote_address
+ env: "@IF4P5_RRU_IP_ADDRESS@"
+ - key: local_address
+ env: "@IF4P5_RCC_IP_ADDRESS@"
+
+ - filePrefix: "rcc.band40.tm1.25PRB"
+ outputfilename: "rcc.if4p5.tdd.conf"
+ config:
+ - key: Active_eNBs
+ env: "@ENB_NAME@"
+ - key: eNB_name
+ env: "@ENB_NAME@"
+ - key: plmn_list
+ env:
+ mcc: "@MCC@"
+ mnc: "@MNC@"
+ mnc_length: "@MNC_LENGTH@"
+ - key: tracking_area_code
+ env: "@TAC@"
+ - key: eutra_band
+ env: "@UTRA_BAND_ID@"
+ - key: downlink_frequency
+ env: "@DL_FREQUENCY_IN_MHZ@000000"
+ - key: uplink_frequency_offset
+ env: "@UL_FREQUENCY_OFFSET_IN_MHZ@000000"
+ - key: Nid_cell
+ env: "@NID_CELL@"
+ - key: N_RB_DL
+ env: "@NB_PRB@"
+ - key: ipv4
+ env: "@MME_S1C_IP_ADDRESS@"
+ - key: ENB_INTERFACE_NAME_FOR_S1_MME
+ env: "@RCC_IF_NAME@"
+ - key: ENB_IPV4_ADDRESS_FOR_S1_MME
+ env: "@RCC_S1C_IP_ADDRESS@"
+ - key: ENB_INTERFACE_NAME_FOR_S1U
+ env: "@RCC_IF_NAME@"
+ - key: ENB_IPV4_ADDRESS_FOR_S1U
+ env: "@RCC_IP_ADDRESS@"
+ - key: ENB_IPV4_ADDRESS_FOR_X2C
+ env: "@RCC_IP_ADDRESS@"
+ - key: local_if_name
+ env: "@IF4P5_IF_NAME@"
+ - key: remote_address
+ env: "@IF4P5_RRU_IP_ADDRESS@"
+ - key: local_address
+ env: "@IF4P5_RCC_IP_ADDRESS@"
+
diff --git a/docker/scripts/generateTemplate.py b/docker/scripts/generateTemplate.py
index 418476d395..5ce0d146e5 100644
--- a/docker/scripts/generateTemplate.py
+++ b/docker/scripts/generateTemplate.py
@@ -39,20 +39,24 @@ def main():
for config in data[1]["configurations"]:
filePrefix = config["filePrefix"]
outputfilename = config["outputfilename"]
+ print('================================================')
print('filePrefix = ' + filePrefix)
print('outputfilename = ' + outputfilename)
for inputfile in dir:
if inputfile.find(filePrefix) >=0:
- prefix_outputfile = {"cu": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
- "du": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
+ prefix_outputfile = {"cu.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
+ "du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.fdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
+ "rcc.band7.tm1.if4p5.lo.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
+ "rcc.band40.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
}
+ print('inputfile = ' + inputfile)
if filePrefix in prefix_outputfile:
outputfile1 = prefix_outputfile[filePrefix]
diff --git a/docker/scripts/lte_ru_entrypoint.sh b/docker/scripts/lte_ru_entrypoint.sh
new file mode 100755
index 0000000000..f466e25ec2
--- /dev/null
+++ b/docker/scripts/lte_ru_entrypoint.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+set -euo pipefail
+
+PREFIX=/opt/oai-lte-ru
+
+# Based another env var, pick one template to use
+if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/rru.conf; fi
+if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/rru.conf; fi
+
+# Only this template will be manipulated
+CONFIG_FILES=`ls $PREFIX/etc/rru.conf || true`
+
+for c in ${CONFIG_FILES}; do
+ # grep variable names (format: ${VAR}) from template to be rendered
+ VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
+
+ # create sed expressions for substituting each occurrence of ${VAR}
+ # with the value of the environment variable "VAR"
+ EXPRESSIONS=""
+ for v in ${VARS}; do
+ NEW_VAR=`echo $v | sed -e "s#@##g"`
+ if [[ "${!NEW_VAR}x" == "x" ]]; then
+ echo "Error: Environment variable '${NEW_VAR}' is not set." \
+ "Config file '$(basename $c)' requires all of $VARS."
+ exit 1
+ fi
+ EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
+ done
+ EXPRESSIONS="${EXPRESSIONS#';'}"
+
+ # render template and inline replace config file
+ sed -i "${EXPRESSIONS}" ${c}
+done
+
+# Load the USRP binaries
+if [[ -v USE_B2XX ]]; then
+ /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
+elif [[ -v USE_X3XX ]]; then
+ /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
+elif [[ -v USE_N3XX ]]; then
+ /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
+fi
+
+echo "=================================="
+echo "== Starting eNB soft modem"
+if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
+ echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
+ new_args=()
+ while [[ $# -gt 0 ]]; do
+ new_args+=("$1")
+ shift
+ done
+ for word in ${USE_ADDITIONAL_OPTIONS}; do
+ new_args+=("$word")
+ done
+ echo "${new_args[@]}"
+ exec "${new_args[@]}"
+else
+ echo "$@"
+ exec "$@"
+fi
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index 929aeb672a..632e2d8d30 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -388,6 +388,10 @@ int create_gNB_tasks(uint32_t gnb_nb) {
LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n");
return -1;
}
+ if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
+ LOG_E(GTPU, "Create task for GTPV1U failed\n");
+ return -1;
+ }
}
return 0;
diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index a63829419a..e7dac55e93 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -491,26 +491,26 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
/* Part - II */
/* if payload is empty or only negative SR -> no pucch transmission */
- if(O_ACK == 0) {
- N_UCI = O_SR + O_CSI;
- if ((N_UCI == 0) || ((O_CSI == 0) && (sr_payload == 0))) { /* TS 38.213 9.2.4 UE procedure for reporting SR */
- NR_TST_PHY_PRINTF("PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx);
- LOG_D(PHY,"PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx);
- return (FALSE);
+ if(O_ACK == 0) {
+ N_UCI = O_SR + O_CSI;
+ if ((N_UCI == 0) || ((O_CSI == 0) && (sr_payload == 0))) { /* TS 38.213 9.2.4 UE procedure for reporting SR */
+ NR_TST_PHY_PRINTF("PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx);
+ LOG_D(PHY,"PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx);
+ return (FALSE);
+ }
+ else {
+ /* a resource set and a resource should be find according to payload size */
+ pucch_resource_set = find_pucch_resource_set( mac, gNB_id, N_UCI);
+ if (pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) {
+ pucch_resource_indicator = 0;
+ /* get the first resource of the set */
+ pucch_resource_id = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList->list.array[pucch_resource_set]->resourceList.list.array[pucch_resource_indicator][0];
}
else {
- /* a resource set and a resource should be find according to payload size */
- pucch_resource_set = find_pucch_resource_set( mac, gNB_id, N_UCI);
- if (pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) {
- pucch_resource_indicator = 0;
- /* get the first resource of the set */
- pucch_resource_id = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList->list.array[pucch_resource_set]->resourceList.list.array[pucch_resource_indicator][0]; /* get the first resource of the set */
- }
- else {
- LOG_W(PHY,"PUCCH no resource set found for CSI at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
- O_CSI = 0;
- csi_payload = 0;
- }
+ LOG_W(PHY,"PUCCH no resource set found for CSI at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
+ O_CSI = 0;
+ csi_payload = 0;
+ }
if (O_CSI == 0) {
/* only SR has to be send */
diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c
index 83869f2591..66302d056b 100644
--- a/openair2/GNB_APP/gnb_app.c
+++ b/openair2/GNB_APP/gnb_app.c
@@ -212,8 +212,8 @@ void *gNB_app_task(void *args_p)
}
/* For the CU case the gNB registration with the AMF might have to take place after the F1 setup, as the PLMN info
- * can originate from the DU. */
- if (AMF_MODE_ENABLED && !NODE_IS_DU(RC.nrrrc[0]->node_type) && !NODE_IS_CU(RC.nrrrc[0]->node_type)) {
+ * can originate from the DU. Add check on whether x2ap is enabled to account for ENDC NSA scenario.*/
+ if ((AMF_MODE_ENABLED || is_x2ap_enabled()) && !NODE_IS_DU(RC.nrrrc[0]->node_type) && !NODE_IS_CU(RC.nrrrc[0]->node_type)) {
/* Try to register each gNB */
//registered_gnb = 0;
__attribute__((unused)) uint32_t register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
index ce5065c5cd..0b5d0ad486 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
@@ -78,7 +78,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
}
rx_deliv_sn = entity->rx_deliv & entity->sn_max;
- rx_deliv_hfn = (entity->rx_deliv >> entity->sn_size) & ~entity->sn_max;
+ rx_deliv_hfn = entity->rx_deliv >> entity->sn_size;
if (rcvd_sn < rx_deliv_sn - entity->window_size) {
rcvd_hfn = rx_deliv_hfn + 1;
@@ -138,7 +138,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
entity->rx_deliv = count;
}
- if (entity->t_reordering_start != 0 && entity->rx_deliv > entity->rx_reord) {
+ if (entity->t_reordering_start != 0 && entity->rx_deliv >= entity->rx_reord) {
/* stop and reset t-Reordering */
entity->t_reordering_start = 0;
}
@@ -271,6 +271,10 @@ static void check_t_reordering(nr_pdcp_entity_t *entity)
{
uint32_t count;
+ /* if t_reordering is set to "infinity" (seen as -1) then do nothing */
+ if (entity->t_reordering == -1)
+ return;
+
if (entity->t_reordering_start == 0
|| entity->t_current <= entity->t_reordering_start + entity->t_reordering)
return;
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
index 09cb09f936..fbcc2b96cd 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
@@ -69,8 +69,8 @@ typedef struct nr_pdcp_entity_t {
int has_sdapULheader;
int has_sdapDLheader;
int sn_size; /* SN size, in bits */
- int t_reordering; /* unit: ms */
- int discard_timer; /* unit: ms */
+ int t_reordering; /* unit: ms, -1 for infinity */
+ int discard_timer; /* unit: ms, -1 for infinity */
int sn_max; /* (2^SN_size) - 1 */
int window_size; /* 2^(SN_size - 1) */
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
index 9a467aea47..8c0513fa7a 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
@@ -544,17 +544,17 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
LOG_E(PDCP, "%s:%d:%s: fatal, no SRB found for ue %d\n",
__FILE__, __LINE__, __FUNCTION__, ue->rnti);
exit(1);
-
+
srb_found:
{
- uint8_t *rrc_buffer_p = entity->is_gnb ?
+ uint8_t *rrc_buffer_p = entity->is_gnb ?
itti_malloc(TASK_PDCP_ENB, TASK_RRC_GNB, size):
itti_malloc(TASK_PDCP_UE, TASK_RRC_NRUE, size);
MessageDef *message_p;
AssertFatal(rrc_buffer_p != NULL, "OUT OF MEMORY");
memcpy(rrc_buffer_p, buf, size);
- message_p = entity->is_gnb ?
+ message_p = entity->is_gnb ?
itti_alloc_new_message(TASK_PDCP_ENB, 0, NR_RRC_DCCH_DATA_IND):
itti_alloc_new_message(TASK_PDCP_UE, 0, NR_RRC_DCCH_DATA_IND);
@@ -563,7 +563,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
NR_RRC_DCCH_DATA_IND(message_p).sdu_p = rrc_buffer_p;
NR_RRC_DCCH_DATA_IND(message_p).sdu_size = size;
NR_RRC_DCCH_DATA_IND(message_p).rnti = ue->rnti;
-
+
itti_send_msg_to_task(entity->is_gnb ? TASK_RRC_GNB : TASK_RRC_NRUE, 0, message_p);
}
}
@@ -603,9 +603,9 @@ srb_found:
ctxt.eNB_index = 0;
ctxt.configured = 1;
ctxt.brOption = 0;
-
+
ctxt.rnti = ue->rnti;
-
+
memblock = get_free_mem_block(size, __FUNCTION__);
memcpy(memblock->data, buf, size);
enqueue_rlc_data_req(&ctxt, 1, MBMS_FLAG_NO, srb_id, sdu_id, 0, size, memblock, NULL, NULL);
@@ -743,7 +743,7 @@ static void add_srb(int is_gnb, int rnti, struct NR_SRB_ToAddMod *s)
int t_Reordering=3000;
int srb_id = s->srb_Identity;
- if (s->pdcp_Config == NULL ||
+ if (s->pdcp_Config == NULL ||
s->pdcp_Config->t_Reordering == NULL) t_Reordering = 3000;
else t_Reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
@@ -753,7 +753,7 @@ static void add_srb(int is_gnb, int rnti, struct NR_SRB_ToAddMod *s)
LOG_D(PDCP, "%s:%d:%s: warning SRB %d already exist for ue %d, do nothing\n",
__FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
} else {
- pdcp_srb = new_nr_pdcp_entity(NR_PDCP_SRB, is_gnb, srb_id,
+ pdcp_srb = new_nr_pdcp_entity(NR_PDCP_SRB, is_gnb, srb_id,
0, 0, 0, 0, // sdap parameters
deliver_sdu_srb, ue, deliver_pdu_srb, ue,
12, t_Reordering, -1,
@@ -776,16 +776,22 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
nr_pdcp_ue_t *ue;
int drb_id = s->drb_Identity;
- int t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
int sn_size_ul = decode_sn_size_ul(*s->pdcp_Config->drb->pdcp_SN_SizeUL);
int sn_size_dl = decode_sn_size_dl(*s->pdcp_Config->drb->pdcp_SN_SizeDL);
int discard_timer = decode_discard_timer(*s->pdcp_Config->drb->discardTimer);
- if ((!s->cnAssociation) || s->cnAssociation->present == NR_DRB_ToAddMod__cnAssociation_PR_NOTHING) {
+
+ /* if pdcp_Config->t_Reordering is not present, it means infinity (-1) */
+ int t_reordering = -1;
+ if (s->pdcp_Config->t_Reordering != NULL) {
+ t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
+ }
+
+ if ((!s->cnAssociation) || s->cnAssociation->present == NR_DRB_ToAddMod__cnAssociation_PR_NOTHING) {
LOG_E(PDCP,"%s:%d:%s: fatal, cnAssociation is missing or present is NR_DRB_ToAddMod__cnAssociation_PR_NOTHING\n",__FILE__,__LINE__,__FUNCTION__);
exit(-1);
}
-
- int pdusession_id;
+
+ int pdusession_id;
int has_sdap = 0;
int has_sdapULheader=0;
int has_sdapDLheader=0;
@@ -1019,7 +1025,6 @@ void nr_DRB_preconfiguration(uint16_t crnti)
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, crnti, 0, 0,0);
}
- // FIXME: integrity_algorithm was temporarily set to 0
nr_rrc_pdcp_config_asn1_req(
&ctxt,
(NR_SRB_ToAddModList_t *) NULL,
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
index fc07f661dd..52afe95673 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
@@ -27,12 +27,21 @@
#include
#include
+#ifndef NETTLE_VERSION_MAJOR
+/* hack: include bignum.h, not version.h because version.h does not exist
+ * in old versions and bignum.h includes version.h (as of today).
+ * May completely fail to work... maybe we should skip support of old
+ * versions of nettle.
+ */
+#include
+#endif
+
void *nr_pdcp_security_nea2_init(unsigned char *ciphering_key)
{
void *ctx = calloc(1, nettle_aes128.context_size);
if (ctx == NULL) exit(1);
-#if NETTLE_VERSION_MAJOR < 3
+#if !defined(NETTLE_VERSION_MAJOR) || NETTLE_VERSION_MAJOR < 3
nettle_aes128.set_encrypt_key(ctx, 16, ciphering_key);
#else
nettle_aes128.set_encrypt_key(ctx, ciphering_key);
diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
index 896ea35c46..df820c5f25 100644
--- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
@@ -598,7 +598,7 @@ static void max_retx_reached(void *_ue, nr_rlc_entity_t *entity)
exit(1);
rb_found:
- LOG_D(RLC, "max RETX reached on %s %d\n",
+ LOG_E(RLC, "max RETX reached on %s %d\n",
is_srb ? "SRB" : "DRB",
rb_id);
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 1a1f892c87..231025c741 100755
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -488,32 +488,33 @@ rrc_gNB_generate_RRCSetup(
// configure MAC
rrc_mac_config_req_gNB(rrc->module_id,
- rrc->carrier.ssb_SubcarrierOffset,
- rrc->carrier.pdsch_AntennaPorts,
- rrc->carrier.pusch_AntennaPorts,
- NULL,
- 0,
- ue_context_pP->ue_context.rnti,
- ue_context_pP->ue_context.masterCellGroup
- );
+ rrc->carrier.ssb_SubcarrierOffset,
+ rrc->carrier.pdsch_AntennaPorts,
+ rrc->carrier.pusch_AntennaPorts,
+ NULL,
+ 0,
+ ue_context_pP->ue_context.rnti,
+ get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : (NR_CellGroupConfig_t *)NULL);
+
nr_rrc_rlc_config_asn1_req(ctxt_pP,
- ue_context_pP->ue_context.SRB_configList,
- NULL,
- NULL,
- NULL,
- ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList);
+ ue_context_pP->ue_context.SRB_configList,
+ NULL,
+ NULL,
+ NULL,
+ get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL);
+
nr_rrc_pdcp_config_asn1_req(ctxt_pP,
- ue_context_pP->ue_context.SRB_configList,
- NULL,
- NULL,
- 0xff,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList);
+ ue_context_pP->ue_context.SRB_configList,
+ NULL,
+ NULL,
+ 0xff,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL);
#endif
}
break;
@@ -1267,23 +1268,23 @@ rrc_gNB_process_RRCReconfigurationComplete(
SRB_configList, // NULL,
DRB_configList,
DRB_Release_configList2,
- 0, // already configured during the securitymodecommand
+ 0xff, // already configured during the securitymodecommand
kRRCenc,
kRRCint,
kUPenc,
NULL,
NULL,
NULL,
- ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList);
+ get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL);
/* Refresh SRBs/DRBs */
if (!NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) {
LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti);
nr_rrc_rlc_config_asn1_req(ctxt_pP,
- SRB_configList, // NULL,
- DRB_configList,
- DRB_Release_configList2,
- NULL,
- ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList);
+ SRB_configList, // NULL,
+ DRB_configList,
+ DRB_Release_configList2,
+ NULL,
+ get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL);
}
#endif
@@ -1889,9 +1890,6 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
du_to_cu_rrc_container,
gnb_rrc_inst->carrier.servingcellconfigcommon,
CC_id);
-
- // FIXME: Check the best place to perform this DRB configuration
- nr_DRB_preconfiguration(ctxt_pP->rnti);
}
break;
diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c
index e18895e0bd..3313e9339b 100644
--- a/openair2/RRC/NR/rrc_gNB_nsa.c
+++ b/openair2/RRC/NR/rrc_gNB_nsa.c
@@ -375,22 +375,21 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
ctxt.eNB_index);
}
- nr_rrc_pdcp_config_asn1_req(
- &ctxt,
- ue_context_p->ue_context.rb_config->srb_ToAddModList,
- ue_context_p->ue_context.rb_config->drb_ToAddModList ,
- ue_context_p->ue_context.rb_config->drb_ToReleaseList,
- (ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm,
- NULL, /* kRRCenc - unused */
- NULL, /* kRRCint - unused */
- kUPenc, /* kUPenc */
- NULL, /* kUPint - unused */
- NULL,
- NULL,
- ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList);
+ nr_rrc_pdcp_config_asn1_req(&ctxt,
+ get_softmodem_params()->sa ? ue_context_p->ue_context.rb_config->srb_ToAddModList : (NR_SRB_ToAddModList_t *) NULL,
+ ue_context_p->ue_context.rb_config->drb_ToAddModList ,
+ ue_context_p->ue_context.rb_config->drb_ToReleaseList,
+ (ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm,
+ NULL, /* kRRCenc - unused */
+ NULL, /* kRRCint - unused */
+ kUPenc, /* kUPenc */
+ NULL, /* kUPint - unused */
+ NULL,
+ NULL,
+ ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList);
nr_rrc_rlc_config_asn1_req (&ctxt,
- ue_context_p->ue_context.rb_config->srb_ToAddModList,
+ get_softmodem_params()->sa ? ue_context_p->ue_context.rb_config->srb_ToAddModList : (NR_SRB_ToAddModList_t *) NULL,
ue_context_p->ue_context.rb_config->drb_ToAddModList,
ue_context_p->ue_context.rb_config->drb_ToReleaseList,
(LTE_PMCH_InfoList_r9_t *) NULL,
diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c
index 9727369a2b..fd3e702e0a 100644
--- a/openair2/RRC/NR/rrc_gNB_reconfig.c
+++ b/openair2/RRC/NR/rrc_gNB_reconfig.c
@@ -164,23 +164,25 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup->rlc_BearerToAddModList = calloc(1,sizeof(*secondaryCellGroup->rlc_BearerToAddModList));
ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig);
- NR_RLC_BearerConfig_t *RLC_BearerConfig_srb1 = calloc(1,sizeof(*RLC_BearerConfig_srb1));
- nr_rlc_bearer_init(RLC_BearerConfig_srb1, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity);
- nr_drb_config(RLC_BearerConfig_srb1->rlc_Config, NR_RLC_Config_PR_am);
- nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb1->mac_LogicalChannelConfig);
- // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec()
- *RLC_BearerConfig_srb1->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0;
- ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb1);
+ if (get_softmodem_params()->sa) {
+ NR_RLC_BearerConfig_t *RLC_BearerConfig_srb1 = calloc(1,sizeof(*RLC_BearerConfig_srb1));
+ nr_rlc_bearer_init(RLC_BearerConfig_srb1, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity);
+ nr_drb_config(RLC_BearerConfig_srb1->rlc_Config, NR_RLC_Config_PR_am);
+ nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb1->mac_LogicalChannelConfig);
+ // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec()
+ *RLC_BearerConfig_srb1->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0;
+ ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb1);
- NR_RLC_BearerConfig_t *RLC_BearerConfig_srb2 = calloc(1,sizeof(*RLC_BearerConfig_srb2));
- nr_rlc_bearer_init(RLC_BearerConfig_srb2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity);
- nr_drb_config(RLC_BearerConfig_srb2->rlc_Config, NR_RLC_Config_PR_am);
- nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb2->mac_LogicalChannelConfig);
- // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec()
- *RLC_BearerConfig_srb2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0;
- RLC_BearerConfig_srb2->logicalChannelIdentity = 2;
- RLC_BearerConfig_srb2->servedRadioBearer->choice.srb_Identity = 2;
- ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb2);
+ NR_RLC_BearerConfig_t *RLC_BearerConfig_srb2 = calloc(1,sizeof(*RLC_BearerConfig_srb2));
+ nr_rlc_bearer_init(RLC_BearerConfig_srb2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity);
+ nr_drb_config(RLC_BearerConfig_srb2->rlc_Config, NR_RLC_Config_PR_am);
+ nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb2->mac_LogicalChannelConfig);
+ // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec()
+ *RLC_BearerConfig_srb2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0;
+ RLC_BearerConfig_srb2->logicalChannelIdentity = 2;
+ RLC_BearerConfig_srb2->servedRadioBearer->choice.srb_Identity = 2;
+ ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb2);
+ }
secondaryCellGroup->mac_CellGroupConfig=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig));
secondaryCellGroup->mac_CellGroupConfig->drx_Config = NULL;
@@ -1394,21 +1396,24 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig,
e_NR_CipheringAlgorithm ciphering_algorithm,
e_NR_SecurityConfig__keyToUse key_to_use) {
- rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList));
+ rbconfig->srb_ToAddModList = NULL;
- NR_SRB_ToAddMod_t *srb1_ToAddMod = calloc(1,sizeof(*srb1_ToAddMod));
- srb1_ToAddMod->srb_Identity = 1;
- srb1_ToAddMod->reestablishPDCP = NULL;
- srb1_ToAddMod->discardOnPDCP = NULL;
- srb1_ToAddMod->pdcp_Config = NULL;
- ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb1_ToAddMod);
+ if (get_softmodem_params()->sa) {
+ rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList));
+ NR_SRB_ToAddMod_t *srb1_ToAddMod = calloc(1,sizeof(*srb1_ToAddMod));
+ srb1_ToAddMod->srb_Identity = 1;
+ srb1_ToAddMod->reestablishPDCP = NULL;
+ srb1_ToAddMod->discardOnPDCP = NULL;
+ srb1_ToAddMod->pdcp_Config = NULL;
+ ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb1_ToAddMod);
- NR_SRB_ToAddMod_t *srb2_ToAddMod = calloc(1,sizeof(*srb2_ToAddMod));
- srb2_ToAddMod->srb_Identity = 2;
- srb2_ToAddMod->reestablishPDCP = NULL;
- srb2_ToAddMod->discardOnPDCP = NULL;
- srb2_ToAddMod->pdcp_Config = NULL;
- ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb2_ToAddMod);
+ NR_SRB_ToAddMod_t *srb2_ToAddMod = calloc(1,sizeof(*srb2_ToAddMod));
+ srb2_ToAddMod->srb_Identity = 2;
+ srb2_ToAddMod->reestablishPDCP = NULL;
+ srb2_ToAddMod->discardOnPDCP = NULL;
+ srb2_ToAddMod->pdcp_Config = NULL;
+ ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb2_ToAddMod);
+ }
rbconfig->srb3_ToRelease = NULL;
rbconfig->drb_ToAddModList = calloc(1,sizeof(*rbconfig->drb_ToAddModList));
diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index cc084d18c5..6e6c2533b4 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -32,6 +32,7 @@
#include "lte-softmodem.h"
#include "rt_wrapper.h"
+#include "system.h"
#include "LAYER2/MAC/mac.h"
#include "RRC/LTE/rrc_extern.h"
@@ -230,14 +231,23 @@ void init_thread(int sched_runtime,
}
#else
+ int settingPriority = 1;
- if (CPU_COUNT(cpuset) > 0)
- AssertFatal( 0 == pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), cpuset), "");
+ if (checkIfFedoraDistribution())
+ if (checkIfGenericKernelOnFedora())
+ if (checkIfInsideContainer())
+ settingPriority = 0;
+
+ if (settingPriority) {
+ if (CPU_COUNT(cpuset) > 0)
+ AssertFatal( 0 == pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), cpuset), "");
+
+ struct sched_param sp;
+ sp.sched_priority = sched_fifo;
+ AssertFatal(pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp)==0,
+ "Can't set thread priority, Are you root?\n");
+ }
- struct sched_param sp;
- sp.sched_priority = sched_fifo;
- AssertFatal(pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp)==0,
- "Can't set thread priority, Are you root?\n");
/* Check the actual affinity mask assigned to the thread */
cpu_set_t *cset=CPU_ALLOC(CPU_SETSIZE);
diff --git a/targets/RT/USER/rt_wrapper.c b/targets/RT/USER/rt_wrapper.c
index b051868825..da3a2d3cfe 100644
--- a/targets/RT/USER/rt_wrapper.c
+++ b/targets/RT/USER/rt_wrapper.c
@@ -43,6 +43,7 @@
#include
#include
#include "rt_wrapper.h"
+#include "system.h"
#include
#include
@@ -294,6 +295,7 @@ void thread_top_init(char *thread_name,
struct sched_param sparam;
char cpu_affinity[1024];
cpu_set_t cpuset;
+ int settingPriority = 1;
/* Set affinity mask to include CPUs 2 to MAX_CPUS */
/* CPU 0 is reserved for UHD threads */
@@ -340,30 +342,37 @@ void thread_top_init(char *thread_name,
}
}
- memset(&sparam, 0, sizeof(sparam));
- sparam.sched_priority = sched_get_priority_max(SCHED_FIFO);
- policy = SCHED_FIFO ;
-
- s = pthread_setschedparam(pthread_self(), policy, &sparam);
- if (s != 0) {
- perror("pthread_setschedparam : ");
- exit_fun("Error setting thread priority");
- }
-
- s = pthread_getschedparam(pthread_self(), &policy, &sparam);
- if (s != 0) {
- perror("pthread_getschedparam : ");
- exit_fun("Error getting thread priority");
- }
+ if (checkIfFedoraDistribution())
+ if (checkIfGenericKernelOnFedora())
+ if (checkIfInsideContainer())
+ settingPriority = 0;
- pthread_setname_np(pthread_self(), thread_name);
+ if (settingPriority) {
+ memset(&sparam, 0, sizeof(sparam));
+ sparam.sched_priority = sched_get_priority_max(SCHED_FIFO);
+ policy = SCHED_FIFO;
+
+ s = pthread_setschedparam(pthread_self(), policy, &sparam);
+ if (s != 0) {
+ perror("pthread_setschedparam : ");
+ exit_fun("Error setting thread priority");
+ }
+
+ s = pthread_getschedparam(pthread_self(), &policy, &sparam);
+ if (s != 0) {
+ perror("pthread_getschedparam : ");
+ exit_fun("Error getting thread priority");
+ }
- LOG_I(HW, "[SCHED][eNB] %s started on CPU %d, sched_policy = %s , priority = %d, CPU Affinity=%s \n",thread_name,sched_getcpu(),
- (policy == SCHED_FIFO) ? "SCHED_FIFO" :
- (policy == SCHED_RR) ? "SCHED_RR" :
- (policy == SCHED_OTHER) ? "SCHED_OTHER" :
- "???",
- sparam.sched_priority, cpu_affinity );
+ pthread_setname_np(pthread_self(), thread_name);
+
+ LOG_I(HW, "[SCHED][eNB] %s started on CPU %d, sched_policy = %s , priority = %d, CPU Affinity=%s \n",thread_name,sched_getcpu(),
+ (policy == SCHED_FIFO) ? "SCHED_FIFO" :
+ (policy == SCHED_RR) ? "SCHED_RR" :
+ (policy == SCHED_OTHER) ? "SCHED_OTHER" :
+ "???",
+ sparam.sched_priority, cpu_affinity );
+ }
#endif //LOW_LATENCY