Merge remote-tracking branch 'origin/develop' into Fix_harq_value_scf
This commit is contained in:
@@ -1,3 +1,24 @@
|
|||||||
|
<h1 align="center">
|
||||||
|
<a href="https://openairinterface.org/"><img src="https://openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png" alt="OAI" width="550"></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
|
||||||
|
<a href="https://releases.ubuntu.com/18.04/"><img src="https://img.shields.io/badge/OS-Ubuntu18-Green" alt="Supported OS"></a>
|
||||||
|
<a href="https://www.redhat.com/en/enterprise-linux-8"><img src="https://img.shields.io/badge/OS-RHEL8-Green" alt="Supported OS"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Container-Parent%2F&label=build%20Images"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-enb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-enb?label=eNB%20docker%20pulls"></a>
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-lte-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-lte-ue?label=LTE-UE%20docker%20pulls"></a>
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-gnb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-gnb?label=gNB%20docker%20pulls"></a>
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-nr-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-nr-ue?label=NR-UE%20docker%20pulls"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
# OpenAirInterface License #
|
# OpenAirInterface License #
|
||||||
|
|
||||||
OpenAirInterface is under OpenAirInterface Software Alliance license.
|
OpenAirInterface is under OpenAirInterface Software Alliance license.
|
||||||
|
|||||||
@@ -218,6 +218,26 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage ("NSA B200 Sanity Check") {
|
||||||
|
when { expression {doMandatoryTests} }
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
triggerSlaveJob ('RAN-NSA-B200-Module-LTEBOX-Container', 'Test-NSA-B200')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
finalizeSlaveJob('RAN-NSA-B200-Module-LTEBOX-Container')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Images Push to Registries") {
|
stage ("Images Push to Registries") {
|
||||||
@@ -227,8 +247,14 @@ pipeline {
|
|||||||
triggerSlaveJob ('RAN-DockerHub-Push', 'Push-to-Docker-Hub')
|
triggerSlaveJob ('RAN-DockerHub-Push', 'Push-to-Docker-Hub')
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
echo "Push to Docker-Hub OK"
|
||||||
|
}
|
||||||
|
}
|
||||||
failure {
|
failure {
|
||||||
script {
|
script {
|
||||||
|
echo "Push to Docker-Hub KO"
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -262,6 +288,7 @@ pipeline {
|
|||||||
echo "This is a MERGE event"
|
echo "This is a MERGE event"
|
||||||
addGitLabMRComment comment: message
|
addGitLabMRComment comment: message
|
||||||
}
|
}
|
||||||
|
echo "Pipeline is SUCCESSFUL"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
@@ -271,6 +298,7 @@ pipeline {
|
|||||||
echo "This is a MERGE event"
|
echo "This is a MERGE event"
|
||||||
addGitLabMRComment comment: message
|
addGitLabMRComment comment: message
|
||||||
}
|
}
|
||||||
|
echo "Pipeline FAILED"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,6 +307,11 @@ pipeline {
|
|||||||
// ---- Slave Job functions
|
// ---- Slave Job functions
|
||||||
|
|
||||||
def triggerSlaveJob (jobName, gitlabStatusName) {
|
def triggerSlaveJob (jobName, gitlabStatusName) {
|
||||||
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
|
MR_NUMBER = env.gitlabMergeRequestIid
|
||||||
|
} else {
|
||||||
|
MR_NUMBER = 'develop'
|
||||||
|
}
|
||||||
// Workaround for the "cancelled" GitLab pipeline notification
|
// Workaround for the "cancelled" GitLab pipeline notification
|
||||||
// The slave job is triggered with the propagate false so the following commands are executed
|
// The slave job is triggered with the propagate false so the following commands are executed
|
||||||
// Its status is now PASS/SUCCESS from a stage pipeline point of view
|
// Its status is now PASS/SUCCESS from a stage pipeline point of view
|
||||||
@@ -288,6 +321,7 @@ def triggerSlaveJob (jobName, gitlabStatusName) {
|
|||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
|
string(name: 'eNB_MR', value: String.valueOf(MR_NUMBER)),
|
||||||
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
|
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
|
||||||
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
], propagate: false
|
], propagate: false
|
||||||
@@ -304,6 +338,11 @@ def triggerSlaveJob (jobName, gitlabStatusName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def triggerSlaveJobNoGitLab (jobName) {
|
def triggerSlaveJobNoGitLab (jobName) {
|
||||||
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
|
MR_NUMBER = env.gitlabMergeRequestIid
|
||||||
|
} else {
|
||||||
|
MR_NUMBER = 'develop'
|
||||||
|
}
|
||||||
// Workaround for the "cancelled" GitLab pipeline notification
|
// Workaround for the "cancelled" GitLab pipeline notification
|
||||||
// The slave job is triggered with the propagate false so the following commands are executed
|
// The slave job is triggered with the propagate false so the following commands are executed
|
||||||
// Its status is now PASS/SUCCESS from a stage pipeline point of view
|
// Its status is now PASS/SUCCESS from a stage pipeline point of view
|
||||||
@@ -313,6 +352,7 @@ def triggerSlaveJobNoGitLab (jobName) {
|
|||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
|
string(name: 'eNB_MR', value: String.valueOf(MR_NUMBER)),
|
||||||
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
|
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
|
||||||
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
], propagate: false
|
], propagate: false
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ pipeline {
|
|||||||
eNB_CommitID = params.eNB_CommitID
|
eNB_CommitID = params.eNB_CommitID
|
||||||
}
|
}
|
||||||
echo "eNB_CommitID : ${eNB_CommitID}"
|
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||||
if (params.eNB_AllowMergeRequestProcess!= null) {
|
if (params.eNB_mergeRequest!= null) {
|
||||||
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess
|
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||||
if (eNB_AllowMergeRequestProcess) {
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
if (params.eNB_TargetBranch != null) {
|
if (params.eNB_TargetBranch != null) {
|
||||||
eNB_TargetBranch = params.eNB_TargetBranch
|
eNB_TargetBranch = params.eNB_TargetBranch
|
||||||
|
|||||||
@@ -145,8 +145,8 @@ pipeline {
|
|||||||
// eNB_CommitID = params.eNB_CommitID
|
// eNB_CommitID = params.eNB_CommitID
|
||||||
//}
|
//}
|
||||||
echo "eNB_CommitID : ${eNB_CommitID}"
|
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||||
if (params.eNB_AllowMergeRequestProcess!= null) {
|
if (params.eNB_mergeRequest!= null) {
|
||||||
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess
|
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||||
if (eNB_AllowMergeRequestProcess) {
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
if (params.eNB_TargetBranch != null) {
|
if (params.eNB_TargetBranch != null) {
|
||||||
eNB_TargetBranch = params.eNB_TargetBranch
|
eNB_TargetBranch = params.eNB_TargetBranch
|
||||||
|
|||||||
@@ -51,270 +51,310 @@ def StatusForDb = ""
|
|||||||
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {label pythonExecutor}
|
agent {label pythonExecutor}
|
||||||
options {
|
options {
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
ansiColor('xterm')
|
ansiColor('xterm')
|
||||||
lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
|
lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage("Build Init") {
|
||||||
|
steps {
|
||||||
|
// update the build name and description
|
||||||
|
buildName "${params.eNB_MR}"
|
||||||
|
buildDescription "Branch : ${params.eNB_Branch}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stages {
|
stage ("Verify Parameters") {
|
||||||
stage("Build Init") {
|
steps {
|
||||||
steps {
|
script {
|
||||||
// update the build name and description
|
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||||
buildName "${params.eNB_MR}"
|
def allParametersPresent = true
|
||||||
buildDescription "Branch : ${params.eNB_Branch}"
|
|
||||||
|
// It is already to late to check it
|
||||||
|
if (params.pythonExecutor != null) {
|
||||||
|
echo "eNB CI executor node : ${pythonExecutor}"
|
||||||
|
}
|
||||||
|
// If not present picking a default Stage Name
|
||||||
|
if (params.pipelineTestStageName == null) {
|
||||||
|
// picking default
|
||||||
|
testStageName = 'Template Test Stage'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.SmartPhonesResource1 == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.SmartPhonesResource2 == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// 1st eNB parameters
|
||||||
|
if (params.eNB_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// 2nd eNB parameters
|
||||||
|
if (params.eNB1_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB1_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB1_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// 3rd eNB parameters
|
||||||
|
if (params.eNB2_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB2_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB2_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
|
// if not present, take the job GIT variables (used for developing)
|
||||||
|
if (params.eNB_Repository == null) {
|
||||||
|
eNB_Repository = env.GIT_URL
|
||||||
|
} else {
|
||||||
|
eNB_Repository = params.eNB_Repository
|
||||||
|
}
|
||||||
|
echo "eNB_Repository : ${eNB_Repository}"
|
||||||
|
if (params.eNB_Branch == null) {
|
||||||
|
eNB_Branch = env.GIT_BRANCH
|
||||||
|
} else {
|
||||||
|
eNB_Branch = params.eNB_Branch
|
||||||
|
}
|
||||||
|
echo "eNB_Branch : ${eNB_Branch}"
|
||||||
|
if (params.eNB_CommitID == null) {
|
||||||
|
eNB_CommitID = env.GIT_COMMIT
|
||||||
|
} else {
|
||||||
|
eNB_CommitID = params.eNB_CommitID
|
||||||
|
}
|
||||||
|
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||||
|
if (params.eNB_mergeRequest!= null) {
|
||||||
|
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
if (params.eNB_TargetBranch != null) {
|
||||||
|
eNB_TargetBranch = params.eNB_TargetBranch
|
||||||
|
} else {
|
||||||
|
eNB_TargetBranch = 'develop'
|
||||||
|
}
|
||||||
|
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Verify Parameters") {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
|
||||||
def allParametersPresent = true
|
|
||||||
|
|
||||||
// It is already to late to check it
|
if (params.EPC_IPAddress == null) {
|
||||||
if (params.pythonExecutor != null) {
|
allParametersPresent = false
|
||||||
echo "eNB CI executor node : ${pythonExecutor}"
|
}
|
||||||
}
|
if (params.EPC_Type == null) {
|
||||||
// If not present picking a default Stage Name
|
allParametersPresent = false
|
||||||
if (params.pipelineTestStageName == null) {
|
}
|
||||||
// picking default
|
if (params.EPC_SourceCodePath == null) {
|
||||||
testStageName = 'Template Test Stage'
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
|
if (params.EPC_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
|
||||||
if (params.SmartPhonesResource1 == null) {
|
if (params.ADB_IPAddress == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.SmartPhonesResource2 == null) {
|
if (params.ADB_Credentials == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
// 1st eNB parameters
|
if (params.DataBaseHost == "none") {
|
||||||
if (params.eNB_IPAddress == null) {
|
DataBaseHost = pythonExecutor
|
||||||
allParametersPresent = false
|
}
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// 2nd eNB parameters
|
|
||||||
if (params.eNB1_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// 3rd eNB parameters
|
|
||||||
if (params.eNB2_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB2_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB2_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
|
||||||
// if not present, take the job GIT variables (used for developing)
|
|
||||||
if (params.eNB_Repository == null) {
|
|
||||||
eNB_Repository = env.GIT_URL
|
|
||||||
} else {
|
|
||||||
eNB_Repository = params.eNB_Repository
|
|
||||||
}
|
|
||||||
echo "eNB_Repository : ${eNB_Repository}"
|
|
||||||
if (params.eNB_Branch == null) {
|
|
||||||
eNB_Branch = env.GIT_BRANCH
|
|
||||||
} else {
|
|
||||||
eNB_Branch = params.eNB_Branch
|
|
||||||
}
|
|
||||||
echo "eNB_Branch : ${eNB_Branch}"
|
|
||||||
if (params.eNB_CommitID == null) {
|
|
||||||
eNB_CommitID = env.GIT_COMMIT
|
|
||||||
} else {
|
|
||||||
eNB_CommitID = params.eNB_CommitID
|
|
||||||
}
|
|
||||||
echo "eNB_CommitID : ${eNB_CommitID}"
|
|
||||||
if (params.eNB_AllowMergeRequestProcess!= null) {
|
|
||||||
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess
|
|
||||||
if (eNB_AllowMergeRequestProcess) {
|
|
||||||
if (params.eNB_TargetBranch != null) {
|
|
||||||
eNB_TargetBranch = params.eNB_TargetBranch
|
|
||||||
} else {
|
|
||||||
eNB_TargetBranch = 'develop'
|
|
||||||
}
|
|
||||||
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.EPC_IPAddress == null) {
|
if (allParametersPresent) {
|
||||||
allParametersPresent = false
|
echo "All parameters are present"
|
||||||
}
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
if (params.EPC_Type == null) {
|
sh "git fetch"
|
||||||
allParametersPresent = false
|
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||||
}
|
} else {
|
||||||
if (params.EPC_SourceCodePath == null) {
|
sh "git fetch"
|
||||||
allParametersPresent = false
|
sh "git checkout -f ${eNB_CommitID}"
|
||||||
}
|
|
||||||
if (params.EPC_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.ADB_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.ADB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (allParametersPresent) {
|
|
||||||
echo "All parameters are present"
|
|
||||||
if (eNB_AllowMergeRequestProcess) {
|
|
||||||
sh "git fetch"
|
|
||||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
|
||||||
} else {
|
|
||||||
sh "git fetch"
|
|
||||||
sh "git checkout -f ${eNB_CommitID}"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "Some parameters are missing"
|
|
||||||
sh "./ci-scripts/fail.sh"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
echo "Some parameters are missing"
|
||||||
|
sh "./ci-scripts/fail.sh"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stage ("Build and Test") {
|
}
|
||||||
steps {
|
}
|
||||||
script {
|
stage ("Build and Test") {
|
||||||
dir ('ci-scripts') {
|
steps {
|
||||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
script {
|
||||||
// If not present picking a default XML file
|
dir ('ci-scripts') {
|
||||||
if (params.pythonTestXmlFile == null) {
|
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||||
// picking default
|
// If not present picking a default XML file
|
||||||
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
if (params.pythonTestXmlFile == null) {
|
||||||
echo "Test XML file(default): ${testXMLFile}"
|
// picking default
|
||||||
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
||||||
} else {
|
echo "Test XML file(default): ${testXMLFile}"
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||||
for (xmlFile in myXmlTestSuite) {
|
} else {
|
||||||
if (fileExists(xmlFile)) {
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
for (xmlFile in myXmlTestSuite) {
|
||||||
echo "Test XML file : ${xmlFile}"
|
if (fileExists(xmlFile)) {
|
||||||
}
|
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||||
}
|
echo "Test XML file : ${xmlFile}"
|
||||||
}
|
|
||||||
withCredentials([
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
|
||||||
]) {
|
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
|
||||||
for (xmlFile in myXmlTestSuite) {
|
|
||||||
if (fileExists(xmlFile)) {
|
|
||||||
try {
|
|
||||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
|
||||||
} catch (Exception e) {
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
buildStageStatus = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
withCredentials([
|
||||||
stage('Log Collection') {
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||||
parallel {
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||||
stage('Log Collection (eNB - Build)') {
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
||||||
steps {
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||||
withCredentials([
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
]) {
|
||||||
]) {
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||||
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
|
try {
|
||||||
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"
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||||
}
|
} catch (Exception e) {
|
||||||
script {
|
currentBuild.result = 'FAILURE'
|
||||||
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
buildStageStatus = false
|
||||||
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Log Collection (eNB - Run)') {
|
|
||||||
steps {
|
|
||||||
withCredentials([
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
|
||||||
]) {
|
|
||||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
|
||||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
|
||||||
|
|
||||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
|
||||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
|
||||||
}
|
|
||||||
script {
|
|
||||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
|
||||||
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Log Collection (CN)') {
|
|
||||||
steps {
|
|
||||||
withCredentials([
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
|
||||||
]) {
|
|
||||||
echo '\u2705 \u001B[32mLog Transfer (CN)\u001B[0m'
|
|
||||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/logs/oai-cn5g.log.zip ./oai-cn5g.log.${env.BUILD_ID}.zip || true"
|
|
||||||
}
|
|
||||||
script {
|
|
||||||
if(fileExists("oai-cn5g.log.${env.BUILD_ID}.zip")) {
|
|
||||||
archiveArtifacts "oai-cn5g.log.${env.BUILD_ID}.zip"
|
|
||||||
}
|
|
||||||
if(fileExists("ci-scripts/test_results.html")) {
|
|
||||||
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
|
|
||||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
|
||||||
archiveArtifacts "test_results-${JOB_NAME}.html"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ("SQL Collect"){
|
|
||||||
agent {label DataBaseHost}
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'}
|
|
||||||
sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
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}"
|
||||||
|
|
||||||
post {
|
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
|
||||||
always {
|
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 {
|
script {
|
||||||
if (params.pipelineZipsConsoleLog != null) {
|
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
||||||
if (params.pipelineZipsConsoleLog) {
|
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
||||||
echo "Archiving Jenkins console log"
|
}
|
||||||
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
|
|
||||||
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
|
|
||||||
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
|
|
||||||
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
stage('Log Collection (eNB - Run)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
||||||
|
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (CN)') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||||
|
if (params.EPC_Type != 'OAICN5G') {
|
||||||
|
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (MME or AMF)\u001B[0m'
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||||
|
if (params.EPC_Type == 'OAICN5G') {
|
||||||
|
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./amf.log.${env.BUILD_ID}.zip || true"
|
||||||
|
} else {
|
||||||
|
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (SPGW or SMF/UPF)\u001B[0m'
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||||
|
if (params.EPC_Type == 'OAICN5G') {
|
||||||
|
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./smf-upf.log.${env.BUILD_ID}.zip || true"
|
||||||
|
} else {
|
||||||
|
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
if(fileExists("amf.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "amf.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
if(fileExists("smf-upf.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "smf-upf.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
echo '\u2705 \u001B[32mLog Collection for CoreNetwork Done!\u001B[0m'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("SQL Collect"){
|
||||||
|
when {
|
||||||
|
expression { params.DataBaseHost != "none" }
|
||||||
|
}
|
||||||
|
agent {label DataBaseHost}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'}
|
||||||
|
sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
if(fileExists("ci-scripts/test_results.html")) {
|
||||||
|
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
|
||||||
|
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||||
|
archiveArtifacts "test_results-${JOB_NAME}.html"
|
||||||
|
}
|
||||||
|
if (params.pipelineZipsConsoleLog != null) {
|
||||||
|
if (params.pipelineZipsConsoleLog) {
|
||||||
|
echo "Archiving Jenkins console log"
|
||||||
|
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
|
||||||
|
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
|
||||||
|
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ pipeline {
|
|||||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||||
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
|
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||||
]
|
]
|
||||||
//calling NSA 2x2
|
//calling NSA 2x2
|
||||||
build job: "RAN-NSA-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [
|
build job: "RAN-NSA-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [
|
||||||
@@ -61,7 +61,7 @@ pipeline {
|
|||||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||||
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
|
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||||
]
|
]
|
||||||
//calling LTE 2x2
|
//calling LTE 2x2
|
||||||
build job: "RAN-LTE-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [
|
build job: "RAN-LTE-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [
|
||||||
@@ -69,7 +69,7 @@ pipeline {
|
|||||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||||
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
|
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||||
]
|
]
|
||||||
//calling SA
|
//calling SA
|
||||||
build job: "RAN-SA-Module-CN5G", wait : true, propagate : false, parameters: [
|
build job: "RAN-SA-Module-CN5G", wait : true, propagate : false, parameters: [
|
||||||
@@ -77,7 +77,7 @@ pipeline {
|
|||||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||||
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
|
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+227
-54
@@ -101,10 +101,43 @@ class Containerize():
|
|||||||
self.cliContName = ''
|
self.cliContName = ''
|
||||||
self.cliOptions = ''
|
self.cliOptions = ''
|
||||||
|
|
||||||
|
self.imageToCopy = ''
|
||||||
|
self.registrySvrId = ''
|
||||||
|
self.testSvrId = ''
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# Container management functions
|
# Container management functions
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
|
|
||||||
|
def _createWorkspace(self, sshSession, password, sourcePath):
|
||||||
|
# on RedHat/CentOS .git extension is mandatory
|
||||||
|
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||||
|
if result is not None:
|
||||||
|
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||||
|
else:
|
||||||
|
full_ran_repo_name = self.ranRepository + '.git'
|
||||||
|
sshSession.command('mkdir -p ' + sourcePath, '\$', 5)
|
||||||
|
sshSession.command('cd ' + sourcePath, '\$', 5)
|
||||||
|
sshSession.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
||||||
|
# Raphael: here add a check if git clone or git fetch went smoothly
|
||||||
|
sshSession.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||||
|
sshSession.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||||
|
|
||||||
|
sshSession.command('echo ' + password + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||||
|
sshSession.command('mkdir -p cmake_targets/log', '\$', 5)
|
||||||
|
# if the commit ID is provided use it to point to it
|
||||||
|
if self.ranCommitID != '':
|
||||||
|
sshSession.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||||
|
# if the branch is not develop, then it is a merge request and we need to do
|
||||||
|
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||||
|
if (self.ranAllowMerge):
|
||||||
|
if self.ranTargetBranch == '':
|
||||||
|
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
||||||
|
sshSession.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
|
||||||
|
else:
|
||||||
|
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||||
|
sshSession.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
||||||
|
|
||||||
def BuildImage(self, HTML):
|
def BuildImage(self, HTML):
|
||||||
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -173,36 +206,7 @@ class Containerize():
|
|||||||
|
|
||||||
self.testCase_id = HTML.testCase_id
|
self.testCase_id = HTML.testCase_id
|
||||||
|
|
||||||
# on RedHat/CentOS .git extension is mandatory
|
self._createWorkspace(mySSH, lPassWord, lSourcePath)
|
||||||
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
|
||||||
if result is not None:
|
|
||||||
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
|
||||||
else:
|
|
||||||
full_ran_repo_name = self.ranRepository + '.git'
|
|
||||||
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
|
||||||
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
|
||||||
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
|
||||||
# Raphael: here add a check if git clone or git fetch went smoothly
|
|
||||||
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
|
||||||
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
|
||||||
|
|
||||||
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
|
||||||
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
|
||||||
# if the commit ID is provided use it to point to it
|
|
||||||
if self.ranCommitID != '':
|
|
||||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
|
||||||
# if the branch is not develop, then it is a merge request and we need to do
|
|
||||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
|
||||||
imageTag = 'develop'
|
|
||||||
sharedTag = 'develop'
|
|
||||||
if (self.ranAllowMerge):
|
|
||||||
imageTag = 'ci-temp'
|
|
||||||
if self.ranTargetBranch == '':
|
|
||||||
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
|
||||||
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
|
|
||||||
else:
|
|
||||||
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
|
||||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
|
||||||
|
|
||||||
# if asterix, copy the entitlement and subscription manager configurations
|
# if asterix, copy the entitlement and subscription manager configurations
|
||||||
if self.host == 'Red Hat':
|
if self.host == 'Red Hat':
|
||||||
@@ -212,15 +216,28 @@ class Containerize():
|
|||||||
mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5)
|
mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5)
|
||||||
|
|
||||||
sharedimage = 'ran-build'
|
sharedimage = 'ran-build'
|
||||||
|
sharedTag = 'develop'
|
||||||
|
forceSharedImageBuild = False
|
||||||
|
imageTag = 'develop'
|
||||||
|
if (self.ranAllowMerge):
|
||||||
|
imageTag = 'ci-temp'
|
||||||
|
if self.ranTargetBranch == 'develop':
|
||||||
|
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.ran' + self.dockerfileprefix + ' | grep --colour=never -i INDEX', '\$', 5)
|
||||||
|
result = re.search('index', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
forceSharedImageBuild = True
|
||||||
|
sharedTag = 'ci-temp'
|
||||||
|
|
||||||
# Let's remove any previous run artifacts if still there
|
# Let's remove any previous run artifacts if still there
|
||||||
mySSH.command(self.cli + ' image prune --force', '\$', 30)
|
mySSH.command(self.cli + ' image prune --force', '\$', 30)
|
||||||
if (not self.ranAllowMerge):
|
if forceSharedImageBuild:
|
||||||
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag, '\$', 30)
|
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag + ' || true', '\$', 30)
|
||||||
for image,pattern in imageNames:
|
for image,pattern in imageNames:
|
||||||
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag, '\$', 30)
|
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30)
|
||||||
|
|
||||||
# Build the shared image only on Push Events (not on Merge Requests)
|
# Build the shared image only on Push Events (not on Merge Requests)
|
||||||
if (not self.ranAllowMerge):
|
# On when the shared image docker file is being modified.
|
||||||
|
if forceSharedImageBuild:
|
||||||
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
|
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
|
||||||
# First verify if the shared image was properly created.
|
# First verify if the shared image was properly created.
|
||||||
status = True
|
status = True
|
||||||
@@ -388,6 +405,56 @@ class Containerize():
|
|||||||
HTML.CreateHtmlTabFooter(False)
|
HTML.CreateHtmlTabFooter(False)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
def Copy_Image_to_Test_Server(self, HTML):
|
||||||
|
imageTag = 'develop'
|
||||||
|
if (self.ranAllowMerge):
|
||||||
|
imageTag = 'ci-temp'
|
||||||
|
|
||||||
|
lSsh = SSH.SSHConnection()
|
||||||
|
# Going to the Docker Registry server
|
||||||
|
if self.registrySvrId == '0':
|
||||||
|
lIpAddr = self.eNBIPAddress
|
||||||
|
lUserName = self.eNBUserName
|
||||||
|
lPassWord = self.eNBPassword
|
||||||
|
elif self.registrySvrId == '1':
|
||||||
|
lIpAddr = self.eNB1IPAddress
|
||||||
|
lUserName = self.eNB1UserName
|
||||||
|
lPassWord = self.eNB1Password
|
||||||
|
elif self.registrySvrId == '2':
|
||||||
|
lIpAddr = self.eNB2IPAddress
|
||||||
|
lUserName = self.eNB2UserName
|
||||||
|
lPassWord = self.eNB2Password
|
||||||
|
lSsh.open(lIpAddr, lUserName, lPassWord)
|
||||||
|
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||||
|
lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
|
||||||
|
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||||
|
lSsh.close()
|
||||||
|
|
||||||
|
# Going to the Test Server
|
||||||
|
if self.testSvrId == '0':
|
||||||
|
lIpAddr = self.eNBIPAddress
|
||||||
|
lUserName = self.eNBUserName
|
||||||
|
lPassWord = self.eNBPassword
|
||||||
|
elif self.testSvrId == '1':
|
||||||
|
lIpAddr = self.eNB1IPAddress
|
||||||
|
lUserName = self.eNB1UserName
|
||||||
|
lPassWord = self.eNB1Password
|
||||||
|
elif self.testSvrId == '2':
|
||||||
|
lIpAddr = self.eNB2IPAddress
|
||||||
|
lUserName = self.eNB2UserName
|
||||||
|
lPassWord = self.eNB2Password
|
||||||
|
lSsh.open(lIpAddr, lUserName, lPassWord)
|
||||||
|
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
|
||||||
|
lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
|
||||||
|
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||||
|
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||||
|
lSsh.close()
|
||||||
|
|
||||||
|
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
|
||||||
|
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
|
||||||
|
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
|
||||||
def DeployObject(self, HTML, EPC):
|
def DeployObject(self, HTML, EPC):
|
||||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
if self.eNB_serverId[self.eNB_instance] == '0':
|
||||||
lIpAddr = self.eNBIPAddress
|
lIpAddr = self.eNBIPAddress
|
||||||
@@ -408,35 +475,33 @@ class Containerize():
|
|||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
|
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
|
||||||
|
|
||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||||
# Putting the CPUs in a good state, we do that only on a few servers
|
|
||||||
mySSH.command('hostname', '\$', 5)
|
|
||||||
result = re.search('obelix|asterix', mySSH.getBefore())
|
|
||||||
if result is not None:
|
|
||||||
mySSH.command('if command -v cpupower &> /dev/null; then echo ' + lPassWord + ' | sudo -S cpupower idle-set -D 0; fi', '\$', 5)
|
|
||||||
time.sleep(5)
|
|
||||||
|
|
||||||
|
self._createWorkspace(mySSH, lPassWord, lSourcePath)
|
||||||
|
|
||||||
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
|
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
|
||||||
mySSH.command('cp docker-compose.yml ci-docker-compose.yml', '\$', 5)
|
mySSH.command('cp docker-compose.yml ci-docker-compose.yml', '\$', 5)
|
||||||
imageTag = 'develop'
|
imageTag = 'develop'
|
||||||
if (self.ranAllowMerge):
|
if (self.ranAllowMerge):
|
||||||
imageTag = 'ci-temp'
|
imageTag = 'ci-temp'
|
||||||
mySSH.command('sed -i -e "s/image: oai-enb:latest/image: oai-enb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2)
|
mySSH.command('sed -i -e "s/image: oai-enb:latest/image: oai-enb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2)
|
||||||
|
mySSH.command('sed -i -e "s/image: oai-gnb:latest/image: oai-gnb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2)
|
||||||
localMmeIpAddr = EPC.MmeIPAddress
|
localMmeIpAddr = EPC.MmeIPAddress
|
||||||
mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2)
|
mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2)
|
||||||
if self.flexranCtrlDeployed:
|
# if self.flexranCtrlDeployed:
|
||||||
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED:.*/FLEXRAN_ENABLED: "yes"/\' ci-docker-compose.yml', '\$', 2)
|
# mySSH.command('sed -i -e "s/FLEXRAN_ENABLED:.*/FLEXRAN_ENABLED: \'yes\'/" ci-docker-compose.yml', '\$', 2)
|
||||||
mySSH.command('sed -i -e "s/CI_FLEXRAN_CTL_IP_ADDR/' + self.flexranCtrlIpAddress + '/" ci-docker-compose.yml', '\$', 2)
|
# mySSH.command('sed -i -e "s/CI_FLEXRAN_CTL_IP_ADDR/' + self.flexranCtrlIpAddress + '/" ci-docker-compose.yml', '\$', 2)
|
||||||
else:
|
# else:
|
||||||
mySSH.command('sed -i -e "s/FLEXRAN_ENABLED:.*$/FLEXRAN_ENABLED: \"no\"/" ci-docker-compose.yml', '\$', 2)
|
# mySSH.command('sed -i -e "s/FLEXRAN_ENABLED:.*$/FLEXRAN_ENABLED: \'no\'/" ci-docker-compose.yml', '\$', 2)
|
||||||
mySSH.command('sed -i -e "s/CI_FLEXRAN_CTL_IP_ADDR/127.0.0.1/" ci-docker-compose.yml', '\$', 2)
|
# mySSH.command('sed -i -e "s/CI_FLEXRAN_CTL_IP_ADDR/127.0.0.1/" ci-docker-compose.yml', '\$', 2)
|
||||||
# Currently support only one
|
# Currently support only one
|
||||||
mySSH.command('docker-compose --file ci-docker-compose.yml config --services | sed -e "s@^@service=@"', '\$', 2)
|
mySSH.command('docker-compose --file ci-docker-compose.yml config --services | sed -e "s@^@service=@" 2>&1', '\$', 10)
|
||||||
result = re.search('service=(?P<svc_name>[a-zA-Z0-9\_]+)', mySSH.getBefore())
|
result = re.search('service=(?P<svc_name>[a-zA-Z0-9\_]+)', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
svcName = result.group('svc_name')
|
svcName = result.group('svc_name')
|
||||||
mySSH.command('docker-compose --file ci-docker-compose.yml up -d ' + svcName, '\$', 2)
|
mySSH.command('docker-compose --file ci-docker-compose.yml up -d ' + svcName, '\$', 10)
|
||||||
|
|
||||||
# Checking Status
|
# Checking Status
|
||||||
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
|
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
|
||||||
@@ -450,7 +515,7 @@ class Containerize():
|
|||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
cnt = 0
|
cnt = 0
|
||||||
while (cnt < 3):
|
while (cnt < 3):
|
||||||
mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + containerName, '\$', 5)
|
mySSH.command('docker inspect --format="{{.State.Health.Status}}" ' + containerName, '\$', 5)
|
||||||
unhealthyNb = mySSH.getBefore().count('unhealthy')
|
unhealthyNb = mySSH.getBefore().count('unhealthy')
|
||||||
healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb
|
healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb
|
||||||
startingNb = mySSH.getBefore().count('starting')
|
startingNb = mySSH.getBefore().count('starting')
|
||||||
@@ -519,12 +584,9 @@ class Containerize():
|
|||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
|
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
|
||||||
mySSH.command('docker rm -f ' + containerName, '\$', 30)
|
mySSH.command('docker rm -f ' + containerName, '\$', 30)
|
||||||
|
# Forcing the down now to remove the networks and any artifacts
|
||||||
|
mySSH.command('docker-compose --file ci-docker-compose.yml down', '\$', 5)
|
||||||
|
|
||||||
# Putting the CPUs back in a idle state, we do that only on a few servers
|
|
||||||
mySSH.command('hostname', '\$', 5)
|
|
||||||
result = re.search('obelix|asterix', mySSH.getBefore())
|
|
||||||
if result is not None:
|
|
||||||
mySSH.command('if command -v cpupower &> /dev/null; then echo ' + lPassWord + ' | sudo -S cpupower idle-set -E; fi', '\$', 5)
|
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
|
|
||||||
# Analyzing log file!
|
# Analyzing log file!
|
||||||
@@ -832,3 +894,114 @@ class Containerize():
|
|||||||
else:
|
else:
|
||||||
self.exitStatus = 1
|
self.exitStatus = 1
|
||||||
HTML.CreateHtmlTestRowQueue(self.cliOptions, 'KO', 1, html_queue)
|
HTML.CreateHtmlTestRowQueue(self.cliOptions, 'KO', 1, html_queue)
|
||||||
|
|
||||||
|
def CheckAndAddRoute(self, svrName, ipAddr, userName, password):
|
||||||
|
logging.debug('Checking IP routing on ' + svrName)
|
||||||
|
mySSH = SSH.SSHConnection()
|
||||||
|
if svrName == 'porcepix':
|
||||||
|
mySSH.open(ipAddr, userName, password)
|
||||||
|
# Check if route to asterix gnb exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.68.64/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.194', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.64/26 via 192.168.18.194 dev eno1', '\$', 10)
|
||||||
|
# Check if route to obelix enb exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.193', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 192.168.18.193 dev eno1', '\$', 10)
|
||||||
|
# Check if route to nepes gnb exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.209', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 192.168.18.209 dev eno1', '\$', 10)
|
||||||
|
# Check if forwarding is enabled
|
||||||
|
mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10)
|
||||||
|
result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S sysctl net.ipv4.conf.all.forwarding=1', '\$', 10)
|
||||||
|
# Check if iptables forwarding is accepted
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -L', '\$', 10)
|
||||||
|
result = re.search('Chain FORWARD .*policy ACCEPT', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10)
|
||||||
|
mySSH.close()
|
||||||
|
if svrName == 'asterix':
|
||||||
|
mySSH.open(ipAddr, userName, password)
|
||||||
|
# Check if route to porcepix epc exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.210', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 192.168.18.210 dev em1', '\$', 10)
|
||||||
|
# Check if route to porcepix cn5g exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.70.128/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.210', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.70.128/26 via 192.168.18.210 dev em1', '\$', 10)
|
||||||
|
# Check if X2 route to obelix enb exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.193', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 192.168.18.193 dev em1', '\$', 10)
|
||||||
|
# Check if forwarding is enabled
|
||||||
|
mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10)
|
||||||
|
result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S sysctl net.ipv4.conf.all.forwarding=1', '\$', 10)
|
||||||
|
# Check if iptables forwarding is accepted
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -L', '\$', 10)
|
||||||
|
result = re.search('Chain FORWARD .*policy ACCEPT', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10)
|
||||||
|
mySSH.close()
|
||||||
|
if svrName == 'obelix':
|
||||||
|
mySSH.open(ipAddr, userName, password)
|
||||||
|
# Check if route to porcepix epc exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.210', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 192.168.18.210 dev eno1', '\$', 10)
|
||||||
|
# Check if X2 route to asterix gnb exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.68.64/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.194', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.64/26 via 192.168.18.194 dev eno1', '\$', 10)
|
||||||
|
# Check if X2 route to nepes gnb exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.209', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 192.168.18.209 dev eno1', '\$', 10)
|
||||||
|
# Check if forwarding is enabled
|
||||||
|
mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10)
|
||||||
|
result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S sysctl net.ipv4.conf.all.forwarding=1', '\$', 10)
|
||||||
|
# Check if iptables forwarding is accepted
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -L', '\$', 10)
|
||||||
|
result = re.search('Chain FORWARD .*policy ACCEPT', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10)
|
||||||
|
mySSH.close()
|
||||||
|
if svrName == 'nepes':
|
||||||
|
mySSH.open(ipAddr, userName, password)
|
||||||
|
# Check if route to porcepix epc exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.210', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 192.168.18.210 dev enp0s31f6', '\$', 10)
|
||||||
|
# Check if X2 route to obelix enb exists
|
||||||
|
mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10)
|
||||||
|
result = re.search('192.168.18.193', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 192.168.18.193 dev enp0s31f6', '\$', 10)
|
||||||
|
# Check if forwarding is enabled
|
||||||
|
mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10)
|
||||||
|
result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S sysctl net.ipv4.conf.all.forwarding=1', '\$', 10)
|
||||||
|
# Check if iptables forwarding is accepted
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -L', '\$', 10)
|
||||||
|
result = re.search('Chain FORWARD .*policy ACCEPT', mySSH.getBefore())
|
||||||
|
if result is None:
|
||||||
|
mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10)
|
||||||
|
mySSH.close()
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class Module_UE:
|
|||||||
#if not it will be started
|
#if not it will be started
|
||||||
def CheckCMProcess(self,CNType):
|
def CheckCMProcess(self,CNType):
|
||||||
HOST=self.HostUsername+'@'+self.HostIPAddress
|
HOST=self.HostUsername+'@'+self.HostIPAddress
|
||||||
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
|
COMMAND="ps aux | grep --colour=never " + self.Process['Name'] + " | grep -v grep "
|
||||||
logging.debug(COMMAND)
|
logging.debug(COMMAND)
|
||||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||||
result = ssh.stdout.readlines()
|
result = ssh.stdout.readlines()
|
||||||
@@ -81,7 +81,7 @@ class Module_UE:
|
|||||||
#checking the process
|
#checking the process
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
HOST=self.HostUsername+'@'+self.HostIPAddress
|
HOST=self.HostUsername+'@'+self.HostIPAddress
|
||||||
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
|
COMMAND="ps aux | grep --colour=never " + self.Process['Name'] + " | grep -v grep "
|
||||||
logging.debug(COMMAND)
|
logging.debug(COMMAND)
|
||||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||||
result = ssh.stdout.readlines()
|
result = ssh.stdout.readlines()
|
||||||
@@ -108,7 +108,7 @@ class Module_UE:
|
|||||||
response= []
|
response= []
|
||||||
tentative = 3
|
tentative = 3
|
||||||
while (len(response)==0) and (tentative>0):
|
while (len(response)==0) and (tentative>0):
|
||||||
COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork
|
COMMAND="ip a show dev " + self.UENetwork + " | grep --colour=never inet | grep " + self.UENetwork
|
||||||
logging.debug(COMMAND)
|
logging.debug(COMMAND)
|
||||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||||
response = ssh.stdout.readlines()
|
response = ssh.stdout.readlines()
|
||||||
@@ -136,7 +136,7 @@ class Module_UE:
|
|||||||
response= []
|
response= []
|
||||||
tentative = 3
|
tentative = 3
|
||||||
while (len(response)==0) and (tentative>0):
|
while (len(response)==0) and (tentative>0):
|
||||||
COMMAND="ip a show dev " + self.UENetwork + " | grep mtu"
|
COMMAND="ip a show dev " + self.UENetwork + " | grep --colour=never mtu"
|
||||||
logging.debug(COMMAND)
|
logging.debug(COMMAND)
|
||||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||||
response = ssh.stdout.readlines()
|
response = ssh.stdout.readlines()
|
||||||
|
|||||||
+10
-10
@@ -192,16 +192,16 @@ class OaiCiTest():
|
|||||||
result = re.search('LAST_BUILD_INFO', SSH.getBefore())
|
result = re.search('LAST_BUILD_INFO', SSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
mismatch = False
|
mismatch = False
|
||||||
SSH.command('grep SRC_COMMIT LAST_BUILD_INFO.txt', '\$', 2)
|
SSH.command('grep --colour=never SRC_COMMIT LAST_BUILD_INFO.txt', '\$', 2)
|
||||||
result = re.search(self.ranCommitID, SSH.getBefore())
|
result = re.search(self.ranCommitID, SSH.getBefore())
|
||||||
if result is None:
|
if result is None:
|
||||||
mismatch = True
|
mismatch = True
|
||||||
SSH.command('grep MERGED_W_TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
SSH.command('grep --colour=never MERGED_W_TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
||||||
if self.ranAllowMerge:
|
if self.ranAllowMerge:
|
||||||
result = re.search('YES', SSH.getBefore())
|
result = re.search('YES', SSH.getBefore())
|
||||||
if result is None:
|
if result is None:
|
||||||
mismatch = True
|
mismatch = True
|
||||||
SSH.command('grep TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
SSH.command('grep --colour=never TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
||||||
if self.ranTargetBranch == '':
|
if self.ranTargetBranch == '':
|
||||||
result = re.search('develop', SSH.getBefore())
|
result = re.search('develop', SSH.getBefore())
|
||||||
else:
|
else:
|
||||||
@@ -451,13 +451,13 @@ class OaiCiTest():
|
|||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
# b2xx_fx3_utils reset procedure
|
# b2xx_fx3_utils reset procedure
|
||||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90)
|
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 180)
|
||||||
result = re.search('type: b200', SSH.getBefore())
|
result = re.search('type: b200', SSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
logging.debug('Found a B2xx device --> resetting it')
|
logging.debug('Found a B2xx device --> resetting it')
|
||||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
||||||
# Reloading FGPA bin firmware
|
# Reloading FGPA bin firmware
|
||||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90)
|
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 180)
|
||||||
result = re.search('type: n3xx', str(SSH.getBefore()))
|
result = re.search('type: n3xx', str(SSH.getBefore()))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
logging.debug('Found a N3xx device --> resetting it')
|
logging.debug('Found a N3xx device --> resetting it')
|
||||||
@@ -660,7 +660,7 @@ class OaiCiTest():
|
|||||||
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
||||||
count = 0
|
count = 0
|
||||||
while count < 5:
|
while count < 5:
|
||||||
SSH.command('echo ' + self.ADBPassword + ' | sudo -S lsof | grep ttyUSB0', '\$', 10)
|
SSH.command('echo ' + self.ADBPassword + ' | sudo -S lsof | grep --colour=never ttyUSB0', '\$', 10)
|
||||||
result = re.search('picocom', SSH.getBefore())
|
result = re.search('picocom', SSH.getBefore())
|
||||||
if result is None:
|
if result is None:
|
||||||
count = 10
|
count = 10
|
||||||
@@ -1328,7 +1328,7 @@ class OaiCiTest():
|
|||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
||||||
if self.ADBCentralized:
|
if self.ADBCentralized:
|
||||||
SSH.command('lsusb | egrep "Future Technology Devices International, Ltd FT2232C" | sed -e "s#:.*##" -e "s# #_#g"', '\$', 15)
|
SSH.command('lsusb | egrep --colour=never "Future Technology Devices International, Ltd FT2232C" | sed -e "s#:.*##" -e "s# #_#g"', '\$', 15)
|
||||||
#self.CatMDevices = re.findall("\\\\r\\\\n([A-Za-z0-9_]+)",SSH.getBefore())
|
#self.CatMDevices = re.findall("\\\\r\\\\n([A-Za-z0-9_]+)",SSH.getBefore())
|
||||||
self.CatMDevices = re.findall("\\\\r\\\\n([A-Za-z0-9_]+)",SSH.getBefore())
|
self.CatMDevices = re.findall("\\\\r\\\\n([A-Za-z0-9_]+)",SSH.getBefore())
|
||||||
else:
|
else:
|
||||||
@@ -1583,7 +1583,7 @@ class OaiCiTest():
|
|||||||
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
|
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
|
||||||
Target = EPC.MmeIPAddress
|
Target = EPC.MmeIPAddress
|
||||||
elif re.match('OAICN5G', EPC.Type, re.IGNORECASE):
|
elif re.match('OAICN5G', EPC.Type, re.IGNORECASE):
|
||||||
Target = '8.8.8.8'
|
Target = EPC.MmeIPAddress
|
||||||
else:
|
else:
|
||||||
Target = EPC.IPAddress
|
Target = EPC.IPAddress
|
||||||
#ping from module NIC rather than IP address to make sure round trip is over the air
|
#ping from module NIC rather than IP address to make sure round trip is over the air
|
||||||
@@ -2325,7 +2325,7 @@ class OaiCiTest():
|
|||||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"', '\$', 5)
|
SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"', '\$', 5)
|
||||||
iperf_cmd = 'echo $USER; nohup bin/iperf -s -u 2>&1 > ' + server_filename
|
iperf_cmd = 'echo $USER; nohup bin/iperf -s -u 2>&1 > ' + server_filename
|
||||||
cmd = 'docker exec -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
cmd = 'docker exec -d prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||||
SSH.command(cmd,'\$',5)
|
SSH.command(cmd,'\$',5)
|
||||||
SSH.close()
|
SSH.close()
|
||||||
|
|
||||||
@@ -3601,7 +3601,7 @@ class OaiCiTest():
|
|||||||
UhdVersion = result.group('uhd_version')
|
UhdVersion = result.group('uhd_version')
|
||||||
logging.debug('UHD Version is: ' + UhdVersion)
|
logging.debug('UHD Version is: ' + UhdVersion)
|
||||||
HTML.UhdVersion[idx]=UhdVersion
|
HTML.UhdVersion[idx]=UhdVersion
|
||||||
SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 90)
|
SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 180)
|
||||||
usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore())
|
usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore())
|
||||||
count = 0
|
count = 0
|
||||||
for board in usrp_boards:
|
for board in usrp_boards:
|
||||||
|
|||||||
+11
-11
@@ -140,7 +140,7 @@ class PhySim:
|
|||||||
logging.debug('oai-physim size is unknown')
|
logging.debug('oai-physim size is unknown')
|
||||||
|
|
||||||
# logging to OC Cluster and then switch to corresponding project
|
# logging to OC Cluster and then switch to corresponding project
|
||||||
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 6)
|
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 30)
|
||||||
if mySSH.getBefore().count('Login successful.') == 0:
|
if mySSH.getBefore().count('Login successful.') == 0:
|
||||||
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
|
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
@@ -149,7 +149,7 @@ class PhySim:
|
|||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m')
|
logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m')
|
||||||
mySSH.command(f'oc project {ocProjectName}', '\$', 6)
|
mySSH.command(f'oc project {ocProjectName}', '\$', 30)
|
||||||
if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0:
|
if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0:
|
||||||
logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m')
|
logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
@@ -160,7 +160,7 @@ class PhySim:
|
|||||||
logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m')
|
logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m')
|
||||||
|
|
||||||
# Tag the image and push to the OC cluster
|
# Tag the image and push to the OC cluster
|
||||||
mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/ --tls-verify=false', '\$', 6)
|
mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/ --tls-verify=false', '\$', 30)
|
||||||
if mySSH.getBefore().count('Login Succeeded!') == 0:
|
if mySSH.getBefore().count('Login Succeeded!') == 0:
|
||||||
logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m')
|
logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
@@ -170,7 +170,7 @@ class PhySim:
|
|||||||
else:
|
else:
|
||||||
logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m')
|
logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
mySSH.command('oc create -f openshift/oai-physim-image-stream.yml', '\$', 6)
|
mySSH.command('oc create -f openshift/oai-physim-image-stream.yml', '\$', 30)
|
||||||
if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0:
|
if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0:
|
||||||
logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m')
|
logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
@@ -180,9 +180,9 @@ class PhySim:
|
|||||||
else:
|
else:
|
||||||
logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m')
|
logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
|
mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 30)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag} --tls-verify=false', '\$', 30)
|
mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag} --tls-verify=false', '\$', 180)
|
||||||
if mySSH.getBefore().count('Storing signatures') == 0:
|
if mySSH.getBefore().count('Storing signatures') == 0:
|
||||||
logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
|
logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
@@ -195,18 +195,18 @@ class PhySim:
|
|||||||
# Using helm charts deployment
|
# Using helm charts deployment
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6)
|
mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6)
|
||||||
mySSH.command('helm install physim ./charts/physims/ | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
|
mySSH.command('helm install physim ./charts/physims/ | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30)
|
||||||
if mySSH.getBefore().count('STATUS: deployed') == 0:
|
if mySSH.getBefore().count('STATUS: deployed') == 0:
|
||||||
logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
|
logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
|
||||||
mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
|
mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30)
|
||||||
isFinished1 = False
|
isFinished1 = False
|
||||||
while(isFinished1 == False):
|
while(isFinished1 == False):
|
||||||
time.sleep(20)
|
time.sleep(20)
|
||||||
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True)
|
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True)
|
||||||
if re.search('No resources found', mySSH.getBefore()):
|
if re.search('No resources found', mySSH.getBefore()):
|
||||||
isFinished1 = True
|
isFinished1 = True
|
||||||
mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
|
mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 30)
|
||||||
mySSH.command('oc delete is oai-physim', '\$', 6)
|
mySSH.command('oc delete is oai-physim', '\$', 30)
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
self.AnalyzeLogFile_phySim(HTML)
|
self.AnalyzeLogFile_phySim(HTML)
|
||||||
RAN.prematureExit = True
|
RAN.prematureExit = True
|
||||||
@@ -217,7 +217,7 @@ class PhySim:
|
|||||||
count = 0
|
count = 0
|
||||||
while(count < 2 and isRunning == False):
|
while(count < 2 and isRunning == False):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
mySSH.command('oc get pods -o wide -l app.kubernetes.io/instance=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6, resync=True)
|
mySSH.command('oc get pods -o wide -l app.kubernetes.io/instance=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 30, resync=True)
|
||||||
if mySSH.getBefore().count('Running') == 12:
|
if mySSH.getBefore().count('Running') == 12:
|
||||||
logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
|
logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
|
||||||
isRunning = True
|
isRunning = True
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ MACRLCs = (
|
|||||||
tr_n_preference = "local_RRC";
|
tr_n_preference = "local_RRC";
|
||||||
# pusch_TargetSNRx10 = 200;
|
# pusch_TargetSNRx10 = 200;
|
||||||
# pucch_TargetSNRx10 = 150;
|
# pucch_TargetSNRx10 = 150;
|
||||||
ulsch_max_slots_inactivity=20;
|
ulsch_max_frame_inactivity = 1;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+112
-26
@@ -53,7 +53,7 @@ import constants as CONST
|
|||||||
class EPCManagement():
|
class EPCManagement():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
self.IPAddress = ''
|
self.IPAddress = ''
|
||||||
self.UserName = ''
|
self.UserName = ''
|
||||||
self.Password = ''
|
self.Password = ''
|
||||||
@@ -62,7 +62,6 @@ class EPCManagement():
|
|||||||
self.PcapFileName = ''
|
self.PcapFileName = ''
|
||||||
self.testCase_id = ''
|
self.testCase_id = ''
|
||||||
self.MmeIPAddress = ''
|
self.MmeIPAddress = ''
|
||||||
self.AmfIPAddress = ''
|
|
||||||
self.containerPrefix = 'prod'
|
self.containerPrefix = 'prod'
|
||||||
self.mmeConfFile = 'mme.conf'
|
self.mmeConfFile = 'mme.conf'
|
||||||
self.yamlPath = ''
|
self.yamlPath = ''
|
||||||
@@ -228,6 +227,7 @@ class EPCManagement():
|
|||||||
sys.exit('Insufficient EPC Parameters')
|
sys.exit('Insufficient EPC Parameters')
|
||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||||
|
html_cell = '<pre style="background-color:white">\n'
|
||||||
if re.match('ltebox', self.Type, re.IGNORECASE):
|
if re.match('ltebox', self.Type, re.IGNORECASE):
|
||||||
logging.debug('Using the SABOX simulated HSS')
|
logging.debug('Using the SABOX simulated HSS')
|
||||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||||
@@ -238,16 +238,48 @@ class EPCManagement():
|
|||||||
logging.debug('Using the sabox')
|
logging.debug('Using the sabox')
|
||||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_sabox', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_sabox', '\$', 5)
|
||||||
|
html_cell += 'N/A\n'
|
||||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||||
logging.debug('Starting OAI CN5G')
|
logging.debug('Starting OAI CN5G')
|
||||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||||
mySSH.command('cd /opt/oai-cn5g-fed/docker-compose', '\$', 5)
|
mySSH.command('cd /opt/oai-cn5g-fed/docker-compose', '\$', 5)
|
||||||
mySSH.command('./core-network.sh start nrf spgwu', '\$', 60)
|
mySSH.command('./core-network.sh start nrf spgwu', '\$', 60)
|
||||||
|
time.sleep(2)
|
||||||
|
mySSH.command('docker-compose -p 5gcn ps -a', '\$', 60)
|
||||||
|
if mySSH.getBefore().count('Up (healthy)') != 6:
|
||||||
|
logging.error('Not all container healthy')
|
||||||
|
else:
|
||||||
|
logging.debug('OK')
|
||||||
|
mySSH.command('docker-compose config | grep --colour=never image', '\$', 10)
|
||||||
|
listOfImages = mySSH.getBefore()
|
||||||
|
for imageLine in listOfImages.split('\\r\\n'):
|
||||||
|
res1 = re.search('image: (?P<name>[a-zA-Z0-9\-]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine))
|
||||||
|
res2 = re.search('mysql', str(imageLine))
|
||||||
|
if res1 is not None and res2 is None:
|
||||||
|
html_cell += res1.group('name') + ':' + res1.group('tag') + ' '
|
||||||
|
nbChars = len(res1.group('name')) + len(res1.group('tag')) + 2
|
||||||
|
while (nbChars < 32):
|
||||||
|
html_cell += ' '
|
||||||
|
nbChars += 1
|
||||||
|
mySSH.command('docker image inspect --format="Size = {{.Size}} bytes" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||||
|
res3 = re.search('Size *= *(?P<size>[0-9\-]*) *bytes', mySSH.getBefore())
|
||||||
|
if res3 is not None:
|
||||||
|
imageSize = int(res3.group('size'))
|
||||||
|
imageSize = int(imageSize/(1024*1024))
|
||||||
|
html_cell += str(imageSize) + ' MBytes '
|
||||||
|
mySSH.command('docker image inspect --format="Date = {{.Created}}" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||||
|
res4 = re.search('Date *= *(?P<date>[0-9\-]*)T', mySSH.getBefore())
|
||||||
|
if res4 is not None:
|
||||||
|
html_cell += '(' + res4.group('date') + ')'
|
||||||
|
html_cell += '\n'
|
||||||
else:
|
else:
|
||||||
logging.error('This option should not occur!')
|
logging.error('This option should not occur!')
|
||||||
|
html_cell += '</pre>'
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
html_queue = SimpleQueue()
|
||||||
|
html_queue.put(html_cell)
|
||||||
|
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', 1, html_queue)
|
||||||
|
|
||||||
def SetAmfIPAddress(self):
|
def SetAmfIPAddress(self):
|
||||||
# Not an error if we don't need an 5GCN
|
# Not an error if we don't need an 5GCN
|
||||||
@@ -371,7 +403,7 @@ class EPCManagement():
|
|||||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT oai_hss || true', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT oai_hss || true', '\$', 5)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
mySSH.command('stdbuf -o0 ps -aux | grep hss | grep -v grep', '\$', 5)
|
mySSH.command('stdbuf -o0 ps -aux | grep --colour=never hss | grep -v grep', '\$', 5)
|
||||||
result = re.search('oai_hss -j', mySSH.getBefore())
|
result = re.search('oai_hss -j', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL oai_hss || true', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL oai_hss || true', '\$', 5)
|
||||||
@@ -379,7 +411,7 @@ class EPCManagement():
|
|||||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_hss oai_hss || true', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_hss oai_hss || true', '\$', 5)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
mySSH.command('stdbuf -o0 ps -aux | grep hss | grep -v grep', '\$', 5)
|
mySSH.command('stdbuf -o0 ps -aux | grep --colour=never hss | grep -v grep', '\$', 5)
|
||||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_hss oai_hss || true', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_hss oai_hss || true', '\$', 5)
|
||||||
@@ -465,6 +497,7 @@ class EPCManagement():
|
|||||||
def Terminate5GCN(self, HTML):
|
def Terminate5GCN(self, HTML):
|
||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||||
|
message = ''
|
||||||
if re.match('ltebox', self.Type, re.IGNORECASE):
|
if re.match('ltebox', self.Type, re.IGNORECASE):
|
||||||
logging.debug('Terminating SA BOX')
|
logging.debug('Terminating SA BOX')
|
||||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||||
@@ -475,15 +508,31 @@ class EPCManagement():
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_5g_hss -X quit', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_5g_hss -X quit', '\$', 5)
|
||||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||||
self.LogCollectOAICN5G()
|
logging.debug('OAI CN5G Collecting Log files to workspace')
|
||||||
|
mySSH.command('echo ' + self.Password + ' | sudo rm -rf ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||||
|
mySSH.command('mkdir ' + self.SourceCodePath + '/logs','\$', 5)
|
||||||
|
containers_list=['oai-smf','oai-spgwu','oai-amf','oai-nrf']
|
||||||
|
for c in containers_list:
|
||||||
|
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
|
||||||
|
|
||||||
logging.debug('Terminating OAI CN5G')
|
logging.debug('Terminating OAI CN5G')
|
||||||
mySSH.command('cd /opt/oai-cn5g-fed/docker-compose', '\$', 5)
|
mySSH.command('cd /opt/oai-cn5g-fed/docker-compose', '\$', 5)
|
||||||
mySSH.command('docker-compose down', '\$', 5)
|
|
||||||
mySSH.command('./core-network.sh stop nrf spgwu', '\$', 60)
|
mySSH.command('./core-network.sh stop nrf spgwu', '\$', 60)
|
||||||
|
time.sleep(2)
|
||||||
|
mySSH.command('tshark -r /tmp/oai-cn5g.pcap | egrep --colour=never "Tracking area update" ','\$', 30)
|
||||||
|
result = re.search('Tracking area update request', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
|
||||||
|
else:
|
||||||
|
message = 'No Tracking area update request'
|
||||||
|
logging.debug(message)
|
||||||
else:
|
else:
|
||||||
logging.error('This should not happen!')
|
logging.error('This should not happen!')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
html_queue = SimpleQueue()
|
||||||
|
html_cell = '<pre style="background-color:white">' + message + '</pre>'
|
||||||
|
html_queue.put(html_cell)
|
||||||
|
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', 1, html_queue)
|
||||||
|
|
||||||
def DeployEpc(self, HTML):
|
def DeployEpc(self, HTML):
|
||||||
logging.debug('Trying to deploy')
|
logging.debug('Trying to deploy')
|
||||||
@@ -529,6 +578,10 @@ class EPCManagement():
|
|||||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme_fd.sprint.conf', self.SourceCodePath + '/scripts')
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme_fd.sprint.conf', self.SourceCodePath + '/scripts')
|
||||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/redis_extern.conf', self.SourceCodePath + '/scripts')
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/redis_extern.conf', self.SourceCodePath + '/scripts')
|
||||||
mySSH.command('chmod a+x ' + self.SourceCodePath + '/scripts/entrypoint.sh', '\$', 5)
|
mySSH.command('chmod a+x ' + self.SourceCodePath + '/scripts/entrypoint.sh', '\$', 5)
|
||||||
|
else:
|
||||||
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/entrypoint.sh', self.SourceCodePath + '/scripts')
|
||||||
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme.conf', self.SourceCodePath + '/scripts')
|
||||||
|
mySSH.command('chmod 775 entrypoint.sh', '\$', 60)
|
||||||
mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
|
mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
|
||||||
mySSH.command('docker-compose down', '\$', 60)
|
mySSH.command('docker-compose down', '\$', 60)
|
||||||
mySSH.command('docker-compose up -d db_init', '\$', 60)
|
mySSH.command('docker-compose up -d db_init', '\$', 60)
|
||||||
@@ -572,6 +625,30 @@ class EPCManagement():
|
|||||||
listOfContainers += ' prod-trf-gen'
|
listOfContainers += ' prod-trf-gen'
|
||||||
expectedHealthyContainers += 1
|
expectedHealthyContainers += 1
|
||||||
|
|
||||||
|
mySSH.command('docker-compose config | grep --colour=never image', '\$', 10)
|
||||||
|
html_cell = '<pre style="background-color:white">\n'
|
||||||
|
listOfImages = mySSH.getBefore()
|
||||||
|
for imageLine in listOfImages.split('\\r\\n'):
|
||||||
|
res1 = re.search('image: (?P<name>[a-zA-Z0-9\-]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine))
|
||||||
|
res2 = re.search('cassandra|redis', str(imageLine))
|
||||||
|
if res1 is not None and res2 is None:
|
||||||
|
html_cell += res1.group('name') + ':' + res1.group('tag') + ' '
|
||||||
|
nbChars = len(res1.group('name')) + len(res1.group('tag')) + 2
|
||||||
|
while (nbChars < 32):
|
||||||
|
html_cell += ' '
|
||||||
|
nbChars += 1
|
||||||
|
mySSH.command('docker image inspect --format="Size = {{.Size}} bytes" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||||
|
res3 = re.search('Size *= *(?P<size>[0-9\-]*) *bytes', mySSH.getBefore())
|
||||||
|
if res3 is not None:
|
||||||
|
imageSize = int(res3.group('size'))
|
||||||
|
imageSize = int(imageSize/(1024*1024))
|
||||||
|
html_cell += str(imageSize) + ' MBytes '
|
||||||
|
mySSH.command('docker image inspect --format="Date = {{.Created}}" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||||
|
res4 = re.search('Date *= *(?P<date>[0-9\-]*)T', mySSH.getBefore())
|
||||||
|
if res4 is not None:
|
||||||
|
html_cell += '(' + res4.group('date') + ')'
|
||||||
|
html_cell += '\n'
|
||||||
|
html_cell += '</pre>'
|
||||||
# Checking if all are healthy
|
# Checking if all are healthy
|
||||||
cnt = 0
|
cnt = 0
|
||||||
while (cnt < 3):
|
while (cnt < 3):
|
||||||
@@ -587,6 +664,8 @@ class EPCManagement():
|
|||||||
logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)')
|
logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)')
|
||||||
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
|
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
|
||||||
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
|
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
|
||||||
|
html_queue = SimpleQueue()
|
||||||
|
html_queue.put(html_cell)
|
||||||
if healthyNb == expectedHealthyContainers:
|
if healthyNb == expectedHealthyContainers:
|
||||||
mySSH.command('docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f \'port 9042 or port 3868\' -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
mySSH.command('docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f \'port 9042 or port 3868\' -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||||
if self.isMagmaUsed:
|
if self.isMagmaUsed:
|
||||||
@@ -598,11 +677,11 @@ class EPCManagement():
|
|||||||
mySSH.command('docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f \'port 8805\' -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
mySSH.command('docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f \'port 8805\' -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
logging.debug('Deployment OK')
|
logging.debug('Deployment OK')
|
||||||
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', 1, html_queue)
|
||||||
else:
|
else:
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
logging.debug('Deployment went wrong')
|
logging.debug('Deployment went wrong')
|
||||||
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
|
HTML.CreateHtmlTestRowQueue(self.Type, 'KO', 1, html_queue)
|
||||||
|
|
||||||
def UndeployEpc(self, HTML):
|
def UndeployEpc(self, HTML):
|
||||||
logging.debug('Trying to undeploy')
|
logging.debug('Trying to undeploy')
|
||||||
@@ -639,6 +718,13 @@ class EPCManagement():
|
|||||||
mySSH.command('docker cp prod-magma-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
mySSH.command('docker cp prod-magma-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
else:
|
else:
|
||||||
mySSH.command('docker cp prod-oai-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
mySSH.command('docker cp prod-oai-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
|
mySSH.command('tshark -r mme_' + self.testCase_id + '.pcap | egrep --colour=never "Tracking area update"', '\$', 60)
|
||||||
|
result = re.search('Tracking area update request', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
|
||||||
|
else:
|
||||||
|
message = 'No Tracking area update request'
|
||||||
|
logging.debug(message)
|
||||||
mySSH.command('docker cp prod-oai-spgwc:/tmp/spgwc_check_run.pcap spgwc_' + self.testCase_id + '.pcap', '\$', 60)
|
mySSH.command('docker cp prod-oai-spgwc:/tmp/spgwc_check_run.pcap spgwc_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
|
mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
# Remove all
|
# Remove all
|
||||||
@@ -665,12 +751,15 @@ class EPCManagement():
|
|||||||
mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10)
|
mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10)
|
||||||
noMoreNetworkNb = mySSH.getBefore().count('No such object')
|
noMoreNetworkNb = mySSH.getBefore().count('No such object')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
|
html_queue = SimpleQueue()
|
||||||
|
html_cell = '<pre style="background-color:white">' + message + '</pre>'
|
||||||
|
html_queue.put(html_cell)
|
||||||
if noMoreContainerNb == nbContainers and noMoreNetworkNb == 2:
|
if noMoreContainerNb == nbContainers and noMoreNetworkNb == 2:
|
||||||
logging.debug('Undeployment OK')
|
logging.debug('Undeployment OK')
|
||||||
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', 1, html_queue)
|
||||||
else:
|
else:
|
||||||
logging.debug('Undeployment went wrong')
|
logging.debug('Undeployment went wrong')
|
||||||
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
|
HTML.CreateHtmlTestRowQueu(self.Type, 'KO', 1, html_queue)
|
||||||
|
|
||||||
def LogCollectHSS(self):
|
def LogCollectHSS(self):
|
||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
@@ -689,6 +778,8 @@ class EPCManagement():
|
|||||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/openair-hss/hss_check_run.log .', '\$', 60)
|
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/openair-hss/hss_check_run.log .', '\$', 60)
|
||||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/tmp/hss_check_run.pcap .', '\$', 60)
|
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/tmp/hss_check_run.pcap .', '\$', 60)
|
||||||
mySSH.command('zip hss.log.zip hss_check_run.*', '\$', 60)
|
mySSH.command('zip hss.log.zip hss_check_run.*', '\$', 60)
|
||||||
|
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||||
|
logging.debug('LogCollect is bypassed for that variant')
|
||||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||||
mySSH.command('zip hss.log.zip hss*.log', '\$', 60)
|
mySSH.command('zip hss.log.zip hss*.log', '\$', 60)
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm hss*.log', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S rm hss*.log', '\$', 5)
|
||||||
@@ -719,6 +810,11 @@ class EPCManagement():
|
|||||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/openair-mme/mme_check_run.log .', '\$', 60)
|
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/openair-mme/mme_check_run.log .', '\$', 60)
|
||||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/tmp/mme_check_run.pcap .', '\$', 60)
|
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/tmp/mme_check_run.pcap .', '\$', 60)
|
||||||
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
|
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
|
||||||
|
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||||
|
mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
|
||||||
|
mySSH.command('cp -f /tmp/oai-cn5g.pcap .','\$', 30)
|
||||||
|
mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g.pcap','\$', 30)
|
||||||
|
mySSH.command('mv mme.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
|
||||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||||
mySSH.command('zip mme.log.zip mme*.log', '\$', 60)
|
mySSH.command('zip mme.log.zip mme*.log', '\$', 60)
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5)
|
||||||
@@ -748,6 +844,10 @@ class EPCManagement():
|
|||||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/tmp/spgwc_check_run.pcap .', '\$', 60)
|
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/tmp/spgwc_check_run.pcap .', '\$', 60)
|
||||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap .', '\$', 60)
|
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap .', '\$', 60)
|
||||||
mySSH.command('zip spgw.log.zip spgw*_check_run.*', '\$', 60)
|
mySSH.command('zip spgw.log.zip spgw*_check_run.*', '\$', 60)
|
||||||
|
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||||
|
mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
|
||||||
|
mySSH.command('zip spgw.log.zip oai-smf.log oai-spgwu.log','\$', 30)
|
||||||
|
mySSH.command('mv spgw.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
|
||||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||||
mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60)
|
mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60)
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5)
|
||||||
@@ -757,17 +857,3 @@ class EPCManagement():
|
|||||||
else:
|
else:
|
||||||
logging.error('This option should not occur!')
|
logging.error('This option should not occur!')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
|
|
||||||
def LogCollectOAICN5G(self):
|
|
||||||
mySSH = SSH.SSHConnection()
|
|
||||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
|
||||||
logging.debug('OAI CN5G Collecting Log files to workspace')
|
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo rm -rf ' + self.SourceCodePath + '/logs', '\$', 5)
|
|
||||||
mySSH.command('mkdir ' + self.SourceCodePath + '/logs','\$', 5)
|
|
||||||
containers_list=['oai-smf','oai-spgwu','oai-amf','oai-nrf']
|
|
||||||
for c in containers_list:
|
|
||||||
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
|
|
||||||
mySSH.command('cd ' + self.SourceCodePath + '/logs', '\$', 5)
|
|
||||||
mySSH.command('zip oai-cn5g.log.zip *.log', '\$', 60)
|
|
||||||
mySSH.close()
|
|
||||||
|
|
||||||
|
|||||||
@@ -410,6 +410,17 @@ def GetParametersFromXML(action):
|
|||||||
if (string_field is not None):
|
if (string_field is not None):
|
||||||
CONTAINERS.cliOptions = string_field
|
CONTAINERS.cliOptions = string_field
|
||||||
|
|
||||||
|
elif action == 'Copy_Image_to_Test':
|
||||||
|
string_field = test.findtext('image_name')
|
||||||
|
if (string_field is not None):
|
||||||
|
CONTAINERS.imageToCopy = string_field
|
||||||
|
string_field = test.findtext('registry_svr_id')
|
||||||
|
if (string_field is not None):
|
||||||
|
CONTAINERS.registrySvrId = string_field
|
||||||
|
string_field = test.findtext('test_svr_id')
|
||||||
|
if (string_field is not None):
|
||||||
|
CONTAINERS.testSvrId = string_field
|
||||||
|
|
||||||
else: # ie action == 'Run_PhySim':
|
else: # ie action == 'Run_PhySim':
|
||||||
ldpc.runargs = test.findtext('physim_run_args')
|
ldpc.runargs = test.findtext('physim_run_args')
|
||||||
|
|
||||||
@@ -734,6 +745,22 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
|||||||
HTML.SethtmlUEConnected(len(CiTestObj.UEDevices) + len(CiTestObj.CatMDevices))
|
HTML.SethtmlUEConnected(len(CiTestObj.UEDevices) + len(CiTestObj.CatMDevices))
|
||||||
HTML.CreateHtmlTabHeader()
|
HTML.CreateHtmlTabHeader()
|
||||||
|
|
||||||
|
# On CI bench w/ containers, we need to validate if IP routes are set
|
||||||
|
if EPC.IPAddress == '192.168.18.210':
|
||||||
|
CONTAINERS.CheckAndAddRoute('porcepix', EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||||
|
if CONTAINERS.eNBIPAddress == '192.168.18.194':
|
||||||
|
CONTAINERS.CheckAndAddRoute('asterix', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword)
|
||||||
|
if CONTAINERS.eNB1IPAddress == '192.168.18.194':
|
||||||
|
CONTAINERS.CheckAndAddRoute('asterix', CONTAINERS.eNB1IPAddress, CONTAINERS.eNB1UserName, CONTAINERS.eNB1Password)
|
||||||
|
if CONTAINERS.eNBIPAddress == '192.168.18.193':
|
||||||
|
CONTAINERS.CheckAndAddRoute('obelix', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword)
|
||||||
|
if CONTAINERS.eNB1IPAddress == '192.168.18.193':
|
||||||
|
CONTAINERS.CheckAndAddRoute('obelix', CONTAINERS.eNB1IPAddress, CONTAINERS.eNB1UserName, CONTAINERS.eNB1Password)
|
||||||
|
if CONTAINERS.eNBIPAddress == '192.168.18.209':
|
||||||
|
CONTAINERS.CheckAndAddRoute('nepes', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword)
|
||||||
|
if CONTAINERS.eNB1IPAddress == '192.168.18.209':
|
||||||
|
CONTAINERS.CheckAndAddRoute('nepes', CONTAINERS.eNB1IPAddress, CONTAINERS.eNB1UserName, CONTAINERS.eNB1Password)
|
||||||
|
|
||||||
CiTestObj.FailReportCnt = 0
|
CiTestObj.FailReportCnt = 0
|
||||||
RAN.prematureExit=True
|
RAN.prematureExit=True
|
||||||
HTML.startTime=int(round(time.time() * 1000))
|
HTML.startTime=int(round(time.time() * 1000))
|
||||||
@@ -853,6 +880,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
|||||||
HTML=ldpc.Run_PhySim(HTML,CONST,id)
|
HTML=ldpc.Run_PhySim(HTML,CONST,id)
|
||||||
elif action == 'Build_Image':
|
elif action == 'Build_Image':
|
||||||
CONTAINERS.BuildImage(HTML)
|
CONTAINERS.BuildImage(HTML)
|
||||||
|
elif action == 'Copy_Image_to_Test':
|
||||||
|
CONTAINERS.Copy_Image_to_Test_Server(HTML)
|
||||||
elif action == 'Deploy_Object':
|
elif action == 'Deploy_Object':
|
||||||
CONTAINERS.DeployObject(HTML, EPC)
|
CONTAINERS.DeployObject(HTML, EPC)
|
||||||
elif action == 'Undeploy_Object':
|
elif action == 'Undeploy_Object':
|
||||||
|
|||||||
+75
-35
@@ -165,16 +165,16 @@ class RANManagement():
|
|||||||
result = re.search('LAST_BUILD_INFO', mySSH.getBefore())
|
result = re.search('LAST_BUILD_INFO', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
mismatch = False
|
mismatch = False
|
||||||
mySSH.command('grep SRC_COMMIT LAST_BUILD_INFO.txt', '\$', 2)
|
mySSH.command('grep --colour=never SRC_COMMIT LAST_BUILD_INFO.txt', '\$', 2)
|
||||||
result = re.search(self.ranCommitID, mySSH.getBefore())
|
result = re.search(self.ranCommitID, mySSH.getBefore())
|
||||||
if result is None:
|
if result is None:
|
||||||
mismatch = True
|
mismatch = True
|
||||||
mySSH.command('grep MERGED_W_TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
mySSH.command('grep --colour=never MERGED_W_TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
||||||
if (self.ranAllowMerge):
|
if (self.ranAllowMerge):
|
||||||
result = re.search('YES', mySSH.getBefore())
|
result = re.search('YES', mySSH.getBefore())
|
||||||
if result is None:
|
if result is None:
|
||||||
mismatch = True
|
mismatch = True
|
||||||
mySSH.command('grep TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
mySSH.command('grep --colour=never TGT_BRANCH LAST_BUILD_INFO.txt', '\$', 2)
|
||||||
if self.ranTargetBranch == '':
|
if self.ranTargetBranch == '':
|
||||||
result = re.search('develop', mySSH.getBefore())
|
result = re.search('develop', mySSH.getBefore())
|
||||||
else:
|
else:
|
||||||
@@ -423,13 +423,13 @@ class RANManagement():
|
|||||||
# do not reset board twice in IF4.5 case
|
# do not reset board twice in IF4.5 case
|
||||||
result = re.search('^rru|^enb|^du.band', str(config_file))
|
result = re.search('^rru|^enb|^du.band', str(config_file))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90)
|
mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 180)
|
||||||
result = re.search('type: b200', mySSH.getBefore())
|
result = re.search('type: b200', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
logging.debug('Found a B2xx device --> resetting it')
|
logging.debug('Found a B2xx device --> resetting it')
|
||||||
mySSH.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
mySSH.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
||||||
# Reloading FGPA bin firmware
|
# Reloading FGPA bin firmware
|
||||||
mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90)
|
mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 180)
|
||||||
# Make a copy and adapt to EPC / eNB IP addresses
|
# Make a copy and adapt to EPC / eNB IP addresses
|
||||||
mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
|
mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
|
||||||
localMmeIpAddr = EPC.MmeIPAddress
|
localMmeIpAddr = EPC.MmeIPAddress
|
||||||
@@ -446,7 +446,7 @@ class RANManagement():
|
|||||||
else:
|
else:
|
||||||
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "no";/\' ' + ci_full_config_file, '\$', 2);
|
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "no";/\' ' + ci_full_config_file, '\$', 2);
|
||||||
self.eNBmbmsEnables[int(self.eNB_instance)] = False
|
self.eNBmbmsEnables[int(self.eNB_instance)] = False
|
||||||
mySSH.command('grep enable_enb_m2 ' + ci_full_config_file, '\$', 2);
|
mySSH.command('grep --colour=never enable_enb_m2 ' + ci_full_config_file, '\$', 2);
|
||||||
result = re.search('yes', mySSH.getBefore())
|
result = re.search('yes', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.eNBmbmsEnables[int(self.eNB_instance)] = True
|
self.eNBmbmsEnables[int(self.eNB_instance)] = True
|
||||||
@@ -593,8 +593,12 @@ class RANManagement():
|
|||||||
lPassWord = self.eNBPassword
|
lPassWord = self.eNBPassword
|
||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never ' + self.air_interface[self.eNB_instance] + ' | grep -v grep', '\$', 5)
|
if self.air_interface[self.eNB_instance] == '':
|
||||||
result = re.search(self.air_interface[self.eNB_instance], mySSH.getBefore())
|
pattern = 'softmodem'
|
||||||
|
else:
|
||||||
|
pattern = self.air_interface[self.eNB_instance]
|
||||||
|
mySSH.command('stdbuf -o0 ps -aux | grep --color=never ' + pattern + ' | grep -v grep', '\$', 5)
|
||||||
|
result = re.search(pattern, mySSH.getBefore())
|
||||||
if result is None:
|
if result is None:
|
||||||
logging.debug('\u001B[1;37;41m eNB Process Not Found! \u001B[0m')
|
logging.debug('\u001B[1;37;41m eNB Process Not Found! \u001B[0m')
|
||||||
status_queue.put(CONST.ENB_PROCESS_FAILED)
|
status_queue.put(CONST.ENB_PROCESS_FAILED)
|
||||||
@@ -734,8 +738,8 @@ class RANManagement():
|
|||||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*.pcap .','\$',20)
|
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*.pcap .','\$',20)
|
||||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/gnb_*.pcap .','\$',20)
|
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/gnb_*.pcap .','\$',20)
|
||||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5)
|
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 gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor.png', '\$', 60)
|
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png', '\$', 60)
|
||||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *.pickle *.png', '\$', 5)
|
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png', '\$', 5)
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
|
|
||||||
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML):
|
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML):
|
||||||
@@ -792,23 +796,11 @@ class RANManagement():
|
|||||||
pb_receiving_samples_cnt = 0
|
pb_receiving_samples_cnt = 0
|
||||||
#count "removing UE" msg
|
#count "removing UE" msg
|
||||||
removing_ue = 0
|
removing_ue = 0
|
||||||
|
#count"X2AP-PDU"
|
||||||
|
x2ap_pdu = 0
|
||||||
#NSA specific log markers
|
#NSA specific log markers
|
||||||
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
|
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
|
||||||
|
|
||||||
#the datalog config file has to be loaded
|
|
||||||
datalog_rt_stats_file='datalog_rt_stats.yaml'
|
|
||||||
if (os.path.isfile(datalog_rt_stats_file)):
|
|
||||||
yaml_file=datalog_rt_stats_file
|
|
||||||
elif (os.path.isfile('ci-scripts/'+datalog_rt_stats_file)):
|
|
||||||
yaml_file='ci-scripts/'+datalog_rt_stats_file
|
|
||||||
else:
|
|
||||||
logging.error("Datalog RT stats yaml file cannot be found")
|
|
||||||
sys.exit("Datalog RT stats yaml file cannot be found")
|
|
||||||
|
|
||||||
with open(yaml_file,'r') as f:
|
|
||||||
datalog_rt_stats = yaml.load(f,Loader=yaml.FullLoader)
|
|
||||||
rt_keys = datalog_rt_stats['Ref'] #we use the keys from the Ref field
|
|
||||||
|
|
||||||
line_cnt=0 #log file line counter
|
line_cnt=0 #log file line counter
|
||||||
for line in enb_log_file.readlines():
|
for line in enb_log_file.readlines():
|
||||||
line_cnt+=1
|
line_cnt+=1
|
||||||
@@ -975,15 +967,7 @@ class RANManagement():
|
|||||||
if result is not None:
|
if result is not None:
|
||||||
#remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char
|
#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())
|
dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip())
|
||||||
#real time statistics for gNB
|
|
||||||
for k in rt_keys:
|
|
||||||
result = re.search(k, line)
|
|
||||||
if result is not None:
|
|
||||||
#remove 1- all useless char before relevant info 2- trailing char
|
|
||||||
line=line.replace('[0m','')
|
|
||||||
tmp=re.match(rf'^.*?(\b{k}\b.*)',line.rstrip()) #from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex
|
|
||||||
if tmp!=None: #with ULULULUULULULLLL at the head of the line, we skip it
|
|
||||||
real_time_stats[k]=tmp.group(1)
|
|
||||||
|
|
||||||
#count "problem receiving samples" msg
|
#count "problem receiving samples" msg
|
||||||
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
|
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
|
||||||
@@ -993,7 +977,10 @@ class RANManagement():
|
|||||||
result = re.search('\[MAC\]\s+Removing UE', str(line))
|
result = re.search('\[MAC\]\s+Removing UE', str(line))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
removing_ue += 1
|
removing_ue += 1
|
||||||
|
#count "X2AP-PDU"
|
||||||
|
result = re.search('X2AP-PDU', str(line))
|
||||||
|
if result is not None:
|
||||||
|
x2ap_pdu += 1
|
||||||
#nsa markers logging
|
#nsa markers logging
|
||||||
for k in nsa_markers:
|
for k in nsa_markers:
|
||||||
result = re.search(k, line)
|
result = re.search(k, line)
|
||||||
@@ -1001,7 +988,55 @@ class RANManagement():
|
|||||||
nsa_markers[k].append(line_cnt)
|
nsa_markers[k].append(line_cnt)
|
||||||
|
|
||||||
enb_log_file.close()
|
enb_log_file.close()
|
||||||
logging.debug(' File analysis completed')
|
|
||||||
|
|
||||||
|
#the following part takes the *_stats.log files as source (not the stdout log file)
|
||||||
|
|
||||||
|
#the datalog config file has to be loaded
|
||||||
|
datalog_rt_stats_file='datalog_rt_stats.yaml'
|
||||||
|
if (os.path.isfile(datalog_rt_stats_file)):
|
||||||
|
yaml_file=datalog_rt_stats_file
|
||||||
|
elif (os.path.isfile('ci-scripts/'+datalog_rt_stats_file)):
|
||||||
|
yaml_file='ci-scripts/'+datalog_rt_stats_file
|
||||||
|
else:
|
||||||
|
logging.error("Datalog RT stats yaml file cannot be found")
|
||||||
|
sys.exit("Datalog RT stats yaml file cannot be found")
|
||||||
|
|
||||||
|
with open(yaml_file,'r') as f:
|
||||||
|
datalog_rt_stats = yaml.load(f,Loader=yaml.FullLoader)
|
||||||
|
rt_keys = datalog_rt_stats['Ref'] #we use the keys from the Ref field
|
||||||
|
|
||||||
|
if (os.path.isfile('./nrL1_stats.log')) and (os.path.isfile('./nrL1_stats.log')):
|
||||||
|
stat_files_present=True
|
||||||
|
else:
|
||||||
|
stat_files_present=False
|
||||||
|
logging.debug("NR Stats files for RT analysis not found")
|
||||||
|
if stat_files_present:
|
||||||
|
nrL1_stats = open('./nrL1_stats.log', 'r')
|
||||||
|
nrMAC_stats = open('./nrMAC_stats.log', 'r')
|
||||||
|
for line in nrL1_stats.readlines():
|
||||||
|
for k in rt_keys:
|
||||||
|
result = re.search(k, line)
|
||||||
|
if result is not None:
|
||||||
|
#remove 1- all useless char before relevant info 2- trailing char
|
||||||
|
tmp=re.match(rf'^.*?(\b{k}\b.*)',line.rstrip()) #from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex
|
||||||
|
if tmp!=None:
|
||||||
|
real_time_stats[k]=tmp.group(1)
|
||||||
|
for line in nrMAC_stats.readlines():
|
||||||
|
for k in rt_keys:
|
||||||
|
result = re.search(k, line)
|
||||||
|
if result is not None:
|
||||||
|
#remove 1- all useless char before relevant info 2- trailing char
|
||||||
|
tmp=re.match(rf'^.*?(\b{k}\b.*)',line.rstrip()) #from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex
|
||||||
|
if tmp!=None:
|
||||||
|
real_time_stats[k]=tmp.group(1)
|
||||||
|
nrL1_stats.close()
|
||||||
|
nrMAC_stats.close()
|
||||||
|
|
||||||
|
#stdout log file and stat log files analysis completed
|
||||||
|
logging.debug(' File analysis (stdout, stats) completed')
|
||||||
|
|
||||||
|
#post processing depending on the node type
|
||||||
if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):
|
if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):
|
||||||
nodeB_prefix = 'e'
|
nodeB_prefix = 'e'
|
||||||
else:
|
else:
|
||||||
@@ -1087,6 +1122,11 @@ class RANManagement():
|
|||||||
htmlMsg = statMsg+'\n'
|
htmlMsg = statMsg+'\n'
|
||||||
logging.debug(statMsg)
|
logging.debug(statMsg)
|
||||||
htmleNBFailureMsg += htmlMsg
|
htmleNBFailureMsg += htmlMsg
|
||||||
|
#X2AP-PDU log
|
||||||
|
statMsg = 'X2AP-PDU msg count = '+str(x2ap_pdu)
|
||||||
|
htmlMsg = statMsg+'\n'
|
||||||
|
logging.debug(statMsg)
|
||||||
|
htmleNBFailureMsg += htmlMsg
|
||||||
#nsa markers
|
#nsa markers
|
||||||
statMsg = 'logfile line count = ' + str(line_cnt)
|
statMsg = 'logfile line count = ' + str(line_cnt)
|
||||||
htmlMsg = statMsg+'\n'
|
htmlMsg = statMsg+'\n'
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ class SSHConnection():
|
|||||||
connect_status = False
|
connect_status = False
|
||||||
while count < 4:
|
while count < 4:
|
||||||
self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=no {}@{}'.format(username,ipaddress))
|
self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=no {}@{}'.format(username,ipaddress))
|
||||||
self.ssh.timeout = 5
|
# Longer timeout at connection due to asterix slowness
|
||||||
|
self.ssh.timeout = 25
|
||||||
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
|
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
|
||||||
if self.sshresponse == 0:
|
if self.sshresponse == 0:
|
||||||
self.ssh.sendline('yes')
|
self.ssh.sendline('yes')
|
||||||
|
|||||||
+45
-20
@@ -17,9 +17,15 @@ class StatMonitor():
|
|||||||
def __init__(self,cfg_file):
|
def __init__(self,cfg_file):
|
||||||
with open(cfg_file,'r') as file:
|
with open(cfg_file,'r') as file:
|
||||||
self.d = yaml.load(file)
|
self.d = yaml.load(file)
|
||||||
for node in self.d:
|
for node in self.d:#so far we have enb or gnb as nodes
|
||||||
for metric in self.d[node]:
|
for metric_l1 in self.d[node]: #first level of metric keys
|
||||||
self.d[node][metric]=[]
|
if metric_l1!="graph": #graph is a reserved word to configure graph paging, so it is disregarded
|
||||||
|
if self.d[node][metric_l1] is None:#first level is None -> create array
|
||||||
|
self.d[node][metric_l1]=[]
|
||||||
|
else: #first level is not None -> there is a second level -> create array
|
||||||
|
for metric_l2 in self.d[node][metric_l1]:
|
||||||
|
self.d[node][metric_l1][metric_l2]=[]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def process_gnb (self,node_type,output):
|
def process_gnb (self,node_type,output):
|
||||||
@@ -36,6 +42,11 @@ class StatMonitor():
|
|||||||
percentage=float(result.group(2))/float(result.group(1))
|
percentage=float(result.group(2))/float(result.group(1))
|
||||||
self.d[node_type]['ulsch_err_perc_round_1'].append(percentage)
|
self.d[node_type]['ulsch_err_perc_round_1'].append(percentage)
|
||||||
|
|
||||||
|
for k in self.d[node_type]['rt']:
|
||||||
|
result=re.match(rf'^.*\b{k}\b:\s+([0-9\.]+) us;\s+([0-9]+);\s+([0-9\.]+) us;',tmp)
|
||||||
|
if result is not None:
|
||||||
|
self.d[node_type]['rt'][k].append(float(result.group(3)))
|
||||||
|
|
||||||
|
|
||||||
def process_enb (self,node_type,output):
|
def process_enb (self,node_type,output):
|
||||||
for line in output:
|
for line in output:
|
||||||
@@ -62,23 +73,37 @@ class StatMonitor():
|
|||||||
|
|
||||||
|
|
||||||
def graph(self,node_type):
|
def graph(self,node_type):
|
||||||
col = 1
|
for page in self.d[node_type]['graph']:#work out a set a graphs per page
|
||||||
figure, axis = plt.subplots(len(self.d[node_type]), col ,figsize=(10, 10))
|
col = 1
|
||||||
i=0
|
figure, axis = plt.subplots(len(self.d[node_type]['graph'][page]), col ,figsize=(10, 10))
|
||||||
for metric in self.d[node_type]:
|
i=0
|
||||||
major_ticks = np.arange(0, len(self.d[node_type][metric])+1, 1)
|
for m in self.d[node_type]['graph'][page]:#metric may refer to 1 level or 2 levels
|
||||||
axis[i].set_xticks(major_ticks)
|
metric_path=m.split('.')
|
||||||
axis[i].set_xticklabels([])
|
if len(metric_path)==1:#1 level
|
||||||
axis[i].plot(self.d[node_type][metric],marker='o')
|
metric_l1=metric_path[0]
|
||||||
axis[i].set_xlabel('time')
|
major_ticks = np.arange(0, len(self.d[node_type][metric_l1])+1, 1)
|
||||||
axis[i].set_ylabel(metric)
|
axis[i].set_xticks(major_ticks)
|
||||||
axis[i].set_title(metric)
|
axis[i].set_xticklabels([])
|
||||||
i+=1
|
axis[i].plot(self.d[node_type][metric_l1],marker='o')
|
||||||
|
axis[i].set_xlabel('time')
|
||||||
|
axis[i].set_ylabel(metric_l1)
|
||||||
|
axis[i].set_title(metric_l1)
|
||||||
|
|
||||||
|
else:#2 levels
|
||||||
|
metric_l1=metric_path[0]
|
||||||
|
metric_l2=metric_path[1]
|
||||||
|
major_ticks = np.arange(0, len(self.d[node_type][metric_l1][metric_l2])+1, 1)
|
||||||
|
axis[i].set_xticks(major_ticks)
|
||||||
|
axis[i].set_xticklabels([])
|
||||||
|
axis[i].plot(self.d[node_type][metric_l1][metric_l2],marker='o')
|
||||||
|
axis[i].set_xlabel('time')
|
||||||
|
axis[i].set_ylabel(metric_l2)
|
||||||
|
axis[i].set_title(metric_l2)
|
||||||
|
i+=1
|
||||||
|
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
# Combine all the operations and display
|
#save as png
|
||||||
plt.savefig(node_type+'_stats_monitor.png')
|
plt.savefig(node_type+'_stats_monitor_'+page+'.png')
|
||||||
plt.show()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@@ -88,7 +113,7 @@ if __name__ == "__main__":
|
|||||||
mon=StatMonitor(cfg_filename)
|
mon=StatMonitor(cfg_filename)
|
||||||
|
|
||||||
#collecting stats when modem process is stopped
|
#collecting stats when modem process is stopped
|
||||||
CMD='ps aux | grep mode | grep -v grep'
|
CMD='ps aux | grep modem | grep -v grep'
|
||||||
process=subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)
|
process=subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)
|
||||||
output = process.stdout.readlines()
|
output = process.stdout.readlines()
|
||||||
while len(output)!=0 :
|
while len(output)!=0 :
|
||||||
|
|||||||
@@ -2,10 +2,50 @@ enb :
|
|||||||
PHR:
|
PHR:
|
||||||
bler:
|
bler:
|
||||||
mcsoff:
|
mcsoff:
|
||||||
mcs:
|
mcs:
|
||||||
|
graph:
|
||||||
|
page1:
|
||||||
|
PHR:
|
||||||
|
bler:
|
||||||
|
mcsoff:
|
||||||
|
mcs:
|
||||||
|
|
||||||
gnb :
|
gnb :
|
||||||
dlsch_err:
|
dlsch_err:
|
||||||
dlsch_err_perc_round_1:
|
dlsch_err_perc_round_1:
|
||||||
ulsch_err:
|
ulsch_err:
|
||||||
ulsch_err_perc_round_1:
|
ulsch_err_perc_round_1:
|
||||||
|
rt :
|
||||||
|
feprx:
|
||||||
|
feptx_prec:
|
||||||
|
feptx_ofdm:
|
||||||
|
feptx_total:
|
||||||
|
L1 Tx processing thread 0:
|
||||||
|
L1 Tx processing thread 1:
|
||||||
|
DLSCH encoding:
|
||||||
|
L1 Rx processing:
|
||||||
|
PUSCH inner-receiver:
|
||||||
|
PUSCH decoding:
|
||||||
|
DL & UL scheduling timing stats:
|
||||||
|
UL Indication:
|
||||||
|
graph :
|
||||||
|
page1:
|
||||||
|
dlsch_err:
|
||||||
|
dlsch_err_perc_round_1:
|
||||||
|
ulsch_err:
|
||||||
|
ulsch_err_perc_round_1:
|
||||||
|
page2:
|
||||||
|
rt.feprx:
|
||||||
|
rt.feptx_prec:
|
||||||
|
rt.feptx_ofdm:
|
||||||
|
rt.feptx_total:
|
||||||
|
page3:
|
||||||
|
rt.L1 Tx processing thread 0:
|
||||||
|
rt.L1 Tx processing thread 1:
|
||||||
|
rt.DLSCH encoding:
|
||||||
|
rt.L1 Rx processing:
|
||||||
|
page4:
|
||||||
|
rt.PUSCH inner-receiver:
|
||||||
|
rt.PUSCH decoding:
|
||||||
|
rt.DL & UL scheduling timing stats:
|
||||||
|
rt.UL Indication:
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
- IdleSleep
|
- IdleSleep
|
||||||
- Perform_X2_Handover
|
- Perform_X2_Handover
|
||||||
- Build_Image
|
- Build_Image
|
||||||
|
- Copy_Image_to_Test
|
||||||
- Deploy_Object
|
- Deploy_Object
|
||||||
- Undeploy_Object
|
- Undeploy_Object
|
||||||
- Cppcheck_Analysis
|
- Cppcheck_Analysis
|
||||||
|
|||||||
@@ -0,0 +1,153 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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-NSA-FR1-TM1-B200</htmlTabRef>
|
||||||
|
<htmlTabName>NSA SanityCheck with QUECTEL</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<repeatCount>1</repeatCount>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
000001
|
||||||
|
010002
|
||||||
|
030000
|
||||||
|
030101
|
||||||
|
000001
|
||||||
|
030102
|
||||||
|
000001
|
||||||
|
010000
|
||||||
|
000001
|
||||||
|
050000
|
||||||
|
050001
|
||||||
|
070000
|
||||||
|
070001
|
||||||
|
010002
|
||||||
|
000001
|
||||||
|
030202
|
||||||
|
030201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="010000">
|
||||||
|
<class>Initialize_UE</class>
|
||||||
|
<desc>Initialize Quectel</desc>
|
||||||
|
<id>idefix</id>
|
||||||
|
<UE_Trace>yes</UE_Trace>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="010002">
|
||||||
|
<class>Terminate_UE</class>
|
||||||
|
<desc>Terminate Quectel</desc>
|
||||||
|
<id>idefix</id>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030000">
|
||||||
|
<class>Copy_Image_to_Test</class>
|
||||||
|
<desc>Copy gNB image to test server</desc>
|
||||||
|
<image_name>oai-gnb</image_name>
|
||||||
|
<registry_svr_id>0</registry_svr_id>
|
||||||
|
<test_svr_id>1</test_svr_id>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030101">
|
||||||
|
<class>Deploy_Object</class>
|
||||||
|
<desc>Deploy eNB (FDD/Band7/5MHz/B200) in a container</desc>
|
||||||
|
<yaml_path>ci-scripts/yaml_files/nsa_b200_enb</yaml_path>
|
||||||
|
<eNB_instance>0</eNB_instance>
|
||||||
|
<eNB_serverId>0</eNB_serverId>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030102">
|
||||||
|
<class>Deploy_Object</class>
|
||||||
|
<desc>Deploy gNB (TDD/Band78/40MHz/B200) in a container</desc>
|
||||||
|
<yaml_path>ci-scripts/yaml_files/nsa_b200_gnb</yaml_path>
|
||||||
|
<eNB_instance>1</eNB_instance>
|
||||||
|
<eNB_serverId>1</eNB_serverId>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000002">
|
||||||
|
<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>
|
||||||
|
<id>idefix</id>
|
||||||
|
<ping_args>-c 20</ping_args>
|
||||||
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="050001">
|
||||||
|
<class>Ping</class>
|
||||||
|
<desc>Ping: 100pings in 20sec</desc>
|
||||||
|
<id>idefix</id>
|
||||||
|
<ping_args>-c 100 -i 0.2</ping_args>
|
||||||
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070000">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||||
|
<iperf_args>-u -b 20M -t 60</iperf_args>
|
||||||
|
<direction>DL</direction>
|
||||||
|
<id>idefix</id>
|
||||||
|
<iperf_packetloss_threshold>3</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>single-ue</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070001">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (UL/2Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||||
|
<iperf_args>-u -b 2M -t 60</iperf_args>
|
||||||
|
<direction>UL</direction>
|
||||||
|
<id>idefix</id>
|
||||||
|
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>single-ue</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Undeploy_Object</class>
|
||||||
|
<desc>Undeploy eNB</desc>
|
||||||
|
<yaml_path>ci-scripts/yaml_files/nsa_b200_enb</yaml_path>
|
||||||
|
<eNB_instance>0</eNB_instance>
|
||||||
|
<eNB_serverId>0</eNB_serverId>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030202">
|
||||||
|
<class>Undeploy_Object</class>
|
||||||
|
<desc>Undeploy gNB</desc>
|
||||||
|
<yaml_path>ci-scripts/yaml_files/nsa_b200_gnb</yaml_path>
|
||||||
|
<eNB_instance>1</eNB_instance>
|
||||||
|
<eNB_serverId>1</eNB_serverId>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
|
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
|
|
||||||
<testCase id="070000">
|
<testCase id="070000">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
<desc>iperf (DL/60Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-u -b 20M -t 60</iperf_args>
|
<iperf_args>-u -b 60M -t 60</iperf_args>
|
||||||
<direction>DL</direction>
|
<direction>DL</direction>
|
||||||
<id>nrmodule2_quectel</id>
|
<id>nrmodule2_quectel</id>
|
||||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||||
|
|||||||
@@ -110,8 +110,8 @@
|
|||||||
|
|
||||||
<testCase id="070000">
|
<testCase id="070000">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
<desc>iperf (DL/60Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-u -b 20M -t 60</iperf_args>
|
<iperf_args>-u -b 60M -t 60</iperf_args>
|
||||||
<direction>DL</direction>
|
<direction>DL</direction>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
<iperf_packetloss_threshold>3</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>3</iperf_packetloss_threshold>
|
||||||
|
|||||||
@@ -98,8 +98,8 @@
|
|||||||
|
|
||||||
<testCase id="070000">
|
<testCase id="070000">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
<desc>iperf (DL/60Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-u -b 20M -t 60</iperf_args>
|
<iperf_args>-u -b 60M -t 60</iperf_args>
|
||||||
<direction>DL</direction>
|
<direction>DL</direction>
|
||||||
<id>nrmodule2_quectel</id>
|
<id>nrmodule2_quectel</id>
|
||||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||||
|
|||||||
@@ -111,6 +111,9 @@ services:
|
|||||||
TAC_LB_SGW_TEST_0: '03'
|
TAC_LB_SGW_TEST_0: '03'
|
||||||
TAC_HB_SGW_TEST_0: '00'
|
TAC_HB_SGW_TEST_0: '00'
|
||||||
SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
|
SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
|
||||||
|
volumes:
|
||||||
|
- ./mme.conf:/openair-mme/etc/mme.conf
|
||||||
|
- ./entrypoint.sh:/openair-mme/bin/entrypoint.sh
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: /bin/bash -c "pgrep oai_mme"
|
test: /bin/bash -c "pgrep oai_mme"
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
|||||||
+73
@@ -0,0 +1,73 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# First see if all interfaces are up
|
||||||
|
ifconfig
|
||||||
|
|
||||||
|
# S10 might be on loopback --> needs bring-up
|
||||||
|
if [[ "$MME_INTERFACE_NAME_FOR_S10" == *"lo:"* ]]
|
||||||
|
then
|
||||||
|
ifconfig ${MME_INTERFACE_NAME_FOR_S10} ${MME_IPV4_ADDRESS_FOR_S10} up
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIST_OF_NETWORKS=`ifconfig -s | egrep -v "^Iface|^lo" | cut -d' ' -f1`
|
||||||
|
|
||||||
|
for if_name in $LIST_OF_NETWORKS
|
||||||
|
do
|
||||||
|
IF_IP_ADDR=`ifconfig $if_name | grep inet | sed -e "s# *inet#inet#" | cut -d' ' -f2`
|
||||||
|
if [[ "${IF_IP_ADDR}" == "${MME_IPV4_ADDRESS_FOR_S1_MME}" ]]; then
|
||||||
|
echo "S1C is on $if_name"
|
||||||
|
MME_INTERFACE_NAME_FOR_S1_MME=$if_name
|
||||||
|
fi
|
||||||
|
if [[ "${IF_IP_ADDR}" == "${MME_IPV4_ADDRESS_FOR_S10}" ]]; then
|
||||||
|
echo "S10 is on $if_name"
|
||||||
|
MME_INTERFACE_NAME_FOR_S10=$if_name
|
||||||
|
fi
|
||||||
|
if [[ "${IF_IP_ADDR}" == "${MME_IPV4_ADDRESS_FOR_S11}" ]]; then
|
||||||
|
echo "S11 is on $if_name"
|
||||||
|
MME_INTERFACE_NAME_FOR_S11=$if_name
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
CONFIG_DIR="/openair-mme/etc"
|
||||||
|
|
||||||
|
for c in ${CONFIG_DIR}/mme_fd.conf; do
|
||||||
|
#echo "entrypoint.sh process config file $c"
|
||||||
|
sed -i -e "s#@TAC-LB#@TAC_LB#" -e "s#TAC-HB_#TAC_HB_#" ${c}
|
||||||
|
# grep variable names (format: ${VAR}) from template to be rendered
|
||||||
|
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
|
||||||
|
#echo "entrypoint.sh process vars $VARS"
|
||||||
|
|
||||||
|
# create sed expressions for substituting each occurrence of ${VAR}
|
||||||
|
# with the value of the environment variable "VAR"
|
||||||
|
EXPRESSIONS=""
|
||||||
|
for v in ${VARS}; do
|
||||||
|
#echo "var is $v"
|
||||||
|
NEW_VAR=`echo $v | sed -e "s#@##g"`
|
||||||
|
#echo "NEW_VAR is $NEW_VAR"
|
||||||
|
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
|
||||||
|
# Some fields require CIDR format
|
||||||
|
if [[ "${NEW_VAR}" == "MME_IPV4_ADDRESS_FOR_S1_MME" ]] || \
|
||||||
|
[[ "${NEW_VAR}" == "MME_IPV4_ADDRESS_FOR_S11" ]] || \
|
||||||
|
[[ "${NEW_VAR}" == "MME_IPV4_ADDRESS_FOR_S10" ]]; then
|
||||||
|
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}/24|g"
|
||||||
|
else
|
||||||
|
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
EXPRESSIONS="${EXPRESSIONS#';'}"
|
||||||
|
|
||||||
|
# render template and inline replace config file
|
||||||
|
sed -i "${EXPRESSIONS}" ${c}
|
||||||
|
done
|
||||||
|
|
||||||
|
pushd /openair-mme/scripts
|
||||||
|
./check_mme_s6a_certificate ${PREFIX} ${MME_FQDN}
|
||||||
|
popd
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
MME :
|
||||||
|
{
|
||||||
|
REALM = "openairinterface.org"; # YOUR REALM HERE
|
||||||
|
INSTANCE = 1; # 0 is the default
|
||||||
|
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||||
|
MAX_S1_ENB = 64;
|
||||||
|
MAX_UE = 4096;
|
||||||
|
RELATIVE_CAPACITY = 10;
|
||||||
|
EMERGENCY_ATTACH_SUPPORTED = "no";
|
||||||
|
UNAUTHENTICATED_IMSI_SUPPORTED = "no";
|
||||||
|
DUMMY_HANDOVER_FORWARDING_ENABLED = "yes";
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_IMS_VOICE_OVER_PS_SESSION_IN_S1 = "no"; # DO NOT CHANGE
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_EMERGENCY_BEARER_SERVICES_IN_S1_MODE = "no"; # DO NOT CHANGE
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_LOCATION_SERVICES_VIA_EPC = "no"; # DO NOT CHANGE
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_EXTENDED_SERVICE_REQUEST = "no"; # DO NOT CHANGE
|
||||||
|
|
||||||
|
# Display statistics about whole system (expressed in seconds)
|
||||||
|
MME_STATISTIC_TIMER = 10;
|
||||||
|
MME_MOBILITY_COMPLETION_TIMER = 2; # Amount of time in seconds the source MME waits to release resources after HANDOVER/TAU is complete (with or without.
|
||||||
|
MME_S10_HANDOVER_COMPLETION_TIMER = 2; # Amount of time in soconds the target MME waits to check if a handover/tau process has completed successfully.
|
||||||
|
|
||||||
|
IP_CAPABILITY = "IPV4V6";
|
||||||
|
INTERTASK_INTERFACE :
|
||||||
|
{
|
||||||
|
ITTI_QUEUE_SIZE = 2000000;
|
||||||
|
};
|
||||||
|
|
||||||
|
S6A :
|
||||||
|
{
|
||||||
|
S6A_CONF = "/openair-mme/etc/mme_fd.conf";
|
||||||
|
HSS_HOSTNAME = "hss.openairinterface.org"; # THE HSS FQDN ex: hss.epc.mnc001.mcc001.3gppnetwork.org
|
||||||
|
HSS_REALM = "openairinterface.org"; # THE HSS REALM ex: epc.mnc001.mcc001.3gppnetwork.org
|
||||||
|
};
|
||||||
|
|
||||||
|
SCTP :
|
||||||
|
{
|
||||||
|
SCTP_INSTREAMS = 8;
|
||||||
|
SCTP_OUTSTREAMS = 8;
|
||||||
|
};
|
||||||
|
|
||||||
|
S1AP :
|
||||||
|
{
|
||||||
|
S1AP_OUTCOME_TIMER = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
GUMMEI_LIST = (
|
||||||
|
{MCC="208" ; MNC="97"; MME_GID="32768" ; MME_CODE="3"; } # YOUR GUMMEI CONFIG HERE
|
||||||
|
);
|
||||||
|
|
||||||
|
TAI_LIST = (
|
||||||
|
{MCC="208" ; MNC="97"; TAC = "1"; }, # YOUR TAI CONFIG HERE
|
||||||
|
{MCC="208" ; MNC="97"; TAC = "2"; }, # YOUR TAI CONFIG HERE
|
||||||
|
{MCC="208" ; MNC="97"; TAC = "3"; } # YOUR TAI CONFIG HERE
|
||||||
|
);
|
||||||
|
|
||||||
|
NAS :
|
||||||
|
{
|
||||||
|
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ];
|
||||||
|
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ];
|
||||||
|
T3402 = 12
|
||||||
|
T3412 = 0
|
||||||
|
T3422 = 6
|
||||||
|
T3450 = 6
|
||||||
|
T3460 = 6
|
||||||
|
T3470 = 6
|
||||||
|
T3485 = 3
|
||||||
|
T3486 = 3
|
||||||
|
T3489 = 4
|
||||||
|
T3495 = 3
|
||||||
|
NAS_FORCE_TAU = 0
|
||||||
|
STRICT_FILLER_BITS_CHECK = "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
# MME binded interface for S1-C or S1-MME communication (S1AP), can be ethernet interface, virtual ethernet interface, we don't advise wireless interfaces
|
||||||
|
MME_INTERFACE_NAME_FOR_S1_MME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||||
|
MME_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.195/24"; # CIDR, YOUR NETWORK CONFIG HERE
|
||||||
|
# MME_IPV6_ADDRESS_FOR_S1_MME = "fd00::191/118"; # YOUR NETWORK CONFIG HERE
|
||||||
|
# MME binded interface for S11 communication (GTPV2-C)
|
||||||
|
MME_INTERFACE_NAME_FOR_S11 = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||||
|
MME_IPV4_ADDRESS_FOR_S11 = "192.168.61.195/24"; # CIDR, YOUR NETWORK CONFIG HERE
|
||||||
|
# MME_IPV6_ADDRESS_FOR_S11 = "fd00:0:0:4::191/64";
|
||||||
|
MME_PORT_FOR_S11 = 2123; # YOUR NETWORK CONFIG HERE
|
||||||
|
|
||||||
|
|
||||||
|
#S10 Interface
|
||||||
|
MME_INTERFACE_NAME_FOR_S10 = "lo"; # YOUR NETWORK CONFIG HERE
|
||||||
|
MME_IPV4_ADDRESS_FOR_S10 = "127.0.0.10/24"; # CIDR, YOUR NETWORK CONFIG HERE
|
||||||
|
# MME_IPV6_ADDRESS_FOR_S10 = "fd00:0:0:4::191/64";
|
||||||
|
MME_PORT_FOR_S10 = 2123; # YOUR NETWORK CONFIG HERE
|
||||||
|
};
|
||||||
|
|
||||||
|
LOGGING :
|
||||||
|
{
|
||||||
|
# OUTPUT choice in { "CONSOLE", `path to file`", "`IPv4@`:`TCP port num`"}
|
||||||
|
# `path to file` must start with '.' or '/'
|
||||||
|
# if TCP stream choice, then you can easily dump the traffic on the remote or local host: nc -l `TCP port num` > received.txt
|
||||||
|
OUTPUT = "CONSOLE";
|
||||||
|
THREAD_SAFE = "no"; # THREAD_SAFE choice in { "yes", "no" }, safe to let 'no'
|
||||||
|
COLOR = "yes"; # COLOR choice in { "yes", "no" } means use of ANSI styling codes or no
|
||||||
|
# Log level choice in { "EMERGENCY", "ALERT", "CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG", "TRACE"}
|
||||||
|
SCTP_LOG_LEVEL = "TRACE";
|
||||||
|
S10_LOG_LEVEL = "TRACE";
|
||||||
|
S11_LOG_LEVEL = "TRACE";
|
||||||
|
# NEW LOGS FOR MCE
|
||||||
|
SM_LOG_LEVEL = "TRACE";
|
||||||
|
MCE_APP_LOG_LEVEL = "TRACE";
|
||||||
|
M2AP_LOG_LEVEL = "TRACE";
|
||||||
|
GTPV2C_LOG_LEVEL = "TRACE";
|
||||||
|
UDP_LOG_LEVEL = "DEBUG";
|
||||||
|
S1AP_LOG_LEVEL = "DEBUG";
|
||||||
|
NAS_LOG_LEVEL = "TRACE";
|
||||||
|
MME_APP_LOG_LEVEL = "TRACE";
|
||||||
|
S6A_LOG_LEVEL = "TRACE";
|
||||||
|
UTIL_LOG_LEVEL = "ERROR";
|
||||||
|
MSC_LOG_LEVEL = "ERROR";
|
||||||
|
ITTI_LOG_LEVEL = "ERROR";
|
||||||
|
ASN1_VERBOSITY = "annoying";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# WRR_LIST_SELECTION = (
|
||||||
|
# {ID="tac-lb03.tac-hb00.tac.epc.mnc001.mcc001.3gppnetwork.org" ; SGW_IP_ADDRESS_FOR_S11="192.168.61.196";},
|
||||||
|
# {ID="tac-lb01.tac-hb00.tac.epc.mnc097.mcc208.3gppnetwork.org" ; SGW_IP_ADDRESS_FOR_S11="192.168.61.196";},
|
||||||
|
# {ID="tac-lb02.tac-hb00.tac.epc.mnc097.mcc208.3gppnetwork.org" ; MME_IP_ADDRESS_FOR_S10="0.0.0.0";},
|
||||||
|
# {ID="tac-lb03.tac-hb00.tac.epc.mnc097.mcc208.3gppnetwork.org" ; MME_IP_ADDRESS_FOR_S10="0.0.0.0";}
|
||||||
|
# );
|
||||||
|
WRR_LIST_SELECTION = (
|
||||||
|
{ID="tac-lb01.tac-hb00.tac.epc.mnc097.mcc208.3gppnetwork.org" ; SGW_IP_ADDRESS_FOR_S11="192.168.61.196";}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
@@ -56,9 +56,7 @@ MME :
|
|||||||
|
|
||||||
# ------- MME served TAIs
|
# ------- MME served TAIs
|
||||||
TAI_LIST = (
|
TAI_LIST = (
|
||||||
{MCC="208" ; MNC="97"; TAC = "1"; },
|
{MCC="208" ; MNC="97"; TAC = "1"; }
|
||||||
{MCC="208" ; MNC="97"; TAC = "2"; },
|
|
||||||
{MCC="208" ; MNC="97"; TAC = "3"; }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
TAC_LIST = (
|
TAC_LIST = (
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
enb_mono_fdd:
|
||||||
|
image: oai-enb:latest
|
||||||
|
privileged: true
|
||||||
|
container_name: nsa-b200-enb
|
||||||
|
environment:
|
||||||
|
USE_FDD_MONO: 'yes'
|
||||||
|
USE_B2XX: 'yes'
|
||||||
|
ENB_NAME: eNB-in-docker
|
||||||
|
MCC: '222'
|
||||||
|
MNC: '01'
|
||||||
|
MNC_LENGTH: 2
|
||||||
|
TAC: 1
|
||||||
|
UTRA_BAND_ID: 7
|
||||||
|
DL_FREQUENCY_IN_MHZ: 2680
|
||||||
|
UL_FREQUENCY_OFFSET_IN_MHZ: 120
|
||||||
|
NID_CELL: 0
|
||||||
|
NB_PRB: 25
|
||||||
|
ENABLE_MEASUREMENT_REPORTS: 'yes'
|
||||||
|
ENABLE_X2: 'yes'
|
||||||
|
MME_S1C_IP_ADDRESS: 192.168.18.210
|
||||||
|
ENB_S1C_IF_NAME: eth0
|
||||||
|
ENB_S1C_IP_ADDRESS: 192.168.68.130
|
||||||
|
ENB_S1U_IF_NAME: eth0
|
||||||
|
ENB_S1U_IP_ADDRESS: 192.168.68.130
|
||||||
|
ENB_X2_IP_ADDRESS: 192.168.68.130
|
||||||
|
RRC_INACTIVITY_THRESHOLD: 0
|
||||||
|
FLEXRAN_ENABLED: 'no'
|
||||||
|
FLEXRAN_INTERFACE_NAME: eth0
|
||||||
|
FLEXRAN_IPV4_ADDRESS: 192.168.18.210
|
||||||
|
THREAD_PARALLEL_CONFIG: PARALLEL_RU_L1_TRX_SPLIT
|
||||||
|
volumes:
|
||||||
|
- /dev:/dev
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.68.130
|
||||||
|
healthcheck:
|
||||||
|
# pgrep does NOT work
|
||||||
|
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
name: nsa-b200-enb-net
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 192.168.68.128/26
|
||||||
|
driver_opts:
|
||||||
|
com.docker.network.bridge.name: "nsa-enb-net"
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
gnb_mono_tdd:
|
||||||
|
image: oai-gnb:latest
|
||||||
|
privileged: true
|
||||||
|
container_name: nsa-b200-gnb
|
||||||
|
environment:
|
||||||
|
USE_NSA_TDD_MONO: 'yes'
|
||||||
|
USE_B2XX: 'yes'
|
||||||
|
GNB_NAME: gNB-in-docker
|
||||||
|
MCC: '222'
|
||||||
|
MNC: '01'
|
||||||
|
MNC_LENGTH: 2
|
||||||
|
TAC: 1
|
||||||
|
ENABLE_X2: 'yes'
|
||||||
|
ENB_X2_IP_ADDRESS: 192.168.68.130
|
||||||
|
MME_S1C_IP_ADDRESS: 192.168.18.210
|
||||||
|
GNB_S1C_IF_NAME: eth0
|
||||||
|
GNB_S1C_IP_ADDRESS: 192.168.68.194
|
||||||
|
GNB_S1U_IF_NAME: eth0
|
||||||
|
GNB_S1U_IP_ADDRESS: 192.168.68.194
|
||||||
|
GNB_X2_IP_ADDRESS: 192.168.68.194
|
||||||
|
RRC_INACTIVITY_THRESHOLD: 0
|
||||||
|
FLEXRAN_ENABLED: 'no'
|
||||||
|
FLEXRAN_INTERFACE_NAME: eth0
|
||||||
|
FLEXRAN_IPV4_ADDRESS: 192.168.18.210
|
||||||
|
THREAD_PARALLEL_CONFIG: PARALLEL_RU_L1_TRX_SPLIT
|
||||||
|
USE_ADDITIONAL_OPTIONS: '-E -q'
|
||||||
|
volumes:
|
||||||
|
- /dev:/dev
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.68.194
|
||||||
|
#entrypoint: /bin/bash -c "sleep infinity"
|
||||||
|
healthcheck:
|
||||||
|
# pgrep does NOT work
|
||||||
|
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
name: nsa-b200-gnb-net
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 192.168.68.192/26
|
||||||
|
driver_opts:
|
||||||
|
com.docker.network.bridge.name: "nsa-gnb-net"
|
||||||
@@ -982,8 +982,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
|||||||
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
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(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
||||||
add_boolean_option(DEADLINE_SCHEDULER False "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(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
|
||||||
@@ -1044,7 +1042,6 @@ add_boolean_option(JUMBO_FRAME True "ENABLE LARGE SDU in ACCESS STR
|
|||||||
##########################
|
##########################
|
||||||
# RLC LAYER OPTIONS
|
# RLC LAYER OPTIONS
|
||||||
##########################
|
##########################
|
||||||
add_boolean_option(OPENAIR2 True "Access Stratum layer 2 built in executable")
|
|
||||||
add_boolean_option(TRACE_RLC_PAYLOAD False "Fatal assert in this case")
|
add_boolean_option(TRACE_RLC_PAYLOAD False "Fatal assert in this case")
|
||||||
add_boolean_option(RLC_STOP_ON_LOST_PDU False "Fatal assert in this case")
|
add_boolean_option(RLC_STOP_ON_LOST_PDU False "Fatal assert in this case")
|
||||||
|
|
||||||
@@ -1072,8 +1069,6 @@ add_boolean_option(TRACE_RLC_UM_TX_STATUS False "TRACE for RLC UM, TO BE CHANGE
|
|||||||
##########################
|
##########################
|
||||||
# PDCP LAYER OPTIONS
|
# PDCP LAYER OPTIONS
|
||||||
##########################
|
##########################
|
||||||
#add_boolean_option(PDCP_USE_NETLINK False "For eNB, PDCP communicate with a NETLINK socket if connected to network driver, else could use a RT-FIFO")
|
|
||||||
#add_boolean_option(PDCP_USE_NETLINK_QUEUES False "When PDCP_USE_NETLINK is true, incoming IP packets are stored in queues")
|
|
||||||
#add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER False "For eNB, PDCP communicate with a IP driver")
|
#add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER False "For eNB, PDCP communicate with a IP driver")
|
||||||
#add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U True "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)")
|
#add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U True "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)")
|
||||||
|
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ function main() {
|
|||||||
if [ "$HW" == "OAI_USRP" ] ; then
|
if [ "$HW" == "OAI_USRP" ] ; then
|
||||||
echo_info "installing packages for USRP support"
|
echo_info "installing packages for USRP support"
|
||||||
check_install_usrp_uhd_driver
|
check_install_usrp_uhd_driver
|
||||||
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
if [ ! -v BUILD_UHD_FROM_SOURCE ] && [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
||||||
install_usrp_uhd_driver $UHD_IMAGES_DIR
|
install_usrp_uhd_driver $UHD_IMAGES_DIR
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -117,6 +117,9 @@ check_supported_distribution() {
|
|||||||
"rhel8.2") return 0 ;;
|
"rhel8.2") return 0 ;;
|
||||||
"rhel8.3") return 0 ;;
|
"rhel8.3") return 0 ;;
|
||||||
"rhel8.4") return 0 ;;
|
"rhel8.4") return 0 ;;
|
||||||
|
"rhel8.5") return 0 ;;
|
||||||
|
"rhel8.6") return 0 ;;
|
||||||
|
"rhel8.7") return 0 ;;
|
||||||
"centos7") return 0 ;;
|
"centos7") return 0 ;;
|
||||||
esac
|
esac
|
||||||
return 1
|
return 1
|
||||||
@@ -317,19 +320,30 @@ install_usrp_uhd_driver_from_source(){
|
|||||||
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
|
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
|
||||||
(
|
(
|
||||||
pushd /tmp
|
pushd /tmp
|
||||||
echo "Downloading UHD driver"
|
echo "Cloning UHD driver repository"
|
||||||
rm -rf /tmp/uhd
|
rm -rf /tmp/uhd
|
||||||
git clone https://github.com/EttusResearch/uhd.git
|
git clone https://github.com/EttusResearch/uhd.git
|
||||||
cd uhd
|
cd uhd
|
||||||
git checkout tags/v4.0.0.0
|
if [[ -v UHD_VERSION ]]; then
|
||||||
|
git checkout tags/v${UHD_VERSION}
|
||||||
|
else
|
||||||
|
git checkout tags/v4.0.0.0
|
||||||
|
fi
|
||||||
mkdir -p host/build
|
mkdir -p host/build
|
||||||
cd host/build
|
cd host/build || true
|
||||||
$CMAKE ../
|
$CMAKE ../ -GNinja
|
||||||
echo "Compiling UHD"
|
echo "Compiling UHD"
|
||||||
make -j`nproc`
|
ninja
|
||||||
make test
|
$SUDO ninja install
|
||||||
$SUDO make install
|
|
||||||
$SUDO ldconfig -v
|
$SUDO ldconfig -v
|
||||||
|
if [ $IS_CONTAINER -eq 0 ]; then
|
||||||
|
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||||
|
$SUDO /usr/local/lib/uhd/utils/uhd_images_downloader.py
|
||||||
|
fi
|
||||||
|
if [[ "$OS_DISTRO" == "rhel" ]]; then
|
||||||
|
$SUDO /usr/local/lib64/uhd/utils/uhd_images_downloader.py
|
||||||
|
fi
|
||||||
|
fi
|
||||||
popd
|
popd
|
||||||
rm -rf /tmp/uhd
|
rm -rf /tmp/uhd
|
||||||
) >& $uhd_install_log
|
) >& $uhd_install_log
|
||||||
@@ -338,10 +352,26 @@ install_usrp_uhd_driver_from_source(){
|
|||||||
check_install_usrp_uhd_driver(){
|
check_install_usrp_uhd_driver(){
|
||||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||||
#first we remove old installation
|
#first we remove old installation
|
||||||
$SUDO apt-get remove -y uhd || true
|
$SUDO apt-get remove uhd -y || true
|
||||||
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y || true
|
$SUDO apt-get remove uhd-host -y || true
|
||||||
|
$SUDO apt-get remove libuhd-dev -y || true
|
||||||
|
$SUDO apt-get remove libuhd003 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.13.1 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.14.0 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.14.1 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.15.0 -y || true
|
||||||
|
local distribution=$(get_distribution_release)
|
||||||
|
if [[ "$distribution" == "ubuntu18.04" ]]; then
|
||||||
|
$SUDO apt-get remove libuhd4.0.0 -y || true
|
||||||
|
$SUDO apt-get remove libuhd4.1.0 -y || true
|
||||||
|
fi
|
||||||
v=$(lsb_release -cs)
|
v=$(lsb_release -cs)
|
||||||
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
|
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
|
||||||
|
if [[ -v BUILD_UHD_FROM_SOURCE ]]; then
|
||||||
|
$SUDO apt-get install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-setuptools ninja-build
|
||||||
|
install_usrp_uhd_driver_from_source
|
||||||
|
return
|
||||||
|
fi
|
||||||
# The new USRP repository
|
# The new USRP repository
|
||||||
# Raphael Defosseux: Adding a loop on adding PPA because in CI the gpg key retrieve may
|
# Raphael Defosseux: Adding a loop on adding PPA because in CI the gpg key retrieve may
|
||||||
# timeout due to proxy / network latencies in Eurecom on VM
|
# timeout due to proxy / network latencies in Eurecom on VM
|
||||||
@@ -361,7 +391,12 @@ check_install_usrp_uhd_driver(){
|
|||||||
done
|
done
|
||||||
$SUDO apt-get update
|
$SUDO apt-get update
|
||||||
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
|
$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
|
if [[ "$distribution" == "ubuntu16.04" ]]; then
|
||||||
|
$SUDO apt-get -y install libuhd-dev libuhd3.15.0 uhd-host
|
||||||
|
fi
|
||||||
|
if [[ "$distribution" == "ubuntu18.04" ]]; then
|
||||||
|
$SUDO apt-get -y install libuhd-dev libuhd4.1.0 uhd-host
|
||||||
|
fi
|
||||||
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||||
if [ $IS_CONTAINER -eq 0 ]
|
if [ $IS_CONTAINER -eq 0 ]
|
||||||
then
|
then
|
||||||
@@ -692,6 +727,7 @@ check_install_oai_software() {
|
|||||||
build-essential \
|
build-essential \
|
||||||
$CMAKE \
|
$CMAKE \
|
||||||
cmake-curses-gui \
|
cmake-curses-gui \
|
||||||
|
curl \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
doxygen \
|
doxygen \
|
||||||
doxygen-gui \
|
doxygen-gui \
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include"log.h"
|
#include "log.h"
|
||||||
|
|
||||||
extern log_t *g_log;
|
extern log_t *g_log;
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ nr_bandentry_t nr_bandtable[] = {
|
|||||||
{41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
{41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
||||||
{41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
{41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
||||||
{47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15},
|
{47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15},
|
||||||
//{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15},
|
{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15},
|
||||||
//{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30},
|
{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30},
|
||||||
{50, 1432000, 1517000, 1432000, 1517000, 20, 286400, 100},
|
{50, 1432000, 1517000, 1432000, 1517000, 20, 286400, 100},
|
||||||
{51, 1427000, 1432000, 1427000, 1432000, 20, 285400, 100},
|
{51, 1427000, 1432000, 1427000, 1432000, 20, 285400, 100},
|
||||||
{53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100},
|
{53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100},
|
||||||
@@ -90,14 +90,15 @@ nr_bandentry_t nr_bandtable[] = {
|
|||||||
{84, 1920000, 1980000, 000, 000, 20, 384000, 100},
|
{84, 1920000, 1980000, 000, 000, 20, 384000, 100},
|
||||||
{86, 1710000, 1785000, 000, 000, 20, 342000, 100},
|
{86, 1710000, 1785000, 000, 000, 20, 342000, 100},
|
||||||
{89, 824000, 849000, 000, 000, 20, 342000, 100},
|
{89, 824000, 849000, 000, 000, 20, 342000, 100},
|
||||||
{90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
{90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
||||||
{90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
{90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
||||||
{90, 2496000, 2690000, 2496000, 2690000, 20, 499200, 100},
|
{90, 2496000, 2690000, 2496000, 2690000, 20, 499200, 100},
|
||||||
{91, 832000, 862000, 1427000, 1432000, 20, 285400, 100},
|
{91, 832000, 862000, 1427000, 1432000, 20, 285400, 100},
|
||||||
{92, 832000, 862000, 1432000, 1517000, 20, 286400, 100},
|
{92, 832000, 862000, 1432000, 1517000, 20, 286400, 100},
|
||||||
{93, 880000, 915000, 1427000, 1432000, 20, 285400, 100},
|
{93, 880000, 915000, 1427000, 1432000, 20, 285400, 100},
|
||||||
{94, 880000, 915000, 1432000, 1517000, 20, 286400, 100},
|
{94, 880000, 915000, 1432000, 1517000, 20, 286400, 100},
|
||||||
{95, 2010000, 2025000, 000, 000, 20, 402000, 100},
|
{95, 2010000, 2025000, 000, 000, 20, 402000, 100},
|
||||||
|
{96, 5925000, 7125000, 5925000, 7125000, 1, 795000, 15},
|
||||||
{257,26500020,29500000,26500020,29500000, 1,2054166, 60},
|
{257,26500020,29500000,26500020,29500000, 1,2054166, 60},
|
||||||
{257,26500080,29500000,26500080,29500000, 2,2054167, 120},
|
{257,26500080,29500000,26500080,29500000, 2,2054167, 120},
|
||||||
{258,24250080,27500000,24250080,27500000, 1,2016667, 60},
|
{258,24250080,27500000,24250080,27500000, 1,2016667, 60},
|
||||||
@@ -437,9 +438,17 @@ int get_nr_table_idx(int nr_bandP, uint8_t scs_index) {
|
|||||||
AssertFatal(nr_bandP <= nr_bandtable[nr_bandtable_size-1].band, "NR band %d exceeds NR bands table maximum limit %d\n", nr_bandP, nr_bandtable[nr_bandtable_size-1].band);
|
AssertFatal(nr_bandP <= nr_bandtable[nr_bandtable_size-1].band, "NR band %d exceeds NR bands table maximum limit %d\n", nr_bandP, nr_bandtable[nr_bandtable_size-1].band);
|
||||||
for (i = 0; i < nr_bandtable_size && nr_bandtable[i].band != nr_bandP; i++);
|
for (i = 0; i < nr_bandtable_size && nr_bandtable[i].band != nr_bandP; i++);
|
||||||
|
|
||||||
// selection of correct Deltaf raster according to SCS
|
// In frequency bands with two deltaFRaster,
|
||||||
if ((nr_bandtable[i].deltaf_raster != 100) && (nr_bandtable[i].deltaf_raster != scs_khz))
|
// the higher deltaFRaster applies to channels using only the SCS that is equal to or larger than the higher deltaFRaster
|
||||||
|
// and SSB SCS is equal to the higher deltaFRaster.
|
||||||
|
while(((i+1)<nr_bandtable_size) &&
|
||||||
|
(nr_bandtable[i+1].band == nr_bandtable[i].band) &&
|
||||||
|
(nr_bandtable[i].deltaf_raster != scs_khz)) {
|
||||||
i++;
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
AssertFatal(nr_bandtable[i].band == nr_bandP, "Found band table %d does not correspond to the input one %d\n",nr_bandtable[i].band,nr_bandP);
|
||||||
|
|
||||||
|
|
||||||
LOG_D(PHY, "NR band table index %d (Band %d, dl_min %lu, ul_min %lu)\n", i, nr_bandtable[i].band, nr_bandtable[i].dl_min,nr_bandtable[i].ul_min);
|
LOG_D(PHY, "NR band table index %d (Band %d, dl_min %lu, ul_min %lu)\n", i, nr_bandtable[i].band, nr_bandtable[i].dl_min,nr_bandtable[i].ul_min);
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,21 @@ You can build any oai softmodem executable separately, you may not need all of t
|
|||||||
|
|
||||||
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel15.
|
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel15.
|
||||||
|
|
||||||
|
When installing the pre-requisites, especially the `UHD` driver, you can now specify if you want to install from source or not.
|
||||||
|
|
||||||
|
- For `fedora`-based OS, it was already the case all the time. But now you can specify which version to install.
|
||||||
|
- For `ubuntu` OS, the Ettus PPA currently installs the following versions:
|
||||||
|
* `Ubuntu16.04`: --> version `3.15.0.0`
|
||||||
|
* `Ubuntu18.04`: --> version `4.1.0.0`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export BUILD_UHD_FROM_SOURCE=True
|
||||||
|
export UHD_VERSION=3.15.0.0
|
||||||
|
./build_oai -I -w USRP
|
||||||
|
```
|
||||||
|
|
||||||
|
The `UHD_VERSION` env variable `SHALL` be a valid tag (minus `v`) from the `https://github.com/EttusResearch/uhd.git` repository.
|
||||||
|
|
||||||
## Issue when building `nasmeh` module ##
|
## Issue when building `nasmeh` module ##
|
||||||
|
|
||||||
A lot of users and contributors have faced the issue: `nasmesh` module does not build.
|
A lot of users and contributors have faced the issue: `nasmesh` module does not build.
|
||||||
|
|||||||
+5
-4
@@ -104,7 +104,7 @@ The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support
|
|||||||
- RLC interface (AM, UM)
|
- RLC interface (AM, UM)
|
||||||
- UL power control
|
- UL power control
|
||||||
- Link adaptation
|
- Link adaptation
|
||||||
- Connected DRX (CDRX) support for FDD LTE UE. Compatible with R13 from 3GPP. Support for Cat-M1 UE comming soon.
|
- Connected DRX (CDRX) support for FDD LTE UE. Compatible with R13 from 3GPP. Support for Cat-M1 UE comming soon.
|
||||||
|
|
||||||
## eNB RLC Layer ##
|
## eNB RLC Layer ##
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provid
|
|||||||
- PRACH preamble format 0
|
- PRACH preamble format 0
|
||||||
- All downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH
|
- All downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH
|
||||||
- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
|
- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
|
||||||
- LTE MBMS-dedicated cell (feMBMS) procedures subset for LTE release 14 (experimental)
|
- LTE MBMS-dedicated cell (feMBMS) procedures subset for LTE release 14 (experimental)
|
||||||
- LTE non-MBSFN subframe (feMBMS) Carrier Adquistion Subframe-CAS procedures (PSS/SSS/PBCH/PDSH) (experimental)
|
- LTE non-MBSFN subframe (feMBMS) Carrier Adquistion Subframe-CAS procedures (PSS/SSS/PBCH/PDSH) (experimental)
|
||||||
- LTE MBSFN MBSFN subframe channel (feMBMS): PMCH (CS@1.25KHz) (channel estimation for 25MHz bandwidth) (experimental)
|
- LTE MBSFN MBSFN subframe channel (feMBMS): PMCH (CS@1.25KHz) (channel estimation for 25MHz bandwidth) (experimental)
|
||||||
|
|
||||||
@@ -313,6 +313,7 @@ The following features are valid for the gNB and the 5G-NR UE.
|
|||||||
- MAC downlink scheduler
|
- MAC downlink scheduler
|
||||||
- phy-test scheduler (fixed allocation and usable also without UE)
|
- phy-test scheduler (fixed allocation and usable also without UE)
|
||||||
- regular scheduler with dynamic allocation
|
- regular scheduler with dynamic allocation
|
||||||
|
- MCS adaptation from HARQ BLER
|
||||||
- MAC header generation (including timing advance)
|
- MAC header generation (including timing advance)
|
||||||
- ACK / NACK handling and HARQ procedures for downlink
|
- ACK / NACK handling and HARQ procedures for downlink
|
||||||
- MAC uplink scheduler
|
- MAC uplink scheduler
|
||||||
@@ -398,7 +399,7 @@ The following features are valid for the gNB and the 5G-NR UE.
|
|||||||
- Creates TUN interface to PDCP to inject and receive user-place traffic
|
- Creates TUN interface to PDCP to inject and receive user-place traffic
|
||||||
- No connection to the core network
|
- No connection to the core network
|
||||||
* Supporting Standalone (SA) mode:
|
* Supporting Standalone (SA) mode:
|
||||||
- UE can register with the 5G Core Network, establish a PDU Session and exchange user-plane traffic
|
- UE can register with the 5G Core Network, establish a PDU Session and exchange user-plane traffic
|
||||||
|
|
||||||
## NR UE PHY Layer ##
|
## NR UE PHY Layer ##
|
||||||
|
|
||||||
@@ -484,7 +485,7 @@ The following features are valid for the gNB and the 5G-NR UE.
|
|||||||
- Interfaces with PDCP, MAC
|
- Interfaces with PDCP, MAC
|
||||||
|
|
||||||
**UE PDCP**
|
**UE PDCP**
|
||||||
* Tx/Rx operations according to 38.323 Rel.16
|
* Tx/Rx operations according to 38.323 Rel.16
|
||||||
- Integrity protection and ciphering procedures
|
- Integrity protection and ciphering procedures
|
||||||
- Sequence number management, SDU dicard and in-order delivery
|
- Sequence number management, SDU dicard and in-order delivery
|
||||||
- Radio bearer establishment/handling and association with PDCP entities
|
- Radio bearer establishment/handling and association with PDCP entities
|
||||||
|
|||||||
@@ -41,17 +41,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters
|
|||||||
|
|
||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
|
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
|
||||||
RUN yum update -y && \
|
RUN yum update -y && \
|
||||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
nettle \
|
nettle \
|
||||||
|
tzdata \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
iproute \
|
iproute \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -78,6 +84,8 @@ COPY --from=enb-build /lib64/libconfig.so.9 /lib64
|
|||||||
COPY --from=enb-build /lib64/libblas.so.3 /lib64
|
COPY --from=enb-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=enb-build /lib64/liblapack.so.3 /lib64
|
COPY --from=enb-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=enb-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=enb-build /lib64/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -88,7 +96,14 @@ COPY --from=enb-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=enb-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=enb-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#
|
#
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
FROM ran-build:latest AS enb-build
|
FROM ran-build:latest AS enb-build
|
||||||
|
|
||||||
RUN rm -Rf /oai-ran
|
RUN rm -Rf /oai-ran
|
||||||
WORKDIR /oai-ran
|
WORKDIR /oai-ran
|
||||||
@@ -42,8 +42,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters
|
|||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM ubuntu:bionic as oai-enb
|
FROM ubuntu:bionic as oai-enb
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Europe
|
ENV TZ=Europe/Paris
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||||
@@ -60,16 +59,12 @@ RUN apt-get update && \
|
|||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iperf \
|
iperf \
|
||||||
libyaml-0-2 && \
|
|
||||||
# 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 \
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
libusb-1.0-0 \
|
libusb-1.0-0 \
|
||||||
libuhd003 \
|
libyaml-0-2 && \
|
||||||
uhd-host && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-enb/bin
|
WORKDIR /opt/oai-enb/bin
|
||||||
@@ -90,6 +85,17 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/
|
|||||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||||
|
|
||||||
COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=enb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=enb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters
|
|||||||
|
|
||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
|
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
|
||||||
RUN yum repolist --disablerepo=* && \
|
RUN yum repolist --disablerepo=* && \
|
||||||
yum update -y && \
|
yum update -y && \
|
||||||
@@ -51,9 +52,14 @@ RUN yum repolist --disablerepo=* && \
|
|||||||
atlas \
|
atlas \
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
nettle \
|
nettle \
|
||||||
|
tzdata \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -84,6 +90,8 @@ COPY --from=gnb-build /lib64/libforms.so.2 /lib64
|
|||||||
COPY --from=gnb-build /lib64/libblas.so.3 /lib64
|
COPY --from=gnb-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=gnb-build /lib64/liblapack.so.3 /lib64
|
COPY --from=gnb-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -94,7 +102,14 @@ COPY --from=gnb-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=gnb-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=gnb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=gnb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=gnb-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -59,16 +59,12 @@ RUN apt-get update && \
|
|||||||
net-tools \
|
net-tools \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
libyaml-0-2 && \
|
|
||||||
# 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 \
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
libusb-1.0-0 \
|
libusb-1.0-0 \
|
||||||
libuhd003 \
|
libyaml-0-2 && \
|
||||||
uhd-host && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-gnb/bin
|
WORKDIR /opt/oai-gnb/bin
|
||||||
@@ -93,6 +89,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/
|
|||||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||||
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=gnb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=gnb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
# Copy the relevant configuration files for gNB
|
# Copy the relevant configuration files for gNB
|
||||||
|
|||||||
@@ -48,9 +48,13 @@ RUN yum update -y && \
|
|||||||
tzdata \
|
tzdata \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
iproute && \
|
iproute && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -66,11 +70,12 @@ 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/targets/bin/libparams_libconfig.so .
|
||||||
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.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/libconfig.so.9 /lib64
|
||||||
COPY --from=ru-build /lib64/libblas.so.3 /lib64
|
COPY --from=ru-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=ru-build /lib64/liblapack.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/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Copying from the ran-build image the USRP needed packages
|
||||||
COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /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_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_filesystem.so.1.66.0 /lib64
|
||||||
@@ -81,7 +86,14 @@ 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_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_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=ru-build /lib64/libboost_timer.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
|
COPY --from=ru-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=ru-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=ru-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=ru-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.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/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
||||||
|
|||||||
@@ -54,17 +54,13 @@ RUN apt-get update && \
|
|||||||
libatlas3-base \
|
libatlas3-base \
|
||||||
libconfig9 \
|
libconfig9 \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
|
libusb-1.0-0 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 && \
|
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/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-lte-ru/bin
|
WORKDIR /opt/oai-lte-ru/bin
|
||||||
@@ -78,6 +74,19 @@ 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/liboai_usrpdevif.so.Rel15 .
|
||||||
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||||
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=ru-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=ru-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.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/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" && \
|
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
|
||||||
|
|||||||
@@ -42,17 +42,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet
|
|||||||
|
|
||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
|
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
|
||||||
RUN yum update -y && \
|
RUN yum update -y && \
|
||||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
nettle \
|
nettle \
|
||||||
|
tzdata \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
iproute \
|
iproute \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -82,6 +88,8 @@ COPY --from=lte-ue-build /lib64/libconfig.so.9 /lib64
|
|||||||
COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64
|
COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64
|
COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -92,7 +100,14 @@ COPY --from=lte-ue-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=lte-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=lte-ue-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet
|
|||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM ubuntu:bionic as oai-lte-ue
|
FROM ubuntu:bionic as oai-lte-ue
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Europe
|
ENV TZ=Europe/Paris
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||||
@@ -58,19 +57,15 @@ RUN apt-get update && \
|
|||||||
libconfig9 \
|
libconfig9 \
|
||||||
openssl \
|
openssl \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
|
libusb-1.0-0 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iperf \
|
iperf \
|
||||||
libyaml-0-2 && \
|
libyaml-0-2 && \
|
||||||
# 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/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-lte-ue/bin
|
WORKDIR /opt/oai-lte-ue/bin
|
||||||
@@ -95,6 +90,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
|
|||||||
|
|
||||||
COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
# Copy the relevant configuration files for UE
|
# Copy the relevant configuration files for UE
|
||||||
|
|||||||
@@ -51,9 +51,13 @@ RUN yum update -y && \
|
|||||||
iputils \
|
iputils \
|
||||||
iproute \
|
iproute \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
libXpm \
|
libXpm \
|
||||||
libX11 \
|
libX11 \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -87,6 +91,8 @@ COPY --from=nr-ue-build /lib64/libblas.so.3 /lib64
|
|||||||
COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64
|
COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64
|
COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -97,7 +103,15 @@ COPY --from=nr-ue-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=nr-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=nr-ue-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -55,19 +55,15 @@ RUN apt-get update && \
|
|||||||
libconfig9 \
|
libconfig9 \
|
||||||
openssl \
|
openssl \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
|
libusb-1.0-0 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iperf \
|
iperf \
|
||||||
libyaml-0-2 && \
|
libyaml-0-2 && \
|
||||||
# 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/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-nr-ue/bin
|
WORKDIR /opt/oai-nr-ue/bin
|
||||||
@@ -95,6 +91,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
|
|||||||
|
|
||||||
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
WORKDIR /opt/oai-nr-ue
|
WORKDIR /opt/oai-nr-ue
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
|
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
|
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
|
||||||
ARG NEEDED_GIT_PROXY
|
ARG NEEDED_GIT_PROXY
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
ENV BUILD_UHD_FROM_SOURCE=True
|
||||||
|
ENV UHD_VERSION=3.15.0.0
|
||||||
|
|
||||||
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
|
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
|
||||||
COPY tmp/entitlement/*.pem /etc/pki/entitlement
|
COPY tmp/entitlement/*.pem /etc/pki/entitlement
|
||||||
|
|||||||
@@ -29,8 +29,9 @@
|
|||||||
FROM ubuntu:bionic AS ran-build
|
FROM ubuntu:bionic AS ran-build
|
||||||
ARG NEEDED_GIT_PROXY
|
ARG NEEDED_GIT_PROXY
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Europe
|
ENV TZ=Europe/Paris
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
ENV BUILD_UHD_FROM_SOURCE=True
|
||||||
|
ENV UHD_VERSION=3.15.0.0
|
||||||
|
|
||||||
#install developers pkg/repo
|
#install developers pkg/repo
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ $PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# in case we have conf file, append
|
# in case we have conf file, append
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# in case we have conf file, append
|
# in case we have conf file, append
|
||||||
|
|||||||
+46
-33
@@ -76,10 +76,6 @@
|
|||||||
#include "gnb_paramdef.h"
|
#include "gnb_paramdef.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_extern.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "s1ap_eNB.h"
|
#include "s1ap_eNB.h"
|
||||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||||
#include <executables/softmodem-common.h>
|
#include <executables/softmodem-common.h>
|
||||||
@@ -112,6 +108,7 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
|
|||||||
|
|
||||||
//#define TICK_TO_US(ts) (ts.diff)
|
//#define TICK_TO_US(ts) (ts.diff)
|
||||||
#define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials)
|
#define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials)
|
||||||
|
#define L1STATSSTRLEN 16384
|
||||||
|
|
||||||
|
|
||||||
void tx_func(void *param) {
|
void tx_func(void *param) {
|
||||||
@@ -333,46 +330,63 @@ void rx_func(void *param) {
|
|||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
static void *process_stats_thread(void *param) {
|
static void dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output) {
|
||||||
|
int stroff = 0;
|
||||||
|
stroff += print_meas_log(gNB->phy_proc_tx_0, "L1 Tx processing thread 0", NULL, NULL, output);
|
||||||
|
stroff += print_meas_log(gNB->phy_proc_tx_1, "L1 Tx processing thread 1", NULL, NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&gNB->ul_indication_stats, "UL Indication", NULL, NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&gNB->ulsch_decoding_stats, "PUSCH decoding", NULL, NULL, output+stroff);
|
||||||
|
if (ru->feprx) stroff += print_meas_log(&ru->ofdm_demod_stats,"feprx",NULL,NULL, output+stroff);
|
||||||
|
|
||||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
if (ru->feptx_ofdm) {
|
||||||
|
stroff += print_meas_log(&ru->precoding_stats,"feptx_prec",NULL,NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&ru->ofdm_total_stats,"feptx_total",NULL,NULL, output+stroff);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ru->fh_north_asynch_in) stroff += print_meas_log(&ru->rx_fhaul,"rx_fhaul",NULL,NULL, output+stroff);
|
||||||
|
|
||||||
|
stroff += print_meas_log(&ru->tx_fhaul,"tx_fhaul",NULL,NULL, output+stroff);
|
||||||
|
|
||||||
|
if (ru->fh_north_out) {
|
||||||
|
stroff += print_meas_log(&ru->compression,"compression",NULL,NULL, output+stroff);
|
||||||
|
stroff += print_meas_log(&ru->transport,"transport",NULL,NULL, output+stroff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void *nrL1_stats_thread(void *param) {
|
||||||
|
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
||||||
|
RU_t *ru = RC.ru[0];
|
||||||
|
char output[L1STATSSTRLEN];
|
||||||
|
memset(output,0,L1STATSSTRLEN);
|
||||||
|
wait_sync("L1_stats_thread");
|
||||||
|
FILE *fd;
|
||||||
|
fd=fopen("nrL1_stats.log","w");
|
||||||
|
AssertFatal(fd!=NULL,"Cannot open nrL1_stats.log\n");
|
||||||
|
|
||||||
|
reset_meas(gNB->phy_proc_tx_0);
|
||||||
|
reset_meas(gNB->phy_proc_tx_1);
|
||||||
reset_meas(&gNB->dlsch_encoding_stats);
|
reset_meas(&gNB->dlsch_encoding_stats);
|
||||||
reset_meas(&gNB->phy_proc_rx);
|
reset_meas(&gNB->phy_proc_rx);
|
||||||
reset_meas(&gNB->ul_indication_stats);
|
reset_meas(&gNB->ul_indication_stats);
|
||||||
reset_meas(&gNB->rx_pusch_stats);
|
reset_meas(&gNB->rx_pusch_stats);
|
||||||
reset_meas(&gNB->ulsch_decoding_stats);
|
reset_meas(&gNB->ulsch_decoding_stats);
|
||||||
|
|
||||||
wait_sync("process_stats_thread");
|
|
||||||
|
|
||||||
while(!oai_exit)
|
|
||||||
{
|
|
||||||
sleep(1);
|
|
||||||
print_meas(gNB->phy_proc_tx_0, "L1 Tx processing thread 0", NULL, NULL);
|
|
||||||
print_meas(gNB->phy_proc_tx_1, "L1 Tx processing thread 1", NULL, NULL);
|
|
||||||
print_meas(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL);
|
|
||||||
print_meas(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL);
|
|
||||||
print_meas(&gNB->ul_indication_stats, "UL Indication", NULL, NULL);
|
|
||||||
print_meas(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL);
|
|
||||||
print_meas(&gNB->ulsch_decoding_stats, "PUSCH decoding", NULL, NULL);
|
|
||||||
}
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *nrL1_stats_thread(void *param) {
|
|
||||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
|
||||||
wait_sync("L1_stats_thread");
|
|
||||||
FILE *fd;
|
|
||||||
while (!oai_exit) {
|
while (!oai_exit) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
fd=fopen("nrL1_stats.log","w");
|
|
||||||
AssertFatal(fd!=NULL,"Cannot open nrL1_stats.log\n");
|
|
||||||
dump_nr_I0_stats(fd,gNB);
|
dump_nr_I0_stats(fd,gNB);
|
||||||
dump_pdsch_stats(fd,gNB);
|
dump_pdsch_stats(fd,gNB);
|
||||||
dump_pusch_stats(fd,gNB);
|
dump_pusch_stats(fd,gNB);
|
||||||
// nr_dump_uci_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx);
|
dump_L1_meas_stats(gNB, ru, output);
|
||||||
fclose(fd);
|
fprintf(fd,"%s\n",output);
|
||||||
|
fflush(fd);
|
||||||
|
fseek(fd,0,SEEK_SET);
|
||||||
}
|
}
|
||||||
|
fclose(fd);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,11 +447,10 @@ void init_gNB_Tpool(int inst) {
|
|||||||
initNotifiedFIFO(gNB->resp_RU_tx);
|
initNotifiedFIFO(gNB->resp_RU_tx);
|
||||||
notifiedFIFO_elt_t *msgRUTx = newNotifiedFIFO_elt(sizeof(processingData_RU_t),0,gNB->resp_RU_tx,ru_tx_func);
|
notifiedFIFO_elt_t *msgRUTx = newNotifiedFIFO_elt(sizeof(processingData_RU_t),0,gNB->resp_RU_tx,ru_tx_func);
|
||||||
processingData_RU_t *msgData = (processingData_RU_t*)msgRUTx->msgData;
|
processingData_RU_t *msgData = (processingData_RU_t*)msgRUTx->msgData;
|
||||||
msgData->next_slot = sf_ahead*gNB->frame_parms.slots_per_subframe; // first Tx slot
|
int first_tx_slot = sf_ahead*gNB->frame_parms.slots_per_subframe;
|
||||||
|
msgData->next_slot = get_next_downlink_slot(gNB, &gNB->gNB_config, 0, first_tx_slot-1);
|
||||||
pushNotifiedFIFO(gNB->resp_RU_tx,msgRUTx); // to unblock the process in the beginning
|
pushNotifiedFIFO(gNB->resp_RU_tx,msgRUTx); // to unblock the process in the beginning
|
||||||
|
|
||||||
// Stats measurement thread
|
|
||||||
if(opp_enabled == 1) threadCreate(&proc->process_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW);
|
|
||||||
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
|
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,10 +70,6 @@ static int DEFBFW[] = {0x00007fff};
|
|||||||
#include "GNB_APP/gnb_paramdef.h"
|
#include "GNB_APP/gnb_paramdef.h"
|
||||||
#include "common/config/config_userapi.h"
|
#include "common/config/config_userapi.h"
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_extern.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "s1ap_eNB.h"
|
#include "s1ap_eNB.h"
|
||||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||||
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
|
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
|
||||||
@@ -1512,7 +1508,6 @@ void init_RU_proc(RU_t *ru) {
|
|||||||
if (ru->feptx_ofdm) nr_init_feptx_thread(ru);
|
if (ru->feptx_ofdm) nr_init_feptx_thread(ru);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opp_enabled == 1) threadCreate(&ru->ru_stats_thread,ru_stats_thread,(void *)ru, "emulateRF", -1, OAI_PRIORITY_RT_LOW);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void kill_NR_RU_proc(int inst) {
|
void kill_NR_RU_proc(int inst) {
|
||||||
|
|||||||
@@ -30,12 +30,8 @@
|
|||||||
#include "PHY/types.h"
|
#include "PHY/types.h"
|
||||||
#include <threadPool/thread-pool.h>
|
#include <threadPool/thread-pool.h>
|
||||||
|
|
||||||
#if defined(ENABLE_USE_MME)
|
|
||||||
#include "s1ap_eNB.h"
|
#include "s1ap_eNB.h"
|
||||||
#ifdef PDCP_USE_NETLINK
|
|
||||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
||||||
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
||||||
|
|||||||
@@ -66,10 +66,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
|||||||
|
|
||||||
//#include "PHY/TOOLS/time_meas.h"
|
//#include "PHY/TOOLS/time_meas.h"
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_vars.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "intertask_interface.h"
|
#include "intertask_interface.h"
|
||||||
|
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
@@ -692,15 +688,10 @@ int main( int argc, char **argv ) {
|
|||||||
// initialize mscgen log after ITTI
|
// initialize mscgen log after ITTI
|
||||||
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
|
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
|
||||||
init_opt();
|
init_opt();
|
||||||
#ifdef PDCP_USE_NETLINK
|
if(PDCP_USE_NETLINK)
|
||||||
|
if(!IS_SOFTMODEM_NOS1)
|
||||||
if(!IS_SOFTMODEM_NOS1)
|
netlink_init();
|
||||||
netlink_init();
|
|
||||||
|
|
||||||
#if defined(PDCP_USE_NETLINK_QUEUES)
|
|
||||||
pdcp_netlink_init();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifndef PACKAGE_VERSION
|
#ifndef PACKAGE_VERSION
|
||||||
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+9
-7
@@ -19,6 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <openair1/PHY/impl_defs_top.h>
|
||||||
#include "executables/nr-uesoftmodem.h"
|
#include "executables/nr-uesoftmodem.h"
|
||||||
#include "PHY/phy_extern_nr_ue.h"
|
#include "PHY/phy_extern_nr_ue.h"
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
@@ -87,11 +88,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NO_RAT_NR
|
|
||||||
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX) /* for NR this will certainly depends to such UE capability which is not yet defined */
|
|
||||||
#else
|
|
||||||
#define DURATION_RX_TO_TX (6) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
|
|
||||||
#endif
|
|
||||||
#define RX_JOB_ID 0x1010
|
#define RX_JOB_ID 0x1010
|
||||||
#define TX_JOB_ID 100
|
#define TX_JOB_ID 100
|
||||||
|
|
||||||
@@ -463,13 +460,18 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
|
|||||||
// compute TO compensation that should be applied for this frame
|
// compute TO compensation that should be applied for this frame
|
||||||
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
|
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
|
||||||
UE->rx_offset > 0 ) {
|
UE->rx_offset > 0 ) {
|
||||||
//LOG_I(PHY,"!!!adjusting -1 samples!!!\n");
|
LOG_I(PHY,"!!!adjusting -1 samples!!! rx_offset == %d\n", UE->rx_offset);
|
||||||
|
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
|
||||||
|
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
|
||||||
return -1 ;
|
return -1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 &&
|
if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 &&
|
||||||
UE->rx_offset < UE->frame_parms.samples_per_frame ) {
|
UE->rx_offset < UE->frame_parms.samples_per_frame ) {
|
||||||
//LOG_I(PHY,"!!!adjusting +1 samples!!!\n");
|
int rx_offset = UE->rx_offset - UE->frame_parms.samples_per_frame;
|
||||||
|
LOG_I(PHY,"!!!adjusting +1 samples!!! rx_offset == %d\n", rx_offset);
|
||||||
|
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
|
||||||
|
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,10 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
|||||||
#include "enb_config.h"
|
#include "enb_config.h"
|
||||||
//#include "PHY/TOOLS/time_meas.h"
|
//#include "PHY/TOOLS/time_meas.h"
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_vars.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "intertask_interface.h"
|
#include "intertask_interface.h"
|
||||||
|
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#define FAPI_NR_MAX_RA_OCCASION_PER_CSIRS 64
|
#define FAPI_NR_MAX_RA_OCCASION_PER_CSIRS 64
|
||||||
// Constants Defined in 38.213
|
// Constants Defined in 38.213
|
||||||
#define FAPI_NR_MAX_CORESET_PER_BWP 3
|
#define FAPI_NR_MAX_CORESET_PER_BWP 3
|
||||||
#define FAPI_NR_MAX_SS_PER_CORESET 10
|
#define FAPI_NR_MAX_SS 10
|
||||||
|
|
||||||
|
|
||||||
/// RX_IND
|
/// RX_IND
|
||||||
|
|||||||
@@ -30,14 +30,6 @@
|
|||||||
|
|
||||||
#include <stdint.h> // for uint8/16/32_t
|
#include <stdint.h> // for uint8/16/32_t
|
||||||
|
|
||||||
/* check if this ifndef is required for NB-IoT ?!
|
|
||||||
//#ifndef NO_OPENAIR1
|
|
||||||
//#include "PHY/defs_NB_IoT.h"
|
|
||||||
//#else
|
|
||||||
//#include "PHY/TOOLS/time_meas.h"
|
|
||||||
//#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CRC24_A_NB_IoT 0
|
#define CRC24_A_NB_IoT 0
|
||||||
#define CRC24_B_NB_IoT 1
|
#define CRC24_B_NB_IoT 1
|
||||||
#define CRC16_NB_IoT 2
|
#define CRC16_NB_IoT 2
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "nrLDPC_types.h"
|
#include "nrLDPC_types.h"
|
||||||
|
|
||||||
#ifndef malloc32_clear
|
|
||||||
/**
|
/**
|
||||||
\brief Allocates 32 byte aligned memory and initializes to zero
|
\brief Allocates 32 byte aligned memory and initializes to zero
|
||||||
\param size Input size in bytes
|
\param size Input size in bytes
|
||||||
@@ -46,7 +45,6 @@ static inline void* malloc32_clear(size_t size)
|
|||||||
memset(ptr, 0, size);
|
memset(ptr, 0, size);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Allocates and initializes the internal decoder processing buffers
|
\brief Allocates and initializes the internal decoder processing buffers
|
||||||
|
|||||||
@@ -27,6 +27,58 @@
|
|||||||
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
|
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
|
||||||
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
|
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
|
||||||
|
|
||||||
|
// Table 5.4.3.3-1 38-101
|
||||||
|
int nr_ssb_table[48][3] = {
|
||||||
|
{1, 15, nr_ssb_type_A},
|
||||||
|
{2, 15, nr_ssb_type_A},
|
||||||
|
{3, 15, nr_ssb_type_A},
|
||||||
|
{5, 15, nr_ssb_type_A},
|
||||||
|
{5, 30, nr_ssb_type_B},
|
||||||
|
{7, 15, nr_ssb_type_A},
|
||||||
|
{8, 15, nr_ssb_type_A},
|
||||||
|
{12, 15, nr_ssb_type_A},
|
||||||
|
{14, 15, nr_ssb_type_A},
|
||||||
|
{18, 15, nr_ssb_type_A},
|
||||||
|
{20, 15, nr_ssb_type_A},
|
||||||
|
{25, 15, nr_ssb_type_A},
|
||||||
|
{26, 15, nr_ssb_type_A},
|
||||||
|
{28, 15, nr_ssb_type_A},
|
||||||
|
{29, 15, nr_ssb_type_A},
|
||||||
|
{30, 15, nr_ssb_type_A},
|
||||||
|
{34, 15, nr_ssb_type_A},
|
||||||
|
{34, 30, nr_ssb_type_C},
|
||||||
|
{38, 15, nr_ssb_type_A},
|
||||||
|
{38, 30, nr_ssb_type_C},
|
||||||
|
{39, 15, nr_ssb_type_A},
|
||||||
|
{39, 30, nr_ssb_type_C},
|
||||||
|
{40, 30, nr_ssb_type_C},
|
||||||
|
{41, 15, nr_ssb_type_A},
|
||||||
|
{41, 30, nr_ssb_type_C},
|
||||||
|
{46, 30, nr_ssb_type_C},
|
||||||
|
{48, 30, nr_ssb_type_C},
|
||||||
|
{50, 30, nr_ssb_type_C},
|
||||||
|
{51, 15, nr_ssb_type_A},
|
||||||
|
{53, 15, nr_ssb_type_A},
|
||||||
|
{65, 15, nr_ssb_type_A},
|
||||||
|
{66, 15, nr_ssb_type_A},
|
||||||
|
{66, 30, nr_ssb_type_B},
|
||||||
|
{70, 15, nr_ssb_type_A},
|
||||||
|
{71, 15, nr_ssb_type_A},
|
||||||
|
{74, 15, nr_ssb_type_A},
|
||||||
|
{75, 15, nr_ssb_type_A},
|
||||||
|
{76, 15, nr_ssb_type_A},
|
||||||
|
{77, 30, nr_ssb_type_C},
|
||||||
|
{78, 30, nr_ssb_type_C},
|
||||||
|
{79, 30, nr_ssb_type_C},
|
||||||
|
{90, 15, nr_ssb_type_A},
|
||||||
|
{90, 30, nr_ssb_type_C},
|
||||||
|
{91, 15, nr_ssb_type_A},
|
||||||
|
{92, 15, nr_ssb_type_A},
|
||||||
|
{93, 15, nr_ssb_type_A},
|
||||||
|
{94, 15, nr_ssb_type_A},
|
||||||
|
{96, 30, nr_ssb_type_C}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
|
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
|
||||||
// definition of Lmax according to ts 38.213 section 4.1
|
// definition of Lmax according to ts 38.213 section 4.1
|
||||||
@@ -85,27 +137,28 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb) {
|
|||||||
|
|
||||||
void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
|
void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
|
||||||
{
|
{
|
||||||
|
int idx = 0;
|
||||||
switch(mu) {
|
switch(mu) {
|
||||||
|
|
||||||
case NR_MU_0: //15kHz scs
|
case NR_MU_0: //15kHz scs
|
||||||
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
|
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
|
||||||
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
|
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
|
||||||
fp->ssb_type = nr_ssb_type_A;
|
fp->ssb_type = nr_ssb_type_A;
|
||||||
|
while(nr_ssb_table[idx][0]!=fp->nr_band)
|
||||||
|
idx++;
|
||||||
|
AssertFatal(nr_ssb_table[idx][1]==15,"SCS %d not applicable to band %d\n",
|
||||||
|
fp->subcarrier_spacing,fp->nr_band);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NR_MU_1: //30kHz scs
|
case NR_MU_1: //30kHz scs
|
||||||
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1];
|
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1];
|
||||||
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1];
|
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1];
|
||||||
|
while(nr_ssb_table[idx][0]!=fp->nr_band ||
|
||||||
// selection of SS block pattern according to TS 38101-1 Table 5.4.3.3-1 for SCS 30kHz
|
nr_ssb_table[idx][1]!=30) {
|
||||||
if (fp->nr_band == 5 || fp->nr_band == 66)
|
AssertFatal(nr_ssb_table[idx][0]<=fp->nr_band,"SCS %d not applicable to band %d\n",
|
||||||
fp->ssb_type = nr_ssb_type_B;
|
fp->subcarrier_spacing,fp->nr_band);
|
||||||
else{
|
idx++;
|
||||||
if (fp->nr_band == 41 || fp->nr_band == 38 || ( fp->nr_band > 76 && fp->nr_band < 80) )
|
|
||||||
fp->ssb_type = nr_ssb_type_C;
|
|
||||||
else
|
|
||||||
AssertFatal(1==0,"NR Operating Band n%d not available for SS block SCS with mu=%d\n", fp->nr_band, mu);
|
|
||||||
}
|
}
|
||||||
|
fp->ssb_type = nr_ssb_table[idx][2];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NR_MU_2: //60kHz scs
|
case NR_MU_2: //60kHz scs
|
||||||
|
|||||||
@@ -50,8 +50,6 @@
|
|||||||
//#define DEBUG_DCI_DECODING 1
|
//#define DEBUG_DCI_DECODING 1
|
||||||
//#define DEBUG_PHY
|
//#define DEBUG_PHY
|
||||||
|
|
||||||
//#undef ALL_AGGREGATION
|
|
||||||
|
|
||||||
//extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
|
//extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
|
||||||
//extern uint16_t pcfich_reg[4];
|
//extern uint16_t pcfich_reg[4];
|
||||||
|
|
||||||
|
|||||||
@@ -32,11 +32,8 @@
|
|||||||
#ifndef __DCI_NB_IOT_H__
|
#ifndef __DCI_NB_IOT_H__
|
||||||
#define __DCI_NB_IOT_H__
|
#define __DCI_NB_IOT_H__
|
||||||
|
|
||||||
//#ifndef USER_MODE
|
|
||||||
//#include "PHY/types.h"
|
|
||||||
//#else
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
//#endif
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,10 +36,8 @@
|
|||||||
#include "PHY/extern.h"
|
#include "PHY/extern.h"
|
||||||
#include "SCHED/extern.h"
|
#include "SCHED/extern.h"
|
||||||
|
|
||||||
#ifdef OPENAIR2
|
|
||||||
#include "openair2/LAYER2/MAC/proto.h"
|
#include "openair2/LAYER2/MAC/proto.h"
|
||||||
#include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
#include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
|
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
|
||||||
|
|
||||||
@@ -434,10 +432,8 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OPENAIR2
|
|
||||||
RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0);
|
RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0);
|
||||||
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
|
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
|
||||||
#endif
|
|
||||||
len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]);
|
len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]);
|
||||||
len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n",
|
len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n",
|
||||||
ue->pbch_vars[eNB]->pdu_errors_conseq,
|
ue->pbch_vars[eNB]->pdu_errors_conseq,
|
||||||
|
|||||||
@@ -321,4 +321,4 @@ HLC_subband_cqi_mcs_CBA_20MHz_NB_IoT;
|
|||||||
#define MAX_ACK_PAYLOAD_NB_IoT 18
|
#define MAX_ACK_PAYLOAD_NB_IoT 18
|
||||||
#define MAX_RI_PAYLOAD_NB_IoT 6
|
#define MAX_RI_PAYLOAD_NB_IoT 6
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -50,9 +50,6 @@
|
|||||||
//#define DEBUG_DCI_DECODING 1
|
//#define DEBUG_DCI_DECODING 1
|
||||||
//#define DEBUG_PHY
|
//#define DEBUG_PHY
|
||||||
|
|
||||||
//#undef ALL_AGGREGATION
|
|
||||||
|
|
||||||
|
|
||||||
uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
|
uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -2802,7 +2799,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
// Now check UE_SPEC format 1 search spaces at aggregation 8
|
// Now check UE_SPEC format 1 search spaces at aggregation 8
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
dci_decoding_procedure0(pdcch_vars,0,mode,subframe,
|
dci_decoding_procedure0(pdcch_vars,0,mode,subframe,
|
||||||
@@ -2836,7 +2832,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#endif //ALL_AGGREGATION
|
|
||||||
} else if (tmode == 3) {
|
} else if (tmode == 3) {
|
||||||
|
|
||||||
|
|
||||||
@@ -2946,7 +2941,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
||||||
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes);
|
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes);
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
@@ -3082,7 +3076,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
dci_decoding_procedure0(pdcch_vars,0,mode,
|
dci_decoding_procedure0(pdcch_vars,0,mode,
|
||||||
@@ -3214,7 +3207,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
|
|
||||||
// Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8
|
// Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
@@ -3249,7 +3241,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#endif //ALL_AGGREGATION
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
#include <cblas.h>
|
#include <cblas.h>
|
||||||
#include "linear_preprocessing_rec.h"
|
#include "linear_preprocessing_rec.h"
|
||||||
|
|
||||||
#define NOCYGWIN_STATIC
|
|
||||||
//#define DEBUG_MMSE
|
//#define DEBUG_MMSE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
//#define DEBUG_ULSCH_MODULATION
|
//#define DEBUG_ULSCH_MODULATION
|
||||||
|
|
||||||
#ifndef OFDMA_ULSCH
|
|
||||||
void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -371,7 +370,6 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
|||||||
// printf("\n");
|
// printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
void ulsch_modulation(int32_t **txdataF,
|
void ulsch_modulation(int32_t **txdataF,
|
||||||
short amp,
|
short amp,
|
||||||
uint32_t frame,
|
uint32_t frame,
|
||||||
@@ -690,57 +688,10 @@ void ulsch_modulation(int32_t **txdataF,
|
|||||||
|
|
||||||
// Transform Precoding
|
// Transform Precoding
|
||||||
|
|
||||||
#ifdef OFDMA_ULSCH
|
|
||||||
|
|
||||||
for (i=0; i<ulsch_Msymb; i++) {
|
|
||||||
ulsch->z[i] = ulsch->d[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
dft_lte(ulsch->z,ulsch->d,Msc_PUSCH,ulsch->Nsymb_pusch);
|
dft_lte(ulsch->z,ulsch->d,Msc_PUSCH,ulsch->Nsymb_pusch);
|
||||||
#endif
|
|
||||||
|
|
||||||
DevAssert(txdataF);
|
DevAssert(txdataF);
|
||||||
|
|
||||||
#ifdef OFDMA_ULSCH
|
|
||||||
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
|
|
||||||
|
|
||||||
if (re_offset0>frame_parms->ofdm_symbol_size) {
|
|
||||||
re_offset0 -= frame_parms->ofdm_symbol_size;
|
|
||||||
// re_offset0++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// printf("re_offset0 %d\n",re_offset0);
|
|
||||||
|
|
||||||
|
|
||||||
for (j=0,l=0; l<(nsymb-ulsch->srs_active); l++) {
|
|
||||||
re_offset = re_offset0;
|
|
||||||
symbol_offset = (int)frame_parms->ofdm_symbol_size*(l+(subframe*nsymb));
|
|
||||||
#ifdef DEBUG_ULSCH_MODULATION
|
|
||||||
printf("symbol %d (subframe %d): symbol_offset %d\n",l,subframe,symbol_offset);
|
|
||||||
#endif
|
|
||||||
txptr = &txdataF[0][symbol_offset];
|
|
||||||
|
|
||||||
if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))||
|
|
||||||
((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) {
|
|
||||||
}
|
|
||||||
// Skip reference symbols
|
|
||||||
else {
|
|
||||||
|
|
||||||
// printf("copying %d REs\n",Msc_PUSCH);
|
|
||||||
for (i=0; i<Msc_PUSCH; i++,j++) {
|
|
||||||
#ifdef DEBUG_ULSCH_MODULATION
|
|
||||||
printf("re_offset %d (%p): %d,%d\n", re_offset,&ulsch->z[j],((int16_t*)&ulsch->z[j])[0],((int16_t*)&ulsch->z[j])[1]);
|
|
||||||
#endif
|
|
||||||
txptr[re_offset++] = ulsch->z[j];
|
|
||||||
|
|
||||||
if (re_offset==frame_parms->ofdm_symbol_size)
|
|
||||||
re_offset = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# else // OFDMA_ULSCH = 0
|
|
||||||
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
|
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
|
||||||
|
|
||||||
if (re_offset0>frame_parms->ofdm_symbol_size) {
|
if (re_offset0>frame_parms->ofdm_symbol_size) {
|
||||||
@@ -777,8 +728,5 @@ void ulsch_modulation(int32_t **txdataF,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION, VCD_FUNCTION_OUT);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -206,7 +206,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
nr_sequences=8>>(1-pucch_pdu->sr_flag);
|
nr_sequences=8>>(1-pucch_pdu->sr_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift);
|
LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",
|
||||||
|
pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,
|
||||||
|
pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift);
|
||||||
|
|
||||||
int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
|
int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
short coef)
|
short coef)
|
||||||
{
|
{
|
||||||
|
|
||||||
static int max_pos_fil = 0;
|
|
||||||
static int count_max_pos_ok = 0;
|
static int count_max_pos_ok = 0;
|
||||||
static int first_time = 1;
|
static int first_time = 1;
|
||||||
int max_val = 0, max_pos = 0;
|
int max_val = 0, max_pos = 0;
|
||||||
@@ -55,13 +54,14 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
LOG_D(PHY,"AbsSubframe %d: rx_offset (before) = %d\n",subframe,ue->rx_offset);
|
LOG_D(PHY,"AbsSubframe %d: rx_offset (before) = %d\n",subframe,ue->rx_offset);
|
||||||
|
|
||||||
// we only use channel estimates from tx antenna 0 here
|
// search for maximum position within the cyclic prefix
|
||||||
for (int i = 0; i < frame_parms->nb_prefix_samples; i++) {
|
for (int i = -frame_parms->nb_prefix_samples/2; i < frame_parms->nb_prefix_samples/2; i++) {
|
||||||
int temp = 0;
|
int temp = 0;
|
||||||
|
|
||||||
|
int j = (i < 0) ? (i + frame_parms->ofdm_symbol_size) : i;
|
||||||
for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
|
for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
|
||||||
int Re = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[(i<<1)];
|
int Re = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[(j<<1)];
|
||||||
int Im = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[1+(i<<1)];
|
int Im = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[1+(j<<1)];
|
||||||
temp += (Re*Re/2) + (Im*Im/2);
|
temp += (Re*Re/2) + (Im*Im/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,19 +71,16 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_pos > frame_parms->ofdm_symbol_size/2)
|
|
||||||
max_pos = max_pos - frame_parms->ofdm_symbol_size;
|
|
||||||
|
|
||||||
// filter position to reduce jitter
|
// filter position to reduce jitter
|
||||||
if (clear == 1)
|
if (clear == 1)
|
||||||
max_pos_fil = max_pos;
|
ue->max_pos_fil = max_pos;
|
||||||
else
|
else
|
||||||
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
|
ue->max_pos_fil = ((ue->max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
|
||||||
|
|
||||||
// do not filter to have proactive timing adjustment
|
// do not filter to have proactive timing adjustment
|
||||||
//max_pos_fil = max_pos;
|
//ue->max_pos_fil = max_pos;
|
||||||
|
|
||||||
int diff = max_pos_fil - sync_pos;
|
int diff = ue->max_pos_fil - sync_pos;
|
||||||
|
|
||||||
if (frame_parms->freq_range==nr_FR2)
|
if (frame_parms->freq_range==nr_FR2)
|
||||||
sync_offset = 2;
|
sync_offset = 2;
|
||||||
@@ -131,7 +128,7 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
ue->rx_offset,
|
ue->rx_offset,
|
||||||
clear,
|
clear,
|
||||||
max_pos,
|
max_pos,
|
||||||
max_pos_fil,
|
ue->max_pos_fil,
|
||||||
max_val,
|
max_val,
|
||||||
sync_pos);
|
sync_pos);
|
||||||
#endif //DEBUG_PHY
|
#endif //DEBUG_PHY
|
||||||
|
|||||||
@@ -485,8 +485,8 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_PDCCH
|
#ifdef DEBUG_PDCCH
|
||||||
printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size,
|
printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, symbol %d\n",
|
||||||
ue->frame_parms.Ncp,Ns,k, symbol);
|
proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size,ue->frame_parms.Ncp,Ns,symbol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fl = filt16a_l1;
|
fl = filt16a_l1;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -33,13 +33,7 @@
|
|||||||
#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||||
#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include "PHY/types.h"
|
|
||||||
#else
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_DCI_SIZE_BITS 45
|
#define MAX_DCI_SIZE_BITS 45
|
||||||
|
|
||||||
|
|||||||
@@ -43,12 +43,6 @@
|
|||||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||||
#include "common/utils/nr/nr_common.h"
|
#include "common/utils/nr/nr_common.h"
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define NOCYGWIN_STATIC static
|
|
||||||
#else
|
|
||||||
#define NOCYGWIN_STATIC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* dynamic shift for LLR computation for TM3/4
|
/* dynamic shift for LLR computation for TM3/4
|
||||||
* set as command line argument, see lte-softmodem.c
|
* set as command line argument, see lte-softmodem.c
|
||||||
* default value: 0
|
* default value: 0
|
||||||
|
|||||||
@@ -485,9 +485,9 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
|||||||
|
|
||||||
for(int n_ss = 0; n_ss<pdcch_vars->nb_search_space; n_ss++) {
|
for(int n_ss = 0; n_ss<pdcch_vars->nb_search_space; n_ss++) {
|
||||||
uint8_t nb_symb_pdcch = pdcch_vars->pdcch_config[n_ss].coreset.duration;
|
uint8_t nb_symb_pdcch = pdcch_vars->pdcch_config[n_ss].coreset.duration;
|
||||||
|
int start_symb = pdcch_vars->pdcch_config[n_ss].coreset.StartSymbolIndex;
|
||||||
get_coreset_rballoc(pdcch_vars->pdcch_config[n_ss].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
|
get_coreset_rballoc(pdcch_vars->pdcch_config[n_ss].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
|
||||||
|
for (uint16_t l=start_symb; l<start_symb+nb_symb_pdcch; l++) {
|
||||||
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
|
||||||
nr_slot_fep_init_sync(ue,
|
nr_slot_fep_init_sync(ue,
|
||||||
proc,
|
proc,
|
||||||
l, // the UE PHY has no notion of the symbols to be monitored in the search space
|
l, // the UE PHY has no notion of the symbols to be monitored in the search space
|
||||||
|
|||||||
@@ -40,9 +40,7 @@
|
|||||||
//#define DEBUG_PBCH
|
//#define DEBUG_PBCH
|
||||||
//#define DEBUG_PBCH_ENCODING
|
//#define DEBUG_PBCH_ENCODING
|
||||||
|
|
||||||
#ifdef OPENAIR2
|
|
||||||
//#include "PHY_INTERFACE/defs.h"
|
//#include "PHY_INTERFACE/defs.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PBCH_A 24
|
#define PBCH_A 24
|
||||||
|
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
|
|||||||
// the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1
|
// the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1
|
||||||
uint8_t u[2]={0,0},v[2]={0,0};
|
uint8_t u[2]={0,0},v[2]={0,0};
|
||||||
|
|
||||||
LOG_D(PHY,"pucch0: slot %d nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, mcs %d\n",nr_slot_tx,pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->mcs);
|
LOG_D(PHY,"pucch0: slot %d nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, mcs %d\n",
|
||||||
|
nr_slot_tx,pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->mcs);
|
||||||
|
|
||||||
#ifdef DEBUG_NR_PUCCH_TX
|
#ifdef DEBUG_NR_PUCCH_TX
|
||||||
printf("\t [nr_generate_pucch0] sequence generation: variable initialization for test\n");
|
printf("\t [nr_generate_pucch0] sequence generation: variable initialization for test\n");
|
||||||
|
|||||||
@@ -69,18 +69,12 @@ void reset_stats(FL_OBJECT *button, long arg) {
|
|||||||
|
|
||||||
|
|
||||||
static void *scope_thread_eNB(void *arg) {
|
static void *scope_thread_eNB(void *arg) {
|
||||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
|
||||||
FILE *eNB_stats;
|
|
||||||
# endif
|
|
||||||
struct sched_param sched_param;
|
struct sched_param sched_param;
|
||||||
int UE_id, CC_id;
|
int UE_id, CC_id;
|
||||||
int ue_cnt=0;
|
int ue_cnt=0;
|
||||||
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
|
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
|
||||||
sched_setscheduler(0, SCHED_FIFO,&sched_param);
|
sched_setscheduler(0, SCHED_FIFO,&sched_param);
|
||||||
printf("Scope thread has priority %d\n",sched_param.sched_priority);
|
printf("Scope thread has priority %d\n",sched_param.sched_priority);
|
||||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
|
||||||
eNB_stats = fopen("eNB_stats.txt", "w");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (!oai_exit) {
|
while (!oai_exit) {
|
||||||
ue_cnt=0;
|
ue_cnt=0;
|
||||||
@@ -99,16 +93,6 @@ static void *scope_thread_eNB(void *arg) {
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("%s",stats_buffer);
|
|
||||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
|
||||||
|
|
||||||
if (eNB_stats) {
|
|
||||||
rewind (eNB_stats);
|
|
||||||
fwrite (stats_buffer, 1, len, eNB_stats);
|
|
||||||
fclose (eNB_stats);
|
|
||||||
}
|
|
||||||
|
|
||||||
# endif
|
|
||||||
pthread_exit((void *)arg);
|
pthread_exit((void *)arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,16 +72,10 @@ void reset_stats(FL_OBJECT *button, long arg) {
|
|||||||
|
|
||||||
static void *scope_thread_UE(void *arg) {
|
static void *scope_thread_UE(void *arg) {
|
||||||
char stats_buffer[16384];
|
char stats_buffer[16384];
|
||||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
|
||||||
FILE *UE_stats, *eNB_stats;
|
|
||||||
# endif
|
|
||||||
struct sched_param sched_param;
|
struct sched_param sched_param;
|
||||||
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
|
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
|
||||||
sched_setscheduler(0, SCHED_FIFO,&sched_param);
|
sched_setscheduler(0, SCHED_FIFO,&sched_param);
|
||||||
printf("Scope thread has priority %d\n",sched_param.sched_priority);
|
printf("Scope thread has priority %d\n",sched_param.sched_priority);
|
||||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
|
||||||
UE_stats = fopen("UE_stats.txt", "w");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (!oai_exit) {
|
while (!oai_exit) {
|
||||||
// dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm);
|
// dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm);
|
||||||
@@ -94,16 +88,6 @@ static void *scope_thread_UE(void *arg) {
|
|||||||
0,7);
|
0,7);
|
||||||
// printf("%s",stats_buffer);
|
// printf("%s",stats_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
|
||||||
|
|
||||||
if (UE_stats) {
|
|
||||||
rewind (UE_stats);
|
|
||||||
fwrite (stats_buffer, 1, len, UE_stats);
|
|
||||||
fclose (UE_stats);
|
|
||||||
}
|
|
||||||
|
|
||||||
# endif
|
|
||||||
pthread_exit((void *)arg);
|
pthread_exit((void *)arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -517,9 +517,6 @@ void phy_scope_gNB(OAI_phy_scope_t *form,
|
|||||||
}
|
}
|
||||||
static void *scope_thread_gNB(void *arg) {
|
static void *scope_thread_gNB(void *arg) {
|
||||||
scopeData_t *p=(scopeData_t *) arg;
|
scopeData_t *p=(scopeData_t *) arg;
|
||||||
//# ifdef ENABLE_XFORMS_WRITE_STATS
|
|
||||||
// FILE *gNB_stats = fopen("gNB_stats.txt", "w");
|
|
||||||
//#endif
|
|
||||||
size_t stksize=0;
|
size_t stksize=0;
|
||||||
pthread_attr_t atr;
|
pthread_attr_t atr;
|
||||||
pthread_attr_init(&atr);
|
pthread_attr_init(&atr);
|
||||||
|
|||||||
@@ -131,6 +131,49 @@ void print_meas(time_stats_t *ts,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int print_meas_log(time_stats_t *ts,
|
||||||
|
const char *name,
|
||||||
|
time_stats_t *total_exec_time,
|
||||||
|
time_stats_t *sf_exec_time,
|
||||||
|
char *output)
|
||||||
|
{
|
||||||
|
int stroff = 0;
|
||||||
|
static int first_time = 0;
|
||||||
|
static double cpu_freq_GHz = 0.0;
|
||||||
|
|
||||||
|
if (cpu_freq_GHz == 0.0)
|
||||||
|
cpu_freq_GHz = get_cpu_freq_GHz();
|
||||||
|
|
||||||
|
if (first_time == 0) {
|
||||||
|
first_time=1;
|
||||||
|
|
||||||
|
if ((total_exec_time == NULL) || (sf_exec_time== NULL))
|
||||||
|
stroff += sprintf(output, "%25s %25s %25s %25s %25s %6f\n","Name","Total","Per Trials", "Num Trials","CPU_F_GHz", cpu_freq_GHz);
|
||||||
|
else
|
||||||
|
stroff += sprintf(output+stroff, "%25s %25s %25s %20s %15s %6f\n","Name","Total","Average/Frame","Trials", "CPU_F_GHz", cpu_freq_GHz);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ts->trials>0) {
|
||||||
|
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
|
||||||
|
if ((total_exec_time == NULL) || (sf_exec_time== NULL)) {
|
||||||
|
stroff += sprintf(output+stroff, "%25s: %15.3f us; %15d; %15.3f us;\n",
|
||||||
|
name,
|
||||||
|
(ts->diff/ts->trials/cpu_freq_GHz/1000.0),
|
||||||
|
ts->trials,
|
||||||
|
ts->max/cpu_freq_GHz/1000.0);
|
||||||
|
} else {
|
||||||
|
stroff += sprintf(output+stroff, "%25s: %15.3f ms (%5.2f%%); %15.3f us (%5.2f%%); %15d;\n",
|
||||||
|
name,
|
||||||
|
(ts->diff/cpu_freq_GHz/1000000.0),
|
||||||
|
((ts->diff/cpu_freq_GHz/1000000.0)/(total_exec_time->diff/cpu_freq_GHz/1000000.0))*100, // percentage
|
||||||
|
(ts->diff/ts->trials/cpu_freq_GHz/1000.0),
|
||||||
|
((ts->diff/ts->trials/cpu_freq_GHz/1000.0)/(sf_exec_time->diff/sf_exec_time->trials/cpu_freq_GHz/1000.0))*100, // percentage
|
||||||
|
ts->trials);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return stroff;
|
||||||
|
}
|
||||||
|
|
||||||
double get_time_meas_us(time_stats_t *ts)
|
double get_time_meas_us(time_stats_t *ts)
|
||||||
{
|
{
|
||||||
static double cpu_freq_GHz = 0.0;
|
static double cpu_freq_GHz = 0.0;
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ static inline void stop_meas(time_stats_t *ts) __attribute__((always_inline));
|
|||||||
|
|
||||||
void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name);
|
void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name);
|
||||||
void print_meas(time_stats_t *ts, const char *name, time_stats_t *total_exec_time, time_stats_t *sf_exec_time);
|
void print_meas(time_stats_t *ts, const char *name, time_stats_t *total_exec_time, time_stats_t *sf_exec_time);
|
||||||
|
int print_meas_log(time_stats_t *ts, const char *name, time_stats_t *total_exec_time, time_stats_t *sf_exec_time, char *output);
|
||||||
double get_time_meas_us(time_stats_t *ts);
|
double get_time_meas_us(time_stats_t *ts);
|
||||||
double get_cpu_freq_GHz(void);
|
double get_cpu_freq_GHz(void);
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,6 @@
|
|||||||
#ifdef MEX
|
#ifdef MEX
|
||||||
#define msg mexPrintf
|
#define msg mexPrintf
|
||||||
#else
|
#else
|
||||||
#ifdef OPENAIR2
|
|
||||||
#if ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
#include "collection/hashtable/hashtable.h"
|
#include "collection/hashtable/hashtable.h"
|
||||||
#include "COMMON/ral_messages_types.h"
|
#include "COMMON/ral_messages_types.h"
|
||||||
@@ -56,9 +55,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||||
#else
|
|
||||||
#define msg printf
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
//use msg in the real-time thread context
|
//use msg in the real-time thread context
|
||||||
#define msg_nrt printf
|
#define msg_nrt printf
|
||||||
@@ -196,19 +192,6 @@ typedef struct {
|
|||||||
NB_IoT_UE_DLSCH_t *dlsch_rn_MCH[10];
|
NB_IoT_UE_DLSCH_t *dlsch_rn_MCH[10];
|
||||||
|
|
||||||
} PHY_VARS_RN_NB_IoT;
|
} PHY_VARS_RN_NB_IoT;
|
||||||
/*
|
|
||||||
#ifdef OCP_FRAMEWORK
|
|
||||||
#include <enums.h>
|
|
||||||
#else
|
|
||||||
//typedef enum {normal_txrx=0,rx_calib_ue=1,rx_calib_ue_med=2,rx_calib_ue_byp=3,debug_prach=4,no_L2_connect=5,calib_prach_tx=6,rx_dump_frame=7,loop_through_memory=8} runmode_t;
|
|
||||||
*/
|
|
||||||
// enum transmission_access_mode {
|
|
||||||
// NO_ACCESS=0,
|
|
||||||
// POSTPONED_ACCESS,
|
|
||||||
// CANCELED_ACCESS,
|
|
||||||
// UNKNOWN_ACCESS,
|
|
||||||
// SCHEDULED_ACCESS,
|
|
||||||
// CBA_ACCESS};
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
eNodeB_3GPP_NB_IoT=0, // classical eNodeB function
|
eNodeB_3GPP_NB_IoT=0, // classical eNodeB function
|
||||||
|
|||||||
@@ -87,7 +87,6 @@
|
|||||||
#define LOG_W(x, ...) mexPrintf(__VA_ARGS__)
|
#define LOG_W(x, ...) mexPrintf(__VA_ARGS__)
|
||||||
#define LOG_M(x, ...) mexPrintf(__VA_ARGS__)
|
#define LOG_M(x, ...) mexPrintf(__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#ifdef OPENAIR2
|
|
||||||
#if ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
#include "collection/hashtable/hashtable.h"
|
#include "collection/hashtable/hashtable.h"
|
||||||
#include "COMMON/ral_messages_types.h"
|
#include "COMMON/ral_messages_types.h"
|
||||||
@@ -95,9 +94,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||||
#else
|
|
||||||
#define msg printf
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,16 +51,12 @@
|
|||||||
#ifdef MEX
|
#ifdef MEX
|
||||||
#define msg mexPrintf
|
#define msg mexPrintf
|
||||||
#else
|
#else
|
||||||
#ifdef OPENAIR2
|
|
||||||
#if ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
#include "common/utils/hashtable/hashtable.h"
|
#include "common/utils/hashtable/hashtable.h"
|
||||||
#include "COMMON/ral_messages_types.h"
|
#include "COMMON/ral_messages_types.h"
|
||||||
#include "UTIL/queue.h"
|
#include "UTIL/queue.h"
|
||||||
#endif
|
#endif
|
||||||
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||||
#else
|
|
||||||
#define msg printf
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
//use msg in the real-time thread context
|
//use msg in the real-time thread context
|
||||||
#define msg_nrt printf
|
#define msg_nrt printf
|
||||||
@@ -638,7 +634,7 @@ typedef struct {
|
|||||||
uint8_t dciFormat;
|
uint8_t dciFormat;
|
||||||
uint8_t agregationLevel;
|
uint8_t agregationLevel;
|
||||||
int nb_search_space;
|
int nb_search_space;
|
||||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t pdcch_config[FAPI_NR_MAX_SS_PER_CORESET];
|
fapi_nr_dl_config_dci_dl_pdu_rel15_t pdcch_config[FAPI_NR_MAX_SS];
|
||||||
// frame and slot for sib1 in initial sync
|
// frame and slot for sib1 in initial sync
|
||||||
uint16_t sfn;
|
uint16_t sfn;
|
||||||
uint16_t slot;
|
uint16_t slot;
|
||||||
@@ -921,9 +917,10 @@ typedef struct {
|
|||||||
uint8_t init_sync_frame;
|
uint8_t init_sync_frame;
|
||||||
/// temporary offset during cell search prior to MIB decoding
|
/// temporary offset during cell search prior to MIB decoding
|
||||||
int ssb_offset;
|
int ssb_offset;
|
||||||
uint16_t symbol_offset; // offset in terms of symbols for detected ssb in sync
|
uint16_t symbol_offset; /// offset in terms of symbols for detected ssb in sync
|
||||||
int rx_offset; /// Timing offset
|
int rx_offset; /// Timing offset
|
||||||
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
|
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
|
||||||
|
int max_pos_fil; /// Timing offset IIR filter
|
||||||
int time_sync_cell;
|
int time_sync_cell;
|
||||||
|
|
||||||
/// Timing Advance updates variables
|
/// Timing Advance updates variables
|
||||||
|
|||||||
@@ -55,12 +55,6 @@ extern char mode_string[4][20];
|
|||||||
extern unsigned char NB_RU;
|
extern unsigned char NB_RU;
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
extern unsigned char NB_eNB_INST;
|
|
||||||
extern uint16_t NB_UE_INST;
|
|
||||||
extern unsigned char NB_RN_INST;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int flag_LA;
|
extern int flag_LA;
|
||||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||||
|
|||||||
@@ -63,12 +63,6 @@ extern char mode_string[4][20];
|
|||||||
|
|
||||||
extern unsigned char NB_RU;
|
extern unsigned char NB_RU;
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
extern unsigned char NB_eNB_INST;
|
|
||||||
extern uint16_t NB_UE_INST;
|
|
||||||
extern unsigned char NB_RN_INST;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int flag_LA;
|
extern int flag_LA;
|
||||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||||
|
|||||||
@@ -53,12 +53,6 @@ extern int flagMag;
|
|||||||
extern char mode_string[4][20];
|
extern char mode_string[4][20];
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
extern unsigned char NB_eNB_INST;
|
|
||||||
extern uint16_t NB_UE_INST;
|
|
||||||
extern unsigned char NB_RN_INST;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int flag_LA;
|
extern int flag_LA;
|
||||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||||
|
|||||||
@@ -55,13 +55,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
|||||||
|
|
||||||
unsigned char NB_RU=0;
|
unsigned char NB_RU=0;
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
//unsigned char NB_eNB_INST=0;
|
|
||||||
//uint16_t NB_UE_INST=0;
|
|
||||||
//unsigned char NB_RN_INST=0;
|
|
||||||
//unsigned char NB_INST=0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int number_of_cards;
|
int number_of_cards;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,13 +57,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
|||||||
|
|
||||||
unsigned char NB_RU=0;
|
unsigned char NB_RU=0;
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
unsigned char NB_eNB_INST=0;
|
|
||||||
uint16_t NB_UE_INST=0;
|
|
||||||
unsigned char NB_RN_INST=0;
|
|
||||||
unsigned char NB_INST=0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int number_of_cards;
|
int number_of_cards;
|
||||||
|
|
||||||
|
|||||||
@@ -47,14 +47,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
|||||||
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
unsigned char NB_eNB_INST=0;
|
|
||||||
uint16_t NB_UE_INST=0;
|
|
||||||
unsigned char NB_RN_INST=0;
|
|
||||||
unsigned char NB_INST=0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int number_of_cards;
|
int number_of_cards;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,11 +22,6 @@
|
|||||||
#ifndef __openair_TYPES_NB_IOT_H__
|
#ifndef __openair_TYPES_NB_IOT_H__
|
||||||
#define __openair_TYPES_NB_IOT_H__
|
#define __openair_TYPES_NB_IOT_H__
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#else
|
|
||||||
#include <linux/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*__openair_TYPES_NB_IOT_H__ */
|
#endif /*__openair_TYPES_NB_IOT_H__ */
|
||||||
|
|||||||
@@ -403,8 +403,6 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
|
|||||||
|
|
||||||
pthread_mutex_lock(&gNB->UL_INFO_mutex);
|
pthread_mutex_lock(&gNB->UL_INFO_mutex);
|
||||||
|
|
||||||
int timing_advance_update, cqi;
|
|
||||||
int sync_pos;
|
|
||||||
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
|
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
|
||||||
NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_processes[harq_pid];
|
NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_processes[harq_pid];
|
||||||
NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch);
|
NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch);
|
||||||
@@ -412,19 +410,20 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
|
|||||||
nfapi_nr_pusch_pdu_t *pusch_pdu = &harq_process->ulsch_pdu;
|
nfapi_nr_pusch_pdu_t *pusch_pdu = &harq_process->ulsch_pdu;
|
||||||
|
|
||||||
// pdu->data = gNB->ulsch[ULSCH_id+1][0]->harq_processes[harq_pid]->b;
|
// pdu->data = gNB->ulsch[ULSCH_id+1][0]->harq_processes[harq_pid]->b;
|
||||||
sync_pos = nr_est_timing_advance_pusch(gNB, ULSCH_id); // estimate timing advance for MAC
|
int sync_pos = nr_est_timing_advance_pusch(gNB, ULSCH_id); // estimate timing advance for MAC
|
||||||
|
|
||||||
// scale the 16 factor in N_TA calculation in 38.213 section 4.2 according to the used FFT size
|
// scale the 16 factor in N_TA calculation in 38.213 section 4.2 according to the used FFT size
|
||||||
uint16_t bw_scaling = 16 * gNB->frame_parms.ofdm_symbol_size / 2048;
|
uint16_t bw_scaling = 16 * gNB->frame_parms.ofdm_symbol_size / 2048;
|
||||||
int sync_pos_rounded;
|
|
||||||
// do some integer rounding to improve TA accuracy
|
// do some integer rounding to improve TA accuracy
|
||||||
|
int sync_pos_rounded;
|
||||||
if (sync_pos > 0)
|
if (sync_pos > 0)
|
||||||
sync_pos_rounded = sync_pos + (bw_scaling / 2) - 1;
|
sync_pos_rounded = sync_pos + (bw_scaling / 2) - 1;
|
||||||
else
|
else
|
||||||
sync_pos_rounded = sync_pos - (bw_scaling / 2) - 1;
|
sync_pos_rounded = sync_pos - (bw_scaling / 2) + 1;
|
||||||
if (stats) stats->sync_pos = sync_pos;
|
if (stats) stats->sync_pos = sync_pos;
|
||||||
|
|
||||||
timing_advance_update = sync_pos_rounded / bw_scaling;
|
int timing_advance_update = sync_pos_rounded / bw_scaling;
|
||||||
|
|
||||||
// put timing advance command in 0..63 range
|
// put timing advance command in 0..63 range
|
||||||
timing_advance_update += 31;
|
timing_advance_update += 31;
|
||||||
@@ -449,6 +448,7 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
|
|||||||
|
|
||||||
LOG_D(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f)\n", SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0);
|
LOG_D(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f)\n", SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0);
|
||||||
|
|
||||||
|
int cqi;
|
||||||
if (SNRtimes10 < -640) cqi=0;
|
if (SNRtimes10 < -640) cqi=0;
|
||||||
else if (SNRtimes10 > 635) cqi=255;
|
else if (SNRtimes10 > 635) cqi=255;
|
||||||
else cqi=(640+SNRtimes10)/5;
|
else cqi=(640+SNRtimes10)/5;
|
||||||
|
|||||||
@@ -44,4 +44,4 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response);
|
|||||||
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config);
|
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -768,7 +768,8 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
|
|||||||
uint16_t s1 = dlsch0_harq->nb_symbols;
|
uint16_t s1 = dlsch0_harq->nb_symbols;
|
||||||
bool is_SI = dlsch0->rnti_type == _SI_RNTI_;
|
bool is_SI = dlsch0->rnti_type == _SI_RNTI_;
|
||||||
|
|
||||||
LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0_harq->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0_harq->dlDmrsSymbPos);
|
LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",
|
||||||
|
ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0_harq->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0_harq->dlDmrsSymbPos);
|
||||||
|
|
||||||
for (m = s0; m < (s0 +s1); m++) {
|
for (m = s0; m < (s0 +s1); m++) {
|
||||||
if (dlsch0_harq->dlDmrsSymbPos & (1 << m)) {
|
if (dlsch0_harq->dlDmrsSymbPos & (1 << m)) {
|
||||||
@@ -1733,8 +1734,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
||||||
|
|
||||||
// note: this only works if RBs for PDCCH are contigous!
|
// note: this only works if RBs for PDCCH are contigous!
|
||||||
LOG_D(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d\n",
|
LOG_D(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d, coreset_nb_rb %d\n",
|
||||||
fp->first_carrier_offset, pdcch_vars->pdcch_config[n_ss].BWPStart, coreset_start_rb);
|
fp->first_carrier_offset, pdcch_vars->pdcch_config[n_ss].BWPStart, coreset_start_rb, coreset_nb_rb);
|
||||||
|
|
||||||
if (coreset_nb_rb > 0)
|
if (coreset_nb_rb > 0)
|
||||||
nr_pdcch_channel_estimation(ue,
|
nr_pdcch_channel_estimation(ue,
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include<stdio.h>
|
#include <stdio.h>
|
||||||
#include<string.h>
|
#include <string.h>
|
||||||
#include<gpib/ib.h>
|
#include <gpib/ib.h>
|
||||||
#include"gpib_send.h"
|
#include "gpib_send.h"
|
||||||
void gpib_send(unsigned int gpib_board, unsigned int gpib_device, char *command_string )
|
void gpib_send(unsigned int gpib_board, unsigned int gpib_device, char *command_string )
|
||||||
{
|
{
|
||||||
unsigned short addlist[2] = {gpib_device, NOADDR};
|
unsigned short addlist[2] = {gpib_device, NOADDR};
|
||||||
|
|||||||
@@ -22,9 +22,7 @@
|
|||||||
#ifndef __MAC_RRC_PRIMITIVES_H__
|
#ifndef __MAC_RRC_PRIMITIVES_H__
|
||||||
#define __MAC_RRC_PRIMITIVES_H__
|
#define __MAC_RRC_PRIMITIVES_H__
|
||||||
|
|
||||||
#ifndef OPENAIR2_IN
|
#include "LAYER2/RLC/rlc.h"
|
||||||
#include "LAYER2/RLC/rlc.h"
|
|
||||||
#endif
|
|
||||||
#include "COMMON/platform_types.h"
|
#include "COMMON/platform_types.h"
|
||||||
#include "COMMON/platform_constants.h"
|
#include "COMMON/platform_constants.h"
|
||||||
#include "openair2/RRC/LTE/rrc_defs.h"
|
#include "openair2/RRC/LTE/rrc_defs.h"
|
||||||
@@ -306,8 +304,6 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPENAIR2_IN
|
|
||||||
|
|
||||||
typedef struct { //RRC_INTERFACE_FUNCTIONS
|
typedef struct { //RRC_INTERFACE_FUNCTIONS
|
||||||
unsigned int Frame_index;
|
unsigned int Frame_index;
|
||||||
unsigned short UE_index[NB_MODULES_MAX][NB_SIG_CNX_UE];
|
unsigned short UE_index[NB_MODULES_MAX][NB_SIG_CNX_UE];
|
||||||
@@ -375,10 +371,6 @@ typedef struct {
|
|||||||
} MAC_RLC_XFACE;
|
} MAC_RLC_XFACE;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#define IDLE 0
|
//#define IDLE 0
|
||||||
#define NEED_RADIO_CONFIG 3
|
#define NEED_RADIO_CONFIG 3
|
||||||
#define RADIO_CONFIG_TX 2
|
#define RADIO_CONFIG_TX 2
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
#else
|
#else
|
||||||
#define MAX_MOBILES_PER_ENB 4
|
#define MAX_MOBILES_PER_ENB 4
|
||||||
#define MAX_MOBILES_PER_ENB_NB_IoT 4
|
#define MAX_MOBILES_PER_ENB_NB_IoT 4
|
||||||
#define MAX_MOBILES_PER_GNB 2//16
|
#define MAX_MOBILES_PER_GNB 4//16
|
||||||
#define MAX_eNB 2
|
#define MAX_eNB 2
|
||||||
#define MAX_gNB 2
|
#define MAX_gNB 2
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,195 +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
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
rrm_config_structs.h
|
|
||||||
-------------------
|
|
||||||
AUTHOR : Linus GASSER modified by Lionel GAUTHIER Raymond KNOPP
|
|
||||||
COMPANY : EURECOM
|
|
||||||
EMAIL : linus.gasser@epfl.ch
|
|
||||||
EMAIL : lionel.gauthier@eurecom.fr
|
|
||||||
EMAIL : raymond.knopp@eurecom.fr
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
#ifdef OLD_RRC_CELLULAR
|
|
||||||
# ifndef __RRM_CONFIG_STRUCTS_H__
|
|
||||||
# define __RRM_CONFIG_STRUCTS_H__
|
|
||||||
|
|
||||||
# include "platform_types.h"
|
|
||||||
# include "platform_constants.h"
|
|
||||||
# include "rrm_constants.h"
|
|
||||||
# include "rlc.h"
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint32_t e_r;
|
|
||||||
int timer_poll;
|
|
||||||
int timer_poll_prohibit;
|
|
||||||
int timer_discard;
|
|
||||||
int timer_poll_periodic;
|
|
||||||
int timer_status_prohibit;
|
|
||||||
int timer_status_periodic;
|
|
||||||
int timer_rst;
|
|
||||||
int timer_mrw;
|
|
||||||
int missing_pdu_indicator;
|
|
||||||
uint32_t pdu_size;
|
|
||||||
// int in_sequence_delivery; // not implemented
|
|
||||||
uint8_t max_rst;
|
|
||||||
uint8_t max_dat;
|
|
||||||
uint16_t poll_pdu;
|
|
||||||
uint16_t poll_sdu;
|
|
||||||
uint8_t poll_window;
|
|
||||||
uint32_t tx_window_size;
|
|
||||||
uint32_t rx_window_size;
|
|
||||||
uint8_t max_mrw;
|
|
||||||
uint8_t last_transmission_pdu_poll_trigger;
|
|
||||||
uint8_t last_retransmission_pdu_poll_trigger;
|
|
||||||
enum RLC_SDU_DISCARD_MODE sdu_discard_mode;
|
|
||||||
uint32_t send_mrw;
|
|
||||||
} AM;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint32_t e_r;
|
|
||||||
uint32_t timer_discard;
|
|
||||||
uint32_t sdu_discard_mode;
|
|
||||||
uint32_t segmentation_indication;
|
|
||||||
uint32_t delivery_of_erroneous_sdu;
|
|
||||||
} TM;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint32_t e_r;
|
|
||||||
uint32_t timer_discard;
|
|
||||||
uint32_t sdu_discard_mode;
|
|
||||||
} UM;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint8_t logch_identity;
|
|
||||||
uint8_t mac_logch_priority;
|
|
||||||
} MAP_INFO;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint32_t rlc_mode;
|
|
||||||
AM am;
|
|
||||||
TM tm;
|
|
||||||
UM um;
|
|
||||||
} RLC_INFO;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
int header_compression_algorithm;
|
|
||||||
} PDCP_INFO;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
rb_type_t rb_type;
|
|
||||||
RLC_INFO rlc_info;
|
|
||||||
PDCP_INFO pdcp_info;
|
|
||||||
uint16_t rb_id;
|
|
||||||
// Added for OPENAIR MAC
|
|
||||||
//LCHAN_DESC Lchan_desc;
|
|
||||||
|
|
||||||
} RADIOBEARER;
|
|
||||||
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
int TIMER300;
|
|
||||||
int TIMER302;
|
|
||||||
int TIMER305;
|
|
||||||
int TIMER307;
|
|
||||||
int TIMER308;
|
|
||||||
int TIMER312;
|
|
||||||
int TIMER313;
|
|
||||||
int TIMER314;
|
|
||||||
int TIMER315;
|
|
||||||
} L3TIMERS_;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
int COUNTERN300;
|
|
||||||
int COUNTERN302;
|
|
||||||
int COUNTERN308;
|
|
||||||
int COUNTERN312;
|
|
||||||
int COUNTERN313;
|
|
||||||
} L3COUNTERS_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
int MaxNumRemote;
|
|
||||||
L3TIMERS_ Timers;
|
|
||||||
L3COUNTERS_ Counters;
|
|
||||||
} L3_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint8_t rrm_action; // ACTION_NULL,ADD,REMOVE,MODIFY
|
|
||||||
uint8_t rrm_element; // rb,trch,cctrch
|
|
||||||
uint8_t rrm_element_index; // rb/trch/cctrch index
|
|
||||||
} RRM_COMMAND_MT;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint8_t rrm_action; // ACTION_NULL,ADD,REMOVE,MODIFY
|
|
||||||
uint8_t mobile;
|
|
||||||
uint8_t rrm_element; // rb,trch,cctrch
|
|
||||||
uint8_t rrm_element_index; // rb/trch/cctrch index
|
|
||||||
} RRM_COMMAND_RG;
|
|
||||||
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint8_t nb_commands;
|
|
||||||
RRM_COMMAND_RG rrm_commands[JRRM_MAX_COMMANDS_PER_TRANSACTION];
|
|
||||||
|
|
||||||
|
|
||||||
RADIOBEARER bearer[MAX_RB_RG];
|
|
||||||
L3_ L3;
|
|
||||||
|
|
||||||
} RG_CONFIG;
|
|
||||||
|
|
||||||
typedef volatile struct {
|
|
||||||
uint8_t nb_commands;
|
|
||||||
RRM_COMMAND_MT rrm_commands[JRRM_MAX_COMMANDS_PER_TRANSACTION];
|
|
||||||
|
|
||||||
RADIOBEARER bearer[MAX_RB_MOBILE];
|
|
||||||
L3_ L3;
|
|
||||||
|
|
||||||
} MT_CONFIG;
|
|
||||||
|
|
||||||
# ifdef NODE_RG
|
|
||||||
typedef volatile struct {
|
|
||||||
RG_CONFIG rg_config;
|
|
||||||
MT_CONFIG mt_config[MAX_MOBILES_PER_RG];
|
|
||||||
} RRM_VARS;
|
|
||||||
|
|
||||||
# else
|
|
||||||
/* NODE_RG */
|
|
||||||
typedef volatile struct {
|
|
||||||
MT_CONFIG mt_config[MAX_MANAGED_RG_PER_MOBILE];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} RRM_VARS;
|
|
||||||
# endif
|
|
||||||
/* NODE_RG */
|
|
||||||
//typedef MT_CONFIG MAIN_MOBILE ;
|
|
||||||
//typedef RG_CONFIG MAIN_RADIO_GATEWAY;
|
|
||||||
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user