Merge remote-tracking branch 'origin/develop' into ru_rau_enhancement_L1_renaming
Conflicts: cmake_targets/build_oai cmake_targets/oaisim_build_oai/CMakeLists.template cmake_targets/oaisim_mme_build_oai/CMakeLists.template cmake_targets/oaisim_noS1_build_oai/CMakeLists.template openair1/PHY/LTE_ESTIMATION/lte_sync_time.c openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c openair1/PHY/LTE_TRANSPORT/dci_tools.c openair1/PHY/LTE_TRANSPORT/if4_tools.c openair1/PHY/LTE_TRANSPORT/prach.c openair1/PHY/LTE_TRANSPORT/pucch.c openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c openair1/PHY/impl_defs_lte.h openair1/SCHED/fapi_l1.c openair1/SCHED/phy_procedures_lte_eNb.c openair1/SIMULATION/LTE_PHY/dlsim.c openair2/ENB_APP/enb_config.c openair2/ENB_APP/enb_paramdef.h openair2/LAYER2/MAC/eNB_scheduler_RA.c openair2/LAYER2/MAC/eNB_scheduler_primitives.c targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c targets/RT/USER/lte-enb.c targets/RT/USER/lte-ru.c targets/RT/USER/lte-softmodem.c targets/RT/USER/lte-softmodem.h
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
# vim swp
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
# log and exec file
|
||||||
|
log/
|
||||||
|
lte_build_oai/
|
||||||
|
targets/bin/
|
||||||
|
cmake_targets/nas_sim_tools/build/
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
job1:
|
|
||||||
script:
|
|
||||||
- date
|
|
||||||
- pwd
|
|
||||||
- echo $OAI_TEST_CASE_GROUP
|
|
||||||
- echo $MACHINELIST
|
|
||||||
- echo $MACHINELISTGENERIC
|
|
||||||
- echo $RESULT_DIR
|
|
||||||
- echo $NRUNS_LTE_SOFTMODEM
|
|
||||||
- source oaienv
|
|
||||||
- rm -rf cmake_targets/autotests/log
|
|
||||||
- mkdir cmake_targets/autotests/log
|
|
||||||
- cd cmake_targets/autotests/v2
|
|
||||||
- python main.py
|
|
||||||
- date
|
|
||||||
only:
|
|
||||||
- triggers
|
|
||||||
+27
-8
@@ -9,26 +9,36 @@ Please see NOTICE.txt for third party software that is included in the sources.
|
|||||||
The OpenAirInterface (OAI) software is composed of the following parts:
|
The OpenAirInterface (OAI) software is composed of the following parts:
|
||||||
|
|
||||||
openairinterface5g
|
openairinterface5g
|
||||||
├── cmake_targets: build utilities to compile (simulation, emulation and real-time platforms), and generated build files
|
├── ci-scripts: Meta-scripts used by the OSA CI process. Contains also configuration files used day-to-day by CI.
|
||||||
├── common : some common OAI utilities, other tools can be found at openair2/UTILS
|
├── cmake_targets: Build utilities to compile (simulation, emulation and real-time platforms), and generated build files
|
||||||
|
├── common : Some common OAI utilities, other tools can be found at openair2/UTILS
|
||||||
|
├── doc : Contains an up-to-date feature set list
|
||||||
├── LICENSE
|
├── LICENSE
|
||||||
├── maketags : script to generate emacs tags
|
├── maketags : Script to generate emacs tags
|
||||||
├── openair1 : 3GPP LTE Rel-10 PHY layer + PHY RF simulation and a subset of Rel 12 Features.
|
├── nfapi : Contains the NFAPI code. A local Readme file provides more details.
|
||||||
├── openair2 :3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP implementation.
|
├── openair1 : 3GPP LTE Rel-10/12 PHY layer + PHY RF simulation. A local Readme file provides more details.
|
||||||
|
├── openair2 : 3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP implementation.
|
||||||
|
├── COMMON
|
||||||
|
├── DOCS
|
||||||
|
├── ENB_APP
|
||||||
├── LAYER2/RLC/ with the following subdirectories: UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0.
|
├── LAYER2/RLC/ with the following subdirectories: UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0.
|
||||||
├── LAYER2/PDCP/PDCP_v10.1.0.
|
├── LAYER2/PDCP/PDCP_v10.1.0.
|
||||||
├── RRC/LITE
|
├── NETWORK_DRIVER
|
||||||
├── PHY_INTERFACE
|
├── PHY_INTERFACE
|
||||||
|
├── RRC/LITE
|
||||||
|
├── UTIL
|
||||||
├── X2AP
|
├── X2AP
|
||||||
├── ENB_APP
|
|
||||||
├── openair3: 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
|
├── openair3: 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
|
||||||
|
├── COMMON
|
||||||
|
├── DOCS
|
||||||
├── GTPV1-U
|
├── GTPV1-U
|
||||||
├── NAS
|
├── NAS
|
||||||
├── S1AP
|
├── S1AP
|
||||||
├── SCTP
|
├── SCTP
|
||||||
├── SECU
|
├── SECU
|
||||||
├── UDP
|
├── UDP
|
||||||
└── targets: top level wrapper for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
|
├── UTILS
|
||||||
|
└── targets: Top-level wrappers for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
|
||||||
|
|
||||||
|
|
||||||
RELEASE NOTES:
|
RELEASE NOTES:
|
||||||
@@ -44,3 +54,12 @@ v0.6 -> RRH functionality, UE greatly improved, better TDD support,
|
|||||||
a lot of bugs fixed. WARNING: oaisim in PHY abstraction mode does not
|
a lot of bugs fixed. WARNING: oaisim in PHY abstraction mode does not
|
||||||
work, you need to use v0.5.2 for that.
|
work, you need to use v0.5.2 for that.
|
||||||
v0.6.1 -> Mostly bugfixes. This is the last version without NFAPI.
|
v0.6.1 -> Mostly bugfixes. This is the last version without NFAPI.
|
||||||
|
v1.0.0 -> January 2019. This version first implements the architectural split described in doc/oai_lte_enb_func_split_arch.png picture.
|
||||||
|
Only FAPI, nFAPI and IF4.5 interfaces are implemented.
|
||||||
|
Repository tree structure prepares future integrations of features such as LTE-M, nbIOT or 5G-NR.
|
||||||
|
Preliminary X2 support has been implemented.
|
||||||
|
S1-flex has been introduced.
|
||||||
|
New tools: config library, telnet server, ...
|
||||||
|
A lot of bugfixes and a proper automated Continuous Integration process validates contributions.
|
||||||
|
v1.0.1 -> February 2019: Bug fix for the UE L1 simulator.
|
||||||
|
v1.0.2 -> February 2019: Full OAI support for 3.13.1 UHD
|
||||||
|
|||||||
+237
-56
@@ -33,15 +33,18 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
|
|||||||
def doRedHatBuild = false
|
def doRedHatBuild = false
|
||||||
def doFlexranCtrlTest = false
|
def doFlexranCtrlTest = false
|
||||||
|
|
||||||
|
// Location of the executor node
|
||||||
|
def nodeExecutor = params.nodeExecutor
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
label 'bellatrix'
|
label nodeExecutor
|
||||||
}
|
}
|
||||||
options {
|
options {
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
timestamps()
|
timestamps()
|
||||||
gitLabConnection('OAI GitLab')
|
gitLabConnection('OAI GitLab')
|
||||||
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-FDD-Band7", "Test-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40"])
|
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13"])
|
||||||
ansiColor('xterm')
|
ansiColor('xterm')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +88,9 @@ pipeline {
|
|||||||
echo "GitLab Act is ${env.gitlabActionType}"
|
echo "GitLab Act is ${env.gitlabActionType}"
|
||||||
script {
|
script {
|
||||||
if ("MERGE".equals(env.gitlabActionType)) {
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
|
// since a bit, in push events, gitlabUserEmail is not populated
|
||||||
|
gitCommitAuthorEmailAddr = env.gitlabUserEmail
|
||||||
|
echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}"
|
||||||
// GitLab-Jenkins plugin integration is lacking to perform the merge by itself
|
// GitLab-Jenkins plugin integration is lacking to perform the merge by itself
|
||||||
// Doing it manually --> it may have merge conflicts
|
// Doing it manually --> it may have merge conflicts
|
||||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||||
@@ -104,6 +110,11 @@ pipeline {
|
|||||||
} else {
|
} else {
|
||||||
echo "Git Branch is ${GIT_BRANCH}"
|
echo "Git Branch is ${GIT_BRANCH}"
|
||||||
echo "Git Commit is ${GIT_COMMIT}"
|
echo "Git Commit is ${GIT_COMMIT}"
|
||||||
|
// since a bit, in push events, gitlabUserEmail is not populated
|
||||||
|
gitCommitAuthorEmailAddr = sh returnStdout: true, script: 'git log -n1 --pretty=format:%ae ${GIT_COMMIT}'
|
||||||
|
gitCommitAuthorEmailAddr = gitCommitAuthorEmailAddr.trim()
|
||||||
|
echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}"
|
||||||
|
sh "git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG"
|
||||||
|
|
||||||
sh "zip -r -qq localZip.zip ."
|
sh "zip -r -qq localZip.zip ."
|
||||||
// Running astyle options on all C/H files in the repository
|
// Running astyle options on all C/H files in the repository
|
||||||
@@ -129,6 +140,7 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Merge Conflicts -- Cannot perform CI"
|
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Merge Conflicts -- Cannot perform CI"
|
||||||
addGitLabMRComment comment: message
|
addGitLabMRComment comment: message
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -260,7 +272,7 @@ pipeline {
|
|||||||
expression {doRedHatBuild}
|
expression {doRedHatBuild}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build eNb-USRP-CentOS") {
|
gitlabCommitStatus(name: "Build eNb-USRP-RHE") {
|
||||||
script {
|
script {
|
||||||
try {
|
try {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
@@ -271,7 +283,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
echo "Red Hat build failed not an error now"
|
echo "Red Hat build failed but we could keep running pipeline if all ubuntu-based build passed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,6 +291,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
dir ('archives') {
|
dir ('archives') {
|
||||||
@@ -289,6 +306,17 @@ pipeline {
|
|||||||
}
|
}
|
||||||
if ("MERGE".equals(env.gitlabActionType)) {
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||||
|
// If the merge request has introduced more CPPCHECK errors or warnings, notifications in GitLab
|
||||||
|
if (fileExists('oai_cppcheck_added_errors.txt')) {
|
||||||
|
def ret=readFile('./oai_cppcheck_added_errors.txt').trim();
|
||||||
|
if ("0".equals(ret)) {
|
||||||
|
echo "No added cppcheck warnings/errors in this merge request"
|
||||||
|
} else {
|
||||||
|
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Some modified files in Merge Request MAY have INTRODUCED up to " + ret + " CPPCHECK errors/warnings"
|
||||||
|
addGitLabMRComment comment: message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If the merge request has introduced compilation warnings, notifications in GitLab
|
||||||
sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
||||||
def res=readFile('./oai_warning_files.txt').trim();
|
def res=readFile('./oai_warning_files.txt').trim();
|
||||||
if ("0".equals(res)) {
|
if ("0".equals(res)) {
|
||||||
@@ -312,58 +340,87 @@ pipeline {
|
|||||||
|
|
||||||
stage ("Variant Tests") {
|
stage ("Variant Tests") {
|
||||||
parallel {
|
parallel {
|
||||||
stage ("Test physical simulators") {
|
stage ("VM-based tests") {
|
||||||
steps {
|
stages {
|
||||||
gitlabCommitStatus(name: "Test phy-sim") {
|
stage ("Test physical simulators") {
|
||||||
timeout (time: 20, unit: 'MINUTES') {
|
steps {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
script {
|
||||||
|
timeout (time: 20, unit: 'MINUTES') {
|
||||||
|
try {
|
||||||
|
gitlabCommitStatus(name: "Test phy-sim") {
|
||||||
|
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Build Flexran Controller") {
|
||||||
|
when {
|
||||||
|
expression {doFlexranCtrlTest}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
timeout (time: 20, unit: 'MINUTES') {
|
||||||
|
try {
|
||||||
|
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant flexran-rtc --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Test basic simulator") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
timeout (time: 30, unit: 'MINUTES') {
|
||||||
|
try {
|
||||||
|
gitlabCommitStatus(name: "Test basic-sim") {
|
||||||
|
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Test L2 simulator") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
timeout (time: 30, unit: 'MINUTES') {
|
||||||
|
try {
|
||||||
|
gitlabCommitStatus(name: "Test L2-sim") {
|
||||||
|
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Test basic simulator") {
|
stage ("Test MONOLITHIC - FDD - Band 7 - B210") {
|
||||||
steps {
|
|
||||||
gitlabCommitStatus(name: "Test basic-sim") {
|
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ("Test L2 simulator") {
|
|
||||||
steps {
|
|
||||||
gitlabCommitStatus(name: "Test L2-sim") {
|
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ("Build Flexran Controller") {
|
|
||||||
when {
|
|
||||||
expression {doFlexranCtrlTest}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
timeout (time: 20, unit: 'MINUTES') {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant flexran-rtc --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ("Test FDD - Band 7 - B210") {
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
if ("MERGE".equals(env.gitlabActionType)) {
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
gitlabCommitStatus(name: "Test-Mono-FDD-Band7") {
|
||||||
build job: 'eNB-CI-FDD-Band7-B210',
|
build job: 'eNB-CI-FDD-Band7-B210',
|
||||||
parameters: [
|
parameters: [
|
||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
booleanParam(name: 'eNB_mergeRequest', value: true),
|
||||||
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
gitlabCommitStatus(name: "Test-Mono-FDD-Band7") {
|
||||||
build job: 'eNB-CI-FDD-Band7-B210',
|
build job: 'eNB-CI-FDD-Band7-B210',
|
||||||
parameters: [
|
parameters: [
|
||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
@@ -377,8 +434,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||||
// slave job.
|
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||||
@@ -392,23 +448,29 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Test TDD - Band 40 - B210") {
|
stage ("Test MONOLITHIC - TDD - Band 40 - B210") {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
if ("MERGE".equals(env.gitlabActionType)) {
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
gitlabCommitStatus(name: "Test-Mono-TDD-Band40") {
|
||||||
build job: 'eNB-CI-TDD-Band40-B210',
|
build job: 'eNB-CI-TDD-Band40-B210',
|
||||||
parameters: [
|
parameters: [
|
||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
booleanParam(name: 'eNB_mergeRequest', value: true),
|
||||||
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
gitlabCommitStatus(name: "Test-Mono-TDD-Band40") {
|
||||||
build job: 'eNB-CI-TDD-Band40-B210',
|
build job: 'eNB-CI-TDD-Band40-B210',
|
||||||
parameters: [
|
parameters: [
|
||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
@@ -422,8 +484,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||||
// slave job.
|
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||||
@@ -437,6 +498,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Test IF4p5 - FDD - Band 7 - B210") {
|
stage ("Test IF4p5 - FDD - Band 7 - B210") {
|
||||||
@@ -449,7 +515,8 @@ pipeline {
|
|||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
booleanParam(name: 'eNB_mergeRequest', value: true),
|
||||||
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -467,8 +534,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||||
// slave job.
|
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
if (!fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
if (!fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||||
@@ -482,6 +548,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Test IF4p5 - TDD - Band 40 - B210") {
|
stage ("Test IF4p5 - TDD - Band 40 - B210") {
|
||||||
@@ -494,7 +565,8 @@ pipeline {
|
|||||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
booleanParam(name: 'eNB_mergeRequest', value: true),
|
||||||
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -512,8 +584,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||||
// slave job.
|
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
if (!fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
if (!fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||||
@@ -527,6 +598,111 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Test MONOLITHIC - FDD - Band 13 - B210") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
|
gitlabCommitStatus(name: "Test-Mono-FDD-Band13") {
|
||||||
|
build job: 'eNB-CI-MONO-FDD-Band13-B210',
|
||||||
|
parameters: [
|
||||||
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
|
booleanParam(name: 'eNB_mergeRequest', value: true),
|
||||||
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
gitlabCommitStatus(name: "Test-Mono-FDD-Band13") {
|
||||||
|
build job: 'eNB-CI-MONO-FDD-Band13-B210',
|
||||||
|
parameters: [
|
||||||
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
|
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||||
|
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||||
|
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||||
|
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
if (!fileExists('test_results-eNB-CI-MONO-FDD-Band13-B210.html')) {
|
||||||
|
copyArtifacts(projectName: 'eNB-CI-MONO-FDD-Band13-B210',
|
||||||
|
filter: 'test_results*.html',
|
||||||
|
selector: lastCompleted())
|
||||||
|
if (fileExists('test_results-eNB-CI-MONO-FDD-Band13-B210.html')) {
|
||||||
|
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-MONO-FDD-Band13-B210.html"
|
||||||
|
archiveArtifacts artifacts: 'test_results-eNB-CI-MONO-FDD-Band13-B210.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Test OAI UE Sniffing - FDD - Band 20 - B200") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
|
//gitlabCommitStatus(name: "Test-OAI-UE-FDD-Band20") {
|
||||||
|
build job: 'UE-CI-FDD-Band20-B200',
|
||||||
|
parameters: [
|
||||||
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
|
booleanParam(name: 'eNB_mergeRequest', value: true),
|
||||||
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
|
]
|
||||||
|
//}
|
||||||
|
} else {
|
||||||
|
//gitlabCommitStatus(name: "Test-OAI-UE-FDD-Band20") {
|
||||||
|
build job: 'UE-CI-FDD-Band20-B200',
|
||||||
|
parameters: [
|
||||||
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
|
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||||
|
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||||
|
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||||
|
]
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||||
|
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
if (!fileExists('test_results-UE-CI-FDD-Band20-B200.html')) {
|
||||||
|
copyArtifacts(projectName: 'UE-CI-FDD-Band20-B200',
|
||||||
|
filter: 'test_results*.html',
|
||||||
|
selector: lastCompleted())
|
||||||
|
if (fileExists('test_results-UE-CI-FDD-Band20-B200.html')) {
|
||||||
|
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-UE-CI-FDD-Band20-B200.html"
|
||||||
|
archiveArtifacts artifacts: 'test_results-UE-CI-FDD-Band20-B200.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -565,13 +741,18 @@ pipeline {
|
|||||||
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
emailext attachmentsPattern: '*results*.html',
|
emailext attachmentsPattern: '*results*.html',
|
||||||
body: '''Hi,
|
body: '''Hi,
|
||||||
|
|
||||||
Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
|
Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
|
||||||
|
|
||||||
Regards,
|
Regards,
|
||||||
OAI CI Team''',
|
OAI CI Team''',
|
||||||
replyTo: 'no-reply@openairinterface.org',
|
replyTo: 'no-reply@openairinterface.org',
|
||||||
subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!',
|
subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!',
|
||||||
to: env.gitlabUserEmail
|
to: gitCommitAuthorEmailAddr
|
||||||
|
|
||||||
|
if (fileExists('.git/CI_COMMIT_MSG')) {
|
||||||
|
sh "rm -f .git/CI_COMMIT_MSG"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
success {
|
success {
|
||||||
|
|||||||
@@ -115,8 +115,10 @@ pipeline {
|
|||||||
} else {
|
} else {
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
for (xmlFile in myXmlTestSuite) {
|
for (xmlFile in myXmlTestSuite) {
|
||||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
if (fileExists("ci-scripts/" + xmlFile)) {
|
||||||
echo "Test XML file : ${xmlFile}"
|
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||||
|
echo "Test XML file : ${xmlFile}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If not present picking a default Stage Name
|
// If not present picking a default Stage Name
|
||||||
@@ -191,6 +193,13 @@ pipeline {
|
|||||||
|
|
||||||
if (allParametersPresent) {
|
if (allParametersPresent) {
|
||||||
echo "All parameters are present"
|
echo "All parameters are present"
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||||
|
} else {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "git checkout -f ${eNB_CommitID}"
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "Some parameters are missing"
|
echo "Some parameters are missing"
|
||||||
sh "./ci-scripts/fail.sh"
|
sh "./ci-scripts/fail.sh"
|
||||||
@@ -211,6 +220,7 @@ pipeline {
|
|||||||
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
for (xmlFile in myXmlTestSuite) {
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
try {
|
try {
|
||||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -218,6 +228,7 @@ pipeline {
|
|||||||
buildStageStatus = false
|
buildStageStatus = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,300 @@
|
|||||||
|
#!/bin/groovy
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||||
|
|
||||||
|
// Location of the python executor node shall be in the same subnet as the others servers
|
||||||
|
def pythonExecutor = params.pythonExecutor
|
||||||
|
|
||||||
|
// Location of the test XML file to be run
|
||||||
|
def testXMLFile = params.pythonTestXmlFile
|
||||||
|
def mainPythonAllXmlFiles = ""
|
||||||
|
def buildStageStatus = true
|
||||||
|
|
||||||
|
// Name of the test stage
|
||||||
|
def testStageName = params.pipelineTestStageName
|
||||||
|
|
||||||
|
// Name of the phone resource
|
||||||
|
def ciSmartPhoneResource = params.smartphonesResource
|
||||||
|
|
||||||
|
// Terminate Status
|
||||||
|
def termUE = 0
|
||||||
|
def termENB = 1
|
||||||
|
def termSPGW = 2
|
||||||
|
def termMME = 3
|
||||||
|
def termHSS = 4
|
||||||
|
def termStatusArray = new Boolean[termHSS + 1]
|
||||||
|
termStatusArray[termUE] = false
|
||||||
|
termStatusArray[termENB] = false
|
||||||
|
termStatusArray[termSPGW] = false
|
||||||
|
termStatusArray[termMME] = false
|
||||||
|
termStatusArray[termHSS] = false
|
||||||
|
|
||||||
|
// Global Parameters. Normally they should be populated when the master job
|
||||||
|
// triggers the slave job with parameters
|
||||||
|
def eNB_Repository
|
||||||
|
def eNB_Branch
|
||||||
|
def eNB_CommitID
|
||||||
|
def eNB_AllowMergeRequestProcess = false
|
||||||
|
def eNB_TargetBranch
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label pythonExecutor
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
ansiColor('xterm')
|
||||||
|
lock (ciSmartPhoneResource)
|
||||||
|
}
|
||||||
|
// the following parameter options are commented out so it shows the ones
|
||||||
|
// that you SHALL have to run the job.
|
||||||
|
// You can use them as template
|
||||||
|
/*
|
||||||
|
parameters {
|
||||||
|
//node-test parameters
|
||||||
|
string(name: 'pythonExecutor', defaultValue: 'nodea', description: 'Node where the pipeline - python scripts will be executed')
|
||||||
|
string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run')
|
||||||
|
string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage')
|
||||||
|
booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact')
|
||||||
|
string(name: 'smartphonesResource', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource')
|
||||||
|
|
||||||
|
//eNB parameters
|
||||||
|
string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB')
|
||||||
|
credentials(name: 'eNB_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for eNB')
|
||||||
|
string(name: 'eNB_SourceCodePath', defaultValue: '/tmp/CI-enb', description: 'Full path of eNB source code')
|
||||||
|
|
||||||
|
//EPC parameters
|
||||||
|
string(name: 'EPC_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of EPC')
|
||||||
|
string(name: 'EPC_Type', defaultValue: 'ltebox', description: 'EPC type: OAI or ltebox')
|
||||||
|
credentials(name: 'EPC_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for EPC')
|
||||||
|
string(name: 'EPC_SourceCodePath', defaultValue: '/tmp/CI-enb', description: 'Full path of EPC source code')
|
||||||
|
|
||||||
|
//ADB server parameters
|
||||||
|
string(name: 'ADB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of ADB server')
|
||||||
|
credentials(name: 'ADB_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for ADB')
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
stages {
|
||||||
|
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.pythonExecutor != null) {
|
||||||
|
echo "eNB CI executor node : ${pythonExecutor}"
|
||||||
|
}
|
||||||
|
// If not present picking a default XML file
|
||||||
|
if (params.pythonTestXmlFile == null) {
|
||||||
|
// picking default
|
||||||
|
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
||||||
|
echo "Test XML file(default): ${testXMLFile}"
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||||
|
} else {
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists("ci-scripts/" + xmlFile)) {
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||||
|
echo "Test XML file : ${xmlFile}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If not present picking a default Stage Name
|
||||||
|
if (params.pipelineTestStageName == null) {
|
||||||
|
// picking default
|
||||||
|
testStageName = 'Template Test Stage'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.smartphonesResource == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.UE_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.UE_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.UE_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}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if (params.EPC_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_Type == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Build and Test") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
dir ('ci-scripts') {
|
||||||
|
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
|
try {
|
||||||
|
sh "python3 main.py --mode=TestUE --UEIPAddress=${params.UE_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_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} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection') {
|
||||||
|
parallel {
|
||||||
|
stage('Log Collection (OAI UE - Build)') {
|
||||||
|
steps {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m'
|
||||||
|
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (OAI UE - Run)') {
|
||||||
|
steps {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLog Transfer (UE - Run)\u001B[0m'
|
||||||
|
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
if(fileExists("ue.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "ue.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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -180,7 +180,7 @@ echo "Checking build status"
|
|||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
|
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=4
|
NB_PATTERN_FILES=7
|
||||||
|
|
||||||
LOG_FILES=`ls $ARCHIVES_LOC/*.txt`
|
LOG_FILES=`ls $ARCHIVES_LOC/*.txt`
|
||||||
STATUS=0
|
STATUS=0
|
||||||
@@ -204,12 +204,13 @@ then
|
|||||||
STATUS=-1
|
STATUS=-1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "COMMAND: build_oai -I -w USRP --eNB" > $ARCHIVES_LOC/build_final_status.log
|
||||||
if [ $STATUS -eq 0 ]
|
if [ $STATUS -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log
|
echo "BUILD_OK" >> $ARCHIVES_LOC/build_final_status.log
|
||||||
echo "STATUS seems OK"
|
echo "STATUS seems OK"
|
||||||
else
|
else
|
||||||
echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log
|
echo "BUILD_KO" >> $ARCHIVES_LOC/build_final_status.log
|
||||||
echo "STATUS failed?"
|
echo "STATUS failed?"
|
||||||
fi
|
fi
|
||||||
exit $STATUS
|
exit $STATUS
|
||||||
|
|||||||
+13
-6
@@ -94,15 +94,22 @@ function build_on_vm {
|
|||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
|
acquire_vm_create_lock
|
||||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||||
|
echo "Waiting for VM to be started"
|
||||||
|
uvt-kvm wait $VM_NAME --insecure
|
||||||
|
|
||||||
|
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||||
|
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||||
|
release_vm_create_lock
|
||||||
|
else
|
||||||
|
echo "Waiting for VM to be started"
|
||||||
|
uvt-kvm wait $VM_NAME --insecure
|
||||||
|
|
||||||
|
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||||
|
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Waiting for VM to be started"
|
|
||||||
uvt-kvm wait $VM_NAME --insecure
|
|
||||||
|
|
||||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
|
||||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
|
||||||
|
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Copying GIT repo into VM ($VM_NAME)"
|
echo "Copying GIT repo into VM ($VM_NAME)"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ fi
|
|||||||
|
|
||||||
# Merge request scenario
|
# Merge request scenario
|
||||||
|
|
||||||
MERGE_COMMMIT=`git log -n1 | grep commit | sed -e "s@commit @@"`
|
MERGE_COMMMIT=`git log -n1 --pretty=format:%H`
|
||||||
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
|
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
|
||||||
|
|
||||||
echo " ---- Checking the modified files by the merge request ----"
|
echo " ---- Checking the modified files by the merge request ----"
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ fi
|
|||||||
|
|
||||||
# Merge request scenario
|
# Merge request scenario
|
||||||
|
|
||||||
MERGE_COMMMIT=`git log -n1 | grep commit | sed -e "s@commit @@"`
|
MERGE_COMMMIT=`git log -n1 --pretty=format:%H`
|
||||||
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
|
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
|
||||||
|
|
||||||
echo " ---- Checking the modified files by the merge request ----"
|
echo " ---- Checking the modified files by the merge request ----"
|
||||||
|
|||||||
@@ -0,0 +1,467 @@
|
|||||||
|
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||||
|
# Asn1_verbosity, choice in: none, info, annoying
|
||||||
|
Asn1_verbosity = "none";
|
||||||
|
|
||||||
|
eNBs =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
////////// Identification parameters:
|
||||||
|
eNB_ID = 0xe00;
|
||||||
|
|
||||||
|
cell_type = "CELL_MACRO_ENB";
|
||||||
|
|
||||||
|
eNB_name = "eNB_Eurecom_LTEBox";
|
||||||
|
|
||||||
|
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||||
|
tracking_area_code = 1;
|
||||||
|
|
||||||
|
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2;} );
|
||||||
|
|
||||||
|
tr_s_preference = "local_mac"
|
||||||
|
|
||||||
|
////////// Physical parameters:
|
||||||
|
|
||||||
|
component_carriers = (
|
||||||
|
{
|
||||||
|
node_function = "3GPP_eNodeB";
|
||||||
|
node_timing = "synch_to_ext_device";
|
||||||
|
node_synch_ref = 0;
|
||||||
|
frame_type = "FDD";
|
||||||
|
tdd_config = 3;
|
||||||
|
tdd_config_s = 0;
|
||||||
|
prefix_type = "NORMAL";
|
||||||
|
eutra_band = 13;
|
||||||
|
downlink_frequency = 751000000L;
|
||||||
|
uplink_frequency_offset = 31000000;
|
||||||
|
Nid_cell = 0;
|
||||||
|
N_RB_DL = 50;
|
||||||
|
Nid_cell_mbsfn = 0;
|
||||||
|
nb_antenna_ports = 1;
|
||||||
|
nb_antennas_tx = 1;
|
||||||
|
nb_antennas_rx = 1;
|
||||||
|
tx_gain = 90;
|
||||||
|
rx_gain = 110;
|
||||||
|
pbch_repetition = "FALSE";
|
||||||
|
prach_root = 0;
|
||||||
|
prach_config_index = 0;
|
||||||
|
prach_high_speed = "DISABLE";
|
||||||
|
prach_zero_correlation = 1;
|
||||||
|
prach_freq_offset = 1;
|
||||||
|
pucch_delta_shift = 1;
|
||||||
|
pucch_nRB_CQI = 0;
|
||||||
|
pucch_nCS_AN = 0;
|
||||||
|
pucch_n1_AN = 0;
|
||||||
|
pdsch_referenceSignalPower = -24;
|
||||||
|
pdsch_p_b = 0;
|
||||||
|
pusch_n_SB = 1;
|
||||||
|
pusch_enable64QAM = "DISABLE";
|
||||||
|
pusch_hoppingMode = "interSubFrame";
|
||||||
|
pusch_hoppingOffset = 0;
|
||||||
|
pusch_groupHoppingEnabled = "ENABLE";
|
||||||
|
pusch_groupAssignment = 0;
|
||||||
|
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||||
|
pusch_nDMRS1 = 1;
|
||||||
|
phich_duration = "NORMAL";
|
||||||
|
phich_resource = "ONESIXTH";
|
||||||
|
srs_enable = "DISABLE";
|
||||||
|
/* srs_BandwidthConfig =;
|
||||||
|
srs_SubframeConfig =;
|
||||||
|
srs_ackNackST =;
|
||||||
|
srs_MaxUpPts =;*/
|
||||||
|
|
||||||
|
pusch_p0_Nominal = -96;
|
||||||
|
pusch_alpha = "AL1";
|
||||||
|
pucch_p0_Nominal = -104;
|
||||||
|
msg3_delta_Preamble = 6;
|
||||||
|
pucch_deltaF_Format1 = "deltaF2";
|
||||||
|
pucch_deltaF_Format1b = "deltaF3";
|
||||||
|
pucch_deltaF_Format2 = "deltaF0";
|
||||||
|
pucch_deltaF_Format2a = "deltaF0";
|
||||||
|
pucch_deltaF_Format2b = "deltaF0";
|
||||||
|
|
||||||
|
rach_numberOfRA_Preambles = "n64"; #64
|
||||||
|
rach_preamblesGroupAConfig = "DISABLE";
|
||||||
|
/*
|
||||||
|
rach_sizeOfRA_PreamblesGroupA = ;
|
||||||
|
rach_messageSizeGroupA = ;
|
||||||
|
rach_messagePowerOffsetGroupB = ;
|
||||||
|
*/
|
||||||
|
rach_powerRampingStep = 4;
|
||||||
|
rach_preambleInitialReceivedTargetPower = -108;
|
||||||
|
rach_preambleTransMax = 10;
|
||||||
|
rach_raResponseWindowSize = 10;
|
||||||
|
rach_macContentionResolutionTimer = 48;
|
||||||
|
rach_maxHARQ_Msg3Tx = 4;
|
||||||
|
|
||||||
|
pcch_default_PagingCycle = "rf128"; #128
|
||||||
|
pcch_nB = "oneT";
|
||||||
|
bcch_modificationPeriodCoeff = 2;
|
||||||
|
ue_TimersAndConstants_t300 = "ms1000";
|
||||||
|
ue_TimersAndConstants_t301 = "ms1000";
|
||||||
|
ue_TimersAndConstants_t310 = "ms1000";
|
||||||
|
ue_TimersAndConstants_t311 = "ms10000";
|
||||||
|
ue_TimersAndConstants_n310 = "n20";
|
||||||
|
ue_TimersAndConstants_n311 = "n1";
|
||||||
|
ue_TransmissionMode = "tm1";
|
||||||
|
|
||||||
|
# eMTC Parameters
|
||||||
|
emtc_parameters :
|
||||||
|
{
|
||||||
|
eMTC_configured = 1;
|
||||||
|
#hyperSFN_r13 = 0;
|
||||||
|
#eDRX_Allowed_r13 = 0;
|
||||||
|
#q_QualMinRSRQ_CE_r13 = ;
|
||||||
|
|
||||||
|
#SIB1
|
||||||
|
schedulingInfoSIB1_BR_r13 = 4;
|
||||||
|
|
||||||
|
#system_info_value_tag_SI =
|
||||||
|
#(
|
||||||
|
# {
|
||||||
|
# systemInfoValueTagSi_r13 = 0;
|
||||||
|
# }
|
||||||
|
#);
|
||||||
|
|
||||||
|
cellSelectionInfoCE_r13 = "ENABLE";
|
||||||
|
q_RxLevMinCE_r13 = -70;
|
||||||
|
bandwidthReducedAccessRelatedInfo_r13 = "ENABLE"
|
||||||
|
si_WindowLength_BR_r13 = "ms20"; #0
|
||||||
|
si_RepetitionPattern_r13 = "everyRF"; #0
|
||||||
|
|
||||||
|
scheduling_info_br =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
si_Narrowband_r13 = 8;
|
||||||
|
si_TBS_r13 = 5;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
fdd_DownlinkOrTddSubframeBitmapBR_r13 = "subframePattern40-r13";
|
||||||
|
fdd_DownlinkOrTddSubframeBitmapBR_val_r13 = 0xFFFFFFFFFF;
|
||||||
|
startSymbolBR_r13 = 2;
|
||||||
|
si_HoppingConfigCommon_r13 = "off"; #1; # Note: 1==OFF !
|
||||||
|
si_ValidityTime_r13 = "true"; #0
|
||||||
|
|
||||||
|
freqHoppingParametersDL_r13 = "DISABLE"
|
||||||
|
mpdcch_pdsch_HoppingNB_r13 = "nb2"; #0
|
||||||
|
interval_DLHoppingConfigCommonModeA_r13 = "interval-FDD-r13"
|
||||||
|
interval_DLHoppingConfigCommonModeA_r13_val = 0;
|
||||||
|
interval_DLHoppingConfigCommonModeB_r13 = "interval-FDD-r13"
|
||||||
|
interval_DLHoppingConfigCommonModeB_r13_val = 0;
|
||||||
|
mpdcch_pdsch_HoppingOffset_r13 = 1;
|
||||||
|
|
||||||
|
|
||||||
|
# SIB23
|
||||||
|
frame_type = "FDD";
|
||||||
|
preambleTransMax_CE_r13 = 10; #6
|
||||||
|
|
||||||
|
rach_numberOfRA_Preambles = 60; #14
|
||||||
|
rach_powerRampingStep = 4;
|
||||||
|
rach_preambleInitialReceivedTargetPower = -110;
|
||||||
|
rach_preambleTransMax = 10;
|
||||||
|
rach_raResponseWindowSize = 10;
|
||||||
|
rach_macContentionResolutionTimer = 64;
|
||||||
|
rach_maxHARQ_Msg3Tx = 4;
|
||||||
|
|
||||||
|
# max size for this array is 4
|
||||||
|
rach_CE_LevelInfoList_r13 =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
firstPreamble_r13 = 60;
|
||||||
|
lastPreamble_r13 = 63;
|
||||||
|
ra_ResponseWindowSize_r13 = 20; #0
|
||||||
|
mac_ContentionResolutionTimer_r13 = 80; #0
|
||||||
|
rar_HoppingConfig_r13 = "off"; #1;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
# BCCH CONFIG
|
||||||
|
bcch_modificationPeriodCoeff = 2;
|
||||||
|
|
||||||
|
#PCCH Config
|
||||||
|
pcch_default_PagingCycle = "rf128"; #128
|
||||||
|
pcch_nB = "oneT";
|
||||||
|
|
||||||
|
#PRACH Config
|
||||||
|
prach_root = 89;
|
||||||
|
prach_config_index = 0;
|
||||||
|
prach_high_speed = "DISABLE";
|
||||||
|
prach_zero_correlation = 1;
|
||||||
|
prach_freq_offset = 1;
|
||||||
|
|
||||||
|
#PDSCH Config Common
|
||||||
|
pdsch_referenceSignalPower = -24
|
||||||
|
pdsch_p_b = 0;
|
||||||
|
|
||||||
|
|
||||||
|
# PUSCH Config Common
|
||||||
|
pusch_n_SB = 1;
|
||||||
|
pusch_hoppingMode = "interSubFrame";
|
||||||
|
pusch_hoppingOffset = 0;
|
||||||
|
pusch_enable64QAM = "DISABLE";
|
||||||
|
pusch_groupHoppingEnabled = "ENABLE";
|
||||||
|
pusch_groupAssignment = 0;
|
||||||
|
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||||
|
pusch_nDMRS1 = 1;
|
||||||
|
|
||||||
|
# PUCCH Config Common
|
||||||
|
pucch_delta_shift = 1;
|
||||||
|
pucch_nRB_CQI = 0;
|
||||||
|
pucch_nCS_AN = 0;
|
||||||
|
pucch_n1_AN = 0;
|
||||||
|
|
||||||
|
pusch_p0_Nominal = -96;
|
||||||
|
pusch_alpha = "AL1";
|
||||||
|
pucch_p0_Nominal = -104;
|
||||||
|
pucch_deltaF_Format1 = "deltaF0";
|
||||||
|
pucch_deltaF_Format1b = "deltaF3";
|
||||||
|
pucch_deltaF_Format2 = "deltaF0";
|
||||||
|
pucch_deltaF_Format2a = "deltaF0";
|
||||||
|
pucch_deltaF_Format2b = "deltaF0";
|
||||||
|
|
||||||
|
msg3_delta_Preamble = 6;
|
||||||
|
|
||||||
|
|
||||||
|
prach_ConfigCommon_v1310 = "ENABLE";
|
||||||
|
|
||||||
|
mpdcch_startSF_CSS_RA_r13 = "fdd-r13";
|
||||||
|
mpdcch_startSF_CSS_RA_r13_val = "v1"; #0
|
||||||
|
prach_HoppingOffset_r13 = 0;
|
||||||
|
|
||||||
|
|
||||||
|
pdsch_maxNumRepetitionCEmodeA_r13 = "r16"; #0
|
||||||
|
#pdsch_maxNumRepetitionCEmodeB_r13 = "r384"; # NULL - 2
|
||||||
|
|
||||||
|
pusch_maxNumRepetitionCEmodeA_r13 = "r8"; #0
|
||||||
|
#pusch_maxNumRepetitionCEmodeB_r13 = "r768"; #4 #NULL
|
||||||
|
#pusch_HoppingOffset_v1310 = 5; #NULL
|
||||||
|
|
||||||
|
# max size for this array is 3
|
||||||
|
rsrp_range_list =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
rsrp_range_br = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
# max size for this array is 4
|
||||||
|
prach_parameters_ce_r13 =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
prach_config_index_br = 3;
|
||||||
|
prach_freq_offset_br = 2;
|
||||||
|
prach_StartingSubframe_r13 = 2;
|
||||||
|
maxNumPreambleAttemptCE_r13 = 10; #6
|
||||||
|
numRepetitionPerPreambleAttempt_r13 = 1; #0
|
||||||
|
mpdcch_NumRepetition_RA_r13 = 1; #0
|
||||||
|
prach_HoppingConfig_r13 = 0; #1
|
||||||
|
max_available_narrow_band = [3];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
n1PUCCH_AN_InfoList_r13 =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
pucch_info_value = 33;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
ue_TimersAndConstants_t300 = "ms1000";
|
||||||
|
ue_TimersAndConstants_t301 = "ms400";
|
||||||
|
ue_TimersAndConstants_t310 = "ms50";
|
||||||
|
ue_TimersAndConstants_t311 = "ms30000";
|
||||||
|
ue_TimersAndConstants_n310 = "n1";
|
||||||
|
ue_TimersAndConstants_n311 = "n10";
|
||||||
|
ue_TransmissionMode = "tm1";
|
||||||
|
|
||||||
|
pcch_config_v1310 :
|
||||||
|
{
|
||||||
|
paging_narrowbands_r13 = 1;
|
||||||
|
mpdcch_numrepetition_paging_r13 = "r1"; #0
|
||||||
|
#nb_v1310 = "one256thT"; #2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pucch_NumRepetitionCE_Msg4_Level0_r13 = "n1"; #0
|
||||||
|
#pucch_NumRepetitionCE_Msg4_Level1_r13 = "n2"; #1
|
||||||
|
#pucch_NumRepetitionCE_Msg4_Level2_r13 = "n16"; #2
|
||||||
|
#pucch_NumRepetitionCE_Msg4_Level3_r13 = "n32"; #3
|
||||||
|
|
||||||
|
sib2_freq_hoppingParameters_r13 :
|
||||||
|
{
|
||||||
|
#sib2_mpdcch_pdsch_hoppingNB_r13 = "nb2"; #0
|
||||||
|
#sib2_interval_DLHoppingConfigCommonModeA_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
|
||||||
|
#sib2_interval_DLHoppingConfigCommonModeA_r13_val = "int1";
|
||||||
|
#sib2_interval_DLHoppingConfigCommonModeB_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
|
||||||
|
#sib2_interval_DLHoppingConfigCommonModeB_r13_val = "int2";
|
||||||
|
|
||||||
|
sib2_interval_ULHoppingConfigCommonModeA_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
|
||||||
|
sib2_interval_ULHoppingConfigCommonModeA_r13_val = "int4"; #2
|
||||||
|
# sib2_interval_ULHoppingConfigCommonModeB_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
|
||||||
|
# sib2_interval_ULHoppingConfigCommonModeB_r13_val = "int2"; #0
|
||||||
|
|
||||||
|
# sib2_mpdcch_pdsch_hoppingOffset_r13 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rach_preamblesGroupAConfig = "DISABLE";
|
||||||
|
|
||||||
|
phich_duration = "NORMAL";
|
||||||
|
phich_resource = "ONESIXTH";
|
||||||
|
srs_enable = "DISABLE";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
srb1_parameters :
|
||||||
|
{
|
||||||
|
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||||
|
timer_poll_retransmit = 80;
|
||||||
|
|
||||||
|
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||||
|
timer_reordering = 35;
|
||||||
|
|
||||||
|
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||||
|
timer_status_prohibit = 0;
|
||||||
|
|
||||||
|
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||||
|
poll_pdu = 4;
|
||||||
|
|
||||||
|
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||||
|
poll_byte = 99999;
|
||||||
|
|
||||||
|
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||||
|
max_retx_threshold = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------- SCTP definitions
|
||||||
|
SCTP :
|
||||||
|
{
|
||||||
|
# Number of streams to use in input/output
|
||||||
|
SCTP_INSTREAMS = 2;
|
||||||
|
SCTP_OUTSTREAMS = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
////////// MME parameters:
|
||||||
|
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||||
|
ipv6 = "192:168:30::17";
|
||||||
|
active = "yes";
|
||||||
|
preference = "ipv4";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||||
|
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||||
|
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||||
|
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||||
|
};
|
||||||
|
|
||||||
|
log_config :
|
||||||
|
{
|
||||||
|
global_log_level ="info";
|
||||||
|
global_log_verbosity ="medium";
|
||||||
|
hw_log_level ="info";
|
||||||
|
hw_log_verbosity ="medium";
|
||||||
|
phy_log_level ="info";
|
||||||
|
phy_log_verbosity ="medium";
|
||||||
|
mac_log_level ="info";
|
||||||
|
mac_log_verbosity ="high";
|
||||||
|
rlc_log_level ="info";
|
||||||
|
rlc_log_verbosity ="medium";
|
||||||
|
pdcp_log_level ="info";
|
||||||
|
pdcp_log_verbosity ="medium";
|
||||||
|
rrc_log_level ="info";
|
||||||
|
rrc_log_verbosity ="medium";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
MACRLCs = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_s_preference = "local_L1";
|
||||||
|
tr_n_preference = "local_RRC";
|
||||||
|
phy_test_mode = 0;
|
||||||
|
puSch10xSnr = 200;
|
||||||
|
puCch10xSnr = 200;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
L1s = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_n_preference = "local_mac";
|
||||||
|
prach_dtx_threshold = 200;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
RUs = (
|
||||||
|
{
|
||||||
|
local_rf = "yes"
|
||||||
|
nb_tx = 1
|
||||||
|
nb_rx = 1
|
||||||
|
att_tx = 0
|
||||||
|
att_rx = 0;
|
||||||
|
bands = [13];
|
||||||
|
max_pdschReferenceSignalPower = -24;
|
||||||
|
max_rxgain = 110;
|
||||||
|
eNB_instances = [0];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
THREAD_STRUCT = (
|
||||||
|
{
|
||||||
|
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||||
|
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||||
|
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||||
|
worker_config = "WORKER_ENABLE";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
NETWORK_CONTROLLER :
|
||||||
|
{
|
||||||
|
FLEXRAN_ENABLED = "no";
|
||||||
|
FLEXRAN_INTERFACE_NAME = "lo";
|
||||||
|
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||||
|
FLEXRAN_PORT = 2210;
|
||||||
|
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||||
|
FLEXRAN_AWAIT_RECONF = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
log_config :
|
||||||
|
{
|
||||||
|
global_log_level ="info";
|
||||||
|
global_log_verbosity ="medium";
|
||||||
|
hw_log_level ="info";
|
||||||
|
hw_log_verbosity ="medium";
|
||||||
|
phy_log_level ="info";
|
||||||
|
phy_log_verbosity ="medium";
|
||||||
|
mac_log_level ="info";
|
||||||
|
mac_log_verbosity ="high";
|
||||||
|
rlc_log_level ="info";
|
||||||
|
rlc_log_verbosity ="medium";
|
||||||
|
pdcp_log_level ="info";
|
||||||
|
pdcp_log_verbosity ="medium";
|
||||||
|
rrc_log_level ="info";
|
||||||
|
rrc_log_verbosity ="medium";
|
||||||
|
};
|
||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -178,6 +178,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -178,6 +178,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -178,6 +178,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -181,6 +181,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
@@ -262,4 +267,3 @@ log_config :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -204,10 +209,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -261,4 +266,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -144,6 +144,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -144,6 +144,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -144,6 +144,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -181,6 +181,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
@@ -206,10 +211,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -267,4 +272,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
@@ -206,10 +211,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -267,4 +272,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
@@ -206,10 +211,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -267,4 +272,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -179,6 +179,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "ens3";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "ens3";
|
||||||
|
|||||||
@@ -42,4 +42,3 @@ log_config = {
|
|||||||
rrc_log_level ="error";
|
rrc_log_level ="error";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -42,4 +42,3 @@ log_config = {
|
|||||||
rrc_log_level ="error";
|
rrc_log_level ="error";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,16 @@ log_config = {
|
|||||||
|
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "nfapi";
|
tr_n_preference = "nfapi";
|
||||||
local_n_if_name = "lo";
|
local_n_if_name = "lo";
|
||||||
remote_n_address = "127.0.0.2";
|
remote_n_address = "127.0.0.2";
|
||||||
local_n_address = "127.0.0.1";
|
local_n_address = "127.0.0.1";
|
||||||
local_n_portc = 50000;
|
local_n_portc = 50000;
|
||||||
remote_n_portc = 50001;
|
remote_n_portc = 50001;
|
||||||
local_n_portd = 50010;
|
local_n_portd = 50010;
|
||||||
remote_n_portd = 50011;
|
remote_n_portd = 50011;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
// *INDENT-OFF* cppcheck doesn't like "astyling" this file!!!!
|
||||||
|
// /*
|
||||||
|
// * 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
|
||||||
|
// */
|
||||||
|
//*****************************************************************************
|
||||||
|
//*****************************************************************************
|
||||||
|
// section for "valid" memory leaks: the related functions are allocators and
|
||||||
|
// the caller is responsible of freeing the memory. cppcheck has a mechanism
|
||||||
|
// to check more accuretaly this, by defining callers responsible of freeing
|
||||||
|
// but tools like valgring might be more suitable
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// suppress error about keysP memory leak, free must be done by calling func
|
||||||
|
memleak:common/utils/hashtable/obj_hashtable.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// suppress error about keys memory leak, free must be done by calling func
|
||||||
|
memleak:openair2/UTIL/OMG/omg_hashtable.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// suppress error about data memory leak. This is the buffer where
|
||||||
|
// _emm_as_encode function creates the encoded buffer
|
||||||
|
//
|
||||||
|
memleak:openair3/NAS/UE/EMM/SAP/emm_as.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//*****************************************************************************
|
||||||
|
// section for files not used in oai exec's included in CI.
|
||||||
|
// Possibly candidates for removal otherwise should be documented and updated
|
||||||
|
// for project rules enforcement
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// likely sources for test programs, maintained?
|
||||||
|
invalidPrintfArgType_sint:openair1/PHY/CODING/TESTBENCH/ltetest.c
|
||||||
|
memleak:openair1/PHY/CODING/TESTBENCH/ltetest.c
|
||||||
|
invalidPrintfArgType_sint:openair1/PHY/CODING/TESTBENCH/pdcch_test.c
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// oaisim deprecated, remove?
|
||||||
|
doubleFree:openair3/TEST/oaisim_mme_list_benchmark.c
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// is itti analyzer deprecated
|
||||||
|
nullPointer:common/utils/itti_analyzer/itti_analyzer.c
|
||||||
|
nullPointerRedundantCheck:common/utils/itti_analyzer/libbuffers/buffers.c
|
||||||
|
doubleFree:common/utils/itti_analyzer/libbuffers/socket.c
|
||||||
|
memleak:common/utils/itti_analyzer/libbuffers/socket.c
|
||||||
|
memleak:common/utils/itti_analyzer/libparser/array_type.c
|
||||||
|
memleak:common/utils/itti_analyzer/libui/ui_callbacks.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// obviously never even compiled!!!
|
||||||
|
syntaxError:openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// omg, otg commented out in cmakelist to be cleaned up definitely?
|
||||||
|
arrayIndexOutOfBounds:openair2/UTIL/OMG/omg.c
|
||||||
|
uninitvar:openair2/UTIL/OTG/otg_rx_socket.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// cppcheck is not able to understand that buf is initialized at the first
|
||||||
|
// iteration of the loop.
|
||||||
|
nullPointer:common/utils/T/local_tracer.c:243
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// once again cppcheck does not understand that fds is initialized in the
|
||||||
|
// first iteration of the loop
|
||||||
|
nullPointer:common/utils/T/tracer/multi.c:264
|
||||||
|
nullPointer:common/utils/T/tracer/multi.c:265
|
||||||
|
//
|
||||||
|
//*****************************************************************************
|
||||||
|
//
|
||||||
|
// True problems we don't know how to fix, Suppression is commented out,
|
||||||
|
// as these kind of problem need either to be fixed or can be suppressed
|
||||||
|
// when fully uderstood
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// the function [nv]fapi_pnf_p7_config_create should return
|
||||||
|
// _this. _this points to a structure and a dynamically allocated field is
|
||||||
|
// returned. cppcheck suspects _this will never be released, so do i
|
||||||
|
// memleak:nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
|
||||||
|
// memleak:nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// may be security_data->kenb.value is released from calling functions. But even
|
||||||
|
// when, for test, freeing it before returning from emm_proc_security_mode_command
|
||||||
|
// which does the allocation, cppcheck complains. So something might be wrong...
|
||||||
|
// memleak:openair3/NAS/UE/EMM/SecurityModeControl.c
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// when used, nobody but the original developer can guess if sn_data_cnf is set or not
|
||||||
|
// cppcheck found that in some cases it is not, code needs cleanup before fixing that...
|
||||||
|
// uninitvar:openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
|
||||||
|
//*****************************************************************************
|
||||||
|
// *INDENT-ON*
|
||||||
@@ -49,6 +49,35 @@ function create_usage {
|
|||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function acquire_vm_create_lock {
|
||||||
|
local FlockFile="/tmp/vmclone.lck"
|
||||||
|
local unlocked="0"
|
||||||
|
touch ${FlockFile} 2>/dev/null
|
||||||
|
if [[ $? -ne 0 ]]
|
||||||
|
then
|
||||||
|
echo "Cannot access lock file ${FlockFile}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
while [ $unlocked -eq 0 ]
|
||||||
|
do
|
||||||
|
exec 5>${FlockFile}
|
||||||
|
flock -nx 5
|
||||||
|
if [[ $? -ne 0 ]]
|
||||||
|
then
|
||||||
|
echo "Another instance of VM creation is running"
|
||||||
|
sleep 10
|
||||||
|
else
|
||||||
|
unlocked="1"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
chmod 666 ${FlockFile} 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
function release_vm_create_lock {
|
||||||
|
local FlockFile="/tmp/vmclone.lck"
|
||||||
|
rm -Rf ${FlockFile}
|
||||||
|
}
|
||||||
|
|
||||||
function create_vm {
|
function create_vm {
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "OAI CI VM script"
|
echo "OAI CI VM script"
|
||||||
@@ -60,10 +89,12 @@ function create_vm {
|
|||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
|
acquire_vm_create_lock
|
||||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||||
echo "Waiting for VM to be started"
|
echo "Waiting for VM to be started"
|
||||||
uvt-kvm wait $VM_NAME --insecure
|
uvt-kvm wait $VM_NAME --insecure
|
||||||
|
|
||||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||||
|
release_vm_create_lock
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ esac
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ $TARGET_COMMIT_ID == "latest" ]]
|
||||||
|
then
|
||||||
|
TARGET_COMMIT_ID=`git log -n1 --pretty=format:%H origin/$TARGET_BRANCH`
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Source Branch is : $SOURCE_BRANCH"
|
echo "Source Branch is : $SOURCE_BRANCH"
|
||||||
echo "Source Commit ID is : $SOURCE_COMMIT_ID"
|
echo "Source Commit ID is : $SOURCE_COMMIT_ID"
|
||||||
echo "Target Branch is : $TARGET_BRANCH"
|
echo "Target Branch is : $TARGET_BRANCH"
|
||||||
@@ -121,6 +126,7 @@ git config user.email "jenkins@openairinterface.org"
|
|||||||
git config user.name "OAI Jenkins"
|
git config user.name "OAI Jenkins"
|
||||||
|
|
||||||
git checkout -f $SOURCE_COMMIT_ID
|
git checkout -f $SOURCE_COMMIT_ID
|
||||||
|
git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG
|
||||||
|
|
||||||
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
|
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
|
||||||
|
|
||||||
|
|||||||
+757
-82
File diff suppressed because it is too large
Load Diff
+21
-18
@@ -69,7 +69,7 @@ VM_MEMORY=2048
|
|||||||
VM_CPU=4
|
VM_CPU=4
|
||||||
ARCHIVES_LOC=enb_usrp
|
ARCHIVES_LOC=enb_usrp
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=4
|
NB_PATTERN_FILES=7
|
||||||
BUILD_OPTIONS="--eNB -w USRP"
|
BUILD_OPTIONS="--eNB -w USRP"
|
||||||
KEEP_VM_ALIVE=0
|
KEEP_VM_ALIVE=0
|
||||||
RUN_OPTIONS="none"
|
RUN_OPTIONS="none"
|
||||||
@@ -231,7 +231,7 @@ case $key in
|
|||||||
VM_NAME=ci-enb-usrp
|
VM_NAME=ci-enb-usrp
|
||||||
ARCHIVES_LOC=enb_usrp
|
ARCHIVES_LOC=enb_usrp
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=4
|
NB_PATTERN_FILES=7
|
||||||
BUILD_OPTIONS="--eNB -w USRP --mu"
|
BUILD_OPTIONS="--eNB -w USRP --mu"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
shift
|
shift
|
||||||
@@ -264,7 +264,7 @@ case $key in
|
|||||||
ARCHIVES_LOC=cppcheck
|
ARCHIVES_LOC=cppcheck
|
||||||
LOG_PATTERN=cppcheck.xml
|
LOG_PATTERN=cppcheck.xml
|
||||||
NB_PATTERN_FILES=1
|
NB_PATTERN_FILES=1
|
||||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 --suppressions-list=ci-scripts/cppcheck_suppressions.list -I common/utils -j4"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@@ -272,7 +272,7 @@ case $key in
|
|||||||
VM_NAME=ci-enb-ethernet
|
VM_NAME=ci-enb-ethernet
|
||||||
ARCHIVES_LOC=enb_eth
|
ARCHIVES_LOC=enb_eth
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=6
|
NB_PATTERN_FILES=8
|
||||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
shift
|
shift
|
||||||
@@ -281,7 +281,7 @@ case $key in
|
|||||||
VM_NAME=ci-ue-ethernet
|
VM_NAME=ci-ue-ethernet
|
||||||
ARCHIVES_LOC=ue_eth
|
ARCHIVES_LOC=ue_eth
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=6
|
NB_PATTERN_FILES=8
|
||||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
shift
|
shift
|
||||||
@@ -292,7 +292,7 @@ case $key in
|
|||||||
VM_CPU=8
|
VM_CPU=8
|
||||||
ARCHIVES_LOC=l2_sim
|
ARCHIVES_LOC=l2_sim
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=4
|
NB_PATTERN_FILES=6
|
||||||
BUILD_OPTIONS="--eNB -t ETHERNET"
|
BUILD_OPTIONS="--eNB -t ETHERNET"
|
||||||
RUN_OPTIONS="complex"
|
RUN_OPTIONS="complex"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
@@ -314,7 +314,7 @@ case $key in
|
|||||||
VM_NAME=ci-enb-usrp
|
VM_NAME=ci-enb-usrp
|
||||||
ARCHIVES_LOC=enb_usrp
|
ARCHIVES_LOC=enb_usrp
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=4
|
NB_PATTERN_FILES=7
|
||||||
BUILD_OPTIONS="--eNB -w USRP --mu"
|
BUILD_OPTIONS="--eNB -w USRP --mu"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
;;
|
;;
|
||||||
@@ -340,18 +340,18 @@ case $key in
|
|||||||
;;
|
;;
|
||||||
cppcheck)
|
cppcheck)
|
||||||
VM_NAME=ci-cppcheck
|
VM_NAME=ci-cppcheck
|
||||||
VM_MEMORY=8192
|
VM_MEMORY=4096
|
||||||
ARCHIVES_LOC=cppcheck
|
ARCHIVES_LOC=cppcheck
|
||||||
LOG_PATTERN=cppcheck.xml
|
LOG_PATTERN=cppcheck.xml
|
||||||
NB_PATTERN_FILES=1
|
NB_PATTERN_FILES=1
|
||||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 --suppressions-list=ci-scripts/cppcheck_suppressions.list -I common/utils -j4"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
;;
|
;;
|
||||||
enb-ethernet)
|
enb-ethernet)
|
||||||
VM_NAME=ci-enb-ethernet
|
VM_NAME=ci-enb-ethernet
|
||||||
ARCHIVES_LOC=enb_eth
|
ARCHIVES_LOC=enb_eth
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=6
|
NB_PATTERN_FILES=8
|
||||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
;;
|
;;
|
||||||
@@ -359,7 +359,7 @@ case $key in
|
|||||||
VM_NAME=ci-ue-ethernet
|
VM_NAME=ci-ue-ethernet
|
||||||
ARCHIVES_LOC=ue_eth
|
ARCHIVES_LOC=ue_eth
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=6
|
NB_PATTERN_FILES=8
|
||||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
;;
|
;;
|
||||||
@@ -369,7 +369,7 @@ case $key in
|
|||||||
VM_CPU=8
|
VM_CPU=8
|
||||||
ARCHIVES_LOC=l2_sim
|
ARCHIVES_LOC=l2_sim
|
||||||
LOG_PATTERN=.Rel14.txt
|
LOG_PATTERN=.Rel14.txt
|
||||||
NB_PATTERN_FILES=4
|
NB_PATTERN_FILES=6
|
||||||
BUILD_OPTIONS="--eNB -t ETHERNET"
|
BUILD_OPTIONS="--eNB -t ETHERNET"
|
||||||
RUN_OPTIONS="complex"
|
RUN_OPTIONS="complex"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
@@ -510,13 +510,16 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking uvt-kvm is installed
|
if [ $REPORT_BUILD_CMD -ne 1 ] && [ $REPORT_TEST_CMD -ne 1 ]
|
||||||
UVT_KVM_PATH=`which uvt-kvm | grep -c uvt-kvm`
|
|
||||||
if [ $UVT_KVM_PATH -eq 0 ]
|
|
||||||
then
|
then
|
||||||
echo "Error: uvt-kvm is not installed"
|
# Checking uvt-kvm is installed
|
||||||
top_usage
|
UVT_KVM_PATH=`which uvt-kvm | grep -c uvt-kvm`
|
||||||
exit 1
|
if [ $UVT_KVM_PATH -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "Error: uvt-kvm is not installed"
|
||||||
|
top_usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||||
|
|||||||
@@ -143,13 +143,21 @@ function summary_table_header {
|
|||||||
echo " <h3>$1</h3>" >> ./build_results.html
|
echo " <h3>$1</h3>" >> ./build_results.html
|
||||||
if [ -f $2/build_final_status.log ]
|
if [ -f $2/build_final_status.log ]
|
||||||
then
|
then
|
||||||
|
if [ `grep -c COMMAND $2/build_final_status.log` -eq 1 ]
|
||||||
|
then
|
||||||
|
COMMAND=`grep COMMAND $2/build_final_status.log | sed -e "s#COMMAND: ##"`
|
||||||
|
else
|
||||||
|
COMMAND="Unknown"
|
||||||
|
fi
|
||||||
if [ `grep -c BUILD_OK $2/build_final_status.log` -eq 1 ]
|
if [ `grep -c BUILD_OK $2/build_final_status.log` -eq 1 ]
|
||||||
then
|
then
|
||||||
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
||||||
|
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <span class=\"glyphicon glyphicon-arrow-right\"></span> " >> ./build_results.html
|
||||||
echo " <strong>BUILD was SUCCESSFUL <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
|
echo " <strong>BUILD was SUCCESSFUL <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
else
|
else
|
||||||
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
||||||
|
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <span class=\"glyphicon glyphicon-arrow-right\"></span> " >> ./build_results.html
|
||||||
echo " <strong>BUILD was a FAILURE! <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
echo " <strong>BUILD was a FAILURE! <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
fi
|
fi
|
||||||
@@ -218,25 +226,89 @@ function sca_summary_table_header {
|
|||||||
echo " <h3>$2</h3>" >> ./build_results.html
|
echo " <h3>$2</h3>" >> ./build_results.html
|
||||||
NB_ERRORS=`egrep -c "severity=\"error\"" $1`
|
NB_ERRORS=`egrep -c "severity=\"error\"" $1`
|
||||||
NB_WARNINGS=`egrep -c "severity=\"warning\"" $1`
|
NB_WARNINGS=`egrep -c "severity=\"warning\"" $1`
|
||||||
|
ADDED_ERRORS="0"
|
||||||
|
ADDED_WARNINGS="0"
|
||||||
|
FINAL_LOG=`echo $1 | sed -e "s#cppcheck\.xml#build_final_status.log#"`
|
||||||
|
if [ `grep -c COMMAND $FINAL_LOG` -eq 1 ]
|
||||||
|
then
|
||||||
|
COMMAND=`grep COMMAND $FINAL_LOG | sed -e "s#COMMAND: ##"`
|
||||||
|
else
|
||||||
|
COMMAND="Unknown"
|
||||||
|
fi
|
||||||
|
if [ $MR_TRIG -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ -d ../../cppcheck_archives ]
|
||||||
|
then
|
||||||
|
if [ -d ../../cppcheck_archives/$JOB_NAME ]
|
||||||
|
then
|
||||||
|
ADDED_ERRORS=`diff $1 ../../cppcheck_archives/$JOB_NAME/cppcheck.xml | egrep --color=never "^<" | egrep -c "severity=\"error"`
|
||||||
|
ADDED_WARNINGS=`diff $1 ../../cppcheck_archives/$JOB_NAME/cppcheck.xml | egrep --color=never "^<" | egrep -c "severity=\"warning"`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
local TOTAL_NUMBER=$[$ADDED_ERRORS+$ADDED_WARNINGS]
|
||||||
|
if [ -f $JENKINS_WKSP/oai_cppcheck_added_errors.txt ]; then rm -f $JENKINS_WKSP/oai_cppcheck_added_errors.txt; fi
|
||||||
|
echo "$TOTAL_NUMBER" > $JENKINS_WKSP/oai_cppcheck_added_errors.txt
|
||||||
|
fi
|
||||||
if [ $NB_ERRORS -eq 0 ] && [ $NB_WARNINGS -eq 0 ]
|
if [ $NB_ERRORS -eq 0 ] && [ $NB_WARNINGS -eq 0 ]
|
||||||
then
|
then
|
||||||
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
||||||
|
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <br><br>" >> ./build_results.html
|
||||||
echo " <strong>CPPCHECK found NO error and NO warning <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
|
echo " <strong>CPPCHECK found NO error and NO warning <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
else
|
else
|
||||||
if [ $NB_ERRORS -eq 0 ]
|
if [ $NB_ERRORS -eq 0 ]
|
||||||
then
|
then
|
||||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
||||||
echo " <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
|
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <br><br>" >> ./build_results.html
|
||||||
|
if [ $PU_TRIG -eq 1 ]
|
||||||
|
then
|
||||||
|
echo " <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
|
||||||
|
fi
|
||||||
|
if [ $MR_TRIG -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ $ADDED_WARNINGS -eq 0 ]
|
||||||
|
then
|
||||||
|
echo " <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
|
||||||
|
else
|
||||||
|
echo " <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
else
|
else
|
||||||
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
||||||
echo " <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
echo " <span class=\"glyphicon glyphicon-expand\"></span> $COMMAND <br><br>" >> ./build_results.html
|
||||||
|
if [ $PU_TRIG -eq 1 ]
|
||||||
|
then
|
||||||
|
echo " <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
||||||
|
fi
|
||||||
|
if [ $MR_TRIG -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ $ADDED_ERRORS -eq 0 ] && [ $ADDED_WARNINGS -eq 0 ]
|
||||||
|
then
|
||||||
|
echo " <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
||||||
|
else
|
||||||
|
echo " <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span>" >> ./build_results.html
|
||||||
|
echo " <br>" >> ./build_results.html
|
||||||
|
echo " <br>" >> ./build_results.html
|
||||||
|
echo " <span class=\"glyphicon glyphicon-alert\"></span> This Merge Request may have introduced up to $ADDED_ERRORS errors and $ADDED_WARNINGS warnings. <span class=\"glyphicon glyphicon-alert\"></span></strong>" >> ./build_results.html
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ $PU_TRIG -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ -d ../../cppcheck_archives ]
|
||||||
|
then
|
||||||
|
if [ -d ../../cppcheck_archives/$JOB_NAME ]
|
||||||
|
then
|
||||||
|
cp $1 ../../cppcheck_archives/$JOB_NAME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-cppcheck-details\">More details on CPPCHECK results</button>" >> ./build_results.html
|
echo " <button data-toggle=\"collapse\" data-target=\"#oai-cppcheck-details\">More details on CPPCHECK results</button>" >> ./build_results.html
|
||||||
echo " <div id=\"oai-cppcheck-details\" class=\"collapse\">" >> ./build_results.html
|
echo " <div id=\"oai-cppcheck-details\" class=\"collapse\">" >> ./build_results.html
|
||||||
|
echo " <br>" >> ./build_results.html
|
||||||
echo " <table border = \"1\">" >> ./build_results.html
|
echo " <table border = \"1\">" >> ./build_results.html
|
||||||
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
|
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
|
||||||
echo " <th>Error / Warning Type</th>" >> ./build_results.html
|
echo " <th>Error / Warning Type</th>" >> ./build_results.html
|
||||||
@@ -301,6 +373,43 @@ function sca_summary_table_footer {
|
|||||||
echo " </table>" >> ./build_results.html
|
echo " </table>" >> ./build_results.html
|
||||||
echo " <p>Full details in zipped artifact (cppcheck/cppcheck.xml) </p>" >> ./build_results.html
|
echo " <p>Full details in zipped artifact (cppcheck/cppcheck.xml) </p>" >> ./build_results.html
|
||||||
echo " <p style=\"margin-left: 30px\">Graphical Interface tool : <strong><code>cppcheck-gui -l cppcheck/cppcheck.xml</code></strong></p>" >> ./build_results.html
|
echo " <p style=\"margin-left: 30px\">Graphical Interface tool : <strong><code>cppcheck-gui -l cppcheck/cppcheck.xml</code></strong></p>" >> ./build_results.html
|
||||||
|
|
||||||
|
if [ $MR_TRIG -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ $ADDED_ERRORS -ne 0 ] || [ $ADDED_WARNINGS -ne 0 ]
|
||||||
|
then
|
||||||
|
echo " <table border = \"1\">" >> ./build_results.html
|
||||||
|
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
|
||||||
|
echo " <th>Potential File(s) impacted by added errors/warnings</th>" >> ./build_results.html
|
||||||
|
echo " <th>Line Number</th>" >> ./build_results.html
|
||||||
|
echo " <th>Severity</th>" >> ./build_results.html
|
||||||
|
echo " <th>Message</th>" >> ./build_results.html
|
||||||
|
echo " </tr>" >> ./build_results.html
|
||||||
|
SEVERITY="none"
|
||||||
|
POTENTIAL_FILES=`diff $1 ../../cppcheck_archives/$JOB_NAME/cppcheck.xml | egrep --color=never "^<" | egrep "location file|severity" | sed -e "s# #@#g"`
|
||||||
|
for POT_FILE in $POTENTIAL_FILES
|
||||||
|
do
|
||||||
|
if [ `echo $POT_FILE | grep -c location` -eq 1 ]
|
||||||
|
then
|
||||||
|
FILENAME=`echo $POT_FILE | sed -e "s#^.*file=\"##" -e "s#\"@line.*/>##"`
|
||||||
|
LINE=`echo $POT_FILE | sed -e "s#^.*line=\"##" -e "s#\"/>##"`
|
||||||
|
if [[ $SEVERITY != *"none" ]]
|
||||||
|
then
|
||||||
|
echo " <tr>" >> ./build_results.html
|
||||||
|
echo " <td>$FILENAME</td>" >> ./build_results.html
|
||||||
|
echo " <td>$LINE</td>" >> ./build_results.html
|
||||||
|
echo " <td>$SEVERITY</td>" >> ./build_results.html
|
||||||
|
echo " <td>$MESSAGE</td>" >> ./build_results.html
|
||||||
|
echo " </tr>" >> ./build_results.html
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
SEVERITY=`echo $POT_FILE | sed -e "s#^.*severity=\"##" -e "s#\"@msg=.*##"`
|
||||||
|
MESSAGE=`echo $POT_FILE | sed -e "s#^.*msg=\"##" -e "s#\"@verbose=.*##" -e "s#@# #g"`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo " </table>" >> ./build_results.html
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,6 +472,14 @@ function report_build {
|
|||||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Commit ID</td>" >> ./build_results.html
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Commit ID</td>" >> ./build_results.html
|
||||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||||
echo " </tr>" >> ./build_results.html
|
echo " </tr>" >> ./build_results.html
|
||||||
|
if [ -e .git/CI_COMMIT_MSG ]
|
||||||
|
then
|
||||||
|
echo " <tr>" >> ./build_results.html
|
||||||
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-comment\"></span> Commit Message</td>" >> ./build_results.html
|
||||||
|
MSG=`cat .git/CI_COMMIT_MSG`
|
||||||
|
echo " <td>$MSG</td>" >> ./build_results.html
|
||||||
|
echo " </tr>" >> ./build_results.html
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $MR_TRIG -eq 1 ]
|
if [ $MR_TRIG -eq 1 ]
|
||||||
then
|
then
|
||||||
@@ -374,6 +491,14 @@ function report_build {
|
|||||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Source Commit ID</td>" >> ./build_results.html
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Source Commit ID</td>" >> ./build_results.html
|
||||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||||
echo " </tr>" >> ./build_results.html
|
echo " </tr>" >> ./build_results.html
|
||||||
|
if [ -e .git/CI_COMMIT_MSG ]
|
||||||
|
then
|
||||||
|
echo " <tr>" >> ./build_results.html
|
||||||
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-comment\"></span> Source Commit Message</td>" >> ./build_results.html
|
||||||
|
MSG=`cat .git/CI_COMMIT_MSG`
|
||||||
|
echo " <td>$MSG</td>" >> ./build_results.html
|
||||||
|
echo " </tr>" >> ./build_results.html
|
||||||
|
fi
|
||||||
echo " <tr>" >> ./build_results.html
|
echo " <tr>" >> ./build_results.html
|
||||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-log-in\"></span> Target Branch</td>" >> ./build_results.html
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-log-in\"></span> Target Branch</td>" >> ./build_results.html
|
||||||
echo " <td>$TARGET_BRANCH</td>" >> ./build_results.html
|
echo " <td>$TARGET_BRANCH</td>" >> ./build_results.html
|
||||||
@@ -436,7 +561,8 @@ function report_build {
|
|||||||
summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
|
summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
|
||||||
summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
|
summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
|
||||||
summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
|
summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
|
||||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html
|
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_usrp/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_usrp_row4.html
|
||||||
|
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row5.html
|
||||||
summary_table_footer
|
summary_table_footer
|
||||||
|
|
||||||
summary_table_header "OAI Build basic simulator option" ./archives/basic_sim
|
summary_table_header "OAI Build basic simulator option" ./archives/basic_sim
|
||||||
@@ -479,6 +605,8 @@ function report_build {
|
|||||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
|
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
|
||||||
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
|
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
|
||||||
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
|
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
|
||||||
|
summary_table_row "RF Simulator - Release 14" ./archives/enb_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./enb_eth_row7.html
|
||||||
|
summary_table_row "TCP OAI Bridge - Release 14" ./archives/enb_eth/tcp_bridge_oai.Rel14.txt "Built target tcp_bridge_oai" ./enb_eth_row8.html
|
||||||
summary_table_footer
|
summary_table_footer
|
||||||
|
|
||||||
summary_table_header "OAI Build UE -- ETHERNET transport option" ./archives/ue_eth
|
summary_table_header "OAI Build UE -- ETHERNET transport option" ./archives/ue_eth
|
||||||
@@ -488,17 +616,20 @@ function report_build {
|
|||||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
|
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
|
||||||
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
|
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
|
||||||
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
|
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
|
||||||
|
summary_table_row "RF Simulator - Release 14" ./archives/ue_eth/rfsimulator.Rel14.txt "Built target rfsimulator" ./ue_eth_row7.html
|
||||||
|
summary_table_row "TCP OAI Bridge - Release 14" ./archives/ue_eth/tcp_bridge_oai.Rel14.txt "Built target tcp_bridge_oai" ./ue_eth_row8.html
|
||||||
summary_table_footer
|
summary_table_footer
|
||||||
|
|
||||||
if [ -e ./archives/red_hat ]
|
if [ -e ./archives/red_hat ]
|
||||||
then
|
then
|
||||||
echo " <h2>Red Hat (CentOS Linux release 7.4.1708) -- Summary</h2>" >> ./build_results.html
|
echo " <h2>Red Hat Enterprise Linux Server release 7.6) -- Summary</h2>" >> ./build_results.html
|
||||||
|
|
||||||
summary_table_header "Red Hat -- OAI Build eNB -- USRP option" ./archives/red_hat
|
summary_table_header "Red Hat -- OAI Build eNB -- USRP option" ./archives/red_hat
|
||||||
summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
|
summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
|
||||||
summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
|
summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
|
||||||
summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
|
summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
|
||||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html
|
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/red_hat/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_usrp_rh_row4.html
|
||||||
|
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row5.html
|
||||||
summary_table_footer
|
summary_table_footer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -506,41 +637,61 @@ function report_build {
|
|||||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-compilation-details\">Details for Compilation Errors and Warnings </button>" >> ./build_results.html
|
echo " <button data-toggle=\"collapse\" data-target=\"#oai-compilation-details\">Details for Compilation Errors and Warnings </button>" >> ./build_results.html
|
||||||
echo " <div id=\"oai-compilation-details\" class=\"collapse\">" >> ./build_results.html
|
echo " <div id=\"oai-compilation-details\" class=\"collapse\">" >> ./build_results.html
|
||||||
|
|
||||||
for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
|
if [ -f ./enb_usrp_row1.html ] || [ -f ./enb_usrp_row2.html ] || [ -f ./enb_usrp_row3.html ] || [ -f ./enb_usrp_row4.html ]
|
||||||
do
|
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
|
||||||
done
|
|
||||||
for DETAILS_TABLE in `ls ./basic_sim_row*.html`
|
|
||||||
do
|
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
|
||||||
done
|
|
||||||
for DETAILS_TABLE in `ls ./phy_sim_row*.html`
|
|
||||||
do
|
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
|
||||||
done
|
|
||||||
|
|
||||||
for DETAILS_TABLE in `ls ./gnb_usrp_row*.html`
|
|
||||||
do
|
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
|
||||||
done
|
|
||||||
for DETAILS_TABLE in `ls ./nrue_usrp_row*.html`
|
|
||||||
do
|
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
|
||||||
done
|
|
||||||
for DETAILS_TABLE in `ls ./enb_eth_row*.html`
|
|
||||||
do
|
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
|
||||||
done
|
|
||||||
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
|
|
||||||
do
|
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
|
||||||
done
|
|
||||||
if [ -e ./archives/red_hat ]
|
|
||||||
then
|
then
|
||||||
for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html`
|
for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
|
||||||
do
|
do
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
if [ -f ./basic_sim_row1.html ] || [ -f ./basic_sim_row2.html ] || [ -f ./basic_sim_row3.html ]
|
||||||
|
then
|
||||||
|
for DETAILS_TABLE in `ls ./basic_sim_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -f ./phy_sim_row1.html ] || [ -f ./phy_sim_row2.html ] || [ -f ./phy_sim_row3.html ]
|
||||||
|
then
|
||||||
|
for DETAILS_TABLE in `ls ./phy_sim_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -f ./gnb_usrp_row1.html ] || [ -f ./gnb_usrp_row2.html ] || [ -f ./gnb_usrp_row3.html ] || [ -f ./gnb_usrp_row4.html ]
|
||||||
|
then
|
||||||
|
for DETAILS_TABLE in `ls ./gnb_usrp_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -f ./nrue_usrp_row1.html ] || [ -f ./nrue_usrp_row2.html ] || [ -f ./nrue_usrp_row3.html ] || [ -f ./nrue_usrp_row4.html ]
|
||||||
|
then
|
||||||
|
for DETAILS_TABLE in `ls ./nrue_usrp_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -f ./enb_eth_row1.html ] || [ -f ./enb_eth_row2.html ] || [ -f ./enb_eth_row3.html ] || [ -f ./enb_eth_row4.html ] || [ -f ./enb_eth_row5.html ] || [ -f ./enb_eth_row6.html ]
|
||||||
|
then
|
||||||
|
for DETAILS_TABLE in `ls ./enb_eth_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -f ./ue_eth_row1.html ] || [ -f ./ue_eth_row2.html ] || [ -f ./ue_eth_row3.html ] || [ -f ./ue_eth_row4.html ] || [ -f ./ue_eth_row5.html ] || [ -f ./ue_eth_row6.html ]
|
||||||
|
then
|
||||||
|
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -f ./enb_usrp_rh_row1.html ] || [ -f ./enb_usrp_rh_row2.html ] || [ -f ./enb_usrp_rh_row3.html ] || [ -f ./enb_usrp_rh_row4.html ]
|
||||||
|
then
|
||||||
|
for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
rm -f ./*_row*.html
|
rm -f ./*_row*.html
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,14 @@ function report_test {
|
|||||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Commit ID</td>" >> ./test_simulator_results.html
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Commit ID</td>" >> ./test_simulator_results.html
|
||||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||||
echo " </tr>" >> ./test_simulator_results.html
|
echo " </tr>" >> ./test_simulator_results.html
|
||||||
|
if [ -e .git/CI_COMMIT_MSG ]
|
||||||
|
then
|
||||||
|
echo " <tr>" >> ./test_simulator_results.html
|
||||||
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-comment\"></span> Commit Message</td>" >> ./test_simulator_results.html
|
||||||
|
MSG=`cat .git/CI_COMMIT_MSG`
|
||||||
|
echo " <td>$MSG</td>" >> ./test_simulator_results.html
|
||||||
|
echo " </tr>" >> ./test_simulator_results.html
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $MR_TRIG -eq 1 ]
|
if [ $MR_TRIG -eq 1 ]
|
||||||
then
|
then
|
||||||
@@ -150,6 +158,14 @@ function report_test {
|
|||||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Source Commit ID</td>" >> ./test_simulator_results.html
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Source Commit ID</td>" >> ./test_simulator_results.html
|
||||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||||
echo " </tr>" >> ./test_simulator_results.html
|
echo " </tr>" >> ./test_simulator_results.html
|
||||||
|
if [ -e .git/CI_COMMIT_MSG ]
|
||||||
|
then
|
||||||
|
echo " <tr>" >> ./test_simulator_results.html
|
||||||
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-comment\"></span> Commit Message</td>" >> ./test_simulator_results.html
|
||||||
|
MSG=`cat .git/CI_COMMIT_MSG`
|
||||||
|
echo " <td>$MSG</td>" >> ./test_simulator_results.html
|
||||||
|
echo " </tr>" >> ./test_simulator_results.html
|
||||||
|
fi
|
||||||
echo " <tr>" >> ./test_simulator_results.html
|
echo " <tr>" >> ./test_simulator_results.html
|
||||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-log-in\"></span> Target Branch</td>" >> ./test_simulator_results.html
|
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-log-in\"></span> Target Branch</td>" >> ./test_simulator_results.html
|
||||||
echo " <td>$TARGET_BRANCH</td>" >> ./test_simulator_results.html
|
echo " <td>$TARGET_BRANCH</td>" >> ./test_simulator_results.html
|
||||||
@@ -361,7 +377,7 @@ function report_test {
|
|||||||
fi
|
fi
|
||||||
PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
|
PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
|
||||||
PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'`
|
PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'`
|
||||||
if [[ $PERF_INT -lt 90 ]]
|
if [[ $PERF_INT -lt 70 ]]
|
||||||
then
|
then
|
||||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||||
else
|
else
|
||||||
|
|||||||
+136
-93
@@ -112,7 +112,7 @@ function start_basic_sim_ue {
|
|||||||
rm $1
|
rm $1
|
||||||
|
|
||||||
local i="0"
|
local i="0"
|
||||||
echo "ifconfig oip1 | egrep -c \"inet addr\"" > $1
|
echo "ifconfig oaitun_ue1 | egrep -c \"inet addr\"" > $1
|
||||||
while [ $i -lt 10 ]
|
while [ $i -lt 10 ]
|
||||||
do
|
do
|
||||||
sleep 5
|
sleep 5
|
||||||
@@ -134,7 +134,7 @@ function start_basic_sim_ue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_ue_ip_addr {
|
function get_ue_ip_addr {
|
||||||
echo "ifconfig oip1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $1
|
echo "ifconfig oaitun_ue1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $1
|
||||||
UE_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1`
|
UE_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1`
|
||||||
echo "UE IP Address for EPC is : $UE_IP_ADDR"
|
echo "UE IP Address for EPC is : $UE_IP_ADDR"
|
||||||
rm $1
|
rm $1
|
||||||
@@ -149,9 +149,9 @@ function ping_ue_ip_addr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ping_epc_ip_addr {
|
function ping_epc_ip_addr {
|
||||||
echo "echo \"COMMAND IS: ping -I oip1 -c 20 $3\" > $4" > $1
|
echo "echo \"COMMAND IS: ping -I oaitun_ue1 -c 20 $3\" > $4" > $1
|
||||||
echo "rm -f $4" >> $1
|
echo "rm -f $4" >> $1
|
||||||
echo "ping -I oip1 -c 20 $3 | tee -a $4" >> $1
|
echo "ping -I oaitun_ue1 -c 20 $3 | tee -a $4" >> $1
|
||||||
cat $1
|
cat $1
|
||||||
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
|
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
|
||||||
rm -f $1
|
rm -f $1
|
||||||
@@ -227,6 +227,10 @@ function check_iperf {
|
|||||||
local LOC_BASE_LOG=$1
|
local LOC_BASE_LOG=$1
|
||||||
local LOC_REQ_BW=$2
|
local LOC_REQ_BW=$2
|
||||||
local LOC_REQ_BW_MINUS_ONE=`echo "$LOC_REQ_BW - 1" | bc -l`
|
local LOC_REQ_BW_MINUS_ONE=`echo "$LOC_REQ_BW - 1" | bc -l`
|
||||||
|
local LOC_REQ_BW_MINUS_TWO=`echo "$LOC_REQ_BW - 2" | bc -l`
|
||||||
|
local LOC_REQ_BW_MINUS_THREE=`echo "$LOC_REQ_BW - 3" | bc -l`
|
||||||
|
local LOC_IS_DL=`echo $LOC_BASE_LOG | grep -c _dl`
|
||||||
|
local LOC_IS_BASIC_SIM=`echo $LOC_BASE_LOG | grep -c basic_sim`
|
||||||
if [ -f ${LOC_BASE_LOG}_client.txt ]
|
if [ -f ${LOC_BASE_LOG}_client.txt ]
|
||||||
then
|
then
|
||||||
local FILE_COMPLETE=`egrep -c "Server Report" ${LOC_BASE_LOG}_client.txt`
|
local FILE_COMPLETE=`egrep -c "Server Report" ${LOC_BASE_LOG}_client.txt`
|
||||||
@@ -235,11 +239,26 @@ function check_iperf {
|
|||||||
IPERF_STATUS=-1
|
IPERF_STATUS=-1
|
||||||
else
|
else
|
||||||
local EFFECTIVE_BANDWIDTH=`tail -n3 ${LOC_BASE_LOG}_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
|
local EFFECTIVE_BANDWIDTH=`tail -n3 ${LOC_BASE_LOG}_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
|
||||||
if [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW}.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW_MINUS_ONE}.*Mbits.* ]]
|
if [ $LOC_IS_DL -eq 1 ] && [ $LOC_IS_BASIC_SIM -eq 1 ]
|
||||||
then
|
then
|
||||||
echo "got requested DL bandwidth: $EFFECTIVE_BANDWIDTH"
|
if [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW}.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW_MINUS_ONE}.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW_MINUS_TWO}.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW_MINUS_THREE}.*Mbits.* ]]
|
||||||
|
then
|
||||||
|
echo "got requested DL bandwidth: $EFFECTIVE_BANDWIDTH"
|
||||||
|
else
|
||||||
|
IPERF_STATUS=-1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
IPERF_STATUS=-1
|
if [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW}.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW_MINUS_ONE}.*Mbits.* ]]
|
||||||
|
then
|
||||||
|
if [ $LOC_IS_DL -eq 1 ]
|
||||||
|
then
|
||||||
|
echo "got requested DL bandwidth: $EFFECTIVE_BANDWIDTH"
|
||||||
|
else
|
||||||
|
echo "got requested UL bandwidth: $EFFECTIVE_BANDWIDTH"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
IPERF_STATUS=-1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -299,7 +318,7 @@ function install_epc_on_vm {
|
|||||||
if [ -d /opt/ltebox-archives/ ]
|
if [ -d /opt/ltebox-archives/ ]
|
||||||
then
|
then
|
||||||
# Checking if all ltebox archives are available to run ltebx epc on a brand new VM
|
# Checking if all ltebox archives are available to run ltebx epc on a brand new VM
|
||||||
if [ -f /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ] && [ -f /opt/ltebox-archives/etc-conf.zip ] && [ -f /opt/ltebox-archives/hss-sim.zip ]
|
if [ -f /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ] && [ -f /opt/ltebox-archives/etc-conf.zip ] && [ -f /opt/ltebox-archives/hss-sim-develop.zip ]
|
||||||
then
|
then
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Test EPC on VM ($EPC_VM_NAME) will be using ltebox"
|
echo "Test EPC on VM ($EPC_VM_NAME) will be using ltebox"
|
||||||
@@ -317,11 +336,18 @@ function install_epc_on_vm {
|
|||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Creating test EPC VM ($LOC_EPC_VM_NAME) on Ubuntu Cloud Image base"
|
echo "Creating test EPC VM ($LOC_EPC_VM_NAME) on Ubuntu Cloud Image base"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
|
acquire_vm_create_lock
|
||||||
uvt-kvm create $LOC_EPC_VM_NAME release=xenial --unsafe-caching
|
uvt-kvm create $LOC_EPC_VM_NAME release=xenial --unsafe-caching
|
||||||
|
echo "Waiting for VM to be started"
|
||||||
|
uvt-kvm wait $LOC_EPC_VM_NAME --insecure
|
||||||
|
release_vm_create_lock
|
||||||
|
else
|
||||||
|
echo "Waiting for VM to be started"
|
||||||
|
uvt-kvm wait $LOC_EPC_VM_NAME --insecure
|
||||||
fi
|
fi
|
||||||
|
|
||||||
uvt-kvm wait $LOC_EPC_VM_NAME --insecure
|
|
||||||
local LOC_EPC_VM_IP_ADDR=`uvt-kvm ip $LOC_EPC_VM_NAME`
|
local LOC_EPC_VM_IP_ADDR=`uvt-kvm ip $LOC_EPC_VM_NAME`
|
||||||
|
|
||||||
echo "$LOC_EPC_VM_NAME has for IP addr = $LOC_EPC_VM_IP_ADDR"
|
echo "$LOC_EPC_VM_NAME has for IP addr = $LOC_EPC_VM_IP_ADDR"
|
||||||
scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
||||||
|
|
||||||
@@ -342,7 +368,7 @@ function install_epc_on_vm {
|
|||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
scp -o StrictHostKeyChecking=no /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
scp -o StrictHostKeyChecking=no /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
||||||
scp -o StrictHostKeyChecking=no /opt/ltebox-archives/etc-conf.zip ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
scp -o StrictHostKeyChecking=no /opt/ltebox-archives/etc-conf.zip ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
||||||
scp -o StrictHostKeyChecking=no /opt/ltebox-archives/hss-sim.zip ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
scp -o StrictHostKeyChecking=no /opt/ltebox-archives/hss-sim-develop.zip ubuntu@$LOC_EPC_VM_IP_ADDR:/home/ubuntu
|
||||||
|
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Install EPC on EPC VM ($LOC_EPC_VM_NAME)"
|
echo "Install EPC on EPC VM ($LOC_EPC_VM_NAME)"
|
||||||
@@ -356,8 +382,8 @@ function install_epc_on_vm {
|
|||||||
# Installing HSS
|
# Installing HSS
|
||||||
echo "echo \"cd /opt\"" >> $LOC_EPC_VM_CMDS
|
echo "echo \"cd /opt\"" >> $LOC_EPC_VM_CMDS
|
||||||
echo "cd /opt" >> $LOC_EPC_VM_CMDS
|
echo "cd /opt" >> $LOC_EPC_VM_CMDS
|
||||||
echo "echo \"sudo unzip -qq /home/ubuntu/hss-sim.zip\"" >> $LOC_EPC_VM_CMDS
|
echo "echo \"sudo unzip -qq /home/ubuntu/hss-sim-develop.zip\"" >> $LOC_EPC_VM_CMDS
|
||||||
echo "sudo unzip -qq /home/ubuntu/hss-sim.zip" >> $LOC_EPC_VM_CMDS
|
echo "sudo unzip -qq /home/ubuntu/hss-sim-develop.zip" >> $LOC_EPC_VM_CMDS
|
||||||
echo "echo \"cd /opt/hss_sim0609\"" >> $LOC_EPC_VM_CMDS
|
echo "echo \"cd /opt/hss_sim0609\"" >> $LOC_EPC_VM_CMDS
|
||||||
echo "cd /opt/hss_sim0609" >> $LOC_EPC_VM_CMDS
|
echo "cd /opt/hss_sim0609" >> $LOC_EPC_VM_CMDS
|
||||||
|
|
||||||
@@ -493,16 +519,6 @@ function build_ue_on_separate_folder {
|
|||||||
echo "cd tmp-ue" >> $1
|
echo "cd tmp-ue" >> $1
|
||||||
echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $1
|
echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $1
|
||||||
echo "unzip -qq -DD ../localZip.zip" >> $1
|
echo "unzip -qq -DD ../localZip.zip" >> $1
|
||||||
|
|
||||||
# We may have some adaptation to do
|
|
||||||
if [ -f /opt/ltebox-archives/adapt_ue_l2_sim.txt ]
|
|
||||||
then
|
|
||||||
echo "############################################################"
|
|
||||||
echo "Doing some adaptation on UE side"
|
|
||||||
echo "############################################################"
|
|
||||||
cat /opt/ltebox-archives/adapt_ue_l2_sim.txt >> $1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "echo \"source oaienv\"" >> $1
|
echo "echo \"source oaienv\"" >> $1
|
||||||
echo "source oaienv" >> $1
|
echo "source oaienv" >> $1
|
||||||
echo "cd cmake_targets/" >> $1
|
echo "cd cmake_targets/" >> $1
|
||||||
@@ -569,6 +585,7 @@ function start_l2_sim_enb {
|
|||||||
ENB_SYNC=1
|
ENB_SYNC=1
|
||||||
echo "L2-SIM eNB is sync'ed: waiting for UE(s) to connect"
|
echo "L2-SIM eNB is sync'ed: waiting for UE(s) to connect"
|
||||||
fi
|
fi
|
||||||
|
sleep 10
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_l2_sim_ue {
|
function start_l2_sim_ue {
|
||||||
@@ -604,10 +621,34 @@ function start_l2_sim_ue {
|
|||||||
if [ $i -lt 50 ]
|
if [ $i -lt 50 ]
|
||||||
then
|
then
|
||||||
UE_SYNC=0
|
UE_SYNC=0
|
||||||
echo "L2-SIM UE is NOT sync'ed w/eNB"
|
echo "L2-SIM UE is NOT sync'ed w/ eNB"
|
||||||
|
return
|
||||||
else
|
else
|
||||||
UE_SYNC=1
|
UE_SYNC=1
|
||||||
echo "L2-SIM UE is sync'ed w/eNB"
|
echo "L2-SIM UE is sync'ed w/ eNB"
|
||||||
|
fi
|
||||||
|
# Checking oaitun_ue1 interface has now an IP address
|
||||||
|
i="0"
|
||||||
|
echo "ifconfig oaitun_ue1 | egrep -c \"inet addr\"" > $1
|
||||||
|
while [ $i -lt 10 ]
|
||||||
|
do
|
||||||
|
sleep 5
|
||||||
|
CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1`
|
||||||
|
if [ $CONNECTED -eq 1 ]
|
||||||
|
then
|
||||||
|
i="100"
|
||||||
|
else
|
||||||
|
i=$[$i+1]
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm $1
|
||||||
|
if [ $i -lt 50 ]
|
||||||
|
then
|
||||||
|
UE_SYNC=0
|
||||||
|
echo "L2-SIM UE oaitun_ue1 is NOT sync'ed w/ EPC"
|
||||||
|
else
|
||||||
|
UE_SYNC=1
|
||||||
|
echo "L2-SIM UE oaitun_ue1 is sync'ed w/ EPC"
|
||||||
fi
|
fi
|
||||||
sleep 10
|
sleep 10
|
||||||
}
|
}
|
||||||
@@ -632,7 +673,7 @@ function run_test_on_vm {
|
|||||||
if [ "$RUN_OPTIONS" == "none" ]
|
if [ "$RUN_OPTIONS" == "none" ]
|
||||||
then
|
then
|
||||||
echo "No run on VM testing for this variant currently"
|
echo "No run on VM testing for this variant currently"
|
||||||
exit $STATUS
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]]
|
if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]]
|
||||||
@@ -762,15 +803,6 @@ function run_test_on_vm {
|
|||||||
# Retrieve EPC real IP address
|
# Retrieve EPC real IP address
|
||||||
retrieve_real_epc_ip_addr $EPC_VM_NAME $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
retrieve_real_epc_ip_addr $EPC_VM_NAME $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
|
|
||||||
# We may have some adaptation to do
|
|
||||||
if [ -f /opt/ltebox-archives/adapt_ue_sim.txt ]
|
|
||||||
then
|
|
||||||
echo "############################################################"
|
|
||||||
echo "Doing some adaptation on UE side"
|
|
||||||
echo "############################################################"
|
|
||||||
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < /opt/ltebox-archives/adapt_ue_sim.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Starting the eNB in FDD-5MHz mode"
|
echo "Starting the eNB in FDD-5MHz mode"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
@@ -791,7 +823,8 @@ function run_test_on_vm {
|
|||||||
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
||||||
|
|
||||||
@@ -807,10 +840,10 @@ function run_test_on_vm {
|
|||||||
echo "Iperf DL"
|
echo "Iperf DL"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_dl
|
CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_dl
|
||||||
iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
|
iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 10 $CURR_IPERF_LOG_BASE
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
|
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 10
|
||||||
|
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Iperf UL"
|
echo "Iperf UL"
|
||||||
@@ -850,7 +883,8 @@ function run_test_on_vm {
|
|||||||
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
||||||
|
|
||||||
@@ -866,10 +900,10 @@ function run_test_on_vm {
|
|||||||
echo "Iperf DL"
|
echo "Iperf DL"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl
|
CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl
|
||||||
iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
|
iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 10 $CURR_IPERF_LOG_BASE
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
|
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 10
|
||||||
|
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Iperf UL"
|
echo "Iperf UL"
|
||||||
@@ -909,7 +943,8 @@ function run_test_on_vm {
|
|||||||
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
||||||
|
|
||||||
@@ -925,10 +960,10 @@ function run_test_on_vm {
|
|||||||
echo "Iperf DL"
|
echo "Iperf DL"
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl
|
CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl
|
||||||
iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
|
iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 12 $CURR_IPERF_LOG_BASE
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
|
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 12
|
||||||
|
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
echo "Terminate enb/ue simulators"
|
echo "Terminate enb/ue simulators"
|
||||||
@@ -961,7 +996,8 @@ function run_test_on_vm {
|
|||||||
echo "ERROR: compiling flexran controller on vm went wrong"
|
echo "ERROR: compiling flexran controller on vm went wrong"
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
FLEXRAN_CTL_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#flexran-rtc#"`
|
FLEXRAN_CTL_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#flexran-rtc#"`
|
||||||
FLEXRAN_CTL_VM_CMDS=`echo $VM_CMDS | sed -e "s#cmds#flexran-rtc-cmds#"`
|
FLEXRAN_CTL_VM_CMDS=`echo $VM_CMDS | sed -e "s#cmds#flexran-rtc-cmds#"`
|
||||||
@@ -971,7 +1007,8 @@ function run_test_on_vm {
|
|||||||
echo "ERROR: Flexran Ctl VM is not alive"
|
echo "ERROR: Flexran Ctl VM is not alive"
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
uvt-kvm wait $FLEXRAN_CTL_VM_NAME --insecure
|
uvt-kvm wait $FLEXRAN_CTL_VM_NAME --insecure
|
||||||
FLEXRAN_CTL_VM_IP_ADDR=`uvt-kvm ip $FLEXRAN_CTL_VM_NAME`
|
FLEXRAN_CTL_VM_IP_ADDR=`uvt-kvm ip $FLEXRAN_CTL_VM_NAME`
|
||||||
@@ -1006,7 +1043,8 @@ function run_test_on_vm {
|
|||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
stop_flexran_ctrl $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR
|
stop_flexran_ctrl $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
query_flexran_ctrl_status $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR 03_enb_ue_connected
|
query_flexran_ctrl_status $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR 03_enb_ue_connected
|
||||||
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
||||||
@@ -1048,7 +1086,8 @@ function run_test_on_vm {
|
|||||||
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
||||||
|
|
||||||
@@ -1085,50 +1124,52 @@ function run_test_on_vm {
|
|||||||
CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log
|
CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log
|
||||||
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf none
|
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf none
|
||||||
|
|
||||||
echo "############################################################"
|
# Disabling TDD-10MHz in order to stop getting false negatives
|
||||||
echo "Starting the UE in TDD-10MHz mode"
|
# echo "############################################################"
|
||||||
echo "############################################################"
|
# echo "Starting the UE in TDD-10MHz mode"
|
||||||
CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log
|
# echo "############################################################"
|
||||||
start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350
|
# CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log
|
||||||
if [ $UE_SYNC -eq 0 ]
|
# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350
|
||||||
then
|
# if [ $UE_SYNC -eq 0 ]
|
||||||
echo "Problem w/ eNB and UE not syncing"
|
# then
|
||||||
terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
|
# echo "Problem w/ eNB and UE not syncing"
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
# terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
exit -1
|
# echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
fi
|
# STATUS=-1
|
||||||
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
# return
|
||||||
|
# fi
|
||||||
echo "############################################################"
|
# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
||||||
echo "Pinging the UE"
|
#
|
||||||
echo "############################################################"
|
# echo "############################################################"
|
||||||
PING_LOG_FILE=tdd_10MHz_ping_ue.txt
|
# echo "Pinging the UE"
|
||||||
ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
|
# echo "############################################################"
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
|
# PING_LOG_FILE=tdd_10MHz_ping_ue.txt
|
||||||
check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
|
# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
|
||||||
|
# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
|
||||||
echo "############################################################"
|
# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
|
||||||
echo "Iperf DL"
|
#
|
||||||
echo "############################################################"
|
# echo "############################################################"
|
||||||
CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl
|
# echo "Iperf DL"
|
||||||
iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
|
# echo "############################################################"
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
# CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
|
||||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
|
# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||||
|
# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||||
echo "############################################################"
|
# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
|
||||||
echo "Terminate enb/ue simulators"
|
#
|
||||||
echo "############################################################"
|
# echo "############################################################"
|
||||||
terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
|
# echo "Terminate enb/ue simulators"
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
# echo "############################################################"
|
||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
|
||||||
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
sleep 10
|
# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
||||||
|
# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
|
# sleep 10
|
||||||
|
#
|
||||||
# Disabling TDD-20MHz in order to stop getting false negatives
|
# Disabling TDD-20MHz in order to stop getting false negatives
|
||||||
# echo "############################################################"
|
# echo "############################################################"
|
||||||
# echo "Starting the eNB in TDD-20MHz mode"
|
# echo "Starting the eNB in TDD-20MHz mode"
|
||||||
@@ -1150,7 +1191,8 @@ function run_test_on_vm {
|
|||||||
# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||||
# terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
# terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
# echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
# echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
# exit -1
|
# STATUS=-1
|
||||||
|
# return
|
||||||
# fi
|
# fi
|
||||||
# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
|
||||||
#
|
#
|
||||||
@@ -1262,7 +1304,8 @@ function run_test_on_vm {
|
|||||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
||||||
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
|
||||||
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||||
exit -1
|
STATUS=-1
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "############################################################"
|
echo "############################################################"
|
||||||
|
|||||||
@@ -185,10 +185,16 @@ function check_on_vm_build {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||||
|
then
|
||||||
|
echo "COMMAND: cppcheck $BUILD_OPTIONS . 2> cppcheck.xml" > $ARCHIVES_LOC/build_final_status.log
|
||||||
|
else
|
||||||
|
echo "COMMAND: build_oai -I $BUILD_OPTIONS" > $ARCHIVES_LOC/build_final_status.log
|
||||||
|
fi
|
||||||
if [[ $STATUS -eq 0 ]]
|
if [[ $STATUS -eq 0 ]]
|
||||||
then
|
then
|
||||||
echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log
|
echo "BUILD_OK" >> $ARCHIVES_LOC/build_final_status.log
|
||||||
else
|
else
|
||||||
echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log
|
echo "BUILD_KO" >> $ARCHIVES_LOC/build_final_status.log
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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>build-tab</htmlTabRef>
|
||||||
|
<htmlTabName>Build</htmlTabName>
|
||||||
|
<htmlTabIcon>wrench</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
010101
|
||||||
|
050101 060101 070101
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList>
|
||||||
|
</TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="010101">
|
||||||
|
<class>Build_eNB</class>
|
||||||
|
<desc>Build eNB (USRP)</desc>
|
||||||
|
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="050101">
|
||||||
|
<class>Initialize_HSS</class>
|
||||||
|
<desc>Initialize HSS</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="060101">
|
||||||
|
<class>Initialize_MME</class>
|
||||||
|
<desc>Initialize MME</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070101">
|
||||||
|
<class>Initialize_SPGW</class>
|
||||||
|
<desc>Initialize SPGW</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>epc-closure</htmlTabRef>
|
||||||
|
<htmlTabName>EPC-Closure</htmlTabName>
|
||||||
|
<htmlTabIcon>log-out</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
050201 060201 070201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="050201">
|
||||||
|
<class>Terminate_HSS</class>
|
||||||
|
<desc>Terminate HSS</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="060201">
|
||||||
|
<class>Terminate_MME</class>
|
||||||
|
<desc>Terminate MME</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070201">
|
||||||
|
<class>Terminate_SPGW</class>
|
||||||
|
<desc>Terminate SPGW</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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-10-tm1</htmlTabRef>
|
||||||
|
<htmlTabName>Test-10MHz-TM1</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
040102
|
||||||
|
030121 000001 040302 000001 040502 000001 040402 040202 000001 030201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList>
|
||||||
|
</TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Waiting for a moment...</desc>
|
||||||
|
<idle_sleep_time_in_sec>15</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030121">
|
||||||
|
<class>Initialize_eNB</class>
|
||||||
|
<desc>Initialize eNB (FDD/Band13/10MHz)</desc>
|
||||||
|
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band13.tm1.50PRB.emtc.conf</Initialize_eNB_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate eNB</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040102">
|
||||||
|
<class>Initialize_CatM_module</class>
|
||||||
|
<desc>Initialize CAT-M Module</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040202">
|
||||||
|
<class>Terminate_CatM_module</class>
|
||||||
|
<desc>Terminate CAT-M Module</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040302">
|
||||||
|
<class>Attach_CatM_module</class>
|
||||||
|
<desc>Attach CAT-M Module</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040402">
|
||||||
|
<class>Detach_CatM_module</class>
|
||||||
|
<desc>Detach CAT-M Module</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040502">
|
||||||
|
<class>Ping_CatM_module</class>
|
||||||
|
<desc>ping (10MHz - 20 sec)</desc>
|
||||||
|
<ping_args>-c 20</ping_args>
|
||||||
|
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<testCase id="030104">
|
<testCase id="030104">
|
||||||
<class>Initialize_eNB</class>
|
<class>Initialize_eNB</class>
|
||||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --RUs.[0].max_rxgain 125</Initialize_eNB_args>
|
||||||
<eNB_instance>0</eNB_instance>
|
<eNB_instance>0</eNB_instance>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<testCase id="030114">
|
<testCase id="030114">
|
||||||
<class>Initialize_eNB</class>
|
<class>Initialize_eNB</class>
|
||||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --RUs.[0].max_rxgain 120</Initialize_eNB_args>
|
||||||
<eNB_instance>0</eNB_instance>
|
<eNB_instance>0</eNB_instance>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<testCase id="030101">
|
<testCase id="030101">
|
||||||
<class>Initialize_eNB</class>
|
<class>Initialize_eNB</class>
|
||||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --RUs.[0].max_rxgain 125</Initialize_eNB_args>
|
||||||
<eNB_instance>1</eNB_instance>
|
<eNB_instance>1</eNB_instance>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<testCase id="030111">
|
<testCase id="030111">
|
||||||
<class>Initialize_eNB</class>
|
<class>Initialize_eNB</class>
|
||||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --RUs.[0].max_rxgain 120</Initialize_eNB_args>
|
||||||
<eNB_instance>1</eNB_instance>
|
<eNB_instance>1</eNB_instance>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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>build-tab</htmlTabRef>
|
||||||
|
<htmlTabName>Build</htmlTabName>
|
||||||
|
<htmlTabIcon>wrench</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
090101
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="090101">
|
||||||
|
<class>Build_OAI_UE</class>
|
||||||
|
<desc>Build OAI UE</desc>
|
||||||
|
<Build_OAI_UE_args>-w USRP --UE</Build_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>test-10mhz-orange</htmlTabRef>
|
||||||
|
<htmlTabName>Test-10Mhz-Orange</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
090102 000001 090109
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="090102">
|
||||||
|
<class>Initialize_OAI_UE</class>
|
||||||
|
<desc>Initialize OAI UE -- sniffing Orange frequency</desc>
|
||||||
|
<Initialize_OAI_UE_args>-C 816000000 -r 50 --ue-rxgain 130 --ue-scan-carrier --no-L2-connect</Initialize_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_OAI_UE</class>
|
||||||
|
<desc>Terminate OAI UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>test-10mHz-sfr</htmlTabRef>
|
||||||
|
<htmlTabName>Test-10MHz-SFR</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
090104 000001 090109
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="090104">
|
||||||
|
<class>Initialize_OAI_UE</class>
|
||||||
|
<desc>Initialize OAI UE -- sniffing SFR frequency</desc>
|
||||||
|
<Initialize_OAI_UE_args>-C 806000000 -r 50 --ue-rxgain 130 --ue-scan-carrier --no-L2-connect</Initialize_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_OAI_UE</class>
|
||||||
|
<desc>Terminate OAI UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
+187
-35
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
# Author: laurent THOMAS, Lionel GAUTHIER
|
# Author: laurent THOMAS, Lionel GAUTHIER
|
||||||
|
|
||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 3.0)
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
# Base directories, compatible with legacy OAI building
|
# Base directories, compatible with legacy OAI building
|
||||||
@@ -169,13 +169,13 @@ endif()
|
|||||||
set(CMAKE_C_FLAGS
|
set(CMAKE_C_FLAGS
|
||||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ")
|
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ")
|
||||||
# add autotools definitions that were maybe used!
|
# add autotools definitions that were maybe used!
|
||||||
|
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
|
||||||
set(CMAKE_C_FLAGS
|
set(CMAKE_C_FLAGS
|
||||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
|
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER}"
|
||||||
)
|
)
|
||||||
set(CMAKE_CXX_FLAGS
|
set(CMAKE_CXX_FLAGS
|
||||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
|
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -D${MKVER}"
|
||||||
)
|
)
|
||||||
add_definitions("-DASN_DISABLE_OER_SUPPORT")
|
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
@@ -227,7 +227,6 @@ add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_CO
|
|||||||
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
|
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Debug related options
|
# Debug related options
|
||||||
#########################################
|
#########################################
|
||||||
add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug")
|
add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug")
|
||||||
@@ -250,7 +249,7 @@ add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
|
|||||||
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
|
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
|
||||||
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
|
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
|
||||||
add_boolean_option(USRP_REC_PLAY False "Enable USRP record playback mode")
|
add_boolean_option(USRP_REC_PLAY False "Enable USRP record playback mode")
|
||||||
add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko")
|
#add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko")
|
||||||
add_boolean_option(BASIC_SIMULATOR False "Has to be True when building the basic simulator, False otherwise")
|
add_boolean_option(BASIC_SIMULATOR False "Has to be True when building the basic simulator, False otherwise")
|
||||||
|
|
||||||
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
|
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
|
||||||
@@ -469,15 +468,62 @@ add_library(X2AP_ENB
|
|||||||
${X2AP_DIR}/x2ap_eNB_itti_messaging.c
|
${X2AP_DIR}/x2ap_eNB_itti_messaging.c
|
||||||
${X2AP_DIR}/x2ap_eNB_management_procedures.c
|
${X2AP_DIR}/x2ap_eNB_management_procedures.c
|
||||||
${X2AP_DIR}/x2ap_eNB_generate_messages.c
|
${X2AP_DIR}/x2ap_eNB_generate_messages.c
|
||||||
|
${X2AP_DIR}/x2ap_ids.c
|
||||||
|
${X2AP_DIR}/x2ap_timers.c
|
||||||
)
|
)
|
||||||
add_dependencies(X2AP_ENB rrc_flag x2_flag)
|
add_dependencies(X2AP_ENB rrc_flag x2_flag)
|
||||||
|
|
||||||
|
# F1AP
|
||||||
|
##############
|
||||||
|
add_list1_option(F1AP_RELEASE R15 "F1AP ASN.1 grammar version" R15)
|
||||||
|
set(F1AP_DIR ${OPENAIR2_DIR}/F1AP)
|
||||||
|
if (${F1AP_RELEASE} STREQUAL "R15")
|
||||||
|
make_version(F1AP_VERSION 15 2 1)
|
||||||
|
set (ASN1RELDIR R15.2.1)
|
||||||
|
endif(${F1AP_RELEASE} STREQUAL "R15")
|
||||||
|
add_definitions(-DF1AP_VERSION=${F1AP_VERSION})
|
||||||
|
set(F1AP_ASN_DIR ${F1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
|
||||||
|
set(F1AP_ASN_FILES
|
||||||
|
${F1AP_ASN_DIR}/F1AP-CommonDataTypes.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-Constants.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-PDU-Descriptions.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-PDU-Contents.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-IEs.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-Containers.asn
|
||||||
|
)
|
||||||
|
|
||||||
|
set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR})
|
||||||
|
message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}")
|
||||||
|
execute_process(COMMAND mkdir -p ${F1AP_ASN_GENERATED_C_DIR}
|
||||||
|
COMMAND env "ASN1C_PREFIX=F1AP_" asn1c -gen-PER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
|
||||||
|
RESULT_VARIABLE ret
|
||||||
|
OUTPUT_QUIET
|
||||||
|
ERROR_QUIET)
|
||||||
|
|
||||||
|
if (NOT ${ret} STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "asn1c: error")
|
||||||
|
endif (NOT ${ret} STREQUAL 0)
|
||||||
|
|
||||||
|
file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c)
|
||||||
|
add_library(F1AP_LIB
|
||||||
|
${F1AP_ASN_GENERATED_C_FILES}
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
|
||||||
|
include_directories ("${F1AP_DIR}")
|
||||||
|
|
||||||
|
file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
|
||||||
|
add_library(F1AP
|
||||||
|
${F1AP_C_FILES}
|
||||||
|
)
|
||||||
|
|
||||||
# Hardware dependant options
|
# Hardware dependant options
|
||||||
###################################
|
###################################
|
||||||
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
|
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
|
||||||
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
||||||
|
|
||||||
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "EXMIMO" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR")
|
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "EXMIMO" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR" "OAI_SIMU")
|
||||||
|
|
||||||
|
|
||||||
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
|
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
|
||||||
#NOKIA config enhancement
|
#NOKIA config enhancement
|
||||||
@@ -585,6 +631,8 @@ set(HWLIB_TCP_BRIDGE_OAI_SOURCE
|
|||||||
add_library(tcp_bridge_oai MODULE ${HWLIB_TCP_BRIDGE_OAI_SOURCE} )
|
add_library(tcp_bridge_oai MODULE ${HWLIB_TCP_BRIDGE_OAI_SOURCE} )
|
||||||
set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
|
set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
|
||||||
|
|
||||||
|
add_library(rfsimulator MODULE ${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c)
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
|
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
|
||||||
@@ -595,7 +643,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
|||||||
##############################################################
|
##############################################################
|
||||||
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
||||||
##############################################################
|
##############################################################
|
||||||
add_boolean_option(ENABLE_SECURITY True "Enable LTE integrity and ciphering between RRC UE and eNB")
|
|
||||||
add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB")
|
add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB")
|
||||||
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
||||||
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
|
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
|
||||||
@@ -617,7 +664,12 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w
|
|||||||
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
|
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
|
||||||
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
|
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
|
||||||
|
|
||||||
########################
|
#############################################################################
|
||||||
|
# Flag for UE compilation to avoid issues in common eNB/UE PDCP/RLC functions
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
add_boolean_option(UETARGET False "set UE as target for compiler")
|
||||||
|
|
||||||
# Include order
|
# Include order
|
||||||
##########################
|
##########################
|
||||||
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" )
|
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" )
|
||||||
@@ -693,10 +745,10 @@ 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 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(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)")
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# RRC LAYER OPTIONS
|
# RRC LAYER OPTIONS
|
||||||
@@ -743,6 +795,8 @@ include_directories("${NFAPI_DIR}/sim_common/inc")
|
|||||||
include_directories("${NFAPI_DIR}/pnf_sim/inc")
|
include_directories("${NFAPI_DIR}/pnf_sim/inc")
|
||||||
include_directories("${OPENAIR1_DIR}")
|
include_directories("${OPENAIR1_DIR}")
|
||||||
include_directories("${OPENAIR2_DIR}")
|
include_directories("${OPENAIR2_DIR}")
|
||||||
|
include_directories("${OPENAIR3_DIR}/NAS/TOOLS")
|
||||||
|
include_directories("${OPENAIR2_DIR}/ENB_APP")
|
||||||
include_directories("${OPENAIR2_DIR}/LAYER2/RLC")
|
include_directories("${OPENAIR2_DIR}/LAYER2/RLC")
|
||||||
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0")
|
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0")
|
||||||
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0")
|
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0")
|
||||||
@@ -765,19 +819,21 @@ include_directories("${OPENAIR3_DIR}/SECU")
|
|||||||
include_directories("${OPENAIR3_DIR}/SCTP")
|
include_directories("${OPENAIR3_DIR}/SCTP")
|
||||||
include_directories("${OPENAIR3_DIR}/S1AP")
|
include_directories("${OPENAIR3_DIR}/S1AP")
|
||||||
include_directories("${OPENAIR2_DIR}/X2AP")
|
include_directories("${OPENAIR2_DIR}/X2AP")
|
||||||
|
include_directories("${OPENAIR2_DIR}/F1AP")
|
||||||
include_directories("${OPENAIR3_DIR}/UDP")
|
include_directories("${OPENAIR3_DIR}/UDP")
|
||||||
include_directories("${OPENAIR3_DIR}/GTPV1-U")
|
include_directories("${OPENAIR3_DIR}/GTPV1-U")
|
||||||
include_directories("${OPENAIR_DIR}/targets/COMMON")
|
include_directories("${OPENAIR_DIR}/targets/COMMON")
|
||||||
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
|
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
|
||||||
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
|
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
|
||||||
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
|
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PHY")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/OSA")
|
include_directories("${OPENAIR2_DIR}/UTIL/OSA")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
|
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
|
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
|
||||||
|
include_directories("${OPENAIR2_DIR}/LAYER2/PROTO_AGENT")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/MEM")
|
include_directories("${OPENAIR2_DIR}/UTIL/MEM")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/LISTS")
|
include_directories("${OPENAIR2_DIR}/UTIL/LISTS")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/FIFO")
|
include_directories("${OPENAIR2_DIR}/UTIL/FIFO")
|
||||||
@@ -819,7 +875,7 @@ set(FLPT_MSG_FILES
|
|||||||
${FLPT_MSG_DIR}/control_delegation.proto
|
${FLPT_MSG_DIR}/control_delegation.proto
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FLPT_C_DIR ${protobuf_generated_dir}/${FLPTDIR})
|
set(FLPT_C_DIR ${protobuf_generated_dir}/FLPT_${FLPTDIR})
|
||||||
#message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}")
|
#message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}")
|
||||||
execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES})
|
execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES})
|
||||||
file(GLOB FLPT_source ${FLPT_C_DIR}/*.c)
|
file(GLOB FLPT_source ${FLPT_C_DIR}/*.c)
|
||||||
@@ -862,6 +918,7 @@ add_library(FLEXRAN_AGENT
|
|||||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api.c
|
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_timer.c
|
${OPENAIR2_DIR}/ENB_APP/flexran_agent_timer.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c
|
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c
|
||||||
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PHY/flexran_agent_phy.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
|
||||||
@@ -887,6 +944,63 @@ MARK_AS_ADVANCED(LIBYAML_INCLUDE_DIR LIBYAML_LIBRARIES)
|
|||||||
|
|
||||||
#set(PROTOBUF_LIB "protobuf") #for Cpp
|
#set(PROTOBUF_LIB "protobuf") #for Cpp
|
||||||
|
|
||||||
|
# set the version of protobuf messages, V3 not supported yet
|
||||||
|
add_list1_option(FSPT_VERSION V2 "FSPT MSG protobuf grammar version" V2 V3)
|
||||||
|
|
||||||
|
if (${FSPT_VERSION} STREQUAL "V2")
|
||||||
|
set (FSPTDIR V2)
|
||||||
|
elseif (${FSPT_VERSION} STREQUAL "V3")
|
||||||
|
set (FSPTDIR V3)
|
||||||
|
endif(${FSPT_VERSION} STREQUAL "V2")
|
||||||
|
|
||||||
|
set(FSPT_MSG_DIR ${OPENAIR_DIR}/targets/COMMON/MESSAGES/${FSPTDIR} )
|
||||||
|
set(FSPT_MSG_FILES
|
||||||
|
${FSPT_MSG_DIR}/flexsplit.proto
|
||||||
|
)
|
||||||
|
|
||||||
|
set(FSPT_C_DIR ${protobuf_generated_dir}/FSPT_${FSPTDIR})
|
||||||
|
message("calling protoc_call=${protoc_call} FSPT_C_DIR=${FSPT_C_DIR} FSPT_MSG_DIR=${FSPT_MSG_DIR} FSPT_MSG_FILES=${FSPT_MSG_FILES}")
|
||||||
|
execute_process(COMMAND ${protoc_call} ${FSPT_C_DIR} ${FSPT_MSG_DIR} ${FSPT_MSG_FILES})
|
||||||
|
file(GLOB FSPT_source ${FSPT_C_DIR}/*.c)
|
||||||
|
set(FSPT_OAI_generated
|
||||||
|
${FSPT_C_DIR}/flexsplit.pb-c.c
|
||||||
|
)
|
||||||
|
|
||||||
|
file(GLOB fspt_h ${FSPT_C_DIR}/*.h)
|
||||||
|
set(fspt_h ${fspt_h} )
|
||||||
|
|
||||||
|
add_library(FSPT_MSG
|
||||||
|
${FSPT_OAI_generated}
|
||||||
|
${FSPT_source}
|
||||||
|
)
|
||||||
|
set(FSPT_MSG_LIB FSPT_MSG)
|
||||||
|
message("fspt c dir is : ${FSPT_C_DIR}")
|
||||||
|
include_directories (${FSPT_C_DIR})
|
||||||
|
|
||||||
|
# add_library(ASYNC_IF
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/ringbuffer_queue.c
|
||||||
|
# )
|
||||||
|
# set(ASYNC_IF_LIB ASYNC_IF)
|
||||||
|
# include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
|
||||||
|
|
||||||
|
add_library(PROTO_AGENT
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
|
||||||
|
)
|
||||||
|
set(PROTO_AGENT_LIB PROTO_AGENT)
|
||||||
|
include_directories(${OPENAIR2_DIR}/LAYER2/PROTO_AGENT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set(PROTOBUF_LIB "protobuf-c")
|
||||||
|
|
||||||
|
#set(PROTOBUF_LIB "protobuf") #for Cpp
|
||||||
|
|
||||||
add_library(HASHTABLE
|
add_library(HASHTABLE
|
||||||
${OPENAIR_DIR}/common/utils/hashtable/hashtable.c
|
${OPENAIR_DIR}/common/utils/hashtable/hashtable.c
|
||||||
@@ -909,7 +1023,7 @@ set(UTIL_SRC
|
|||||||
${OPENAIR_DIR}/common/utils/LOG/log.c
|
${OPENAIR_DIR}/common/utils/LOG/log.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c
|
# ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c
|
||||||
${OPENAIR2_DIR}/UTIL/MATH/oml.c
|
${OPENAIR2_DIR}/UTIL/MATH/oml.c
|
||||||
${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
|
#${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
|
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
|
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
|
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
|
||||||
@@ -1286,7 +1400,7 @@ set(L2_SRC
|
|||||||
${RLC_DIR}/rlc.c
|
${RLC_DIR}/rlc.c
|
||||||
${RLC_DIR}/rlc_rrc.c
|
${RLC_DIR}/rlc_rrc.c
|
||||||
${RLC_DIR}/rlc_mpls.c
|
${RLC_DIR}/rlc_mpls.c
|
||||||
${RRC_DIR}/rrc_UE.c
|
# ${RRC_DIR}/rrc_UE.c
|
||||||
${RRC_DIR}/rrc_eNB.c
|
${RRC_DIR}/rrc_eNB.c
|
||||||
${RRC_DIR}/rrc_eNB_S1AP.c
|
${RRC_DIR}/rrc_eNB_S1AP.c
|
||||||
${RRC_DIR}/rrc_eNB_UE_context.c
|
${RRC_DIR}/rrc_eNB_UE_context.c
|
||||||
@@ -1374,6 +1488,8 @@ set (MAC_SRC_UE
|
|||||||
set (ENB_APP_SRC
|
set (ENB_APP_SRC
|
||||||
${OPENAIR2_DIR}/ENB_APP/enb_app.c
|
${OPENAIR2_DIR}/ENB_APP/enb_app.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/enb_config.c
|
${OPENAIR2_DIR}/ENB_APP/enb_config.c
|
||||||
|
${OPENAIR2_DIR}/ENB_APP/enb_config_SL.c
|
||||||
|
${OPENAIR2_DIR}/ENB_APP/enb_config_eMTC.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/RRC_config_tools.c
|
${OPENAIR2_DIR}/ENB_APP/RRC_config_tools.c
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1951,6 +2067,8 @@ add_executable(lte-softmodem
|
|||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||||
${OPENAIR_TARGETS}/COMMON/create_tasks.c
|
${OPENAIR_TARGETS}/COMMON/create_tasks.c
|
||||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||||
|
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||||
|
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||||
@@ -1968,11 +2086,39 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag)
|
|||||||
|
|
||||||
target_link_libraries (lte-softmodem
|
target_link_libraries (lte-softmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
|
RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} LFDS7
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
|
add_executable(cu_test
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
|
||||||
|
${T_SOURCE}
|
||||||
|
)
|
||||||
|
target_link_libraries(cu_test
|
||||||
|
${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
|
||||||
|
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(du_test
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/du_test.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
|
||||||
|
${T_SOURCE}
|
||||||
|
)
|
||||||
|
target_link_libraries(du_test
|
||||||
|
${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
|
||||||
|
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
||||||
@@ -1996,26 +2142,29 @@ add_executable(lte-softmodem-nos1
|
|||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||||
|
${OPENAIR_DIR}/common/utils/utils.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
|
${GTPU_need_ITTI}
|
||||||
${XFORMS_SOURCE}
|
${XFORMS_SOURCE}
|
||||||
${XFORMS_SOURCE_SOFTMODEM}
|
${XFORMS_SOURCE_SOFTMODEM}
|
||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${CONFIG_SOURCES}
|
${CONFIG_SOURCES}
|
||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(lte-softmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
add_dependencies(lte-softmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
||||||
|
|
||||||
target_link_libraries (lte-softmodem-nos1
|
target_link_libraries (lte-softmodem-nos1
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${RAL_LIB} ${ITTI_LIB}
|
RRC_LIB F1AP F1AP_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
|
||||||
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} LFDS7
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl )
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
|
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
|
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem-nos1 ${T_LIB})
|
target_link_libraries (lte-softmodem-nos1 ${T_LIB})
|
||||||
|
|
||||||
# lte-uesoftmodem is UE implementation
|
# lte-uesoftmodem is UE implementation
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
@@ -2030,6 +2179,8 @@ add_executable(lte-uesoftmodem
|
|||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||||
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
|
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
|
||||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||||
|
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||||
|
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||||
@@ -2046,7 +2197,7 @@ add_executable(lte-uesoftmodem
|
|||||||
add_dependencies(lte-uesoftmodem rrc_flag s1ap_flag x2_flag)
|
add_dependencies(lte-uesoftmodem rrc_flag s1ap_flag x2_flag)
|
||||||
target_link_libraries (lte-uesoftmodem
|
target_link_libraries (lte-uesoftmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP F1AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
@@ -2074,6 +2225,7 @@ add_executable(lte-uesoftmodem-nos1
|
|||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||||
|
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||||
${OPENAIR_DIR}/common/utils/utils.c
|
${OPENAIR_DIR}/common/utils/utils.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
${XFORMS_SOURCE}
|
${XFORMS_SOURCE}
|
||||||
@@ -2084,18 +2236,18 @@ add_executable(lte-uesoftmodem-nos1
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(lte-uesoftmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
add_dependencies(lte-uesoftmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
||||||
|
|
||||||
target_link_libraries (lte-uesoftmodem-nos1
|
target_link_libraries (lte-uesoftmodem-nos1
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU ${RAL_LIB} ${ITTI_LIB}
|
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP F1AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
||||||
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl )
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES})
|
target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES})
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 ${LIB_LMS_LIBRARIES})
|
target_link_libraries (lte-uesoftmodem-nos1 ${LIB_LMS_LIBRARIES})
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB})
|
target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB})
|
||||||
|
|
||||||
# USIM process
|
# USIM process
|
||||||
#################
|
#################
|
||||||
#add_executable(usim
|
#add_executable(usim
|
||||||
@@ -2163,7 +2315,7 @@ add_executable(test_epc_generate_scenario
|
|||||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||||
)
|
)
|
||||||
target_link_libraries (test_epc_generate_scenario
|
target_link_libraries (test_epc_generate_scenario
|
||||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(test_epc_play_scenario
|
add_executable(test_epc_play_scenario
|
||||||
@@ -2182,7 +2334,7 @@ add_executable(test_epc_play_scenario
|
|||||||
)
|
)
|
||||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||||
target_link_libraries (test_epc_play_scenario
|
target_link_libraries (test_epc_play_scenario
|
||||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -2216,15 +2368,15 @@ if (${T_TRACER})
|
|||||||
#all "add_executable" definitions (except tests, rb_tool, updatefw)
|
#all "add_executable" definitions (except tests, rb_tool, updatefw)
|
||||||
lte-softmodem lte-softmodem-nos1 lte-uesoftmodem lte-uesoftmodem-nos1
|
lte-softmodem lte-softmodem-nos1 lte-uesoftmodem lte-uesoftmodem-nos1
|
||||||
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
|
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
|
||||||
pdcchsim pucchsim prachsim syncsim ulsim
|
pdcchsim pucchsim prachsim syncsim ulsim cu_test du_test
|
||||||
#all "add_library" definitions
|
#all "add_library" definitions
|
||||||
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB
|
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP_LIB F1AP
|
||||||
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
|
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
|
||||||
oai_eth_transpro
|
oai_eth_transpro
|
||||||
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
|
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
|
||||||
SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL CN_UTILS
|
SECU_CN SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY L2 default_sched
|
||||||
GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU OPENAIR0_LIB PHY_MEX
|
remote_sched RAL CN_UTILS GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS
|
||||||
coding)
|
LFDS7 SIMU OPENAIR0_LIB PHY_MEX coding)
|
||||||
if (TARGET ${i})
|
if (TARGET ${i})
|
||||||
add_dependencies(${i} generate_T)
|
add_dependencies(${i} generate_T)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Executable → Regular
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
|||||||
@@ -143,6 +143,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||||
|
|||||||
@@ -143,6 +143,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||||
|
|||||||
@@ -143,6 +143,11 @@ eNBs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "no";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||||
|
|||||||
+105
-93
@@ -70,13 +70,14 @@ DISABLE_LOG_X="False"
|
|||||||
USRP_REC_PLAY="False"
|
USRP_REC_PLAY="False"
|
||||||
BUILD_ECLIPSE=0
|
BUILD_ECLIPSE=0
|
||||||
UE_NAS_USE_TUN="False"
|
UE_NAS_USE_TUN="False"
|
||||||
|
UETARGET="False"
|
||||||
BASIC_SIMULATOR=0
|
BASIC_SIMULATOR=0
|
||||||
trap handle_ctrl_c INT
|
trap handle_ctrl_c INT
|
||||||
|
|
||||||
function print_help() {
|
function print_help() {
|
||||||
echo_info "
|
echo_info "
|
||||||
This program installs OpenAirInterface Software
|
This program installs OpenAirInterface Software
|
||||||
You should have ubuntu 14.xx, updated, and the Linux kernel >= 3.14
|
You should have ubuntu 16.xx or 18.04 updated
|
||||||
Options
|
Options
|
||||||
-h
|
-h
|
||||||
This help
|
This help
|
||||||
@@ -103,6 +104,8 @@ Options
|
|||||||
Specify conf_nvram_path (default \"$conf_nvram_path\")
|
Specify conf_nvram_path (default \"$conf_nvram_path\")
|
||||||
--UE-gen-nvram [output path]
|
--UE-gen-nvram [output path]
|
||||||
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
||||||
|
-a | --agent
|
||||||
|
Enables agent for software-defined control of the eNB
|
||||||
-r | --3gpp-release
|
-r | --3gpp-release
|
||||||
default is Rel14,
|
default is Rel14,
|
||||||
Rel8 limits the implementation to 3GPP Release 8 version
|
Rel8 limits the implementation to 3GPP Release 8 version
|
||||||
@@ -167,6 +170,9 @@ Options
|
|||||||
--basic-simulator
|
--basic-simulator
|
||||||
Generates a basic [1 UE + 1 eNB + no channel] simulator.
|
Generates a basic [1 UE + 1 eNB + no channel] simulator.
|
||||||
See targets/ARCH/tcp_bridge/README.tcp_bridge_oai for documentation.
|
See targets/ARCH/tcp_bridge/README.tcp_bridge_oai for documentation.
|
||||||
|
--rfsimulator
|
||||||
|
Generate virtual RF driver
|
||||||
|
to use it, set the environement variable RFSIMULATOR to \"enb\" in the eNB and to the eNB IP address in the UEs
|
||||||
Usage (first build):
|
Usage (first build):
|
||||||
NI/ETTUS B201 + COTS UE : ./build_oai -I --eNB -x --install-system-files -w USRP
|
NI/ETTUS B201 + COTS UE : ./build_oai -I --eNB -x --install-system-files -w USRP
|
||||||
Usage (Regular):
|
Usage (Regular):
|
||||||
@@ -213,6 +219,7 @@ function main() {
|
|||||||
shift;;
|
shift;;
|
||||||
--UE)
|
--UE)
|
||||||
UE=1
|
UE=1
|
||||||
|
UETARGET="True"
|
||||||
echo_info "Will compile UE"
|
echo_info "Will compile UE"
|
||||||
shift;;
|
shift;;
|
||||||
--mu)
|
--mu)
|
||||||
@@ -234,25 +241,21 @@ function main() {
|
|||||||
echo_info "Setting release to: $REL"
|
echo_info "Setting release to: $REL"
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-w | --hardware)
|
-w | --hardware)
|
||||||
HW="$2" #"${i#*=}"
|
|
||||||
# Use OAI_USRP as the key word USRP is used inside UHD driver
|
# Use OAI_USRP as the key word USRP is used inside UHD driver
|
||||||
if [ "$HW" != "BLADERF" -a "$HW" != "USRP" -a "$HW" != "LMSSDR" -a "$HW" != "None" -a "$HW" != "EXMIMO" -a "$HW" != "IRIS" ] ; then
|
case "$2" in
|
||||||
echo_fatal "Unknown HW type $HW will exit..."
|
"EXMIMO")
|
||||||
else
|
HW="EXMIMO"
|
||||||
if [ "$HW" == "USRP" ] ; then
|
;;
|
||||||
HW="OAI_USRP"
|
"USRP" | "BLADERF" | "LMSSDR" | "IRIS" | "SIMU")
|
||||||
fi
|
HW="OAI_"$2
|
||||||
if [ "$HW" == "BLADERF" ] ; then
|
;;
|
||||||
HW="OAI_BLADERF"
|
"None")
|
||||||
fi
|
HW="None"
|
||||||
if [ "$HW" == "LMSSDR" ] ; then
|
;;
|
||||||
HW="OAI_LMSSDR"
|
*)
|
||||||
fi
|
echo_fatal "Unknown HW type $HW: exit..."
|
||||||
if [ "$HW" == "IRIS" ] ; then
|
esac
|
||||||
HW="OAI_IRIS"
|
|
||||||
fi
|
|
||||||
echo_info "Setting hardware to: $HW"
|
echo_info "Setting hardware to: $HW"
|
||||||
fi
|
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-t | --transport_protocol)
|
-t | --transport_protocol)
|
||||||
TP="$2" #"${i#*=}"
|
TP="$2" #"${i#*=}"
|
||||||
@@ -374,6 +377,10 @@ function main() {
|
|||||||
BASIC_SIMULATOR=1
|
BASIC_SIMULATOR=1
|
||||||
echo_info "Compiling the basic simulator"
|
echo_info "Compiling the basic simulator"
|
||||||
shift 1;;
|
shift 1;;
|
||||||
|
--rfsimulator)
|
||||||
|
RFSIMULATOR=true
|
||||||
|
echo_info "Compiling the RF simulator"
|
||||||
|
shift 1;;
|
||||||
-h | --help)
|
-h | --help)
|
||||||
print_help
|
print_help
|
||||||
exit 1;;
|
exit 1;;
|
||||||
@@ -386,11 +393,6 @@ function main() {
|
|||||||
|
|
||||||
CMAKE_CMD="$CMAKE_CMD .."
|
CMAKE_CMD="$CMAKE_CMD .."
|
||||||
echo_info "CMAKE_CMD=$CMAKE_CMD"
|
echo_info "CMAKE_CMD=$CMAKE_CMD"
|
||||||
if [ "$eNB" = "1" ] && [ "$UE" = "1" ]; then
|
|
||||||
echo_error "Cannot build UE and eNB on one build_oai execution"
|
|
||||||
echo_error "use 2 build_oai invocations"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# check validity of HW and TP parameters for eNB
|
# check validity of HW and TP parameters for eNB
|
||||||
#########################################################
|
#########################################################
|
||||||
@@ -409,33 +411,17 @@ function main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo_info "RF HW set to $HW"
|
echo_info "RF HW set to $HW"
|
||||||
#Now we set flags to enable deadline scheduler settings
|
# If the user doesn't specify the Linux scheduler to use, we set a value
|
||||||
#By default: USRP: disable,
|
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
|
||||||
#By default: BLADERF: enable,
|
case "$HW" in
|
||||||
#By default: EXMIMO: enable
|
"EXMIMO")
|
||||||
if [ "$FORCE_DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
|
|
||||||
if [ "$HW" = "EXMIMO" ] ; then
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="True"
|
DEADLINE_SCHEDULER_FLAG_USER="True"
|
||||||
elif [ "$HW" = "ETHERNET" ] ; then
|
;;
|
||||||
|
*)
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||||
elif [ "$HW" = "OAI_USRP" ] ; then
|
;;
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
esac
|
||||||
elif [ "$HW" = "OAI_BLADERF" ] ; then
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
|
||||||
elif [ "$HW" = "OAI_LMSSDR" ] ; then
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
|
||||||
elif [ "$HW" = "OAI_IRIS" ] ; then
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
|
||||||
elif [ "$HW" = "None" ] ; then
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
|
||||||
else
|
|
||||||
echo_error "Unknown HW type $HW. Exiting now..."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER=$FORCE_DEADLINE_SCHEDULER_FLAG_USER
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Disable CPU Affinity for deadline scheduler
|
#Disable CPU Affinity for deadline scheduler
|
||||||
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "True" ] ; then
|
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "True" ] ; then
|
||||||
CPU_AFFINITY_FLAG_USER="False"
|
CPU_AFFINITY_FLAG_USER="False"
|
||||||
@@ -516,26 +502,19 @@ function main() {
|
|||||||
echo_info "3. building the compilation directives ..."
|
echo_info "3. building the compilation directives ..."
|
||||||
|
|
||||||
DIR=$OPENAIR_DIR/cmake_targets
|
DIR=$OPENAIR_DIR/cmake_targets
|
||||||
if [ "$NOS1" = "1" ] ; then
|
|
||||||
lte_build_dir=lte_noS1_build_oai
|
if [ "$T_TRACER" = "False" ] ; then
|
||||||
if [ "$eNB" = "1" ] ; then
|
noLOGDirsuffix="_noLOG"
|
||||||
lte_exec=lte-softmodem-nos1
|
|
||||||
fi
|
|
||||||
if [ "$UE" = "1" ] ; then
|
|
||||||
lte_exec=lte-uesoftmodem-nos1
|
|
||||||
fi
|
fi
|
||||||
|
if [ "$NOS1" = "1" ] ; then
|
||||||
|
noS1Dir="_noS1"
|
||||||
|
bin_suffix="-nos1"
|
||||||
else
|
else
|
||||||
lte_build_dir=lte_build_oai
|
lte_build_dir=lte_build_oai
|
||||||
if [ "$eNB" = "1" ] ; then
|
bin_suffix=""
|
||||||
lte_exec=lte-softmodem
|
|
||||||
fi
|
|
||||||
if [ "$UE" = "1" ] ; then
|
|
||||||
lte_exec=lte-uesoftmodem
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ "$T_TRACER" = "False" ] ; then
|
|
||||||
lte_build_dir=${lte_build_dir}_noLOG
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
lte_build_dir="lte${noS1Dir}_build_oai${noLOGDirsuffix}"
|
||||||
# configuration module libraries, one currently available, using libconfig
|
# configuration module libraries, one currently available, using libconfig
|
||||||
config_libconfig_shlib=params_libconfig
|
config_libconfig_shlib=params_libconfig
|
||||||
|
|
||||||
@@ -547,9 +526,9 @@ function main() {
|
|||||||
mkdir -p $DIR/$lte_build_dir/build
|
mkdir -p $DIR/$lte_build_dir/build
|
||||||
cmake_file=$DIR/$lte_build_dir/CMakeLists.txt
|
cmake_file=$DIR/$lte_build_dir/CMakeLists.txt
|
||||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||||
if [ "$NOS1" = "1" ] ; then
|
# if [ "$NOS1" = "1" ] ; then
|
||||||
cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
|
# cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
|
||||||
fi
|
# fi
|
||||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||||
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||||
@@ -570,6 +549,9 @@ function main() {
|
|||||||
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
|
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
|
||||||
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
|
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
|
||||||
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
||||||
|
if [ "$UE" = 1 ] ; then
|
||||||
|
echo "set (UETARGET $UETARGET )" >> $cmake_file
|
||||||
|
fi
|
||||||
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
|
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
|
||||||
echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
|
echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
|
||||||
echo "set (LINUX True )" >> $cmake_file
|
echo "set (LINUX True )" >> $cmake_file
|
||||||
@@ -580,8 +562,8 @@ function main() {
|
|||||||
eval $CMAKE_CMD
|
eval $CMAKE_CMD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
if [ "$eNB" = "1" ] ; then
|
||||||
echo_info "Compiling $lte_exec"
|
lte_exec=lte-softmodem${bin_suffix}
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir $lte_exec \
|
$lte_build_dir $lte_exec \
|
||||||
$lte_exec $dbin/$lte_exec.$REL
|
$lte_exec $dbin/$lte_exec.$REL
|
||||||
@@ -605,7 +587,29 @@ function main() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
|
if [ "$UE" = 1 ] ; then
|
||||||
|
lte_exec=lte-uesoftmodem${bin_suffix}
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir $lte_exec \
|
||||||
|
$lte_exec $dbin/$lte_exec.$REL
|
||||||
|
|
||||||
|
# mandatory shared lib
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir $config_libconfig_shlib \
|
||||||
|
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir coding \
|
||||||
|
libcoding.so $dbin/libcoding.so
|
||||||
|
|
||||||
|
if [ "$NOS1" = "1" ] ; then
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir nasmesh \
|
||||||
|
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir rb_tool \
|
||||||
|
rb_tool $dbin/rb_tool
|
||||||
|
cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin
|
||||||
|
else
|
||||||
# ue_ip driver compilation
|
# ue_ip driver compilation
|
||||||
echo_info "Compiling UE specific part"
|
echo_info "Compiling UE specific part"
|
||||||
compilations \
|
compilations \
|
||||||
@@ -645,6 +649,7 @@ function main() {
|
|||||||
echo_warning "not generated UE NAS files: binaries not found"
|
echo_warning "not generated UE NAS files: binaries not found"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then
|
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then
|
||||||
cd $OPENAIR_DIR/cmake_targets/lte-simulators
|
cd $OPENAIR_DIR/cmake_targets/lte-simulators
|
||||||
@@ -709,22 +714,19 @@ function main() {
|
|||||||
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
|
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Telnet server compilation
|
# Telnet server compilation
|
||||||
#####################
|
#####################
|
||||||
if [ "$BUILD_TELNETSRV" = "1" ] ; then
|
if [ "$BUILD_TELNETSRV" = "1" ] ; then
|
||||||
build_dir=$lte_build_dir
|
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir telnetsrv \
|
$lte_build_dir telnetsrv \
|
||||||
libtelnetsrv.so $dbin/libtelnetsrv.so
|
libtelnetsrv.so $dbin/libtelnetsrv.so
|
||||||
|
|
||||||
fi
|
fi
|
||||||
# Telnet server compilation
|
# msc library compilation
|
||||||
#####################
|
#####################
|
||||||
if [ "$MSC_GEN" = "1" ] ; then
|
if [ "$MSC_GEN" = "1" ] ; then
|
||||||
build_dir=$lte_build_dir
|
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir msc \
|
$lte_build_dir msc \
|
||||||
libmsc.so $dbin/libmsc.so
|
libmsc.so $dbin/libmsc.so
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@@ -732,8 +734,6 @@ function main() {
|
|||||||
#####################################
|
#####################################
|
||||||
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
||||||
|
|
||||||
build_dir=$lte_build_dir
|
|
||||||
|
|
||||||
# build RF device libraries
|
# build RF device libraries
|
||||||
if [ "$HW" != "None" ] ; then
|
if [ "$HW" != "None" ] ; then
|
||||||
rm -f liboai_device.so
|
rm -f liboai_device.so
|
||||||
@@ -742,7 +742,7 @@ function main() {
|
|||||||
# link liboai_device.so with the selected RF device library
|
# link liboai_device.so with the selected RF device library
|
||||||
if [ "$HW" == "EXMIMO" ] ; then
|
if [ "$HW" == "EXMIMO" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir oai_exmimodevif \
|
$lte_build_dir oai_exmimodevif \
|
||||||
liboai_exmimodevif.so $dbin/liboai_exmimodevif.so.$REL
|
liboai_exmimodevif.so $dbin/liboai_exmimodevif.so.$REL
|
||||||
|
|
||||||
ln -sf liboai_exmimodevif.so liboai_device.so
|
ln -sf liboai_exmimodevif.so liboai_device.so
|
||||||
@@ -750,7 +750,7 @@ function main() {
|
|||||||
echo_info "liboai_device.so is linked to EXMIMO device library"
|
echo_info "liboai_device.so is linked to EXMIMO device library"
|
||||||
elif [ "$HW" == "OAI_USRP" ] ; then
|
elif [ "$HW" == "OAI_USRP" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir oai_usrpdevif \
|
$lte_build_dir oai_usrpdevif \
|
||||||
liboai_usrpdevif.so $dbin/liboai_usrpdevif.so.$REL
|
liboai_usrpdevif.so $dbin/liboai_usrpdevif.so.$REL
|
||||||
|
|
||||||
ln -sf liboai_usrpdevif.so liboai_device.so
|
ln -sf liboai_usrpdevif.so liboai_device.so
|
||||||
@@ -759,7 +759,7 @@ function main() {
|
|||||||
elif [ "$HW" == "OAI_BLADERF" ] ; then
|
elif [ "$HW" == "OAI_BLADERF" ] ; then
|
||||||
if [ -f "/usr/include/libbladeRF.h" ] ; then
|
if [ -f "/usr/include/libbladeRF.h" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir oai_bladerfdevif \
|
$lte_build_dir oai_bladerfdevif \
|
||||||
liboai_bladerfdevif.so $dbin/liboai_bladerfdevif.so.$REL
|
liboai_bladerfdevif.so $dbin/liboai_bladerfdevif.so.$REL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -767,18 +767,18 @@ function main() {
|
|||||||
ln -sf $dbin/liboai_bladerfdevif.so.$REL $dbin/liboai_device.so
|
ln -sf $dbin/liboai_bladerfdevif.so.$REL $dbin/liboai_device.so
|
||||||
echo_info "liboai_device.so is linked to BLADERF device library"
|
echo_info "liboai_device.so is linked to BLADERF device library"
|
||||||
elif [ "$HW" == "OAI_LMSSDR" ] ; then
|
elif [ "$HW" == "OAI_LMSSDR" ] ; then
|
||||||
# if [ -f "/usr/include/libbladeRF.h" ] ; then
|
# if [ -f "/usr/include/libbladeRF.h" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir oai_lmssdrdevif \
|
$lte_build_dir oai_lmssdrdevif \
|
||||||
liboai_lmssdrdevif.so $dbin/liboai_lmssdrdevif.so.$REL
|
liboai_lmssdrdevif.so $dbin/liboai_lmssdrdevif.so.$REL
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
ln -sf liboai_lmssdrdevif.so liboai_device.so
|
ln -sf liboai_lmssdrdevif.so liboai_device.so
|
||||||
ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so
|
ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so
|
||||||
echo_info "liboai_device.so is linked to LMSSDR device library"
|
echo_info "liboai_device.so is linked to LMSSDR device library"
|
||||||
elif [ "$HW" == "OAI_IRIS" ] ; then
|
elif [ "$HW" == "OAI_IRIS" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir oai_irisdevif \
|
$lte_build_dir oai_irisdevif \
|
||||||
liboai_irisdevif.so $dbin/liboai_irisdevif.so.$REL
|
liboai_irisdevif.so $dbin/liboai_irisdevif.so.$REL
|
||||||
|
|
||||||
ln -s liboai_irisdevif.so liboai_device.so
|
ln -s liboai_irisdevif.so liboai_device.so
|
||||||
@@ -789,22 +789,33 @@ function main() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build trasport protocol libraries (currently only ETHERNET is available)
|
# build simulators devices
|
||||||
if [ "$TP" != "None" ] ; then
|
echo_info "Compiling rfsimulator"
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir rfsimulator \
|
||||||
|
librfsimulator.so $dbin/librfsimulator.so.$REL
|
||||||
|
echo_info "Compiling basicsimulator"
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir tcp_bridge_oai \
|
||||||
|
libtcp_bridge_oai.so $dbin/libtcp_bridge_oai.so.$REL
|
||||||
|
# build transport protocol libraries (currently only ETHERNET is available)
|
||||||
|
|
||||||
rm -f liboai_transpro.so
|
rm -f liboai_transpro.so
|
||||||
rm -f $dbin/liboai_transpro.so
|
rm -f $dbin/liboai_transpro.so
|
||||||
|
|
||||||
if [ "$TP" == "ETHERNET" ] ; then
|
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir oai_eth_transpro \
|
$lte_build_dir oai_eth_transpro \
|
||||||
liboai_eth_transpro.so $dbin/liboai_eth_transpro.so.$REL
|
liboai_eth_transpro.so $dbin/liboai_eth_transpro.so.$REL
|
||||||
ln -sf liboai_eth_transpro.so liboai_transpro.so
|
ln -sf liboai_eth_transpro.so liboai_transpro.so
|
||||||
ln -sf $dbin/liboai_eth_transpro.so.$REL $dbin/liboai_transpro.so
|
ln -sf $dbin/liboai_eth_transpro.so.$REL $dbin/liboai_transpro.so
|
||||||
echo_info "liboai_transpro.so is linked with ETHERNET library"
|
echo_info "liboai_transpro.so is linked to ETHERNET transport"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [ "$RFSIMULATOR" == "true" -o "$HW" == "OAI_SIMU" ] ; then
|
||||||
|
echo_info "Compiling rfsimulator"
|
||||||
|
compilations \
|
||||||
|
$lte_build_dir rfsimulator \
|
||||||
|
librfsimulator.so $dbin/librfsimulator.so.$REL
|
||||||
|
fi
|
||||||
|
|
||||||
# Doxygen Support
|
# Doxygen Support
|
||||||
#####################
|
#####################
|
||||||
@@ -934,8 +945,9 @@ fi
|
|||||||
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
||||||
echo "set (LINUX True )" >> $cmake_file
|
echo "set (LINUX True )" >> $cmake_file
|
||||||
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
|
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
|
||||||
|
echo "set (UETARGET True )" >> $cmake_file
|
||||||
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
|
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
|
||||||
echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
|
# echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
|
||||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
|
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
|
||||||
|
|
||||||
echo_info "Build UE"
|
echo_info "Build UE"
|
||||||
|
|||||||
Regular → Executable
@@ -9,7 +9,6 @@ set ( EMIT_ASN_DEBUG False )
|
|||||||
set ( ENABLE_ITTI True )
|
set ( ENABLE_ITTI True )
|
||||||
set ( ENABLE_NAS_UE_LOGGING True )
|
set ( ENABLE_NAS_UE_LOGGING True )
|
||||||
set ( ENABLE_NEW_MULTICAST True )
|
set ( ENABLE_NEW_MULTICAST True )
|
||||||
set ( ENABLE_SECURITY True )
|
|
||||||
set ( ENABLE_STANDALONE_EPC False)
|
set ( ENABLE_STANDALONE_EPC False)
|
||||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||||
set ( ENABLE_USE_MME True )
|
set ( ENABLE_USE_MME True )
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||||
|
set ( DEBUG_OMG False )
|
||||||
|
set ( DISABLE_XER_PRINT False )
|
||||||
|
set ( DRIVER2013 True )
|
||||||
|
set ( ENABLE_ITTI True )
|
||||||
|
set ( ENABLE_NAS_UE_LOGGING True )
|
||||||
|
set ( ENABLE_NEW_MULTICAST True )
|
||||||
|
set ( ENABLE_RAL False )
|
||||||
|
set ( ENABLE_STANDALONE_EPC False)
|
||||||
|
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||||
|
set ( ENABLE_USE_MME True )
|
||||||
|
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
|
||||||
|
set ( ENABLE_VCD_FIFO False )
|
||||||
|
set ( ENB_MODE True )
|
||||||
|
set ( EXMIMO_IOT True )
|
||||||
|
set ( JUMBO_FRAME True )
|
||||||
|
set ( LARGE_SCALE False )
|
||||||
|
set ( LINK_ENB_PDCP_TO_GTPV1U True)
|
||||||
|
set ( LINUX_LIST False )
|
||||||
|
set ( LINUX True )
|
||||||
|
set ( LOCALIZATION False )
|
||||||
|
set ( LOG_NO_THREAD True )
|
||||||
|
set ( DEADLINE_SCHEDULER False )
|
||||||
|
set ( MAC_CONTEXT 1 )
|
||||||
|
set ( MAX_NUM_CCs 1 )
|
||||||
|
set ( MESSAGE_CHART_GENERATOR False)
|
||||||
|
set ( MSG_PRINT False )
|
||||||
|
set ( MU_RECEIVER False )
|
||||||
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
set ( NAS_BUILT_IN_UE True)
|
||||||
|
set ( NAS_MME False )
|
||||||
|
set ( NAS_UE True )
|
||||||
|
set ( NB_ANTENNAS_RX "2" )
|
||||||
|
set ( NB_ANTENNAS_TX "2" )
|
||||||
|
set ( NO_RRM True )
|
||||||
|
set ( OAISIM True )
|
||||||
|
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||||
|
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||||
|
set ( OPENAIR2 True )
|
||||||
|
set ( OPENAIR_LTE True )
|
||||||
|
set ( PACKAGE_NAME "oaisim" )
|
||||||
|
set ( PDCP_USE_NETLINK True )
|
||||||
|
set ( PDCP_MSG_PRINT False )
|
||||||
|
set ( PHY_CONTEXT False )
|
||||||
|
set ( PHY_EMUL False )
|
||||||
|
set ( PHYSIM True )
|
||||||
|
set ( RF_BOARD "False" )
|
||||||
|
set ( RLC_STOP_ON_LOST_PDU False )
|
||||||
|
set ( RRC_ASN1_VERSION "Rel10" )
|
||||||
|
set ( RRC_DEFAULT_RAB_IS_AM True)
|
||||||
|
set ( RRC_MSG_PRINT False )
|
||||||
|
set ( SECU False )
|
||||||
|
set ( SMBV False )
|
||||||
|
set ( TEST_OMG False )
|
||||||
|
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||||
|
set ( USE_MME "R10" )
|
||||||
|
set ( XER_PRINT False )
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||||
|
set ( DEBUG_OMG False )
|
||||||
|
set ( DISABLE_XER_PRINT False )
|
||||||
|
set ( DRIVER2013 False )
|
||||||
|
set ( ENABLE_ITTI True )
|
||||||
|
set ( ENABLE_NAS_UE_LOGGING False )
|
||||||
|
set ( ENABLE_NEW_MULTICAST False )
|
||||||
|
set ( ENABLE_RAL False )
|
||||||
|
set ( ENABLE_STANDALONE_EPC False )
|
||||||
|
set ( ENABLE_USE_CPU_EXECUTION_TIME False )
|
||||||
|
set ( ENABLE_USE_MME False )
|
||||||
|
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
|
||||||
|
set ( ENABLE_VCD_FIFO False )
|
||||||
|
set ( ENB_MODE False )
|
||||||
|
set ( EPC_BUILD True )
|
||||||
|
set ( EXMIMO_IOT False )
|
||||||
|
set ( JUMBO_FRAME False )
|
||||||
|
set ( LARGE_SCALE False )
|
||||||
|
set ( LINK_ENB_PDCP_TO_GTPV1U True)
|
||||||
|
set ( LINUX_LIST False )
|
||||||
|
set ( LINUX False )
|
||||||
|
set ( LOCALIZATION False )
|
||||||
|
set ( LOG_NO_THREAD False )
|
||||||
|
set ( DEADLINE_SCHEDULER False )
|
||||||
|
set ( MAC_CONTEXT 1 )
|
||||||
|
set ( MAX_NUM_CCs 1 )
|
||||||
|
set ( MSG_PRINT False )
|
||||||
|
set ( MU_RECEIVER False )
|
||||||
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
set ( NAS_BUILT_IN_EPC True )
|
||||||
|
set ( NAS_MME True )
|
||||||
|
set ( NAS_NETLINK False )
|
||||||
|
set ( NAS_UE False )
|
||||||
|
set ( NB_ANTENNAS_RX "2" )
|
||||||
|
set ( NB_ANTENNAS_TX "2" )
|
||||||
|
set ( NO_RRM False )
|
||||||
|
set ( OAISIM False )
|
||||||
|
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||||
|
set ( OAI_NW_DRIVER_USE_NETLINK False )
|
||||||
|
set ( OPENAIR2 False )
|
||||||
|
set ( OPENAIR_LTE False )
|
||||||
|
set ( PACKAGE_NAME "EPC" )
|
||||||
|
set ( PDCP_MSG_PRINT False )
|
||||||
|
set ( PHY_CONTEXT False )
|
||||||
|
set ( PHY_EMUL False )
|
||||||
|
set ( PHYSIM False )
|
||||||
|
set ( RF_BOARD "False" )
|
||||||
|
set ( RRC_ASN1_VERSION "Rel10" )
|
||||||
|
set ( RLC_STOP_ON_LOST_PDU False )
|
||||||
|
set ( RRC_MSG_PRINT False )
|
||||||
|
set ( SECU False )
|
||||||
|
set ( SMBV False )
|
||||||
|
set ( TEST_OMG False )
|
||||||
|
set ( UPDATE_RELEASE_9 True)
|
||||||
|
set ( UPDATE_RELEASE_10 True)
|
||||||
|
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||||
|
set ( USE_MME "R10" )
|
||||||
|
set ( XER_PRINT False )
|
||||||
|
set ( XFORMS False )
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
set ( DEBUG_OMG False )
|
||||||
|
set ( DISABLE_XER_PRINT False )
|
||||||
|
set ( DRIVER2013 True )
|
||||||
|
set ( ENABLE_ITTI True )
|
||||||
|
set ( ENABLE_NAS_UE_LOGGING False )
|
||||||
|
set ( ENABLE_NEW_MULTICAST True )
|
||||||
|
set ( ENABLE_RAL False )
|
||||||
|
set ( ENABLE_STANDALONE_EPC False)
|
||||||
|
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||||
|
set ( ENABLE_USE_MME False )
|
||||||
|
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
|
||||||
|
set ( ENABLE_VCD_FIFO False )
|
||||||
|
set ( ENB_MODE True )
|
||||||
|
set ( EXMIMO_IOT True )
|
||||||
|
set ( JUMBO_FRAME True )
|
||||||
|
set ( LARGE_SCALE False )
|
||||||
|
set ( LINK_ENB_PDCP_TO_GTPV1U False)
|
||||||
|
set ( LINUX_LIST False )
|
||||||
|
set ( LINUX True )
|
||||||
|
set ( LOCALIZATION False )
|
||||||
|
set ( LOG_NO_THREAD 1 )
|
||||||
|
set ( DEADLINE_SCHEDULER False )
|
||||||
|
set ( MAC_CONTEXT 1 )
|
||||||
|
set ( MAX_NUM_CCs 1 )
|
||||||
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
|
set ( MSG_PRINT False )
|
||||||
|
set ( MU_RECEIVER False )
|
||||||
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
set ( NAS_BUILT_IN_UE False)
|
||||||
|
set ( NAS_MME False )
|
||||||
|
set ( NAS_UE False )
|
||||||
|
set ( NB_ANTENNAS_RX "2" )
|
||||||
|
set ( NB_ANTENNAS_TX "2" )
|
||||||
|
set ( NO_RRM True )
|
||||||
|
set ( OAISIM True )
|
||||||
|
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||||
|
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||||
|
set ( OPENAIR2 True )
|
||||||
|
set ( OPENAIR_LTE True )
|
||||||
|
set ( PACKAGE_NAME "oaisim" )
|
||||||
|
set ( PDCP_USE_NETLINK True )
|
||||||
|
set ( PDCP_MSG_PRINT False )
|
||||||
|
set ( PHY_CONTEXT False )
|
||||||
|
set ( PHY_EMUL False )
|
||||||
|
set ( PHYSIM True )
|
||||||
|
set ( RF_BOARD "False" )
|
||||||
|
set ( RRC_ASN1_VERSION "Rel10" )
|
||||||
|
set ( RLC_STOP_ON_LOST_PDU False )
|
||||||
|
set ( RRC_MSG_PRINT False )
|
||||||
|
set ( SECU False )
|
||||||
|
set ( SMBV False )
|
||||||
|
set ( TEST_OMG False )
|
||||||
|
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||||
|
set ( USE_MME "R10" )
|
||||||
|
set ( XER_PRINT False )
|
||||||
|
set ( DEBUG_PHY False )
|
||||||
|
set ( DEBUG_PHY_PROC False)
|
||||||
|
set ( DEBUG_DLSCH False)
|
||||||
@@ -9,7 +9,6 @@ set ( ENABLE_NAS_UE_LOGGING True )
|
|||||||
set ( ENABLE_NEW_MULTICAST True )
|
set ( ENABLE_NEW_MULTICAST True )
|
||||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||||
set ( ENABLE_RAL False )
|
set ( ENABLE_RAL False )
|
||||||
set ( ENABLE_SECURITY True )
|
|
||||||
set ( ENABLE_STANDALONE_EPC False)
|
set ( ENABLE_STANDALONE_EPC False)
|
||||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||||
set ( ENABLE_USE_MME True )
|
set ( ENABLE_USE_MME True )
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ OS_DISTRO=$(grep "^ID=" /etc/os-release | sed "s/ID=//" | sed "s/\"//g")
|
|||||||
OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "s/\"//g")
|
OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "s/\"//g")
|
||||||
case "$OS_DISTRO" in
|
case "$OS_DISTRO" in
|
||||||
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
|
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
|
||||||
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
|
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum --skip-broken"; CMAKE="cmake3" ;;
|
||||||
centos) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
|
centos) OS_BASEDISTRO="fedora"; INSTALLER="yum --skip-broken"; CMAKE="cmake3" ;;
|
||||||
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
|
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
|
||||||
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
|
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
|
||||||
esac
|
esac
|
||||||
@@ -102,6 +102,7 @@ check_supported_distribution() {
|
|||||||
"ubuntu14.04") return 0 ;;
|
"ubuntu14.04") return 0 ;;
|
||||||
"fedora24") return 0 ;;
|
"fedora24") return 0 ;;
|
||||||
"rhel7") return 0 ;;
|
"rhel7") return 0 ;;
|
||||||
|
"rhel7.6") return 0 ;;
|
||||||
"centos7") return 0 ;;
|
"centos7") return 0 ;;
|
||||||
esac
|
esac
|
||||||
return 1
|
return 1
|
||||||
@@ -310,10 +311,20 @@ install_usrp_uhd_driver() {
|
|||||||
# On newer kernels, it fails to install
|
# On newer kernels, it fails to install
|
||||||
$SUDO apt-get -y install uhd-host
|
$SUDO apt-get -y install uhd-host
|
||||||
fi
|
fi
|
||||||
|
# quick workaround for RHE7.6
|
||||||
|
local distribution=$(get_distribution_release)
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
$SUDO uhd_images_downloader
|
if [[ "$distribution" == "rhel7.6" ]]; then
|
||||||
|
$SUDO /usr/local/bin/uhd_images_downloader
|
||||||
|
else
|
||||||
|
$SUDO uhd_images_downloader
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
$SUDO uhd_images_downloader -i $1
|
if [[ "$distribution" == "rhel7.6" ]]; then
|
||||||
|
$SUDO /usr/local/bin/uhd_images_downloader -i $1
|
||||||
|
else
|
||||||
|
$SUDO uhd_images_downloader -i $1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -628,8 +639,6 @@ check_install_oai_software() {
|
|||||||
libidn2-0-dev \
|
libidn2-0-dev \
|
||||||
libidn11-dev \
|
libidn11-dev \
|
||||||
libmysqlclient-dev \
|
libmysqlclient-dev \
|
||||||
liboctave-dev \
|
|
||||||
libpgm-dev \
|
|
||||||
libpython2.7-dev \
|
libpython2.7-dev \
|
||||||
libsctp1 \
|
libsctp1 \
|
||||||
libsctp-dev \
|
libsctp-dev \
|
||||||
@@ -640,7 +649,6 @@ check_install_oai_software() {
|
|||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxslt1-dev \
|
libxslt1-dev \
|
||||||
mscgen \
|
mscgen \
|
||||||
octave \
|
|
||||||
octave-signal \
|
octave-signal \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
@@ -652,7 +660,8 @@ check_install_oai_software() {
|
|||||||
pydb \
|
pydb \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
wget \
|
wget \
|
||||||
libxpm-dev
|
libxpm-dev \
|
||||||
|
libboost-all-dev
|
||||||
|
|
||||||
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
||||||
|
|
||||||
@@ -700,8 +709,6 @@ check_install_oai_software() {
|
|||||||
libidn2-devel \
|
libidn2-devel \
|
||||||
libidn-devel \
|
libidn-devel \
|
||||||
mariadb-devel \
|
mariadb-devel \
|
||||||
octave-devel \
|
|
||||||
openpgm-devel \
|
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
lksctp-tools-devel \
|
lksctp-tools-devel \
|
||||||
openssl-devel \
|
openssl-devel \
|
||||||
@@ -711,8 +718,6 @@ check_install_oai_software() {
|
|||||||
libxml2 \
|
libxml2 \
|
||||||
libxml2-devel \
|
libxml2-devel \
|
||||||
libxslt-devel \
|
libxslt-devel \
|
||||||
octave \
|
|
||||||
octave-signal \
|
|
||||||
openssh-clients \
|
openssh-clients \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
openssl \
|
openssl \
|
||||||
@@ -735,7 +740,7 @@ check_install_oai_software() {
|
|||||||
libyaml-devel
|
libyaml-devel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_asn1c_from_source
|
install_asn1c_from_source $1
|
||||||
$SUDO rm -fr /opt/ssh
|
$SUDO rm -fr /opt/ssh
|
||||||
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh
|
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh
|
||||||
}
|
}
|
||||||
|
|||||||
Executable → Regular
@@ -23,7 +23,7 @@ reset_color="$(tput sgr0)"
|
|||||||
function error()
|
function error()
|
||||||
{
|
{
|
||||||
echo -e "$red_color"ERROR: "$@""$reset_color"
|
echo -e "$red_color"ERROR: "$@""$reset_color"
|
||||||
exit 1
|
# exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_sha1()
|
function check_sha1()
|
||||||
@@ -56,11 +56,11 @@ function patch_file()
|
|||||||
|
|
||||||
echo -e "$green_color""patch file $file with $OPENAIR_DIR/cmake_targets/tools/$patch""$reset_color"
|
echo -e "$green_color""patch file $file with $OPENAIR_DIR/cmake_targets/tools/$patch""$reset_color"
|
||||||
|
|
||||||
patch "$file" "$OPENAIR_DIR/cmake_targets/tools/$patch"
|
# patch "$file" "$OPENAIR_DIR/cmake_targets/tools/$patch"
|
||||||
if [ $? -ne 0 ]
|
# if [ $? -ne 0 ]
|
||||||
then
|
# then
|
||||||
error "patching of $file with $OPENAIR_DIR/cmake_targets/tools/$patch failed"
|
# error "patching of $file with $OPENAIR_DIR/cmake_targets/tools/$patch failed"
|
||||||
fi
|
# fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function apply_patches()
|
function apply_patches()
|
||||||
@@ -140,6 +140,22 @@ function patch_s1ap()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function patch_f1ap()
|
||||||
|
{
|
||||||
|
local directory="$1"
|
||||||
|
local version="$2"
|
||||||
|
|
||||||
|
case "$version" in
|
||||||
|
R15 )
|
||||||
|
#nothing to do anymore (fixes went to asn1c)
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
error unknwon/unhandled F1AP version \'"$version"\'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
if [ $# -ne 3 ]
|
if [ $# -ne 3 ]
|
||||||
@@ -167,6 +183,9 @@ function main()
|
|||||||
S1AP )
|
S1AP )
|
||||||
patch_s1ap "$directory" "$version"
|
patch_s1ap "$directory" "$version"
|
||||||
;;
|
;;
|
||||||
|
F1AP )
|
||||||
|
patch_f1ap "$directory" "$version"
|
||||||
|
;;
|
||||||
* )
|
* )
|
||||||
error unknown module "$module"
|
error unknown module "$module"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,23 +2,29 @@
|
|||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
mkdir -p $1
|
PROTOCOL_DIR=$1
|
||||||
cd $1
|
mkdir -p ${PROTOCOL_DIR}
|
||||||
|
cd ${PROTOCOL_DIR}
|
||||||
|
|
||||||
|
# Because use $* also include directory, so we need shift
|
||||||
shift
|
shift
|
||||||
|
|
||||||
#if this script is called with only 2 arguments (so 1 here after the shift), it's for RRC
|
# There are three types parameter for asn1c
|
||||||
#(there may be a better way...)
|
# One is for RRC
|
||||||
if [ $# -eq 1 ]; then
|
# and one is for F1AP
|
||||||
|
# another is for other protocols
|
||||||
|
|
||||||
#asn1c does not work well with extension groups, we need the following fix:
|
if echo ${PROTOCOL_DIR} | grep -q "RRC"; then
|
||||||
# replace [[ by '<name> SEQUENCE {'
|
|
||||||
# and ]] by '} OPTIONAL'
|
|
||||||
#<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just
|
|
||||||
#following another [[ ]]
|
|
||||||
#
|
|
||||||
#this is what the following C program does
|
|
||||||
|
|
||||||
echo generate asnfix.c
|
#asn1c does not work well with extension groups, we need the following fix:
|
||||||
|
# replace [[ by '<name> SEQUENCE {'
|
||||||
|
# and ]] by '} OPTIONAL'
|
||||||
|
#<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just
|
||||||
|
#following another [[ ]]
|
||||||
|
#
|
||||||
|
#this is what the following C program does
|
||||||
|
|
||||||
|
echo generate asnfix.c
|
||||||
|
|
||||||
cat << EOF > asnfix.c
|
cat << EOF > asnfix.c
|
||||||
/* transforms:
|
/* transforms:
|
||||||
@@ -85,29 +91,33 @@ int main(void)
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo compile asnfix.c
|
echo compile asnfix.c
|
||||||
|
|
||||||
gcc -Wall -o asnfix asnfix.c
|
gcc -Wall -o asnfix asnfix.c
|
||||||
|
|
||||||
echo run asnfix on $1
|
echo run asnfix on $1
|
||||||
|
|
||||||
./asnfix < $1 > fixed_grammar.asn
|
./asnfix < $1 > fixed_grammar.asn
|
||||||
|
|
||||||
rm -f asnfix asnfix.c
|
rm -f asnfix asnfix.c
|
||||||
|
|
||||||
echo done with asnfix
|
echo done with asnfix
|
||||||
|
|
||||||
echo running asn1c
|
echo running asn1c
|
||||||
|
|
||||||
asn1c -gen-PER -fcompound-names fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||||
|
|
||||||
rm -f fixed_grammar.asn
|
rm -f fixed_grammar.asn
|
||||||
|
|
||||||
echo asn1c done
|
echo asn1c done
|
||||||
|
|
||||||
|
elif echo ${PROTOCOL_DIR} | grep -q "F1AP"; then
|
||||||
|
|
||||||
|
asn1c -gen-PER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
asn1c -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
asn1c -gen-PER -fcompound-names -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
@@ -1,6 +1,6 @@
|
|||||||
# OAI configuration module
|
# OAI configuration module
|
||||||
|
|
||||||
The configuration module provides an api that other oai components can use to get parameters at init time. It defines a parameter structure, used to describe parameters attributes (for example name and type). The same structure includes a pointer to the variable where the configuration module writes the parameter value, at run time, when calling config_get or config_getlist functions. For each parameter a function to check the value can be specified and pre-defined functions are provided for some common parameter validations (integer in a range or in a list, string in a list). The module also include a mechanism to check that no unknown options have been entered on the command line
|
The configuration module provides an api that other oai components can use to get parameters at init time. It defines a parameter structure, used to describe parameters attributes (for example name and type). The same structure includes a pointer to the variable where the configuration module writes the parameter value, at run time, when calling config_get or config_getlist functions. For each parameter a function to check the value can be specified and pre-defined functions are provided for some common parameter validations (integer in a range or in a list, string in a list). The module also include an api to check that no unknown options have been entered on the command line and a a mechanism to display a help text for suppoted parameters.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
```c
|
```c
|
||||||
configmodule_interface_t *load_configmodule(int argc, char **argv)
|
configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags)
|
||||||
```
|
```
|
||||||
* Parses the command line options, looking for the –O argument
|
* Parses the command line options, looking for the –O argument
|
||||||
* Loads the `libparams_<configsource>.so` (today `libparams_libconfig.so`) shared library
|
* Loads the `libparams_<configsource>.so` (today `libparams_libconfig.so`) shared library
|
||||||
* Looks for `config_<config source>_init` symbol and calls it , passing it an array of string corresponding to the « : » separated strings used in the –O option
|
* Looks for `config_<config source>_init` symbol and calls it , passing it an array of string corresponding to the « : » separated strings used in the –O option
|
||||||
* Looks for `config_<config source>_get`, `config_<config source>_getlist` and `config_<config source>_end` symbols which are the three functions a configuration library should implement. Get and getlist are mandatory, end is optional.
|
* Looks for `config_<config source>_get`, `config_<config source>_getlist` and `config_<config source>_end` symbols which are the three functions a configuration library should implement. Get and getlist are mandatory, end is optional.
|
||||||
* Stores all the necessary information in a `configmodule_interface_t structure`, which is of no use for caller as long as we only use one configuration source.
|
* Stores all the necessary information in a `configmodule_interface_t structure`, which is of no use for caller as long as we only use one configuration source.
|
||||||
|
* if the bit CONFIG_ENABLECMDLINEONLY is set in `initflags` then the module allows parameters to be set only via the command line. This is used for the oai UE.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
void End_configmodule(void)
|
void End_configmodule(void)
|
||||||
|
|||||||
@@ -27,6 +27,63 @@ $ ./lte-softmodem -O libconfig:<config>:dbgl1
|
|||||||
```bash
|
```bash
|
||||||
$ ./lte-uesoftmodem -O cmdlineonly:dbgl1
|
$ ./lte-uesoftmodem -O cmdlineonly:dbgl1
|
||||||
```
|
```
|
||||||
|
To get help on supported parameters you can use specific options:
|
||||||
|
* ---help: print help for command line only parameters and for parameters not defined in a specific section
|
||||||
|
* ---help_< prefix > : print help for parameters defined under the section < prefix >
|
||||||
|
|
||||||
|
```
|
||||||
|
./lte-softmodem -O libconfig:/usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf --help
|
||||||
|
[CONFIG] get parameters from libconfig /usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf , debug flags: 0x00000000
|
||||||
|
.............................................
|
||||||
|
[LIBCONFIG] (root): 19/19 parameters successfully set, (16 to default value)
|
||||||
|
|
||||||
|
-----Help for section (root section) : 019 entries------
|
||||||
|
--rf-config-file: Configuration file for front-end (e.g. LMS7002M)
|
||||||
|
--ulsch-max-errors: set the eNodeB max ULSCH erros
|
||||||
|
--phy-test: test UE phy layer, mac disabled
|
||||||
|
--usim-test: use XOR autentication algo in case of test usim mode
|
||||||
|
--emulate-rf: Emulated RF enabled(disable by defult)
|
||||||
|
--clock: tells hardware to use a clock reference (0:internal, 1:external, 2:gpsdo)
|
||||||
|
--wait-for-sync: Help string not specified
|
||||||
|
--single-thread-enable: Disables single-thread mode in lte-softmodem
|
||||||
|
-C: Set the downlink frequency for all component carriers
|
||||||
|
-a: Channel id offset
|
||||||
|
-d: Enable soft scope and L1 and L2 stats (Xforms)
|
||||||
|
-q: Enable processing timing measurement of lte softmodem on per subframe basis
|
||||||
|
-S: Skip the missed slots/subframes
|
||||||
|
--numerology: adding numerology for 5G
|
||||||
|
--parallel-config: three config for level of parallelism 'PARALLEL_SINGLE_THREAD', 'PARALLEL_RU_L1_SPLIT', or 'PARALLEL_RU_L1_TRX_SPLIT'
|
||||||
|
--worker-config: two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'
|
||||||
|
--nbiot-disable: disable nb-iot, even if defined in config
|
||||||
|
--noS1: Disable s1 interface
|
||||||
|
--nokrnmod: (noS1 only): Use tun instead of namesh module
|
||||||
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
[LIBCONFIG] (root): 4/4 parameters successfully set, (4 to default value)
|
||||||
|
|
||||||
|
-----Help for section (root section) : 004 entries------
|
||||||
|
-R: Enable online log
|
||||||
|
-g: Set the global log level, valide options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))
|
||||||
|
--telnetsrv: Start embedded telnet server
|
||||||
|
--msc: Enable the MSC tracing utility
|
||||||
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
[LIBCONFIG] loader: 2/2 parameters successfully set, (2 to default value)
|
||||||
|
[LIBCONFIG] loader.telnetsrv: 2/2 parameters successfully set, (1 to default value)
|
||||||
|
[LOADER] library libtelnetsrv.so is not loaded: libtelnetsrv.so: cannot open shared object file: No such file or directory
|
||||||
|
Getting ENBSParams
|
||||||
|
[LIBCONFIG] (root): 3/3 parameters successfully set, (1 to default value)
|
||||||
|
|
||||||
|
-----Help for section (root section) : 003 entries------
|
||||||
|
--Asn1_verbosity: Help string not specified
|
||||||
|
--Active_eNBs: Help string not specified
|
||||||
|
--noS1: Help string not specified
|
||||||
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
/usr/local/oai/issue390_configmodule_cmdlinebug/openairinterface5g/common/config/config_cmdline.c:224 config_process_cmdline() Exiting OAI softmodem: [CONFIG] Exiting after displaying help
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
For the lte-softmodem (the eNodeB) The config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level.
|
For the lte-softmodem (the eNodeB) The config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <platform_types.h>
|
#include <platform_types.h>
|
||||||
#include "config_userapi.h"
|
#include "config_userapi.h"
|
||||||
|
#include "../utils/LOG/log.h"
|
||||||
|
|
||||||
int parse_stringlist(paramdef_t *cfgoptions, char *val) {
|
int parse_stringlist(paramdef_t *cfgoptions, char *val) {
|
||||||
char *atoken;
|
char *atoken;
|
||||||
@@ -74,15 +74,15 @@ int processoption(paramdef_t *cfgoptions, char *value) {
|
|||||||
|
|
||||||
if ( value == NULL) {
|
if ( value == NULL) {
|
||||||
if( (cfgoptions->paramflags &PARAMFLAG_BOOL) == 0 ) { /* not a boolean, argument required */
|
if( (cfgoptions->paramflags &PARAMFLAG_BOOL) == 0 ) { /* not a boolean, argument required */
|
||||||
fprintf(stderr,"[CONFIG] command line, option %s requires an argument\n",cfgoptions->optname);
|
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an argument\n",cfgoptions->optname);
|
||||||
exit_fun("[CONFIG] command line parsing fatal error");
|
|
||||||
return 0;
|
|
||||||
} else { /* boolean value option without argument, set value to true*/
|
} else { /* boolean value option without argument, set value to true*/
|
||||||
tmpval = defbool;
|
tmpval = defbool;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(cfgoptions->type) {
|
switch(cfgoptions->type) {
|
||||||
|
char *charptr;
|
||||||
|
|
||||||
case TYPE_STRING:
|
case TYPE_STRING:
|
||||||
if (cfgoptions->numelt == 0 ) {
|
if (cfgoptions->numelt == 0 ) {
|
||||||
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
|
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
|
||||||
@@ -106,14 +106,24 @@ int processoption(paramdef_t *cfgoptions, char *value) {
|
|||||||
case TYPE_UINT8:
|
case TYPE_UINT8:
|
||||||
case TYPE_INT8:
|
case TYPE_INT8:
|
||||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->iptr),sizeof(int32_t));
|
config_check_valptr(cfgoptions, (char **)&(cfgoptions->iptr),sizeof(int32_t));
|
||||||
config_assign_int(cfgoptions,cfgoptions->optname,(int32_t)strtol(tmpval,NULL,0));
|
config_assign_int(cfgoptions,cfgoptions->optname,(int32_t)strtol(tmpval,&charptr,0));
|
||||||
|
|
||||||
|
if( *charptr != 0) {
|
||||||
|
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an integer argument\n",cfgoptions->optname);
|
||||||
|
}
|
||||||
|
|
||||||
optisset=1;
|
optisset=1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_UINT64:
|
case TYPE_UINT64:
|
||||||
case TYPE_INT64:
|
case TYPE_INT64:
|
||||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->i64ptr),sizeof(uint64_t));
|
config_check_valptr(cfgoptions, (char **)&(cfgoptions->i64ptr),sizeof(uint64_t));
|
||||||
*(cfgoptions->i64ptr)=strtoll(tmpval,NULL,0);
|
*(cfgoptions->i64ptr)=strtoll(tmpval,&charptr,0);
|
||||||
|
|
||||||
|
if( *charptr != 0) {
|
||||||
|
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an integer argument\n",cfgoptions->optname);
|
||||||
|
}
|
||||||
|
|
||||||
printf_cmdl("[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*(cfgoptions->i64ptr));
|
printf_cmdl("[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*(cfgoptions->i64ptr));
|
||||||
optisset=1;
|
optisset=1;
|
||||||
break;
|
break;
|
||||||
@@ -124,7 +134,12 @@ int processoption(paramdef_t *cfgoptions, char *value) {
|
|||||||
|
|
||||||
case TYPE_DOUBLE:
|
case TYPE_DOUBLE:
|
||||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->dblptr),sizeof(double));
|
config_check_valptr(cfgoptions, (char **)&(cfgoptions->dblptr),sizeof(double));
|
||||||
*(cfgoptions->dblptr) = strtof(tmpval,NULL);
|
*(cfgoptions->dblptr) = strtof(tmpval,&charptr);
|
||||||
|
|
||||||
|
if( *charptr != 0) {
|
||||||
|
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires a double argument\n",cfgoptions->optname);
|
||||||
|
}
|
||||||
|
|
||||||
printf_cmdl("[CONFIG] %s set to %lf from command line\n", cfgoptions->optname, *(cfgoptions->dblptr));
|
printf_cmdl("[CONFIG] %s set to %lf from command line\n", cfgoptions->optname, *(cfgoptions->dblptr));
|
||||||
optisset=1;
|
optisset=1;
|
||||||
break;
|
break;
|
||||||
@@ -133,7 +148,7 @@ int processoption(paramdef_t *cfgoptions, char *value) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,"[CONFIG] command line, %s type %i not supported\n",cfgoptions->optname, cfgoptions->type);
|
CONFIG_PRINTF_ERROR("[CONFIG] command line, %s type %i not supported\n",cfgoptions->optname, cfgoptions->type);
|
||||||
break;
|
break;
|
||||||
} /* switch on param type */
|
} /* switch on param type */
|
||||||
|
|
||||||
@@ -149,14 +164,16 @@ int processoption(paramdef_t *cfgoptions, char *value) {
|
|||||||
*/
|
*/
|
||||||
int config_check_unknown_cmdlineopt(char *prefix) {
|
int config_check_unknown_cmdlineopt(char *prefix) {
|
||||||
int unknowndetected=0;
|
int unknowndetected=0;
|
||||||
char testprefix[CONFIG_MAXOPTLENGTH]="";
|
char testprefix[CONFIG_MAXOPTLENGTH];
|
||||||
int finalcheck = 0;
|
int finalcheck = 0;
|
||||||
|
memset(testprefix,0,sizeof(testprefix));
|
||||||
|
|
||||||
|
memset(testprefix,0,sizeof(testprefix));
|
||||||
if (prefix != NULL) {
|
if (prefix != NULL) {
|
||||||
if (strcmp(prefix,CONFIG_CHECKALLSECTIONS) == 0)
|
if (strcmp(prefix,CONFIG_CHECKALLSECTIONS) == 0)
|
||||||
finalcheck = 1;
|
finalcheck = 1;
|
||||||
else if (strlen(prefix) > 0) {
|
else if (strlen(prefix) > 0) {
|
||||||
sprintf(testprefix,"--%s.",prefix);
|
sprintf(testprefix,"--%.*s.",CONFIG_MAXOPTLENGTH-4,prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,8 +193,11 @@ int config_check_unknown_cmdlineopt(char *prefix) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf_cmdl("[CONFIG] %i unknown option(s) in command line starting with %s (section %s)\n",
|
if (unknowndetected > 0) {
|
||||||
unknowndetected,testprefix,((prefix==NULL)?"":prefix));
|
CONFIG_PRINTF_ERROR("[CONFIG] %i unknown option(s) in command line starting with %s (section %s)\n",
|
||||||
|
unknowndetected,testprefix,((prefix==NULL)?"":prefix));
|
||||||
|
}
|
||||||
|
|
||||||
return unknowndetected;
|
return unknowndetected;
|
||||||
} /* config_check_unknown_cmdlineopt */
|
} /* config_check_unknown_cmdlineopt */
|
||||||
|
|
||||||
@@ -200,7 +220,7 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
|
|||||||
|
|
||||||
if (pp == NULL || strcasecmp(pp,config_get_if()->argv[i] ) == 0 ) {
|
if (pp == NULL || strcasecmp(pp,config_get_if()->argv[i] ) == 0 ) {
|
||||||
if( prefix == NULL) {
|
if( prefix == NULL) {
|
||||||
config_printhelp(cfgoptions,numoptions);
|
config_printhelp(cfgoptions,numoptions,"(root section)");
|
||||||
|
|
||||||
if ( ! ( CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP)))
|
if ( ! ( CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP)))
|
||||||
exit_fun("[CONFIG] Exiting after displaying help\n");
|
exit_fun("[CONFIG] Exiting after displaying help\n");
|
||||||
@@ -209,8 +229,7 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
|
|||||||
pp=strtok_r(NULL, " ",&tokctx);
|
pp=strtok_r(NULL, " ",&tokctx);
|
||||||
|
|
||||||
if ( prefix != NULL && pp != NULL && strncasecmp(prefix,pp,strlen(pp)) == 0 ) {
|
if ( prefix != NULL && pp != NULL && strncasecmp(prefix,pp,strlen(pp)) == 0 ) {
|
||||||
printf ("Help for %s section:\n",prefix);
|
config_printhelp(cfgoptions,numoptions,prefix);
|
||||||
config_printhelp(cfgoptions,numoptions);
|
|
||||||
|
|
||||||
if ( ! (CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP))) {
|
if ( ! (CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP))) {
|
||||||
fprintf(stderr,"[CONFIG] %s %i section %s:", __FILE__, __LINE__, prefix);
|
fprintf(stderr,"[CONFIG] %s %i section %s:", __FILE__, __LINE__, prefix);
|
||||||
@@ -273,16 +292,5 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
|
|||||||
} /* fin du while */
|
} /* fin du while */
|
||||||
|
|
||||||
printf_cmdl("[CONFIG] %s %i options set from command line\n",((prefix == NULL) ? "(root)":prefix),j);
|
printf_cmdl("[CONFIG] %s %i options set from command line\n",((prefix == NULL) ? "(root)":prefix),j);
|
||||||
|
|
||||||
if ( !(CONFIG_ISFLAGSET( CONFIG_NOCHECKUNKOPT )) ) {
|
|
||||||
i=config_check_unknown_cmdlineopt(prefix);
|
|
||||||
|
|
||||||
if (i > 0) {
|
|
||||||
fprintf(stderr,"[CONFIG] %i unknown options for section %s detected in command line\n",
|
|
||||||
i,((prefix==NULL)?"\"root section\"":prefix));
|
|
||||||
exit_fun(" Exiting after detecting errors in command line \n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return j;
|
return j;
|
||||||
} /* parse_cmdline*/
|
} /* parse_cmdline*/
|
||||||
|
|||||||
@@ -36,12 +36,15 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <platform_types.h>
|
||||||
|
|
||||||
#define CONFIG_LOADCONFIG_MAIN
|
#define CONFIG_LOADCONFIG_MAIN
|
||||||
#include "config_load_configmodule.h"
|
#include "config_load_configmodule.h"
|
||||||
#include "config_userapi.h"
|
#include "config_userapi.h"
|
||||||
|
#include "../utils/LOG/log.h"
|
||||||
#define CONFIG_SHAREDLIBFORMAT "libparams_%s.so"
|
#define CONFIG_SHAREDLIBFORMAT "libparams_%s.so"
|
||||||
|
|
||||||
|
|
||||||
int load_config_sharedlib(configmodule_interface_t *cfgptr) {
|
int load_config_sharedlib(configmodule_interface_t *cfgptr) {
|
||||||
void *lib_handle;
|
void *lib_handle;
|
||||||
char fname[128];
|
char fname[128];
|
||||||
@@ -198,7 +201,7 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( strstr(argv[i], "help_config") != NULL ) {
|
if ( strstr(argv[i], "help_config") != NULL ) {
|
||||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params));
|
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,7 +307,7 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
|
|||||||
if (cfgmode != NULL) free(cfgmode);
|
if (cfgmode != NULL) free(cfgmode);
|
||||||
|
|
||||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params));
|
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME );
|
||||||
// exit(-1);
|
// exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +345,7 @@ void free_configmodule(void) {
|
|||||||
|
|
||||||
if( cfgptr->cfgmode != NULL) free(cfgptr->cfgmode);
|
if( cfgptr->cfgmode != NULL) free(cfgptr->cfgmode);
|
||||||
|
|
||||||
printf ("[CONFIG] free %u config parameter pointers\n",cfgptr->num_cfgP);
|
printf ("[CONFIG] free %i config parameter pointers\n",cfgptr->num_cfgP);
|
||||||
|
|
||||||
for (int i=0; i<cfgptr->num_cfgP; i++) {
|
for (int i=0; i<cfgptr->num_cfgP; i++) {
|
||||||
if ( cfgptr->cfgP[i] != NULL) free(cfgptr->cfgP[i]);
|
if ( cfgptr->cfgP[i] != NULL) free(cfgptr->cfgP[i]);
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
#define CONFIG_PRINTPARAMS 1 // print parameters values while processing
|
#define CONFIG_PRINTPARAMS 1 // print parameters values while processing
|
||||||
#define CONFIG_DEBUGPTR (1<<1) // print memory allocation/free debug messages
|
#define CONFIG_DEBUGPTR (1<<1) // print memory allocation/free debug messages
|
||||||
#define CONFIG_DEBUGCMDLINE (1<<2) // print command line processing messages
|
#define CONFIG_DEBUGCMDLINE (1<<2) // print command line processing messages
|
||||||
#define CONFIG_NOCHECKUNKOPT (1<<3) // disable check unprocessed (so invalid) command line options
|
|
||||||
#define CONFIG_NOABORTONCHKF (1<<4) // disable abort execution when parameter checking function fails
|
#define CONFIG_NOABORTONCHKF (1<<4) // disable abort execution when parameter checking function fails
|
||||||
#define CONFIG_NOEXITONHELP (1<<19) // do not exit after printing help
|
#define CONFIG_NOEXITONHELP (1<<19) // do not exit after printing help
|
||||||
#define CONFIG_HELP (1<<20) // print help message
|
#define CONFIG_HELP (1<<20) // print help message
|
||||||
@@ -109,5 +108,7 @@ extern configmodule_interface_t *cfgptr;
|
|||||||
#define CONFIG_ENABLECMDLINEONLY (1<<1)
|
#define CONFIG_ENABLECMDLINEONLY (1<<1)
|
||||||
extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags);
|
extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags);
|
||||||
extern void end_configmodule(void);
|
extern void end_configmodule(void);
|
||||||
|
#define CONFIG_PRINTF_ERROR(f, x... ) if (isLogInitDone ()) { LOG_E(ENB_APP,f,x);} else {printf(f,x);}; if ( !CONFIG_ISFLAGSET(CONFIG_NOABORTONCHKF) ) exit_fun("exit because configuration failed\n");
|
||||||
|
|
||||||
|
|
||||||
#endif /* INCLUDE_CONFIG_LOADCONFIGMODULE_H */
|
#endif /* INCLUDE_CONFIG_LOADCONFIGMODULE_H */
|
||||||
|
|||||||
@@ -39,15 +39,13 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <platform_types.h>
|
#include <platform_types.h>
|
||||||
#include "config_userapi.h"
|
#include "config_userapi.h"
|
||||||
|
#include "../utils/LOG/log.h"
|
||||||
|
|
||||||
configmodule_interface_t *config_get_if(void) {
|
configmodule_interface_t *config_get_if(void) {
|
||||||
if (cfgptr == NULL) {
|
if (cfgptr == NULL) {
|
||||||
fprintf(stderr,"[CONFIG] %s %d config module not initialized\n",__FILE__, __LINE__);
|
CONFIG_PRINTF_ERROR("[CONFIG] %s %d config module not initialized\n",__FILE__,__LINE__);
|
||||||
exit(-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cfgptr;
|
return cfgptr;
|
||||||
@@ -66,9 +64,8 @@ char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) {
|
|||||||
config_get_if()->numptrs++;
|
config_get_if()->numptrs++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "[CONFIG] %s %d option %s, cannot allocate pointer: %s \n",
|
CONFIG_PRINTF_ERROR("[CONFIG] %s %d option %s, cannot allocate pointer: %s \n",
|
||||||
__FILE__, __LINE__, cfgoptions->optname, strerror(errno));
|
__FILE__, __LINE__, cfgoptions->optname, strerror(errno));
|
||||||
exit(-1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,9 +75,8 @@ char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) {
|
|||||||
if (*ptr != NULL) {
|
if (*ptr != NULL) {
|
||||||
return *ptr;
|
return *ptr;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,"[CONFIG] %s %d option %s, definition error: value pointer is NULL, declared as %i bytes allocated\n",
|
CONFIG_PRINTF_ERROR("[CONFIG] %s %d option %s, definition error: value pointer is NULL, declared as %i bytes allocated\n",
|
||||||
__FILE__, __LINE__,cfgoptions->optname, cfgoptions->numelt);
|
__FILE__, __LINE__,cfgoptions->optname, cfgoptions->numelt);
|
||||||
exit(-1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,8 +91,7 @@ char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) {
|
|||||||
config_get_if()->numptrs++;
|
config_get_if()->numptrs++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf (stderr,"[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
CONFIG_PRINTF_ERROR("[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||||
exit(-1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,8 +152,7 @@ void config_assign_processedint(paramdef_t *cfgoption, int val) {
|
|||||||
if ( cfgoption->processedvalue != NULL) {
|
if ( cfgoption->processedvalue != NULL) {
|
||||||
*(cfgoption->processedvalue) = val;
|
*(cfgoption->processedvalue) = val;
|
||||||
} else {
|
} else {
|
||||||
fprintf (stderr,"[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
CONFIG_PRINTF_ERROR("[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||||
exit(-1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,15 +171,17 @@ int config_get_processedint(paramdef_t *cfgoption) {
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
void config_printhelp(paramdef_t *params,int numparams) {
|
void config_printhelp(paramdef_t *params,int numparams, char *prefix) {
|
||||||
|
printf("\n-----Help for section %-26s: %03i entries------\n",(prefix==NULL)?"(root section)":prefix ,numparams);
|
||||||
|
|
||||||
for (int i=0 ; i<numparams ; i++) {
|
for (int i=0 ; i<numparams ; i++) {
|
||||||
if ( params[i].helpstr != NULL) {
|
printf(" %s%s: %s",
|
||||||
printf("%s%s: %s",
|
(strlen(params[i].optname) <= 1) ? "-" : "--",
|
||||||
(strlen(params[i].optname) <= 1) ? "-" : "--",
|
params[i].optname,
|
||||||
params[i].optname,
|
(params[i].helpstr != NULL)?params[i].helpstr:"Help string not specified\n");
|
||||||
params[i].helpstr);
|
} /* for on params entries */
|
||||||
}
|
|
||||||
}
|
printf("--------------------------------------------------------------------\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
|
int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
|
||||||
@@ -202,11 +198,7 @@ int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (st != 0) {
|
if (st != 0) {
|
||||||
fprintf(stderr,"[CONFIG] config_execcheck: section %s %i parameters with wrong value\n", prefix, -st);
|
CONFIG_PRINTF_ERROR("[CONFIG] config_execcheck: section %s %i parameters with wrong value\n", prefix, -st);
|
||||||
|
|
||||||
if ( CONFIG_ISFLAGSET(CONFIG_NOABORTONCHKF) == 0) {
|
|
||||||
exit_fun("exit because configuration failed\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
@@ -263,6 +255,7 @@ int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams
|
|||||||
for (int i = 0; i < ParamList->numelt; ++i) {
|
for (int i = 0; i < ParamList->numelt; ++i) {
|
||||||
// TODO config_process_cmdline?
|
// TODO config_process_cmdline?
|
||||||
sprintf(cfgpath, "%s.[%i]", newprefix, i);
|
sprintf(cfgpath, "%s.[%i]", newprefix, i);
|
||||||
|
config_process_cmdline(ParamList->paramarray[i],numparams,cfgpath);
|
||||||
config_execcheck(ParamList->paramarray[i], numparams, cfgpath);
|
config_execcheck(ParamList->paramarray[i], numparams, cfgpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ extern "C"
|
|||||||
/* utility functions, to be used by configuration module and/or configuration libraries */
|
/* utility functions, to be used by configuration module and/or configuration libraries */
|
||||||
extern configmodule_interface_t *config_get_if(void);
|
extern configmodule_interface_t *config_get_if(void);
|
||||||
extern char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) ;
|
extern char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) ;
|
||||||
extern void config_printhelp(paramdef_t *,int numparams);
|
extern void config_printhelp(paramdef_t *,int numparams, char *prefix);
|
||||||
extern int config_process_cmdline(paramdef_t *params,int numparams, char *prefix);
|
extern int config_process_cmdline(paramdef_t *params,int numparams, char *prefix);
|
||||||
extern void config_assign_processedint(paramdef_t *cfgoption, int val);
|
extern void config_assign_processedint(paramdef_t *cfgoption, int val);
|
||||||
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
|
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
* except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.openairinterface.org/?page_id=698
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*-------------------------------------------------------------------------------
|
||||||
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
* contact@openairinterface.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file common/ngran_types.h
|
||||||
|
* \brief Definitions for NGRAN node types
|
||||||
|
* \author R. Knopp
|
||||||
|
* \date 2018
|
||||||
|
* \version 0.1
|
||||||
|
* \company Eurecom
|
||||||
|
* \email: knopp@eurecom.fr
|
||||||
|
* \note
|
||||||
|
* \warning
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __NGRAN_TYPES_H__
|
||||||
|
#define __NGRAN_TYPES_H__
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
ngran_eNB = 0,
|
||||||
|
ngran_ng_eNB = 1,
|
||||||
|
ngran_gNB = 2,
|
||||||
|
ngran_eNB_CU = 3,
|
||||||
|
ngran_ng_eNB_CU = 4,
|
||||||
|
ngran_gNB_CU = 5,
|
||||||
|
ngran_eNB_DU = 6,
|
||||||
|
ngran_gNB_DU = 7
|
||||||
|
} ngran_node_t;
|
||||||
|
|
||||||
|
#define NODE_IS_MONOLITHIC(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB || (nOdE_TyPe) == ngran_ng_eNB || (nOdE_TyPe) == ngran_gNB)
|
||||||
|
#define NODE_IS_CU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_CU || (nOdE_TyPe) == ngran_ng_eNB_CU || (nOdE_TyPe) == ngran_gNB_CU)
|
||||||
|
#define NODE_IS_DU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_DU || (nOdE_TyPe) == ngran_gNB_DU)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -39,6 +39,8 @@
|
|||||||
#include "PHY/types.h"
|
#include "PHY/types.h"
|
||||||
#include "PHY/impl_defs_top.h"
|
#include "PHY/impl_defs_top.h"
|
||||||
#include "PHY/impl_defs_lte.h"
|
#include "PHY/impl_defs_lte.h"
|
||||||
|
|
||||||
|
#include "ENB_APP/enb_config.h"
|
||||||
#include "RRC/LTE/rrc_defs.h"
|
#include "RRC/LTE/rrc_defs.h"
|
||||||
#include "flexran_agent_defs.h"
|
#include "flexran_agent_defs.h"
|
||||||
|
|
||||||
@@ -49,7 +51,11 @@
|
|||||||
#include "gtpv1u_eNB_defs.h"
|
#include "gtpv1u_eNB_defs.h"
|
||||||
|
|
||||||
#include "PHY/defs_L1_NB_IoT.h"
|
#include "PHY/defs_L1_NB_IoT.h"
|
||||||
|
|
||||||
#include "RRC/LTE/defs_NB_IoT.h"
|
#include "RRC/LTE/defs_NB_IoT.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/// RAN context config file name
|
/// RAN context config file name
|
||||||
char *config_file_name;
|
char *config_file_name;
|
||||||
|
|||||||
+17
-8
@@ -219,7 +219,6 @@ void log_getconfig(log_t *g_log) {
|
|||||||
paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS];
|
paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS];
|
||||||
paramdef_t logparams_debug[sizeof(log_maskmap)/sizeof(mapping)];
|
paramdef_t logparams_debug[sizeof(log_maskmap)/sizeof(mapping)];
|
||||||
paramdef_t logparams_dump[sizeof(log_maskmap)/sizeof(mapping)];
|
paramdef_t logparams_dump[sizeof(log_maskmap)/sizeof(mapping)];
|
||||||
CONFIG_SETRTFLAG(CONFIG_NOCHECKUNKOPT);
|
|
||||||
int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX);
|
int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX);
|
||||||
|
|
||||||
if (ret <0) {
|
if (ret <0) {
|
||||||
@@ -304,9 +303,9 @@ void log_getconfig(log_t *g_log) {
|
|||||||
logparams_dump[i].numelt = 0;
|
logparams_dump[i].numelt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
|
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
|
||||||
CONFIG_CLEARRTFLAG(CONFIG_NOCHECKUNKOPT);
|
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
|
||||||
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
|
config_check_unknown_cmdlineopt(CONFIG_STRING_LOG_PREFIX);
|
||||||
|
|
||||||
/* set the debug mask according to the debug parameters values */
|
/* set the debug mask according to the debug parameters values */
|
||||||
for (int i=0; log_maskmap[i].name != NULL ; i++) {
|
for (int i=0; log_maskmap[i].name != NULL ; i++) {
|
||||||
@@ -386,7 +385,6 @@ int logInit (void) {
|
|||||||
register_log_component("OCG","",OCG);
|
register_log_component("OCG","",OCG);
|
||||||
register_log_component("PERF","",PERF);
|
register_log_component("PERF","",PERF);
|
||||||
register_log_component("OIP","",OIP);
|
register_log_component("OIP","",OIP);
|
||||||
register_log_component("CLI","",CLI);
|
|
||||||
register_log_component("MSC","log",MSC);
|
register_log_component("MSC","log",MSC);
|
||||||
register_log_component("OCM","log",OCM);
|
register_log_component("OCM","log",OCM);
|
||||||
register_log_component("HW","",HW);
|
register_log_component("HW","",HW);
|
||||||
@@ -395,20 +393,25 @@ int logInit (void) {
|
|||||||
register_log_component("mRAL","",RAL_UE);
|
register_log_component("mRAL","",RAL_UE);
|
||||||
register_log_component("ENB_APP","log",ENB_APP);
|
register_log_component("ENB_APP","log",ENB_APP);
|
||||||
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
|
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
|
||||||
|
register_log_component("PROTO_AGENT","log",PROTO_AGENT);
|
||||||
register_log_component("TMR","",TMR);
|
register_log_component("TMR","",TMR);
|
||||||
register_log_component("USIM","txt",USIM);
|
register_log_component("USIM","txt",USIM);
|
||||||
register_log_component("SIM","txt",SIM);
|
register_log_component("SIM","txt",SIM);
|
||||||
/* following log component are used for the localization*/
|
/* following log component are used for the localization*/
|
||||||
|
/* following log component are used for the localization*/
|
||||||
register_log_component("LOCALIZE","log",LOCALIZE);
|
register_log_component("LOCALIZE","log",LOCALIZE);
|
||||||
register_log_component("NAS","log",NAS);
|
register_log_component("NAS","log",NAS);
|
||||||
register_log_component("UDP","",UDP_);
|
register_log_component("UDP","",UDP_);
|
||||||
register_log_component("GTPV1U","",GTPU);
|
register_log_component("GTPV1U","",GTPU);
|
||||||
register_log_component("S1AP","",S1AP);
|
register_log_component("S1AP","",S1AP);
|
||||||
|
register_log_component("F1AP","",F1AP);
|
||||||
register_log_component("X2AP","",X2AP);
|
register_log_component("X2AP","",X2AP);
|
||||||
register_log_component("SCTP","",SCTP);
|
register_log_component("SCTP","",SCTP);
|
||||||
register_log_component("X2AP","",X2AP);
|
register_log_component("X2AP","",X2AP);
|
||||||
register_log_component("LOADER","log",LOADER);
|
register_log_component("LOADER","log",LOADER);
|
||||||
register_log_component("ASN","log",ASN);
|
register_log_component("ASN","log",ASN);
|
||||||
|
register_log_component("NFAPI_PNF","log",NFAPI_PNF);
|
||||||
|
register_log_component("NFAPI_VNF","log",NFAPI_VNF);
|
||||||
|
|
||||||
for (int i=0 ; log_level_names[i].name != NULL ; i++)
|
for (int i=0 ; log_level_names[i].name != NULL ; i++)
|
||||||
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
|
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
|
||||||
@@ -439,7 +442,7 @@ char *log_getthreadname(char *threadname, int bufsize) {
|
|||||||
|
|
||||||
static int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
|
static int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
|
||||||
char threadname[PR_SET_NAME];
|
char threadname[PR_SET_NAME];
|
||||||
return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s",
|
return snprintf(log_buffer, buffsize, "%s%s[%s]%c %s %s%s",
|
||||||
log_level_highlight_end[level],
|
log_level_highlight_end[level],
|
||||||
( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
|
( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
|
||||||
g_log->log_component[comp].name,
|
g_log->log_component[comp].name,
|
||||||
@@ -453,11 +456,17 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le
|
|||||||
char log_buffer[MAX_LOG_TOTAL];
|
char log_buffer[MAX_LOG_TOTAL];
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
log_header(log_buffer,MAX_LOG_TOTAL ,comp, level,format);
|
log_header(log_buffer,MAX_LOG_TOTAL,comp, level,format);
|
||||||
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
|
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args ) {
|
||||||
|
char log_buffer[MAX_LOG_TOTAL];
|
||||||
|
log_header(log_buffer,MAX_LOG_TOTAL,comp, level,format);
|
||||||
|
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
|
||||||
|
}
|
||||||
|
|
||||||
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... ) {
|
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... ) {
|
||||||
va_list args;
|
va_list args;
|
||||||
char *wbuf;
|
char *wbuf;
|
||||||
@@ -475,7 +484,7 @@ void log_dump(int component, void *buffer, int buffsize,int datatype, const char
|
|||||||
|
|
||||||
if (wbuf != NULL) {
|
if (wbuf != NULL) {
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
int pos=log_header(wbuf,MAX_LOG_TOTAL ,component, OAILOG_INFO,"");
|
int pos=log_header(wbuf,MAX_LOG_TOTAL,component, OAILOG_INFO,"");
|
||||||
int pos2=vsprintf(wbuf+pos,format, args);
|
int pos2=vsprintf(wbuf+pos,format, args);
|
||||||
pos=pos+pos2;
|
pos=pos+pos2;
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|||||||
+11
-2
@@ -145,6 +145,7 @@ extern "C" {
|
|||||||
#define DEBUG_CTRLSOCKET (1<<10)
|
#define DEBUG_CTRLSOCKET (1<<10)
|
||||||
#define DEBUG_SECURITY (1<<11)
|
#define DEBUG_SECURITY (1<<11)
|
||||||
#define DEBUG_NAS (1<<12)
|
#define DEBUG_NAS (1<<12)
|
||||||
|
#define DEBUG_RLC (1<<13)
|
||||||
#define UE_TIMING (1<<20)
|
#define UE_TIMING (1<<20)
|
||||||
|
|
||||||
|
|
||||||
@@ -162,6 +163,7 @@ extern "C" {
|
|||||||
{"CTRLSOCKET", DEBUG_CTRLSOCKET},\
|
{"CTRLSOCKET", DEBUG_CTRLSOCKET},\
|
||||||
{"SECURITY", DEBUG_SECURITY},\
|
{"SECURITY", DEBUG_SECURITY},\
|
||||||
{"NAS", DEBUG_NAS},\
|
{"NAS", DEBUG_NAS},\
|
||||||
|
{"RLC", DEBUG_RLC},\
|
||||||
{"UE_TIMING", UE_TIMING},\
|
{"UE_TIMING", UE_TIMING},\
|
||||||
{NULL,-1}\
|
{NULL,-1}\
|
||||||
}
|
}
|
||||||
@@ -196,13 +198,13 @@ typedef enum {
|
|||||||
NAS,
|
NAS,
|
||||||
PERF,
|
PERF,
|
||||||
OIP,
|
OIP,
|
||||||
CLI,
|
|
||||||
MSC,
|
MSC,
|
||||||
OCM,
|
OCM,
|
||||||
UDP_,
|
UDP_,
|
||||||
GTPU,
|
GTPU,
|
||||||
SPGW,
|
SPGW,
|
||||||
S1AP,
|
S1AP,
|
||||||
|
F1AP,
|
||||||
SCTP,
|
SCTP,
|
||||||
HW,
|
HW,
|
||||||
OSA,
|
OSA,
|
||||||
@@ -213,9 +215,13 @@ typedef enum {
|
|||||||
TMR,
|
TMR,
|
||||||
USIM,
|
USIM,
|
||||||
LOCALIZE,
|
LOCALIZE,
|
||||||
|
PROTO_AGENT,
|
||||||
|
F1U,
|
||||||
X2AP,
|
X2AP,
|
||||||
LOADER,
|
LOADER,
|
||||||
ASN,
|
ASN,
|
||||||
|
NFAPI_VNF,
|
||||||
|
NFAPI_PNF,
|
||||||
MAX_LOG_PREDEF_COMPONENTS,
|
MAX_LOG_PREDEF_COMPONENTS,
|
||||||
}
|
}
|
||||||
comp_name_t;
|
comp_name_t;
|
||||||
@@ -284,6 +290,7 @@ extern "C" {
|
|||||||
int logInit (void);
|
int logInit (void);
|
||||||
int isLogInitDone (void);
|
int isLogInitDone (void);
|
||||||
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
|
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
|
||||||
|
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args );
|
||||||
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... );
|
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... );
|
||||||
int set_log(int component, int level);
|
int set_log(int component, int level);
|
||||||
void set_glog(int level);
|
void set_glog(int level);
|
||||||
@@ -345,6 +352,8 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define LOG_OPTIONS_IDX 2
|
#define LOG_OPTIONS_IDX 2
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------------*/
|
||||||
/** @defgroup _debugging debugging macros
|
/** @defgroup _debugging debugging macros
|
||||||
* @ingroup _macro
|
* @ingroup _macro
|
||||||
@@ -361,9 +370,9 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
|||||||
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||||
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
|
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
|
||||||
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
|
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
|
||||||
|
# define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0)
|
||||||
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
|
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
|
||||||
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
||||||
# define nfapi_log(FILE, FNC, LN, COMP, LVL, F...) do { if (T_stdout) { logRecord_mt(__FILE__, __FUNCTION__, __LINE__,COMP, LVL, F) ;}} while (0) /* */
|
|
||||||
/* bitmask dependant macros, to isolate debugging code */
|
/* bitmask dependant macros, to isolate debugging code */
|
||||||
# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
|
# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
|
||||||
|
|
||||||
|
|||||||
+97
-67
@@ -12,15 +12,17 @@
|
|||||||
#include "common/config/config_userapi.h"
|
#include "common/config/config_userapi.h"
|
||||||
|
|
||||||
#define QUIT(x) do { \
|
#define QUIT(x) do { \
|
||||||
printf("T tracer: QUIT: %s\n", x); \
|
printf("T tracer: QUIT: %s\n", x); \
|
||||||
exit(1); \
|
exit(1); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* array used to activate/disactivate a log */
|
/* array used to activate/disactivate a log */
|
||||||
static int T_IDs[T_NUMBER_OF_IDS];
|
static int T_IDs[T_NUMBER_OF_IDS];
|
||||||
int *T_active = T_IDs;
|
int *T_active = T_IDs;
|
||||||
|
|
||||||
int T_stdout = 1;
|
int T_stdout = 1;
|
||||||
|
|
||||||
|
|
||||||
static int T_socket;
|
static int T_socket;
|
||||||
|
|
||||||
/* T_cache
|
/* T_cache
|
||||||
@@ -32,125 +34,159 @@ volatile int *T_freelist_head = &_T_freelist_head;
|
|||||||
T_cache_t *T_cache;
|
T_cache_t *T_cache;
|
||||||
|
|
||||||
#if BASIC_SIMULATOR
|
#if BASIC_SIMULATOR
|
||||||
/* global variables used by T_GET_SLOT, see in T.h */
|
/* global variables used by T_GET_SLOT, see in T.h */
|
||||||
volatile uint64_t T_next_id;
|
volatile uint64_t T_next_id;
|
||||||
volatile uint64_t T_active_id;
|
volatile uint64_t T_active_id;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void get_message(int s)
|
static void get_message(int s) {
|
||||||
{
|
|
||||||
char t;
|
char t;
|
||||||
int l;
|
int l;
|
||||||
int id;
|
int id;
|
||||||
int is_on;
|
int is_on;
|
||||||
|
|
||||||
if (read(s, &t, 1) != 1) QUIT("get_message fails");
|
if (read(s, &t, 1) != 1) QUIT("get_message fails");
|
||||||
printf("T tracer: got mess %d\n", t);
|
|
||||||
|
printf("T tracer: got mess %d\n", t);
|
||||||
|
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case 0:
|
case 0:
|
||||||
/* toggle all those IDs */
|
|
||||||
/* optimze? (too much syscalls) */
|
/* toggle all those IDs */
|
||||||
if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
|
/* optimze? (too much syscalls) */
|
||||||
while (l) {
|
if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
|
||||||
if (read(s, &id, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
|
|
||||||
T_IDs[id] = 1 - T_IDs[id];
|
while (l) {
|
||||||
l--;
|
if (read(s, &id, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
|
||||||
}
|
|
||||||
break;
|
T_IDs[id] = 1 - T_IDs[id];
|
||||||
case 1:
|
l--;
|
||||||
/* set IDs as given */
|
}
|
||||||
/* optimize? */
|
|
||||||
if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
|
break;
|
||||||
id = 0;
|
|
||||||
while (l) {
|
case 1:
|
||||||
if (read(s, &is_on, sizeof(int)) != sizeof(int))
|
|
||||||
QUIT("get_message fails");
|
/* set IDs as given */
|
||||||
T_IDs[id] = is_on;
|
/* optimize? */
|
||||||
id++;
|
if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
|
||||||
l--;
|
|
||||||
}
|
id = 0;
|
||||||
break;
|
|
||||||
case 2: break; /* do nothing, this message is to wait for local tracer */
|
while (l) {
|
||||||
|
if (read(s, &is_on, sizeof(int)) != sizeof(int))
|
||||||
|
QUIT("get_message fails");
|
||||||
|
|
||||||
|
T_IDs[id] = is_on;
|
||||||
|
id++;
|
||||||
|
l--;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
break; /* do nothing, this message is to wait for local tracer */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *T_receive_thread(void *_)
|
static void *T_receive_thread(void *_) {
|
||||||
{
|
|
||||||
while (1) get_message(T_socket);
|
while (1) get_message(T_socket);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void new_thread(void *(*f)(void *), void *data)
|
static void new_thread(void *(*f)(void *), void *data) {
|
||||||
{
|
|
||||||
pthread_t t;
|
pthread_t t;
|
||||||
pthread_attr_t att;
|
pthread_attr_t att;
|
||||||
|
|
||||||
if (pthread_attr_init(&att))
|
if (pthread_attr_init(&att)) {
|
||||||
{ fprintf(stderr, "pthread_attr_init err\n"); exit(1); }
|
fprintf(stderr, "pthread_attr_init err\n");
|
||||||
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED))
|
exit(1);
|
||||||
{ fprintf(stderr, "pthread_attr_setdetachstate err\n"); exit(1); }
|
}
|
||||||
if (pthread_create(&t, &att, f, data))
|
|
||||||
{ fprintf(stderr, "pthread_create err\n"); exit(1); }
|
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
|
||||||
if (pthread_attr_destroy(&att))
|
fprintf(stderr, "pthread_attr_setdetachstate err\n");
|
||||||
{ fprintf(stderr, "pthread_attr_destroy err\n"); exit(1); }
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_create(&t, &att, f, data)) {
|
||||||
|
fprintf(stderr, "pthread_create err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_attr_destroy(&att)) {
|
||||||
|
fprintf(stderr, "pthread_attr_destroy err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* defined in local_tracer.c */
|
/* defined in local_tracer.c */
|
||||||
void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
||||||
int local_socket, void *shm_array);
|
int local_socket, void *shm_array);
|
||||||
|
|
||||||
/* We monitor the tracee and the local tracer processes.
|
/* We monitor the tracee and the local tracer processes.
|
||||||
* When one dies we forcefully kill the other.
|
* When one dies we forcefully kill the other.
|
||||||
*/
|
*/
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
static void monitor_and_kill(int child1, int child2)
|
static void monitor_and_kill(int child1, int child2) {
|
||||||
{
|
|
||||||
int child;
|
int child;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
child = wait(&status);
|
child = wait(&status);
|
||||||
|
|
||||||
if (child == -1) perror("wait");
|
if (child == -1) perror("wait");
|
||||||
|
|
||||||
kill(child1, SIGKILL);
|
kill(child1, SIGKILL);
|
||||||
kill(child2, SIGKILL);
|
kill(child2, SIGKILL);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void T_init(int remote_port, int wait_for_tracer, int dont_fork)
|
void T_init(int remote_port, int wait_for_tracer, int dont_fork) {
|
||||||
{
|
|
||||||
int socket_pair[2];
|
int socket_pair[2];
|
||||||
int s;
|
int s;
|
||||||
int child1, child2;
|
int child1, child2;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair))
|
if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair)) {
|
||||||
{ perror("socketpair"); abort(); }
|
perror("socketpair");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
/* setup shared memory */
|
/* setup shared memory */
|
||||||
T_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t),
|
T_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t),
|
||||||
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
|
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
|
||||||
if (T_cache == MAP_FAILED)
|
|
||||||
{ perror("mmap"); abort(); }
|
if (T_cache == MAP_FAILED) {
|
||||||
|
perror("mmap");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
/* let's garbage the memory to catch some potential problems
|
/* let's garbage the memory to catch some potential problems
|
||||||
* (think multiprocessor sync issues, barriers, etc.)
|
* (think multiprocessor sync issues, barriers, etc.)
|
||||||
*/
|
*/
|
||||||
memset(T_cache, 0x55, T_CACHE_SIZE * sizeof(T_cache_t));
|
memset(T_cache, 0x55, T_CACHE_SIZE * sizeof(T_cache_t));
|
||||||
|
|
||||||
for (i = 0; i < T_CACHE_SIZE; i++) T_cache[i].busy = 0;
|
for (i = 0; i < T_CACHE_SIZE; i++) T_cache[i].busy = 0;
|
||||||
|
|
||||||
/* child1 runs the local tracer and child2 (or main) runs the tracee */
|
/* child1 runs the local tracer and child2 (or main) runs the tracee */
|
||||||
|
child1 = fork();
|
||||||
|
|
||||||
|
if (child1 == -1) abort();
|
||||||
|
|
||||||
child1 = fork(); if (child1 == -1) abort();
|
|
||||||
if (child1 == 0) {
|
if (child1 == 0) {
|
||||||
close(socket_pair[1]);
|
close(socket_pair[1]);
|
||||||
T_local_tracer_main(remote_port, wait_for_tracer, socket_pair[0],
|
T_local_tracer_main(remote_port, wait_for_tracer, socket_pair[0],
|
||||||
T_cache);
|
T_cache);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
close(socket_pair[0]);
|
close(socket_pair[0]);
|
||||||
|
|
||||||
if (dont_fork == 0) {
|
if (dont_fork == 0) {
|
||||||
child2 = fork(); if (child2 == -1) abort();
|
child2 = fork();
|
||||||
|
|
||||||
|
if (child2 == -1) abort();
|
||||||
|
|
||||||
if (child2 != 0) {
|
if (child2 != 0) {
|
||||||
close(socket_pair[1]);
|
close(socket_pair[1]);
|
||||||
munmap(T_cache, T_CACHE_SIZE * sizeof(T_cache_t));
|
munmap(T_cache, T_CACHE_SIZE * sizeof(T_cache_t));
|
||||||
@@ -161,27 +197,21 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
|
|||||||
s = socket_pair[1];
|
s = socket_pair[1];
|
||||||
/* wait for first message - initial list of active T events */
|
/* wait for first message - initial list of active T events */
|
||||||
get_message(s);
|
get_message(s);
|
||||||
|
|
||||||
T_socket = s;
|
T_socket = s;
|
||||||
|
|
||||||
new_thread(T_receive_thread, NULL);
|
new_thread(T_receive_thread, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void T_Config_Init(void)
|
void T_Config_Init(void) {
|
||||||
{
|
int T_port=TTRACER_DEFAULT_PORTNUM; /* by default we wait for the tracer */
|
||||||
int T_port; /* by default we wait for the tracer */
|
int T_nowait=0; /* default port to listen to to wait for the tracer */
|
||||||
int T_nowait; /* default port to listen to to wait for the tracer */
|
int T_dont_fork=0; /* default is to fork, see 'T_init' to understand */
|
||||||
int T_dont_fork; /* default is to fork, see 'T_init' to understand */
|
|
||||||
|
|
||||||
paramdef_t ttraceparams[] = CMDLINE_TTRACEPARAMS_DESC;
|
paramdef_t ttraceparams[] = CMDLINE_TTRACEPARAMS_DESC;
|
||||||
|
|
||||||
/* for a cleaner config file, TTracer params should be defined in a
|
/* for a cleaner config file, TTracer params should be defined in a
|
||||||
* specific section...
|
* specific section...
|
||||||
*/
|
*/
|
||||||
config_get(ttraceparams,
|
config_get(ttraceparams,
|
||||||
sizeof(ttraceparams) / sizeof(paramdef_t),
|
sizeof(ttraceparams) / sizeof(paramdef_t),
|
||||||
TTRACER_CONFIG_PREFIX);
|
TTRACER_CONFIG_PREFIX);
|
||||||
|
|
||||||
/* compatibility: look for TTracer command line options in root section */
|
/* compatibility: look for TTracer command line options in root section */
|
||||||
config_process_cmdline(ttraceparams,
|
config_process_cmdline(ttraceparams,
|
||||||
sizeof(ttraceparams) / sizeof(paramdef_t),
|
sizeof(ttraceparams) / sizeof(paramdef_t),
|
||||||
|
|||||||
+41
-40
@@ -8,7 +8,7 @@
|
|||||||
#include "T_defs.h"
|
#include "T_defs.h"
|
||||||
|
|
||||||
#ifdef T_SEND_TIME
|
#ifdef T_SEND_TIME
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* T message IDs */
|
/* T message IDs */
|
||||||
@@ -76,13 +76,13 @@
|
|||||||
T_BUFFER_MAX - T_LOCAL_size, T_PUT_printf_deref x); \
|
T_BUFFER_MAX - T_LOCAL_size, T_PUT_printf_deref x); \
|
||||||
if (T_PUT_len < 0) { \
|
if (T_PUT_len < 0) { \
|
||||||
printf("%s:%d:%s: you can't read this, or can you?", \
|
printf("%s:%d:%s: you can't read this, or can you?", \
|
||||||
__FILE__, __LINE__, __FUNCTION__); \
|
__FILE__, __LINE__, __FUNCTION__); \
|
||||||
abort(); \
|
abort(); \
|
||||||
} \
|
} \
|
||||||
if (T_PUT_len >= T_BUFFER_MAX - T_LOCAL_size) { \
|
if (T_PUT_len >= T_BUFFER_MAX - T_LOCAL_size) { \
|
||||||
printf("%s:%d:%s: cannot put argument %d in T macro, not enough space" \
|
printf("%s:%d:%s: cannot put argument %d in T macro, not enough space" \
|
||||||
", consider increasing T_BUFFER_MAX (%d)\n", \
|
", consider increasing T_BUFFER_MAX (%d)\n", \
|
||||||
__FILE__, __LINE__, __FUNCTION__, argnum, T_BUFFER_MAX); \
|
__FILE__, __LINE__, __FUNCTION__, argnum, T_BUFFER_MAX); \
|
||||||
abort(); \
|
abort(); \
|
||||||
} \
|
} \
|
||||||
T_LOCAL_size += T_PUT_len + 1; \
|
T_LOCAL_size += T_PUT_len + 1; \
|
||||||
@@ -97,9 +97,9 @@ struct T_header;
|
|||||||
/* T macro tricks */
|
/* T macro tricks */
|
||||||
extern int T_stdout;
|
extern int T_stdout;
|
||||||
#define TN(...) TN_N(__VA_ARGS__,33,32,31,30,29,28,27,26,25,24,23,22,21,\
|
#define TN(...) TN_N(__VA_ARGS__,33,32,31,30,29,28,27,26,25,24,23,22,21,\
|
||||||
20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)(__VA_ARGS__)
|
20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)(__VA_ARGS__)
|
||||||
#define TN_N(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,\
|
#define TN_N(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,\
|
||||||
n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n,...) T##n
|
n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n,...) T##n
|
||||||
#define T(...) do { if (T_stdout == 0) TN(__VA_ARGS__); } while (0)
|
#define T(...) do { if (T_stdout == 0) TN(__VA_ARGS__); } while (0)
|
||||||
|
|
||||||
/* type used to send arbitrary buffer data */
|
/* type used to send arbitrary buffer data */
|
||||||
@@ -119,30 +119,30 @@ extern int *T_active;
|
|||||||
*/
|
*/
|
||||||
#if BASIC_SIMULATOR
|
#if BASIC_SIMULATOR
|
||||||
# define T_GET_SLOT \
|
# define T_GET_SLOT \
|
||||||
do { \
|
do { \
|
||||||
extern volatile uint64_t T_next_id; \
|
extern volatile uint64_t T_next_id; \
|
||||||
extern volatile uint64_t T_active_id; \
|
extern volatile uint64_t T_active_id; \
|
||||||
uint64_t id; \
|
uint64_t id; \
|
||||||
/* get a ticket */ \
|
/* get a ticket */ \
|
||||||
id = __sync_fetch_and_add(&T_next_id, 1); \
|
id = __sync_fetch_and_add(&T_next_id, 1); \
|
||||||
/* wait for our turn */ \
|
/* wait for our turn */ \
|
||||||
while (id != __sync_fetch_and_add(&T_active_id, 0)) /* busy wait */; \
|
while (id != __sync_fetch_and_add(&T_active_id, 0)) /* busy wait */; \
|
||||||
/* this is our turn, try to acquire the slot until it's free */ \
|
/* this is our turn, try to acquire the slot until it's free */ \
|
||||||
do { \
|
do { \
|
||||||
T_LOCAL_busy = __sync_fetch_and_or(&T_cache[T_LOCAL_slot].busy, 0x01); \
|
T_LOCAL_busy = __sync_fetch_and_or(&T_cache[T_LOCAL_slot].busy, 0x01); \
|
||||||
if (T_LOCAL_busy & 0x01) usleep(100); \
|
if (T_LOCAL_busy & 0x01) usleep(100); \
|
||||||
} while (T_LOCAL_busy & 0x01); \
|
} while (T_LOCAL_busy & 0x01); \
|
||||||
/* check that there are still some tickets */ \
|
/* check that there are still some tickets */ \
|
||||||
if (__sync_fetch_and_add(&T_active_id, 0) == 0xffffffffffffffff) { \
|
if (__sync_fetch_and_add(&T_active_id, 0) == 0xffffffffffffffff) { \
|
||||||
printf("T: reached the end of times, bye...\n"); \
|
printf("T: reached the end of times, bye...\n"); \
|
||||||
abort(); \
|
abort(); \
|
||||||
} \
|
} \
|
||||||
/* free our ticket, which signals the next waiter that it's its turn */ \
|
/* free our ticket, which signals the next waiter that it's its turn */ \
|
||||||
(void)__sync_fetch_and_add(&T_active_id, 1); \
|
(void)__sync_fetch_and_add(&T_active_id, 1); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
# define T_GET_SLOT \
|
# define T_GET_SLOT \
|
||||||
T_LOCAL_busy = __sync_fetch_and_or(&T_cache[T_LOCAL_slot].busy, 0x01);
|
T_LOCAL_busy = __sync_fetch_and_or(&T_cache[T_LOCAL_slot].busy, 0x01);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* used at header of Tn, allocates buffer */
|
/* used at header of Tn, allocates buffer */
|
||||||
@@ -172,8 +172,8 @@ extern int *T_active;
|
|||||||
#define T_CHECK_SIZE(len, argnum) \
|
#define T_CHECK_SIZE(len, argnum) \
|
||||||
if (T_LOCAL_size + (len) > T_BUFFER_MAX) { \
|
if (T_LOCAL_size + (len) > T_BUFFER_MAX) { \
|
||||||
printf("%s:%d:%s: cannot put argument %d in T macro, not enough space" \
|
printf("%s:%d:%s: cannot put argument %d in T macro, not enough space" \
|
||||||
", consider increasing T_BUFFER_MAX (%d)\n", \
|
", consider increasing T_BUFFER_MAX (%d)\n", \
|
||||||
__FILE__, __LINE__, __FUNCTION__, argnum, T_BUFFER_MAX); \
|
__FILE__, __LINE__, __FUNCTION__, argnum, T_BUFFER_MAX); \
|
||||||
abort(); \
|
abort(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -598,20 +598,21 @@ extern int *T_active;
|
|||||||
|
|
||||||
|
|
||||||
#define TTRACER_CONFIG_PREFIX "TTracer"
|
#define TTRACER_CONFIG_PREFIX "TTracer"
|
||||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* configuration parameters for TTRACE utility */
|
/* configuration parameters for TTRACE utility */
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
#define TTRACER_DEFAULT_PORTNUM 2021
|
||||||
#define CMDLINE_TTRACEPARAMS_DESC { \
|
#define CMDLINE_TTRACEPARAMS_DESC { \
|
||||||
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:2021, TYPE_INT, 0}, \
|
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:TTRACER_DEFAULT_PORTNUM, TYPE_INT, 0},\
|
||||||
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0}, \
|
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0},\
|
||||||
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:0, TYPE_INT, 0}, \
|
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:0, TYPE_INT, 0},\
|
||||||
{"T_stdout", CONFIG_HLP_STDOUT, PARAMFLAG_BOOL, iptr:&T_stdout, defintval:1, TYPE_INT, 0}, \
|
{"T_stdout", CONFIG_HLP_STDOUT, PARAMFLAG_BOOL, iptr:&T_stdout, defintval:1, TYPE_INT, 0},\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* log on stdout */
|
/* log on stdout */
|
||||||
void T_init(int remote_port, int wait_for_tracer, int dont_fork);
|
void T_init(int remote_port, int wait_for_tracer, int dont_fork);
|
||||||
void T_Config_Init(void);
|
void T_Config_Init(void);
|
||||||
#else /* T_TRACER */
|
#else /* T_TRACER */
|
||||||
|
|||||||
@@ -629,7 +629,7 @@ ID = LEGACY_OCM_DEBUG
|
|||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
ID = LEGACY_OCM_TRACE
|
ID = LEGACY_OCM_TRACE
|
||||||
DESC = OCM legacy logs - trace level
|
DESC = OCM legacy logs - trace level
|
||||||
GROUP = ALL:LEGACY_OCM:LEGACY_GROUP_TRACE:LEGACY
|
OGROUP = ALL:LEGACY_OCM:LEGACY_GROUP_TRACE:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
|
|
||||||
ID = LEGACY_OIP_INFO
|
ID = LEGACY_OIP_INFO
|
||||||
@@ -800,6 +800,47 @@ ID = LEGACY_SIM_TRACE
|
|||||||
GROUP = ALL:LEGACY_SIM:LEGACY_GROUP_TRACE:LEGACY
|
GROUP = ALL:LEGACY_SIM:LEGACY_GROUP_TRACE:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_NFAPI_VNF_INFO
|
||||||
|
DESC = NFAPI_VNF legacy logs - info level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_INFO:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_VNF_ERROR
|
||||||
|
DESC = NFAPI_VNF legacy logs - error level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_ERROR:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_VNF_WARNING
|
||||||
|
DESC = NFAPI_VNF legacy logs - warning level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_WARNING:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_VNF_DEBUG
|
||||||
|
DESC = NFAPI_VNF legacy logs - debug level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_VNF_TRACE
|
||||||
|
DESC = NFAPI_VNF legacy logs - trace level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_TRACE:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_NFAPI_PNF_INFO
|
||||||
|
DESC = NFAPI_PNF legacy logs - info level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_INFO:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_PNF_ERROR
|
||||||
|
DESC = NFAPI_PNF legacy logs - error level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_ERROR:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_PNF_WARNING
|
||||||
|
DESC = NFAPI_PNF legacy logs - warning level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_WARNING:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_PNF_DEBUG
|
||||||
|
DESC = NFAPI_PNF legacy logs - debug level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_NFAPI_PNF_TRACE
|
||||||
|
DESC = NFAPI_PNF legacy logs - trace level
|
||||||
|
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_TRACE:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
# this is a bad hack but I won't fix (function util_print_hex_octets
|
# this is a bad hack but I won't fix (function util_print_hex_octets
|
||||||
# in openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
|
# in openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
|
||||||
# does funky things with the LOG_x macros but we work on the C pre-processor
|
# does funky things with the LOG_x macros but we work on the C pre-processor
|
||||||
@@ -845,26 +886,62 @@ ID = LEGACY_componentP_TRACE
|
|||||||
GROUP = ALL:LEGACY_componentP:LEGACY_GROUP_TRACE:LEGACY
|
GROUP = ALL:LEGACY_componentP:LEGACY_GROUP_TRACE:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
|
|
||||||
#needed?
|
|
||||||
ID = LEGACY_CLI_INFO
|
|
||||||
DESC = CLI legacy logs - info level
|
ID = LEGACY_PROTO_AGENT_DEBUG
|
||||||
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_INFO:LEGACY
|
DESC = PROTO AGENT DEBUG LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
ID = LEGACY_CLI_ERROR
|
|
||||||
DESC = CLI legacy logs - error level
|
ID = LEGACY_PROTO_AGENT_INFO
|
||||||
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_ERROR:LEGACY
|
DESC = PROTO AGENT INFO LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_INFO:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
ID = LEGACY_CLI_WARNING
|
|
||||||
DESC = CLI legacy logs - warning level
|
ID = LEGACY_PROTO_AGENT_WARNING
|
||||||
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_WARNING:LEGACY
|
DESC = PROTO AGENT WARNING LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_WARNING:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
ID = LEGACY_CLI_DEBUG
|
|
||||||
DESC = CLI legacy logs - debug level
|
ID = LEGACY_PROTO_AGENT_ERROR
|
||||||
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_DEBUG:LEGACY
|
DESC = PROTO AGENT ERROR LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_ERROR:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
ID = LEGACY_CLI_TRACE
|
|
||||||
DESC = CLI legacy logs - trace level
|
ID = LEGACY_F1U_DEBUG
|
||||||
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_TRACE:LEGACY
|
DESC = F1U DEBUG LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1U:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_F1U_INFO
|
||||||
|
DESC = F1U INFO LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1U:LEGACY_GROUP_INFO:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_F1U_ERROR
|
||||||
|
DESC = F1U ERROR LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1U:LEGACY_GROUP_ERROR:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_F1AP_TRACE
|
||||||
|
DESC = F1AP TRACE LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_TRACE:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_DEBUG
|
||||||
|
DESC = F1AP DEBUG LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_INFO
|
||||||
|
DESC = F1AP INFO LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_INFO:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_WARNING
|
||||||
|
DESC = F1AP WARNING LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_WARNING:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_ERROR
|
||||||
|
DESC = F1AP ERROR LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_ERROR:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
|
|
||||||
#################
|
#################
|
||||||
|
|||||||
+154
-94
@@ -31,7 +31,7 @@ typedef struct {
|
|||||||
int remote_port;
|
int remote_port;
|
||||||
pthread_mutex_t lock;
|
pthread_mutex_t lock;
|
||||||
pthread_cond_t cond;
|
pthread_cond_t cond;
|
||||||
databuf * volatile head, *tail;
|
databuf *volatile head, *tail;
|
||||||
uint64_t memusage;
|
uint64_t memusage;
|
||||||
uint64_t last_warning_memusage;
|
uint64_t last_warning_memusage;
|
||||||
} forward_data;
|
} forward_data;
|
||||||
@@ -40,80 +40,115 @@ typedef struct {
|
|||||||
/* utility functions */
|
/* utility functions */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static void new_thread(void *(*f)(void *), void *data)
|
static void new_thread(void *(*f)(void *), void *data) {
|
||||||
{
|
|
||||||
pthread_t t;
|
pthread_t t;
|
||||||
pthread_attr_t att;
|
pthread_attr_t att;
|
||||||
|
|
||||||
if (pthread_attr_init(&att))
|
if (pthread_attr_init(&att)) {
|
||||||
{ fprintf(stderr, "pthread_attr_init err\n"); exit(1); }
|
fprintf(stderr, "pthread_attr_init err\n");
|
||||||
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED))
|
exit(1);
|
||||||
{ fprintf(stderr, "pthread_attr_setdetachstate err\n"); exit(1); }
|
}
|
||||||
if (pthread_attr_setstacksize(&att, 10000000))
|
|
||||||
{ fprintf(stderr, "pthread_attr_setstacksize err\n"); exit(1); }
|
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
|
||||||
if (pthread_create(&t, &att, f, data))
|
fprintf(stderr, "pthread_attr_setdetachstate err\n");
|
||||||
{ fprintf(stderr, "pthread_create err\n"); exit(1); }
|
exit(1);
|
||||||
if (pthread_attr_destroy(&att))
|
}
|
||||||
{ fprintf(stderr, "pthread_attr_destroy err\n"); exit(1); }
|
|
||||||
|
if (pthread_attr_setstacksize(&att, 10000000)) {
|
||||||
|
fprintf(stderr, "pthread_attr_setstacksize err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_create(&t, &att, f, data)) {
|
||||||
|
fprintf(stderr, "pthread_create err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_attr_destroy(&att)) {
|
||||||
|
fprintf(stderr, "pthread_attr_destroy err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_connection(char *addr, int port)
|
static int get_connection(char *addr, int port) {
|
||||||
{
|
|
||||||
struct sockaddr_in a;
|
struct sockaddr_in a;
|
||||||
socklen_t alen;
|
socklen_t alen;
|
||||||
int s, t;
|
int s, t;
|
||||||
|
|
||||||
printf("T tracer: waiting for connection on %s:%d\n", addr, port);
|
printf("T tracer: waiting for connection on %s:%d\n", addr, port);
|
||||||
|
|
||||||
s = socket(AF_INET, SOCK_STREAM, 0);
|
s = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if (s == -1) { perror("socket"); exit(1); }
|
|
||||||
|
if (s == -1) {
|
||||||
|
perror("socket");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
t = 1;
|
t = 1;
|
||||||
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &t, sizeof(int)))
|
|
||||||
{ perror("setsockopt"); exit(1); }
|
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &t, sizeof(int))) {
|
||||||
|
perror("setsockopt");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
a.sin_family = AF_INET;
|
a.sin_family = AF_INET;
|
||||||
a.sin_port = htons(port);
|
a.sin_port = htons(port);
|
||||||
a.sin_addr.s_addr = inet_addr(addr);
|
a.sin_addr.s_addr = inet_addr(addr);
|
||||||
|
|
||||||
if (bind(s, (struct sockaddr *)&a, sizeof(a))) { perror("bind"); exit(1); }
|
if (bind(s, (struct sockaddr *)&a, sizeof(a))) {
|
||||||
if (listen(s, 5)) { perror("bind"); exit(1); }
|
perror("bind");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listen(s, 5)) {
|
||||||
|
perror("bind");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
alen = sizeof(a);
|
alen = sizeof(a);
|
||||||
t = accept(s, (struct sockaddr *)&a, &alen);
|
t = accept(s, (struct sockaddr *)&a, &alen);
|
||||||
if (t == -1) { perror("accept"); exit(1); }
|
|
||||||
|
if (t == -1) {
|
||||||
|
perror("accept");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
close(s);
|
close(s);
|
||||||
|
|
||||||
printf("T tracer: connected\n");
|
printf("T tracer: connected\n");
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void forward(void *_forwarder, char *buf, int size);
|
static void forward(void *_forwarder, char *buf, int size);
|
||||||
|
|
||||||
void send_T_messages_txt(void *forwarder)
|
void send_T_messages_txt(void *forwarder) {
|
||||||
{
|
|
||||||
char buf[T_BUFFER_MAX];
|
char buf[T_BUFFER_MAX];
|
||||||
char *T_LOCAL_buf = buf;
|
char *T_LOCAL_buf = buf;
|
||||||
int T_LOCAL_size;
|
int T_LOCAL_size;
|
||||||
unsigned char *src;
|
unsigned char *src;
|
||||||
int src_len;
|
int src_len;
|
||||||
|
|
||||||
/* trace T_message.txt
|
/* trace T_message.txt
|
||||||
* Send several messages -1 with content followed by message -2.
|
* Send several messages -1 with content followed by message -2.
|
||||||
*/
|
*/
|
||||||
src = T_messages_txt;
|
src = T_messages_txt;
|
||||||
src_len = T_messages_txt_len;
|
src_len = T_messages_txt_len;
|
||||||
|
|
||||||
while (src_len) {
|
while (src_len) {
|
||||||
int send_size = src_len;
|
int send_size = src_len;
|
||||||
|
|
||||||
if (send_size > T_PAYLOAD_MAXSIZE - sizeof(int))
|
if (send_size > T_PAYLOAD_MAXSIZE - sizeof(int))
|
||||||
send_size = T_PAYLOAD_MAXSIZE - sizeof(int);
|
send_size = T_PAYLOAD_MAXSIZE - sizeof(int);
|
||||||
|
|
||||||
/* TODO: be careful, we use internal T stuff, to rewrite? */
|
/* TODO: be careful, we use internal T stuff, to rewrite? */
|
||||||
T_LOCAL_size = 0;
|
T_LOCAL_size = 0;
|
||||||
T_HEADER(T_ID(-1));
|
T_HEADER(T_ID(-1));
|
||||||
T_PUT_buffer(1, ((T_buffer){addr:(src), length:(send_size)}));
|
T_PUT_buffer(1, ((T_buffer) {
|
||||||
|
addr:
|
||||||
|
(src), length:
|
||||||
|
(send_size)
|
||||||
|
}));
|
||||||
forward(forwarder, buf, T_LOCAL_size);
|
forward(forwarder, buf, T_LOCAL_size);
|
||||||
src += send_size;
|
src += send_size;
|
||||||
src_len -= send_size;
|
src_len -= send_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
T_LOCAL_size = 0;
|
T_LOCAL_size = 0;
|
||||||
T_HEADER(T_ID(-2));
|
T_HEADER(T_ID(-2));
|
||||||
forward(forwarder, buf, T_LOCAL_size);
|
forward(forwarder, buf, T_LOCAL_size);
|
||||||
@@ -123,49 +158,54 @@ void send_T_messages_txt(void *forwarder)
|
|||||||
/* forward functions */
|
/* forward functions */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static void *data_sender(void *_f)
|
static void *data_sender(void *_f) {
|
||||||
{
|
|
||||||
forward_data *f = _f;
|
forward_data *f = _f;
|
||||||
databuf *cur;
|
databuf *cur;
|
||||||
char *buf, *b;
|
char *buf, *b;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
wait:
|
wait:
|
||||||
|
|
||||||
if (pthread_mutex_lock(&f->lock)) abort();
|
if (pthread_mutex_lock(&f->lock)) abort();
|
||||||
|
|
||||||
while (f->head == NULL)
|
while (f->head == NULL)
|
||||||
if (pthread_cond_wait(&f->cond, &f->lock)) abort();
|
if (pthread_cond_wait(&f->cond, &f->lock)) abort();
|
||||||
|
|
||||||
cur = f->head;
|
cur = f->head;
|
||||||
buf = cur->d;
|
buf = cur->d;
|
||||||
size = cur->l;
|
size = cur->l;
|
||||||
f->head = cur->next;
|
f->head = cur->next;
|
||||||
f->memusage -= size;
|
f->memusage -= size;
|
||||||
|
|
||||||
if (f->head == NULL) f->tail = NULL;
|
if (f->head == NULL) f->tail = NULL;
|
||||||
|
|
||||||
if (pthread_mutex_unlock(&f->lock)) abort();
|
if (pthread_mutex_unlock(&f->lock)) abort();
|
||||||
|
|
||||||
free(cur);
|
free(cur);
|
||||||
goto process;
|
goto process;
|
||||||
|
|
||||||
process:
|
process:
|
||||||
b = buf;
|
b = buf;
|
||||||
|
|
||||||
if (f->socket_remote != -1)
|
if (f->socket_remote != -1)
|
||||||
while (size) {
|
while (size) {
|
||||||
int l = write(f->socket_remote, b, size);
|
int l = write(f->socket_remote, b, size);
|
||||||
if (l <= 0) {
|
|
||||||
printf("T tracer: forward error\n");
|
if (l <= 0) {
|
||||||
close(f->socket_remote);
|
printf("T tracer: forward error\n");
|
||||||
f->socket_remote = -1;
|
close(f->socket_remote);
|
||||||
break;
|
f->socket_remote = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
size -= l;
|
||||||
|
b += l;
|
||||||
}
|
}
|
||||||
size -= l;
|
|
||||||
b += l;
|
|
||||||
}
|
|
||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|
||||||
goto wait;
|
goto wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *forward_remote_messages(void *_f)
|
|
||||||
{
|
static void *forward_remote_messages(void *_f) {
|
||||||
#define PUT(x) do { \
|
#define PUT(x) do { \
|
||||||
if (bufsize == bufmaxsize) { \
|
if (bufsize == bufmaxsize) { \
|
||||||
bufmaxsize += 4096; \
|
bufmaxsize += 4096; \
|
||||||
@@ -180,7 +220,6 @@ static void *forward_remote_messages(void *_f)
|
|||||||
int len = l; \
|
int len = l; \
|
||||||
while (len) { PUT(*zz); zz++; len--; } \
|
while (len) { PUT(*zz); zz++; len--; } \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
forward_data *f = _f;
|
forward_data *f = _f;
|
||||||
int from;
|
int from;
|
||||||
int to;
|
int to;
|
||||||
@@ -190,43 +229,53 @@ static void *forward_remote_messages(void *_f)
|
|||||||
int bufsize = 0;
|
int bufsize = 0;
|
||||||
int bufmaxsize = 0;
|
int bufmaxsize = 0;
|
||||||
char t;
|
char t;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
from = f->socket_remote;
|
from = f->socket_remote;
|
||||||
to = f->socket_local;
|
to = f->socket_local;
|
||||||
|
|
||||||
bufsize = 0;
|
bufsize = 0;
|
||||||
|
|
||||||
/* let's read and process messages */
|
/* let's read and process messages */
|
||||||
len = read(from, &t, 1); if (len <= 0) goto dead;
|
len = read(from, &t, 1);
|
||||||
|
|
||||||
|
if (len <= 0) goto dead;
|
||||||
|
|
||||||
PUT(t);
|
PUT(t);
|
||||||
|
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
/* message 0 and 1: get a length and then 'length' numbers */
|
|
||||||
if (read(from, &len, sizeof(int)) != sizeof(int)) goto dead;
|
|
||||||
PUT_BUF(&len, 4);
|
|
||||||
while (len) {
|
|
||||||
if (read(from, &l, sizeof(int)) != sizeof(int)) goto dead;
|
|
||||||
PUT_BUF(&l, 4);
|
|
||||||
len--;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2: break;
|
/* message 0 and 1: get a length and then 'length' numbers */
|
||||||
default:
|
if (read(from, &len, sizeof(int)) != sizeof(int)) goto dead;
|
||||||
printf("%s:%d:%s: unhandled message type %d\n",
|
|
||||||
__FILE__, __LINE__, __FUNCTION__, t);
|
PUT_BUF(&len, 4);
|
||||||
abort();
|
|
||||||
|
while (len) {
|
||||||
|
if (read(from, &l, sizeof(int)) != sizeof(int)) goto dead;
|
||||||
|
|
||||||
|
PUT_BUF(&l, 4);
|
||||||
|
len--;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
printf("%s:%d:%s: unhandled message type %d\n",
|
||||||
|
__FILE__, __LINE__, __FUNCTION__, t);
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
b = buf;
|
b = buf;
|
||||||
|
|
||||||
while (bufsize) {
|
while (bufsize) {
|
||||||
l = write(to, b, bufsize);
|
l = write(to, b, bufsize);
|
||||||
|
|
||||||
if (l <= 0) abort();
|
if (l <= 0) abort();
|
||||||
|
|
||||||
bufsize -= l;
|
bufsize -= l;
|
||||||
b += l;
|
b += l;
|
||||||
}
|
}
|
||||||
@@ -236,71 +285,80 @@ dead:
|
|||||||
/* socket died, let's stop all traces and wait for another tracer */
|
/* socket died, let's stop all traces and wait for another tracer */
|
||||||
/* TODO: be careful with those write, they might write less than wanted */
|
/* TODO: be careful with those write, they might write less than wanted */
|
||||||
buf[0] = 1;
|
buf[0] = 1;
|
||||||
|
|
||||||
if (write(to, buf, 1) != 1) abort();
|
if (write(to, buf, 1) != 1) abort();
|
||||||
|
|
||||||
len = T_NUMBER_OF_IDS;
|
len = T_NUMBER_OF_IDS;
|
||||||
|
|
||||||
if (write(to, &len, sizeof(int)) != sizeof(int)) abort();
|
if (write(to, &len, sizeof(int)) != sizeof(int)) abort();
|
||||||
|
|
||||||
l = 0;
|
l = 0;
|
||||||
|
|
||||||
while (len) {
|
while (len) {
|
||||||
if (write(to, &l, sizeof(int)) != sizeof(int)) abort();
|
if (write(to, &l, sizeof(int)) != sizeof(int)) abort();
|
||||||
|
|
||||||
len--;
|
len--;
|
||||||
};
|
};
|
||||||
|
|
||||||
close(f->socket_remote);
|
close(f->socket_remote);
|
||||||
|
|
||||||
f->socket_remote = get_connection("0.0.0.0", f->remote_port);
|
f->socket_remote = get_connection("0.0.0.0", f->remote_port);
|
||||||
|
|
||||||
send_T_messages_txt(f);
|
send_T_messages_txt(f);
|
||||||
|
|
||||||
goto again;
|
goto again;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *forwarder(int port, int s)
|
static void *forwarder(int port, int s) {
|
||||||
{
|
|
||||||
forward_data *f;
|
forward_data *f;
|
||||||
|
f = malloc(sizeof(*f));
|
||||||
|
|
||||||
f = malloc(sizeof(*f)); if (f == NULL) abort();
|
if (f == NULL) abort();
|
||||||
|
|
||||||
pthread_mutex_init(&f->lock, NULL);
|
pthread_mutex_init(&f->lock, NULL);
|
||||||
pthread_cond_init(&f->cond, NULL);
|
pthread_cond_init(&f->cond, NULL);
|
||||||
|
|
||||||
f->socket_local = s;
|
f->socket_local = s;
|
||||||
f->head = f->tail = NULL;
|
f->head = f->tail = NULL;
|
||||||
|
|
||||||
f->memusage = 0;
|
f->memusage = 0;
|
||||||
f->last_warning_memusage = 0;
|
f->last_warning_memusage = 0;
|
||||||
|
|
||||||
printf("T tracer: waiting for remote tracer on port %d\n", port);
|
printf("T tracer: waiting for remote tracer on port %d\n", port);
|
||||||
|
|
||||||
f->remote_port = port;
|
f->remote_port = port;
|
||||||
f->socket_remote = get_connection("0.0.0.0", port);
|
f->socket_remote = get_connection("0.0.0.0", port);
|
||||||
send_T_messages_txt(f);
|
send_T_messages_txt(f);
|
||||||
|
|
||||||
new_thread(data_sender, f);
|
new_thread(data_sender, f);
|
||||||
new_thread(forward_remote_messages, f);
|
new_thread(forward_remote_messages, f);
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void forward(void *_forwarder, char *buf, int size)
|
static void forward(void *_forwarder, char *buf, int size) {
|
||||||
{
|
|
||||||
forward_data *f = _forwarder;
|
forward_data *f = _forwarder;
|
||||||
int32_t ssize = size;
|
int32_t ssize = size;
|
||||||
databuf *new;
|
databuf *new;
|
||||||
|
new = malloc(sizeof(*new));
|
||||||
|
|
||||||
new = malloc(sizeof(*new)); if (new == NULL) abort();
|
if (new == NULL) abort();
|
||||||
|
|
||||||
if (pthread_mutex_lock(&f->lock)) abort();
|
if (pthread_mutex_lock(&f->lock)) abort();
|
||||||
|
|
||||||
new->d = malloc(size + 4); if (new->d == NULL) abort();
|
new->d = malloc(size + 4);
|
||||||
|
|
||||||
|
if (new->d == NULL) abort();
|
||||||
|
|
||||||
/* put the size of the message at the head */
|
/* put the size of the message at the head */
|
||||||
memcpy(new->d, &ssize, 4);
|
memcpy(new->d, &ssize, 4);
|
||||||
memcpy(new->d+4, buf, size);
|
memcpy(new->d+4, buf, size);
|
||||||
new->l = size+4;
|
new->l = size+4;
|
||||||
new->next = NULL;
|
new->next = NULL;
|
||||||
if (f->head == NULL) f->head = new;
|
|
||||||
if (f->tail != NULL) f->tail->next = new;
|
|
||||||
f->tail = new;
|
|
||||||
|
|
||||||
|
if (f->head == NULL) f->head = new;
|
||||||
|
|
||||||
|
if (f->tail != NULL) f->tail->next = new;
|
||||||
|
|
||||||
|
f->tail = new;
|
||||||
#if BASIC_SIMULATOR
|
#if BASIC_SIMULATOR
|
||||||
|
|
||||||
/* When runnng the basic simulator, the tracer may be too slow.
|
/* When runnng the basic simulator, the tracer may be too slow.
|
||||||
* Let's not take too much memory in the tracee and
|
* Let's not take too much memory in the tracee and
|
||||||
* wait if there is too much data to send. 200MB is
|
* wait if there is too much data to send. 200MB is
|
||||||
@@ -308,26 +366,30 @@ static void forward(void *_forwarder, char *buf, int size)
|
|||||||
*/
|
*/
|
||||||
while (f->memusage > 200 * 1024 * 1024) {
|
while (f->memusage > 200 * 1024 * 1024) {
|
||||||
if (pthread_cond_signal(&f->cond)) abort();
|
if (pthread_cond_signal(&f->cond)) abort();
|
||||||
|
|
||||||
if (pthread_mutex_unlock(&f->lock)) abort();
|
if (pthread_mutex_unlock(&f->lock)) abort();
|
||||||
|
|
||||||
usleep(1000);
|
usleep(1000);
|
||||||
|
|
||||||
if (pthread_mutex_lock(&f->lock)) abort();
|
if (pthread_mutex_lock(&f->lock)) abort();
|
||||||
}
|
}
|
||||||
#endif /* BASIC_SIMULATOR */
|
|
||||||
|
|
||||||
|
#endif /* BASIC_SIMULATOR */
|
||||||
f->memusage += size+4;
|
f->memusage += size+4;
|
||||||
|
|
||||||
/* warn every 100MB */
|
/* warn every 100MB */
|
||||||
if (f->memusage > f->last_warning_memusage &&
|
if (f->memusage > f->last_warning_memusage &&
|
||||||
f->memusage - f->last_warning_memusage > 100000000) {
|
f->memusage - f->last_warning_memusage > 100000000) {
|
||||||
f->last_warning_memusage += 100000000;
|
f->last_warning_memusage += 100000000;
|
||||||
printf("T tracer: WARNING: memory usage is over %"PRIu64"MB\n",
|
printf("T tracer: WARNING: memory usage is over %"PRIu64"MB\n",
|
||||||
f->last_warning_memusage / 1000000);
|
f->last_warning_memusage / 1000000);
|
||||||
} else
|
} else if (f->memusage < f->last_warning_memusage &&
|
||||||
if (f->memusage < f->last_warning_memusage &&
|
f->last_warning_memusage - f->memusage > 100000000) {
|
||||||
f->last_warning_memusage - f->memusage > 100000000) {
|
|
||||||
f->last_warning_memusage = (f->memusage/100000000) * 100000000;
|
f->last_warning_memusage = (f->memusage/100000000) * 100000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pthread_cond_signal(&f->cond)) abort();
|
if (pthread_cond_signal(&f->cond)) abort();
|
||||||
|
|
||||||
if (pthread_mutex_unlock(&f->lock)) abort();
|
if (pthread_mutex_unlock(&f->lock)) abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,14 +397,12 @@ static void forward(void *_forwarder, char *buf, int size)
|
|||||||
/* local functions */
|
/* local functions */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static void wait_message(void)
|
static void wait_message(void) {
|
||||||
{
|
|
||||||
while ((T_local_cache[T_busylist_head].busy & 0x02) == 0) usleep(1000);
|
while ((T_local_cache[T_busylist_head].busy & 0x02) == 0) usleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
||||||
int local_socket, void *shm_array)
|
int local_socket, void *shm_array) {
|
||||||
{
|
|
||||||
int s;
|
int s;
|
||||||
int port = remote_port;
|
int port = remote_port;
|
||||||
int dont_wait = wait_for_tracer ? 0 : 1;
|
int dont_wait = wait_for_tracer ? 0 : 1;
|
||||||
@@ -350,16 +410,16 @@ void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
|||||||
|
|
||||||
/* write on a socket fails if the other end is closed and we get SIGPIPE */
|
/* write on a socket fails if the other end is closed and we get SIGPIPE */
|
||||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
|
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
|
||||||
printf("local tracer received SIGPIPE\n");
|
printf("local tracer received SIGPIPE\n");
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
T_local_cache = shm_array;
|
T_local_cache = shm_array;
|
||||||
|
|
||||||
s = local_socket;
|
s = local_socket;
|
||||||
|
|
||||||
if (dont_wait) {
|
if (dont_wait) {
|
||||||
char t = 2;
|
char t = 2;
|
||||||
|
|
||||||
if (write(s, &t, 1) != 1) abort();
|
if (write(s, &t, 1) != 1) abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,62 +5,56 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
unsigned long register_notifier(gui *_g, char *notification, widget *w,
|
unsigned long register_notifier(gui *_g, char *notification, widget *w,
|
||||||
notifier handler, void *private)
|
notifier handler, void *private) {
|
||||||
{
|
|
||||||
struct gui *g = _g;
|
struct gui *g = _g;
|
||||||
unsigned long ret;
|
unsigned long ret;
|
||||||
|
|
||||||
glock(g);
|
glock(g);
|
||||||
|
|
||||||
if (g->next_notifier_id == 2UL * 1024 * 1024 * 1024)
|
if (g->next_notifier_id == 2UL * 1024 * 1024 * 1024)
|
||||||
ERR("%s:%d: report a bug\n", __FILE__, __LINE__);
|
ERR("%s:%d: report a bug\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
g->notifiers = realloc(g->notifiers,
|
g->notifiers = realloc(g->notifiers,
|
||||||
(g->notifiers_count+1) * sizeof(struct notifier));
|
(g->notifiers_count+1) * sizeof(struct notifier));
|
||||||
|
|
||||||
if (g->notifiers == NULL) abort();
|
if (g->notifiers == NULL) abort();
|
||||||
|
|
||||||
ret = g->next_notifier_id;
|
ret = g->next_notifier_id;
|
||||||
|
|
||||||
g->notifiers[g->notifiers_count].handler = handler;
|
g->notifiers[g->notifiers_count].handler = handler;
|
||||||
g->notifiers[g->notifiers_count].id = g->next_notifier_id;
|
g->notifiers[g->notifiers_count].id = g->next_notifier_id;
|
||||||
g->next_notifier_id++;
|
g->next_notifier_id++;
|
||||||
g->notifiers[g->notifiers_count].notification = strdup(notification);
|
g->notifiers[g->notifiers_count].notification = strdup(notification);
|
||||||
|
|
||||||
if (g->notifiers[g->notifiers_count].notification == NULL) abort();
|
if (g->notifiers[g->notifiers_count].notification == NULL) abort();
|
||||||
|
|
||||||
g->notifiers[g->notifiers_count].w = w;
|
g->notifiers[g->notifiers_count].w = w;
|
||||||
g->notifiers[g->notifiers_count].private = private;
|
g->notifiers[g->notifiers_count].private = private;
|
||||||
/* initialize done to 1 so as not to call the handler if it's created
|
/* initialize done to 1 so as not to call the handler if it's created
|
||||||
* by the call of another one that is in progress
|
* by the call of another one that is in progress
|
||||||
*/
|
*/
|
||||||
g->notifiers[g->notifiers_count].done = 1;
|
g->notifiers[g->notifiers_count].done = 1;
|
||||||
|
|
||||||
g->notifiers_count++;
|
g->notifiers_count++;
|
||||||
|
|
||||||
gunlock(g);
|
gunlock(g);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void unregister_notifier(gui *_g, unsigned long notifier_id)
|
void unregister_notifier(gui *_g, unsigned long notifier_id) {
|
||||||
{
|
|
||||||
struct gui *g = _g;
|
struct gui *g = _g;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
glock(g);
|
glock(g);
|
||||||
|
|
||||||
for (i = 0; i < g->notifiers_count; i++)
|
for (i = 0; i < g->notifiers_count; i++)
|
||||||
if (g->notifiers[i].id == notifier_id) break;
|
if (g->notifiers[i].id == notifier_id) break;
|
||||||
|
|
||||||
if (i == g->notifiers_count)
|
if (i == g->notifiers_count)
|
||||||
ERR("%s:%d: notifier_id %ld not found\n", __FILE__,__LINE__,notifier_id);
|
ERR("%s:%d: notifier_id %lu not found\n", __FILE__,__LINE__,notifier_id);
|
||||||
|
|
||||||
free(g->notifiers[i].notification);
|
free(g->notifiers[i].notification);
|
||||||
|
|
||||||
memmove(g->notifiers + i, g->notifiers + i + 1,
|
memmove(g->notifiers + i, g->notifiers + i + 1,
|
||||||
(g->notifiers_count-1 - i) * sizeof(struct notifier));
|
(g->notifiers_count-1 - i) * sizeof(struct notifier));
|
||||||
|
|
||||||
g->notifiers_count--;
|
g->notifiers_count--;
|
||||||
g->notifiers = realloc(g->notifiers,
|
g->notifiers = realloc(g->notifiers,
|
||||||
g->notifiers_count * sizeof(struct notifier));
|
g->notifiers_count * sizeof(struct notifier));
|
||||||
|
|
||||||
if (g->notifiers == NULL) abort();
|
if (g->notifiers == NULL) abort();
|
||||||
|
|
||||||
gunlock(g);
|
gunlock(g);
|
||||||
@@ -68,19 +62,19 @@ void unregister_notifier(gui *_g, unsigned long notifier_id)
|
|||||||
|
|
||||||
/* called with lock ON */
|
/* called with lock ON */
|
||||||
void gui_notify(struct gui *g, char *notification, widget *w,
|
void gui_notify(struct gui *g, char *notification, widget *w,
|
||||||
void *notification_data)
|
void *notification_data) {
|
||||||
{
|
|
||||||
void *private;
|
void *private;
|
||||||
notifier handler;
|
notifier handler;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* this function is not re-entrant, for the moment keep as is
|
/* this function is not re-entrant, for the moment keep as is
|
||||||
* and if the need is there, we'll make a new thread to handle
|
* and if the need is there, we'll make a new thread to handle
|
||||||
* notifications (or something)
|
* notifications (or something)
|
||||||
* for now let's crash in case of recursive call
|
* for now let's crash in case of recursive call
|
||||||
*/
|
*/
|
||||||
static int inside = 0;
|
static int inside = 0;
|
||||||
|
|
||||||
if (inside) ERR("%s:%d: BUG! contact the authors\n", __FILE__, __LINE__);
|
if (inside) ERR("%s:%d: BUG! contact the authors\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
inside = 1;
|
inside = 1;
|
||||||
|
|
||||||
/* clear all handlers */
|
/* clear all handlers */
|
||||||
@@ -91,26 +85,25 @@ void gui_notify(struct gui *g, char *notification, widget *w,
|
|||||||
* need to be careful here
|
* need to be careful here
|
||||||
*/
|
*/
|
||||||
loop:
|
loop:
|
||||||
|
|
||||||
for (i = 0; i < g->notifiers_count; i++) {
|
for (i = 0; i < g->notifiers_count; i++) {
|
||||||
if (g->notifiers[i].done == 1 ||
|
if (g->notifiers[i].done == 1 ||
|
||||||
g->notifiers[i].w != w ||
|
g->notifiers[i].w != w ||
|
||||||
strcmp(g->notifiers[i].notification, notification) != 0)
|
strcmp(g->notifiers[i].notification, notification) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == g->notifiers_count) goto done;
|
if (i == g->notifiers_count) goto done;
|
||||||
|
|
||||||
g->notifiers[i].done = 1;
|
g->notifiers[i].done = 1;
|
||||||
|
|
||||||
handler = g->notifiers[i].handler;
|
handler = g->notifiers[i].handler;
|
||||||
private = g->notifiers[i].private;
|
private = g->notifiers[i].private;
|
||||||
|
|
||||||
gunlock(g);
|
gunlock(g);
|
||||||
handler(private, g, notification, w, notification_data);
|
handler(private, g, notification, w, notification_data);
|
||||||
glock(g);
|
glock(g);
|
||||||
|
|
||||||
goto loop;
|
goto loop;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
inside = 0;
|
inside = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I. -I..
|
|||||||
|
|
||||||
LIBS=-lX11 -lm -lpng -lXft
|
LIBS=-lX11 -lm -lpng -lXft
|
||||||
|
|
||||||
all: dump_nack_signal time_meas timeplot
|
all: dump_nack_signal time_meas timeplot multi-rru-clean
|
||||||
|
|
||||||
dump_nack_signal: ../utils.o ../database.o ../config.o ../event.o \
|
dump_nack_signal: ../utils.o ../database.o ../config.o ../event.o \
|
||||||
dump_nack_signal.o
|
dump_nack_signal.o
|
||||||
@@ -16,6 +16,9 @@ time_meas: ../utils.o ../database.o ../config.o ../event.o \
|
|||||||
timplot: timeplot.o
|
timplot: timeplot.o
|
||||||
$(CC) $(CFLAGS) -o timeplot $^ $(LIBS)
|
$(CC) $(CFLAGS) -o timeplot $^ $(LIBS)
|
||||||
|
|
||||||
|
multi-rru-clean: ../utils.o ../database.o ../event.o ../config.o multi-rru-clean.o
|
||||||
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
|
|||||||
@@ -7,21 +7,19 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "../T_defs.h"
|
#include "../T_defs.h"
|
||||||
|
|
||||||
void usage(void)
|
void usage(void) {
|
||||||
{
|
|
||||||
printf(
|
printf(
|
||||||
"options:\n"
|
"options:\n"
|
||||||
" -d <database file> this option is mandatory\n"
|
" -d <database file> this option is mandatory\n"
|
||||||
" -ip <host> connect to given IP address (default %s)\n"
|
" -ip <host> connect to given IP address (default %s)\n"
|
||||||
" -p <port> connect to given port (default %d)\n",
|
" -p <port> connect to given port (default %d)\n",
|
||||||
DEFAULT_REMOTE_IP,
|
DEFAULT_REMOTE_IP,
|
||||||
DEFAULT_REMOTE_PORT
|
DEFAULT_REMOTE_PORT
|
||||||
);
|
);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int n, char **v)
|
int main(int n, char **v) {
|
||||||
{
|
|
||||||
char *database_filename = NULL;
|
char *database_filename = NULL;
|
||||||
void *database;
|
void *database;
|
||||||
char *ip = DEFAULT_REMOTE_IP;
|
char *ip = DEFAULT_REMOTE_IP;
|
||||||
@@ -36,11 +34,28 @@ int main(int n, char **v)
|
|||||||
|
|
||||||
for (i = 1; i < n; i++) {
|
for (i = 1; i < n; i++) {
|
||||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||||
if (!strcmp(v[i], "-d"))
|
|
||||||
{ if (i > n-2) usage(); database_filename = v[++i]; continue; }
|
if (!strcmp(v[i], "-d")) {
|
||||||
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
|
if (i > n-2) usage();
|
||||||
if (!strcmp(v[i], "-p"))
|
|
||||||
{ if (i > n-2) usage(); port = atoi(v[++i]); continue; }
|
database_filename = v[++i];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-ip")) {
|
||||||
|
if (i > n-2) usage();
|
||||||
|
|
||||||
|
ip = v[++i];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-p")) {
|
||||||
|
if (i > n-2) usage();
|
||||||
|
|
||||||
|
port = atoi(v[++i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,71 +65,92 @@ int main(int n, char **v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
database = parse_database(database_filename);
|
database = parse_database(database_filename);
|
||||||
|
|
||||||
load_config_file(database_filename);
|
load_config_file(database_filename);
|
||||||
|
|
||||||
number_of_events = number_of_ids(database);
|
number_of_events = number_of_ids(database);
|
||||||
is_on = calloc(number_of_events, sizeof(int));
|
is_on = calloc(number_of_events, sizeof(int));
|
||||||
|
|
||||||
if (is_on == NULL) abort();
|
if (is_on == NULL) abort();
|
||||||
|
|
||||||
on_off(database, "ENB_PHY_INPUT_SIGNAL", is_on, 1);
|
on_off(database, "ENB_PHY_INPUT_SIGNAL", is_on, 1);
|
||||||
on_off(database, "ENB_PHY_ULSCH_UE_NACK", is_on, 1);
|
on_off(database, "ENB_PHY_ULSCH_UE_NACK", is_on, 1);
|
||||||
on_off(database, "ENB_PHY_ULSCH_UE_ACK", is_on, 1);
|
on_off(database, "ENB_PHY_ULSCH_UE_ACK", is_on, 1);
|
||||||
|
|
||||||
ev_input = event_id_from_name(database, "ENB_PHY_INPUT_SIGNAL");
|
ev_input = event_id_from_name(database, "ENB_PHY_INPUT_SIGNAL");
|
||||||
ev_nack = event_id_from_name(database, "ENB_PHY_ULSCH_UE_NACK");
|
ev_nack = event_id_from_name(database, "ENB_PHY_ULSCH_UE_NACK");
|
||||||
ev_ack = event_id_from_name(database, "ENB_PHY_ULSCH_UE_ACK");
|
ev_ack = event_id_from_name(database, "ENB_PHY_ULSCH_UE_ACK");
|
||||||
|
|
||||||
socket = connect_to(ip, port);
|
socket = connect_to(ip, port);
|
||||||
|
|
||||||
t = 1;
|
t = 1;
|
||||||
|
|
||||||
if (socket_send(socket, &t, 1) == -1 ||
|
if (socket_send(socket, &t, 1) == -1 ||
|
||||||
socket_send(socket, &number_of_events, sizeof(int)) == -1 ||
|
socket_send(socket, &number_of_events, sizeof(int)) == -1 ||
|
||||||
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
|
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
|
||||||
abort();
|
abort();
|
||||||
|
|
||||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||||
|
|
||||||
char dump[10][T_BUFFER_MAX];
|
char dump[10][T_BUFFER_MAX];
|
||||||
event dump_ev[10];
|
event dump_ev[10];
|
||||||
FILE *z = fopen("/tmp/dd", "w"); if (z == NULL) abort();
|
FILE *z = fopen("/tmp/dd", "w");
|
||||||
|
|
||||||
|
if (z == NULL) abort();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
char *v;
|
char *v;
|
||||||
event e;
|
event e;
|
||||||
e = get_event(socket, &ebuf, database);
|
e = get_event(socket, &ebuf, database);
|
||||||
v = ebuf.obuf;
|
v = ebuf.obuf;
|
||||||
|
|
||||||
if (e.type == -1) break;
|
if (e.type == -1) break;
|
||||||
|
|
||||||
if (e.type == ev_input) {
|
if (e.type == ev_input) {
|
||||||
int sf = e.e[2].i;
|
int sf = e.e[2].i;
|
||||||
if (ebuf.osize > T_BUFFER_MAX)
|
|
||||||
{ printf("event size too big\n"); exit(1); }
|
if (ebuf.osize > T_BUFFER_MAX) {
|
||||||
|
printf("event size too big\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(dump[sf], ebuf.obuf, ebuf.osize);
|
memcpy(dump[sf], ebuf.obuf, ebuf.osize);
|
||||||
dump_ev[sf] = e;
|
dump_ev[sf] = e;
|
||||||
printf("input %d/%d\n", e.e[1].i, sf);
|
printf("input %d/%d\n", e.e[1].i, sf);
|
||||||
if (fwrite(dump_ev[sf].e[4].b, dump_ev[sf].e[4].bsize, 1, z) != 1) abort();
|
|
||||||
fflush(z);
|
if (fwrite(dump_ev[sf].e[4].b, dump_ev[sf].e[4].bsize, 1, z) != 1) abort();
|
||||||
|
|
||||||
|
fflush(z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.type == ev_nack) {
|
if (e.type == ev_nack) {
|
||||||
int sf = e.e[2].i;
|
int sf = e.e[2].i;
|
||||||
printf("nack %d/%d\n", e.e[1].i, sf);
|
printf("nack %d/%d\n", e.e[1].i, sf);
|
||||||
FILE *f = fopen("/tmp/dump.raw", "w"); if (f == NULL) abort();
|
FILE *f = fopen("/tmp/dump.raw", "w");
|
||||||
|
|
||||||
|
if (f == NULL) abort();
|
||||||
|
|
||||||
if (fwrite(dump[sf] + ((char *)dump_ev[sf].e[4].b - v),
|
if (fwrite(dump[sf] + ((char *)dump_ev[sf].e[4].b - v),
|
||||||
dump_ev[sf].e[4].bsize, 1, f) != 1) abort();
|
dump_ev[sf].e[4].bsize, 1, f) != 1) abort();
|
||||||
|
|
||||||
if (fclose(f)) abort();
|
if (fclose(f)) abort();
|
||||||
|
|
||||||
printf("dumped... press enter (delta %d)\n", (int)((char *)dump_ev[sf].e[4].b - v));
|
printf("dumped... press enter (delta %d)\n", (int)((char *)dump_ev[sf].e[4].b - v));
|
||||||
// getchar();
|
// getchar();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.type == ev_ack) {
|
if (e.type == ev_ack) {
|
||||||
int sf = e.e[2].i;
|
int sf = e.e[2].i;
|
||||||
printf("ack %d/%d\n", e.e[1].i, sf);
|
printf("ack %d/%d\n", e.e[1].i, sf);
|
||||||
FILE *f = fopen("/tmp/dump.raw", "w"); if (f == NULL) abort();
|
FILE *f = fopen("/tmp/dump.raw", "w");
|
||||||
|
|
||||||
|
if (f == NULL) abort();
|
||||||
|
|
||||||
if (fwrite(dump[sf] + ((char *)dump_ev[sf].e[4].b - v),
|
if (fwrite(dump[sf] + ((char *)dump_ev[sf].e[4].b - v),
|
||||||
dump_ev[sf].e[4].bsize, 1, f) != 1) abort();
|
dump_ev[sf].e[4].bsize, 1, f) != 1) abort();
|
||||||
|
|
||||||
if (fclose(f)) abort();
|
if (fclose(f)) abort();
|
||||||
|
|
||||||
printf("dumped... press enter (delta %d)\n", (int)((char *)dump_ev[sf].e[4].b - v));
|
printf("dumped... press enter (delta %d)\n", (int)((char *)dump_ev[sf].e[4].b - v));
|
||||||
// getchar();
|
// getchar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (z)
|
||||||
|
fclose(z);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,230 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "database.h"
|
||||||
|
#include "utils.h"
|
||||||
|
#include "event.h"
|
||||||
|
#include "../T_defs.h"
|
||||||
|
|
||||||
|
void usage(void)
|
||||||
|
{
|
||||||
|
printf(
|
||||||
|
"usage: <number of tags> <input record file> <output curated record file>\n"
|
||||||
|
"options:\n"
|
||||||
|
" -d <database file> this option is mandatory\n"
|
||||||
|
);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ERR printf("ERROR: read file %s failed\n", input_filename)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
OBUF b;
|
||||||
|
struct timespec t;
|
||||||
|
int filled;
|
||||||
|
int error;
|
||||||
|
} cache_t;
|
||||||
|
|
||||||
|
void clear_cache(int n, cache_t *c)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
|
c[i].filled = 0;
|
||||||
|
c[i].error = 0;
|
||||||
|
c[i].b.osize = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void store_in_cache(cache_t *c, int pos, OBUF *b)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < b->osize; i++)
|
||||||
|
PUTC(&c[pos].b, b->obuf[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_field(database_event_format *f, char *field, char *type)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < f->count; i++)
|
||||||
|
if (!strcmp(f->name[i], field)) {
|
||||||
|
if (strcmp(f->type[i], type)) break;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
printf("bad field %s, check that it exists and has type '%s'\n",field,type);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void process_cache(FILE *out, cache_t *c, int n, int frame, int subframe)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct tm *t;
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
if (c[i].filled == 0 || c[i].error == 1)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
fwrite(c[i].b.obuf, c[i].b.osize, 1, out);
|
||||||
|
|
||||||
|
clear_cache(n, c);
|
||||||
|
return;
|
||||||
|
|
||||||
|
error:
|
||||||
|
printf("ERROR: incorrect data at frame %d subframe %d", frame, subframe);
|
||||||
|
for (i = 0; i < n; i++) if (c[i].filled) {
|
||||||
|
t = localtime(&c[i].t.tv_sec);
|
||||||
|
printf(" [tag %d time %2.2d:%2.2d:%2.2d.%9.9ld]", i,
|
||||||
|
t->tm_hour, t->tm_min, t->tm_sec, c[i].t.tv_nsec);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
clear_cache(n, c);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int n, char **v)
|
||||||
|
{
|
||||||
|
char *database_filename = NULL;
|
||||||
|
void *database;
|
||||||
|
int channel_estimate_id;
|
||||||
|
int number_of_tags = -1;
|
||||||
|
char *input_filename = NULL;
|
||||||
|
char *output_filename = NULL;
|
||||||
|
int i;
|
||||||
|
FILE *in;
|
||||||
|
FILE *out;
|
||||||
|
database_event_format f;
|
||||||
|
int frame_arg;
|
||||||
|
int subframe_arg;
|
||||||
|
int tag_arg;
|
||||||
|
|
||||||
|
cache_t *cache;
|
||||||
|
int cur_frame = -1;
|
||||||
|
int cur_subframe = -1;
|
||||||
|
int frame;
|
||||||
|
int subframe;
|
||||||
|
int tag;
|
||||||
|
|
||||||
|
for (i = 1; i < n; i++) {
|
||||||
|
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||||
|
if (!strcmp(v[i], "-d")) { if (i > n-2) usage();
|
||||||
|
database_filename = v[++i]; continue; }
|
||||||
|
if (number_of_tags == -1) { number_of_tags = atoi(v[i]);
|
||||||
|
if (number_of_tags <= 0) {usage();} continue; }
|
||||||
|
if (input_filename == NULL) { input_filename = v[i]; continue; }
|
||||||
|
if (output_filename == NULL) { output_filename = v[i]; continue; }
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (database_filename == NULL) {
|
||||||
|
printf("ERROR: provide a database file (-d)\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (output_filename == NULL || input_filename == NULL || number_of_tags == -1)
|
||||||
|
usage();
|
||||||
|
|
||||||
|
database = parse_database(database_filename);
|
||||||
|
|
||||||
|
channel_estimate_id = event_id_from_name(database, "CALIBRATION_CHANNEL_ESTIMATES");
|
||||||
|
f = get_format(database, channel_estimate_id);
|
||||||
|
|
||||||
|
frame_arg = get_field(&f, "frame", "int");
|
||||||
|
subframe_arg = get_field(&f, "subframe", "int");
|
||||||
|
tag_arg = get_field(&f, "tag", "int");
|
||||||
|
|
||||||
|
in = fopen(input_filename, "r");
|
||||||
|
if (in == NULL) { perror(input_filename); abort(); }
|
||||||
|
out = fopen(output_filename, "w");
|
||||||
|
if (out == NULL) { perror(output_filename); abort(); }
|
||||||
|
|
||||||
|
cache = calloc(number_of_tags, sizeof(cache_t));
|
||||||
|
if (cache == NULL) { perror("malloc"); exit(1); }
|
||||||
|
|
||||||
|
clear_cache(number_of_tags, cache);
|
||||||
|
|
||||||
|
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
int type;
|
||||||
|
int32_t length;
|
||||||
|
char *v;
|
||||||
|
int vpos = 0;
|
||||||
|
struct timespec t;
|
||||||
|
char *buf;
|
||||||
|
|
||||||
|
/* read event from file */
|
||||||
|
if (fread(&length, 4, 1, in) != 1) break;
|
||||||
|
if (ebuf.omaxsize < length) {
|
||||||
|
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||||
|
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||||
|
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||||
|
}
|
||||||
|
v = ebuf.obuf;
|
||||||
|
memcpy(v+vpos, &length, 4);
|
||||||
|
vpos += 4;
|
||||||
|
#ifdef T_SEND_TIME
|
||||||
|
if (length < sizeof(struct timespec)) { ERR; break; }
|
||||||
|
if (fread(&t, sizeof(struct timespec), 1, in) != 1) { ERR; break; }
|
||||||
|
memcpy(v+vpos, &t, sizeof(struct timespec));
|
||||||
|
vpos += sizeof(struct timespec);
|
||||||
|
length -= sizeof(struct timespec);
|
||||||
|
#endif
|
||||||
|
if (length < sizeof(int)) { ERR; break; }
|
||||||
|
if (fread(&type, sizeof(int), 1, in) != 1) { ERR; break; }
|
||||||
|
memcpy(v+vpos, &type, sizeof(int));
|
||||||
|
vpos += sizeof(int);
|
||||||
|
length -= sizeof(int);
|
||||||
|
if (length) if (fread(v+vpos, length, 1, in) != 1) { ERR; break; }
|
||||||
|
buf = v + vpos;
|
||||||
|
vpos += length;
|
||||||
|
ebuf.osize = vpos;
|
||||||
|
|
||||||
|
if (type != channel_estimate_id) continue;
|
||||||
|
|
||||||
|
event e;
|
||||||
|
#ifdef T_SEND_TIME
|
||||||
|
e = new_event(t, type, length, buf, database);
|
||||||
|
#else
|
||||||
|
e = new_event(type, length, buf, database);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
frame = e.e[frame_arg].i;
|
||||||
|
subframe = e.e[subframe_arg].i;
|
||||||
|
tag = e.e[tag_arg].i;
|
||||||
|
|
||||||
|
if (tag < 0 || tag >= number_of_tags) {
|
||||||
|
struct tm *tt;
|
||||||
|
tt = localtime(&t.tv_sec);
|
||||||
|
printf("ERROR: invalid tag (%d), skipping event for frame %d subframe %d (time %2.2d:%2.2d:%2.2d.%9.9ld)\n",
|
||||||
|
tag, frame, subframe,
|
||||||
|
tt->tm_hour, tt->tm_min, tt->tm_sec, t.tv_nsec);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cur_frame != frame || cur_subframe != subframe)
|
||||||
|
if (cur_frame != -1)
|
||||||
|
process_cache(out, cache, number_of_tags, cur_frame, cur_subframe);
|
||||||
|
|
||||||
|
cur_frame = frame;
|
||||||
|
cur_subframe = subframe;
|
||||||
|
|
||||||
|
if (cache[tag].filled) {
|
||||||
|
struct tm *tt;
|
||||||
|
tt = localtime(&t.tv_sec);
|
||||||
|
printf("ERROR: tag %d present twice at frame %d subframe %d (time %2.2d:%2.2d:%2.2d.%9.9ld)\n",
|
||||||
|
tag, frame, subframe,
|
||||||
|
tt->tm_hour, tt->tm_min, tt->tm_sec, t.tv_nsec);
|
||||||
|
cache[tag].error = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
store_in_cache(cache, tag, &ebuf);
|
||||||
|
cache[tag].filled = 1;
|
||||||
|
cache[tag].t = t;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fclose(in)) perror(input_filename);
|
||||||
|
if (fclose(out)) perror(output_filename);
|
||||||
|
free(cache);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -58,14 +58,11 @@ typedef struct {
|
|||||||
} ev_data;
|
} ev_data;
|
||||||
|
|
||||||
void trace(ev_data *d, int direction, int rnti_type, int rnti,
|
void trace(ev_data *d, int direction, int rnti_type, int rnti,
|
||||||
int frame, int subframe, void *buf, int bufsize, int preamble)
|
int frame, int subframe, void *buf, int bufsize, int preamble) {
|
||||||
{
|
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
int fsf;
|
int fsf;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
d->buf.osize = 0;
|
d->buf.osize = 0;
|
||||||
|
|
||||||
PUTS(&d->buf, MAC_LTE_START_STRING);
|
PUTS(&d->buf, MAC_LTE_START_STRING);
|
||||||
PUTC(&d->buf, FDD_RADIO);
|
PUTC(&d->buf, FDD_RADIO);
|
||||||
PUTC(&d->buf, direction);
|
PUTC(&d->buf, direction);
|
||||||
@@ -92,16 +89,17 @@ void trace(ev_data *d, int direction, int rnti_type, int rnti,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
|
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
|
||||||
|
|
||||||
for (i = 0; i < bufsize; i++)
|
for (i = 0; i < bufsize; i++)
|
||||||
PUTC(&d->buf, ((char*)buf)[i]);
|
PUTC(&d->buf, ((char *)buf)[i]);
|
||||||
|
|
||||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||||
|
|
||||||
if (ret != d->buf.osize) abort();
|
if (ret != d->buf.osize) abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ul(void *_d, event e)
|
void ul(void *_d, event e) {
|
||||||
{
|
|
||||||
ev_data *d = _d;
|
ev_data *d = _d;
|
||||||
trace(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
|
trace(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
|
||||||
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
|
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
|
||||||
@@ -109,13 +107,14 @@ void ul(void *_d, event e)
|
|||||||
NO_PREAMBLE);
|
NO_PREAMBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dl(void *_d, event e)
|
void dl(void *_d, event e) {
|
||||||
{
|
|
||||||
ev_data *d = _d;
|
ev_data *d = _d;
|
||||||
|
|
||||||
if (e.e[d->dl_rnti].i == 0xffff) {
|
if (e.e[d->dl_rnti].i == 0xffff) {
|
||||||
if (d->no_sib) return;
|
if (d->no_sib) return;
|
||||||
|
|
||||||
if (d->max_sib && d->cur_sib == d->max_sib) return;
|
if (d->max_sib && d->cur_sib == d->max_sib) return;
|
||||||
|
|
||||||
d->cur_sib++;
|
d->cur_sib++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,22 +125,21 @@ void dl(void *_d, event e)
|
|||||||
NO_PREAMBLE);
|
NO_PREAMBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mib(void *_d, event e)
|
void mib(void *_d, event e) {
|
||||||
{
|
|
||||||
ev_data *d = _d;
|
ev_data *d = _d;
|
||||||
|
|
||||||
if (d->no_mib) return;
|
if (d->no_mib) return;
|
||||||
if (d->max_mib && d->cur_mib == d->max_mib) return;
|
|
||||||
d->cur_mib++;
|
|
||||||
|
|
||||||
|
if (d->max_mib && d->cur_mib == d->max_mib) return;
|
||||||
|
|
||||||
|
d->cur_mib++;
|
||||||
trace(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
|
trace(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
|
||||||
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
|
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
|
||||||
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
|
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
|
||||||
NO_PREAMBLE);
|
NO_PREAMBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void preamble(void *_d, event e)
|
void preamble(void *_d, event e) {
|
||||||
{
|
|
||||||
ev_data *d = _d;
|
ev_data *d = _d;
|
||||||
trace(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
trace(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||||
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
|
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
|
||||||
@@ -149,8 +147,7 @@ void preamble(void *_d, event e)
|
|||||||
e.e[d->preamble_preamble].i);
|
e.e[d->preamble_preamble].i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rar(void *_d, event e)
|
void rar(void *_d, event e) {
|
||||||
{
|
|
||||||
ev_data *d = _d;
|
ev_data *d = _d;
|
||||||
trace(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
|
trace(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
|
||||||
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
|
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
|
||||||
@@ -159,114 +156,118 @@ void rar(void *_d, event e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
||||||
int preamble_id, int rar_id)
|
int preamble_id, int rar_id) {
|
||||||
{
|
|
||||||
database_event_format f;
|
database_event_format f;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
d->ul_rnti = -1;
|
d->ul_rnti = -1;
|
||||||
d->ul_frame = -1;
|
d->ul_frame = -1;
|
||||||
d->ul_subframe = -1;
|
d->ul_subframe = -1;
|
||||||
d->ul_data = -1;
|
d->ul_data = -1;
|
||||||
|
|
||||||
d->dl_rnti = -1;
|
d->dl_rnti = -1;
|
||||||
d->dl_frame = -1;
|
d->dl_frame = -1;
|
||||||
d->dl_subframe = -1;
|
d->dl_subframe = -1;
|
||||||
d->dl_data = -1;
|
d->dl_data = -1;
|
||||||
|
|
||||||
d->mib_frame = -1;
|
d->mib_frame = -1;
|
||||||
d->mib_subframe = -1;
|
d->mib_subframe = -1;
|
||||||
d->mib_data = -1;
|
d->mib_data = -1;
|
||||||
|
|
||||||
d->preamble_frame = -1;
|
d->preamble_frame = -1;
|
||||||
d->preamble_subframe = -1;
|
d->preamble_subframe = -1;
|
||||||
d->preamble_preamble = -1;
|
d->preamble_preamble = -1;
|
||||||
|
|
||||||
d->rar_rnti = -1;
|
d->rar_rnti = -1;
|
||||||
d->rar_frame = -1;
|
d->rar_frame = -1;
|
||||||
d->rar_subframe = -1;
|
d->rar_subframe = -1;
|
||||||
d->rar_data = -1;
|
d->rar_data = -1;
|
||||||
|
|
||||||
#define G(var_name, var_type, var) \
|
#define G(var_name, var_type, var) \
|
||||||
if (!strcmp(f.name[i], var_name)) { \
|
if (!strcmp(f.name[i], var_name)) { \
|
||||||
if (strcmp(f.type[i], var_type)) goto error; \
|
if (strcmp(f.type[i], var_type)) goto error; \
|
||||||
var = i; \
|
var = i; \
|
||||||
continue; \
|
continue; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ul: rnti, frame, subframe, data */
|
/* ul: rnti, frame, subframe, data */
|
||||||
f = get_format(database, ul_id);
|
f = get_format(database, ul_id);
|
||||||
|
|
||||||
for (i = 0; i < f.count; i++) {
|
for (i = 0; i < f.count; i++) {
|
||||||
G("rnti", "int", d->ul_rnti);
|
G("rnti", "int", d->ul_rnti);
|
||||||
G("frame", "int", d->ul_frame);
|
G("frame", "int", d->ul_frame);
|
||||||
G("subframe", "int", d->ul_subframe);
|
G("subframe", "int", d->ul_subframe);
|
||||||
G("data", "buffer", d->ul_data);
|
G("data", "buffer", d->ul_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->ul_rnti == -1 || d->ul_frame == -1 || d->ul_subframe == -1 ||
|
if (d->ul_rnti == -1 || d->ul_frame == -1 || d->ul_subframe == -1 ||
|
||||||
d->ul_data == -1) goto error;
|
d->ul_data == -1) goto error;
|
||||||
|
|
||||||
/* dl: rnti, frame, subframe, data */
|
/* dl: rnti, frame, subframe, data */
|
||||||
f = get_format(database, dl_id);
|
f = get_format(database, dl_id);
|
||||||
|
|
||||||
for (i = 0; i < f.count; i++) {
|
for (i = 0; i < f.count; i++) {
|
||||||
G("rnti", "int", d->dl_rnti);
|
G("rnti", "int", d->dl_rnti);
|
||||||
G("frame", "int", d->dl_frame);
|
G("frame", "int", d->dl_frame);
|
||||||
G("subframe", "int", d->dl_subframe);
|
G("subframe", "int", d->dl_subframe);
|
||||||
G("data", "buffer", d->dl_data);
|
G("data", "buffer", d->dl_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->dl_rnti == -1 || d->dl_frame == -1 || d->dl_subframe == -1 ||
|
if (d->dl_rnti == -1 || d->dl_frame == -1 || d->dl_subframe == -1 ||
|
||||||
d->dl_data == -1) goto error;
|
d->dl_data == -1) goto error;
|
||||||
|
|
||||||
/* MIB: frame, subframe, data */
|
/* MIB: frame, subframe, data */
|
||||||
f = get_format(database, mib_id);
|
f = get_format(database, mib_id);
|
||||||
|
|
||||||
for (i = 0; i < f.count; i++) {
|
for (i = 0; i < f.count; i++) {
|
||||||
G("frame", "int", d->mib_frame);
|
G("frame", "int", d->mib_frame);
|
||||||
G("subframe", "int", d->mib_subframe);
|
G("subframe", "int", d->mib_subframe);
|
||||||
G("data", "buffer", d->mib_data);
|
G("data", "buffer", d->mib_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->mib_frame == -1 || d->mib_subframe == -1 || d->mib_data == -1)
|
if (d->mib_frame == -1 || d->mib_subframe == -1 || d->mib_data == -1)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* preamble: frame, subframe, preamble */
|
/* preamble: frame, subframe, preamble */
|
||||||
f = get_format(database, preamble_id);
|
f = get_format(database, preamble_id);
|
||||||
|
|
||||||
for (i = 0; i < f.count; i++) {
|
for (i = 0; i < f.count; i++) {
|
||||||
G("frame", "int", d->preamble_frame);
|
G("frame", "int", d->preamble_frame);
|
||||||
G("subframe", "int", d->preamble_subframe);
|
G("subframe", "int", d->preamble_subframe);
|
||||||
G("preamble", "int", d->preamble_preamble);
|
G("preamble", "int", d->preamble_preamble);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->preamble_frame == -1 || d->preamble_subframe == -1 ||
|
if (d->preamble_frame == -1 || d->preamble_subframe == -1 ||
|
||||||
d->preamble_preamble == -1) goto error;
|
d->preamble_preamble == -1) goto error;
|
||||||
|
|
||||||
/* rar: rnti, frame, subframe, data */
|
/* rar: rnti, frame, subframe, data */
|
||||||
f = get_format(database, rar_id);
|
f = get_format(database, rar_id);
|
||||||
|
|
||||||
for (i = 0; i < f.count; i++) {
|
for (i = 0; i < f.count; i++) {
|
||||||
G("rnti", "int", d->rar_rnti);
|
G("rnti", "int", d->rar_rnti);
|
||||||
G("frame", "int", d->rar_frame);
|
G("frame", "int", d->rar_frame);
|
||||||
G("subframe", "int", d->rar_subframe);
|
G("subframe", "int", d->rar_subframe);
|
||||||
G("data", "buffer", d->rar_data);
|
G("data", "buffer", d->rar_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->rar_rnti == -1 || d->rar_frame == -1 || d->rar_subframe == -1 ||
|
if (d->rar_rnti == -1 || d->rar_frame == -1 || d->rar_subframe == -1 ||
|
||||||
d->rar_data == -1) goto error;
|
d->rar_data == -1) goto error;
|
||||||
|
|
||||||
#undef G
|
#undef G
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
printf("bad T_messages.txt\n");
|
printf("bad T_messages.txt\n");
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void *receiver(void *_d)
|
void *receiver(void *_d) {
|
||||||
{
|
|
||||||
ev_data *d = _d;
|
ev_data *d = _d;
|
||||||
int s;
|
int s;
|
||||||
char buf[100000];
|
char buf[100000];
|
||||||
|
|
||||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (s == -1) { perror("socket"); abort(); }
|
|
||||||
|
|
||||||
if (bind(s, (struct sockaddr *)&d->to, sizeof(struct sockaddr_in)) == -1)
|
if (s == -1) {
|
||||||
{ perror("bind"); abort(); }
|
perror("socket");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bind(s, (struct sockaddr *)&d->to, sizeof(struct sockaddr_in)) == -1) {
|
||||||
|
perror("bind");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (recv(s, buf, 100000, 0) <= 0) abort();
|
if (recv(s, buf, 100000, 0) <= 0) abort();
|
||||||
@@ -275,33 +276,31 @@ void *receiver(void *_d)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void usage(void)
|
void usage(void) {
|
||||||
{
|
|
||||||
printf(
|
printf(
|
||||||
"options:\n"
|
"options:\n"
|
||||||
" -d <database file> this option is mandatory\n"
|
" -d <database file> this option is mandatory\n"
|
||||||
" -i <dump file> read events from this dump file\n"
|
" -i <dump file> read events from this dump file\n"
|
||||||
" -ip <IP address> send packets to this IP address (default %s)\n"
|
" -ip <IP address> send packets to this IP address (default %s)\n"
|
||||||
" -p <port> send packets to this port (default %d)\n"
|
" -p <port> send packets to this port (default %d)\n"
|
||||||
" -no-mib do not report MIB\n"
|
" -no-mib do not report MIB\n"
|
||||||
" -no-sib do not report SIBs\n"
|
" -no-sib do not report SIBs\n"
|
||||||
" -max-mib <n> report at maximum n MIB\n"
|
" -max-mib <n> report at maximum n MIB\n"
|
||||||
" -max-sib <n> report at maximum n SIBs\n"
|
" -max-sib <n> report at maximum n SIBs\n"
|
||||||
" -live run live\n"
|
" -live run live\n"
|
||||||
" -live-ip <IP address> tracee's IP address (default %p)\n"
|
" -live-ip <IP address> tracee's IP address (default %s)\n"
|
||||||
" -live-port <por> tracee's port (default %d)\n"
|
" -live-port <port> tracee's port (default %d)\n"
|
||||||
"-i and -live are mutually exclusive options. One of them must be provided\n"
|
"-i and -live are mutually exclusive options. One of them must be provided\n"
|
||||||
"but not both.\n",
|
"but not both.\n",
|
||||||
DEFAULT_IP,
|
DEFAULT_IP,
|
||||||
DEFAULT_PORT,
|
DEFAULT_PORT,
|
||||||
DEFAULT_LIVE_IP,
|
DEFAULT_LIVE_IP,
|
||||||
DEFAULT_LIVE_PORT
|
DEFAULT_LIVE_PORT
|
||||||
);
|
);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int n, char **v)
|
int main(int n, char **v) {
|
||||||
{
|
|
||||||
char *database_filename = NULL;
|
char *database_filename = NULL;
|
||||||
char *input_filename = NULL;
|
char *input_filename = NULL;
|
||||||
void *database;
|
void *database;
|
||||||
@@ -315,28 +314,82 @@ int main(int n, char **v)
|
|||||||
char *live_ip = DEFAULT_LIVE_IP;
|
char *live_ip = DEFAULT_LIVE_IP;
|
||||||
int live_port = DEFAULT_LIVE_PORT;
|
int live_port = DEFAULT_LIVE_PORT;
|
||||||
int live = 0;
|
int live = 0;
|
||||||
|
|
||||||
memset(&d, 0, sizeof(ev_data));
|
memset(&d, 0, sizeof(ev_data));
|
||||||
|
|
||||||
for (i = 1; i < n; i++) {
|
for (i = 1; i < n; i++) {
|
||||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||||
if (!strcmp(v[i], "-d"))
|
|
||||||
{ if (i > n-2) usage(); database_filename = v[++i]; continue; }
|
if (!strcmp(v[i], "-d")) {
|
||||||
if (!strcmp(v[i], "-i"))
|
if (i > n-2) usage();
|
||||||
{ if (i > n-2) usage(); input_filename = v[++i]; continue; }
|
|
||||||
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
|
database_filename = v[++i];
|
||||||
if (!strcmp(v[i], "-p")) {if(i>n-2)usage(); port=atoi(v[++i]); continue; }
|
continue;
|
||||||
if (!strcmp(v[i], "-no-mib")) { d.no_mib = 1; continue; }
|
}
|
||||||
if (!strcmp(v[i], "-no-sib")) { d.no_sib = 1; continue; }
|
|
||||||
if (!strcmp(v[i], "-max-mib"))
|
if (!strcmp(v[i], "-i")) {
|
||||||
{ if (i > n-2) usage(); d.max_mib = atoi(v[++i]); continue; }
|
if (i > n-2) usage();
|
||||||
if (!strcmp(v[i], "-max-sib"))
|
|
||||||
{ if (i > n-2) usage(); d.max_sib = atoi(v[++i]); continue; }
|
input_filename = v[++i];
|
||||||
if (!strcmp(v[i], "-live")) { live = 1; continue; }
|
continue;
|
||||||
if (!strcmp(v[i], "-live-ip"))
|
}
|
||||||
{ if (i > n-2) usage(); live_ip = v[++i]; continue; }
|
|
||||||
if (!strcmp(v[i], "-live-port"))
|
if (!strcmp(v[i], "-ip")) {
|
||||||
{ if (i > n-2) usage(); live_port = atoi(v[++i]); continue; }
|
if (i > n-2) usage();
|
||||||
|
|
||||||
|
ip = v[++i];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-p")) {
|
||||||
|
if(i>n-2)usage();
|
||||||
|
|
||||||
|
port=atoi(v[++i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-no-mib")) {
|
||||||
|
d.no_mib = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-no-sib")) {
|
||||||
|
d.no_sib = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-max-mib")) {
|
||||||
|
if (i > n-2) usage();
|
||||||
|
|
||||||
|
d.max_mib = atoi(v[++i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-max-sib")) {
|
||||||
|
if (i > n-2) usage();
|
||||||
|
|
||||||
|
d.max_sib = atoi(v[++i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-live")) {
|
||||||
|
live = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-live-ip")) {
|
||||||
|
if (i > n-2) usage();
|
||||||
|
|
||||||
|
live_ip = v[++i];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcmp(v[i], "-live-port")) {
|
||||||
|
if (i > n-2) usage();
|
||||||
|
|
||||||
|
live_port = atoi(v[++i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,25 +410,34 @@ int main(int n, char **v)
|
|||||||
|
|
||||||
if (live == 0) {
|
if (live == 0) {
|
||||||
in = open(input_filename, O_RDONLY);
|
in = open(input_filename, O_RDONLY);
|
||||||
if (in == -1) { perror(input_filename); return 1; }
|
|
||||||
|
if (in == -1) {
|
||||||
|
perror(input_filename);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
in = connect_to(live_ip, live_port);
|
in = connect_to(live_ip, live_port);
|
||||||
|
|
||||||
database = parse_database(database_filename);
|
database = parse_database(database_filename);
|
||||||
load_config_file(database_filename);
|
load_config_file(database_filename);
|
||||||
|
|
||||||
h = new_handler(database);
|
h = new_handler(database);
|
||||||
|
|
||||||
if (live) {
|
if (live) {
|
||||||
char mt = 1;
|
char mt = 1;
|
||||||
int number_of_events = number_of_ids(database);
|
int number_of_events = number_of_ids(database);
|
||||||
int *is_on = calloc(number_of_events, sizeof(int));
|
int *is_on = calloc(number_of_events, sizeof(int));
|
||||||
if (is_on == NULL) { printf("ERROR: out of memory\n"); exit(1); }
|
|
||||||
|
if (is_on == NULL) {
|
||||||
|
printf("ERROR: out of memory\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
on_off(database, "ENB_MAC_UE_UL_PDU_WITH_DATA", is_on, 1);
|
on_off(database, "ENB_MAC_UE_UL_PDU_WITH_DATA", is_on, 1);
|
||||||
on_off(database, "ENB_MAC_UE_DL_PDU_WITH_DATA", is_on, 1);
|
on_off(database, "ENB_MAC_UE_DL_PDU_WITH_DATA", is_on, 1);
|
||||||
on_off(database, "ENB_PHY_MIB", is_on, 1);
|
on_off(database, "ENB_PHY_MIB", is_on, 1);
|
||||||
on_off(database, "ENB_PHY_INITIATE_RA_PROCEDURE", is_on, 1);
|
on_off(database, "ENB_PHY_INITIATE_RA_PROCEDURE", is_on, 1);
|
||||||
on_off(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA", is_on, 1);
|
on_off(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA", is_on, 1);
|
||||||
|
|
||||||
/* activate selected traces */
|
/* activate selected traces */
|
||||||
if (socket_send(in, &mt, 1) == -1 ||
|
if (socket_send(in, &mt, 1) == -1 ||
|
||||||
socket_send(in, &number_of_events, sizeof(int)) == -1 ||
|
socket_send(in, &number_of_events, sizeof(int)) == -1 ||
|
||||||
@@ -383,6 +445,7 @@ int main(int n, char **v)
|
|||||||
printf("ERROR: socket_send failed\n");
|
printf("ERROR: socket_send failed\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(is_on);
|
free(is_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,31 +455,34 @@ int main(int n, char **v)
|
|||||||
preamble_id = event_id_from_name(database, "ENB_PHY_INITIATE_RA_PROCEDURE");
|
preamble_id = event_id_from_name(database, "ENB_PHY_INITIATE_RA_PROCEDURE");
|
||||||
rar_id = event_id_from_name(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA");
|
rar_id = event_id_from_name(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA");
|
||||||
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id);
|
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id);
|
||||||
|
|
||||||
register_handler_function(h, ul_id, ul, &d);
|
register_handler_function(h, ul_id, ul, &d);
|
||||||
register_handler_function(h, dl_id, dl, &d);
|
register_handler_function(h, dl_id, dl, &d);
|
||||||
register_handler_function(h, mib_id, mib, &d);
|
register_handler_function(h, mib_id, mib, &d);
|
||||||
register_handler_function(h, preamble_id, preamble, &d);
|
register_handler_function(h, preamble_id, preamble, &d);
|
||||||
register_handler_function(h, rar_id, rar, &d);
|
register_handler_function(h, rar_id, rar, &d);
|
||||||
|
|
||||||
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
|
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (d.socket == -1) { perror("socket"); exit(1); }
|
|
||||||
|
if (d.socket == -1) {
|
||||||
|
perror("socket");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
d.to.sin_family = AF_INET;
|
d.to.sin_family = AF_INET;
|
||||||
d.to.sin_port = htons(port);
|
d.to.sin_port = htons(port);
|
||||||
d.to.sin_addr.s_addr = inet_addr(ip);
|
d.to.sin_addr.s_addr = inet_addr(ip);
|
||||||
|
|
||||||
new_thread(receiver, &d);
|
new_thread(receiver, &d);
|
||||||
|
|
||||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||||
|
|
||||||
/* read messages */
|
/* read messages */
|
||||||
while (1) {
|
while (1) {
|
||||||
event e;
|
event e;
|
||||||
e = get_event(in, &ebuf, database);
|
e = get_event(in, &ebuf, database);
|
||||||
|
|
||||||
if (e.type == -1) break;
|
if (e.type == -1) break;
|
||||||
|
|
||||||
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
|
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
|
||||||
e.type == preamble_id || e.type == rar_id)) continue;
|
e.type == preamble_id || e.type == rar_id)) continue;
|
||||||
|
|
||||||
handle_event(h, e);
|
handle_event(h, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -195,5 +195,8 @@ int main(int n, char **v)
|
|||||||
handle_event(h, e);
|
handle_event(h, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(on_off_name);
|
||||||
|
free(on_off_action);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+100
-67
@@ -9,27 +9,38 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
void new_thread(void *(*f)(void *), void *data)
|
void new_thread(void *(*f)(void *), void *data) {
|
||||||
{
|
|
||||||
pthread_t t;
|
pthread_t t;
|
||||||
pthread_attr_t att;
|
pthread_attr_t att;
|
||||||
|
|
||||||
if (pthread_attr_init(&att))
|
if (pthread_attr_init(&att)) {
|
||||||
{ fprintf(stderr, "pthread_attr_init err\n"); exit(1); }
|
fprintf(stderr, "pthread_attr_init err\n");
|
||||||
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED))
|
exit(1);
|
||||||
{ fprintf(stderr, "pthread_attr_setdetachstate err\n"); exit(1); }
|
}
|
||||||
if (pthread_attr_setstacksize(&att, 10000000))
|
|
||||||
{ fprintf(stderr, "pthread_attr_setstacksize err\n"); exit(1); }
|
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
|
||||||
if (pthread_create(&t, &att, f, data))
|
fprintf(stderr, "pthread_attr_setdetachstate err\n");
|
||||||
{ fprintf(stderr, "pthread_create err\n"); exit(1); }
|
exit(1);
|
||||||
if (pthread_attr_destroy(&att))
|
}
|
||||||
{ fprintf(stderr, "pthread_attr_destroy err\n"); exit(1); }
|
|
||||||
|
if (pthread_attr_setstacksize(&att, 10000000)) {
|
||||||
|
fprintf(stderr, "pthread_attr_setstacksize err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_create(&t, &att, f, data)) {
|
||||||
|
fprintf(stderr, "pthread_create err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pthread_attr_destroy(&att)) {
|
||||||
|
fprintf(stderr, "pthread_attr_destroy err\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sleepms(int ms)
|
void sleepms(int ms) {
|
||||||
{
|
|
||||||
struct timespec t;
|
struct timespec t;
|
||||||
|
|
||||||
t.tv_sec = ms / 1000;
|
t.tv_sec = ms / 1000;
|
||||||
t.tv_nsec = (ms % 1000) * 1000000L;
|
t.tv_nsec = (ms % 1000) * 1000000L;
|
||||||
|
|
||||||
@@ -37,12 +48,15 @@ void sleepms(int ms)
|
|||||||
if (nanosleep(&t, NULL)) abort();
|
if (nanosleep(&t, NULL)) abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bps(char *out, float v, char *suffix)
|
void bps(char *out, float v, char *suffix) {
|
||||||
{
|
|
||||||
static char *bps_unit[4] = { "", "k", "M", "G" };
|
static char *bps_unit[4] = { "", "k", "M", "G" };
|
||||||
int flog;
|
int flog;
|
||||||
if (v < 1000) flog = 0; else flog = floor(floor(log10(v)) / 3);
|
|
||||||
|
if (v < 1000) flog = 0;
|
||||||
|
else flog = floor(floor(log10(v)) / 3);
|
||||||
|
|
||||||
if (flog > 3) flog = 3;
|
if (flog > 3) flog = 3;
|
||||||
|
|
||||||
v /= pow(10, flog*3);
|
v /= pow(10, flog*3);
|
||||||
sprintf(out, "%g%s%s", round(v*100)/100, bps_unit[flog], suffix);
|
sprintf(out, "%g%s%s", round(v*100)/100, bps_unit[flog], suffix);
|
||||||
}
|
}
|
||||||
@@ -51,25 +65,31 @@ void bps(char *out, float v, char *suffix)
|
|||||||
/* list */
|
/* list */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
list *list_remove_head(list *l)
|
list *list_remove_head(list *l) {
|
||||||
{
|
|
||||||
list *ret;
|
list *ret;
|
||||||
|
|
||||||
if (l == NULL) return NULL;
|
if (l == NULL) return NULL;
|
||||||
|
|
||||||
ret = l->next;
|
ret = l->next;
|
||||||
|
|
||||||
if (ret != NULL) ret->last = l->last;
|
if (ret != NULL) ret->last = l->last;
|
||||||
|
|
||||||
free(l);
|
free(l);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
list *list_append(list *l, void *data)
|
list *list_append(list *l, void *data) {
|
||||||
{
|
|
||||||
list *new = calloc(1, sizeof(list));
|
list *new = calloc(1, sizeof(list));
|
||||||
|
|
||||||
if (new == NULL) abort();
|
if (new == NULL) abort();
|
||||||
|
|
||||||
new->data = data;
|
new->data = data;
|
||||||
|
|
||||||
if (l == NULL) {
|
if (l == NULL) {
|
||||||
new->last = new;
|
new->last = new;
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
l->last->next = new;
|
l->last->next = new;
|
||||||
l->last = new;
|
l->last = new;
|
||||||
return l;
|
return l;
|
||||||
@@ -79,88 +99,107 @@ list *list_append(list *l, void *data)
|
|||||||
/* socket */
|
/* socket */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
int create_listen_socket(char *addr, int port)
|
int create_listen_socket(char *addr, int port) {
|
||||||
{
|
|
||||||
struct sockaddr_in a;
|
struct sockaddr_in a;
|
||||||
int s;
|
int s;
|
||||||
int v;
|
int v;
|
||||||
|
|
||||||
s = socket(AF_INET, SOCK_STREAM, 0);
|
s = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if (s == -1) { perror("socket"); exit(1); }
|
|
||||||
|
if (s == -1) {
|
||||||
|
perror("socket");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
v = 1;
|
v = 1;
|
||||||
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &v, sizeof(int)))
|
|
||||||
{ perror("setsockopt"); exit(1); }
|
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &v, sizeof(int))) {
|
||||||
|
perror("setsockopt");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
a.sin_family = AF_INET;
|
a.sin_family = AF_INET;
|
||||||
a.sin_port = htons(port);
|
a.sin_port = htons(port);
|
||||||
a.sin_addr.s_addr = inet_addr(addr);
|
a.sin_addr.s_addr = inet_addr(addr);
|
||||||
|
|
||||||
if (bind(s, (struct sockaddr *)&a, sizeof(a))) { perror("bind"); exit(1); }
|
if (bind(s, (struct sockaddr *)&a, sizeof(a))) {
|
||||||
if (listen(s, 5)) { perror("listen"); exit(1); }
|
perror("bind");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listen(s, 5)) {
|
||||||
|
perror("listen");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
int socket_accept(int s)
|
int socket_accept(int s) {
|
||||||
{
|
|
||||||
struct sockaddr_in a;
|
struct sockaddr_in a;
|
||||||
socklen_t alen;
|
socklen_t alen;
|
||||||
alen = sizeof(a);
|
alen = sizeof(a);
|
||||||
return accept(s, (struct sockaddr *)&a, &alen);
|
return accept(s, (struct sockaddr *)&a, &alen);
|
||||||
}
|
}
|
||||||
|
|
||||||
int socket_send(int socket, void *buffer, int size)
|
int socket_send(int socket, void *buffer, int size) {
|
||||||
{
|
|
||||||
char *x = buffer;
|
char *x = buffer;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
while (size) {
|
while (size) {
|
||||||
ret = write(socket, x, size);
|
ret = write(socket, x, size);
|
||||||
|
|
||||||
if (ret <= 0) return -1;
|
if (ret <= 0) return -1;
|
||||||
|
|
||||||
size -= ret;
|
size -= ret;
|
||||||
x += ret;
|
x += ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_connection(char *addr, int port)
|
int get_connection(char *addr, int port) {
|
||||||
{
|
|
||||||
int s, t;
|
int s, t;
|
||||||
|
|
||||||
printf("waiting for connection on %s:%d\n", addr, port);
|
printf("waiting for connection on %s:%d\n", addr, port);
|
||||||
|
|
||||||
s = create_listen_socket(addr, port);
|
s = create_listen_socket(addr, port);
|
||||||
|
|
||||||
t = socket_accept(s);
|
t = socket_accept(s);
|
||||||
if (t == -1) { perror("accept"); exit(1); }
|
|
||||||
|
if (t == -1) {
|
||||||
|
perror("accept");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
close(s);
|
close(s);
|
||||||
|
|
||||||
printf("connected\n");
|
printf("connected\n");
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fullread(int fd, void *_buf, int count)
|
int fullread(int fd, void *_buf, int count) {
|
||||||
{
|
|
||||||
char *buf = _buf;
|
char *buf = _buf;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
while (count) {
|
while (count) {
|
||||||
l = read(fd, buf, count);
|
l = read(fd, buf, count);
|
||||||
|
|
||||||
if (l <= 0) return -1;
|
if (l <= 0) return -1;
|
||||||
|
|
||||||
count -= l;
|
count -= l;
|
||||||
buf += l;
|
buf += l;
|
||||||
ret += l;
|
ret += l;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int try_connect_to(char *addr, int port)
|
int try_connect_to(char *addr, int port) {
|
||||||
{
|
|
||||||
int s;
|
int s;
|
||||||
struct sockaddr_in a;
|
struct sockaddr_in a;
|
||||||
|
|
||||||
s = socket(AF_INET, SOCK_STREAM, 0);
|
s = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if (s == -1) { perror("socket"); exit(1); }
|
|
||||||
|
if (s == -1) {
|
||||||
|
perror("socket");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
a.sin_family = AF_INET;
|
a.sin_family = AF_INET;
|
||||||
a.sin_port = htons(port);
|
a.sin_port = htons(port);
|
||||||
@@ -175,14 +214,12 @@ int try_connect_to(char *addr, int port)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
int connect_to(char *addr, int port)
|
int connect_to(char *addr, int port) {
|
||||||
{
|
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
printf("connecting to %s:%d\n", addr, port);
|
printf("connecting to %s:%d\n", addr, port);
|
||||||
|
|
||||||
again:
|
again:
|
||||||
s = try_connect_to(addr, port);
|
s = try_connect_to(addr, port);
|
||||||
|
|
||||||
if (s == -1) {
|
if (s == -1) {
|
||||||
printf("trying again in 1s\n");
|
printf("trying again in 1s\n");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@@ -196,50 +233,46 @@ again:
|
|||||||
/* buffer */
|
/* buffer */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
void PUTC(OBUF *o, char c)
|
void PUTC(OBUF *o, char c) {
|
||||||
{
|
|
||||||
if (o->osize == o->omaxsize) {
|
if (o->osize == o->omaxsize) {
|
||||||
o->omaxsize += 512;
|
o->omaxsize += 512;
|
||||||
o->obuf = realloc(o->obuf, o->omaxsize);
|
o->obuf = realloc(o->obuf, o->omaxsize);
|
||||||
|
|
||||||
if (o->obuf == NULL) abort();
|
if (o->obuf == NULL) abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
o->obuf[o->osize] = c;
|
o->obuf[o->osize] = c;
|
||||||
o->osize++;
|
o->osize++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PUTS(OBUF *o, char *s)
|
void PUTS(OBUF *o, char *s) {
|
||||||
{
|
|
||||||
while (*s) PUTC(o, *s++);
|
while (*s) PUTC(o, *s++);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int clean(char c)
|
static int clean(char c) {
|
||||||
{
|
|
||||||
if (!isprint(c)) c = ' ';
|
if (!isprint(c)) c = ' ';
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PUTS_CLEAN(OBUF *o, char *s)
|
void PUTS_CLEAN(OBUF *o, char *s) {
|
||||||
{
|
|
||||||
while (*s) PUTC(o, clean(*s++));
|
while (*s) PUTC(o, clean(*s++));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PUTI(OBUF *o, int i)
|
void PUTI(OBUF *o, int i) {
|
||||||
{
|
|
||||||
char s[64];
|
char s[64];
|
||||||
sprintf(s, "%d", i);
|
sprintf(s, "%d", i);
|
||||||
PUTS(o, s);
|
PUTS(o, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PUTX2(OBUF *o, int i)
|
void PUTX2(OBUF *o, int i) {
|
||||||
{
|
|
||||||
char s[64];
|
char s[64];
|
||||||
sprintf(s, "%2.2x", i);
|
sprintf(s, "%2.2x", i);
|
||||||
PUTS(o, s);
|
PUTS(o, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PUTUL(OBUF *o, unsigned long l)
|
void PUTUL(OBUF *o, unsigned long l) {
|
||||||
{
|
|
||||||
char s[128];
|
char s[128];
|
||||||
sprintf(s, "%ld", l);
|
sprintf(s, "%lu", l);
|
||||||
PUTS(o, s);
|
PUTS(o, s);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,13 +35,11 @@
|
|||||||
|
|
||||||
void output_log_mem(void);
|
void output_log_mem(void);
|
||||||
#define _Assert_Exit_ \
|
#define _Assert_Exit_ \
|
||||||
{ \
|
|
||||||
fprintf(stderr, "\nExiting execution\n"); \
|
fprintf(stderr, "\nExiting execution\n"); \
|
||||||
display_backtrace(); \
|
display_backtrace(); \
|
||||||
fflush(stdout); \
|
fflush(stdout); \
|
||||||
fflush(stderr); \
|
fflush(stderr); \
|
||||||
exit(EXIT_FAILURE); \
|
exit(EXIT_FAILURE); \
|
||||||
}
|
|
||||||
|
|
||||||
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
|
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
|
||||||
do { \
|
do { \
|
||||||
|
|||||||
@@ -31,18 +31,18 @@
|
|||||||
#include "backtrace.h"
|
#include "backtrace.h"
|
||||||
|
|
||||||
/* Obtain a backtrace and print it to stdout. */
|
/* Obtain a backtrace and print it to stdout. */
|
||||||
void display_backtrace(void)
|
void display_backtrace(void) {
|
||||||
{
|
|
||||||
void *array[10];
|
void *array[10];
|
||||||
size_t size;
|
size_t size;
|
||||||
char **strings;
|
char **strings;
|
||||||
size_t i;
|
size_t i;
|
||||||
char* test=getenv("NO_BACKTRACE");
|
char *test=getenv("NO_BACKTRACE");
|
||||||
if (test!=0) *((int*)0)=0;
|
|
||||||
|
if (test!=0) *((int *)0)=0;
|
||||||
|
|
||||||
size = backtrace(array, 10);
|
size = backtrace(array, 10);
|
||||||
strings = backtrace_symbols(array, size);
|
strings = backtrace_symbols(array, size);
|
||||||
|
printf("Obtained %u stack frames.\n", (unsigned int)size);
|
||||||
printf("Obtained %zd stack frames.\n", size);
|
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
printf("%s\n", strings[i]);
|
printf("%s\n", strings[i]);
|
||||||
@@ -50,8 +50,7 @@ void display_backtrace(void)
|
|||||||
free(strings);
|
free(strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void backtrace_handle_signal(siginfo_t *info)
|
void backtrace_handle_signal(siginfo_t *info) {
|
||||||
{
|
|
||||||
display_backtrace();
|
display_backtrace();
|
||||||
//exit(EXIT_FAILURE);
|
//exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user