Commit 2407c356 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge branch 'integration_2026_w14' into 'develop'

Integration `2026.w14`

* !4021 hotfix for 4 layer mapping on aarch64
* !4022 UE: Fix CSI RS Measurement
* !4010 UE: Implement SUCI Profile Scheme A
* !4012 More compilation improvements
* !4027 CI: fix Aerial conf for test with 30 MHz BW
* !3948 Update doc: split RUNMODEM.md, clarify USRP-specific workarounds
* !4026 RRC/E1 bugfixes: handle missing UE context, don't send E1 msg if no PDU session
* !3996 Switch xran lib repo to https://github.com/openairinterface/o-du-phy.git
* !4020 Remove a lot of unused code and defines
* !3969 Acceleration of channel convolution
* !4023 Cleanup common_lib.h
* Clarifications on license
* !4017 CI: Add stage to push to local git repository

See merge request oai/openairinterface5g!4025
parents af4b0d53 1a4c4c9b
......@@ -674,6 +674,8 @@ target_link_libraries(UTIL PUBLIC instrumentation)
set(SECURITY_SRC
${OPENAIR3_DIR}/SECU/secu_defs.c
${OPENAIR3_DIR}/SECU/curve_25519.c
${OPENAIR3_DIR}/SECU/x963_kdf.c
${OPENAIR3_DIR}/SECU/kdf.c
${OPENAIR3_DIR}/SECU/aes_128_ctr.c
${OPENAIR3_DIR}/SECU/aes_128_cbc_cmac.c
......@@ -1911,7 +1913,7 @@ target_link_libraries(nr-uesoftmodem PRIVATE
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas)
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(nr-uesoftmodem PRIVATE nr_nas lib_uicc usim_lib)
target_link_libraries(nr-uesoftmodem PRIVATE nr_nas lib_uicc usim_lib SECURITY)
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# force the generation of ASN.1 so that we don't need to wait during the build
......
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
The source code is distributed under [**Collaborative Standards Software
License (CSSL) v1.0**](LICENSE). Some files, such as for orchestration,
are distributed under [MIT license](preferred)(MIT.txt). Documentation is
distributed under [Creative Commons Attribution 4.0 International
license](LICENSES/preferred/CC-BY-4.0.txt).
The source code is distributed under Collaborative Standards Software License
(CSSL) v1.0. Some files, such as for orchestration, are distributed under MIT
license. Documentation is distributed under Creative Commons Attribution 4.0
International license. All the files without an explicit copyright header have
an implicit "Copyright of OpenAirInterface Authors".
For more details of the license, refer to the `LICENSES` directory for a list
of preferred and exceptionally-applied licenses.
......
......@@ -40,7 +40,18 @@ Some files, such as for orchestration, are distributed under
[MIT license](preferred)(MIT.txt). Documentation is distributed under
[Creative Commons Attribution 4.0 International license](LICENSES/preferred/CC-BY-4.0.txt).
Please see [NOTICE](NOTICE.md) for other licenses which are used in the software.
All the files without an explicit copyright header have an implicit "Copyright
of OpenAirInterface Authors".
Please see [NOTICE](NOTICE) for other licenses which are used in the software.
In the past OAI source code has been re-licensed sometimes, here is the
history:
1. CSSL v1.0 starting tag 2026.w14
2. OAI Public License v1.1 starting tag v1.0 till af4b0d53
3. OAI Public License v1.0: starting tag v.04 till v1.0
4. GPL 3: starting tag v.0 till v.04 (only initial implementation of 4G)
# Where to Start #
......
......@@ -34,9 +34,7 @@ pipeline {
stage ("Verify Parameters") {
steps {
script {
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
env.JOB_TIMESTAMP = sh(returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"').trim()
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
......@@ -112,6 +110,23 @@ pipeline {
}
}
}
stage ("Local-Repo-Push") {
steps {
script {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
triggerSlaveJob ('RAN-Local-Repo-Push', 'Local-Repo-Push')
}
}
}
post {
failure {
script {
echo "Push to local repository KO"
failingStages += '\n * RAN-Local-Repo-Push'
}
}
}
}
// Build Stages are Mandatory
stage ("Image Building Processes") {
when { expression {doBuild} }
......@@ -855,25 +870,22 @@ pipeline {
// ---- Slave Job functions
def triggerSlaveJob (jobName, gitlabStatusName) {
if ("MERGE".equals(env.gitlabActionType)) {
MR_NUMBER = env.gitlabMergeRequestIid
} else {
MR_NUMBER = 'develop'
}
def MR_NUMBER = "MERGE".equals(env.gitlabActionType) ? env.gitlabMergeRequestIid : 'develop'
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
localStatus = build job: jobName,
def localStatus = build job: jobName,
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'SourceRepo', value: String.valueOf(env.gitlabSourceRepoHttpUrl)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
string(name: 'eNB_MR', value: String.valueOf(MR_NUMBER)),
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
], propagate: false
localResult = localStatus.getResult()
def localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
......@@ -899,11 +911,11 @@ def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
// The slave job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
localStatus = build job: jobName,
def localStatus = build job: jobName,
parameters: [
string(name: 'FULL_RAN_TAG', value: String.valueOf(fullRanTag))
], propagate: false
localResult = localStatus.getResult()
def localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
......@@ -914,34 +926,6 @@ def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
}
}
def triggerSlaveJobNoGitLab (jobName) {
if ("MERGE".equals(env.gitlabActionType)) {
MR_NUMBER = env.gitlabMergeRequestIid
} else {
MR_NUMBER = 'develop'
}
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
localStatus = build job: jobName,
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
string(name: 'eNB_MR', value: String.valueOf(MR_NUMBER)),
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
], propagate: false
localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
}
def finalizeSlaveJob(jobName) {
lock ('Parent-Lock') {
// In case of any non-success, we are retrieving the HTML report of the last completed
......@@ -957,7 +941,7 @@ def finalizeSlaveJob(jobName) {
filter: 'test_results*.html',
selector: lastCompleted())
if (fileExists(fileName)) {
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${env.JOB_TIMESTAMP}#' ${fileName}"
} else {
sh "echo \"could not copy results from ${jobName}, please check pipeline ${BUILD_URL}\" > ${fileName}"
}
......
#!/bin/groovy
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
// Location of the python executor node shall be in the same subnet as the others servers
def nodeExecutor = params.nodeExecutor
// SSH URL of the internal git repository
def internalRepoURL = params.internalRepoURL
// Name of the resource
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
pipeline {
agent {
label nodeExecutor
}
options {
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage('Verify parameters') {
steps {
script {
def missingParams = []
if (!params.SourceRepo?.trim()) { missingParams << 'SourceRepo' }
if (!params.eNB_Branch?.trim()) { missingParams << 'eNB_Branch' }
if (!params.eNB_CommitID?.trim()) { missingParams << 'eNB_CommitID' }
if (!params.eNB_TargetBranch?.trim()) { missingParams << 'eNB_TargetBranch' }
if (!params.eNB_Repository?.trim()) { missingParams << 'eNB_Repository' }
if (missingParams) {
error "Missing required parameters: ${missingParams.join(', ')}"
}
echo "Source Repo : ${params.SourceRepo}"
echo "Source Branch : ${params.eNB_Branch}"
echo "Source Commit : ${params.eNB_CommitID}"
echo "Target Branch : ${params.eNB_TargetBranch}"
echo "Target Repo : ${params.eNB_Repository}"
}
}
}
stage('Prepare workspace') {
steps {
sh """
git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"
git remote remove source || true
git remote remove internal-repo || true
"""
}
}
stage('Add source repo & fetch branches') {
steps {
sh """
git remote add source ${params.SourceRepo} || true
git fetch source ${params.eNB_Branch}
git fetch origin ${params.eNB_TargetBranch}
"""
}
}
stage('Create temporary branch for CI') {
steps {
script {
def shortCommit = params.eNB_CommitID.take(8)
env.NEW_BRANCH = "${params.eNB_Branch}-${shortCommit}"
echo "New branch: ${env.NEW_BRANCH}"
}
sh """
# Checkout source commit
git checkout -B ${env.NEW_BRANCH} ${params.eNB_CommitID}
"""
}
}
stage('Merge target into source') {
steps {
sh """
echo "Merging target branch ${params.eNB_TargetBranch} into source branch ${env.NEW_BRANCH}"
if ! git merge --ff origin/${params.eNB_TargetBranch} \
-m "Merge ${params.eNB_TargetBranch} into ${params.eNB_Branch} for CI"; then
echo "Merge conflicts detected. Aborting."
git merge --abort || true
exit 1
fi
"""
}
}
stage('Push merged branch to internal repository') {
steps {
sh """
git remote add internal-repo ${internalRepoURL} || true
echo "Pushing ${env.NEW_BRANCH} to internal repo"
git push --force internal-repo ${env.NEW_BRANCH}
"""
}
}
}
}
......@@ -483,10 +483,10 @@ class Containerize():
HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK)
return False
def BuildRunTests(self, ctx, node, HTML):
def BuildRunTests(self, ctx, node, dockerfile, runtime_opt, ctest_opt, HTML):
lSourcePath = self.eNBSourceCodePath
logging.debug('Building on server: ' + node)
cmd = cls_cmd.RemoteCmd(node)
cmd = cls_cmd.getConnection(node)
cmd.cd(lSourcePath)
ret = cmd.run('hostnamectl')
......@@ -513,9 +513,9 @@ class Containerize():
return False
# build ran-unittests image
dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu"
logfile = f'{lSourcePath}/cmake_targets/log/unittest-build.log'
ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {dockerfile} . &> {logfile}')
ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file ci-scripts/{dockerfile} . &> {logfile}')
archiveArtifact(cmd, ctx, logfile)
if ret.returncode != 0:
logging.error(f'Cannot build unit tests')
......@@ -528,7 +528,7 @@ class Containerize():
# I would like to run it with --rm and mount the ctest result directory to avoid 'docker cp'
# below, but then permissions are messed up and we can't remove the directory without sudo
# making the next pipeline fail
ret = cmd.run(f'docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ran-unittests ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc)')
ret = cmd.run(f'docker run -a STDOUT {runtime_opt} --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ran-unittests ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc) {ctest_opt}')
cmd.run('docker cp ran-unittests:/oai-ran/build/Testing/Temporary/LastTest.log .')
archiveArtifact(cmd, ctx, f'{lSourcePath}/LastTest.log')
cmd.run('docker cp ran-unittests:/oai-ran/build/Testing/Temporary/LastTestsFailed.log .')
......
......@@ -157,7 +157,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "127.0.0.5";
......@@ -171,7 +170,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 150;
......
......@@ -162,7 +162,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "192.168.71.171";
......@@ -176,7 +175,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 150;
......
......@@ -191,7 +191,6 @@ rlc = {
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "127.0.0.5";
......@@ -205,7 +204,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 30;
......
......@@ -156,7 +156,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.19.98";
......@@ -171,7 +170,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;
......
......@@ -156,7 +156,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.19.99";
......@@ -171,7 +170,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;
......
......@@ -2,7 +2,6 @@
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "192.168.71.140"; // vnf addr
local_n_address = "192.168.71.141"; // pnf addr
......
......@@ -4,7 +4,6 @@ usrp-tx-thread-config = 1;
tune-offset = 30720000;
L1s = ({
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "127.0.0.1"; // vnf addr
local_n_address = "127.0.0.1"; // pnf addr
......
......@@ -173,14 +173,11 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "192.168.71.141"; // pnf addr [!]
local_s_address = "192.168.71.140"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
......
......@@ -175,14 +175,11 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.1"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 300;
......
......@@ -180,13 +180,10 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_s_preference = "aerial";
tr_n_preference = "local_RRC";
pucch_RSSI_Threshold = -270;
......
......@@ -180,13 +180,10 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_s_preference = "aerial";
tr_n_preference = "local_RRC";
pucch_RSSI_Threshold = -270;
......
......@@ -179,13 +179,10 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_s_preference = "aerial";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 180; # 150;
......
......@@ -161,7 +161,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
......@@ -169,7 +168,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
......
......@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
......@@ -184,7 +183,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120
pucch0_dtx_threshold = 80;
......
......@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
......@@ -181,7 +180,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
......
......@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
......@@ -181,7 +180,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
......
......@@ -170,13 +170,11 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
});
L1s = ({
num_cc = 1;
tr_n_preference = "local_mac";
});
......
......@@ -172,13 +172,11 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
});
L1s = ({
num_cc = 1;
tr_n_preference = "local_mac";
});
......
......@@ -180,7 +180,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -190,7 +189,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
......
......@@ -197,7 +197,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
......@@ -209,7 +208,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;
......
......@@ -205,7 +205,6 @@ rlc = {
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
......@@ -217,7 +216,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;
......
......@@ -172,7 +172,6 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -185,7 +184,6 @@ MACRLCs = ({
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
#pucch0_dtx_threshold = 120;
......
......@@ -172,7 +172,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100;
......@@ -183,7 +182,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 200;
......
......@@ -178,7 +178,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 320;
......@@ -192,7 +191,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pusch_dtx_threshold = 20;
......
......@@ -174,7 +174,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -185,7 +184,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 130
pucch0_dtx_threshold = 80;
......
......@@ -171,7 +171,6 @@ gNBs = (
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 320;
......@@ -185,7 +184,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
max_ldpc_iterations = 15;
......
......@@ -171,7 +171,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -182,7 +181,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
......
......@@ -174,7 +174,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
......@@ -184,7 +183,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
#pucch0_dtx_threshold = 150;
......
......@@ -176,7 +176,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -186,7 +185,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;
......
......@@ -166,7 +166,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -176,7 +175,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;
......
......@@ -174,7 +174,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 250;
......@@ -184,7 +183,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
......
......@@ -167,7 +167,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -197,7 +196,6 @@ prs_config = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
}
......
......@@ -143,16 +143,14 @@ gNBs:
MACRLCs:
- num_cc: 1
tr_s_preference: local_L1
- tr_s_preference: local_L1
tr_n_preference: local_RRC
pusch_TargetSNRx10: 200
pucch_TargetSNRx10: 200
stats_max_ue: 17
L1s:
- num_cc: 1
tr_n_preference: local_mac
- tr_n_preference: local_mac
prach_dtx_threshold: 200
# pucch0_dtx_threshold = 150;
......
......@@ -178,7 +178,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -189,7 +188,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 30;
......
......@@ -146,15 +146,13 @@ gNBs:
MACRLCs:
- num_cc: 1
tr_s_preference: local_L1
- 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
- tr_n_preference: local_mac
prach_dtx_threshold: 200
# pucch0_dtx_threshold = 150;
......
......@@ -169,7 +169,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
......@@ -179,7 +178,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 120;
......
......@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
......@@ -181,7 +180,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
tx_amp_backoff_dB = 30;
......
......@@ -177,7 +177,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -187,7 +186,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 50;
......
......@@ -179,7 +179,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -190,7 +189,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 50;
......
......@@ -168,7 +168,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -179,7 +178,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
......
......@@ -19,7 +19,6 @@ pdu_sessions = ({ dnn = "oai"; nssai_sst = 1; });
MACRLCs = (
{
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
......
......@@ -11,7 +11,7 @@ uicc0:
thread-pool: "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
channelmod:
max_chan: 10;
max_chan: 10
modellist: DefaultChannelList
DefaultChannelList:
- model_name: client_tx_channel_model
......
......@@ -203,9 +203,7 @@ MACRLCs = (
remote_s_address = "127.0.0.1";
local_s_address = "127.0.0.1";
local_s_portc = 50001;
remote_s_portc = 50000;
local_s_portd = 50011;
remote_s_portd = 50010;
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
scheduler_mode = "fairRR";
......
......@@ -189,9 +189,7 @@ MACRLCs = (
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50601; // vnf p5 port
remote_s_portc = 50600; // pnf p5 port [!]
local_s_portd = 50611; // vnf p7 port [!]
remote_s_portd = 50610; // pnf p7 port [!]
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
}
......
......@@ -177,9 +177,7 @@ MACRLCs = (
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50601; // vnf p5 port
remote_s_portc = 50600; // pnf p5 port [!]
local_s_portd = 50611; // vnf p7 port [!]
remote_s_portd = 50610; // pnf p7 port [!]
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
}
......
......@@ -188,7 +188,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -198,7 +197,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;
......
......@@ -184,7 +184,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -194,7 +193,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
}
......
......@@ -192,7 +192,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -202,7 +201,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;
......
......@@ -179,7 +179,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -189,7 +188,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
......
......@@ -183,7 +183,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -193,7 +192,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
......
......@@ -184,7 +184,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
......@@ -192,7 +191,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 80;
......
......@@ -172,7 +172,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100;
......@@ -183,7 +182,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 200;
......
......@@ -175,7 +175,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
......@@ -185,7 +184,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;
......
......@@ -188,7 +188,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
......@@ -198,7 +197,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;
......
......@@ -189,7 +189,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
# pusch_TargetSNRx10 = 200;
......@@ -199,7 +198,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
# pucch0_dtx_threshold = 150;
......
......@@ -167,7 +167,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
......@@ -178,7 +177,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
......
......@@ -31,4 +31,4 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \
-DUSE_ATS_MEMORY=OFF \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \
.. && \
ninja test_channel_scalability test_multipath test_noise
ninja test_channel_scalability
# SPDX-License-Identifier: MIT
FROM nvidia/cuda:12.9.1-devel-ubuntu22.04 AS cuda-image
FROM ran-base:develop AS ran-tests
COPY --from=cuda-image /usr/local/cuda/ /usr/local/cuda/
# Set the LD_LIBRARY_PATH to ensure the system can find the copied libraries.
# This is crucial for applications that use CUDA.
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/targets/sbsa-linux/lib
ENV PATH=/usr/local/cuda/bin:$PATH
ENV C_INCLUDE_PATH=/usr/local/cuda/include
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libgtest-dev \
libyaml-cpp-dev
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake -GNinja -DENABLE_TESTS=ON -DCUDA_ENABLE=ON .. && ninja tests
......@@ -70,6 +70,9 @@ def ExecuteActionWithParam(action, ctx, node):
RAN.Build_eNB_args=test.findtext('Build_eNB_args')
CONTAINERS.imageKind=test.findtext('kind')
proxy_commit = test.findtext('proxy_commit')
dockerfile = test.findtext('dockerfile') or ''
runtime_opt = test.findtext('runtime-opt') or ''
ctest_opt = test.findtext('ctest-opt') or ''
if proxy_commit is not None:
CONTAINERS.proxyCommit = proxy_commit
if action == 'Build_eNB':
......@@ -81,7 +84,7 @@ def ExecuteActionWithParam(action, ctx, node):
elif action == 'Build_Cluster_Image':
success = CLUSTER.BuildClusterImage(ctx, node, HTML)
elif action == 'Build_Run_Tests':
success = CONTAINERS.BuildRunTests(ctx, node, HTML)
success = CONTAINERS.BuildRunTests(ctx, node, dockerfile, runtime_opt, ctest_opt, HTML)
elif action == 'Initialize_eNB':
RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args')
......
<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->
<testCaseList>
<htmlTabRef>build-run-test-gh-tab</htmlTabRef>
<htmlTabName>Build and Run Unit Tests with CUDA</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<testCase>
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>localhost</node>
</testCase>
<testCase>
<class>Build_Run_Tests</class>
<desc>Build and Run UnitTests</desc>
<dockerfile>docker/Dockerfile.unittest.cuda.ubuntu</dockerfile>
<runtime-opt>--gpus all</runtime-opt>
<ctest-opt>-L cuda</ctest-opt>
<node>localhost</node>
</testCase>
</testCaseList>
......@@ -8,6 +8,7 @@
<testCase>
<class>Build_Run_Tests</class>
<desc>Build and Run UnitTests</desc>
<dockerfile>docker/Dockerfile.unittest.ubuntu</dockerfile>
<node>obelix</node>
</testCase>
......
......@@ -236,7 +236,7 @@ cuphydriver_config:
pusch_ldpc_algo_index: 0
pusch_ldpc_flags: 2
pusch_ldpc_use_half: 1
pusch_nMaxPrb: 273
pusch_nMaxPrb: 78
pusch_nMaxRx: 4
ul_gain_calibration: 78.68
lower_guard_bw: 845
......
......@@ -80,6 +80,8 @@ add_boolean_option(NAS_BUILT_IN_UE False "UE NAS layer present in this
# SECU LIB
################################################################################
set(secu_cn_SRC
${OPENAIR3_DIR}/SECU/curve_25519.c
${OPENAIR3_DIR}/SECU/x963_kdf.c
${OPENAIR3_DIR}/SECU/aes_128_ctr.c
${OPENAIR3_DIR}/SECU/aes_128_cbc_cmac.c
${OPENAIR3_DIR}/SECU/sha_256_hmac.c
......
......@@ -25,6 +25,9 @@
#define NR_NB_SC_PER_RB 12
#define NR_MAX_NUM_LCID 32
#define NR_MAX_NUM_QFI 64
#define MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER 36
#define MAX_NUM_NR_ULSCH_SEGMENTS_PER_LAYER 34
#define NR_MAX_SLOTS_PER_FRAME 160
#define RNTI_NAMES /* see 38.321 Table 7.1-2 RNTI usage */ \
R(TYPE_C_RNTI_) /* Cell RNTI */ \
R(TYPE_CS_RNTI_) /* Configured Scheduling RNTI */ \
......@@ -41,6 +44,11 @@
R(TYPE_TPC_SRS_RNTI_) \
R(TYPE_MCS_C_RNTI_)
/* FFS_NR_TODO it defines ue capability which is the number of slots */
/* - between reception of pdsch and transmission of its acknowlegment (k1) */
/* - between reception of un uplink grant and its related transmission (k2) */
#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (3)
#define R(k) k ,
typedef enum { RNTI_NAMES } nr_rnti_type_t;
#undef R
......
......@@ -2,9 +2,7 @@
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include "openair2/COMMON/phy_messages_def.h"
#include "openair2/COMMON/mac_messages_def.h"
#include "openair2/COMMON/rlc_messages_def.h"
#include "openair2/COMMON/pdcp_messages_def.h"
#include "openair2/COMMON/rrc_messages_def.h"
#include "openair2/COMMON/nas_messages_def.h"
......@@ -13,7 +11,6 @@
#include "openair2/COMMON/m2ap_messages_def.h"
#include "openair2/COMMON/m3ap_messages_def.h"
#include "openair2/COMMON/sctp_messages_def.h"
#include "openair2/COMMON/udp_messages_def.h"
#include "openair2/COMMON/gtpv1_u_messages_def.h"
#include "openair2/COMMON/f1ap_messages_def.h"
#include "openair2/COMMON/e1ap_messages_def.h"
......
......@@ -53,9 +53,7 @@ typedef struct IttiMsgText_s {
char text[];
} IttiMsgText;
#include <openair2/COMMON/phy_messages_types.h>
#include <openair2/COMMON/mac_messages_types.h>
#include <openair2/COMMON/rlc_messages_types.h>
#include <openair2/COMMON/pdcp_messages_types.h>
#include <openair2/COMMON/networkDef.h>
#include <openair2/COMMON/as_message.h>
......@@ -208,7 +206,6 @@ typedef struct IttiMsgText_s {
#include <openair2/COMMON/m2ap_messages_types.h>
#include <openair2/COMMON/m3ap_messages_types.h>
#include <openair2/COMMON/sctp_messages_types.h>
#include <openair2/COMMON/udp_messages_types.h>
#include <openair2/COMMON/gtpv1_u_messages_types.h>
#include <openair2/COMMON/ngap_messages_types.h>
#include <openair2/COMMON/nrppa_messages_types.h>
......@@ -262,18 +259,14 @@ typedef struct {
TASK_DEF(TASK_UNKNOWN, 50) \
TASK_DEF(TASK_TIMER, 10) \
TASK_DEF(TASK_L2L1, 200) \
TASK_DEF(TASK_BM, 200) \
TASK_DEF(TASK_PHY_ENB, 200) \
TASK_DEF(TASK_MAC_GNB, 200) \
TASK_DEF(TASK_RLC_ENB, 200) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, 200) \
TASK_DEF(TASK_PDCP_ENB, 200) \
TASK_DEF(TASK_PDCP_GNB, 200) \
TASK_DEF(TASK_DATA_FORWARDING, 200) \
TASK_DEF(TASK_END_MARKER, 200) \
TASK_DEF(TASK_RRC_ENB, 200) \
TASK_DEF(TASK_RRC_GNB, 200) \
TASK_DEF(TASK_RAL_ENB, 200) \
TASK_DEF(TASK_S1AP, 200) \
TASK_DEF(TASK_NGAP, 200) \
TASK_DEF(TASK_NRPPA, 200) \
......@@ -288,14 +281,12 @@ typedef struct {
TASK_DEF(TASK_GNB_APP, 200) \
TASK_DEF(TASK_MCE_APP, 200) \
TASK_DEF(TASK_MME_APP, 200) \
TASK_DEF(TASK_PHY_UE, 200) \
TASK_DEF(TASK_MAC_UE, 200) \
TASK_DEF(TASK_RLC_UE, 200) \
TASK_DEF(TASK_PDCP_UE, 200) \
TASK_DEF(TASK_RRC_UE, 200) \
TASK_DEF(TASK_RRC_NRUE, 200) \
TASK_DEF(TASK_NAS_UE, 200) \
TASK_DEF(TASK_RAL_UE, 200) \
TASK_DEF(TASK_GTPV1_U, 1000) \
TASK_DEF(TASK_CU_F1, 200) \
TASK_DEF(TASK_DU_F1, 200) \
......
......@@ -33,6 +33,8 @@ typedef struct ShmTDIQChannel_s {
char name[256];
sample_t *tx_iq_data;
sample_t *rx_iq_data;
int nb_tx_ant;
int nb_rx_ant;
bool abort;
} ShmTDIQChannel;
......@@ -61,6 +63,8 @@ ShmTDIQChannel *shm_td_iq_channel_create(const char *name, int num_tx_ant, int n
strncpy(channel->name, name, sizeof(channel->name) - 1);
channel->tx_iq_data = (sample_t *)(shm_ptr + 1);
channel->rx_iq_data = channel->tx_iq_data + tx_buffer_size / sizeof(sample_t);
channel->nb_tx_ant = num_tx_ant;
channel->nb_rx_ant = num_rx_ant;
channel->data = shm_ptr;
channel->type = IQ_CHANNEL_TYPE_SERVER;
pthread_mutexattr_t mutex_attr;
......@@ -113,9 +117,15 @@ ShmTDIQChannel *shm_td_iq_channel_connect(const char *name, int timeout_in_secon
ShmTDIQChannel *channel = calloc_or_fail(1, sizeof(ShmTDIQChannel));
channel->data = shm_ptr;
channel->tx_iq_data = (sample_t *)(shm_ptr + 1);
sample_t *tx_buffer = (sample_t *)(shm_ptr + 1);
size_t tx_buffer_size = CIRCULAR_BUFFER_SIZE * sizeof(sample_t) * channel->data->num_antennas_tx;
channel->rx_iq_data = channel->tx_iq_data + tx_buffer_size / sizeof(sample_t);
sample_t *rx_buffer = tx_buffer + tx_buffer_size / sizeof(sample_t);
// Flip the order between TX and RX to simplify tx/rx functions
channel->tx_iq_data = rx_buffer;
channel->rx_iq_data = tx_buffer;
channel->nb_tx_ant = channel->data->num_antennas_rx;
channel->nb_rx_ant = channel->data->num_antennas_tx;
printf("\033[38;5;208mnb_tx_ant, nb_rx_ant: %d, %d\n\033[0m", channel->nb_tx_ant, channel->nb_rx_ant);
channel->type = IQ_CHANNEL_TYPE_CLIENT;
while (shm_ptr->magic != SHM_MAGIC_NUMBER) {
printf("Waiting for server to initialize shared memory\n");
......@@ -131,6 +141,7 @@ IQChannelErrorType shm_td_iq_channel_tx(ShmTDIQChannel *channel,
int antenna,
const sample_t *tx_iq_data)
{
AssertFatal(antenna < channel->nb_tx_ant, "Invalid antenna index %d num_antennas %d\n", antenna, channel->nb_tx_ant);
ShmTDIQChannelData *data = channel->data;
// timestamp in the past
uint64_t current_time = data->timestamp;
......@@ -142,12 +153,7 @@ IQChannelErrorType shm_td_iq_channel_tx(ShmTDIQChannel *channel,
return CHANNEL_ERROR_TOO_EARLY;
}
sample_t *base_ptr;
if (channel->type == IQ_CHANNEL_TYPE_CLIENT) {
base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
} else {
base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
}
sample_t *base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
uint64_t first_sample = timestamp % CIRCULAR_BUFFER_SIZE;
uint64_t last_sample = first_sample + num_samples - 1;
......@@ -167,6 +173,7 @@ IQChannelErrorType shm_td_iq_channel_rx(ShmTDIQChannel *channel,
int antenna,
sample_t *tx_iq_data)
{
AssertFatal(antenna < channel->nb_rx_ant, "Invalid antenna index %d num_antennas %d\n", antenna, channel->nb_rx_ant);
ShmTDIQChannelData *data = channel->data;
// timestamp in the future
uint64_t current_time = data->timestamp;
......@@ -178,12 +185,7 @@ IQChannelErrorType shm_td_iq_channel_rx(ShmTDIQChannel *channel,
return CHANNEL_ERROR_TOO_LATE;
}
sample_t *base_ptr;
if (channel->type == IQ_CHANNEL_TYPE_CLIENT) {
base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
} else {
base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
}
sample_t *base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
uint64_t first_sample = timestamp % CIRCULAR_BUFFER_SIZE;
uint64_t last_sample = first_sample + num_samples - 1;
......
......@@ -3,8 +3,7 @@
*/
#include <common/utils/simple_executable.h>
#include "thread-pool.h"
#include "notified_fifo.h"
#define SEP "\t"
......
......@@ -94,6 +94,51 @@ char *itoa(int i) {
return strdup(buffer);
}
/****************************************************************************
** **
** Name: digit_string_to_bcd_value() **
** **
** Description: Converts a decimal ASCII coded string into its BCD encoded**
** value. **
** **
** Inputs: bcd_value: Output buffer **
** digit_string: Input digit string **
** size: Size of bcd_value in bytes **
** **
** Outputs: bcd_value: Converted BCD value **
** Return: 0 on success, -1 on error **
** **
***************************************************************************/
int digit_string_to_bcd_value(uint8_t *bcd_value, const char *digit_string, int size)
{
int i;
uint8_t len = strlen(digit_string);
/* Accept even (size*2) or odd (size*2 - 1) digit counts */
if (len < size * 2 - 1 || len > size * 2) {
fprintf(stderr, "the string '%s' should be of length %d or %d\n", digit_string, size * 2 - 1, size * 2);
return -1;
}
for (i = 0; i < size; i++) {
uint8_t low = digit_string[2 * i] - '0';
uint8_t high = (2 * i + 1 < len) ? digit_string[2 * i + 1] - '0' : 0xF;
if (low > 9 || (high > 9 && high != 0xF))
goto error;
bcd_value[i] = (high << 4) | low;
}
return 0;
error:
fprintf(stderr, "the string '%s' is not a valid digit string\n", digit_string);
for (i = 0; i < size; i++)
bcd_value[i] = 0;
return -1;
}
/**
* @brief Convert a version string x.y.z into numbers.
*
......
......@@ -123,6 +123,8 @@ static inline void *malloc_or_fail(size_t size)
int hex_char_to_hex_value (char c);
// Converts an hexadecimal ASCII coded string into its value.**
int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int size);
// Converts a decimal ASCII coded string into its BCD encoded value.
int digit_string_to_bcd_value(uint8_t *bcd_value, const char *digit_string, int size);
/* Map task id to printable name. */
typedef struct {
......
......@@ -78,18 +78,22 @@ The simulation reads values from a named section in the config file.
**Config options in the `uicc` section**:
| Parameter | Description | Default value |
|---------------|-----------------------------------|--------------------------------------------|
| `imsi` | User IMSI | `2089900007487` |
| `nmc_size` | Number of digits in NMC | `2` |
| `key` | Subscription key (Ki) | `fec86ba6eb707ed08905757b1bb44b8f` |
| `opc` | OPc value | `c42449363bbad02b66d16bc975d77cc1` |
| `amf` | AMF value | `8000` |
| `sqn` | Sequence number | `000000` |
| `dnn` | Default DNN (APN) | `oai` |
| `nssai_sst` | NSSAI slice/service type | `1` |
| `nssai_sd` | NSSAI slice differentiator | `0xffffff` |
| `imeisv` | IMEISV string | `6754567890123413` |
| Parameter | Description | Default value |
|------------------------------|-----------------------------------|--------------------------------------------------------------------|
| `imsi` | User IMSI | `2089900007487` |
| `nmc_size` | Number of digits in NMC | `2` |
| `key` | Subscription key (Ki) | `fec86ba6eb707ed08905757b1bb44b8f` |
| `opc` | OPc value | `c42449363bbad02b66d16bc975d77cc1` |
| `amf` | AMF value | `8000` |
| `sqn` | Sequence number | `000000` |
| `dnn` | Default DNN (APN) | `oai` |
| `nssai_sst` | NSSAI slice/service type | `1` |
| `nssai_sd` | NSSAI slice differentiator | `0xffffff` |
| `imeisv` | IMEISV string | `6754567890123413` |
| `routing_indicator` | Routing Indicator | `0000` |
| `protection_scheme` | SUCI Profile Scheme | `0` |
| `home_network_public_key_id` | Home Network Public Key ID | `1` |
| `home_network_public_key` | Home Network Public Key | `5a8d38864820197c3394b92613b20b91633cbd897119273bf8e4a6f4eec0a650` |
These are parsed and stored in the `uicc_t` structure.
......@@ -116,3 +120,37 @@ The **IMEISV**, is encoded using the `fill_imeisv()` helper. This function extra
See TS 24.501 §4.4 for reference.
#### SUCI (Subscription Concealed Identifier)
The **SUCI**, is generated using the `fill_suci()` helper. This function extracts the MCC, MNC, and MSIN from the configured `imsi` with the use of `nmc_size` in the UICC context and populates the mobile identity structure.
Contains:
* MCC and MNC (public network identity)
* Routing Indicator
* Protection Scheme ID
* Home Network Public Key ID
* Concealed or clear MSIN depending on the protection scheme
If the UE is unable to generate SUCI due to configuration or crypto limitations, the UE will fail to generate a `Registration Request`.
###### 0. Null Scheme (TS 33.501 §C.2)
MSIN in cleartext.
###### 1. Profile A (TS 33.501 §C.3.4.1)
MSIN is concealed using elliptic curve cryptography.
Based on:
* Curve25519 for key agreement
* X9.63 KDF for key derivation
(requires OpenSSL ≥ 3.0)
###### 2. Profile B (TS 33.501 §C.3.4.2)
MSIN is concealed using elliptic curve cryptography.
Based on:
* P-256 for key agreement
* X9.63 KDF for key derivation
(currently not supported)
......@@ -2,9 +2,9 @@
# OAI Build Procedures
[[_TOC_]]
This page describes how to build OAI.
This page is valid on tags starting from **`2019.w09`**.
[[_TOC_]]
## Overview
......@@ -12,7 +12,11 @@ The [OAI EPC](https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/do
OAI softmodem sources, which aim to implement 3GPP compliant UEs, eNodeB and gNodeB can be downloaded from the Eurecom [gitlab repository](./GET_SOURCES.md).
Sources come with a build script [build_oai](../cmake_targets/build_oai) located at the root of the `openairinterface5g/cmake_targets` directory. This script is developed to build the oai binaries (executables,shared libraries) for different hardware platforms, and use cases.
The historically convential way to build OAI is
[build_oai](../cmake_targets/build_oai) located at the root of the
`openairinterface5g/cmake_targets` directory. This script is developed to build
the oai binaries (executables,shared libraries) for different hardware
platforms, and use cases, and is a wrapper on top of `cmake`.
The main oai binaries, which are tested by the Continuous Integration process are:
......@@ -39,6 +43,81 @@ The oai softmodem supports many use cases, and new ones are regularly added. Mos
- s1, noS1
- all simulators as the rfsimulator, the L2 simulator, with exception of PHY simulators, which are distinct executables.
## Dependencies
TODO.
## Running `cmake` directly
As mentioned, `build_oai` is a wrapper on top of `cmake`. It is therefore
possible, and now recommended, to run `cmake` directly. To build all of OAI in
a default install:
```
cd openairinterface5g
mkdir build
cd build
cmake .. -GNinja
ninja
```
Alternatively, let cmake generate the directory:
```
cd openairinterface5g
cmake -B build -G Ninja
cmake --build build
```
To build additional libraries, e.g., telnetsrv, do the following:
```bash
cmake .. -GNinja -DENABLE_TELNETSRV=ON
ninja telnetsrv
```
A list of all libraries can be seen using `ccmake ..` or `cmake-gui ..`.
The default target directory of `build_oai` is the following, for historical
reasons:
```bash
cd openairinterface5g/cmake_targets/ran_build/build
cmake ../../.. -GNinja
ccmake ../../..
cmake-gui ../../..
```
You can of course use all standard cmake/ninja/make commands in this directory,
assuming you already build with `build_oai`. For instance, to compile sources
after modifying the code, do
```
cd cmake_targets/ran_build/build
ninja
```
### cmake presets
CMake presets are common project configure options. See [here](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).
Configure presets:
- `default`: Configure compilation with default options
- `tests`: Same as above but `ENABLE_TESTS` and `SANITIZE_ADDRESS` is ON
Build presets:
- `5gdefault`: Build the software for NR rfsimulator test
- `default`: same as 5gdefault
- `4gdefault`: Build the software for LTE rfsimulator test
- `tests`: build all unit tests
To configure using configuration preset:
cmake --preset <preset_name>
To build using a build preset:
cmake --build --preset <preset_name>
## Running `build_oai`
### List of options
......@@ -176,60 +255,6 @@ Some libraries have further dependencies and might not build on every system:
- `websrv`: npm and others
- `ldpc_aal`: DPDK with patch
## Running `cmake` directly
`build_oai` is a wrapper on top of `cmake`. It is therefore possible to run `cmake` directly. An example using `ninja`: to build all "main targets" for 5G, excluding additional libraries:
```
cd openairinterface5g
mkdir build && cd build
cmake .. -GNinja && ninja nr-softmodem nr-uesoftmodem nr-cuup params_libconfig coding rfsimulator ldpc
```
To build additional libraries, e.g., telnetsrv, do the following:
```bash
cmake .. -GNinja -DENABLE_TELNETSRV=ON && ninja telnetsrv
```
A list of all libraries can be seen using `ccmake ..` or `cmake-gui ..`.
It is currently not possible to build all targets in the form of `cmake ..
-GNinja && ninja`: currently, SDRs are always exposed, even if you don't have
the dependencies, and some targets are simply broken. Again, `build_oai` list
all targets that it builds, and you can use them with `ninja`
The default target directory of `build_oai` is the following, for historical reasons:
```bash
cd openairinterface5g/cmake_targets/ran_build/build
cmake ../../.. -GNinja
ccmake ../../..
cmake-gui ../../..
```
You can of course use all standard cmake/ninja/make commands in this directory.
### cmake presets
CMake presets are common project configure options. See [here](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).
Configure presets:
- `default`: Configure compilation with default options
- `tests`: Same as above but ENABLE_TESTS and SANITIZE_ADDRESS is ON
Build presets:
- `5gdefault`: Build the software for NR rfsimulator test
- `default`: same as 5gdefault
- `4gdefault`: Build the software for LTE rfsimulator test
- `tests`: build all unit tests
To configure using configuration preset:
cmake --preset <preset_name>
To build using a build preset:
cmake --build --preset <preset_name>
## Cross Compile
If you want to use cross-compiler on x86 platform for aarch64 version, please refer the [cross-compile.md](./cross-compile.md) for more information.
......
......@@ -1066,6 +1066,8 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NGAP/ngap_gNB_overload.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NGAP/ngap_gNB_default_values.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/secu_defs.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/curve_25519.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/x963_kdf.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/sha_256_hmac.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/nas_stream_eea0.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/aes_128_ecb.h \
......@@ -1088,6 +1090,8 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/aes_128_ctr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/nas_stream_eia2.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/snow3g.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/curve_25519.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/x963_kdf.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/sha_256_hmac.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/aes_128_cbc_cmac.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/nas_stream_eia1.c \
......@@ -1797,34 +1801,27 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/pdcp_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/mac_rrc_primitives.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/ngap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rlc_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/m3ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/sctp_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/x2ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/commonDef.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/udp_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/nas_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/sctp_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../common/platform_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/ngap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/gtpv1_u_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rlc_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/e1ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/phy_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/s1ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/networkDef.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/f1ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/mac_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/udp_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/gtpv1_u_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/s1ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rrc_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/e1ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/m3ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/phy_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/x2ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/mac_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/openair_defs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/as_message.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/nas_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/pdcp_messages_types.h \
......
......@@ -305,7 +305,6 @@ Example configuration snippet:
...
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 180;
......@@ -322,7 +321,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
......
......@@ -201,7 +201,7 @@ With devices like the USRP N300 and especially the X300, there is noise in the D
There are two possible solution that can be enabled in OAI:
* `--tune-offset`: it consists in shifting away the operational bandwidth to avoid the center frequency
* `ul_prbblacklist`: can be used to define specific PRBs that should not be used for uplink scheduling
* `gNBs.[0].ul_prbblacklist`: can be used to define specific PRBs that should not be used for uplink scheduling
A spectrum clean from the noisy PRBs will eventually result in an enhanced UL throughput.
......
......@@ -179,39 +179,23 @@ uicc0 = {
}
```
| **Parameter** | **Description** | **Default Value** |
|---------------|-----------------|-------------------|
| **IMSI** | Unique identifier for the UE within the mobile network. Used by the network to identify the UE during authentication. It ensures that the UE is correctly identified by the network. | 001010000000001 |
| **key** | Cryptographic key shared between the UE and the network, used for encryption during the authentication process. | `fec86ba6eb707ed08905757b1bb44b8f` |
| **OPC** | Operator key for the Milenage Authentication and Key Agreement algorithm used for encryption during the authentication process. | Ensures secure communication between the UE and the network by matching the encryption keys. | `C42449363BBAD02B66D16BC975D77CC1` |
| **DNN** | _Deprecated_: Specifies the name of the data network the UE wishes to connect to, similar to an APN in 4G networks. | `oai` |
| **NSSAI** | _Deprecated_: Allows the UE to select the appropriate network slice, which provides different QoS. | `1` |
| **pdu_sessions** | list of PDU sessions to request | empty array (no PDU session) |
Further information about the meaning of these parameters is described in the
[dedicated nrUE configuration page](./runmodem-nrue.md).
Note that DNN and NSSAI parameters are deprecated, and `pdu_sessions` should be
used. If the `pdu_sessions` array is present, DNN and NSSAI are ignored.
Each element within the `pdu_sessions` array takes the following parameters.
Multiple PDU sessions can be requested.
| **Parameter** | **Description** | **Default Value** |
|---------------|-----------------|-------------------|
| `id` | ID of the PDU session to request | index of the current element (1..16) |
| `type` | Type of the PDU session to request (allowed: `IPv4`, `IPv6`, `IPv4v6`, `Ethernet` | `IPv4` |
| `dnn` | Specifies the name of the data network the UE wishes to connect to | `oai` |
| `nssai_sst` | Slice Service Type to request (1=eMBB, 2=URLLC, 3=mMTC) | `1` |
| `nssai_sd` | Slice Differentiator to request | `0xffffff` (meaning "no SD") |
The UE configuration must match the one of the network's AMF. The nrUE can connect by default to OAI CN5G with no need to provide the configuration file.
When running the `nr-uesoftmodem`, one can specify the nrUE configuration file using the `-O` option. E.g.:
The UE configuration must match the one of the network's AMF. When running the
`nr-uesoftmodem`, one can specify the nrUE configuration file using the `-O`
option. E.g.:
```bash
sudo ./nr-uesoftmodem --rfsim --rfsimulator.[0].serveraddr 127.0.0.1 -r 106 --numerology 1 --band 78 -C 3619200000 -O ~/nrue.uicc.conf
```
The CL option `--uicc0.imsi` can override the IMSI value in the configuration file if necessary (e.g. when running multiple UEs): `--uicc0.imsi 001010000000001`.
More details available at [ci-scripts/yaml_files/5g_rfsimulator/README.md](../ci-scripts/yaml_files/5g_rfsimulator/README.md).
The command line option `--uicc0.imsi` can override the IMSI value in the
configuration file if necessary (e.g. when running multiple UEs): `--uicc0.imsi
001010000000001`.
More details can also be found at
[ci-scripts/yaml_files/5g_rfsimulator/README.md](../ci-scripts/yaml_files/5g_rfsimulator/README.md).
**Note:** From tag `2024.w45`, OAI nrUE runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).
......
......@@ -378,7 +378,7 @@ Download ORAN FHI DU library, checkout the correct version, and apply the correc
#### F release
```bash
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
git clone https://github.com/openairinterface/o-du-phy.git ~/phy
cd ~/phy
git checkout oran_f_release_v1.0
git apply ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch
......
......@@ -18,10 +18,6 @@ Beware if you previously pulled the `develop` branch that your repository may be
- [FEATURE_SET.md](./FEATURE_SET.md): lists supported features
- [GET_SOURCES.md](./GET_SOURCES.md): how to download the sources
- [BUILD.md](./BUILD.md): how to build the sources
- [code-style-contrib.md](./code-style-contrib.md): overall working practices, code style, and review process
- [cross-compile.md](./cross-compile.md): how to cross-compile OAI for ARM
- [clang-format.md](./clang-format.md): how to format the code
- [sanitizers.md](./dev_tools/sanitizers.md): how to run with ASan/UBSan/MemSAN/TSan
- [environment-variables.md](./environment-variables.md): the environment variables used by OAI
- [tuning_and_security.md](./tuning_and_security.md): performance and security considerations
......@@ -34,20 +30,21 @@ There is some general information in the [OpenAirInterface Gitlab Wiki](https://
* [OAI gNB with COTS UE](./NR_SA_Tutorial_COTS_UE.md)
* [OAI NR-UE](./NR_SA_Tutorial_OAI_nrUE.md)
* [Multiple OAI NR-UE with RFsimulator](./NR_SA_Tutorial_OAI_multi_UE.md)
- [RUNMODEM.md](./RUNMODEM.md): Generic information on how to
- [RUNMODEM.md](./RUNMODEM.md): Information on how to run the gNB
* Run simulators
* Run with hardware
* Specific OAI modes (phy-test, do-ra, noS1)
* (5G) Using SDAP and custom DRBs
* IF setups and arbitrary frequencies
* MIMO
- [nrUE-specific configuration and modes](./runmodem-nrue.md)
* Specific OAI modes (phy-test, do-ra, noS1)
- [How to run OAI with O-RAN 7.2 FHI](./ORAN_FHI7.2_Tutorial.md)
- [How to run a 5G-NSA setup](./TESTING_OAI_NSA_COTS_UE.md)
- [How to run a 4G setup using L1 simulator](./L1SIM.md) _Note: we recommend the RFsimulator_
- [How to use the L2 simulator](./L2NFAPI.md)
- [How to use the OAI channel simulator](../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md)
- [How to run an NTN setup](./ntn-configuration.md)
- [How to use GPU-accelerated channel simulation](../openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md)
- [How to use multiple BWPs](./RUN_NR_multiple_BWPs.md)
- [How to run OAI-VNF and OAI-PNF](./nfapi.md): how to run the FAPI/nFAPI split,
including some general remarks on FAPI/nFAPI.
- [How to use the positioning reference signal (PRS)](./RUN_NR_PRS.md)
......@@ -133,7 +130,13 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
## Developer tools
- [code-style-contrib.md](./code-style-contrib.md): overall working practices, code style, and review process
- [cross-compile.md](./cross-compile.md): how to cross-compile OAI for ARM
- [clang-format.md](./clang-format.md): how to format the code. See also the
next entry for an error detection tool.
- [formatting](../tools/formatting/README.md) is a clang-format error detection tool
- [sanitizers.md](./dev_tools/sanitizers.md): how to run with ASan/UBSan/MemSAN/TSan
- [iwyu](../tools/iwyu/README.md) is a tool to detect `#include` errors
- [docker-dev-env](../tools/docker-dev-env/README.md) is a ubuntu24 docker development environment
- [performance analysis with tracy](./dev_tools/tracy.md)
- [doc_best_practices.md](./doc_best_practices.md): overall best practices for writing documentations
This diff is collapsed.
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
STATUS 2020/10/15 : added External Resources section and links
# How to run an NSA setup with eNB/gNB
**Table of Contents**
This page details how to run an non-standalone (NSA) setup, using an eNB and
gNB (both OAI). It might be outdated, but still contains valuable information.
[[_TOC_]]
......@@ -227,6 +228,7 @@ Execute:
```
You should see the X2 messages in Wireshark and at the eNB.
## Test Case
......
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Performance analysis with the Tracy profiler
[[_TOC_]]
## Overview
From the Tracy manual:
> Tracy is a real-time, nanosecond resolution hybrid frame and sampling
> profiler that you can use for remote or embedded telemetry of games and other
> applications. It can profile CPU, GPU, memory allocations, locks, context
> switches, [...]
- Sources are on [Github](https://github.com/wolfpld/tracy)
- There is a [web demo](https://tracy.nereid.pl/)
- You can [watch an intro video](https://youtu.be/ghXk3Bk5F2U?t=37)
- You can [read the manual](https://github.com/wolfpld/tracy/releases/download/v0.13.1/tracy.pdf)
## OAI Integration
To enable Tracy, compile `-DTRACY_ENABLE=ON` in cmake. Note that `build_oai`
has no native switch, but you can use `--cmake-opt -DTRACY_ENABLE=ON` instead.
Furthermore, you will need the Tracy profiler:
- Windows hosts: There is a precompiled `tracy-profiler.exe` on Github
- Linux hosts: Compile tracy-profiler from source as described in the manual.
Start the OAI executable you want to profile. Then, open the profiler, and
click on connect to connect to the executable.
It is also possible to collect data from within docker containers:
- Open port 8086.
- To collect CPU data, make sure that you run docker with `--privileged --mount
"type=bind,source=/sys/kernel/debug,target=/sys/kernel/debug,readonly" --user
0:0 --pid=host` or provide the corresponding options in docker-compose.
## Instrumentation
Instrumentation is done via the header `common/instrumentation.h`. A couple of
places in OAI have been instrumented already, search for the macros mentioned
in `common/instrumentation.h`.
In short, main features already in use:
- Measure specific code regions by surrounding them with `TracyCZone(ctx, true);`
and `TracyCZoneEnd(ctx);`.
- Record individual "Tracy frames" (in the OAI context, that's likely one 4G/5G
slot) with `TracyCFrameMark;`
- Plot values using `TracyCPlot(name, val);`
More information about these macros can be found in the manual.
Make sure to link `utils` into the static library you are modifying to get
tracy header definitions.
......@@ -160,7 +160,7 @@ patch is available [here](../cmake_targets/tools/install_wls_lib.patch)
Clone the code and apply the patch
git clone -b oran_f_release https://gerrit.o-ran-sc.org/r/o-du/phy.git
git clone -b oran_f_release https://github.com/openairinterface/o-du-phy.git
cd phy/wls_lib/
git apply ~/openairinterface5g/cmake_targets/tools/install_wls_lib.patch
......
This diff is collapsed.
......@@ -19,6 +19,7 @@ Physims are essential for:
* Debugging and evaluating new PHY code in isolation
* Regression testing
* Ensuring correctness before merging new contributions into the repository
* Performance measurements
These tests are run automatically as part of the following
pipelines:
......@@ -54,9 +55,11 @@ Example:
openair1/SIMULATION/NR_PHY/dlsim.c
```
The actual tests are defined in `openair1/SIMULATION/tests/CMakeLists.txt`.
## How to Run Simulators Using `ctest`
### Option 1: Using CMake
### Option 1: Using CMake (Recommended)
Build the simulators and tests using the dedicated cmake option, then run
`ctest` which will run all registered tests.
......@@ -102,6 +105,65 @@ parallel, type
ctest -L nr_ulschsim -j 4
Or you run all 5G tests that `-R` pattern-match on a `dl` pattern:
ctest -R nr_dl
Or you can see the test parameters that would be run for `nr_ulsim` without
actually running the tests
ctest -R nr_ulsim -N -V
Note that the lines `Test command:` show the actual shell code that will be
executed. For increased flexibility, tests are run indirectly through a cmake
script `openair1/SIMULATION/tests/RunTimedTest.cmake` that not only runs the
test, but can also analyze its output. The actual command is passed via a
variable `TEST_CMD` that lists the executable and parameters as a semicolon
(`;`) delimited list. See further below for an example of how to read this.
## Performance evaluation
Some simulators, notably `nr_dlsim` and `nr_ulsim`, provide the possibility to
show performance metrics via option `-P`.
To discover predefined tests, you can search for test cases that define `-P`
like so (note the leading `;` to limit to the test case executable command line
as `-P` is also used by the cmake scripts themselves):
$ ctest -N -V | grep Test\ command: | grep -- ';-P' | tail -n1
213: Test command: /usr/bin/cmake "-DTEST_CMD=/home/richie/oai/build/nr_ulsim;-P;-n300;-b14;-I15;-i;0,1;-g;C,l;-t70;-u;1;-m16;-R106;-r106;-U;1,1,1,2;-W2;-y2;-z4;-s11.2;-S11.2" "-DCHECK_SCRIPT=/home/richie/oai/openair1/SIMULATION/tests/analyze-timing.sh" "-P" "/home/richie/oai/openair1/SIMULATION/tests/RunTimedTest.cmake"
From this, we see that the tests can be run like so, in the same directory as
cmake:
./nr_ulsim -P -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s11.2 -S11.2
After invoking the tests, you should see processing times for UE TX and gNB RX:
```
UE TX
|__ PHY_PROC_TX 246.01 us (300 trials) ( 73.80 total [ms])
[...]
gNB RX
Total PHY proc rx 2587.88 us (300 trials)
Statistics std=301.10, median=0.00, q1=0.00, q3=0.00 µs (on 0 trials)
|__ RX PUSCH time 875.68 us (300 trials) (262.70 total [ms])
```
You can see average per-trial processing time in micro-seconds, and the total
test times for the 300 trials (`-n`) in milliseconds.
Use `grep` to find the places where these stats are printed, and to see which
variable in the stacks traces the measurement. For `RX PUSCH time`, we can
identify the variable `rx_pusch_stats`:
```
$ git grep -n 'RX PUSCH time' ../
../openair1/SIMULATION/NR_PHY/ulsim.c:1714: printStatIndent(&gNB->rx_pusch_stats, "RX PUSCH time");
```
## Adding a New Physim Test
To define a new test or modify existing ones, update the following file:
......
This diff is collapsed.
......@@ -183,7 +183,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
......@@ -191,7 +190,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
......
......@@ -36,7 +36,7 @@ RUN wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz && \
ninja install -C build
## Build Fronthaul library
RUN git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git /opt/phy && \
RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \
git checkout oran_f_release_v1.0 &&\
git apply /oai-ran/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch && \
......
......@@ -23,7 +23,7 @@ RUN wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz && \
ninja install -C build
## Build Fronthaul library
RUN git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git /opt/phy && \
RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \
git checkout oran_f_release_v1.0 &&\
git apply /oai-ran/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch && \
......
......@@ -36,7 +36,7 @@ RUN wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz && \
ninja install -C build
## Build Fronthaul library
RUN git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git /opt/phy && \
RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \
git checkout oran_f_release_v1.0 &&\
git apply /oai-ran/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch && \
......
......@@ -300,8 +300,6 @@ void init_UE(int nb_inst,
UE_thread,
(void *)UE), "");
}
printf("UE threads created by %ld\n", gettid());
}
// Initiating all UEs within a single set of threads for PHY_STUB. Future extensions -> multiple
......
......@@ -22,7 +22,6 @@
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/types.h"
#include "PHY/defs_nr_common.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
......@@ -982,7 +981,7 @@ void *ru_thread(void *param)
// Do PRACH RU processing
prach_item_t *p =
find_nr_prach(&gNB->prach_list, proc->frame_rx, proc->tti_rx, gNB->frame_parms.nb_antennas_rx, SEARCH_EXIST);
find_nr_prach(&gNB->prach_list, proc->frame_rx, proc->tti_rx, gNB->frame_parms.nb_antennas_rx, NR_SEARCH_EXIST);
if (p) {
// need to extract RACH data for later processing by rx_nr_prach()
rx_nr_prach_ru(p, ru->common.rxdata, ru->nr_frame_parms, ru->N_TA_offset);
......@@ -1016,7 +1015,6 @@ int nr_start_if(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB) {
for (int i = 0; i < ru->nb_rx; i++)
ru->openair0_cfg.rxbase[i] = ru->common.rxdata[i];
ru->openair0_cfg.rxsize = ru->nr_frame_parms->samples_per_subframe*10;
reset_meas(&ru->ifdevice.tx_fhaul);
return ru->ifdevice.trx_start_func(&ru->ifdevice);
}
......
......@@ -30,7 +30,6 @@
#include <sys/sysinfo.h>
#include "radio/COMMON/common_lib.h"
#include "assertions.h"
#include "PHY/types.h"
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n"
......
......@@ -55,7 +55,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "gnb_paramdef.h"
#include "intertask_interface.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "nfapi_interface.h"
#include "nfapi_nr_interface_scf.h"
#include "ngap_gNB.h"
#include "nr-softmodem-common.h"
......@@ -595,7 +594,6 @@ int main( int argc, char **argv ) {
: TIME_SOURCE_REALTIME);
// start the main threads
number_of_cards = 1;
wait_gNBs();
int sl_ahead = NFAPI_MODE == NFAPI_MODE_AERIAL ? 0 : 6;
......
......@@ -5,6 +5,8 @@
#include "nr-ue-ru.h"
#include "nr-uesoftmodem.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "common/config/config_paramdesc.h"
#include "common/config/config_userapi.h"
/* NR UE RU configuration section name */
#define CONFIG_STRING_NRUE_RU_LIST "RUs"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment