mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-19 15:40:30 +00:00
Compare commits
9 Commits
vrtsim_com
...
tutorial-v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6103a6fe5d | ||
|
|
b98b0c4d32 | ||
|
|
1d659aaf9c | ||
|
|
58a26fd8b4 | ||
|
|
15f1b77077 | ||
|
|
54c5590eee | ||
|
|
cf9b1b12dc | ||
|
|
fea52dc3d0 | ||
|
|
48c10bee5c |
@@ -62,7 +62,6 @@ ForEachMacros:
|
||||
- BOOST_FOREACH
|
||||
- RB_FOREACH
|
||||
- UE_iterator
|
||||
- FOR_EACH_SEQ_ARR
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^<ext/.*\.h>'
|
||||
|
||||
66
CHANGELOG.md
66
CHANGELOG.md
@@ -1,71 +1,5 @@
|
||||
# RELEASE NOTES: #
|
||||
|
||||
## [v2.4.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.4.0) -> December 2025. ##
|
||||
|
||||
General new features and improvements (both RAN and UE):
|
||||
- Rework LDPC BBdev/AAL interface and support both AMD T2/Intel vRAN Boost
|
||||
(VRB) 1 accelerators
|
||||
- Add a taps client for vrtsim real-time simulator (check: vrtsim release?)
|
||||
- Add new RFemulator virtual radio driver to emulate radio (including noise
|
||||
generation) for gNB/UE standalone operation
|
||||
- RLC AM reception improvements for high-throughput scenarios (!3512)
|
||||
- Small NTN fixes (!3659, !3666, !3581, !3652)
|
||||
- Improvements to imScope
|
||||
|
||||
Stability and bug fixes:
|
||||
- RFsimulator: fix concurrency problems during multi-client connection
|
||||
- USRP driver: support synchronization of USRP B200
|
||||
- MAC scheduler improvements
|
||||
- General L1 improvements for efficiency and stability
|
||||
- Correct PRS bug and test in CI
|
||||
- Upgrade Ubuntu container images to Ubuntu 24.04
|
||||
- All build system targets compile (`make/ninja all`)
|
||||
- Minor cleanup, harmonization, and performance improvements all over the stack
|
||||
- Simplify CI code
|
||||
|
||||
RAN changes (gNB/CU/CU-CP/CU-UP/DU/DU-high/DU-low):
|
||||
- Support of N2 handover
|
||||
- Support of "UL-heavy" TDD patterns, e.g., DSUUU
|
||||
- Open Fronthaul M-plane: CM improvements, PM implementation, and additional
|
||||
v16.01 support
|
||||
- Improve interoperability with Nvidia Aerial L1 to support 2 layer UL
|
||||
- Add O-RAN OSC WLS library as FAPI transport and enable L1/L2 shared memory
|
||||
split
|
||||
- Implement FAPI Stop exchange
|
||||
- Improve interoperability with srsRAN_Project DU
|
||||
- Add new synchronized real-time data recording application (!3462)
|
||||
- Support for measurement gaps and general handover fixes
|
||||
- Support of RRC PDU session release procedure
|
||||
- Add CU-UP load tester
|
||||
- Correct BWP scheduling and support multiple BWPs per UE
|
||||
|
||||
nrUE changes:
|
||||
- Support one additional PDU session (see !3486)
|
||||
- L3 measurements for A2 measurement reports
|
||||
- Support for type0 PDSCH frequency allocation
|
||||
- UE symbol based PDCCH receiver
|
||||
|
||||
Regression or removals:
|
||||
- No known regressions
|
||||
- Unused L2 simulator code has been removed
|
||||
- Unused Benetel radio driver code (not FHI 7.2!) has been removed
|
||||
|
||||
Configuration file changes:
|
||||
- `gNBs.[0].servingCellConfigCommon.[0].ra_ResponseWindow` is automatically
|
||||
computed and can be removed
|
||||
- `gNBs.[0].bwp_list` has been added (moved from entries in
|
||||
`gNBs.[0].servingCellConfigDedicated`)
|
||||
- `gNBs.[0].phaseTrackingRS` has been added (moved from entries in
|
||||
`gNBs.[0].servingCellConfigDedicated`)
|
||||
- `gNBs.[0].local_s_portc` and `gNBs.[0].remote_s_portc` have no effect and
|
||||
should be removed
|
||||
- `gNBs.[0].CSI_report_type` has been added
|
||||
- `MACRLCs.[0].ulsch_max_frame_inactivity` is automatically computed and can be
|
||||
removed
|
||||
- `MACRLCs.[0].local_n_portc` and `MACRLCs.[0].remote_n_portc` have no effect and
|
||||
should be removed
|
||||
- `MACRLCs.[0].stats_max_ue` has been added
|
||||
|
||||
## [v2.3.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.3.0) -> July 2025. ##
|
||||
|
||||
General new features and improvements (both RAN and UE):
|
||||
|
||||
@@ -282,7 +282,7 @@ add_boolean_option(TRACY_ENABLE OFF "Enable tracy instrumentation" ON)
|
||||
if (TRACY_ENABLE)
|
||||
# the tracy version here should match the tracy server version
|
||||
# below is latest release as of this commit
|
||||
CPMAddPackage("gh:wolfpld/tracy#0.12.2")
|
||||
CPMAddPackage("gh:wolfpld/tracy#v0.12.2")
|
||||
endif()
|
||||
|
||||
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
||||
@@ -464,9 +464,6 @@ target_include_directories(f1ap PUBLIC F1AP_DIR)
|
||||
target_link_libraries(f1ap PUBLIC asn1_f1ap GTPV1U)
|
||||
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE f1ap_lib)
|
||||
target_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib)
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(f1ap PRIVATE E2_AGENT)
|
||||
endif()
|
||||
|
||||
# LPP
|
||||
##############
|
||||
@@ -655,6 +652,7 @@ add_library(SCHED_LIB ${SCHED_SRC})
|
||||
target_link_libraries(SCHED_LIB PRIVATE asn1_lte_rrc_hdrs)
|
||||
|
||||
set(SCHED_NR_SRC
|
||||
${OPENAIR1_DIR}/SCHED_NR/fapi_nr_l1.c
|
||||
${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_gNB.c
|
||||
${OPENAIR1_DIR}/SCHED_NR/nr_prach_procedures.c
|
||||
${OPENAIR1_DIR}/SCHED_NR/phy_frame_config_nr.c
|
||||
@@ -941,6 +939,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dci.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dci_tools.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dlsch.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dlsch_tools.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dlsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch.c
|
||||
@@ -979,7 +978,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ntn_l1.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_pbch.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_psbch_rx.c
|
||||
@@ -1039,11 +1037,11 @@ pkg_check_modules(lapacke REQUIRED lapacke)
|
||||
|
||||
add_library(PHY_UE ${PHY_SRC_UE})
|
||||
target_link_libraries(PHY_UE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
|
||||
# RHEL needs also cblas, but Ubuntu does not have it. So `cblas_LIBRARIES` and
|
||||
# `cblas_INCLUDE_DIRS` will be empty for Ubuntu, a no-op
|
||||
# RHEL needs also cblas, but Ubuntu does not have it. So `cblas_LIBRARIES` will
|
||||
# be empty for Ubuntu, a no-op
|
||||
pkg_check_modules(cblas cblas)
|
||||
target_link_libraries(PHY_UE PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES})
|
||||
target_include_directories(PHY_UE PRIVATE ${blas_INCLUDE_DIRS} ${cblas_INCLUDE_DIRS} ${lapacke_INCLUDE_DIRS})
|
||||
target_include_directories(PHY_UE PRIVATE ${blas_INCLUDE_DIRS} ${lapacke_INCLUDE_DIRS})
|
||||
|
||||
add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON})
|
||||
target_link_libraries(PHY_NR_COMMON PUBLIC UTIL)
|
||||
@@ -1217,6 +1215,7 @@ set (MAC_SRC
|
||||
|
||||
set (MAC_NR_SRC
|
||||
${NR_PHY_INTERFACE_DIR}/NR_IF_Module.c
|
||||
${NR_PHY_INTERFACE_DIR}/nr_sched_response.c
|
||||
${NR_GNB_MAC_DIR}/main.c
|
||||
${NR_GNB_MAC_DIR}/config.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler.c
|
||||
@@ -1284,6 +1283,12 @@ set (MISC_NFAPI_LTE
|
||||
|
||||
add_library(MISC_NFAPI_LTE_LIB ${MISC_NFAPI_LTE})
|
||||
|
||||
set (MISC_NFAPI_NR
|
||||
${OPENAIR1_DIR}/SCHED/nfapi_nr_dummy.c
|
||||
)
|
||||
|
||||
add_library(MISC_NFAPI_NR_LIB ${MISC_NFAPI_NR})
|
||||
|
||||
add_library(L2
|
||||
${L2_SRC}
|
||||
${MAC_SRC}
|
||||
@@ -1292,9 +1297,6 @@ add_library(L2
|
||||
)
|
||||
target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap)
|
||||
target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
endif()
|
||||
|
||||
add_library(MAC_UE_NR ${MAC_NR_SRC_UE})
|
||||
target_link_libraries(MAC_UE_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs PUBLIC nr_ue_power_procedures nr_ue_ra_procedures)
|
||||
@@ -1310,9 +1312,6 @@ add_library(L2_NR
|
||||
target_link_libraries(L2_NR PRIVATE ds alg)
|
||||
target_link_libraries(L2_NR PRIVATE f1ap_lib)
|
||||
target_include_directories(L2_NR PRIVATE ${F1AP_DIR}/lib)
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
endif()
|
||||
|
||||
add_library(e1_if
|
||||
${NR_RRC_DIR}/cucp_cuup_direct.c
|
||||
@@ -2092,7 +2091,7 @@ if (${T_TRACER})
|
||||
oai_eth_transpro HASHTABLE UTIL
|
||||
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
|
||||
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||
MISC_NFAPI_LTE_LIB
|
||||
MISC_NFAPI_LTE_LIB MISC_NFAPI_NR_LIB
|
||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU
|
||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_UE_NR ngap
|
||||
GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE SIMU
|
||||
|
||||
@@ -380,29 +380,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("VRT-Sim-Test-5G") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-VRT-Sim-Test-5G', 'VRT-Sim-Test-5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
vrtSim5GStatus = finalizeSlaveJob('RAN-VRT-Sim-Test-5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += vrtSim5GStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("RF-Sim-Test-5G") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
steps {
|
||||
|
||||
228
ci-scripts/Jenkinsfile-cluster
Normal file
228
ci-scripts/Jenkinsfile-cluster
Normal file
@@ -0,0 +1,228 @@
|
||||
#!/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
|
||||
*/
|
||||
|
||||
// Location of the executor node
|
||||
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 resource
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// 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
|
||||
|
||||
def directoryExistsGlob(fileNameWithGlob) {
|
||||
/* if multiple directories match, will join their names and call fileExists() on that */
|
||||
def dir = sh returnStdout: true, script: 'find . -name \'' + fileNameWithGlob + '\' -type d'
|
||||
dir = dir.replaceAll("\n", "").trim()
|
||||
echo "matching '" + fileNameWithGlob + "' found: '" + dir + "'"
|
||||
if (dir == "")
|
||||
return false
|
||||
return fileExists(dir)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Pipeline start
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ('Verify Parameters') {
|
||||
steps {
|
||||
script {
|
||||
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||
|
||||
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
|
||||
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
|
||||
|
||||
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 Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == null) {
|
||||
echo "no eNB_SourceCodePath given"
|
||||
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}"
|
||||
}
|
||||
} else {
|
||||
echo "no eNB_mergeRequest given - not merging develop"
|
||||
}
|
||||
|
||||
if (params.OC_Credentials == null) {
|
||||
echo "no OC_Credentials given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.OC_ProjectName == null) {
|
||||
echo "no OC_ProjectName given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.pythonTestXmlFile == null) {
|
||||
echo "no pythonTestXmlFile given"
|
||||
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 ("Deploy and Test") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Log Collection") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
if (directoryExistsGlob("build_log_*")) {
|
||||
sh "zip -r -qq build_log_${env.BUILD_ID}.zip build_log_*/*"
|
||||
sh "rm -rf build_log_*/"
|
||||
archiveArtifacts artifacts: "build_log_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (directoryExistsGlob("test_log_*")) {
|
||||
sh "zip -r -qq test_log_${env.BUILD_ID}.zip test_log_*/*"
|
||||
sh "rm -rf test_log_*/"
|
||||
archiveArtifacts artifacts: "test_log_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_results.html")) {
|
||||
sh "mv test_results.html test_results-${env.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 artifacts: "test_results-${env.JOB_NAME}.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
223
ci-scripts/Jenkinsfile-nrue
Normal file
223
ci-scripts/Jenkinsfile-nrue
Normal file
@@ -0,0 +1,223 @@
|
||||
#!/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
|
||||
*/
|
||||
|
||||
// Location of the executor node
|
||||
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 resource
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// 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
|
||||
|
||||
// Flags
|
||||
def scmEvent = false
|
||||
def upstreamEvent = false
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Pipeline start
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ('Verify Parameters') {
|
||||
steps {
|
||||
script {
|
||||
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||
|
||||
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
|
||||
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
|
||||
|
||||
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 Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == 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.OC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.OC_ProjectName == 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 ("Deploy and Test") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
// 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(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Log Collection") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
// Zipping all archived log files
|
||||
sh "mkdir test_logs"
|
||||
sh "mv *.log* test_logs || true"
|
||||
// Zip all log files matching cmake_targets/{*.log*,log/*} into test_logs_XXXX.zip
|
||||
if (fileExists('../cmake_targets/log')) {
|
||||
sh "mv ../cmake_targets/log/* test_logs || true"
|
||||
}
|
||||
sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/"
|
||||
sh "rm -rf *test_log*/"
|
||||
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_results.html")) {
|
||||
sh "mv test_results.html test_results-${env.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 artifacts: "test_results-${env.JOB_NAME}.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
224
ci-scripts/Jenkinsfile-physim-deploy
Normal file
224
ci-scripts/Jenkinsfile-physim-deploy
Normal file
@@ -0,0 +1,224 @@
|
||||
#!/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
|
||||
*/
|
||||
|
||||
// Location of the executor node
|
||||
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 resource
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// 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
|
||||
|
||||
// Flags
|
||||
def scmEvent = false
|
||||
def upstreamEvent = false
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Pipeline start
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ('Verify Parameters') {
|
||||
steps {
|
||||
script {
|
||||
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||
|
||||
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
|
||||
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
|
||||
|
||||
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 Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == 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.OC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.OC_ProjectName == 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 ("Deploy and Test") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
// 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(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Log Collection") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
// Zipping all archived log files
|
||||
sh "mkdir test_logs"
|
||||
sh "mv *.log* test_logs || true"
|
||||
// Zip all log files matching cmake_targets/{*.log*,log/*} into test_logs_XXXX.zip
|
||||
if (fileExists('../cmake_targets/log')) {
|
||||
sh "mv ../cmake_targets/log/* test_logs || true"
|
||||
}
|
||||
sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/"
|
||||
sh "rm -rf *test_log*/"
|
||||
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_results.html")) {
|
||||
sh "mv test_results.html test_results-${env.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 artifacts: "test_results-${env.JOB_NAME}.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
250
ci-scripts/Jenkinsfile-tmp-full-ran
Normal file
250
ci-scripts/Jenkinsfile-tmp-full-ran
Normal file
@@ -0,0 +1,250 @@
|
||||
#!/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
|
||||
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// Terminate Status
|
||||
def termENB = 0
|
||||
def termStatusArray = new Boolean[termENB + 1]
|
||||
termStatusArray[termENB] = 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
|
||||
|
||||
def doEpcLogCollection = true
|
||||
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
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 Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == 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 (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 {
|
||||
currentBuild.result = 'ABORTED'
|
||||
error('Stopping early because some parameters are missing')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build and Test") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
// 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(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Terminate") {
|
||||
parallel {
|
||||
stage('Terminate eNB') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termENB] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
parallel {
|
||||
stage('Log Collection (eNB - Run)') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||
|
||||
script {
|
||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "enb.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Making sure that we really shutdown every thing before leaving
|
||||
failure {
|
||||
script {
|
||||
if (!termStatusArray[termENB]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
225
ci-scripts/Jenkinsfile-tmp-multi-enb
Normal file
225
ci-scripts/Jenkinsfile-tmp-multi-enb
Normal file
@@ -0,0 +1,225 @@
|
||||
#!/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
|
||||
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// 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 {
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
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 Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == 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 (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"
|
||||
// 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(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Terminate") {
|
||||
parallel {
|
||||
stage('Terminate eNB') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
parallel {
|
||||
stage('Log Collection (eNB - Run)') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||
|
||||
script {
|
||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "enb.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
216
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
Normal file
216
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
Normal file
@@ -0,0 +1,216 @@
|
||||
#!/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
|
||||
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// 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
|
||||
def eNB_TargetBranch
|
||||
|
||||
//Status fed to the database
|
||||
def StatusForDb = ""
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {label pythonExecutor}
|
||||
options {
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
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 Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == 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 (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"
|
||||
// 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(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
parallel {
|
||||
stage('Log Collection (eNB - Run)') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||
script {
|
||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if(fileExists("ci-scripts/test_results.html")) {
|
||||
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||
archiveArtifacts "test_results-${JOB_NAME}.html"
|
||||
}
|
||||
if (params.pipelineZipsConsoleLog != null) {
|
||||
if (params.pipelineZipsConsoleLog) {
|
||||
echo "Archiving Jenkins console log"
|
||||
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
|
||||
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
|
||||
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
260
ci-scripts/Jenkinsfile-tmp-ran
Normal file
260
ci-scripts/Jenkinsfile-tmp-ran
Normal file
@@ -0,0 +1,260 @@
|
||||
#!/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
|
||||
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// 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
|
||||
|
||||
def flexricOption = ""
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
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 Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == 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.Flexric_Tag != null) {
|
||||
echo "This pipeline is configured to run with a FlexRIC deployment."
|
||||
echo "Appending FlexRicTag option to the list of options"
|
||||
flexricOption = "--FlexRicTag=${params.Flexric_Tag}"
|
||||
echo "Using new Flexric option: ${flexricOption}"
|
||||
}
|
||||
|
||||
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 if (eNB_CommitID != 'develop') {
|
||||
sh "git fetch"
|
||||
sh "git checkout -f ${eNB_CommitID}"
|
||||
}
|
||||
} else {
|
||||
error "Some parameters are missing"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build and Test") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
// 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(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Terminate") {
|
||||
parallel {
|
||||
stage('Terminate eNB') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termENB] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
parallel {
|
||||
stage('Log Collection (eNB - Run)') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||
script {
|
||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "enb.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Making sure that we really shutdown every thing before leaving
|
||||
failure {
|
||||
script {
|
||||
if (!termStatusArray[termENB]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,9 +397,9 @@ class Cluster:
|
||||
# Analyze the logs
|
||||
collectInfo = {}
|
||||
for image, lf in log_files:
|
||||
imgStatus, errors = cls_containerize.AnalyzeBuildLogs(image, lf)
|
||||
info = f"Analysis of {os.path.basename(lf)}: {imgStatus=}, size {imageSize[image]}, {len(errors)} errors"
|
||||
msg = "\n".join([info] + errors)
|
||||
ret = cls_containerize.AnalyzeBuildLogs(image, lf)
|
||||
imgStatus = ret['status']
|
||||
msg = f"size {imageSize[image]}, analysis of {os.path.basename(lf)}: {ret['errors']} errors, {ret['warnings']} warnings"
|
||||
HTML.CreateHtmlTestRowQueue(image, 'OK' if imgStatus else 'KO', [msg])
|
||||
status = status and imgStatus
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ import helpreadme as HELP
|
||||
import constants as CONST
|
||||
import cls_oaicitest
|
||||
from cls_ci_helper import archiveArtifact
|
||||
from collections import deque
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Helper functions used here and in other classes
|
||||
@@ -86,9 +85,9 @@ def CreateTag(ranCommitID, ranBranch, ranAllowMerge):
|
||||
return tagToUse
|
||||
|
||||
def AnalyzeBuildLogs(image, lf):
|
||||
errorandwarnings = {}
|
||||
committed = False
|
||||
tagged = False
|
||||
errors = []
|
||||
with open(lf, mode='r') as inputfile:
|
||||
for line in inputfile:
|
||||
lineHasTag = re.search(f'Successfully tagged {image}:', str(line)) is not None
|
||||
@@ -97,13 +96,11 @@ def AnalyzeBuildLogs(image, lf):
|
||||
# the OpenShift Cluster builder prepends image registry URL
|
||||
lineHasCommit = re.search(r'COMMIT [a-zA-Z0-9\.:/\-]*' + image, str(line)) is not None
|
||||
committed = committed or lineHasCommit
|
||||
if re.search(r'error:|Errors|ERROR', line):
|
||||
errors.append(f"=> {line.strip()}")
|
||||
status = (committed or tagged) and len(errors) == 0
|
||||
logging.info(f"Analyzing {image}, file {lf}: {status=}, {len(errors)} errors")
|
||||
for e in errors:
|
||||
logging.info(e)
|
||||
return status, errors
|
||||
errorandwarnings['errors'] = 0 if committed or tagged else 1
|
||||
errorandwarnings['warnings'] = 0
|
||||
errorandwarnings['status'] = committed or tagged
|
||||
logging.info(f"Analyzing {image}, file {lf}: {errorandwarnings}")
|
||||
return errorandwarnings
|
||||
|
||||
def GetImageName(ssh, svcName, file):
|
||||
ret = ssh.run(f"docker compose -f {file} config --format json {svcName} | jq -r '.services.\"{svcName}\".image'", silent=True)
|
||||
@@ -168,26 +165,25 @@ def CopyinServiceLog(ssh, lSourcePath, svcName, wd_yaml, ctx):
|
||||
ssh.run(f'docker compose -f {wd_yaml} logs {svcName} --no-log-prefix &> {remote_filename}')
|
||||
return archiveArtifact(ssh, ctx, remote_filename)
|
||||
|
||||
def GetDeployedServices(ssh, file):
|
||||
def GetRunningServices(ssh, file):
|
||||
ret = ssh.run(f'docker compose -f {file} config --services')
|
||||
if ret.returncode != 0:
|
||||
logging.error("could not get services")
|
||||
return None
|
||||
allServices = ret.stdout.splitlines()
|
||||
deployed_services = []
|
||||
running_services = []
|
||||
for s in allServices:
|
||||
# outputs the hash if the container has been deployed (but might be stopped)
|
||||
ret = ssh.run(f'docker compose -f {file} ps --all --quiet -- {s}', silent=True)
|
||||
# outputs the hash if the container is running
|
||||
ret = ssh.run(f'docker compose -f {file} ps --all --quiet -- {s}')
|
||||
if ret.returncode != 0:
|
||||
# error: should not happen as we iterate over docker-provided service list
|
||||
logging.error(f"service {s}: {ret.stdout}")
|
||||
logging.info(f"service {s}: {ret.stdout}")
|
||||
elif ret.stdout == "":
|
||||
logging.info(f"service {s} not deployed")
|
||||
logging.warning(f"could not retrieve information for service {s}")
|
||||
else:
|
||||
c = ret.stdout
|
||||
logging.info(f'service {s} with container id {c}')
|
||||
deployed_services.append(s)
|
||||
return deployed_services
|
||||
logging.debug(f'running service {s} with container id {c}')
|
||||
running_services.append((s, c))
|
||||
logging.info(f'stopping services: {running_services}')
|
||||
return running_services
|
||||
|
||||
def CheckLogs(self, filename, HTML, RAN):
|
||||
success = True
|
||||
@@ -209,7 +205,7 @@ def CheckLogs(self, filename, HTML, RAN):
|
||||
elif 'nv-cubb' in name:
|
||||
msg = 'Undeploy PNF/Nvidia CUBB'
|
||||
HTML.CreateHtmlTestRow(msg, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
elif (any(sub in name for sub in ['enb','rru','rcc','cu','du','gnb','vnf'])):
|
||||
elif (any(sub in name for sub in ['enb','rru','rcc','cu','du','gnb'])):
|
||||
logging.debug(f'\u001B[1m Analyzing XnB logfile {filename}\u001B[0m')
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers)
|
||||
opt = f"xNB log analysis ({name})"
|
||||
@@ -219,24 +215,6 @@ def CheckLogs(self, filename, HTML, RAN):
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(opt, 'OK', [HTML.htmleNBFailureMsg])
|
||||
HTML.htmleNBFailureMsg = ""
|
||||
elif 'xapp' in name:
|
||||
opt = f"Undeploy {name}"
|
||||
with open(f'{filename}', "r") as f:
|
||||
last_line = deque(f, maxlen=1).pop()
|
||||
if ('Test xApp run SUCCESSFULLY' in last_line):
|
||||
HTML.CreateHtmlTestRowQueue(opt, 'OK', ["xApp run successfully"])
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(opt, 'KO', ["xApp didn't run successfully"])
|
||||
success = False
|
||||
elif 'RIC' in name:
|
||||
opt = f"Undeploy {name}"
|
||||
with open(f'{filename}', 'r') as f:
|
||||
last_line = deque(f, maxlen=1).pop()
|
||||
if ('Removing E2 Node' in last_line):
|
||||
HTML.CreateHtmlTestRowQueue(opt, 'OK', ["nearRT-RIC run successfully"])
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(opt, 'KO', ["nearRT-RIC didn't run successfully"])
|
||||
success = False
|
||||
else:
|
||||
logging.info(f"Skipping analysis of log '{filename}': no submatch for xNB/UE")
|
||||
logging.debug(f"log check: file {filename} passed analysis {success}")
|
||||
@@ -462,9 +440,9 @@ class Containerize():
|
||||
|
||||
# Analyze the logs
|
||||
for name, lf in log_files:
|
||||
imgStatus, errors = AnalyzeBuildLogs(name, lf)
|
||||
info = f"Analysis of {os.path.basename(lf)}: {imgStatus=}, size {allImagesSize[name]}, {len(errors)} errors"
|
||||
msg = "\n".join([info] + errors)
|
||||
ret = AnalyzeBuildLogs(name, lf)
|
||||
imgStatus = ret['status']
|
||||
msg = f"size {allImagesSize[name]}, analysis of {os.path.basename(lf)}: {ret['errors']} errors, {ret['warnings']} warnings"
|
||||
HTML.CreateHtmlTestRowQueue(name, 'OK' if imgStatus else 'KO', [msg])
|
||||
status = status and imgStatus
|
||||
|
||||
@@ -737,6 +715,7 @@ class Containerize():
|
||||
def DeployObject(self, ctx, node, HTML):
|
||||
num_attempts = self.num_attempts
|
||||
lSourcePath = self.eNBSourceCodePath
|
||||
logging.debug(f'Deploying OAI Object on server: {node}')
|
||||
yaml = self.yamlPath.strip('/')
|
||||
wd = f'{lSourcePath}/{yaml}'
|
||||
wd_yaml = f'{wd}/docker-compose.y*ml'
|
||||
@@ -747,7 +726,6 @@ class Containerize():
|
||||
logging.error(msg)
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'KO', [msg])
|
||||
return False
|
||||
logging.info(f'\u001B[1mDeploying object(s) "{services}" on server {node}\u001B[0m')
|
||||
ExistEnvFilePrint(ssh, wd)
|
||||
WriteEnvFile(ssh, services, wd, self.deploymentTag, self.flexricTag)
|
||||
if num_attempts <= 0:
|
||||
@@ -772,68 +750,36 @@ class Containerize():
|
||||
imagesInfo = info.stdout.splitlines()[1:]
|
||||
logging.debug(f'{info.stdout.splitlines()[1:]}')
|
||||
if deployed:
|
||||
HTML.CreateHtmlTestRowQueue(self.services, 'OK', ['\n'.join(imagesInfo)])
|
||||
logging.info('\u001B[1m Deploying objects Pass\u001B[0m')
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['\n'.join(imagesInfo)])
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(self.services, 'KO', ['\n'.join(imagesInfo)])
|
||||
logging.error('\u001B[1m Deploying objects Failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'KO', ['\n'.join(imagesInfo)])
|
||||
return deployed
|
||||
|
||||
def StopObject(self, ctx, node, HTML):
|
||||
lSourcePath = self.eNBSourceCodePath
|
||||
if not self.services:
|
||||
raise ValueError(f'no services provided')
|
||||
logging.info(f'\u001B[1m Stopping objects "{self.services}" from server: {node}\u001B[0m')
|
||||
reqServices = self.services.split()
|
||||
yaml = self.yamlPath.strip('/')
|
||||
wd = f'{lSourcePath}/{yaml}'
|
||||
wd_yaml = f'{wd}/docker-compose.y*ml'
|
||||
with cls_cmd.getConnection(node) as ssh:
|
||||
ExistEnvFilePrint(ssh, wd)
|
||||
services = GetDeployedServices(ssh, wd_yaml)
|
||||
success = []
|
||||
fail = []
|
||||
for s in reqServices:
|
||||
if s in services:
|
||||
ssh.run(f'docker compose -f {wd_yaml} stop -- {s}')
|
||||
success.append(s)
|
||||
else:
|
||||
logging.error(f"no such service {s}")
|
||||
fail.append(s)
|
||||
if success == reqServices:
|
||||
logging.info('\u001B[1m Stopping object Pass\u001B[0m')
|
||||
HTML.CreateHtmlTestRowQueue(self.services, 'OK', [f'Stopped {self.services}'])
|
||||
else:
|
||||
logging.error('\u001B[1m Stopping object Failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRowQueue(self.services, 'KO', [f'Failed stopping {" ".join(fail)}, succeeded {" ".join(success)}'])
|
||||
return success
|
||||
|
||||
def UndeployObject(self, ctx, node, HTML, RAN):
|
||||
lSourcePath = self.eNBSourceCodePath
|
||||
logging.info(f'\u001B[1m Undeploying all objects from server {node}\u001B[0m')
|
||||
logging.debug(f'\u001B[1m Undeploying OAI Object from server: {node}\u001B[0m')
|
||||
yaml = self.yamlPath.strip('/')
|
||||
wd = f'{lSourcePath}/{yaml}'
|
||||
wd_yaml = f'{wd}/docker-compose.y*ml'
|
||||
with cls_cmd.getConnection(node) as ssh:
|
||||
ExistEnvFilePrint(ssh, wd)
|
||||
services = GetDeployedServices(ssh, wd_yaml)
|
||||
services = GetRunningServices(ssh, f"{wd}/docker-compose.y*ml")
|
||||
copyin_res = None
|
||||
ssh.run(f'docker compose -f {wd_yaml} stop')
|
||||
if services is not None:
|
||||
copyin_res = [CopyinServiceLog(ssh, lSourcePath, s, wd_yaml, ctx) for s in services]
|
||||
all_serv = " ".join([s for s, _ in services])
|
||||
ssh.run(f'docker compose -f {wd}/docker-compose.y*ml stop -- {all_serv}')
|
||||
copyin_res = [CopyinServiceLog(ssh, lSourcePath, s, f"{wd}/docker-compose.y*ml", ctx) for s, _ in services]
|
||||
else:
|
||||
logging.warning('could not identify services to stop => no log file')
|
||||
ssh.run(f'docker compose -f {wd_yaml} down -v')
|
||||
ssh.run(f'docker compose -f {wd}/docker-compose.y*ml down -v')
|
||||
ssh.run(f'rm {wd}/.env')
|
||||
if not copyin_res:
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'KO', ['Could not copy logfile(s)'])
|
||||
logging.error(f"could not copy all files: {copyin_res=} {services=}")
|
||||
success = False
|
||||
return False
|
||||
else:
|
||||
log_results = [CheckLogs(self, f, HTML, RAN) for f in copyin_res]
|
||||
success = all(log_results)
|
||||
if success:
|
||||
logging.info('\u001B[1m Undeploying objects Pass\u001B[0m')
|
||||
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m')
|
||||
else:
|
||||
logging.error('\u001B[1m Undeploying objects Failed\u001B[0m')
|
||||
logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m')
|
||||
return success
|
||||
|
||||
@@ -111,7 +111,7 @@ class Module_UE:
|
||||
return self._collectTrace(ctx)
|
||||
return None
|
||||
|
||||
def attach(self, attach_tries = 3, attach_timeout = 40):
|
||||
def attach(self, attach_tries = 4, attach_timeout = 60):
|
||||
ip = None
|
||||
while attach_tries > 0:
|
||||
self._command(self.cmd_dict["attach"])
|
||||
@@ -125,7 +125,6 @@ class Module_UE:
|
||||
if ip:
|
||||
break
|
||||
logging.warning(f"UE did not receive IP address after {attach_timeout} s, detaching")
|
||||
attach_timeout += 20
|
||||
attach_tries -= 1
|
||||
self._command(self.cmd_dict["detach"])
|
||||
time.sleep(5)
|
||||
|
||||
@@ -53,7 +53,7 @@ security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea2", "nea0" );
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
@@ -63,7 +63,7 @@ security = {
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
|
||||
@@ -146,11 +146,7 @@ gNBs =
|
||||
);
|
||||
|
||||
first_active_bwp = 1;
|
||||
bwp_list = (
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 106;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 36;},
|
||||
{ scs = 1; bwpStart = 40; bwpSize = 50;}
|
||||
);
|
||||
bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;});
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
|
||||
@@ -16,6 +16,8 @@ gNBs =
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
sib1_tda = 5;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
|
||||
@@ -32,7 +32,7 @@ gNBs =
|
||||
pdsch_AntennaPorts_N1 = 2;
|
||||
pusch_AntennaPorts = 2;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 1;
|
||||
do_SRS = 0;
|
||||
min_rxtxtime = 2;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
@@ -155,7 +155,7 @@ gNBs =
|
||||
nrofUplinkSlots = 3; #1;
|
||||
nrofUplinkSymbols = 0;
|
||||
|
||||
ssPBCH_BlockPower = -15;
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
@@ -176,8 +176,8 @@ gNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.53";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.53";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.202";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.202";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
@@ -195,7 +195,7 @@ MACRLCs = (
|
||||
remote_s_portd = 50010; // pnf p7 port [!]
|
||||
tr_s_preference = "aerial";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 280; # 150;
|
||||
pusch_TargetSNRx10 = 200; # 150;
|
||||
pucch_TargetSNRx10 = 200; #200;
|
||||
dl_max_mcs = 28;
|
||||
ul_max_mcs = 28;
|
||||
|
||||
@@ -24,9 +24,9 @@ gNBs =
|
||||
pdsch_AntennaPorts_N1 = 2;
|
||||
pusch_AntennaPorts = 2;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 1;
|
||||
do_SRS = 0;
|
||||
min_rxtxtime = 2;
|
||||
force_UL256qam_off = 1;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
@@ -168,8 +168,8 @@ gNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.53";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.53";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.202";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.202";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@ MACRLCs = (
|
||||
remote_s_portd = 50010; // pnf p7 port [!]
|
||||
tr_s_preference = "aerial";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 260; # 150;
|
||||
pusch_TargetSNRx10 = 220; # 150;
|
||||
pucch_TargetSNRx10 = 200; #200;
|
||||
dl_max_mcs = 28;
|
||||
ul_max_mcs = 28;
|
||||
|
||||
@@ -195,7 +195,6 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 50;
|
||||
eNB_instances = [0];
|
||||
sl_ahead = 3;
|
||||
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2";
|
||||
}
|
||||
);
|
||||
|
||||
@@ -18,6 +18,8 @@ gNBs =
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
sib1_tda = 15;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
@@ -170,7 +172,7 @@ MACRLCs = ({
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
set_analog_beamforming = 2;
|
||||
set_analog_beamforming = 1;
|
||||
beam_duration = 1;
|
||||
beams_per_period = 1;
|
||||
beam_weights = [0]; // single SSB -> one analog beam
|
||||
|
||||
@@ -209,7 +209,7 @@ security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea2", "nea0" );
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
@@ -219,7 +219,7 @@ security = {
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
Active_gNBs:
|
||||
- gnb-rfsim
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity: none
|
||||
gNBs:
|
||||
##### Identification parameters:
|
||||
- gNB_ID: 0xe00
|
||||
gNB_name: gnb-rfsim
|
||||
tracking_area_code: 1
|
||||
plmn_list:
|
||||
- mcc: 208
|
||||
mnc: 99
|
||||
mnc_length: 2
|
||||
snssaiList:
|
||||
- sst: 1
|
||||
sd: 0xffffff
|
||||
nr_cellid: 12345678
|
||||
##### Physical parameters:
|
||||
min_rxtxtime: 6
|
||||
pusch_AntennaPorts: 2
|
||||
pdsch_AntennaPorts_XP: 2
|
||||
|
||||
servingCellConfigCommon:
|
||||
#spCellConfigCommon
|
||||
- physCellId: 0
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
|
||||
absoluteFrequencySSB: 621312
|
||||
# this is 3300.60 MHz
|
||||
dl_absoluteFrequencyPointA: 620040
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier: 0
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing: 1
|
||||
dl_carrierBandwidth: 106
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth: 28875
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing: 1
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero: 11
|
||||
initialDLBWPsearchSpaceZero: 0
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand: 78
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier: 0
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing: 1
|
||||
ul_carrierBandwidth: 106
|
||||
pMax: 20
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth: 28875
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing: 1
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex: 98
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM: 0
|
||||
prach_msg1_FrequencyStart: 0
|
||||
zeroCorrelationZoneConfig: 12
|
||||
preambleReceivedTargetPower: -104
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax: 6
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep: 1
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer: 7
|
||||
rsrp_ThresholdSSB: 19
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR: 2
|
||||
prach_RootSequenceIndex: 1
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
msg1_SubcarrierSpacing: 1
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig: 0
|
||||
msg3_DeltaPreamble: 1
|
||||
p0_NominalWithGrant: -90
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping: 0
|
||||
hoppingId: 40
|
||||
p0_nominal: -90
|
||||
ssb_PositionsInBurst_Bitmap: 1
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell: 2
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position: 0
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing: 1
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing: 1
|
||||
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity: 6
|
||||
nrofDownlinkSlots: 7
|
||||
nrofDownlinkSymbols: 6
|
||||
nrofUplinkSlots: 2
|
||||
nrofUplinkSymbols: 4
|
||||
ssPBCH_BlockPower: -25
|
||||
SCTP:
|
||||
SCTP_INSTREAMS: 2
|
||||
SCTP_OUTSTREAMS: 2
|
||||
|
||||
##### AMF parameters:
|
||||
amf_ip_address:
|
||||
- ipv4: 192.168.71.132
|
||||
|
||||
NETWORK_INTERFACES:
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.71.140
|
||||
GNB_IPV4_ADDRESS_FOR_NGU: 192.168.71.140
|
||||
GNB_PORT_FOR_S1U: 2152 # Spec 2152
|
||||
|
||||
|
||||
MACRLCs:
|
||||
- num_cc: 1
|
||||
tr_s_preference: local_L1
|
||||
tr_n_preference: local_RRC
|
||||
pusch_TargetSNRx10: 200
|
||||
pucch_TargetSNRx10: 200
|
||||
|
||||
L1s:
|
||||
- num_cc: 1
|
||||
tr_n_preference: local_mac
|
||||
prach_dtx_threshold: 200
|
||||
# pucch0_dtx_threshold = 150;
|
||||
|
||||
RUs:
|
||||
- local_rf: yes
|
||||
nb_tx: 2
|
||||
nb_rx: 2
|
||||
att_tx: 0
|
||||
att_rx: 0
|
||||
bands: [78]
|
||||
max_pdschReferenceSignalPower: -27
|
||||
max_rxgain: 75
|
||||
eNB_instances: [0]
|
||||
sf_extension: 0
|
||||
|
||||
security:
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms: [nea0]
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms: [nia2, nia0]
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering: yes
|
||||
drb_integrity: no
|
||||
|
||||
log_config:
|
||||
global_log_level: info
|
||||
hw_log_level: info
|
||||
phy_log_level: info
|
||||
mac_log_level: info
|
||||
rlc_log_level: info
|
||||
pdcp_log_level: info
|
||||
rrc_log_level: info
|
||||
ngap_log_level: debug
|
||||
f1ap_log_level: debug
|
||||
|
||||
|
||||
channelmod:
|
||||
max_chan: 10
|
||||
modellist: DefaultChannelList
|
||||
DefaultChannelList:
|
||||
- model_name: server_tx_channel_model
|
||||
type: AWGN
|
||||
ploss_dB: 0
|
||||
noise_power_dB: -100
|
||||
forgetfact: 0
|
||||
offset: 0
|
||||
ds_tdl: 0
|
||||
@@ -16,6 +16,8 @@ gNBs =
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
sib1_tda = 15;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
|
||||
@@ -23,6 +23,7 @@ gNBs =
|
||||
pusch_AntennaPorts = 4;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 0;
|
||||
sib1_tda = 15;
|
||||
# force_UL256qam_off = 1;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
uicc0:
|
||||
imsi: 208990100001100
|
||||
key: fec86ba6eb707ed08905757b1bb44b8f
|
||||
opc: C42449363BBAD02B66D16BC975D77CC1
|
||||
dnn: oai
|
||||
nssai_sst: 1
|
||||
|
||||
thread-pool: "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
|
||||
|
||||
channelmod:
|
||||
max_chan: 10;
|
||||
modellist: DefaultChannelList
|
||||
DefaultChannelList:
|
||||
- model_name: client_tx_channel_model
|
||||
type: AWGN
|
||||
ploss_dB: 0
|
||||
noise_power_dB: -100
|
||||
forgetfact: 0
|
||||
offset: 0
|
||||
ds_tdl: 0
|
||||
@@ -15,6 +15,7 @@ Ref :
|
||||
DLSCH encoding : 200.0
|
||||
L1 Rx processing : 530.0
|
||||
PUSCH inner-receiver : 360.0
|
||||
Schedule Response : 1.0
|
||||
DL & UL scheduling timing : 17.0
|
||||
UL Indication : 1.0
|
||||
Slot Indication : 13.0
|
||||
@@ -30,6 +31,7 @@ DeviationThreshold :
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.25
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
|
||||
@@ -15,6 +15,7 @@ Ref :
|
||||
DLSCH encoding : 110.0
|
||||
L1 Rx processing : 345.0
|
||||
PUSCH inner-receiver : 150.0
|
||||
Schedule Response : 1.0
|
||||
DL & UL scheduling timing : 5.0
|
||||
UL Indication : 1.0
|
||||
Slot Indication : 6.0
|
||||
@@ -30,6 +31,7 @@ DeviationThreshold :
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
|
||||
@@ -15,6 +15,7 @@ Ref :
|
||||
DLSCH encoding : 230.0
|
||||
L1 Rx processing : 175.0
|
||||
PUSCH inner-receiver : 100.0
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 11.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 14.0
|
||||
@@ -27,6 +28,7 @@ DeviationThreshold :
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.25
|
||||
|
||||
@@ -15,6 +15,7 @@ Ref :
|
||||
DLSCH encoding : 140.0
|
||||
L1 Rx processing : 345.0
|
||||
PUSCH inner-receiver : 155.0
|
||||
Schedule Response : 1.0
|
||||
DL & UL scheduling timing : 8.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 9.0
|
||||
@@ -30,6 +31,7 @@ DeviationThreshold :
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.35
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.35
|
||||
|
||||
@@ -15,6 +15,7 @@ Ref :
|
||||
DLSCH encoding : 90.0
|
||||
L1 Rx processing : 290.0
|
||||
PUSCH inner-receiver : 115.0
|
||||
Schedule Response : 1.0
|
||||
DL & UL scheduling timing : 4.0
|
||||
UL Indication : 2.0
|
||||
Slot Indication : 5.0
|
||||
@@ -30,6 +31,7 @@ DeviationThreshold :
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
|
||||
@@ -214,7 +214,7 @@ def ExecuteActionWithParam(action, ctx, node):
|
||||
core_op = getattr(cls_oaicitest.OaiCiTest, action)
|
||||
success = core_op(cn_id, ctx, HTML)
|
||||
|
||||
elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace" or action == "Stop_Object":
|
||||
elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace":
|
||||
CONTAINERS.yamlPath = test.findtext('yaml_path')
|
||||
string_field=test.findtext('d_retx_th')
|
||||
if (string_field is not None):
|
||||
@@ -227,8 +227,6 @@ def ExecuteActionWithParam(action, ctx, node):
|
||||
CONTAINERS.deploymentTag = cls_containerize.CreateTag(CONTAINERS.ranCommitID, CONTAINERS.ranBranch, CONTAINERS.ranAllowMerge)
|
||||
if action == 'Deploy_Object':
|
||||
success = CONTAINERS.DeployObject(ctx, node, HTML)
|
||||
elif action == 'Stop_Object':
|
||||
success = CONTAINERS.StopObject(ctx, node, HTML)
|
||||
elif action == 'Undeploy_Object':
|
||||
success = CONTAINERS.UndeployObject(ctx, node, HTML, RAN)
|
||||
elif action == 'Create_Workspace':
|
||||
|
||||
@@ -60,33 +60,6 @@ class TestDeploymentMethods(unittest.TestCase):
|
||||
self.assertTrue(deploy)
|
||||
self.assertTrue(undeploy)
|
||||
|
||||
def test_stop_services(self):
|
||||
self.cont.yamlPath = 'tests/simple-undep/'
|
||||
self.cont.deploymentTag = "noble"
|
||||
# should deploy both testA and testB
|
||||
deploy = self.cont.DeployObject(self.ctx, self.node, self.html)
|
||||
# should fail (no such service)
|
||||
self.cont.services = "testC"
|
||||
stopC = self.cont.StopObject(self.ctx, self.node, self.html)
|
||||
# should stop testA
|
||||
self.cont.services = "testA"
|
||||
stopA = self.cont.StopObject(self.ctx, self.node, self.html)
|
||||
# should (re-)stop testA (no-op)
|
||||
self.cont.services = "testA"
|
||||
stopA2 = self.cont.StopObject(self.ctx, self.node, self.html)
|
||||
# should deploy testB
|
||||
self.cont.services = "testB"
|
||||
stopB = self.cont.StopObject(self.ctx, self.node, self.html)
|
||||
# should not undeploy anything (everything already stopped)
|
||||
self.cont.services = None
|
||||
undeployAll = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran)
|
||||
self.assertTrue(deploy)
|
||||
self.assertFalse(stopC)
|
||||
self.assertTrue(stopA)
|
||||
self.assertTrue(stopA2)
|
||||
self.assertTrue(stopB)
|
||||
self.assertTrue(undeployAll)
|
||||
|
||||
def test_deployfails(self):
|
||||
# fails reliably
|
||||
old = self.cont.yamlPath
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
services:
|
||||
testA:
|
||||
image: ubuntu:${TAG:-jammy}
|
||||
container_name: test_container_A
|
||||
cap_drop:
|
||||
- ALL
|
||||
entrypoint: /bin/bash -c "sleep infinity"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "true"
|
||||
interval: 1s
|
||||
timeout: 1s
|
||||
retries: 1
|
||||
testB:
|
||||
image: ubuntu:${TAG:-jammy}
|
||||
container_name: test_container_B
|
||||
cap_drop:
|
||||
- ALL
|
||||
entrypoint: /bin/bash -c "sleep infinity"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "true"
|
||||
interval: 1s
|
||||
timeout: 1s
|
||||
retries: 1
|
||||
@@ -20,7 +20,6 @@
|
||||
- Build_Image
|
||||
- Build_Run_Tests
|
||||
- Deploy_Object
|
||||
- Stop_Object
|
||||
- Undeploy_Object
|
||||
- Cppcheck_Analysis
|
||||
- Deploy_Run_OC_PhySim
|
||||
|
||||
@@ -42,13 +42,6 @@
|
||||
002006
|
||||
444444
|
||||
100002
|
||||
100003
|
||||
100004
|
||||
100005
|
||||
100006
|
||||
100007
|
||||
100008
|
||||
100009
|
||||
100001
|
||||
222221
|
||||
222222
|
||||
@@ -102,10 +95,10 @@
|
||||
|
||||
<testCase id="000002">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy OAI nearRT-RIC</desc>
|
||||
<desc>Deploy OAI FlexRIC</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>nearRT-RIC</services>
|
||||
<services>oai-flexric</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -158,72 +151,16 @@
|
||||
</testCase>
|
||||
|
||||
<testCase id="100002">
|
||||
<class>Stop_Object</class>
|
||||
<desc>Stop RC monitoring xApp</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-rc-moni</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100003">
|
||||
<class>Stop_Object</class>
|
||||
<desc>Stop KPM monitoring xApp</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-kpm-moni</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100004">
|
||||
<class>Stop_Object</class>
|
||||
<desc>Stop KPM monitoring and RC control xApp</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-kpm-rc</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100005">
|
||||
<class>Stop_Object</class>
|
||||
<desc>Stop custom SMs monitoring xApp</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-gtp-mac-rlc-pdcp-moni</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100006">
|
||||
<class>Stop_Object</class>
|
||||
<desc>Stop OAI UEs</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>oai-nr-ue oai-nr-ue2</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100007">
|
||||
<class>Stop_Object</class>
|
||||
<desc>Stop OAI gNB</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100008">
|
||||
<class>Stop_Object</class>
|
||||
<desc>Stop nearRT-RIC</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>nearRT-RIC</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100009">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy RAN and FlexRIC</desc>
|
||||
<desc>Undeploy RAN and Flexric</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<always_exec>true</always_exec>
|
||||
</testCase>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy RC monitoring</desc>
|
||||
<desc>RC monitoring</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-rc-moni</services>
|
||||
@@ -231,7 +168,7 @@
|
||||
|
||||
<testCase id="010001">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy KPM monitoring</desc>
|
||||
<desc>KPM monitoring</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-kpm-moni</services>
|
||||
@@ -239,7 +176,7 @@
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy KPM monitoring and RC control</desc>
|
||||
<desc>KPM monitoring and RC control</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-kpm-rc</services>
|
||||
@@ -247,7 +184,7 @@
|
||||
|
||||
<testCase id="010003">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy custom SMs monitoring</desc>
|
||||
<desc>Custom SMs monitoring</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-gtp-mac-rlc-pdcp-moni</services>
|
||||
|
||||
@@ -32,11 +32,6 @@
|
||||
000003
|
||||
020001
|
||||
020002
|
||||
040001
|
||||
020022
|
||||
040002
|
||||
020001
|
||||
020002
|
||||
100001
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
@@ -99,33 +94,6 @@
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger Reestablishment</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci force_reestab | ncat 192.168.71.140 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020022">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<ping_args>-c 20 -i0.5 -w25</ping_args>
|
||||
<ping_packetloss_threshold>80</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci get_reestab_count | ncat 192.168.71.140 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
<class>Undeploy_Object</class>
|
||||
<always_exec>true</always_exec>
|
||||
|
||||
@@ -36,11 +36,6 @@
|
||||
020003
|
||||
030001
|
||||
030002
|
||||
050001
|
||||
050002
|
||||
050003
|
||||
020001
|
||||
020002
|
||||
100001
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
@@ -144,32 +139,12 @@
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger PDU Session Release via gNB telnet</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci pdu_session_release 2 | ncat 192.168.71.140 9090</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Add PDU Session via UE telnet</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci add_pdu_session 6,7 | ncat 192.168.71.150 8091</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050003">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger PDU Session Release via gNB telnet</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci pdu_session_release 6 | ncat 192.168.71.140 9090</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
<class>Undeploy_Object</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<node>localhost</node>
|
||||
<services>oai-vnf oai-pnf</services>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
|
||||
<d_retx_th>1,0,0,0</d_retx_th>
|
||||
<u_retx_th>1,0,0,0</u_retx_th>
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>vrtsim-5gnr-chanmod</htmlTabRef>
|
||||
<htmlTabName>Monolithic gNB vrtsim + chanmod</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
800813
|
||||
000011
|
||||
000012
|
||||
000013
|
||||
020011
|
||||
020012
|
||||
030011
|
||||
030012
|
||||
100011
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="111111">
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<node>localhost</node>
|
||||
<images>oai-gnb oai-nr-ue</images>
|
||||
</testCase>
|
||||
<testCase id="800813">
|
||||
<class>Create_Workspace</class>
|
||||
<desc>Create new Workspace</desc>
|
||||
<node>localhost</node>
|
||||
</testCase>
|
||||
<testCase id="000011">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_chanmod</yaml_path>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy OAI 5G gNB+UE RF sim SA</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_chanmod</yaml_path>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020012">
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf (DL/3Mbps/UDP)(20 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 20 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030012">
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf (UL/1Mbps/UDP)(20 sec)</desc>
|
||||
<iperf_args>-u -b 1M -t 20</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>Undeploy_Object</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_chanmod</yaml_path>
|
||||
<d_retx_th>1,0,0,0</d_retx_th>
|
||||
<u_retx_th>1,0,0,0</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Clean Test Images on Test Server</desc>
|
||||
<node>localhost</node>
|
||||
<images>oai-gnb oai-nr-ue</images>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -1,141 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>vrtsim-5gnr-chanmod-gh</htmlTabRef>
|
||||
<htmlTabName>Monolithic gNB vrtsim + chanmod</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
800813
|
||||
000011
|
||||
000012
|
||||
000013
|
||||
020011
|
||||
020012
|
||||
030011
|
||||
030012
|
||||
100011
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="111111">
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<node>localhost</node>
|
||||
<images>oai-gnb oai-nr-ue</images>
|
||||
<tag_prefix>arm_</tag_prefix>
|
||||
</testCase>
|
||||
<testCase id="800813">
|
||||
<class>Create_Workspace</class>
|
||||
<desc>Create new Workspace</desc>
|
||||
<node>localhost</node>
|
||||
</testCase>
|
||||
<testCase id="000011">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_chanmod</yaml_path>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy OAI 5G gNB+UE RF sim SA</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_chanmod</yaml_path>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020012">
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf (DL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 30 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030012">
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf (UL/1Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 1M -t 30</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>Undeploy_Object</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_chanmod</yaml_path>
|
||||
<d_retx_th>1,0,0,0</d_retx_th>
|
||||
<u_retx_th>1,0,0,0</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Clean Test Images on Test Server</desc>
|
||||
<node>localhost</node>
|
||||
<images>oai-gnb oai-nr-ue</images>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -247,7 +247,6 @@
|
||||
<testCase id="060000">
|
||||
<class>UndeployCoreNetwork</class>
|
||||
<desc>Terminate EPC</desc>
|
||||
<always_exec>true</always_exec>
|
||||
<cn_id>ltebox-nepes</cn_id>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@
|
||||
|
||||
<testCase id="000022">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/UDP/800M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 800M -t 30 -R</iperf_args>
|
||||
<desc>iperf (DL/UDP/500M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 500M -t 30 -R</iperf_args>
|
||||
<svr_id>oc-cn5g-20897-aerial</svr_id>
|
||||
<id>up2-aerial</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
@@ -98,8 +98,8 @@
|
||||
|
||||
<testCase id="000033">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/UDP/150M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 150M -t 30 -l 1428</iperf_args>
|
||||
<desc>iperf (UL/UDP/40M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 40M -t 30 -l 1428</iperf_args>
|
||||
<svr_id>oc-cn5g-20897-aerial</svr_id>
|
||||
<id>up2-aerial</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
@@ -119,9 +119,9 @@
|
||||
|
||||
<testCase id="300033">
|
||||
<class>Iperf</class>
|
||||
<desc>Optional iperf (UL/UDP/200M)(30 sec)(single-ue profile)</desc>
|
||||
<desc>Optional iperf (UL/UDP/90M)(30 sec)(single-ue profile)</desc>
|
||||
<may_fail>true</may_fail>
|
||||
<iperf_args>-u -b 200M -t 30 -l 1428</iperf_args>
|
||||
<iperf_args>-u -b 90M -t 30 -l 1428</iperf_args>
|
||||
<svr_id>oc-cn5g-20897-aerial</svr_id>
|
||||
<id>up2-aerial</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
|
||||
<testCase id="000032">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/UDP/300M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 300M -t 30 -l 1428</iperf_args>
|
||||
<desc>iperf (UL/UDP/200M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 200M -t 30 -l 1428</iperf_args>
|
||||
<svr_id>oc-cn5g-20897-aerial</svr_id>
|
||||
<id>up2-aerial</id>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
@@ -107,9 +107,9 @@
|
||||
|
||||
<testCase id="000033">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/UDP/380M)(30 sec)(single-ue profile)</desc>
|
||||
<desc>iperf (UL/UDP/220M)(30 sec)(single-ue profile)</desc>
|
||||
<may_fail>true</may_fail>
|
||||
<iperf_args>-u -b 380M -t 30 -l 1428</iperf_args>
|
||||
<iperf_args>-u -b 220M -t 30 -l 1428</iperf_args>
|
||||
<svr_id>oc-cn5g-20897-aerial</svr_id>
|
||||
<id>up2-aerial</id>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
|
||||
@@ -30,28 +30,20 @@
|
||||
310000
|
||||
800813
|
||||
330101
|
||||
330102
|
||||
330103
|
||||
310001
|
||||
400001
|
||||
350000
|
||||
370001
|
||||
370000
|
||||
370002
|
||||
370003
|
||||
370004
|
||||
370002
|
||||
360001
|
||||
100002
|
||||
360002
|
||||
350000
|
||||
410002
|
||||
370012
|
||||
400002
|
||||
410003
|
||||
370013
|
||||
400003
|
||||
410000
|
||||
350000
|
||||
400000
|
||||
410001
|
||||
350000
|
||||
400001
|
||||
310011
|
||||
310002
|
||||
330201
|
||||
@@ -96,10 +88,24 @@
|
||||
</testCase>
|
||||
<testCase id="330101">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB-CU-CP/gNB-CU-UP/gNB-DU (TDD/n76/40MHz/B200)</desc>
|
||||
<desc>Deploy gNB-CU-CP in a container</desc>
|
||||
<node>ofqot</node>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<services>gnb_cucp gnb_cuup gnb_du_tdd</services>
|
||||
<services>gnb_cucp</services>
|
||||
</testCase>
|
||||
<testCase id="330102">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB-CU-UP in a container</desc>
|
||||
<node>ofqot</node>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<services>gnb_cuup</services>
|
||||
</testCase>
|
||||
<testCase id="330103">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container</desc>
|
||||
<node>ofqot</node>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<services>gnb_du_tdd</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="300000">
|
||||
@@ -126,6 +132,16 @@
|
||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/80Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 80M -t 30 -R</iperf_args>
|
||||
<id>idefix</id>
|
||||
<svr_id>sabox-nepes</svr_id>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="400001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Check UE is on dedicated BWP ID 1</desc>
|
||||
@@ -133,76 +149,19 @@
|
||||
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 1 (dedicated) UL BWP ID 1 (dedicated)'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="410001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Switch to dedicated BWP ID 1</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci trigger_bwp_switch 1 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 1 for UE'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="400000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Check UE is on initial BWP ID 0</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 0 (initial) UL BWP ID 0 (initial)'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="410002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Switch to dedicated BWP ID 2</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci trigger_bwp_switch 2 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 2 for UE'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370012">
|
||||
<testCase id="370001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 10 -R</iperf_args>
|
||||
<desc>iperf (UL/8Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 8M -t 30</iperf_args>
|
||||
<id>idefix</id>
|
||||
<svr_id>sabox-nepes</svr_id>
|
||||
<iperf_tcp_rate_target>35</iperf_tcp_rate_target>
|
||||
</testCase>
|
||||
|
||||
<testCase id="400002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Check UE is on dedicated BWP ID 2</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 2 (dedicated) UL BWP ID 2 (dedicated)'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="410003">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Switch to dedicated BWP ID 3</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci trigger_bwp_switch 3 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 3 for UE'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370013">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 10 -R</iperf_args>
|
||||
<id>idefix</id>
|
||||
<svr_id>sabox-nepes</svr_id>
|
||||
<iperf_tcp_rate_target>65</iperf_tcp_rate_target>
|
||||
</testCase>
|
||||
|
||||
<testCase id="400003">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Check UE is on dedicated BWP ID 3</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 3 (dedicated) UL BWP ID 3 (dedicated)'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="410000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Switch to initial BWP ID 0</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci trigger_bwp_switch 0 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 0 for UE'</command>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (BIDIR TCP)(20 sec)(single-ue profile)</desc>
|
||||
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 20 --bidir</iperf_args>
|
||||
<id>idefix</id>
|
||||
<svr_id>sabox-nepes</svr_id>
|
||||
@@ -210,17 +169,17 @@
|
||||
|
||||
<testCase id="370003">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/TCP)(20 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 20 -R</iperf_args>
|
||||
<desc>iperf (DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -R</iperf_args>
|
||||
<id>idefix</id>
|
||||
<svr_id>sabox-nepes</svr_id>
|
||||
<iperf_tcp_rate_target>140</iperf_tcp_rate_target>
|
||||
<iperf_tcp_rate_target>30</iperf_tcp_rate_target>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370004">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/TCP)(20 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 20</iperf_args>
|
||||
<desc>iperf (UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30</iperf_args>
|
||||
<id>idefix</id>
|
||||
<svr_id>sabox-nepes</svr_id>
|
||||
<iperf_tcp_rate_target>15</iperf_tcp_rate_target>
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
<desc>Undeploy gNB</desc>
|
||||
<node>matix</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<d_retx_th>10,100,100,100</d_retx_th>
|
||||
<u_retx_th>10,100,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
<desc>Undeploy gNB</desc>
|
||||
<node>matix</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<d_retx_th>15,100,100,100</d_retx_th>
|
||||
<u_retx_th>20,100,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
<desc>Undeploy VNF-PNF</desc>
|
||||
<node>matix</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_4x4_60MHz</yaml_path>
|
||||
<services>oai-vnf oai-pnf</services>
|
||||
<d_retx_th>10,100,100,100</d_retx_th>
|
||||
<u_retx_th>10,100,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
services:
|
||||
nearRT-RIC:
|
||||
oai-flexric:
|
||||
image: ${REGISTRY-oaisoftwarealliance/}oai-flexric:${FLEXRIC_TAG:-develop}
|
||||
container_name: nearRT-RIC
|
||||
container_name: oai-flexric
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.150
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_rc_moni"
|
||||
container_name: xapp-rc-moni
|
||||
depends_on:
|
||||
- nearRT-RIC
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
@@ -34,7 +34,7 @@ services:
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_kpm_moni"
|
||||
container_name: xapp-kpm-moni
|
||||
depends_on:
|
||||
- nearRT-RIC
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
@@ -51,7 +51,7 @@ services:
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/kpm_rc/xapp_kpm_rc"
|
||||
container_name: xapp-kpm-rc
|
||||
depends_on:
|
||||
- nearRT-RIC
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
@@ -68,7 +68,7 @@ services:
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni"
|
||||
container_name: xapp-gtp-mac-rlc-pdcp-moni
|
||||
depends_on:
|
||||
- nearRT-RIC
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
@@ -88,7 +88,7 @@ services:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- nearRT-RIC
|
||||
- oai-flexric
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.151
|
||||
|
||||
@@ -93,9 +93,7 @@ services:
|
||||
- ALL
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
|
||||
--telnetsrv --telnetsrv.listenaddr 192.168.71.140
|
||||
--telnetsrv.shrmod ci
|
||||
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
@@ -125,7 +123,7 @@ services:
|
||||
--rfsim --rfsimulator.prop_delay 20 --rfsimulator.options chanmod
|
||||
--rfsimulator.serveraddr 192.168.71.140
|
||||
--time-sync-I 0.1 --ntn-initial-time-drift -46
|
||||
--initial-fo 57340 --cont-fo-comp 2
|
||||
--autonomous-ta --initial-fo 57340 --cont-fo-comp 2
|
||||
--log_config.global_log_options level,nocolor,time
|
||||
--num-ul-actors 1
|
||||
depends_on:
|
||||
|
||||
@@ -97,9 +97,8 @@ services:
|
||||
- ALL
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --nfapi VNF --log_config.global_log_options level,nocolor,time
|
||||
--telnetsrv --telnetsrv.listenaddr 192.168.71.140 --telnetsrv.shrmod ci
|
||||
NFAPI_TRACE_LEVEL: info
|
||||
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
@@ -123,7 +122,7 @@ services:
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --nfapi PNF --rfsim --log_config.global_log_options level,nocolor,time
|
||||
NFAPI_TRACE_LEVEL: info
|
||||
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-vnf
|
||||
networks:
|
||||
@@ -148,10 +147,7 @@ services:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152680000 --CO -400000000 --ssb 48
|
||||
--rfsimulator.serveraddr 192.168.71.141 --extra-pdu-id 2 --log_config.global_log_options level,nocolor,time
|
||||
--telnetsrv --telnetsrv.shrmod ciUE --telnetsrv.listenaddr 192.168.71.150 --telnetsrv.listenport 8091
|
||||
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152680000 --CO -400000000 --ssb 48 --rfsimulator.serveraddr 192.168.71.141 --extra-pdu-id 2 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-pnf
|
||||
networks:
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
retries: 30
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.1.10
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.1.10
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.10
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:latest
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
oai-gnb:
|
||||
image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb}:${TAG:-develop}
|
||||
container_name: rfsim5g-oai-gnb
|
||||
cap_drop:
|
||||
- ALL
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --log_config.global_log_options level,nocolor,time --device.name vrtsim --vrtsim.role server --vrtsim.chanmod 1
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.140
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.vrtsim.2x2.yaml:/opt/oai-gnb/etc/gnb.yaml
|
||||
- tmp_data:/tmp/
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
retries: 5
|
||||
ipc: host
|
||||
oai-nr-ue:
|
||||
image: ${REGISTRY-oaisoftwarealliance/}${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E -r 106 --numerology 1 --band 78 -C 3619200000 --ssb 516 --uicc0.imsi 208990100001100 --log_config.global_log_options level,nocolor,time --device.name vrtsim
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.150
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
volumes:
|
||||
- ../../conf_files/nrue.vrtsim.chanmod.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml
|
||||
- tmp_data:/tmp/
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
ipc: host
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
|
||||
volumes:
|
||||
tmp_data:
|
||||
@@ -33,7 +33,7 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-gnb-aerial:
|
||||
cpuset: "13-16"
|
||||
cpuset: "13-14"
|
||||
image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb-aerial}:${TAG:-develop}
|
||||
depends_on:
|
||||
nv-cubb:
|
||||
|
||||
3
cmake_targets/snap_environment.sh
Executable file
3
cmake_targets/snap_environment.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
export UHD_IMAGES_DIR=$SNAP/uhd_images
|
||||
exec $@
|
||||
4
cmake_targets/tools/Kbuild.cmake
Executable file
4
cmake_targets/tools/Kbuild.cmake
Executable file
@@ -0,0 +1,4 @@
|
||||
src=${dir}
|
||||
obj-m += ${name}.o
|
||||
${name}-y += ${objs}
|
||||
ccflags-y += ${module_cc_opt}
|
||||
66
cmake_targets/tools/MODULES/CMakeParseArguments.cmake
Executable file
66
cmake_targets/tools/MODULES/CMakeParseArguments.cmake
Executable file
@@ -0,0 +1,66 @@
|
||||
# Analogue for standard CMake module with same name, appeared in CMake 2.8.3.
|
||||
#
|
||||
# Used for compatibility with older versions of cmake.
|
||||
|
||||
function(cmake_parse_arguments prefix options one_value_keywords multi_value_keywords)
|
||||
set(all_keywords ${options} ${one_value_keywords} ${multi_value_keywords})
|
||||
# Clear variables before parsing.
|
||||
foreach(arg ${one_value_keywords} ${multie_value_keywords})
|
||||
set(cpa_${arg})
|
||||
endforeach()
|
||||
|
||||
foreach(arg ${options})
|
||||
set(cpa_${arg} FALSE)
|
||||
endforeach()
|
||||
|
||||
set(cpa_UNPARSED_ARGUMENTS)
|
||||
|
||||
set(current_keyword)
|
||||
# Classification for current_keyword:
|
||||
# 'ONE' or 'MULTY'.
|
||||
set(current_keyword_type)
|
||||
|
||||
# now iterate over all arguments and fill the result variables
|
||||
foreach(arg ${ARGN})
|
||||
list(FIND all_keywords ${arg} keyword_index)
|
||||
|
||||
if(keyword_index EQUAL -1)
|
||||
if(current_keyword)
|
||||
if(current_keyword_type STREQUAL "ONE")
|
||||
set(cpa_${current_keyword} ${arg})
|
||||
set(current_keyword)
|
||||
else(current_keyword_type STREQUAL "ONE")
|
||||
list(APPEND cpa_${current_keyword} ${arg})
|
||||
endif(current_keyword_type STREQUAL "ONE")
|
||||
else(current_keyword)
|
||||
list(APPEND cpa_UNPARSED_ARGUMENTS ${arg})
|
||||
endif(current_keyword)
|
||||
else(keyword_index EQUAL -1)
|
||||
if(current_keyword AND current_keyword_type STREQUAL "ONE")
|
||||
message(SEND_ERROR "Value is expected for one-value-keyword ${current_keyword}")
|
||||
endif(current_keyword AND current_keyword_type STREQUAL "ONE")
|
||||
list(FIND options ${arg} option_index)
|
||||
if(option_index EQUAL -1)
|
||||
set(current_keyword ${arg})
|
||||
list(FIND one_value_keywords ${arg} one_value_index)
|
||||
if(one_value_index EQUAL -1)
|
||||
set(current_keyword_type "MULTI")
|
||||
else(one_value_index EQUAL -1)
|
||||
set(current_keyword_type "ONE")
|
||||
endif(one_value_index EQUAL -1)
|
||||
else(option_index EQUAL -1)
|
||||
set(current_keyword)
|
||||
set(cpa_${arg} TRUE)
|
||||
endif(option_index EQUAL -1)
|
||||
endif(keyword_index EQUAL -1)
|
||||
endforeach(arg ${ARGN})
|
||||
|
||||
if(current_keyword AND current_keyword_type STREQUAL "ONE")
|
||||
message(SEND_ERROR "Value is expected for one-value-keyword ${current_keyword}")
|
||||
endif(current_keyword AND current_keyword_type STREQUAL "ONE")
|
||||
|
||||
# propagate the result variables to the caller:
|
||||
foreach(keyword ${all_keywords} UNPARSED_ARGUMENTS)
|
||||
set(${prefix}_${keyword} ${cpa_${keyword}} PARENT_SCOPE)
|
||||
endforeach(keyword ${all_keywords})
|
||||
endfunction(cmake_parse_arguments prefix options one_value_keywords multi_value_keywords)
|
||||
48
cmake_targets/tools/MODULES/CMakeUserFindMySQL.cmake
Executable file
48
cmake_targets/tools/MODULES/CMakeUserFindMySQL.cmake
Executable file
@@ -0,0 +1,48 @@
|
||||
# - Find mysqlclient
|
||||
# Find the native MySQL includes and library
|
||||
#
|
||||
# MYSQL_INCLUDE_DIR - where to find mysql.h, etc.
|
||||
# MYSQL_LIBRARIES - List of libraries when using MySQL.
|
||||
# MYSQL_FOUND - True if MySQL found.
|
||||
|
||||
IF (MYSQL_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(MYSQL_FIND_QUIETLY TRUE)
|
||||
ENDIF (MYSQL_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
|
||||
/usr/local/include/mysql
|
||||
/usr/include/mysql
|
||||
)
|
||||
|
||||
SET(MYSQL_NAMES mysqlclient mysqlclient_r)
|
||||
FIND_LIBRARY(MYSQL_LIBRARY
|
||||
NAMES ${MYSQL_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
PATH_SUFFIXES mysql
|
||||
)
|
||||
|
||||
IF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
|
||||
SET(MYSQL_FOUND TRUE)
|
||||
SET( MYSQL_LIBRARIES ${MYSQL_LIBRARY} )
|
||||
ELSE (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
|
||||
SET(MYSQL_FOUND FALSE)
|
||||
SET( MYSQL_LIBRARIES )
|
||||
ENDIF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
|
||||
|
||||
IF (MYSQL_FOUND)
|
||||
IF (NOT MYSQL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY}")
|
||||
ENDIF (NOT MYSQL_FIND_QUIETLY)
|
||||
ELSE (MYSQL_FOUND)
|
||||
IF (MYSQL_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "Looked for MySQL libraries named ${MYSQL_NAMES}.")
|
||||
MESSAGE(FATAL_ERROR "Could NOT find MySQL library")
|
||||
ENDIF (MYSQL_FIND_REQUIRED)
|
||||
ENDIF (MYSQL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
MYSQL_LIBRARY
|
||||
MYSQL_INCLUDE_DIR
|
||||
)
|
||||
|
||||
71
cmake_targets/tools/MODULES/CMakeUserUseBison.cmake
Executable file
71
cmake_targets/tools/MODULES/CMakeUserUseBison.cmake
Executable file
@@ -0,0 +1,71 @@
|
||||
# - Look for GNU Bison, the parser generator
|
||||
# Based off a news post from Andy Cedilnik at Kitware
|
||||
# Defines the following:
|
||||
# BISON_EXECUTABLE - path to the bison executable
|
||||
# BISON_FILE - parse a file with bison
|
||||
# BISON_PREFIX_OUTPUTS - Set to true to make BISON_FILE produce prefixed
|
||||
# symbols in the generated output based on filename.
|
||||
# So for ${filename}.y, you'll get ${filename}parse(), etc.
|
||||
# instead of yyparse().
|
||||
# BISON_GENERATE_DEFINES - Set to true to make BISON_FILE output the matching
|
||||
# .h file for a .c file. You want this if you're using
|
||||
# flex.
|
||||
|
||||
IF(NOT DEFINED BISON_PREFIX_OUTPUTS)
|
||||
SET(BISON_PREFIX_OUTPUTS FALSE)
|
||||
ENDIF(NOT DEFINED BISON_PREFIX_OUTPUTS)
|
||||
|
||||
IF(NOT DEFINED BISON_GENERATE_DEFINES)
|
||||
SET(BISON_GENERATE_DEFINES FALSE)
|
||||
ENDIF(NOT DEFINED BISON_GENERATE_DEFINES)
|
||||
|
||||
IF(NOT BISON_EXECUTABLE)
|
||||
MESSAGE(STATUS "Looking for bison")
|
||||
FIND_PROGRAM(BISON_EXECUTABLE bison)
|
||||
IF(BISON_EXECUTABLE)
|
||||
MESSAGE(STATUS "Looking for bison -- ${BISON_EXECUTABLE}")
|
||||
ENDIF(BISON_EXECUTABLE)
|
||||
ENDIF(NOT BISON_EXECUTABLE)
|
||||
|
||||
IF(BISON_EXECUTABLE)
|
||||
MACRO(BISON_FILE FILENAME)
|
||||
GET_FILENAME_COMPONENT(PATH "${FILENAME}" PATH)
|
||||
IF("${PATH}" STREQUAL "")
|
||||
SET(PATH_OPT "")
|
||||
ELSE("${PATH}" STREQUAL "")
|
||||
SET(PATH_OPT "/${PATH}")
|
||||
ENDIF("${PATH}" STREQUAL "")
|
||||
GET_FILENAME_COMPONENT(HEAD "${FILENAME}" NAME_WE)
|
||||
IF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}")
|
||||
FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}")
|
||||
ENDIF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}")
|
||||
IF(BISON_PREFIX_OUTPUTS)
|
||||
SET(PREFIX "${HEAD}")
|
||||
ELSE(BISON_PREFIX_OUTPUTS)
|
||||
SET(PREFIX "yy")
|
||||
ENDIF(BISON_PREFIX_OUTPUTS)
|
||||
SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}/${HEAD}.tab.c")
|
||||
IF(BISON_GENERATE_DEFINES)
|
||||
SET(HEADER "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}/${HEAD}.tab.h")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT "${OUTFILE}" "${HEADER}"
|
||||
COMMAND "${BISON_EXECUTABLE}"
|
||||
ARGS "--name-prefix=${PREFIX}"
|
||||
"--defines"
|
||||
"--output-file=${OUTFILE}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}")
|
||||
SET_SOURCE_FILES_PROPERTIES("${OUTFILE}" "${HEADER}" PROPERTIES GENERATED TRUE)
|
||||
SET_SOURCE_FILES_PROPERTIES("${HEADER}" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
ELSE(BISON_GENERATE_DEFINES)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT "${OUTFILE}"
|
||||
COMMAND "${BISON_EXECUTABLE}"
|
||||
ARGS "--name-prefix=${PREFIX}"
|
||||
"--output-file=${OUTFILE}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}")
|
||||
SET_SOURCE_FILES_PROPERTIES("${OUTFILE}" PROPERTIES GENERATED TRUE)
|
||||
ENDIF(BISON_GENERATE_DEFINES)
|
||||
ENDMACRO(BISON_FILE)
|
||||
ENDIF(BISON_EXECUTABLE)
|
||||
46
cmake_targets/tools/MODULES/CMakeUserUseFlex.cmake
Executable file
46
cmake_targets/tools/MODULES/CMakeUserUseFlex.cmake
Executable file
@@ -0,0 +1,46 @@
|
||||
# - Look for GNU flex, the lexer generator.
|
||||
# Defines the following:
|
||||
# FLEX_EXECUTABLE - path to the flex executable
|
||||
# FLEX_FILE - parse a file with flex
|
||||
# FLEX_PREFIX_OUTPUTS - Set to true to make FLEX_FILE produce outputs of
|
||||
# lex.${filename}.c, not lex.yy.c . Passes -P to flex.
|
||||
|
||||
IF(NOT DEFINED FLEX_PREFIX_OUTPUTS)
|
||||
SET(FLEX_PREFIX_OUTPUTS FALSE)
|
||||
ENDIF(NOT DEFINED FLEX_PREFIX_OUTPUTS)
|
||||
|
||||
IF(NOT FLEX_EXECUTABLE)
|
||||
MESSAGE(STATUS "Looking for flex")
|
||||
FIND_PROGRAM(FLEX_EXECUTABLE flex)
|
||||
IF(FLEX_EXECUTABLE)
|
||||
MESSAGE(STATUS "Looking for flex -- ${FLEX_EXECUTABLE}")
|
||||
ENDIF(FLEX_EXECUTABLE)
|
||||
ENDIF(NOT FLEX_EXECUTABLE)
|
||||
|
||||
IF(FLEX_EXECUTABLE)
|
||||
MACRO(FLEX_FILE FILENAME)
|
||||
GET_FILENAME_COMPONENT(PATH "${FILENAME}" PATH)
|
||||
IF("${PATH}" STREQUAL "")
|
||||
SET(PATH_OPT "")
|
||||
ELSE("${PATH}" STREQUAL "")
|
||||
SET(PATH_OPT "/${PATH}")
|
||||
ENDIF("${PATH}" STREQUAL "")
|
||||
IF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}")
|
||||
FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}")
|
||||
ENDIF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}")
|
||||
IF(FLEX_PREFIX_OUTPUTS)
|
||||
GET_FILENAME_COMPONENT(PREFIX "${FILENAME}" NAME_WE)
|
||||
ELSE(FLEX_PREFIX_OUTPUTS)
|
||||
SET(PREFIX "yy")
|
||||
ENDIF(FLEX_PREFIX_OUTPUTS)
|
||||
SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}/lex.${PREFIX}.c")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT "${OUTFILE}"
|
||||
COMMAND "${FLEX_EXECUTABLE}"
|
||||
ARGS "--prefix=${PREFIX}"
|
||||
"--outfile=${OUTFILE}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}")
|
||||
SET_SOURCE_FILES_PROPERTIES("${OUTFILE}" PROPERTIES GENERATED TRUE)
|
||||
ENDMACRO(FLEX_FILE)
|
||||
ENDIF(FLEX_EXECUTABLE)
|
||||
8
cmake_targets/tools/MODULES/FindGCCXML.cmake
Executable file
8
cmake_targets/tools/MODULES/FindGCCXML.cmake
Executable file
@@ -0,0 +1,8 @@
|
||||
# FindGCCXML
|
||||
# ----------
|
||||
find_program(GCCXML
|
||||
NAMES gccxml
|
||||
PATHS "/usr/bin"
|
||||
"usr/local/bin"
|
||||
)
|
||||
mark_as_advanced(GCCXML)
|
||||
105
cmake_targets/tools/MODULES/FindKbuild.cmake
Executable file
105
cmake_targets/tools/MODULES/FindKbuild.cmake
Executable file
@@ -0,0 +1,105 @@
|
||||
# - Support for building kernel modules
|
||||
|
||||
# This module defines several variables which may be used when build
|
||||
# kernel modules.
|
||||
#
|
||||
# The following variables are set here:
|
||||
# Kbuild_VERSION_STRING - kernel version.
|
||||
# Kbuild_ARCH - architecture.
|
||||
# Kbuild_BUILD_DIR - directory for build kernel and/or its components.
|
||||
# Kbuild_VERSION_{MAJOR|MINOR|TWEAK} - kernel version components
|
||||
# Kbuild_VERSION_STRING_CLASSIC - classic representation of version,
|
||||
# where parts are delimited by dots.
|
||||
#
|
||||
# Cache variables which affect on this package:
|
||||
# CMAKE_SYSTEM_VERSION - change Kbuild_VERSION_STRING
|
||||
# Also, setting CMAKE_SYSTEM_VERSION will be interpreted by cmake as crosscompile.
|
||||
#
|
||||
# Cache variables(ADVANCED) which affect on this package:
|
||||
# ARCH - if not empty, change Kbuild_ARCH
|
||||
# KBUILD_DIR - change Kbuild_BUILD_DIR
|
||||
|
||||
set(Kbuild_VERSION_STRING ${CMAKE_SYSTEM_VERSION})
|
||||
|
||||
# Form classic version view.
|
||||
string(REGEX MATCH "([0-9]+)\\.([0-9]+)[.-]([0-9]+)"
|
||||
_kernel_version_match
|
||||
"${Kbuild_VERSION_STRING}"
|
||||
)
|
||||
|
||||
if(NOT _kernel_version_match)
|
||||
message(FATAL_ERROR "Kernel version has unexpected format: ${Kbuild_VERSION_STRING}")
|
||||
endif(NOT _kernel_version_match)
|
||||
|
||||
set(Kbuild_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(Kbuild_VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(Kbuild_VERSION_TWEAK ${CMAKE_MATCH_3})
|
||||
# Version string for compare
|
||||
set(Kbuild_VERSION_STRING_CLASSIC "${Kbuild_VERSION_MAJOR}.${Kbuild_VERSION_MINOR}.${Kbuild_VERSION_TWEAK}")
|
||||
|
||||
set(KBUILD_DIR "/lib/modules/${Kbuild_VERSION_STRING}/build" CACHE PATH
|
||||
"Directory for build linux kernel and/or its components."
|
||||
)
|
||||
mark_as_advanced(KBUILD_DIR)
|
||||
|
||||
set(Kbuild_BUILD_DIR "${KBUILD_DIR}")
|
||||
|
||||
set(ARCH "" CACHE STRING
|
||||
"Architecture for build linux kernel components for, empty string means autodetect."
|
||||
)
|
||||
mark_as_advanced(ARCH)
|
||||
|
||||
if(NOT ARCH)
|
||||
# Autodetect arch.
|
||||
execute_process(COMMAND uname -m
|
||||
RESULT_VARIABLE uname_m_result
|
||||
OUTPUT_VARIABLE ARCH_DEFAULT
|
||||
)
|
||||
if(NOT uname_m_result EQUAL 0)
|
||||
message("'uname -m' failed:")
|
||||
message("${ARCH_DEFAULT}")
|
||||
message(FATAL_ERROR "Failed to determine system architecture.")
|
||||
endif(NOT uname_m_result EQUAL 0)
|
||||
|
||||
string(REGEX REPLACE "\n$" "" ARCH_DEFAULT "${ARCH_DEFAULT}")
|
||||
|
||||
# Pairs of pattern-replace for postprocess architecture string from
|
||||
# 'uname -m'.
|
||||
# Taken from ./Makefile of the kernel build.
|
||||
set(_kbuild_arch_replacers
|
||||
"i.86" "x86"
|
||||
"x86_64" "x86"
|
||||
"sun4u" "sparc64"
|
||||
"arm.*" "arm"
|
||||
"sa110" "arm"
|
||||
"s390x" "s390"
|
||||
"parisc64" "parisc"
|
||||
"ppc.*" "powerpc"
|
||||
"mips.*" "mips"
|
||||
"sh[234].*" "sh"
|
||||
"aarch64.*" "arm64"
|
||||
)
|
||||
|
||||
set(_current_pattern)
|
||||
foreach(p ${_kbuild_arch_replacers})
|
||||
if(_current_pattern)
|
||||
string(REGEX REPLACE "${_current_pattern}" "${p}" ARCH_DEFAULT "${ARCH_DEFAULT}")
|
||||
set(_current_pattern)
|
||||
else(_current_pattern)
|
||||
set(_current_pattern "${p}")
|
||||
endif(_current_pattern)
|
||||
endforeach(p ${_kbuild_arch_replacers})
|
||||
|
||||
set(Kbuild_ARCH "${ARCH_DEFAULT}")
|
||||
else(NOT ARCH)
|
||||
# User-provided value is used.
|
||||
set(Kbuild_ARCH "${ARCH}")
|
||||
endif(NOT ARCH)
|
||||
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Kbuild
|
||||
REQUIRED_VARS Kbuild_BUILD_DIR
|
||||
VERSION_VAR KBuild_VERSION_STRING_CLASSIC
|
||||
)
|
||||
4
cmake_targets/tools/MODULES/Kbuild.cmake
Executable file
4
cmake_targets/tools/MODULES/Kbuild.cmake
Executable file
@@ -0,0 +1,4 @@
|
||||
src=${dir}
|
||||
obj-m += ${name}.o
|
||||
${name}-y += ${objs}
|
||||
ccflags-y += ${module_cc_opt}
|
||||
229
cmake_targets/tools/MODULES/cmake_useful.cmake
Executable file
229
cmake_targets/tools/MODULES/cmake_useful.cmake
Executable file
@@ -0,0 +1,229 @@
|
||||
# Create rule for obtain one file by copying another one
|
||||
function(rule_copy_file target_file source_file)
|
||||
add_custom_command(OUTPUT ${target_file}
|
||||
COMMAND cp -p ${source_file} ${target_file}
|
||||
DEPENDS ${source_file}
|
||||
)
|
||||
endfunction(rule_copy_file target_file source_file)
|
||||
|
||||
# rule_copy_source([source_dir] file ...)
|
||||
#
|
||||
# Create rule for obtain file(s) in binary tree by copiing it from source tree.
|
||||
#
|
||||
# Files are given relative to ${source_dir}, if it is set, or
|
||||
# relative to ${CMAKE_CURRENT_SOURCE_DIR}.
|
||||
#
|
||||
# Files will be copied into ${CMAKE_CURRENT_BINARY_DIR} with same
|
||||
# relative paths.
|
||||
#
|
||||
# ${source_dir} should be absolute path(that is, starts from '/').
|
||||
# Otherwise first argument is treated as first file to copy.
|
||||
function(rule_copy_source file)
|
||||
string(REGEX MATCH "^/" is_abs_path ${file})
|
||||
if(is_abs_path)
|
||||
set(source_dir ${file})
|
||||
set(files ${ARGN})
|
||||
else(is_abs_path)
|
||||
set(source_dir ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(files ${file} ${ARGN})
|
||||
endif(is_abs_path)
|
||||
|
||||
foreach(file_real ${files})
|
||||
rule_copy_file("${CMAKE_CURRENT_BINARY_DIR}/${file_real}"
|
||||
${source_dir}/${file_real})
|
||||
endforeach(file_real ${files})
|
||||
endfunction(rule_copy_source file)
|
||||
|
||||
# to_abs_path(output_var path [...])
|
||||
#
|
||||
# Convert relative path of file to absolute path:
|
||||
# use path in source tree, if file already exist there.
|
||||
# otherwise use path in binary tree.
|
||||
# If initial path already absolute, return it.
|
||||
function(to_abs_path output_var)
|
||||
set(result)
|
||||
foreach(path ${ARGN})
|
||||
string(REGEX MATCH "^/" _is_abs_path ${path})
|
||||
if(_is_abs_path)
|
||||
list(APPEND result ${path})
|
||||
else(_is_abs_path)
|
||||
file(GLOB to_abs_path_file
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${path}"
|
||||
)
|
||||
if(NOT to_abs_path_file)
|
||||
set (to_abs_path_file "${CMAKE_CURRENT_BINARY_DIR}/${path}")
|
||||
endif(NOT to_abs_path_file)
|
||||
list(APPEND result ${to_abs_path_file})
|
||||
endif(_is_abs_path)
|
||||
endforeach(path ${ARGN})
|
||||
set("${output_var}" ${result} PARENT_SCOPE)
|
||||
endfunction(to_abs_path output_var path)
|
||||
|
||||
# is_path_inside_dir(output_var dir path)
|
||||
#
|
||||
# Set output_var to true if path is absolute path inside given directory.
|
||||
# NOTE: Path should be absolute.
|
||||
macro(is_path_inside_dir output_var dir path)
|
||||
file(RELATIVE_PATH _rel_path ${dir} ${path})
|
||||
string(REGEX MATCH "^\\.\\." _is_not_inside_dir ${_rel_path})
|
||||
if(_is_not_inside_dir)
|
||||
set(${output_var} "FALSE")
|
||||
else(_is_not_inside_dir)
|
||||
set(${output_var} "TRUE")
|
||||
endif(_is_not_inside_dir)
|
||||
endmacro(is_path_inside_dir output_var dir path)
|
||||
|
||||
|
||||
# Write given content to the file.
|
||||
#
|
||||
# If file is already exists and its content is same as written one, file
|
||||
# is not rewritten, so its write timestamp remains unchanged.
|
||||
function(file_update filename content)
|
||||
if(EXISTS "${filename}")
|
||||
file(READ "${filename}" old_content)
|
||||
if(old_content STREQUAL "${content}")
|
||||
return()
|
||||
endif(old_content STREQUAL "${content}")
|
||||
endif(EXISTS "${filename}")
|
||||
# File doesn't exists or its content differ.
|
||||
file(WRITE "${filename}" "${content}")
|
||||
endfunction(file_update filename content)
|
||||
|
||||
|
||||
# Write given content to the file in APPEND mode.
|
||||
#
|
||||
# For append we use position variable <pos> which should be initialized
|
||||
# to 0 for every new build process and which is updated every time when
|
||||
# this function is called.
|
||||
# If file is already exists and its content at given <pos> is same as
|
||||
# written one, file is not rewritten, so its write timestamp remains unchanged.
|
||||
#
|
||||
# Note, that file will not be rewritten if new build process issues less
|
||||
# APPEND actions than one which create file.
|
||||
# But similar problem exists for file_update() and even for built-in
|
||||
# configure_file() command: file will not be removed if new build process
|
||||
# do not call configure_file() for it.
|
||||
function(file_update_append filename content POS)
|
||||
set(pos "${${POS}}")
|
||||
string(LENGTH "${content}" len)
|
||||
# Update output variable first.
|
||||
# This allows to use return() when need not to do anything
|
||||
math(EXPR pos_new "${pos}+${len}")
|
||||
set(${POS} "${pos_new}" PARENT_SCOPE)
|
||||
if(EXISTS "${filename}")
|
||||
file(READ "${filename}" old_content LIMIT "${len}" OFFSET "${pos}")
|
||||
if(old_content STREQUAL "${content}")
|
||||
return()
|
||||
elseif(old_content STREQUAL "")
|
||||
file(APPEND "${filename}" "${content}")
|
||||
return()
|
||||
endif(old_content STREQUAL "${content}")
|
||||
else(EXISTS "${filename}")
|
||||
if(NOT pos EQUAL 0)
|
||||
message(FATAL_ERROR "Appending to non-zero position to non-existent file.")
|
||||
endif(NOT pos EQUAL 0)
|
||||
endif(EXISTS "${filename}")
|
||||
# File doesn't exists or its content differ.
|
||||
if(NOT pos EQUAL 0)
|
||||
file(READ "${filename}" prefix LIMIT "${pos}")
|
||||
else(NOT pos EQUAL 0)
|
||||
set(prefix)
|
||||
endif(NOT pos EQUAL 0)
|
||||
file(WRITE "${filename}" "${prefix}${content}")
|
||||
endfunction(file_update_append filename content POS)
|
||||
|
||||
|
||||
# Common mechanism for output status message
|
||||
# when checking different aspects.
|
||||
#
|
||||
# Normal using:
|
||||
#
|
||||
# check_begin("Checking <...>")
|
||||
# if(NOT <check-already-has-been-done>)
|
||||
# check_try() # Here message is printed
|
||||
# # Perform check(try_compile(), etc.)
|
||||
# endif(NOT <check-already-has-been-done>)
|
||||
# check_end("<check-result>") # Here message is printed with result.
|
||||
|
||||
# Should be called (unconditionally) when new cheking is issued.
|
||||
# Note, that given @status_msg is not printed at that step.
|
||||
function(check_begin status_msg)
|
||||
set(_check_status_msg ${status_msg} PARENT_SCOPE)
|
||||
set(_check_has_tries PARENT_SCOPE)
|
||||
endfunction(check_begin status_msg)
|
||||
|
||||
# Should be called before every real checking, that is which is not come
|
||||
# from cache variables comparision.
|
||||
#
|
||||
# First call of that function is trigger printing of @status_msg,
|
||||
# passed to check_begin().
|
||||
function(check_try)
|
||||
if(NOT _check_has_tries)
|
||||
message(STATUS "${_check_status_msg}")
|
||||
set(_check_has_tries "1" PARENT_SCOPE)
|
||||
endif(NOT _check_has_tries)
|
||||
endfunction(check_try)
|
||||
|
||||
# Should be called when cheking is end, and @result_msg should be short
|
||||
# description of check result.
|
||||
# If any check_try() has been issued before,
|
||||
# "@status_msg - @result_msg"
|
||||
# will be printed.
|
||||
# Otherwise,
|
||||
# "@status_msg - [cached] @result_msg"
|
||||
# will be printed, at it will be the only message for that check.
|
||||
function(check_end result_msg)
|
||||
if(NOT _check_has_tries)
|
||||
message(STATUS "${_check_status_msg} [cached] - ${result_msg}")
|
||||
else(NOT _check_has_tries)
|
||||
message(STATUS "${_check_status_msg} - ${result_msg}")
|
||||
endif(NOT _check_has_tries)
|
||||
set(_check_status_msg PARENT_SCOPE)
|
||||
set(_check_has_tries PARENT_SCOPE)
|
||||
endfunction(check_end result_msg)
|
||||
|
||||
# set_bool_string(var true_string false_string value [CACHE ... | PARENT_SCOPE])
|
||||
#
|
||||
# Set variable to one of two string according to true property of some value.
|
||||
#
|
||||
# If 'value' is true-evaluated, 'var' will be set to 'true_string',
|
||||
# otherwise to 'var' will be set to 'false_string'.
|
||||
# Like standard set(), macro accept CACHE and PARENT_SCOPE modifiers.
|
||||
#
|
||||
# Useful for form meaningful value for cache variables, contained result
|
||||
# of some operation.
|
||||
# Also may be used for form message for check_end().
|
||||
macro(set_bool_string var true_string false_string value)
|
||||
# Macro parameters are not a variables, so them cannot be tested
|
||||
# using 'if(value)'.
|
||||
# Usage 'if(${value})' leads to warnings since 2.6.4 when ${val}
|
||||
# is boolean constant
|
||||
# (because until 2.6.4 'if(value)' always dereference val).
|
||||
# So copy 'value' to local variable for test it.
|
||||
set(_set_bool_string_value ${value})
|
||||
if(_set_bool_string_value)
|
||||
set(${var} "${true_string}" ${ARGN})
|
||||
else()
|
||||
set(${var} "${false_string}" ${ARGN})
|
||||
endif()
|
||||
endmacro(set_bool_string)
|
||||
|
||||
# set_zero_string(var true_string false_string value [CACHE ... | PARENT_SCOPE])
|
||||
#
|
||||
# Set variable to one of two string according to zero property of some value.
|
||||
#
|
||||
# If 'value' is '0' (presizely), 'var' will be set to 'zero_string',
|
||||
# otherwise to 'var' will be set to 'nonzero_string'.
|
||||
# Like standard set(), macro accept CACHE and PARENT_SCOPE modifiers.
|
||||
#
|
||||
# Useful for form meaningful value for cache variables, contained result
|
||||
# of execute_process().
|
||||
# Also may be used for form message for check_end().
|
||||
macro(set_zero_string var zero_string nonzero_string value)
|
||||
set(_set_zero_string_value ${value})
|
||||
if(_set_zero_string_value EQUAL "0")
|
||||
set(${var} ${zero_string} ${ARGN})
|
||||
else()
|
||||
set(${var} ${nonzero_string} ${ARGN})
|
||||
endif()
|
||||
endmacro(set_zero_string)
|
||||
1131
cmake_targets/tools/MODULES/kbuild_system.cmake
Executable file
1131
cmake_targets/tools/MODULES/kbuild_system.cmake
Executable file
File diff suppressed because it is too large
Load Diff
539
cmake_targets/tools/MODULES/kmodule.cmake
Executable file
539
cmake_targets/tools/MODULES/kmodule.cmake
Executable file
@@ -0,0 +1,539 @@
|
||||
set(kmodule_this_module_dir "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||
set(kmodule_test_sources_dir "${CMAKE_SOURCE_DIR}/cmake/kmodule_sources")
|
||||
|
||||
set(kmodule_function_map_file "")
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
if (KEDR_SYSTEM_MAP_FILE)
|
||||
set (kmodule_function_map_file "${KEDR_SYSTEM_MAP_FILE}")
|
||||
else (KEDR_SYSTEM_MAP_FILE)
|
||||
# KEDR_SYSTEM_MAP_FILE is not specified, construct the default path
|
||||
# to the symbol map file.
|
||||
set (kmodule_function_map_file
|
||||
"${KEDR_ROOT_DIR}/boot/System.map-${KBUILD_VERSION_STRING}"
|
||||
)
|
||||
endif (KEDR_SYSTEM_MAP_FILE)
|
||||
endif (CMAKE_CROSSCOMPILING)
|
||||
|
||||
# List of unreliable functions, that is, the functions that may be
|
||||
# be exported and mentioned in System.map but still cannot be used
|
||||
# because no header provides their declarations.
|
||||
set(unreliable_functions_list
|
||||
"__kmalloc_node"
|
||||
"kmem_cache_alloc_node"
|
||||
"kmem_cache_alloc_node_notrace"
|
||||
"kmem_cache_alloc_node_trace"
|
||||
)
|
||||
|
||||
# kmodule_is_function_exist(function_name RESULT_VAR)
|
||||
# Verify, whether given function exist in the kernel space on the current system.
|
||||
# RESULT_VAR is TRUE, if function_name exist in the kernel space, FALSE otherwise.
|
||||
# RESULT_VAR is cached.
|
||||
|
||||
function(kmodule_is_function_exist function_name RESULT_VAR)
|
||||
check_begin("Looking for ${function_name} in the kernel")
|
||||
if(NOT DEFINED ${RESULT_VAR})
|
||||
check_try()
|
||||
execute_process(
|
||||
COMMAND sh "${kmodule_this_module_dir}/kmodule_files/scripts/lookup_kernel_function.sh"
|
||||
${function_name} ${kmodule_function_map_file}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE kmodule_is_function_exist_result
|
||||
OUTPUT_QUIET)
|
||||
|
||||
if (kmodule_is_function_exist_result EQUAL 0)
|
||||
list(FIND unreliable_functions_list ${function_name} unreliable_function_index)
|
||||
if(unreliable_function_index GREATER -1)
|
||||
# Additional verification for unreliable function
|
||||
kbuild_try_compile(kmodule_function_is_exist_reliable
|
||||
"${CMAKE_BINARY_DIR}/check_unreliable_functions/${function_name}"
|
||||
"${kmodule_test_sources_dir}/check_unreliable_functions/${function_name}.c"
|
||||
)
|
||||
if(NOT kmodule_function_is_exist_reliable)
|
||||
set(kmodule_is_function_exist_result 1)
|
||||
endif(NOT kmodule_function_is_exist_reliable)
|
||||
endif(unreliable_function_index GREATER -1)
|
||||
endif(kmodule_is_function_exist_result EQUAL 0)
|
||||
|
||||
if (kmodule_is_function_exist_result EQUAL 0)
|
||||
set(${RESULT_VAR} "TRUE" CACHE INTERNAL "Does ${function_name} exist in the kernel?")
|
||||
elseif(kmodule_is_function_exist_result EQUAL 1)
|
||||
set(${RESULT_VAR} "FALSE" CACHE INTERNAL "Does ${function_name} exist in the kernel?")
|
||||
else(kmodule_is_function_exist_result EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"Cannot determine whether function '${function_name}' exists in the kernel"
|
||||
)
|
||||
endif(kmodule_is_function_exist_result EQUAL 0)
|
||||
endif(NOT DEFINED ${RESULT_VAR})
|
||||
set_bool_string(check_result "found" "not found" ${${RESULT_VAR}})
|
||||
check_end(${check_result})
|
||||
endfunction(kmodule_is_function_exist function_name RESULT_VAR)
|
||||
|
||||
# Creates the list of functions that actually exist on the
|
||||
# current system.
|
||||
#
|
||||
# kmodule_configure_kernel_functions(output_list
|
||||
# {[REQUIRED | OPTIONAL] {func | ONE_OF_LIST}} ...)
|
||||
#
|
||||
# ONE_OF_LIST := ONE_OF_BEGIN {func ...} ONE_OF_END
|
||||
#
|
||||
# There are 2 modes of function lookup:
|
||||
# OPTIONAL - if the function doesn't exist, it is silently ignored.
|
||||
# REQUIRED - if the function doesn't exist, FATAL_ERROR message is printed.
|
||||
#
|
||||
# Initial mode is REQUIRED, and it can be changed at any time by REQUIRED
|
||||
# and OPTIONAL keywords.
|
||||
#
|
||||
# ONE_OF_BEGIN/ONE_OF_END determine a section for which no more than one
|
||||
# function among all listed there should exist. FATAL_ERROR message is
|
||||
# printed otherwise. When mode is REQUIRED, precisely one function must
|
||||
# exist.
|
||||
# Inside this section other keywords must not be used (even another
|
||||
# ONE_OF_BEGIN).
|
||||
|
||||
function(kmodule_configure_kernel_functions output_list)
|
||||
set(kmodule_configure_kernel_functions_mode "REQUIRED")
|
||||
set(kmodule_configure_kernel_functions_one_of_section "FALSE")
|
||||
set(output_list_tmp)
|
||||
set(${output_list})
|
||||
foreach(arg ${ARGN})
|
||||
if(arg STREQUAL "REQUIRED" OR arg STREQUAL "OPTIONAL")
|
||||
if(kmodule_configure_kernel_functions_one_of_section)
|
||||
message(FATAL_ERROR
|
||||
"Inside ONE_OF_BEGIN/ONE_OF_END section, other keywords are not allowed."
|
||||
)
|
||||
endif(kmodule_configure_kernel_functions_one_of_section)
|
||||
set(kmodule_configure_kernel_functions_mode ${arg})
|
||||
elseif(arg STREQUAL "ONE_OF_BEGIN")
|
||||
if(kmodule_configure_kernel_functions_one_of_section)
|
||||
message(FATAL_ERROR "Nested ONE_OF_BEGIN/ONE_OF_END sections are not allowed.")
|
||||
endif(kmodule_configure_kernel_functions_one_of_section)
|
||||
set(kmodule_configure_kernel_functions_one_of_section "TRUE")
|
||||
set(kmodule_configure_kernel_functions_one_of_section_function)
|
||||
elseif(arg STREQUAL "ONE_OF_END")
|
||||
if(NOT kmodule_configure_kernel_functions_one_of_section)
|
||||
message(FATAL_ERROR "ONE_OF_END without ONE_OF_BEGIN is not allowed.")
|
||||
endif(NOT kmodule_configure_kernel_functions_one_of_section)
|
||||
if(kmodule_configure_kernel_functions_one_of_section_function)
|
||||
list(APPEND output_list_tmp ${kmodule_configure_kernel_functions_one_of_section_function})
|
||||
else(kmodule_configure_kernel_functions_one_of_section_function)
|
||||
if(kmodule_configure_kernel_functions_mode STREQUAL "REQUIRED")
|
||||
message(FATAL_ERROR
|
||||
"None of the functions listed in ONE_OF section exist in the kernel but it is required."
|
||||
)
|
||||
endif(kmodule_configure_kernel_functions_mode STREQUAL "REQUIRED")
|
||||
endif(kmodule_configure_kernel_functions_one_of_section_function)
|
||||
set(kmodule_configure_kernel_functions_one_of_section "FALSE")
|
||||
else(arg STREQUAL "REQUIRED" OR arg STREQUAL "OPTIONAL")
|
||||
set(kmodule_func_varname _KMODULE_IS_${arg}_EXIST)
|
||||
kedr_find_function(${arg} ${kmodule_func_varname})
|
||||
if(kmodule_configure_kernel_functions_one_of_section)
|
||||
if(${kmodule_func_varname})
|
||||
if(kmodule_configure_kernel_functions_one_of_section_function)
|
||||
message(FATAL_ERROR "Two functions from ONE_OF sections exist in the kernel.")
|
||||
else(kmodule_configure_kernel_functions_one_of_section_function)
|
||||
set(kmodule_configure_kernel_functions_one_of_section_function ${arg})
|
||||
endif(kmodule_configure_kernel_functions_one_of_section_function)
|
||||
endif(${kmodule_func_varname})
|
||||
else(kmodule_configure_kernel_functions_one_of_section)
|
||||
if(${kmodule_func_varname})
|
||||
list(APPEND output_list_tmp ${arg})
|
||||
else(${kmodule_func_varname})
|
||||
if(kmodule_configure_kernel_functions_mode STREQUAL "REQUIRED")
|
||||
message(FATAL_ERROR "Function ${arg} is not found in the kernel but it is required.")
|
||||
endif(kmodule_configure_kernel_functions_mode STREQUAL "REQUIRED")
|
||||
endif(${kmodule_func_varname})
|
||||
endif(kmodule_configure_kernel_functions_one_of_section)
|
||||
endif(arg STREQUAL "REQUIRED" OR arg STREQUAL "OPTIONAL")
|
||||
endforeach(arg ${ARGN})
|
||||
if(kmodule_configure_kernel_functions_one_of_section)
|
||||
message(FATAL_ERROR "Found ONE_OF_BEGIN without ONE_OF_END")
|
||||
endif(kmodule_configure_kernel_functions_one_of_section)
|
||||
set(${output_list} ${output_list_tmp} PARENT_SCOPE)
|
||||
endfunction(kmodule_configure_kernel_functions output_list)
|
||||
|
||||
############################################################################
|
||||
# Utility macros to check for particular features. If the particular feature
|
||||
# is supported, the macros will set the corresponding variable to TRUE,
|
||||
# otherwise - to FALSE (the name of variable is mentioned in the comments
|
||||
# for the macro).
|
||||
############################################################################
|
||||
|
||||
# Check if the system has everything necessary to build at least simple
|
||||
# kernel modules.
|
||||
# The macro sets variable 'MODULE_BUILD_SUPPORTED'.
|
||||
macro(check_module_build)
|
||||
check_begin("Checking if kernel modules can be built on this system")
|
||||
if (NOT MODULE_BUILD_SUPPORTED)
|
||||
check_try()
|
||||
kbuild_try_compile(module_build_supported_impl
|
||||
"${CMAKE_BINARY_DIR}/check_module_build"
|
||||
"${kmodule_test_sources_dir}/check_module_build/module.c"
|
||||
)
|
||||
set_bool_string(MODULE_BUILD_SUPPORTED "yes" "no" ${module_build_supported_impl}
|
||||
CACHE INTERNAL "Can kernel modules be built on this system?"
|
||||
)
|
||||
endif (NOT MODULE_BUILD_SUPPORTED)
|
||||
|
||||
check_end("${MODULE_BUILD_SUPPORTED}")
|
||||
|
||||
if (NOT MODULE_BUILD_SUPPORTED)
|
||||
message(FATAL_ERROR
|
||||
"There are problems with building kernel modules on this system. "
|
||||
"Please check that the appropriate kernel headers and build tools "
|
||||
"are installed."
|
||||
)
|
||||
endif (NOT MODULE_BUILD_SUPPORTED)
|
||||
endmacro(check_module_build)
|
||||
|
||||
# Check if reliable stack trace information can be obtained.
|
||||
# This is the case, for example, if the kernel is compiled with support
|
||||
# for frame pointers and/or stack unwind on.
|
||||
# The macro sets variable 'STACK_TRACE_RELIABLE'.
|
||||
macro(check_stack_trace)
|
||||
check_begin("Checking if stack trace information is reliable")
|
||||
if (NOT DEFINED STACK_TRACE_RELIABLE)
|
||||
check_try()
|
||||
kbuild_try_compile(stack_trace_reliable_impl
|
||||
"${CMAKE_BINARY_DIR}/check_stack_trace"
|
||||
"${kmodule_test_sources_dir}/check_stack_trace/module.c"
|
||||
)
|
||||
set_bool_string(STACK_TRACE_RELIABLE "yes" "no" ${stack_trace_reliable_impl}
|
||||
CACHE INTERNAL "Are stack traces reliable on this system?")
|
||||
endif (NOT DEFINED STACK_TRACE_RELIABLE)
|
||||
check_end("${STACK_TRACE_RELIABLE}")
|
||||
|
||||
if (NOT STACK_TRACE_RELIABLE)
|
||||
message ("\n[WARNING]\n"
|
||||
"It looks like reliable stack traces cannot be obtained on this system.\n"
|
||||
"The output of KEDR-based tools like LeakCheck will be less detailed\n"
|
||||
"(each stack trace shown will contain only one frame).\n"
|
||||
"If this is not acceptable, you could rebuild the kernel with\n"
|
||||
"CONFIG_FRAME_POINTER or CONFIG_STACK_UNWIND (if available) set to \"y\"\n"
|
||||
"and then reconfigure and rebuild KEDR.\n")
|
||||
endif (NOT STACK_TRACE_RELIABLE)
|
||||
endmacro(check_stack_trace)
|
||||
|
||||
# Check whether ring buffer is implemented by the kernel.
|
||||
# Set cache variable RING_BUFFER_IMPLEMENTED according to this checking.
|
||||
function(check_ring_buffer)
|
||||
check_begin("Checking if ring buffer is implemented in the kernel")
|
||||
|
||||
if (NOT DEFINED RING_BUFFER_IMPLEMENTED)
|
||||
check_try()
|
||||
kbuild_try_compile(ring_buffer_implemented_impl
|
||||
"${CMAKE_BINARY_DIR}/check_ring_buffer"
|
||||
"${kmodule_test_sources_dir}/check_ring_buffer/module.c"
|
||||
)
|
||||
|
||||
set_bool_string(RING_BUFFER_IMPLEMENTED "yes" "no" "${ring_buffer_implemented_impl}"
|
||||
CACHE INTERNAL "Whether ring buffer is implemented in the kernel"
|
||||
)
|
||||
endif (NOT DEFINED RING_BUFFER_IMPLEMENTED)
|
||||
check_end(${RING_BUFFER_IMPLEMENTED})
|
||||
|
||||
if (NOT RING_BUFFER_IMPLEMENTED)
|
||||
message("\n[WARNING]\nRing buffer is not supported by the system.\n"
|
||||
"The tracing facilities as well as call monitoring plugins will not be built.\n"
|
||||
"If this is not acceptable, you could rebuild the kernel with\n"
|
||||
"CONFIG_RING_BUFFER set to \"y\" and then reconfigure and rebuild KEDR.\n")
|
||||
endif (NOT RING_BUFFER_IMPLEMENTED)
|
||||
endfunction(check_ring_buffer)
|
||||
|
||||
# Check which memory allocator is used by the kernel.
|
||||
# Set KERNEL_MEMORY_ALLOCATOR to 'slab', 'slub', 'slob' or 'other'.
|
||||
#
|
||||
# Some functions in that allocators may have same names, but different signatures.
|
||||
function(check_allocator)
|
||||
check_begin("Checking which memory allocator is used by the kernel")
|
||||
if(NOT DEFINED KERNEL_MEMORY_ALLOCATOR)
|
||||
check_try()
|
||||
# Use local variable for detect allocator,
|
||||
# Cache one will be set at the end
|
||||
set(allocator "")
|
||||
if(allocator STREQUAL "")
|
||||
kbuild_try_compile(is_allocator_slab
|
||||
"${CMAKE_BINARY_DIR}/check_allocator_slab"
|
||||
"${kmodule_test_sources_dir}/check_allocator/module.c"
|
||||
KBUILD_COMPILE_DEFINITIONS "-DIS_ALLOCATOR_SLAB"
|
||||
)
|
||||
if (is_allocator_slab)
|
||||
set(allocator "slab")
|
||||
endif (is_allocator_slab)
|
||||
endif(allocator STREQUAL "")
|
||||
|
||||
if(allocator STREQUAL "")
|
||||
kbuild_try_compile(is_allocator_slub
|
||||
"${CMAKE_BINARY_DIR}/check_allocator_slub"
|
||||
"${kmodule_test_sources_dir}/check_allocator/module.c"
|
||||
KBUILD_COMPILE_DEFINITIONS "-DIS_ALLOCATOR_SLUB"
|
||||
)
|
||||
if (is_allocator_slub)
|
||||
set(allocator "slub")
|
||||
endif (is_allocator_slub)
|
||||
endif(allocator STREQUAL "")
|
||||
|
||||
if(allocator STREQUAL "")
|
||||
kbuild_try_compile(is_allocator_slob
|
||||
"${CMAKE_BINARY_DIR}/check_allocator_slob"
|
||||
"${kmodule_test_sources_dir}/check_allocator/module.c"
|
||||
KBUILD_COMPILE_DEFINITIONS "-DIS_ALLOCATOR_SLOB"
|
||||
)
|
||||
if (is_allocator_slob)
|
||||
set(allocator "slob")
|
||||
endif (is_allocator_slub)
|
||||
endif(allocator STREQUAL "")
|
||||
|
||||
if(allocator STREQUAL "")
|
||||
set(allocator "other")
|
||||
endif(allocator STREQUAL "")
|
||||
|
||||
set(KERNEL_MEMORY_ALLOCATOR "${allocator}" CACHE INTERNAL
|
||||
"Memory allocator which is used by the kernel"
|
||||
)
|
||||
endif (NOT DEFINED KERNEL_MEMORY_ALLOCATOR)
|
||||
check_end("${KERNEL_MEMORY_ALLOCATOR}")
|
||||
endfunction(check_allocator)
|
||||
|
||||
# Check if 'kfree_rcu' is available in the kernel (it is likely to be
|
||||
# a macro or an inline). If it is available, we should handle it as
|
||||
# 'free' in LeakCheck. As KEDR cannot normally intercept kfree_rcu()
|
||||
# itself, it needs to intercept call_rcu/call_rcu_sched and check their
|
||||
# arguments.
|
||||
# The macro sets variable 'HAVE_KFREE_RCU'.
|
||||
macro(check_kfree_rcu)
|
||||
check_begin("Checking if kfree_rcu() is available")
|
||||
|
||||
if (NOT DEFINED HAVE_KFREE_RCU)
|
||||
check_try()
|
||||
kbuild_try_compile(have_kfree_rcu_impl
|
||||
"${CMAKE_BINARY_DIR}/check_kfree_rcu"
|
||||
"${kmodule_test_sources_dir}/check_kfree_rcu/module.c"
|
||||
)
|
||||
|
||||
set_bool_string(HAVE_KFREE_RCU "yes" "no" ${have_kfree_rcu_impl}
|
||||
CACHE INTERNAL "Is kfree_rcu() available?"
|
||||
)
|
||||
endif ()
|
||||
check_end("${HAVE_KFREE_RCU}")
|
||||
endmacro(check_kfree_rcu)
|
||||
############################################################################
|
||||
|
||||
# Check if posix_acl_from_xattr() accepts struct user_namespace as the
|
||||
# first argument.
|
||||
# The macro sets variable 'POSIX_ACL_XATTR_HAS_USER_NS'.
|
||||
macro(check_xattr_user_ns)
|
||||
check_begin("Checking if posix_acl_from_xattr() has struct user_namespace * argument")
|
||||
if (NOT DEFINED POSIX_ACL_XATTR_HAS_USER_NS)
|
||||
check_try()
|
||||
kbuild_try_compile(have_xattr_user_ns_impl
|
||||
"${CMAKE_BINARY_DIR}/check_xattr_user_ns"
|
||||
"${kmodule_test_sources_dir}/check_xattr_user_ns/module.c"
|
||||
)
|
||||
|
||||
set_bool_string(POSIX_ACL_XATTR_HAS_USER_NS "yes" "no" ${have_xattr_user_ns_impl}
|
||||
CACHE INTERNAL "Does posix_acl_from_xattr() have struct user_namespace argument?"
|
||||
)
|
||||
endif ()
|
||||
check_end("${POSIX_ACL_XATTR_HAS_USER_NS}")
|
||||
endmacro(check_xattr_user_ns)
|
||||
############################################################################
|
||||
|
||||
# Check if hlist_for_each_entry*() macros accept only 'type *pos' argument
|
||||
# rather than both 'type *tpos' and 'hlist_node *pos' as the loop cursors.
|
||||
# The macro sets variable 'HLIST_FOR_EACH_ENTRY_POS_ONLY'.
|
||||
macro(check_hlist_for_each_entry)
|
||||
check_begin("Checking the signatures of hlist_for_each_entry*() macros")
|
||||
if (NOT DEFINED HLIST_FOR_EACH_ENTRY_POS_ONLY)
|
||||
check_try()
|
||||
kbuild_try_compile(pos_only_impl
|
||||
"${CMAKE_BINARY_DIR}/check_hlist_for_each_entry"
|
||||
"${kmodule_test_sources_dir}/check_hlist_for_each_entry/module.c"
|
||||
)
|
||||
set_bool_string(HLIST_FOR_EACH_ENTRY_POS_ONLY "yes" "no" ${pos_only_impl}
|
||||
CACHE INTERNAL
|
||||
"Do hlist_for_each_entry*() macros have only 'type *pos' to use as a loop cursor?"
|
||||
)
|
||||
endif ()
|
||||
set_bool_string(check_result "do not use additional loop cursor" "use additional loop cursor"
|
||||
${HLIST_FOR_EACH_ENTRY_POS_ONLY})
|
||||
check_end(${check_result})
|
||||
endmacro(check_hlist_for_each_entry)
|
||||
############################################################################
|
||||
|
||||
# Check if 'random32' is available in the kernel.
|
||||
# The macro sets variable 'KEDR_HAVE_RANDOM32'.
|
||||
macro(check_random32)
|
||||
check_begin("Checking if random32() is available")
|
||||
if (NOT DEFINED KEDR_HAVE_RANDOM32)
|
||||
check_try()
|
||||
kbuild_try_compile(have_random32_impl
|
||||
"${CMAKE_BINARY_DIR}/check_random32"
|
||||
"${kmodule_test_sources_dir}/check_random32/module.c"
|
||||
)
|
||||
set_bool_string(KEDR_HAVE_RANDOM32 "yes" "no" "${have_random32_impl}"
|
||||
CACHE INTERNAL "Is random32() available?"
|
||||
)
|
||||
endif ()
|
||||
check_end("${KEDR_HAVE_RANDOM32}")
|
||||
endmacro(check_random32)
|
||||
############################################################################
|
||||
|
||||
# The payload modules should call kedr_find_function() for each kernel
|
||||
# function they would like to process. If the function is not known
|
||||
# to KEDR (absent from the "function database", see "functions/" directory),
|
||||
# kedr_find_function() issues a fatal error.
|
||||
#
|
||||
# 'func_name' is the name of the function,
|
||||
# 'found_var' is the name of the output variable (the variable will evaluate
|
||||
# as "true" if found, as "false" otherwise).
|
||||
function (kedr_find_function func_name found_var)
|
||||
if (NOT DEFINED KEDR_DATA_FILE_${func_name})
|
||||
message(FATAL_ERROR "Unsupported function: ${func_name}")
|
||||
endif (NOT DEFINED KEDR_DATA_FILE_${func_name})
|
||||
|
||||
# OK, known function.
|
||||
kmodule_is_function_exist(${func_name} ${found_var})
|
||||
if (${found_var})
|
||||
# Mark the function as used by at least one payload module.
|
||||
# This can be used when preparing the tests for call interception.
|
||||
# The actual value does not matter, it only matters that this
|
||||
# variable is defined.
|
||||
set(KEDR_FUNC_USED_${func_name} "yes" CACHE INTERNAL
|
||||
"Is kernel function ${func_name} used by any payload module?")
|
||||
set(${found_var} "${${found_var}}" PARENT_SCOPE)
|
||||
else ()
|
||||
set(${found_var} "NO" PARENT_SCOPE)
|
||||
endif (${found_var})
|
||||
endfunction (kedr_find_function func_name found_var)
|
||||
|
||||
# Returns (in ${path_var}) the path to the .data file for the function
|
||||
# ${func_name}. The function must be present in the system and
|
||||
# kedr_find_function() must be called for it before kedr_get_data_for_func().
|
||||
function (kedr_get_data_for_func func_name path_var)
|
||||
if (NOT DEFINED KEDR_FUNC_USED_${func_name})
|
||||
message(FATAL_ERROR
|
||||
"Attempt to lookup data for a function that is not marked as used: "
|
||||
"${func_name}")
|
||||
endif (NOT DEFINED KEDR_FUNC_USED_${func_name})
|
||||
|
||||
set(${path_var} "${KEDR_DATA_FILE_${func_name}}" PARENT_SCOPE)
|
||||
endfunction (kedr_get_data_for_func func_name path_var)
|
||||
|
||||
# kedr_get_header_data_list(list_var func1 [func2 func3 ...])
|
||||
# Get the list of paths to the 'header.data' files for the given functions.
|
||||
# The functions must be present in the system and # kedr_find_function()
|
||||
# must be called for each of them before kedr_get_header_data_list() is
|
||||
# called.
|
||||
# The resulting list is returned in ${list_var}. It will contain at least
|
||||
# one item. It will not contain duplicates.
|
||||
function (kedr_get_header_data_list list_var)
|
||||
set(hdata_list)
|
||||
foreach (func ${ARGN})
|
||||
if (NOT DEFINED KEDR_FUNC_USED_${func})
|
||||
message(FATAL_ERROR
|
||||
"Attempt to lookup header data for a function that is not marked as used: "
|
||||
"${func}")
|
||||
endif (NOT DEFINED KEDR_FUNC_USED_${func})
|
||||
list(APPEND hdata_list "${KEDR_HEADER_DATA_FILE_${func}}")
|
||||
endforeach ()
|
||||
list(REMOVE_DUPLICATES hdata_list)
|
||||
|
||||
list(LENGTH hdata_list hdata_list_len)
|
||||
if (NOT hdata_list_len)
|
||||
message(FATAL_ERROR
|
||||
"kedr_get_header_data_list(): BUG: the output list is empty.")
|
||||
endif (NOT hdata_list_len)
|
||||
|
||||
set(${list_var} ${hdata_list} PARENT_SCOPE)
|
||||
endfunction (kedr_get_header_data_list list_var)
|
||||
|
||||
# kedr_create_header_rules(
|
||||
# header_impl_file header_data_file func1 [func2 ...])
|
||||
# Create the rules to generate ${header_impl_file} from
|
||||
# ${header_data_file} and the specific header files for the given
|
||||
# functions.
|
||||
function(kedr_create_header_rules header_impl_file header_data_file
|
||||
functions)
|
||||
set(hlist_data)
|
||||
kedr_get_header_data_list(hlist_data ${functions} ${ARGN})
|
||||
to_abs_path(hdata_files_abs ${header_data_file} ${hlist_data})
|
||||
add_custom_command(OUTPUT ${header_impl_file}
|
||||
COMMAND cat ${hdata_files_abs} > ${header_impl_file}
|
||||
DEPENDS ${hdata_files_abs}
|
||||
)
|
||||
endfunction(kedr_create_header_rules header_impl_file header_data_file
|
||||
functions)
|
||||
|
||||
# kedr_create_data_rules(func)
|
||||
# Create the rules to generate ${func}_impl.data from
|
||||
# ${func}.data (contains processing instructions specific to the current
|
||||
# payload) and the .data file from "func_db" (contains function signature).
|
||||
function(kedr_create_data_rules func)
|
||||
set(func_db_data_file)
|
||||
kedr_get_data_for_func(${func} func_db_data_file)
|
||||
|
||||
set(func_proc_data_file)
|
||||
to_abs_path(func_proc_data_file ${func}.data)
|
||||
|
||||
add_custom_command(OUTPUT "${func}_impl.data"
|
||||
COMMAND printf "\"[group]\\n\"" > "${func}_impl.data"
|
||||
COMMAND grep -E -v '\\[group\\]'
|
||||
"${func_db_data_file}" >> "${func}_impl.data"
|
||||
COMMAND printf "\"\\n\"" >> "${func}_impl.data"
|
||||
COMMAND grep -E -v '\\[group\\]'
|
||||
"${func_proc_data_file}" >> "${func}_impl.data"
|
||||
DEPENDS
|
||||
"${func_proc_data_file}"
|
||||
"${func_db_data_file}"
|
||||
)
|
||||
endfunction(kedr_create_data_rules func)
|
||||
|
||||
# kedr_create_payload_module(module_name payload_data_file template_dir)
|
||||
# Create the rules to build a payload module with the given name.
|
||||
# 'payload_data_file' defines how the kernel functions are to be processed
|
||||
# by this payload module.
|
||||
# 'template_dir' - path to the direcotry containing the templates to be used
|
||||
# to prepare the source code of the module from 'payload_data_file'.
|
||||
function(kedr_create_payload_module module_name payload_data_file
|
||||
template_dir)
|
||||
|
||||
# Rules to build the module
|
||||
kbuild_add_module(${module_name}
|
||||
"payload.c"
|
||||
"functions_support.c"
|
||||
)
|
||||
kbuild_link_module(${module_name} kedr)
|
||||
|
||||
# Rules to obtain the source files of the module
|
||||
kedr_generate("payload.c" ${payload_data_file} "${template_dir}")
|
||||
kedr_generate("functions_support.c" ${payload_data_file} "${KEDR_GEN_TEMPLATES_DIR}/functions_support.c")
|
||||
endfunction(kedr_create_payload_module module_name payload_data_file
|
||||
template_dir)
|
||||
|
||||
# kedr_create_payload_data(payload_data_file func1 [func2 ...])
|
||||
# Create .data files and the header data files for the functions and prepare
|
||||
# the main .data file (${payload_data_file}) for the payload module.
|
||||
function(kedr_create_payload_data header_data_file payload_data_file
|
||||
functions)
|
||||
set(header_impl_file "header_impl.data")
|
||||
set(functions_data)
|
||||
|
||||
foreach(func ${functions} ${ARGN})
|
||||
list(APPEND functions_data "${func}_impl.data")
|
||||
kedr_create_data_rules(${func})
|
||||
endforeach(func ${functions} ${ARGN})
|
||||
|
||||
kedr_create_header_rules(${header_impl_file} ${header_data_file}
|
||||
${functions} ${ARGN})
|
||||
|
||||
to_abs_path(payload_data_file_abs ${payload_data_file})
|
||||
to_abs_path(source_files_abs ${header_impl_file} ${functions_data})
|
||||
|
||||
set(payload_data_file_abs "${CMAKE_CURRENT_BINARY_DIR}/${payload_data_file}")
|
||||
add_custom_command(OUTPUT ${payload_data_file_abs}
|
||||
COMMAND cat ${source_files_abs} > ${payload_data_file_abs}
|
||||
DEPENDS ${source_files_abs}
|
||||
)
|
||||
endfunction(kedr_create_payload_data header_data_file payload_data_file
|
||||
functions)
|
||||
############################################################################
|
||||
98
cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt
Executable file
98
cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt
Executable file
@@ -0,0 +1,98 @@
|
||||
#/*
|
||||
# * 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 example_oaisim_enb_ue_mme_virtual.txt
|
||||
# brief
|
||||
# author Lionel Gauthier
|
||||
|
||||
TODO: a document file, PDF for example, with nice pictures, etc
|
||||
This example shows how to generate and launch enb, 1 ue (NAS still not virtualized in UE) in virtualised mode, mme_gw, hss executables on the same host:
|
||||
|
||||
################
|
||||
Configuration
|
||||
################
|
||||
freediameter 1.2.0 (not 1.1.5, 1.1.6,...) has to be installed and patched (done by check_install_oai_software() calling install_freediameter_from_source() in script build_helper)
|
||||
|
||||
Config File:
|
||||
/etc/hosts must contain the fqdn of the MME and HSS (same since both run on the same host):
|
||||
(assuming the realm is openair4G.eur)
|
||||
127.0.0.1 localhost
|
||||
127.0.1.1 yang.openair4G.eur yang
|
||||
...
|
||||
|
||||
################
|
||||
BUILDING, RUNNING
|
||||
################
|
||||
|
||||
Building HSS:
|
||||
yang@yang:~/openair4G/trunk/cmake_targets$ tools/build_hss -c --connect-to-mme yang.openair4G.eur -t -T --realm openair4G.eur
|
||||
|
||||
Configuring the HSS:
|
||||
In oai_db (easier for newbies to access HSS database through http://127.0.0.1/phpmyadmin)
|
||||
In table mmeidentity, enter the record corresponding to your MME:
|
||||
(idmmeidentity, mmehost, mmerealm)
|
||||
In table pdn, enter the record allowing an IMSI to connect to an APN
|
||||
In table users, enter the record corresponding to your USIM card.
|
||||
|
||||
Running the HSS:
|
||||
yang@yang:~/openair4G/trunk/cmake_targets$ sudo tools/run_hss -g
|
||||
|
||||
|
||||
|
||||
Building the MME-GW:
|
||||
yang@yang:~/openair4G/trunk/cmake_targets/tools$ ./build_epc -c -d -t -T --s6a-server
|
||||
|
||||
Configuring the MME-GW:
|
||||
You can configure in file openair4G/trunk/cmake_targets/tools/epc.local.enb.conf.in the following parameters:
|
||||
MCC/MNC of your network
|
||||
SGI interface (outgoing interface of the S/P-GW)
|
||||
Integrity algorithms, Ciphering algorithms
|
||||
Please note that DNS addresses are hardcoded in source code (TODO in list).
|
||||
|
||||
Running the MME-GW:
|
||||
yang@yang:~/openair4G/trunk/cmake_targets/tools$ sudo ./run_epc -l -g -K
|
||||
|
||||
|
||||
|
||||
Building eNB:
|
||||
yang@yang:~/openair4G/trunk/cmake_targets$ ./build_oai --oaisim
|
||||
|
||||
Configuring the eNB:
|
||||
The default configuration file for the eNB is trunk/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_mme.conf
|
||||
|
||||
Running eNB:
|
||||
yang@yang:~/openair4G/trunk/cmake_targets$ tools/run_enb_ue_virt_s1 -m /tmp -K /tmp/enb_ue_virt_s1_itti.log
|
||||
|
||||
|
||||
Putting some IP UL/DL traffic in the bearer:
|
||||
ping -s 1000 -m 1 192.168.12.100 -I oip1
|
||||
|
||||
|
||||
################
|
||||
Tools available:
|
||||
###############
|
||||
|
||||
1) itti_analyser (list messages exchanged between protocol layers)
|
||||
2) xforms (Layer 1)
|
||||
3) vcd (timing mesurements)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/wls_lib/Makefile b/wls_lib/Makefile
|
||||
index 2f8e4b2..7b99a26 100644
|
||||
index 2f8e4b2..e657488 100644
|
||||
--- a/wls_lib/Makefile
|
||||
+++ b/wls_lib/Makefile
|
||||
@@ -1,20 +1,6 @@
|
||||
@@ -23,7 +23,7 @@ index 2f8e4b2..7b99a26 100644
|
||||
+################################################################
|
||||
+# <COPYRIGHT_TAG>
|
||||
+################################################################
|
||||
|
||||
|
||||
MYCUSTOMTAB=' '
|
||||
MYCUSTOMSPACE='============================================================================================'
|
||||
@@ -24,11 +10,17 @@ MYCUSTOMSPACE1='------------------------------------------------------------'
|
||||
@@ -48,12 +48,9 @@ index 2f8e4b2..7b99a26 100644
|
||||
else ifeq ($(WIRELESS_SDK_TOOLCHAIN),icx)
|
||||
CC := icx
|
||||
CPP := icx
|
||||
@@ -42,11 +34,11 @@ endif
|
||||
ifeq ($(WIRELESS_SDK_TARGET_ISA),sse)
|
||||
TARGET_PROCESSOR := -xSSE4.2
|
||||
@@ -44,9 +36,9 @@ ifeq ($(WIRELESS_SDK_TARGET_ISA),sse)
|
||||
else ifeq ($(WIRELESS_SDK_TARGET_ISA),avx2)
|
||||
- TARGET_PROCESSOR := -xCORE-AVX2
|
||||
+ TARGET_PROCESSOR := -march=core-avx2
|
||||
TARGET_PROCESSOR := -xCORE-AVX2
|
||||
else ifeq ($(WIRELESS_SDK_TARGET_ISA),avx512)
|
||||
- TARGET_PROCESSOR := -xCORE-AVX512
|
||||
+ TARGET_PROCESSOR := -march=skylake-avx512
|
||||
@@ -66,7 +63,7 @@ index 2f8e4b2..7b99a26 100644
|
||||
@@ -66,15 +58,38 @@ PROJECT_DIR := ./
|
||||
BUILDDIR := make
|
||||
PROJECT_BINARY := $(PROJECT_NAME).so
|
||||
|
||||
|
||||
+PKGCONF ?= pkg-config
|
||||
+LIBDPDK_VERSION=20.11.3
|
||||
+
|
||||
@@ -82,7 +79,7 @@ index 2f8e4b2..7b99a26 100644
|
||||
+$(error "Please define RTE_SDK environment variable OR install DPDK version $(LIBDPDK_VERSION)")
|
||||
+endif
|
||||
endif
|
||||
|
||||
|
||||
-RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+# At least one of the options is defined
|
||||
+
|
||||
@@ -91,10 +88,10 @@ index 2f8e4b2..7b99a26 100644
|
||||
+else ifeq ($(DPDK_INSTALLED),1)
|
||||
+ RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig $(PKGCONF) --cflags-only-I libdpdk)
|
||||
+endif
|
||||
|
||||
|
||||
CC_SRC = wls_lib_dpdk.c \
|
||||
syslib.c
|
||||
|
||||
|
||||
+CC_HDR = syslib.h \
|
||||
+ ttypes.h \
|
||||
+ wls.h \
|
||||
@@ -107,74 +104,74 @@ index 2f8e4b2..7b99a26 100644
|
||||
@@ -84,18 +99,19 @@ CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \
|
||||
-Wimplicit-function-declaration \
|
||||
-g -O3 -mcmodel=large $(TARGET_PROCESSOR)
|
||||
|
||||
|
||||
-INC := -I$(RTE_INC)
|
||||
+INC := -I$(RTE_INC) -I../intel_fapi/
|
||||
DEF :=
|
||||
|
||||
|
||||
AS_FLAGS :=
|
||||
AR_FLAGS := rc
|
||||
|
||||
|
||||
PROJECT_OBJ_DIR := $(BUILDDIR)/obj
|
||||
+PROJECT_DEP_DIR := $(PROJECT_OBJ_DIR)/$(PROJECT_NAME).dep.d
|
||||
|
||||
|
||||
CC_OBJS := $(patsubst %.c,%.o,$(CC_SRC))
|
||||
AS_OBJS := $(patsubst %.s,%.o,$(AS_SRC))
|
||||
OBJS := $(CC_OBJS) $(AS_OBJS) $(LIBS)
|
||||
-DIRLIST := $(addprefix $(PROJECT_OBJ_DIR)/,$(sort $(dir $(OBJS))))
|
||||
+DIRLIST := $(addprefix $(PROJECT_OBJ_DIR)/,$(sort $(dir $(OBJS)))) $(PROJECT_DEP_DIR)
|
||||
|
||||
|
||||
CC_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(CC_OBJS))
|
||||
|
||||
|
||||
@@ -104,9 +120,7 @@ CC_FLAGS_FULL := $(CC_FLAGS) $(INC) $(DEF)
|
||||
|
||||
|
||||
AS_FLAGS := $(AS_FLAGS) $(INC)
|
||||
|
||||
|
||||
-PROJECT_DEP_FILE := $(PROJECT_OBJ_DIR)/$(PROJECT_NAME).dep
|
||||
-
|
||||
-ifeq ($(wildcard $(PROJECT_DEP_FILE)),$(PROJECT_DEP_FILE))
|
||||
+ifeq ($(wildcard $(PROJECT_DEP_DIR)),$(PROJECT_DEP_DIR))
|
||||
GENERATE_DEPS :=
|
||||
else
|
||||
|
||||
|
||||
@@ -119,11 +133,11 @@ all : welcome_line $(PROJECT_BINARY)
|
||||
|
||||
|
||||
.PHONY : clear_dep
|
||||
clear_dep:
|
||||
- @$(RM) $(PROJECT_DEP_FILE)
|
||||
- @echo [DEP] $(subst $(PROJECT_OBJ_DIR)/,,$(PROJECT_DEP_FILE))
|
||||
+ @echo [DEP] rm $(PROJECT_DEP_DIR)/$(@F).dep
|
||||
+ @$(RM) $(PROJECT_DEP_DIR)/$(@F).dep
|
||||
|
||||
|
||||
-$(CC_DEPS) :
|
||||
- @$(CC) -MM $(subst __up__,../,$(subst __dep__,,$@)) -MT $(PROJECT_OBJ_DIR)/$(patsubst %.c,%.o,$(subst __up__,../,$(subst __dep__,,$@))) $(CC_FLAGS_FULL) >> $(PROJECT_DEP_FILE)
|
||||
+$(CC_DEPS) : $(PROJECT_DEP_DIR)
|
||||
+ @$(CC) $(CC_FLAGS_FULL) -MM $(subst __up__,../,$(subst __dep__,,$@)) -MT $(PROJECT_OBJ_DIR)/$(patsubst %.c,%.o,$(subst __up__,../,$(subst __dep__,,$@))) >> $(PROJECT_DEP_DIR)/$(@F).dep
|
||||
|
||||
|
||||
.PHONY : generate_deps
|
||||
generate_deps : clear_dep $(CC_DEPS)
|
||||
@@ -136,17 +150,17 @@ echo_start_build :
|
||||
$(DIRLIST) :
|
||||
-@$(MD) $@
|
||||
|
||||
|
||||
-$(CC_OBJTARGETS) :
|
||||
+$(CC_OBJTARGETS) : $(GENERATE_DEPS)
|
||||
@echo [CC] $(subst $(PROJECT_OBJ_DIR)/,,$@)
|
||||
@$(CC) -c $(CC_FLAGS_FULL) -o"$@" $(patsubst %.o,%.c,$(subst $(PROJECT_OBJ_DIR)/,,$@))
|
||||
|
||||
|
||||
-$(AS_OBJTARGETS) :
|
||||
+$(AS_OBJTARGETS) : $(CC_OBJTARGETS) $(CPP_OBJTARGETS)
|
||||
@echo [AS] $(subst $(PROJECT_OBJ_DIR)/,,$@)
|
||||
@$(AS) $(AS_FLAGS) -o"$@" $(patsubst %.o,%.s,$(subst $(PROJECT_OBJ_DIR)/,,$@))
|
||||
|
||||
|
||||
-ifeq ($(wildcard $(PROJECT_DEP_FILE)),$(PROJECT_DEP_FILE))
|
||||
+ifeq ($(wildcard $(PROJECT_DEP_DIR)),$(PROJECT_DEP_DIR))
|
||||
|
||||
|
||||
-include $(PROJECT_DEP_FILE)
|
||||
+include $(PROJECT_DEP_DIR)/*
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -156,7 +170,7 @@ clean:
|
||||
@$(RM) $(CC_OBJTARGETS) $(AS_OBJTARGETS)
|
||||
ifneq ($(wildcard $(PROJECT_DIR)/$(PROJECT_MAKE)),)
|
||||
@@ -182,17 +179,17 @@ index 2f8e4b2..7b99a26 100644
|
||||
- @$(RM) $(PROJECT_BINARY) $(PROJECT_BINARY_LIB) $(PROJECT_DEP_FILE)
|
||||
+ @$(RM) -rf $(PROJECT_BINARY) $(PROJECT_BINARY_LIB) $(PROJECT_DEP_DIR)
|
||||
endif
|
||||
|
||||
|
||||
xclean: clean
|
||||
@@ -172,7 +186,24 @@ welcome_line :
|
||||
debug : all
|
||||
release : all
|
||||
|
||||
|
||||
-$(PROJECT_BINARY) : $(DIRLIST) echo_start_build $(GENERATE_DEPS) $(PRE_BUILD) $(CC_OBJTARGETS) $(AS_OBJTARGETS)
|
||||
+$(PROJECT_BINARY) : $(DIRLIST) echo_start_build $(GENERATE_DEPS) $(CC_OBJTARGETS) $(AS_OBJTARGETS)
|
||||
@echo [AR] $(subst $(BUILDDIR)/,,$@)
|
||||
@$(CC) $(CC_OBJTARGETS) $(AS_OBJTARGETS) -shared -fPIC -o $@
|
||||
|
||||
|
||||
+##############################################################
|
||||
+# Install configuration
|
||||
+##############################################################
|
||||
|
||||
21
cmake_targets/tools/make_agent_cache
Executable file
21
cmake_targets/tools/make_agent_cache
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CACHE_DIR=/mnt/oai_agent_cache
|
||||
|
||||
if [ ! -d $CACHE_DIR ]; then
|
||||
echo "Creating cache dir in $CACHE_DIR"
|
||||
sudo mkdir $CACHE_DIR
|
||||
fi
|
||||
|
||||
if grep -qs "$CACHE_DIR" /proc/mounts; then
|
||||
echo "Agent cache is already mounted"
|
||||
else
|
||||
echo "Agent cache was not mounted"
|
||||
echo "Mounting..."
|
||||
sudo mount -o size=100m -t tmpfs none "$CACHE_DIR"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Mount success"
|
||||
else
|
||||
echo "Something went wrong with the mount"
|
||||
fi
|
||||
fi
|
||||
13
cmake_targets/tools/setup_routes.sh
Executable file
13
cmake_targets/tools/setup_routes.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
for i in $(seq 1 $1);
|
||||
do
|
||||
let table=1000+$i
|
||||
echo "sudo ip route add 10.0.1.0/24 dev oaitun_ue$i table $table"
|
||||
sudo ip route add 10.0.1.0/24 dev oaitun_ue$i table $table
|
||||
echo "sudo ip route add default via 10.0.1.1 dev oaitun_ue$i table $table"
|
||||
sudo ip route add default via 10.0.1.1 dev oaitun_ue$i table $table
|
||||
let octet=$i+1
|
||||
echo "sudo ip rule add from 10.0.1.$octet table $table"
|
||||
sudo ip rule add from 10.0.1.$octet table $table
|
||||
done
|
||||
@@ -213,7 +213,7 @@ int config_check_unknown_cmdlineopt(configmodule_interface_t *cfg, char *prefix)
|
||||
return unknowndetected;
|
||||
} /* config_check_unknown_cmdlineopt */
|
||||
|
||||
int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, const char *prefix)
|
||||
int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
{
|
||||
int c = cfg->argc;
|
||||
int i,j;
|
||||
|
||||
@@ -118,7 +118,7 @@ void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
|
||||
int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->iptr), 1);
|
||||
@@ -132,7 +132,7 @@ int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
|
||||
int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
|
||||
@@ -150,7 +150,7 @@ int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoption
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
|
||||
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
@@ -167,7 +167,7 @@ int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgopti
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
|
||||
int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
@@ -190,7 +190,7 @@ int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptio
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
|
||||
int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
@@ -210,7 +210,7 @@ int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgo
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
|
||||
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->dblptr), 1);
|
||||
@@ -224,7 +224,7 @@ int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptio
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *ipv4addr)
|
||||
int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *ipv4addr)
|
||||
{
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->uptr), 1);
|
||||
int rst=inet_pton(AF_INET, ipv4addr,cfgoptions->uptr );
|
||||
@@ -246,7 +246,7 @@ int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
|
||||
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
@@ -322,7 +322,7 @@ void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, ch
|
||||
* @param[in] prefix Optional prefix for the parameter name (can be NULL).
|
||||
* @return 1 if the default value was set, 0 if ignored, or -1 on error/unsupported type.
|
||||
*/
|
||||
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, const char *prefix)
|
||||
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix)
|
||||
{
|
||||
if( (cfgoption->paramflags & PARAMFLAG_DONOTREAD) != 0) {
|
||||
return 0;
|
||||
|
||||
@@ -41,16 +41,16 @@ extern "C"
|
||||
#endif
|
||||
void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int elt_sz, int nb_elt);
|
||||
/* functions to set a parameter to its default value */
|
||||
int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
|
||||
int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
|
||||
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
|
||||
int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
|
||||
int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
|
||||
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
|
||||
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
|
||||
int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
|
||||
void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *fullname, int val);
|
||||
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, const char *prefix);
|
||||
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ int config_cmdlineonly_getlist(configmodule_interface_t *cfg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, const char *prefix)
|
||||
int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
{
|
||||
int defval;
|
||||
int fatalerror=0;
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
#define CONFIG_ABORT (1<<21) // config failed,abort execution
|
||||
#define CONFIG_NOOOPT (1<<22) // no -O option found when parsing command line
|
||||
struct configmodule_interface;
|
||||
typedef int (*configmodule_getfunc_t)(struct configmodule_interface *, paramdef_t *, int numparams, const char *prefix);
|
||||
typedef int (*configmodule_getfunc_t)(struct configmodule_interface *, paramdef_t *, int numparams, char *prefix);
|
||||
typedef int (
|
||||
*configmodule_getlistfunc_t)(struct configmodule_interface *, paramlist_def_t *, paramdef_t *, int numparams, char *prefix);
|
||||
typedef int (*configmodule_setfunc_t)(paramdef_t *cfgoptions, int numoptions, const char *prefix);
|
||||
typedef int (*configmodule_setfunc_t)(paramdef_t *cfgoptions, int numoptions, char *prefix);
|
||||
typedef void (*configmodule_endfunc_t)(struct configmodule_interface *cfg);
|
||||
|
||||
typedef int (*configmodule_initfunc_t)(struct configmodule_interface *cfg);
|
||||
|
||||
@@ -105,7 +105,7 @@ typedef union checkedparam {
|
||||
#define DEFAULT_EXTRA_SZ 256
|
||||
typedef struct paramdef {
|
||||
char optname[MAX_OPTNAME_SIZE]; /* parameter name, can be used as long command line option */
|
||||
const char *helpstr; /* help string */
|
||||
char *helpstr; /* help string */
|
||||
unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */
|
||||
union { /* pointer to the parameter value, completed by the config module */
|
||||
char **strptr;
|
||||
@@ -122,7 +122,7 @@ typedef struct paramdef {
|
||||
void *voidptr;
|
||||
} ;
|
||||
union { /* default parameter value, to be used when PARAMFLAG_MANDATORY is not specified */
|
||||
const char *defstrval;
|
||||
char *defstrval;
|
||||
char **defstrlistval;
|
||||
uint32_t defuintval;
|
||||
int defintval;
|
||||
@@ -161,50 +161,6 @@ typedef struct paramdef {
|
||||
#define TYPE_LIST 55
|
||||
|
||||
#define ANY_IPV4ADDR_STRING "0.0.0.0"
|
||||
|
||||
// Macros to simplify defining parameters in paramdef_t arrays in C++ source code
|
||||
#define OPTNAME(x) .optname = x
|
||||
#define HELPSTR(x) .helpstr = x
|
||||
#define PARAMFLAG(x) .paramflags = x
|
||||
#define PARAMTYPE(x) .type = x
|
||||
#define STRINGPARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .strptr = ptr, .defstrval = defval, PARAMTYPE(TYPE_STRING), .numelt = 0 \
|
||||
}
|
||||
#define DOUBLEPARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .dblptr = ptr, .defdblval = defval, PARAMTYPE(TYPE_DOUBLE), .numelt = 0 \
|
||||
}
|
||||
#define INTPARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .iptr = ptr, .defintval = defval, PARAMTYPE(TYPE_INT), .numelt = 0 \
|
||||
}
|
||||
#define UINT16PARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .u16ptr = ptr, .defuintval = defval, PARAMTYPE(TYPE_UINT16), .numelt = 0 \
|
||||
}
|
||||
#define STRLISTPARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .strlistptr = ptr, .defstrlistval = defval, PARAMTYPE(TYPE_STRINGLIST), \
|
||||
.numelt = 0 \
|
||||
}
|
||||
#define INT64PARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .i64ptr = ptr, .defint64val = defval, PARAMTYPE(TYPE_INT64), .numelt = 0 \
|
||||
}
|
||||
#define INTPARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .iptr = ptr, .defintval = defval, PARAMTYPE(TYPE_INT), .numelt = 0 \
|
||||
}
|
||||
#define BOOLPARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .iptr = ptr, .defintval = defval, PARAMTYPE(TYPE_INT), .numelt = 0 \
|
||||
}
|
||||
#define UINT64PARAM(name, help, flags, ptr, defval) \
|
||||
{ \
|
||||
OPTNAME(name), HELPSTR(help), PARAMFLAG(flags), .u64ptr = ptr, .defuintval = defval, PARAMTYPE(TYPE_UINT64), .numelt = 0 \
|
||||
}
|
||||
|
||||
typedef struct paramlist_def {
|
||||
char listname[MAX_OPTNAME_SIZE];
|
||||
paramdef_t **paramarray;
|
||||
|
||||
@@ -71,7 +71,7 @@ int config_get_processedint(configmodule_interface_t *cfg, paramdef_t *cfgoption
|
||||
|
||||
return ret;
|
||||
}
|
||||
void config_printhelp(paramdef_t *params,int numparams, const char *prefix) {
|
||||
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++) {
|
||||
@@ -84,7 +84,7 @@ void config_printhelp(paramdef_t *params,int numparams, const char *prefix) {
|
||||
printf("--------------------------------------------------------------------\n\n");
|
||||
}
|
||||
|
||||
int config_execcheck(configmodule_interface_t *cfg, paramdef_t *params, int numparams, const char *prefix)
|
||||
int config_execcheck(configmodule_interface_t *cfg, paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
int st=0;
|
||||
|
||||
@@ -105,7 +105,7 @@ int config_execcheck(configmodule_interface_t *cfg, paramdef_t *params, int nump
|
||||
return st;
|
||||
}
|
||||
|
||||
int config_paramidx_fromname(paramdef_t *params, int numparams, const char *name) {
|
||||
int config_paramidx_fromname(paramdef_t *params, int numparams, char *name) {
|
||||
for (int i=0; i<numparams ; i++) {
|
||||
if (strcmp(name,params[i].optname) == 0)
|
||||
return i;
|
||||
@@ -115,7 +115,7 @@ int config_paramidx_fromname(paramdef_t *params, int numparams, const char *name
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_get(configmodule_interface_t *cfgif, paramdef_t *params, int numparams, const char *prefix)
|
||||
int config_get(configmodule_interface_t *cfgif, paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
int ret= -1;
|
||||
|
||||
|
||||
@@ -49,17 +49,17 @@ extern configmodule_interface_t *uniqCfg;
|
||||
#define CONFIG_SETRTFLAG(P) if (config_get_if()) { config_get_if()->rtflags |= P; }
|
||||
#define CONFIG_CLEARRTFLAG(P) if (config_get_if()) { config_get_if()->rtflags &= (~P); }
|
||||
#define CONFIG_ISPARAMFLAGSET(P,F) ( !!(P.paramflags & F))
|
||||
int config_paramidx_fromname(paramdef_t *params, int numparams, const char *name);
|
||||
int config_paramidx_fromname(paramdef_t *params, int numparams, char *name);
|
||||
|
||||
/* utility functions, to be used by configuration module and/or configuration libraries */
|
||||
void config_printhelp(paramdef_t *, int numparams, const char *prefix);
|
||||
int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *params, int numparams, const char *prefix);
|
||||
int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *ipv4addr);
|
||||
void config_printhelp(paramdef_t *, int numparams, char *prefix);
|
||||
int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *params, int numparams, char *prefix);
|
||||
int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *ipv4addr);
|
||||
|
||||
/* apis to get/check parameters, to be used by oai modules, at configuration time */
|
||||
#define CONFIG_CHECKALLSECTIONS "ALLSECTIONS"
|
||||
int config_check_unknown_cmdlineopt(configmodule_interface_t *cfg, char *prefix);
|
||||
int config_get(configmodule_interface_t *cfg, paramdef_t *params, int numparams, const char *prefix);
|
||||
int config_get(configmodule_interface_t *cfg, paramdef_t *params, int numparams, char *prefix);
|
||||
int config_getlist(configmodule_interface_t *cfg, paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix);
|
||||
|
||||
/* apis to set some of the paramdef_t fields before using the get/getlist api's */
|
||||
|
||||
@@ -411,7 +411,7 @@ TEST(yaml_config, test_read_ipv4) {
|
||||
config_yaml_get(cfg, &p, 1, prefix);
|
||||
printf("%x\n", addr);
|
||||
|
||||
p.defstrval = "10.0.0.1";
|
||||
p.defstrval = strdup("10.0.0.1");
|
||||
strncpy(p.optname, "ipv4_3", sizeof(p.optname) - 1);
|
||||
config_yaml_get(cfg, &p, 1, prefix);
|
||||
printf("%x\n", addr);
|
||||
@@ -419,6 +419,7 @@ TEST(yaml_config, test_read_ipv4) {
|
||||
config_yaml_end(cfg);
|
||||
free(cfg->cfgP[0]);
|
||||
end_configmodule(cfg);
|
||||
free(p.defstrval);
|
||||
}
|
||||
|
||||
TEST(yaml_config, yaml_read_str_as_int) {
|
||||
|
||||
@@ -21,7 +21,7 @@ The following options can be specified to trigger the information added in the h
|
||||
- `line_num`: adds the (source code) line number
|
||||
- `time`: add the time since the system started in format `ss.ssssss` (seconds and microseconds sourced from `CLOCK_MONOTONIC`)
|
||||
- `wall_clock`: add the system-wide clock time that measures real (i.e., wall-clock) time in format `ss.ssssss` (seconds and microseconds since 1970-01-01 00:00:00 Coordinated Universal Time (UTC))
|
||||
- `utc_time`: add the UTC (Coordinated Universal Time) time in format `[hh:mm:ss.ssssss]`. Note that this time is independent of the current time zone (it shows GMT). Also, printing this time has additional overhead compared to other time methods (due to time conversion and formatting).
|
||||
- `utc_time`: add the UTC (Coordinated Universal Time) time in format `YYYY-MM-DD hh:mm:ss.ssssss UTC`. Note that this time is independent of the current time zone (it shows GMT). Also, printing this time has additional overhead compared to other time methods (due to time conversion and formatting).
|
||||
|
||||
Note: `time`, `utc_time` and `wall_clock` are mutually exclusive and cannot be used together.
|
||||
|
||||
|
||||
@@ -461,15 +461,9 @@ int register_log_component(const char *name, const char *fext, int compidx)
|
||||
}
|
||||
|
||||
if (computed_compidx >= 0 && computed_compidx <MAX_LOG_COMPONENTS) {
|
||||
log_component_t *c = &g_log->log_component[computed_compidx];
|
||||
c->name = strdup(name);
|
||||
int n = snprintf(c->headerName, sizeof(c->headerName), "[%s", c->name);
|
||||
if (n >= sizeof(c->headerName) - 1) // snprintf() truncated
|
||||
n = sizeof(c->headerName) - 2;
|
||||
c->headerName[n] = ']';
|
||||
c->headerName[n + 1] = 0;
|
||||
c->stream = stdout;
|
||||
c->filelog = 0;
|
||||
g_log->log_component[computed_compidx].name = strdup(name);
|
||||
g_log->log_component[computed_compidx].stream = stdout;
|
||||
g_log->log_component[computed_compidx].filelog = 0;
|
||||
g_log->log_rarely_used[computed_compidx].filelog_name = calloc(1, strlen(name) + 16); /* /tmp/<name>.%s */
|
||||
sprintf(g_log->log_rarely_used[computed_compidx].filelog_name, "/tmp/%s.", name);
|
||||
strncat(g_log->log_rarely_used[computed_compidx].filelog_name, fext, 3);
|
||||
@@ -515,15 +509,12 @@ int logInit (void)
|
||||
for (int i = 0; i < MAX_LOG_PREDEF_COMPONENTS; i++)
|
||||
register_log_component(comp_name[i], comp_extension[i], 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->filelog_name = "/tmp/openair.log";
|
||||
log_getconfig(g_log);
|
||||
|
||||
for (int i = 0; log_level_names[i].name != NULL; i++)
|
||||
if (g_log->flag & FLAG_LEVEL)
|
||||
snprintf(g_log->level2string[i], sizeof g_log->level2string[i], " %c ", toupper(log_level_names[i].name[0]));
|
||||
else
|
||||
snprintf(g_log->level2string[i], sizeof g_log->level2string[i], " ");
|
||||
|
||||
// set all unused component items to 0, they are for non predefined components
|
||||
for (int i=MAX_LOG_PREDEF_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
memset(&(g_log->log_component[i]),0,sizeof(log_component_t));
|
||||
@@ -584,7 +575,8 @@ static inline int log_header(log_component_t *c,
|
||||
struct tm utc_time;
|
||||
if (gmtime_r(&t.tv_sec, &utc_time) == NULL)
|
||||
abort();
|
||||
snprintf(timeString, sizeof(timeString), "[%02d:%02d:%02d.%06lu] ",
|
||||
snprintf(timeString, sizeof(timeString), "%04d-%02d-%02d %02d:%02d:%02d.%06lu UTC ",
|
||||
utc_time.tm_year + 1900, utc_time.tm_mon + 1, utc_time.tm_mday,
|
||||
utc_time.tm_hour, utc_time.tm_min, utc_time.tm_sec, t.tv_nsec / 1000);
|
||||
} else {
|
||||
snprintf(timeString, sizeof(timeString), "%lu.%06lu ",
|
||||
@@ -601,18 +593,15 @@ static inline int log_header(log_component_t *c,
|
||||
} else {
|
||||
threadIdString[0] = 0;
|
||||
}
|
||||
|
||||
return snprintf(log_buffer,
|
||||
buffsize,
|
||||
"%s%s%s%-8s%s%-*s%s",
|
||||
flag & FLAG_NOCOLOR ? "" : log_level_highlight_start[level],
|
||||
timeString,
|
||||
threadIdString,
|
||||
c->headerName,
|
||||
g_log->level2string[level], // will print space if no level selected
|
||||
l[0] == 0 ? 0 : 32,
|
||||
l,
|
||||
threadname);
|
||||
return snprintf(log_buffer, buffsize, "%s%s%s[%s] %c %s%s",
|
||||
flag & FLAG_NOCOLOR ? "" : log_level_highlight_start[level],
|
||||
timeString,
|
||||
threadIdString,
|
||||
c->name,
|
||||
flag & FLAG_LEVEL ? g_log->level2string[level] : ' ',
|
||||
l,
|
||||
threadname
|
||||
);
|
||||
}
|
||||
|
||||
void logRecord_mt(const char *file,
|
||||
|
||||
@@ -206,7 +206,6 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
char headerName[19];
|
||||
int level;
|
||||
int filelog;
|
||||
FILE *stream;
|
||||
@@ -218,7 +217,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
log_component_t log_component[MAX_LOG_COMPONENTS];
|
||||
log_component_back_t log_rarely_used[MAX_LOG_COMPONENTS];
|
||||
char level2string[NUM_LOG_LEVEL][4];
|
||||
char level2string[NUM_LOG_LEVEL];
|
||||
int flag;
|
||||
char *filelog_name;
|
||||
debug_flags_t debug_mask;
|
||||
|
||||
@@ -252,7 +252,7 @@ load_module_shlib_exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void * get_shlibmodule_fptr(const char *modname, const char *fname)
|
||||
void * get_shlibmodule_fptr(char *modname, char *fname)
|
||||
{
|
||||
for (int i=0; i<loader_data.numshlibs && loader_data.shlibs[i].name != NULL; i++) {
|
||||
if ( strcmp(loader_data.shlibs[i].name, modname) == 0) {
|
||||
|
||||
@@ -82,7 +82,7 @@ extern loader_data_t loader_data;
|
||||
// clang-format on
|
||||
|
||||
int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *farray, int numf, void *initfunc_arg);
|
||||
void *get_shlibmodule_fptr(const char *modname, const char *fname);
|
||||
void *get_shlibmodule_fptr(char *modname, char *fname);
|
||||
#define load_module_shlib(M, F, N, I) load_module_version_shlib(M, NULL, F, N, I)
|
||||
void loader_reset();
|
||||
#endif
|
||||
|
||||
@@ -459,50 +459,12 @@ bool compare_relative_ul_channel_bw(int nr_band, int scs, int channel_bandwidth,
|
||||
return rel_bw > limit;
|
||||
}
|
||||
|
||||
static bool check_delta_duplex(int index, uint64_t dlfreq_khz, uint64_t ulfreq_khz, int64_t dlbw, int64_t ulbw)
|
||||
{
|
||||
int uldl_min_offset = nr_bandtable[index].dl_min - nr_bandtable[index].ul_min;
|
||||
int txrx_offset = dlfreq_khz - ulfreq_khz;
|
||||
LOG_I(NR_PHY, "dlfreq:%ld ulfreq:%ld deltaduplex:%d khz, uldl_min_offset:%d khz\n",
|
||||
dlfreq_khz, ulfreq_khz, txrx_offset, uldl_min_offset);
|
||||
if (txrx_offset == uldl_min_offset)
|
||||
return true;
|
||||
|
||||
int band = nr_bandtable[index].band;
|
||||
|
||||
// Refer to section 5.4.4 in spec 38.101-5
|
||||
if (band == 256 && txrx_offset >= 165000 && txrx_offset <= 215000)
|
||||
return true;
|
||||
if (band == 255 && txrx_offset >= -130500 && txrx_offset <= -72500)
|
||||
return true;
|
||||
if (band == 254 && txrx_offset >= 862000 && txrx_offset <= 885000)
|
||||
return true;
|
||||
|
||||
// Refer to section 5.4.4 in spec 38.101-1 for these bands 24, 91-94, 109
|
||||
if (band == 24 && (txrx_offset == -101500 || txrx_offset == -120500))
|
||||
return true;
|
||||
//Delta duplex is also a range for these bands n91-n94, n109.
|
||||
if ((band >= 91 && band <= 94) || band == 109) {
|
||||
dlbw = ((dlbw / 1000) + 1) * 1000;
|
||||
ulbw = ((ulbw / 1000) + 1) * 1000;
|
||||
int lower_limit = nr_bandtable[index].dl_min - nr_bandtable[index].ul_max + ((dlbw + ulbw) >> 1);
|
||||
int upper_limit = nr_bandtable[index].dl_max - nr_bandtable[index].ul_min - ((dlbw + ulbw) >> 1);
|
||||
LOG_I(NR_PHY, "Band %d dlbw:%ld Khz, ulbw: %ld Khz RXTX lower limit:%d khz, upper limit:%d khz\n",
|
||||
band, dlbw, ulbw, lower_limit, upper_limit);
|
||||
|
||||
if (txrx_offset >= lower_limit && txrx_offset <= upper_limit)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex, int64_t dlbw, int64_t ulbw)
|
||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex)
|
||||
{
|
||||
const int64_t dl_freq_khz = downlink_frequency / 1000;
|
||||
const int32_t delta_duplex_khz = delta_duplex / 1000;
|
||||
const int64_t ul_freq_khz = dl_freq_khz + delta_duplex_khz;
|
||||
|
||||
uint64_t center_freq_diff_khz = UINT64_MAX; // 2^64
|
||||
uint16_t current_band = 0;
|
||||
|
||||
for (int ind = 0; ind < sizeofArray(nr_bandtable); ind++) {
|
||||
@@ -510,13 +472,17 @@ uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex, int64_t dlb
|
||||
if (dl_freq_khz < nr_bandtable[ind].dl_min || dl_freq_khz > nr_bandtable[ind].dl_max)
|
||||
continue;
|
||||
|
||||
if (ul_freq_khz < nr_bandtable[ind].ul_min || ul_freq_khz > nr_bandtable[ind].ul_max)
|
||||
int32_t current_offset_khz = nr_bandtable[ind].ul_min - nr_bandtable[ind].dl_min;
|
||||
|
||||
if (current_offset_khz != delta_duplex_khz)
|
||||
continue;
|
||||
|
||||
if (!check_delta_duplex(ind, dl_freq_khz, ul_freq_khz, dlbw, ulbw))
|
||||
continue;
|
||||
int64_t center_frequency_khz = (nr_bandtable[ind].dl_max + nr_bandtable[ind].dl_min) / 2;
|
||||
|
||||
current_band = nr_bandtable[ind].band;
|
||||
if (labs(dl_freq_khz - center_frequency_khz) < center_freq_diff_khz){
|
||||
current_band = nr_bandtable[ind].band;
|
||||
center_freq_diff_khz = labs(dl_freq_khz - center_frequency_khz);
|
||||
}
|
||||
}
|
||||
|
||||
printf("DL frequency %"PRIu64": band %d, UL frequency %"PRIu64"\n",
|
||||
@@ -575,8 +541,8 @@ int cce_to_reg_interleaving(const int R, int k, int n_shift, const int C, int L,
|
||||
return f;
|
||||
}
|
||||
|
||||
void get_coreset_rballoc(const uint8_t *FreqDomainResource, int *n_rb, int *rb_offset)
|
||||
{
|
||||
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset) {
|
||||
|
||||
uint8_t count=0, start=0, start_set=0;
|
||||
|
||||
uint64_t bitmap = (((uint64_t)FreqDomainResource[0])<<37)|
|
||||
@@ -599,7 +565,7 @@ void get_coreset_rballoc(const uint8_t *FreqDomainResource, int *n_rb, int *rb_o
|
||||
}
|
||||
|
||||
// According to 38.211 7.3.2.2
|
||||
int get_coreset_num_cces(const uint8_t *FreqDomainResource, int duration)
|
||||
int get_coreset_num_cces(uint8_t *FreqDomainResource, int duration)
|
||||
{
|
||||
int num_rbs;
|
||||
int rb_offset;
|
||||
|
||||
@@ -280,12 +280,12 @@ uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, ui
|
||||
|
||||
int cce_to_reg_interleaving(const int R, int k, int n_shift, const int C, int L, const int N_regs);
|
||||
int get_SLIV(uint8_t S, uint8_t L);
|
||||
void get_coreset_rballoc(const uint8_t *FreqDomainResource, int *n_rb, int *rb_offset);
|
||||
int get_coreset_num_cces(const uint8_t *FreqDomainResource, int duration);
|
||||
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset);
|
||||
int get_coreset_num_cces(uint8_t *FreqDomainResource, int duration);
|
||||
int get_nr_table_idx(int nr_bandP, uint8_t scs_index);
|
||||
int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index);
|
||||
frame_type_t get_frame_type(uint16_t nr_bandP, uint8_t scs_index);
|
||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex, int64_t dlbw, int64_t ulbw);
|
||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex);
|
||||
int NRRIV2BW(int locationAndBandwidth,int N_RB);
|
||||
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB);
|
||||
int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize);
|
||||
|
||||
@@ -62,7 +62,7 @@ add_dependencies(telnetsrv telnetsrv_ci)
|
||||
|
||||
message(STATUS "Add CI specific telnet functions for nrUE in telnetsrv_ciUE.so")
|
||||
add_library(telnetsrv_ciUE MODULE telnetsrv_ciUE.c)
|
||||
target_link_libraries(telnetsrv_ciUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs UTIL NR_L2_UE nr_nas)
|
||||
target_link_libraries(telnetsrv_ciUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs UTIL)
|
||||
add_dependencies(telnetsrv telnetsrv_ciUE)
|
||||
|
||||
message(STATUS "Add bearer specific telnet functions in libtelnetsrv_bearer.so")
|
||||
|
||||
@@ -76,7 +76,7 @@ typedef struct webdatadef {
|
||||
typedef void(*telnet_printfunc_t)(const char* format, ...);
|
||||
typedef int(*cmdfunc_t)(char*, int, telnet_printfunc_t prnt);
|
||||
typedef int (*webfunc_t)(char *cmdbuff, int debug, telnet_printfunc_t prnt, ...);
|
||||
typedef int (*webfunc_getdata_t)(const char *cmdbuff, int debug, void *data, telnet_printfunc_t prnt);
|
||||
typedef int (*webfunc_getdata_t)(char *cmdbuff, int debug, void *data, telnet_printfunc_t prnt);
|
||||
typedef int(*qcmdfunc_t)(char*, int, telnet_printfunc_t prnt,void *arg);
|
||||
|
||||
#define TELNETSRV_CMDFLAG_PUSHINTPOOLQ (1 << 0) // ask the telnet server to push the command in a thread pool queue
|
||||
@@ -195,7 +195,7 @@ VT escape sequence definition, for smarter display....
|
||||
#define TELNET_ADDCMD_FNAME "add_telnetcmd"
|
||||
#define TELNET_POLLCMDQ_FNAME "poll_telnetcmdq"
|
||||
#define TELNET_PUSHCMD_FNAME "telnet_pushcmd"
|
||||
typedef int(*add_telnetcmd_func_t)(const char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
|
||||
typedef int(*add_telnetcmd_func_t)(char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
|
||||
typedef void(*poll_telnetcmdq_func_t)(void *qid,void *arg);
|
||||
typedef void (*push_telnetcmd_func_t)(telnetshell_cmddef_t *cmd, char *cmdbuff, telnet_printfunc_t prnt);
|
||||
#ifdef TELNETSERVERCODE
|
||||
|
||||
@@ -50,9 +50,7 @@
|
||||
#include "telnetsrv_ltemeasur_def.h"
|
||||
#include "telnetsrv_cpumeasur_def.h"
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_defs.h"
|
||||
#include "openair1/PHY/defs_nr_UE.h"
|
||||
|
||||
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
|
||||
#include "openair1/PHY/phy_extern_nr_ue.h"
|
||||
|
||||
void measurcmd_display_macstats(telnet_printfunc_t prnt);
|
||||
void measurcmd_display_macstats_ue(telnet_printfunc_t prnt);
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_entity_am.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_config.h"
|
||||
#include "openair2/RRC/NR/rrc_gNB_mobility.h"
|
||||
#include "openair3/NGAP/ngap_gNB_ue_context.h"
|
||||
|
||||
#define TELNETSERVERCODE
|
||||
#include "telnetsrv.h"
|
||||
@@ -277,8 +275,6 @@ static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
if (rnti < 0)
|
||||
ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n");
|
||||
NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, rnti);
|
||||
if (!UE)
|
||||
ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti);
|
||||
int dl_bwp = UE->current_DL_BWP.bwp_id;
|
||||
const char *dl_bwp_text = dl_bwp > 0 ? "dedicated" : "initial";
|
||||
int ul_bwp = UE->current_UL_BWP.bwp_id;
|
||||
@@ -288,104 +284,6 @@ static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** @brief Trigger NGAP PDU Session Release for one or more PDU sessions associated with a UE ID/
|
||||
* Syntax: trigger_pdu_session_release [ue_id=gNB_ue_ngap_id(int,opt)],pdusession_id(int)[,pdusession_id(int)...]
|
||||
* - If the gNB_ue_ngap_id is omitted, it is fetched from the only UE present in the RRC layer
|
||||
* - At least one valid PDU session ID must be provided
|
||||
* @param[in] buf Comma-separated input string: [ue_id=gNB_ue_ngap_id(int,opt)],PDU1[,PDU2,...]
|
||||
* @param[in] debug Not used.
|
||||
* @param[in] prnt Callback for telnet output printing.
|
||||
* @return 0 on success; negative value on error. */
|
||||
static int trigger_ngap_pdu_session_release(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
if (buf == NULL) {
|
||||
ERROR_MSG_RET("Missing input. Usage: trigger_pdu_session_release [ue_id=gNB_ue_ngap_id(int,opt)],pdusession_id(int)[,pdusession_id(int)...]\n");
|
||||
}
|
||||
|
||||
char *tokens[NGAP_MAX_PDU_SESSION + 1];
|
||||
int count = 0;
|
||||
|
||||
for (char *tok = strtok(buf, ","); tok != NULL && count < (int)sizeofArray(tokens); tok = strtok(NULL, ",")) {
|
||||
tokens[count++] = tok;
|
||||
}
|
||||
|
||||
if (count < 1) {
|
||||
ERROR_MSG_RET("Invalid input. Usage: trigger_pdu_session_release [ue_id=gNB_ue_ngap_id(int,opt)],pdusession_id(int)[,pdusession_id(int)...]\n");
|
||||
}
|
||||
|
||||
int gNB_ue_ngap_id = -1;
|
||||
int pdu_start_index = 0;
|
||||
|
||||
if (strncmp(tokens[0], "ue_id=", 6) == 0) {
|
||||
gNB_ue_ngap_id = atoi(tokens[0] + 6);
|
||||
pdu_start_index = 1;
|
||||
} else {
|
||||
// No UE ID: infer it
|
||||
if (!RC.nrrrc)
|
||||
ERROR_MSG_RET("No RRC present\n");
|
||||
rrc_gNB_ue_context_t *ue = get_single_rrc_ue();
|
||||
if (!ue)
|
||||
ERROR_MSG_RET("No single UE in RRC present\n");
|
||||
gNB_ue_ngap_id = ue->ue_context.rrc_ue_id;
|
||||
}
|
||||
|
||||
if (pdu_start_index >= count) {
|
||||
ERROR_MSG_RET("No pdusession_id(int) provided\n");
|
||||
}
|
||||
|
||||
ngap_gNB_ue_context_t *ngap = ngap_get_ue_context(gNB_ue_ngap_id);
|
||||
if (!ngap) {
|
||||
ERROR_MSG_RET("No NGAP UE context for gNB_ue_ngap_id %d\n", gNB_ue_ngap_id);
|
||||
}
|
||||
|
||||
MessageDef *message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_PDUSESSION_RELEASE_COMMAND);
|
||||
ngap_pdusession_release_command_t *msg = &NGAP_PDUSESSION_RELEASE_COMMAND(message_p);
|
||||
memset(msg, 0, sizeof(*msg));
|
||||
|
||||
msg->amf_ue_ngap_id = ngap->amf_ue_ngap_id;
|
||||
msg->gNB_ue_ngap_id = ngap->gNB_ue_ngap_id;
|
||||
|
||||
int nb_sessions = 0;
|
||||
for (int i = pdu_start_index; i < count; ++i) {
|
||||
int sid = atoi(tokens[i]);
|
||||
if (sid < 1 || sid > 255) {
|
||||
ERROR_MSG_RET("Invalid pdusession_id(int): %s (must be between 1 and 255)\n", tokens[i]);
|
||||
}
|
||||
msg->pdusession_ids[nb_sessions++] = sid;
|
||||
}
|
||||
|
||||
msg->nb_pdusessions_torelease = nb_sessions;
|
||||
|
||||
if (prnt) {
|
||||
prnt("Triggering NGAP PDU Session Release for gNB_ue_ngap_id=%d: releasing pdusession_id=%d", gNB_ue_ngap_id);
|
||||
for (int i = 0; i < nb_sessions; ++i) {
|
||||
prnt(" %d,", msg->pdusession_ids[i]);
|
||||
}
|
||||
prnt("\n");
|
||||
}
|
||||
|
||||
itti_send_msg_to_task(TASK_RRC_GNB, 0, message_p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int trigger_bwp_switch(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
char *sbwpId = strtok(buf, " ");
|
||||
int bwpId = atoi(sbwpId);
|
||||
char *srnti = strtok(NULL, " ");
|
||||
prnt("bwpId %d rnti %s\n", bwpId, srnti);
|
||||
int rnti = fetch_rnti(srnti, prnt);
|
||||
if (rnti < 0)
|
||||
ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n");
|
||||
if (!nr_trigger_bwp_switch(rnti, bwpId)) {
|
||||
prnt("failed trigger BWP switch for UE %04x BWP ID %d\n", rnti, bwpId);
|
||||
return -1;
|
||||
} else {
|
||||
prnt("triggered BWP switch to BWP ID %d for UE %04x\n", bwpId, rnti);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static telnetshell_cmddef_t cicmds[] = {
|
||||
{"get_single_rnti", "", get_single_rnti},
|
||||
{"force_reestab", "[rnti(hex,opt)]", trigger_reestab},
|
||||
@@ -395,9 +293,7 @@ static telnetshell_cmddef_t cicmds[] = {
|
||||
{"trigger_f1_ho", "[rrc_ue_id(int,opt)]", rrc_gNB_trigger_f1_ho},
|
||||
{"fetch_du_by_ue_id", "[rrc_ue_id(int,opt)]", fetch_du_by_ue_id},
|
||||
{"get_current_bwp", "[rnti(hex,opt)]", get_current_bwp},
|
||||
{"trigger_bwp_switch", "newBWPId [rnti(hex,opt)]", trigger_bwp_switch},
|
||||
{"trigger_n2_ho", "[neighbour_pci(uint32_t),ueId(uint32_t)]", rrc_gNB_trigger_n2_ho},
|
||||
{"pdu_session_release", "[gNB_ue_ngap_id(int,opt)]", trigger_ngap_pdu_session_release},
|
||||
{"", "", NULL},
|
||||
};
|
||||
|
||||
|
||||
@@ -37,17 +37,14 @@
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_defs.h"
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "openair2/RRC/NR_UE/rrc_proto.h"
|
||||
#include "openair1/PHY/phy_extern_nr_ue.h"
|
||||
#include "openair1/PHY/defs_nr_common.h"
|
||||
#include "openair1/PHY/defs_nr_UE.h"
|
||||
#include "openair3/NAS/NR_UE/nr_nas_msg.h"
|
||||
|
||||
#define TELNETSERVERCODE
|
||||
#include "telnetsrv.h"
|
||||
|
||||
#define ERROR_MSG_RET(mSG, aRGS...) do { prnt(mSG, ##aRGS); return 1; } while (0)
|
||||
|
||||
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
|
||||
|
||||
/* UE L2 state string */
|
||||
const char* NR_UE_L2_STATE_STR[] = {
|
||||
#define UE_STATE(state) #state,
|
||||
@@ -55,14 +52,6 @@ const char* NR_UE_L2_STATE_STR[] = {
|
||||
#undef UE_STATE
|
||||
};
|
||||
|
||||
static int get_default_ue_id(void)
|
||||
{
|
||||
NR_UE_RRC_INST_t *rrc = get_NR_UE_rrc_inst(0);
|
||||
if (!rrc)
|
||||
return -1;
|
||||
return rrc->ue_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the synchronization state of a UE.
|
||||
*
|
||||
@@ -143,40 +132,6 @@ static int get_dl_toa(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int add_pdu_session(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
int ue_id = -1;
|
||||
int pdusession_id = -1;
|
||||
|
||||
if (!buf) {
|
||||
ERROR_MSG_RET("Missing argument: expected PDUSessionID[,UE_ID]\n");
|
||||
}
|
||||
|
||||
// Try parsing values in the form: "PDUSessionID[,UE_ID]"
|
||||
int n = sscanf(buf, "%d,%d", &pdusession_id, &ue_id);
|
||||
if (n == 1) {
|
||||
// Only PDUSessionID provided: use default UE ID
|
||||
ue_id = get_default_ue_id();
|
||||
if (ue_id < 0)
|
||||
ERROR_MSG_RET("No default UE context found\n");
|
||||
} else if (n != 2) {
|
||||
ERROR_MSG_RET("Invalid format: expected PDUSessionID[,UE_ID]\n");
|
||||
}
|
||||
|
||||
if (pdusession_id < 0 || pdusession_id > 255)
|
||||
ERROR_MSG_RET("PDUSessionID must be in range [0,255]\n");
|
||||
if (ue_id < 0)
|
||||
ERROR_MSG_RET("UE_ID must be >= 0\n");
|
||||
|
||||
nr_ue_nas_t *nas = get_ue_nas_info(ue_id);
|
||||
if (!nas)
|
||||
ERROR_MSG_RET("No NAS context found for UE_ID %d\n", ue_id);
|
||||
|
||||
request_pdusession(nas, pdusession_id);
|
||||
prnt("Triggered PDU session request for UE %d with ID %d\n", ue_id, pdusession_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Telnet shell command definitions */
|
||||
static telnetshell_cmddef_t cicmds[] = {
|
||||
{"sync_state", "[UE_ID(int,opt)]", get_sync_state},
|
||||
@@ -185,7 +140,6 @@ static telnetshell_cmddef_t cicmds[] = {
|
||||
{"force_crnti_ra", "", force_crnti_ra},
|
||||
{"deregistration", "", force_deregistration},
|
||||
{"get_max_dl_toa", "[ant]", get_dl_toa},
|
||||
{"add_pdu_session", "[PDUSessionID(int)],[UE_ID(int,opt)]", add_pdu_session},
|
||||
{"", "", NULL},
|
||||
};
|
||||
|
||||
|
||||
@@ -105,10 +105,10 @@ static int get_stats(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
int bw_index = get_supported_band_index(scs, fr, nrb);
|
||||
int bw_mhz = get_supported_bw_mhz(fr, bw_index);
|
||||
|
||||
const dlul_mac_stats_t *stat = &mac->mac_stats;
|
||||
static dlul_mac_stats_t last = {0};
|
||||
int diff_used = stat->dl.used_prb_aggregate - last.dl.used_prb_aggregate;
|
||||
int diff_total = stat->dl.total_prb_aggregate - last.dl.total_prb_aggregate;
|
||||
const mac_stats_t *stat = &mac->mac_stats;
|
||||
static mac_stats_t last = {0};
|
||||
int diff_used = stat->used_prb_aggregate - last.used_prb_aggregate;
|
||||
int diff_total = stat->total_prb_aggregate - last.total_prb_aggregate;
|
||||
int load = diff_total > 0 ? 100 * diff_used / diff_total : 0;
|
||||
last = *stat;
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ extern "C" {
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a < _b ? _a : _b; })
|
||||
|
||||
#define IS_BIT_SET(a, b) ((a >> b) & 1)
|
||||
#define SET_BIT(a, b) (a | (1 << b))
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef min
|
||||
|
||||
@@ -82,7 +82,7 @@ of the FAPI 10.04 version of the SRS PDU, and RX_Beamforming PDU.
|
||||
| Applicative Threads | Allocated CPUs |
|
||||
|------------------------|----------------|
|
||||
| PTP & PHC2SYS Services | 41 |
|
||||
| OAI `nr-softmodem` | 13-16 |
|
||||
| OAI `nr-softmodem` | 13-14 |
|
||||
|
||||
## PTP configuration
|
||||
|
||||
|
||||
@@ -1916,6 +1916,8 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/E1AP/e1ap_api.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/E1AP/e1ap_setup.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/E1AP/e1ap_asnc.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/NR_PHY_INTERFACE/nr_sched_response.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/NR_PHY_INTERFACE/nr_sched_response.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/NR_PHY_INTERFACE/NR_IF_Module.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/NR_PHY_INTERFACE/NR_IF_Module.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/SDAP/nr_sdap/nr_sdap.h \
|
||||
@@ -1924,6 +1926,7 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/SDAP/nr_sdap/nr_sdap_entity.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_gNB.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/impl_defs_top.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/phy_extern_nr_ue.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/INIT/lte_parms.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/INIT/nr_init_ru.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/INIT/nr_parms.c \
|
||||
@@ -2009,6 +2012,7 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_TRANSPORT/nr_transport_common_proto.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_TRANSPORT/nr_sss.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_TRANSPORT/nr_prach.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_TRANSPORT/nr_scrambling.c \
|
||||
@@ -2290,8 +2294,10 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/phy_frame_config_nr.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/phy_frame_config_nr.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/nr_prach_procedures.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/fapi_nr_l1.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/phy_procedures_nr_gNB.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/sched_nr.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/fapi_nr_l1.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/nr_ru_procedures.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/if_defs.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/ethernet_lib.h \
|
||||
|
||||
@@ -72,36 +72,3 @@ sequenceDiagram
|
||||
u->>c: BEARER CONTEXT MODIFICATION RESPONSE
|
||||
Note over c: e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE
|
||||
```
|
||||
|
||||
## PDU Session Release
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant AMF
|
||||
participant CUCP
|
||||
participant CUUP
|
||||
participant DU
|
||||
participant UE
|
||||
|
||||
AMF->>CUCP: NG PDU SESSION RESOURCE RELEASE COMMAND
|
||||
Note over CUCP: ngap_gNB_handle_pdusession_release_command
|
||||
CUCP->>CUCP: rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND
|
||||
Note over CUCP: set status PDU_SESSION_STATUS_TORELEASE
|
||||
CUCP->>CUUP: E1 Bearer Context Modification Request
|
||||
Note over CUUP: release_gtpu_tunnel (GTP tunnel, PDCP, SDAP)
|
||||
CUUP->>CUCP: E1 Bearer Context Modification Response
|
||||
Note over CUCP: rrc_gNB_send_f1_drb_release_request
|
||||
CUCP->>DU: F1 UE Context Modification Request
|
||||
Note over DU: handle_ue_context_drbs_release (release in MAC/RLC)
|
||||
DU->>CUCP: F1 UE Context Modification Response
|
||||
Note over CUCP: rrc_CU_process_ue_context_modification_response
|
||||
Note over CUCP: replace existing CellGroupConfig
|
||||
Note over CUCP: rrc_gNB_generate_dedicatedRRCReconfiguration
|
||||
CUCP->>UE: RRCReconfiguration (DRB release list, NAS PDU)
|
||||
UE->>CUCP: RRCReconfigurationComplete
|
||||
Note over CUCP: handle_rrcReconfigurationComplete
|
||||
Note over CUCP: rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE
|
||||
CUCP->>AMF: NG PDU SESSION RESOURCE RELEASE RESPONSE
|
||||
Note over CUCP: rm_drbs_by_pdusession (from stored RRC list)
|
||||
Note over CUCP: rm_pduSession (from stored RRC list)
|
||||
```
|
||||
|
||||
@@ -352,11 +352,8 @@ These modes of operation are supported:
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* NTN
|
||||
- TA adjustemt based on ntn-Config-r17 information
|
||||
- Different TA adjustemt algorithms between SIB19 receptions:
|
||||
- Autonomous TA adjustemt based on DL time tracking
|
||||
- Standard compliant epoch time based TA adjustment including orbital propagation
|
||||
- DL Doppler compensation based on ntn-Config-r17 information
|
||||
- UL Doppler pre-compensation based on ntn-Config-r17 information and residual DL FO estimation
|
||||
- Autonomous TA adjustemt between SIB19 receptions based on DL time tracking
|
||||
- UL Doppler pre-compensation based on continuous DL FO estimation
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short block
|
||||
|
||||
@@ -255,6 +255,8 @@ configuration](../RRC/rrc-usage.md) as well for SIB configuration.
|
||||
* `pusch_AntennaPorts` (default 1): number of antenna ports in PUSCH
|
||||
* `maxMIMO_layers` (default -1=unlimited): maximum number of MIMO layers to use
|
||||
in downlink
|
||||
* `sib1_tda` (default 1): time domain allocation (TDA) indices to use for SIB1
|
||||
(38.214 section 5.1.2.1.1)
|
||||
* `do_CSIRS` (default 0): flag whether to use channel-state information
|
||||
reference signal (CSI-RS)
|
||||
* `do_SRS` (default 0): flag whether to use sounding reference signal (SRS)
|
||||
@@ -418,29 +420,3 @@ Note that you should increase the aggregation level candidates as described in
|
||||
[the corresponding section above](#pdcch-aggregation-level). This is because the
|
||||
scheduler has to schedule multiple DCIs in a single DL slots for multiple UL
|
||||
slots. As a suggestion, you could try `uess_agg_levels = [4, 2, 2, 0, 0]`.
|
||||
|
||||
## Multiple Dedicated BWPs
|
||||
|
||||
A maximum of 4 dedicated BWPs can be configured for a UE per standard, but only
|
||||
1 BWP can be active in UL and DL direction at a given time. In the code we
|
||||
only configure a single BWP for the UE at a given time and we would switch by
|
||||
reconfiguring this BWP. All this procedure is transparent for users and LOGs
|
||||
mark BWP switching according to the configuration file enumeration. It is
|
||||
possible to configure multiple dedicated BWPs and 1st active BWP via
|
||||
configuration file.
|
||||
|
||||
### Setup of the Configuration files ##
|
||||
|
||||
In the configuration file you have the option to select the 1st active BWP, the
|
||||
BWP location and SCS of each BWP in the following way (example with 2
|
||||
additional BWPs):
|
||||
|
||||
```
|
||||
first_active_bwp = 1;
|
||||
bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 24;});
|
||||
```
|
||||
|
||||
This example configures 3 additional BWPs, with IDs from 1 to 3. A similar
|
||||
example can be found in configuration file
|
||||
`ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf` tested in CI.
|
||||
|
||||
@@ -161,9 +161,9 @@ unpack function is called.
|
||||
## P7 DL Transmission by VNF
|
||||
|
||||
DL messages are scheduled at the VNF, through gNB_dlsch_ulsch_scheduler(). gNB_dlsch_ulsch_scheduler() is called when
|
||||
handling a SLOT.indication message in phy_nr_slot_indication().
|
||||
handling a SLOT.indication message in trigger_scheduler().
|
||||
|
||||
The function phy_nr_slot_indication(nfapi_nr_slot_indication_scf_t *slot_ind) calls the functions oai_nfapi_[DL P7 msg]_
|
||||
The function trigger_scheduler(nfapi_nr_slot_indication_scf_t *slot_ind) calls the functions oai_nfapi_[DL P7 msg]_
|
||||
req(), calling in turn call the send_p7_msg function pointer, which contain the logic to pack the message into a buffer
|
||||
and send it to the PNF.
|
||||
Finally, NR_UL_indication is called to process the other P7 messages received from the PNF that were put in theire
|
||||
@@ -215,7 +215,7 @@ bool nfapi_vnf_p7_tx_data_req(nfapi_vnf_p7_config_t* config, nfapi_nr_tx_data_re
|
||||
graph TD
|
||||
softmodem_start[nr-softmodem init] --> P5_configuration[configure_nr_nfapi_vnf] --> transport_init[Transport mechanism init] --> send_first_msg[Send first P5 message to PNF]
|
||||
transport_init[Transport mechanism init] --> P5_recv_loop[P5 receive loop] -- P5 Message processing --> P5_recv_loop[P5 receive loop]
|
||||
P5_recv_loop[P5 receive loop] -- Start.response callback called --> P7_config[P7 Configuration] --> P7_loop[P7 Loop] --> P7_msg_recv[P7 message received] --> call_vnf_handle_p7[Call vnf_nr_handle_p7_msg] --> hdr_unpack[Unpack header] --> call_specific_p7_handler[Call specific P7 message handler] --> slot_ind[Is a SLOT.indication?] -- Yes --> trig_scheduler[Call phy_nr_slot_indication] --> gNB_ulsch_dlsch_sched[Call gNB_dlsch_ulsch_scheduler] --> send_p7_dl[Process and send P7 messages to PNF] --> call_ul_ind[Call NR_UL_indication] --> proc_p7[Process P7 messages in queue] --> P7_loop[P7 Loop]
|
||||
P5_recv_loop[P5 receive loop] -- Start.response callback called --> P7_config[P7 Configuration] --> P7_loop[P7 Loop] --> P7_msg_recv[P7 message received] --> call_vnf_handle_p7[Call vnf_nr_handle_p7_msg] --> hdr_unpack[Unpack header] --> call_specific_p7_handler[Call specific P7 message handler] --> slot_ind[Is a SLOT.indication?] -- Yes --> trig_scheduler[Call trigger_scheduler] --> gNB_ulsch_dlsch_sched[Call gNB_dlsch_ulsch_scheduler] --> send_p7_dl[Process and send P7 messages to PNF] --> call_ul_ind[Call NR_UL_indication] --> proc_p7[Process P7 messages in queue] --> P7_loop[P7 Loop]
|
||||
slot_ind[Is a SLOT.indication?] -- No --> put_queue[Put message in queue] --> P7_loop[P7 Loop];
|
||||
|
||||
|
||||
|
||||
@@ -1243,8 +1243,8 @@ In OAI gNB, we support:
|
||||
```
|
||||
|
||||
The reference specifications:
|
||||
* `O-RAN.WG4.MP.0-R004-v16.01`
|
||||
* `O-RAN.WG4.MP-YANGs-R004-v16.01`
|
||||
* `O-RAN.WG4.MP.0-v05.00`
|
||||
* `O-RAN.WG4.MP-YANGs-v04.00`
|
||||
|
||||
## M-plane prerequisites
|
||||
Before proceeding, please make sure you have a support for 7.2 interface, as described in [Prerequisites](#prerequisites).
|
||||
@@ -1366,7 +1366,7 @@ sudo ldconfig
|
||||
If you would like to install these libraries in the custom path, please replace `/usr/local` default path to e.g. `/opt/mplane-v2`.
|
||||
|
||||
## Benetel O-RU
|
||||
Note: RAN550/650 v1.2.2 and v1.4.1 have been successfully tested.
|
||||
Note: Only v1.2.2 RAN550 and RAN650 have been successfully tested.
|
||||
|
||||
### One time steps
|
||||
Connect to the RU as user `root`, enable the mplane service, and reboot:
|
||||
@@ -1400,8 +1400,6 @@ The reference DU configuration file for two Benetel RAN650:
|
||||
[gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf)
|
||||
|
||||
In order to run gNB/DU with M-plane, we need to modify Tx gain `att_tx` in RU section, as well as the `fhi_72` section in the configuration file.
|
||||
|
||||
**Important note: Benetel v1.4.1 requires only one VF if the same VLAN tag is used for both C-/U-planes. Otherwise, C-plane will not be properly configured. Benetel v1.2.2 will receive the C-plane packets no matter the DU MAC address value.**
|
||||
Example for one RU:
|
||||
```bash
|
||||
fhi_72 = {
|
||||
@@ -1575,14 +1573,14 @@ sequenceDiagram
|
||||
|
||||
|
||||
<details>
|
||||
<summary>4x4 MIMO and 100MHz BW with Benetel 550 RU v1.2.2 example run</summary>
|
||||
<summary>4x4 MIMO and 100MHz BW with Benetel 550 RU example run</summary>
|
||||
|
||||
```
|
||||
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <connect> with username "oranbenetel" and port ID "830".
|
||||
[HW] [MPLANE] Successfuly connected to RU "192.168.80.9" with username "oranbenetel" and port ID "830".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get> operational datastore.
|
||||
[HW] [MPLANE] Successfully retrieved operational datastore from RU "192.168.80.9".
|
||||
[HW] [MPLANE] RU is in "LOCKED" sync state.
|
||||
[HW] [MPLANE] RU is already PTP synchronized.
|
||||
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <subscribe> with stream "NETCONF" and filter "(null)".
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully subscribed to all notifications from RU "192.168.80.9".
|
||||
@@ -2225,861 +2223,6 @@ sequenceDiagram
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>4x4 MIMO and 100MHz BW with Benetel 550 RU v1.4.1 example run</summary>
|
||||
|
||||
```
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <connect> with username "oranbenetel" and port ID "830".
|
||||
[HW] [MPLANE] Successfuly connected to RU "192.168.81.4" with username "oranbenetel" and port ID "830".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get> operational datastore.
|
||||
[HW] [MPLANE] Successfully retrieved operational datastore from RU "192.168.81.4".
|
||||
[HW] [MPLANE] RU is already PTP synchronized.
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <subscribe> with stream "NETCONF" and filter "(null)".
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully subscribed to all notifications from RU "192.168.81.4".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = "<supervision-watchdog-reset xmlns="urn:o-ran:supervision:1.0">
|
||||
<supervision-notification-interval>65535</supervision-notification-interval>
|
||||
<guard-timer-overhead>65535</guard-timer-overhead>
|
||||
</supervision-watchdog-reset>".
|
||||
[HW] [MPLANE] Successfully updated supervision timer to (65535+65535)[s] for RU "192.168.81.4".
|
||||
[HW] [MPLANE] Watchdog timer answer:
|
||||
<next-update-at xmlns="urn:o-ran:supervision:1.0">2025-08-29T06:49:32+02:00</next-update-at>
|
||||
|
||||
[HW] [MPLANE] Interface MTU 1500 unreliable/not correctly reported by Benetel O-RU, hardcoding to 9600.
|
||||
[HW] [MPLANE] IQ bitwidth 16 unreliable/not correctly reported by Benetel O-RU, hardcoding to 9.
|
||||
[HW] [MPLANE] Storing the following information to forward to xran:
|
||||
RU MAC address 70:b3:d5:e1:5b:81
|
||||
MTU 9600
|
||||
IQ bitwidth 9
|
||||
PRACH offset 4
|
||||
DU port bitmask 61440
|
||||
Band sector bitmask 3840
|
||||
CC ID bitmask 240
|
||||
RU port ID bitmask 15
|
||||
DU port ID 0
|
||||
Band sector ID 0
|
||||
CC ID 0
|
||||
RU port ID 0
|
||||
max Tx gain 24.0
|
||||
[HW] [MPLANE] Successfully retrieved all the U-plane info - interface name, TX/RX carrier names, and TX/RX endpoint names.
|
||||
[HW] [MPLANE] Successfully retreived all performance measurement names.
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-yang-metadata".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "yang".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-inet-types".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-yang-types".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-yang-schema-mount".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-yang-structure-ext".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-datastores".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "sysrepo".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-netconf-acm".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-factory-default".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "sysrepo-factory-default".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-yang-library".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "sysrepo-monitoring".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "sysrepo-plugind".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-netconf".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-netconf-with-defaults".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-netconf-notifications".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-origin".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-netconf-monitoring".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "ietf-netconf-nmda".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <get-schema> for module "nc-notifications".
|
||||
[HW] [MPLANE] [LIBYANG] ERROR: Data model "notifications" not found in local searchdirs. (path: (null)).
|
||||
[HW] [MPLANE] [LIBYANG] ERROR: Loading "notifications" module failed. (path: (null)).
|
||||
[HW] [MPLANE] [LIBYANG] ERROR: Parsing module "nc-notifications" failed. (path: (null)).
|
||||
[HW] [MPLANE] Unable to load module "nc-notifications" from RU "192.168.81.4".
|
||||
[HW] [MPLANE] Unable to load all yang modules from operational datastore for RU "192.168.81.4". Using yang models present in "models" subfolder.
|
||||
[HW] [MPLANE] Successfully loaded all yang modules for RU "192.168.81.4".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <edit-config>:
|
||||
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
|
||||
<interface>
|
||||
<name>INTERFACE_0</name>
|
||||
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:l2vlan</type>
|
||||
<enabled>true</enabled>
|
||||
<mac-address xmlns="urn:o-ran:interfaces:1.0">70:b3:d5:e1:5b:81</mac-address>
|
||||
<base-interface xmlns="urn:o-ran:interfaces:1.0">eth0</base-interface>
|
||||
<vlan-id xmlns="urn:o-ran:interfaces:1.0">3</vlan-id>
|
||||
</interface>
|
||||
</interfaces>
|
||||
<performance-measurement-objects xmlns="urn:o-ran:performance-management:1.0">
|
||||
<rx-window-measurement-interval>10</rx-window-measurement-interval>
|
||||
<tx-measurement-interval>10</tx-measurement-interval>
|
||||
<notification-interval>10</notification-interval>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_ON_TIME</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_EARLY</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_LATE</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_TOTAL</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_ON_TIME_C</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_EARLY_C</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_LATE_C</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<tx-measurement-objects>
|
||||
<measurement-object>TX_TOTAL</measurement-object>
|
||||
<active>false</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</tx-measurement-objects>
|
||||
</performance-measurement-objects>
|
||||
<processing-elements xmlns="urn:o-ran:processing-element:1.0">
|
||||
<transport-session-type>ETH-INTERFACE</transport-session-type>
|
||||
<ru-elements>
|
||||
<name>PLANE_0</name>
|
||||
<transport-flow>
|
||||
<interface-name>INTERFACE_0</interface-name>
|
||||
<eth-flow>
|
||||
<ru-mac-address>70:b3:d5:e1:5b:81</ru-mac-address>
|
||||
<vlan-id>3</vlan-id>
|
||||
<o-du-mac-address>00:11:22:33:44:66</o-du-mac-address>
|
||||
</eth-flow>
|
||||
</transport-flow>
|
||||
</ru-elements>
|
||||
</processing-elements>
|
||||
<user-plane-configuration xmlns="urn:o-ran:uplane-conf:1.0">
|
||||
<low-level-tx-links>
|
||||
<name>PdschLink0</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<tx-array-carrier>TxArray0</tx-array-carrier>
|
||||
<low-level-tx-endpoint>LowLevelTxEndpoint0</low-level-tx-endpoint>
|
||||
</low-level-tx-links>
|
||||
<low-level-tx-links>
|
||||
<name>PdschLink1</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<tx-array-carrier>TxArray1</tx-array-carrier>
|
||||
<low-level-tx-endpoint>LowLevelTxEndpoint1</low-level-tx-endpoint>
|
||||
</low-level-tx-links>
|
||||
<low-level-tx-links>
|
||||
<name>PdschLink2</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<tx-array-carrier>TxArray2</tx-array-carrier>
|
||||
<low-level-tx-endpoint>LowLevelTxEndpoint2</low-level-tx-endpoint>
|
||||
</low-level-tx-links>
|
||||
<low-level-tx-links>
|
||||
<name>PdschLink3</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<tx-array-carrier>TxArray3</tx-array-carrier>
|
||||
<low-level-tx-endpoint>LowLevelTxEndpoint3</low-level-tx-endpoint>
|
||||
</low-level-tx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PuschLink0</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray0</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxEndpoint0</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PrachLink0</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray0</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxPrachEndpoint0</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PuschLink1</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray1</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxEndpoint1</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PrachLink1</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray1</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxPrachEndpoint1</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PuschLink2</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray2</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxEndpoint2</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PrachLink2</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray2</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxPrachEndpoint2</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PuschLink3</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray3</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxEndpoint3</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-rx-links>
|
||||
<name>PrachLink3</name>
|
||||
<processing-element>PLANE_0</processing-element>
|
||||
<rx-array-carrier>RxArray3</rx-array-carrier>
|
||||
<low-level-rx-endpoint>LowLevelRxPrachEndpoint3</low-level-rx-endpoint>
|
||||
</low-level-rx-links>
|
||||
<low-level-tx-endpoints>
|
||||
<name>LowLevelTxEndpoint0</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>0</eaxc-id>
|
||||
</e-axcid>
|
||||
</low-level-tx-endpoints>
|
||||
<low-level-tx-endpoints>
|
||||
<name>LowLevelTxEndpoint1</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>1</eaxc-id>
|
||||
</e-axcid>
|
||||
</low-level-tx-endpoints>
|
||||
<low-level-tx-endpoints>
|
||||
<name>LowLevelTxEndpoint2</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>2</eaxc-id>
|
||||
</e-axcid>
|
||||
</low-level-tx-endpoints>
|
||||
<low-level-tx-endpoints>
|
||||
<name>LowLevelTxEndpoint3</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>3</eaxc-id>
|
||||
</e-axcid>
|
||||
</low-level-tx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxEndpoint0</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>0</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxPrachEndpoint0</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>4</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxEndpoint1</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>1</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxPrachEndpoint1</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>5</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxEndpoint2</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>2</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxPrachEndpoint2</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>6</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxEndpoint3</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>3</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<low-level-rx-endpoints>
|
||||
<name>LowLevelRxPrachEndpoint3</name>
|
||||
<compression>
|
||||
<iq-bitwidth>9</iq-bitwidth>
|
||||
<compression-type>STATIC</compression-type>
|
||||
</compression>
|
||||
<frame-structure>193</frame-structure>
|
||||
<cp-type>NORMAL</cp-type>
|
||||
<cp-length>352</cp-length>
|
||||
<cp-length-other>288</cp-length-other>
|
||||
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
|
||||
<ul-fft-sampling-offsets>
|
||||
<scs>KHZ_30</scs>
|
||||
<ul-fft-sampling-offset>0</ul-fft-sampling-offset>
|
||||
</ul-fft-sampling-offsets>
|
||||
<e-axcid>
|
||||
<o-du-port-bitmask>61440</o-du-port-bitmask>
|
||||
<band-sector-bitmask>3840</band-sector-bitmask>
|
||||
<ccid-bitmask>240</ccid-bitmask>
|
||||
<ru-port-bitmask>15</ru-port-bitmask>
|
||||
<eaxc-id>7</eaxc-id>
|
||||
</e-axcid>
|
||||
<non-time-managed-delay-enabled>true</non-time-managed-delay-enabled>
|
||||
</low-level-rx-endpoints>
|
||||
<tx-array-carriers>
|
||||
<name>TxArray0</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<gain>24.0</gain>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
</tx-array-carriers>
|
||||
<tx-array-carriers>
|
||||
<name>TxArray1</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<gain>24.0</gain>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
</tx-array-carriers>
|
||||
<tx-array-carriers>
|
||||
<name>TxArray2</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<gain>24.0</gain>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
</tx-array-carriers>
|
||||
<tx-array-carriers>
|
||||
<name>TxArray3</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<gain>24.0</gain>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
</tx-array-carriers>
|
||||
<rx-array-carriers>
|
||||
<name>RxArray0</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
<gain-correction>0.0</gain-correction>
|
||||
<n-ta-offset>0</n-ta-offset>
|
||||
</rx-array-carriers>
|
||||
<rx-array-carriers>
|
||||
<name>RxArray1</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
<gain-correction>0.0</gain-correction>
|
||||
<n-ta-offset>0</n-ta-offset>
|
||||
</rx-array-carriers>
|
||||
<rx-array-carriers>
|
||||
<name>RxArray2</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
<gain-correction>0.0</gain-correction>
|
||||
<n-ta-offset>0</n-ta-offset>
|
||||
</rx-array-carriers>
|
||||
<rx-array-carriers>
|
||||
<name>RxArray3</name>
|
||||
<absolute-frequency-center>623334</absolute-frequency-center>
|
||||
<center-of-channel-bandwidth>3350010000</center-of-channel-bandwidth>
|
||||
<channel-bandwidth>100000000</channel-bandwidth>
|
||||
<active>ACTIVE</active>
|
||||
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
|
||||
<downlink-sfn-offset>0</downlink-sfn-offset>
|
||||
<gain-correction>0.0</gain-correction>
|
||||
<n-ta-offset>0</n-ta-offset>
|
||||
</rx-array-carriers>
|
||||
</user-plane-configuration>
|
||||
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully edited the candidate datastore for RU "192.168.81.4".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <validate> candidate datastore.
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully validated candidate datastore for RU "192.168.81.4".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <commit> candidate datastore.
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully commited configuration into running datastore for RU "192.168.81.4".
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.335228846+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray0",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.368360865+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray1",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.414703766+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray2",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.452921618+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray3",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.471419021+00:00)
|
||||
{
|
||||
"ietf-netconf-notifications:netconf-config-change": {
|
||||
"changed-by": {
|
||||
"username": "root",
|
||||
"session-id": 0
|
||||
},
|
||||
"datastore": "running",
|
||||
"edit": [
|
||||
{
|
||||
"target": "/ietf-interfaces:interfaces/interface[name='INTERFACE_0']",
|
||||
"operation": "create"
|
||||
},
|
||||
{
|
||||
"target": "/ietf-interfaces:interfaces/interface[name='INTERFACE_0']/name",
|
||||
"operation": "create"
|
||||
},
|
||||
...
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.678251110+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray0",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.715498360+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray1",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.830268973+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray2",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.853387657+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray3",
|
||||
"state": "BUSY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.515262267+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray0",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.535692962+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray1",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.557423764+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray2",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.579066867+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:rx-array-carriers-state-change": {
|
||||
"rx-array-carriers": [
|
||||
{
|
||||
"name": "RxArray3",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.604192995+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray0",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.629830498+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray1",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.651062685+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray2",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.672865767+00:00)
|
||||
{
|
||||
"o-ran-uplane-conf:tx-array-carriers-state-change": {
|
||||
"tx-array-carriers": [
|
||||
{
|
||||
"name": "TxArray3",
|
||||
"state": "READY"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[HW] [MPLANE] RU "192.168.81.4" is now ready.
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <edit-config>:
|
||||
<performance-measurement-objects xmlns="urn:o-ran:performance-management:1.0">
|
||||
<rx-window-measurement-interval>10</rx-window-measurement-interval>
|
||||
<tx-measurement-interval>10</tx-measurement-interval>
|
||||
<notification-interval>10</notification-interval>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_ON_TIME</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_EARLY</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_LATE</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_TOTAL</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_ON_TIME_C</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_EARLY_C</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<rx-window-measurement-objects>
|
||||
<measurement-object>RX_LATE_C</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</rx-window-measurement-objects>
|
||||
<tx-measurement-objects>
|
||||
<measurement-object>TX_TOTAL</measurement-object>
|
||||
<active>true</active>
|
||||
<object-unit>RU</object-unit>
|
||||
<report-info>COUNT</report-info>
|
||||
</tx-measurement-objects>
|
||||
</performance-measurement-objects>
|
||||
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully edited the candidate datastore for RU "192.168.81.4".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <validate> candidate datastore.
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully validated candidate datastore for RU "192.168.81.4".
|
||||
[HW] [MPLANE] RPC request to RU "192.168.81.4" = <commit> candidate datastore.
|
||||
[HW] [MPLANE] RPC reply = OK.
|
||||
[HW] [MPLANE] Successfully commited configuration into running datastore for RU "192.168.81.4".
|
||||
[HW] [MPLANE] Sucessfully activated PM after start-up procedure for RU "192.168.81.4".
|
||||
```
|
||||
</details>
|
||||
|
||||
Note: If you wish to run the fronthaul without M-plane, no need for recompilation, as the library `oran_fhlib_5g` already exists.
|
||||
The only mandatory step is to link `oran_fhlib_5g` to `oai_transpro` library.
|
||||
|
||||
@@ -135,7 +135,7 @@ Here are some useful command line options for the NR UE:
|
||||
|--------------------------|---------------------------------------------------------------------------------------------------------------|
|
||||
| `--ue-scan-carrier` | Scan for cells in current bandwidth. This option can be used if the SSB position of the gNB is unknown. If multiple cells are detected, the UE will try to connect to the first cell. By default, this option is disabled and the UE attempts to only decode SSB given by `--ssb`. |
|
||||
| `--ue-fo-compensation` | Enables the initial frequency offset compensation at the UE. Useful when running over the air and/or without an external clock/time source. |
|
||||
| `--cont-fo-comp` | Enables the continuous frequency offset (FO) estimation and compensation. Parameter value `1` specifies that the main FO contribution comes from the local oscillator's (LO) accuracy. Parameter value `2` specifies that the main FO contribution comes from Doppler shift. Parameter value `3` specifies that no measured residual DL FO is considered for UL FO pre-compensation. |
|
||||
| `--cont-fo-comp` | Enables the continuous frequency offset (FO) estimation and compensation. Parameter value `1` specifies that the main FO contribution comes from the local oscillator's (LO) accuracy. Parameter value `2` specifies that the main FO contribution comes from Doppler shift. |
|
||||
| `--initial-fo` | Sets the known initial frequency offset. Useful especially with large Doppler frequency, e.g. LEO satellite. |
|
||||
| `--freq-sync-P` | Sets the coefficient for the Proportional part of the PI-controller for the continuous frequency offset compensation. Default value 0.01. |
|
||||
| `--freq-sync-I` | Sets the coefficient for the Integrating part of the PI-controller for the continuous frequency offset compensation. Default value 0.001. |
|
||||
@@ -296,6 +296,7 @@ This allows to reuse HARQ processes immediately, but it breaks compatibility wit
|
||||
To enable this feature, the `disable_harq` flag has to be added to the gNB conf file in the section `gNBs.[0]`
|
||||
```
|
||||
...
|
||||
sib1_tda = 5;
|
||||
min_rxtxtime = 6;
|
||||
disable_harq = 1; // <--
|
||||
|
||||
@@ -355,9 +356,7 @@ sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF
|
||||
|
||||
For LEO satellite scenarios, the parameter `--ntn-initial-time-drift` must be provided via command line, as the UE needs this value to compensate for the time drift during initial sync, before SIB19 was received.
|
||||
This parameter provides the drift rate of the complete DL timing (incl. feeder link and service link) in µs/s.
|
||||
|
||||
To perform an autonomous TA update based on the DL drift, the boolean parameter `--autonomous-ta` can be added.
|
||||
If that parameter is omitted, the TA is continuously computed based on the SIB19 information.
|
||||
Also, to perform an autonomous TA update based on the DL drift, the boolean parameter `--autonomous-ta` should be added in case of a LEO satellite scenario.
|
||||
|
||||
For LEO satellite scenario we assume the LO to be very accurate and the main FO contribution comes from Doppler shift.
|
||||
Therefore, we use the command line parameter `--cont-fo-comp 2` to continuously compensate the DL Doppler and pre-compensate the UL Doppler.
|
||||
@@ -368,7 +367,7 @@ For other information on optional NR UE command line options, please refer [here
|
||||
So an example NR UE command for FDD, 5MHz BW, 15 kHz SCS, transparent LEO satellite 5G NR NTN is this:
|
||||
```
|
||||
cd cmake_targets
|
||||
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.prop_delay 20 --rfsimulator.options chanmod --time-sync-I 0.1 --ntn-initial-time-drift -46 --initial-fo 57340 --cont-fo-comp 2
|
||||
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.prop_delay 20 --rfsimulator.options chanmod --time-sync-I 0.1 --ntn-initial-time-drift -46 --autonomous-ta --initial-fo 57340 --cont-fo-comp 2
|
||||
```
|
||||
|
||||
# Specific OAI modes
|
||||
@@ -469,30 +468,19 @@ The hardcoded DRBs will be treated like GBR Flows. Due to code limitations at th
|
||||
|
||||
## IF setup with OAI
|
||||
|
||||
OAI is also compatible with Intermediate Frequency (IF) equipment, allowing the
|
||||
use of RF front-ends operating on arbitrary frequency bands that do not conform
|
||||
to the standardized 3GPP NR bands.
|
||||
OAI is also compatible with Intermediate Frequency (IF) equipment. This allows to use RF front-end that with arbitrary frequencies bands that do not comply with the standardised 3GPP NR bands.
|
||||
|
||||
### OAIUE configuration
|
||||
To configure IF frequencies on the UE side, provide the following command-line
|
||||
options:
|
||||
- `if_freq`: DL frequency in Hz
|
||||
- `if_freq_off`: UL frequency offset in Hz
|
||||
To configure the IF frequencies it is necessary to use two command-line options at UE side:
|
||||
- `if_freq`, downlink frequency in Hz
|
||||
- `if_freq_off`, uplink frequency offset in Hz
|
||||
|
||||
### gNB configuration
|
||||
On the gNB side, the corresponding parameters must be set in the RUs section of
|
||||
the configuration file:
|
||||
- `if_freq`: DL frequency in Hz
|
||||
- `if_offset`: UL frequency offset in Hz
|
||||
|
||||
> Note: When using a libconfig-based configuration file for the gNB, ensure that
|
||||
> `if_freq` numeric value is suffixed with "L" so it is correctly parsed as
|
||||
> 64-bit integer.
|
||||
Accordingly, the following parameters must be configured in the RUs section of the gNB configuration file:
|
||||
- `if_freq`
|
||||
- `if_offset`
|
||||
|
||||
### Run OAI with custom DL/UL arbitrary frequencies
|
||||
|
||||
The following example uses DL frequency 2169.080 MHz and UL frequency offset
|
||||
-400 MHz, with a configuration file for band 66 (FDD) at gNB side.
|
||||
The following example uses DL frequency 2169.080 MHz and UL frequency offset -400 MHz, with a configuration file for band 66 (FDD) at gNB side.
|
||||
|
||||
On two separate machines with USRPs, run:
|
||||
|
||||
|
||||
44
doc/RUN_NR_multiple_BWPs.md
Normal file
44
doc/RUN_NR_multiple_BWPs.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Procedure to add dedicated Bandwidth part (BWP)
|
||||
|
||||
## Contributed by 5G Testbed IISc
|
||||
|
||||
### Developers: Abhijith A, Shruthi S
|
||||
|
||||
# Terminology #
|
||||
|
||||
## Bandwidth part (BWP) ##
|
||||
Bandwidth Part (BWP) is a set of contiguous Resource Blocks in the resource grid.
|
||||
|
||||
Parameters of a BWP are communicated to UE using RRC parameters: BWP-Downlink and BWP-Uplink.
|
||||
|
||||
A UE can be configured with a set of 4 BWPs in uplink (UL) and downlink (DL) direction (3GPP TS 38.331 Annex B.2 Description of BWP configuration options). But only 1 BWP can be active in UL and DL direction at a given time.
|
||||
|
||||
# Procedure to run multiple dedicated BWPs #
|
||||
|
||||
A maximum of 4 dedicated BWPs can be configured for a UE.
|
||||
|
||||
To configure multiple BWPs, add the following parameters in the physical parameters section:
|
||||
|
||||
## Setup of the Configuration files ##
|
||||
|
||||
In the configuration file you have the option to select the 1st active BWP, the RIV and SCS of each BWP in the following way (example with 3 additional BWPs):
|
||||
```
|
||||
first_active_bwp = 1;
|
||||
bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 51;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 24;});
|
||||
```
|
||||
|
||||
This example configures 3 additional BWPs, with IDs from 1 to 3. Find these parameters in this configuration file: "ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf"
|
||||
|
||||
# Testing gNB and UE in RF simulator
|
||||
|
||||
## gNB command:
|
||||
```
|
||||
sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf --rfsim --rfsimulator.serveraddr server
|
||||
```
|
||||
|
||||
## UE command:
|
||||
```
|
||||
sudo ./nr-uesoftmodem -C 3319680000 -r 106 --numerology 1 --ssb 516 --band 78 --rfsim --rfsimulator.serveraddr 127.0.0.1
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user