Compare commits

..

2 Commits

Author SHA1 Message Date
Bartosz Podrygajlo
91e754301f Better stubs for test_nr_ue_ra_procedures 2026-03-30 10:30:15 +02:00
francescomani
aff1911074 pre-store pucch_ResourceCommon to avoid segfault in scheduling PUCCH at UE 2026-03-30 09:55:17 +02:00
494 changed files with 3979 additions and 5442 deletions

View File

@@ -674,8 +674,6 @@ 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
@@ -1913,7 +1911,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 SECURITY)
target_link_libraries(nr-uesoftmodem PRIVATE nr_nas lib_uicc usim_lib)
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

10
NOTICE
View File

@@ -1,10 +1,10 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
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".
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).
For more details of the license, refer to the `LICENSES` directory for a list
of preferred and exceptionally-applied licenses.

View File

@@ -40,18 +40,7 @@ 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).
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)
Please see [NOTICE](NOTICE.md) for other licenses which are used in the software.
# Where to Start #

View File

@@ -34,7 +34,9 @@ pipeline {
stage ("Verify Parameters") {
steps {
script {
env.JOB_TIMESTAMP = sh(returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"').trim()
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
@@ -110,23 +112,6 @@ 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} }
@@ -870,22 +855,25 @@ pipeline {
// ---- Slave Job functions
def triggerSlaveJob (jobName, gitlabStatusName) {
def MR_NUMBER = "MERGE".equals(env.gitlabActionType) ? env.gitlabMergeRequestIid : 'develop'
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
def localStatus = build job: jobName,
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
def localResult = localStatus.getResult()
localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
@@ -911,11 +899,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
def localStatus = build job: jobName,
localStatus = build job: jobName,
parameters: [
string(name: 'FULL_RAN_TAG', value: String.valueOf(fullRanTag))
], propagate: false
def localResult = localStatus.getResult()
localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
@@ -926,6 +914,34 @@ 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
@@ -941,7 +957,7 @@ def finalizeSlaveJob(jobName) {
filter: 'test_results*.html',
selector: lastCompleted())
if (fileExists(fileName)) {
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${env.JOB_TIMESTAMP}#' ${fileName}"
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
} else {
sh "echo \"could not copy results from ${jobName}, please check pipeline ${BUILD_URL}\" > ${fileName}"
}

View File

@@ -1,103 +0,0 @@
#!/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}
"""
}
}
}
}

View File

@@ -143,7 +143,7 @@ ltebox-nano:
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
- "sleep 1"
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
- "sleep 2"
- "sleep 1"
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
@@ -154,7 +154,7 @@ sabox-nepes:
- "sudo su -c 'screen -dm -S simulated_5g_hss /opt/hss_sim0609/start_5g_hss'"
- "sleep 1"
- "sudo /opt/ltebox/tools/start_sabox < /dev/null &> /dev/null"
- "sleep 2"
- "sleep 1"
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{amfLog.0,ngapcLog.0,ngapcommonLog.0,ngapsLog.0,xGwLog.0,upfLog.0} %%log_dir%%"
Undeploy: "sudo /opt/ltebox/tools/stop_sabox; sudo killall screen"
@@ -165,7 +165,7 @@ ltebox-nepes:
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
- "sleep 1"
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
- "sleep 2"
- "sleep 1"
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"

View File

@@ -483,10 +483,10 @@ class Containerize():
HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK)
return False
def BuildRunTests(self, ctx, node, dockerfile, runtime_opt, ctest_opt, HTML):
def BuildRunTests(self, ctx, node, HTML):
lSourcePath = self.eNBSourceCodePath
logging.debug('Building on server: ' + node)
cmd = cls_cmd.getConnection(node)
cmd = cls_cmd.RemoteCmd(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 ci-scripts/{dockerfile} . &> {logfile}')
ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {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 {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}')
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)')
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 .')

View File

@@ -157,6 +157,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "127.0.0.5";
@@ -170,6 +171,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 150;

View File

@@ -162,6 +162,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "192.168.71.171";
@@ -175,6 +176,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 150;

View File

@@ -191,6 +191,7 @@ rlc = {
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "127.0.0.5";
@@ -204,6 +205,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 30;

View File

@@ -156,6 +156,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.19.98";
@@ -170,6 +171,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;

View File

@@ -156,6 +156,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.19.99";
@@ -170,6 +171,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;

View File

@@ -2,6 +2,7 @@
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

View File

@@ -4,6 +4,7 @@ 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

View File

@@ -173,11 +173,14 @@ 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;

View File

@@ -175,11 +175,14 @@ 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;

View File

@@ -180,10 +180,13 @@ 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;

View File

@@ -180,10 +180,13 @@ 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;

View File

@@ -179,10 +179,13 @@ 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;

View File

@@ -161,6 +161,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -168,6 +169,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}

View File

@@ -173,6 +173,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
@@ -183,6 +184,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120
pucch0_dtx_threshold = 80;

View File

@@ -173,6 +173,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -180,6 +181,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);

View File

@@ -173,6 +173,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -180,6 +181,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);

View File

@@ -170,11 +170,13 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
});
L1s = ({
num_cc = 1;
tr_n_preference = "local_mac";
});

View File

@@ -172,11 +172,13 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
});
L1s = ({
num_cc = 1;
tr_n_preference = "local_mac";
});

View File

@@ -180,6 +180,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -189,6 +190,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}

View File

@@ -197,6 +197,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -208,6 +209,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;

View File

@@ -205,6 +205,7 @@ rlc = {
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -216,6 +217,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;

View File

@@ -172,6 +172,7 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -184,6 +185,7 @@ MACRLCs = ({
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
#pucch0_dtx_threshold = 120;

View File

@@ -172,6 +172,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100;
@@ -182,6 +183,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 200;

View File

@@ -178,6 +178,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 320;
@@ -191,6 +192,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pusch_dtx_threshold = 20;

View File

@@ -174,6 +174,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -184,6 +185,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 130
pucch0_dtx_threshold = 80;

View File

@@ -171,6 +171,7 @@ gNBs = (
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 320;
@@ -184,6 +185,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
max_ldpc_iterations = 15;

View File

@@ -171,6 +171,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -181,6 +182,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -174,6 +174,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -183,6 +184,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
#pucch0_dtx_threshold = 150;

View File

@@ -176,6 +176,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -185,6 +186,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;

View File

@@ -166,6 +166,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -175,6 +176,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;

View File

@@ -174,6 +174,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 250;
@@ -183,6 +184,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -167,6 +167,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -196,6 +197,7 @@ prs_config = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
}

View File

@@ -143,14 +143,16 @@ gNBs:
MACRLCs:
- tr_s_preference: local_L1
- num_cc: 1
tr_s_preference: local_L1
tr_n_preference: local_RRC
pusch_TargetSNRx10: 200
pucch_TargetSNRx10: 200
stats_max_ue: 17
L1s:
- tr_n_preference: local_mac
- num_cc: 1
tr_n_preference: local_mac
prach_dtx_threshold: 200
# pucch0_dtx_threshold = 150;

View File

@@ -178,6 +178,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -188,6 +189,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 30;

View File

@@ -146,13 +146,15 @@ gNBs:
MACRLCs:
- tr_s_preference: local_L1
- num_cc: 1
tr_s_preference: local_L1
tr_n_preference: local_RRC
pusch_TargetSNRx10: 200
pucch_TargetSNRx10: 200
L1s:
- tr_n_preference: local_mac
- num_cc: 1
tr_n_preference: local_mac
prach_dtx_threshold: 200
# pucch0_dtx_threshold = 150;

View File

@@ -169,6 +169,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -178,6 +179,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 120;

View File

@@ -173,6 +173,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -180,6 +181,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
tx_amp_backoff_dB = 30;

View File

@@ -177,6 +177,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -186,6 +187,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 50;

View File

@@ -179,6 +179,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -189,6 +190,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 50;

View File

@@ -168,6 +168,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -178,6 +179,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -19,6 +19,7 @@ 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";

View File

@@ -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

View File

@@ -203,7 +203,9 @@ 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";

View File

@@ -189,7 +189,9 @@ 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";
}

View File

@@ -177,7 +177,9 @@ 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";
}

View File

@@ -188,6 +188,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -197,6 +198,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;

View File

@@ -184,6 +184,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -193,6 +194,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
}

View File

@@ -192,6 +192,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -201,6 +202,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;

View File

@@ -179,6 +179,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -188,6 +189,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}

View File

@@ -183,6 +183,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -192,6 +193,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);

View File

@@ -184,6 +184,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -191,6 +192,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 80;

View File

@@ -172,6 +172,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100;
@@ -182,6 +183,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 200;

View File

@@ -175,6 +175,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
@@ -184,6 +185,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;

View File

@@ -188,6 +188,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
@@ -197,6 +198,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;

View File

@@ -189,6 +189,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
# pusch_TargetSNRx10 = 200;
@@ -198,6 +199,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
# pucch0_dtx_threshold = 150;

View File

@@ -167,6 +167,7 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -177,6 +178,7 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -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
ninja test_channel_scalability test_multipath test_noise

View File

@@ -1,25 +0,0 @@
# 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

View File

@@ -70,9 +70,6 @@ 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':
@@ -84,7 +81,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, dockerfile, runtime_opt, ctest_opt, HTML)
success = CONTAINERS.BuildRunTests(ctx, node, HTML)
elif action == 'Initialize_eNB':
RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args')

View File

@@ -1,23 +0,0 @@
<!-- 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>

View File

@@ -8,7 +8,6 @@
<testCase>
<class>Build_Run_Tests</class>
<desc>Build and Run UnitTests</desc>
<dockerfile>docker/Dockerfile.unittest.ubuntu</dockerfile>
<node>obelix</node>
</testCase>

View File

@@ -236,7 +236,7 @@ cuphydriver_config:
pusch_ldpc_algo_index: 0
pusch_ldpc_flags: 2
pusch_ldpc_use_half: 1
pusch_nMaxPrb: 78
pusch_nMaxPrb: 273
pusch_nMaxRx: 4
ul_gain_calibration: 78.68
lower_guard_bw: 845

View File

@@ -80,8 +80,6 @@ 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

View File

@@ -4,6 +4,8 @@
# file build_oai
# brief OAI automated build tool that can be used to install, compile, run OAI.
set -e
# Include helper functions
THIS_SCRIPT_PATH=$(dirname $(readlink -f "$0"))
source "$THIS_SCRIPT_PATH"/tools/build_helper
@@ -130,9 +132,16 @@ function main() {
--build-tool-opt)
BUILD_TOOL_OPT+=" $2"
shift 2;;
-c | --clean | -C | --clean-all)
-c | --clean)
CLEAN=1
shift;;
-C | --clean-all)
CLEAN_ALL=1
shift;;
--clean-kernel)
clean_kernel
echo_info "Erased iptables config and removed modules from kernel"
shift;;
--cmake-opt)
CMAKE_CMD="$CMAKE_CMD $2"
shift 2;;
@@ -321,8 +330,8 @@ function main() {
echo_info "Enabling build of all optional shared libraries ($OPTIONAL_LIBRARIES)"
else
for reqlib in $2; do
lib=$(echo $OPTIONAL_LIBRARIES | tr ' ' '\n' | grep -w -- $reqlib) # search given parameter in list
[[ $? -ne 0 ]] && echo_fatal "Unknown optional library \"$reqlib\", valid libraries are: $OPTIONAL_LIBRARIES"
lib=$(echo $OPTIONAL_LIBRARIES | tr ' ' '\n' | grep -w $reqlib) # search given parameter in list
[[ $? -ne 0 ]] && echo_fatal "Unknown optional library in $reqlib, valid libraries are $OPTIONAL_LIBRARIES"
TARGET_LIST="$TARGET_LIST $lib" # will append the found library
CMAKE_CMD="$CMAKE_CMD -DENABLE_${lib^^}=ON"
echo_info "Enabling build of optional shared library $lib"
@@ -375,8 +384,13 @@ function main() {
echo "OPENAIR_DIR = $OPENAIR_DIR"
DIR=$OPENAIR_DIR/cmake_targets
[ "$CLEAN" = "1" ] && rm -rf "$DIR/$BUILD_DIR"
if [ "$CLEAN_ALL" = "1" ] ; then
clean_all_files
echo "Erased all previously producted files"
fi
dlog=$OPENAIR_DIR/cmake_targets/log
mkdir -p $dlog
if [ "$INSTALL_EXTERNAL" = "1" ] ; then
echo_info "Installing packages"
@@ -409,6 +423,10 @@ function main() {
check_install_additional_tools
fi
DIR=$OPENAIR_DIR/cmake_targets
[ "$CLEAN" = "1" ] && rm -rf $DIR/$BUILD_DIR/build
if [[ $TARGET_LIST != "" ]] && [[ -f $OPENAIR_DIR/CMakeLists.txt ]]; then
# add some default libraries that should always be built
# for eNB, gNB, UEs, simulators
@@ -423,10 +441,11 @@ function main() {
# e.g., cmake_targets/ran_build/build, hence the ../../..
CMAKE_CMD="$CMAKE_CMD ../../.."
echo_info "Running \"$CMAKE_CMD\""
eval $CMAKE_CMD || echo_fatal "cmake configuration failed"
eval $CMAKE_CMD
cmd="$CMAKE --build . --target ${TARGET_LIST} -- ${BUILD_TOOL_OPT}"
echo_info "Running \"${cmd}\"" $green
eval $cmd || echo_fatal "build failed"
eval $cmd
ret=$?
if [ "$UE" = 1 ] ; then
echo_info "Generate LTE USIM default sim content UE specific part"

View File

@@ -83,7 +83,7 @@ function(run_asn1c ASN1C_GRAMMAR ASN1C_PREFIX)
get_filename_component(GRAMMAR_FILE ${ASN1C_GRAMMAR} NAME)
set(LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/${GRAMMAR_FILE}.log")
add_custom_command(OUTPUT ${ASN1C_OUTPUT}
COMMAND ASN1C_PREFIX=${ASN1C_PREFIX} ${ASN1C_EXEC} ${ASN1C_OPTIONS} -D ${CMAKE_CURRENT_BINARY_DIR} ${ASN1C_GRAMMAR} > ${LOGFILE} 2>&1 || ( cat ${LOGFILE} && false )
COMMAND ASN1C_PREFIX=${ASN1C_PREFIX} ${ASN1C_EXEC} ${ASN1C_OPTIONS} -D ${CMAKE_CURRENT_BINARY_DIR} ${ASN1C_GRAMMAR} > ${LOGFILE} 2>&1 || cat ${LOGFILE}
DEPENDS ${ASN1C_GRAMMAR}
COMMENT "Generating ${ASN1C_COMMENT} from ${GRAMMAR_FILE}"
)

View File

@@ -120,6 +120,32 @@ handler_EXIT() {
trap handler_EXIT EXIT
###########################
# Cleaners
###########################
clean_kernel() {
$SUDO modprobe ip_tables
$SUDO modprobe x_tables
$SUDO iptables -P INPUT ACCEPT
$SUDO iptables -F INPUT
$SUDO iptables -P OUTPUT ACCEPT
$SUDO iptables -F OUTPUT
$SUDO iptables -P FORWARD ACCEPT
$SUDO iptables -F FORWARD
$SUDO iptables -t nat -F
$SUDO iptables -t mangle -F
$SUDO iptables -t filter -F
$SUDO iptables -t raw -F
echo_info "Flushed iptables"
}
clean_all_files() {
set_openair_env
dir=$OPENAIR_DIR/cmake_targets
rm -rf $dir/ran_build $dir/ran_build_noLOG
}
############################################
# External packages installers
############################################

View File

@@ -133,7 +133,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)
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
{
int status = 0;
@@ -193,7 +193,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)
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
{
int status = 0;
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->dblptr), 1);
@@ -229,7 +229,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)
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
{
int status = 0;
@@ -333,13 +333,13 @@ int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoptio
case TYPE_UINTARRAY:
case TYPE_INTARRAY:
return config_setdefault_intlist(cfg, cfgoption);
return config_setdefault_intlist(cfg, cfgoption, prefix);
case TYPE_DOUBLE:
return config_setdefault_double(cfg, cfgoption);
return config_setdefault_double(cfg, cfgoption, prefix);
case TYPE_IPV4ADDR:
return config_setdefault_ipv4addr(cfg, cfgoption);
return config_setdefault_ipv4addr(cfg, cfgoption, prefix);
case TYPE_LIST:
// No default value for list type

View File

@@ -20,11 +20,11 @@ void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
/* 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);
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);
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions);
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);
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);

View File

@@ -123,10 +123,6 @@ int config_cmdlineonly_getlist(configmodule_interface_t *cfg,
int numparams,
const char *prefix)
{
UNUSED(cfg);
UNUSED(params);
UNUSED(numparams);
UNUSED(prefix);
ParamList->numelt = 0;
return 0;
}
@@ -166,15 +162,15 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
case TYPE_UINTARRAY:
case TYPE_INTARRAY:
defval = config_setdefault_intlist(cfg, &cfgoptions[i]);
defval = config_setdefault_intlist(cfg, &cfgoptions[i], prefix);
break;
case TYPE_DOUBLE:
defval = config_setdefault_double(cfg, &cfgoptions[i]);
defval = config_setdefault_double(cfg, &cfgoptions[i], prefix);
break;
case TYPE_IPV4ADDR:
defval = config_setdefault_ipv4addr(cfg, &cfgoptions[i]);
defval = config_setdefault_ipv4addr(cfg, &cfgoptions[i], prefix);
break;
default:

View File

@@ -177,7 +177,6 @@ void print_intvalueerror(paramdef_t *param, char *fname, int *okval, int numokva
int config_check_intval(configmodule_interface_t *cfg, paramdef_t *param)
{
UNUSED(cfg);
if ( param == NULL ) {
fprintf(stderr,"[CONFIG] config_check_intval: NULL param argument\n");
return -1;
@@ -213,7 +212,6 @@ int config_check_modify_integer(configmodule_interface_t *cfg, paramdef_t *param
int config_check_intrange(configmodule_interface_t *cfg, paramdef_t *param)
{
UNUSED(cfg);
if( *(param->iptr) >= param->chkPptr->s2.okintrange[0] && *(param->iptr) <= param->chkPptr->s2.okintrange[1] ) {
return 0;
}
@@ -236,7 +234,6 @@ void print_strvalueerror(paramdef_t *param, char *fname, char **okval, int numok
int config_check_strval(configmodule_interface_t *cfg, paramdef_t *param)
{
UNUSED(cfg);
if ( param == NULL ) {
fprintf(stderr,"[CONFIG] config_check_strval: NULL param argument\n");
return -1;

View File

@@ -158,7 +158,6 @@ extern "C" int config_yaml_init(configmodule_interface_t *cfg)
extern "C" void config_yaml_end(configmodule_interface_t *cfg)
{
UNUSED(cfg);
delete config_yaml::config;
}

View File

@@ -241,9 +241,6 @@ typedef struct protocol_ctxt_s {
bool brOption;
} protocol_ctxt_t;
/// suppress compiler warning for unused arguments
#define UNUSED(x) (void)x;
#define UE_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD + RC.nb_inst
#define ENB_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD
#define UE_INSTANCE_TO_MODULE_ID(iNSTANCE) iNSTANCE - RC.nb_inst

View File

@@ -519,7 +519,13 @@ void logTerm(void)
}
#include <sys/syscall.h>
static inline int log_header(log_component_t *c, char *log_buffer, int buffsize, const char *func, int line, int level)
static inline int log_header(log_component_t *c,
char *log_buffer,
int buffsize,
const char *file,
const char *func,
int line,
int level)
{
int flag = g_log->flag;
@@ -660,7 +666,7 @@ void log_dump(int component,
if (wbuf != NULL) {
va_start(args, format);
int pos = log_header(c, wbuf, MAX_LOG_TOTAL, "noFunc", 0, OAILOG_INFO);
int pos=log_header(c, wbuf,MAX_LOG_TOTAL,"noFile","noFunc",0, OAILOG_INFO);
pos+=vsprintf(wbuf+pos,format, args);
va_end(args);
@@ -869,8 +875,6 @@ void flush_mem_to_file(void)
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args)
{
UNUSED(comp);
UNUSED(file);
//logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args)
int len = 0;
/* The main difference with the version above is the use of this local log_buffer.
@@ -883,7 +887,7 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
// make sure that for log trace the extra info is only printed once, reset when the level changes
if (level < OAILOG_TRACE) {
int n = log_header(c, log_buffer+len, sizeof(log_buffer), func, line, level);
int n = log_header(c, log_buffer+len, sizeof(log_buffer), file, func, line, level);
if (n > 0) {
len += n;
if (len > sizeof(log_buffer)) {

View File

@@ -14,7 +14,6 @@ It is made of two main parts:
* [Basic usage](./T/basic.md)
* [Record](./T/record.md)
* [Record to ClickHouse](./T/record_db.md)
* [Replay](./T/replay.md)
* [Multiple tracers](./T/multi.md)
* [MAC PDUs and wireshark](./T/wireshark.md)

View File

@@ -1,177 +0,0 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Record to ClickHouse
This document describes the database-backed T tracer. Unlike [`record`](./record.md),
which writes a `.raw` file, `record_db` writes T tracer events
directly into a [ClickHouse database](https://clickhouse.com/docs/intro).
## What `record_db` does
`record_db` connects to a running OAI softmodem instance through
the standard T tracer TCP interface and:
- Enables the selected events
- Creates one ClickHouse table per enabled event
- Batches received rows and inserts them into ClickHouse
Each table always contains:
- `TsSwNs`: software receive timestamp created by `record_db`
If an event has both `frame` and `slot` (or `subframe`) fields, the
tool also adds:
- `TsTxUtcNs`: transmission timestamp reconstructed from frame/slot
The remaining columns come from the event definition in
`T_messages.txt`.
## Build
`record_db` pulls external dependencies (`clickhouse-cpp` and `fmtlog`).
Also make sure you have `libzstd-dev` version > 1.5.X.
From the repository using build_oai:
```shell
cd cmake_targets
./build_oai --gNB --nrUE --cmake-opt -DT_RECORD_DB=ON
```
Or, from an existing build directory using cmake:
```shell
cd cmake_targets/ran_build/build
cmake -DT_RECORD_DB=ON .
make T_tools
```
The binary is then available in:
```shell
cmake_targets/ran_build/build/common/utils/T/tracer/record_db
```
## Prerequisites
- a running ClickHouse server reachable from `record_db`
- an OAI softmodem started with T tracer enabled, typically with `--T_stdout 2`
- the tracer message description file, usually `common/utils/T/T_messages.txt`
By default `record_db` connects to:
- T tracer endpoint: `127.0.0.1:2021`
- ClickHouse native endpoint: `localhost:9000`
- ClickHouse database: `oai`
## Start the softmodem
Start the gNB or UE with T tracer enabled as described in
[basic usage](./basic.md). For example:
```shell
cd cmake_targets/ran_build/build
sudo ./nr-softmodem -O <config-file> --T_stdout 2 --T_nowait
```
Use `--T_port <port>` on the softmodem side if you want a port other
than `2021`, and pass the same value to `record_db` with `-p`.
## Basic example
To enable all events except the most verbose groups and write them to
ClickHouse:
```shell
cd cmake_targets/ran_build/build/common/utils/T/tracer
./record_db -d ../T_messages.txt \
-ON \
-off VCD \
-off HEAVY \
-off LEGACY_GROUP_TRACE \
-off LEGACY_GROUP_DEBUG
```
To stop recording, press `Ctrl-C`. The tool flushes pending buffered
rows before exiting.
## Select specific events
The event selection rules are the same as for [`record`](./record.md):
- `-ON` enables all events
- `-OFF` disables all events
- `-on <GROUP or ID>` enables one group or one event
- `-off <GROUP or ID>` disables one group or one event
These options are processed in order. For example:
```shell
./record_db -d ../T_messages.txt -OFF -on GNB_PHY_UL_FD_PUSCH_IQ -on GNB_PHY_UL_PAYLOAD_RX_BITS
```
This starts from everything disabled and enables only the two listed
events.
## ClickHouse options
`record_db` accepts the following database-related options:
```shell
-ch-host <host> ClickHouse host, default `localhost`
-ch-port <port> ClickHouse native port, default `9000`
-ch-db <database> database name, default `oai`
-ch-user <user> optional ClickHouse user
-ch-pass <password> optional ClickHouse password
-ch-droptables drop the target database before starting
-debug enable debug logging
```
Example using a remote ClickHouse instance:
```shell
./record_db -d ../T_messages.txt \
-ON -off HEAVY \
-ip 192.168.1.10 -p 2021 \
-ch-host 192.168.1.20 -ch-port 9000 -ch-db oai_traces
```
## Inspect the data
Once `record_db` is running, connect to ClickHouse and inspect the
generated tables:
```shell
clickhouse-client --host localhost --port 9000 --query "SHOW TABLES FROM oai"
```
Count rows in one event table:
```shell
clickhouse-client --host localhost --port 9000 --query "SELECT count(*) FROM oai.GNB_PHY_UL_FD_PUSCH_IQ"
```
Inspect the latest samples:
```shell
clickhouse-client --host localhost --port 9000 --query "SELECT * FROM oai.GNB_PHY_UL_FD_PUSCH_IQ ORDER BY TsSwNs DESC LIMIT 5"
```
## Important behavior
- Tables are created only for enabled events.
- Table names match the event names from `T_messages.txt`.
- The current implementation creates tables with ClickHouse
`ENGINE = Memory()`.
- Because of that engine choice, recorded data remains available while
ClickHouse is running, but is not persistent across a ClickHouse
restart.
- If `-ch-droptables` is used, the whole target database is dropped and
recreated before capture starts.
## Get the full option list
```shell
./record_db -h
```

View File

@@ -89,7 +89,6 @@ static int get_message(int s)
static void *T_receive_thread(void *_)
{
UNUSED(_);
int err = 0;
while (!err) err = get_message(T_socket);

View File

@@ -27,10 +27,6 @@
*/
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
UNUSED(file);
UNUSED(function);
UNUSED(line);
UNUSED(s);
if (assert) {
abort();
} else {

View File

@@ -428,7 +428,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
for (i = 0; i < 8; i++)
timeline_set_subline_background_color(g, timeline_plot, i,
new_color(g, i==0 || i==4 ? "#aaf" : "#eee"));
timeview = new_view_time(10, g, timeline_plot);
timeview = new_view_time(3600, 10, g, timeline_plot);
/* DL tick logging */
timelog = new_timelog(h, database, "ENB_PHY_DL_TICK");
subview = new_subview_time(timeview, 0, new_color(g, "#77c"), 3600*1000);

View File

@@ -41,7 +41,6 @@ int eval_eq(struct filter *f, event e)
int eval_int(struct filter *f, event e)
{
UNUSED(e);
return f->v.v;
}
@@ -153,9 +152,9 @@ filter *filter_evarg(void *database, char *event_name, char *varname)
return ret;
}
filter *filter_evfun(void *database, int (*fun)(void *priv, int v), void *priv, filter *x)
filter *filter_evfun(void *database, int (*fun)(void *priv, int v),
void *priv, filter *x)
{
UNUSED(database);
struct filter *ret = calloc(1, sizeof(struct filter));
if (ret == NULL) abort();
ret->eval = eval_evfun;

View File

@@ -13,8 +13,11 @@ filter *filter_and(filter *a, filter *b);
filter *filter_eq(filter *a, filter *b);
filter *filter_int(int v);
filter *filter_evarg(void *database, char *event_name, char *varname);
filter *filter_evfun(void *database, int (*fun)(void *priv, int v), void *priv, filter *x);
filter *filter_evfun(void *database, int (*fun)(void *priv, int v),
void *priv, filter *x);
int filter_eval(filter *f, event e);
void free_filter(filter *f);
#endif /* _FILTER_H_ */

View File

@@ -52,7 +52,8 @@ event_handler *new_handler(void *database)
return ret;
}
unsigned long register_handler_function(event_handler *_h, int event_id, void (*f)(void *, event), void *p)
unsigned long register_handler_function(event_handler *_h, int event_id,
void (*f)(void *, event), void *p)
{
struct _event_handler *h = _h;
unsigned long ret = h->next_id;
@@ -77,11 +78,9 @@ unsigned long register_handler_function(event_handler *_h, int event_id, void (*
return ret;
}
void remove_handler_function(event_handler *h, int event_id, unsigned long handler_id)
void remove_handler_function(event_handler *h, int event_id,
unsigned long handler_id)
{
UNUSED(h);
UNUSED(event_id);
UNUSED(handler_id);
printf("%s:%d: TODO\n", __FILE__, __LINE__);
abort();
}

View File

@@ -11,7 +11,10 @@ typedef void event_handler;
event_handler *new_handler(void *database);
void handle_event(event_handler *h, event e);
unsigned long register_handler_function(event_handler *_h, int event_id, void (*f)(void *, event), void *p);
void remove_handler_function(event_handler *h, int event_id, unsigned long handler_id);
unsigned long register_handler_function(event_handler *_h, int event_id,
void (*f)(void *, event), void *p);
void remove_handler_function(event_handler *h, int event_id,
unsigned long handler_id);
#endif /* _HANDLER_H_ */

View File

@@ -7,7 +7,7 @@
#include "handler.h"
#include "database.h"
#include "view/view.h"
#include "../utils.h"
#include "utils.h"
#include "filter/filter.h"
#include <stdlib.h>
#include <string.h>

View File

@@ -406,7 +406,7 @@ void sr(void *_d, event e)
void trace_nr(struct timespec sending_time, ev_data *d, int direction,
int rnti_type, int rnti, int frame, int slot, int harq_pid, void *buf,
int bufsize)
int bufsize, int preamble)
{
ssize_t ret;
int i;
@@ -475,7 +475,7 @@ void nr_ul(void *_d, event e)
NR_C_RNTI, e.e[d->nr_ul_rnti].i,
e.e[d->nr_ul_frame].i, e.e[d->nr_ul_slot].i,
e.e[d->nr_ul_harq_pid].i, e.e[d->nr_ul_data].b,
e.e[d->nr_ul_data].bsize);
e.e[d->nr_ul_data].bsize, NO_PREAMBLE);
}
void nr_dl(void *_d, event e)
@@ -494,7 +494,7 @@ void nr_dl(void *_d, event e)
e.e[d->nr_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI,
e.e[d->nr_dl_rnti].i, e.e[d->nr_dl_frame].i, e.e[d->nr_dl_slot].i,
e.e[d->nr_dl_harq_pid].i, e.e[d->nr_dl_data].b,
e.e[d->nr_dl_data].bsize);
e.e[d->nr_dl_data].bsize, NO_PREAMBLE);
}
void nr_dl_retx(void *_d, event e)
@@ -505,7 +505,7 @@ void nr_dl_retx(void *_d, event e)
NR_C_RNTI, e.e[d->nr_dl_retx_rnti].i,
e.e[d->nr_dl_retx_frame].i, e.e[d->nr_dl_retx_slot].i,
e.e[d->nr_dl_retx_harq_pid].i, e.e[d->nr_dl_retx_data].b,
e.e[d->nr_dl_retx_data].bsize);
e.e[d->nr_dl_retx_data].bsize, NO_PREAMBLE);
}
void nr_mib(void *_d, event e)
@@ -520,7 +520,7 @@ void nr_mib(void *_d, event e)
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
e.e[d->nr_mib_frame].i, e.e[d->nr_mib_slot].i, 0 /* harq pid */,
e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize);
e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize, NO_PREAMBLE);
}
void nr_ue_mib(void *_d, event e)
@@ -535,7 +535,7 @@ void nr_ue_mib(void *_d, event e)
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
e.e[d->nr_ue_mib_frame].i, e.e[d->nr_ue_mib_slot].i, 0 /* harq pid */,
e.e[d->nr_ue_mib_data].b, e.e[d->nr_ue_mib_data].bsize);
e.e[d->nr_ue_mib_data].b, e.e[d->nr_ue_mib_data].bsize, NO_PREAMBLE);
}
void nr_rar(void *_d, event e)
@@ -545,7 +545,7 @@ void nr_rar(void *_d, event e)
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK,
NR_RA_RNTI, e.e[d->nr_rar_rnti].i,
e.e[d->nr_rar_frame].i, e.e[d->nr_rar_slot].i, 0 /* harq pid */,
e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize);
e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize, NO_PREAMBLE);
}
void nr_ue_ul(void *_d, event e)
@@ -556,7 +556,7 @@ void nr_ue_ul(void *_d, event e)
NR_C_RNTI, e.e[d->nr_ue_ul_rnti].i,
e.e[d->nr_ue_ul_frame].i, e.e[d->nr_ue_ul_slot].i,
e.e[d->nr_ue_ul_harq_pid].i, e.e[d->nr_ue_ul_data].b,
e.e[d->nr_ue_ul_data].bsize);
e.e[d->nr_ue_ul_data].bsize, NO_PREAMBLE);
}
void nr_ue_dl(void *_d, event e)
@@ -575,7 +575,7 @@ void nr_ue_dl(void *_d, event e)
e.e[d->nr_ue_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI,
e.e[d->nr_ue_dl_rnti].i, e.e[d->nr_ue_dl_frame].i,
e.e[d->nr_ue_dl_slot].i, e.e[d->nr_ue_dl_harq_pid].i,
e.e[d->nr_ue_dl_data].b, e.e[d->nr_ue_dl_data].bsize);
e.e[d->nr_ue_dl_data].b, e.e[d->nr_ue_dl_data].bsize, NO_PREAMBLE);
}
void nr_ue_rar(void *_d, event e)
@@ -584,7 +584,8 @@ void nr_ue_rar(void *_d, event e)
trace_nr(e.sending_time, d, DIRECTION_DOWNLINK,
RA_RNTI, e.e[d->nr_ue_rar_rnti].i,
e.e[d->nr_ue_rar_frame].i, e.e[d->nr_ue_rar_slot].i, 0,
e.e[d->nr_ue_rar_data].b, e.e[d->nr_ue_rar_data].bsize);
e.e[d->nr_ue_rar_data].b, e.e[d->nr_ue_rar_data].bsize,
NO_PREAMBLE);
}
/****************************************************************************/
@@ -960,7 +961,7 @@ static int sock = -1;
void force_stop(int x)
{
printf("\ngently quit(%d)...\n", x);
printf("\ngently quit...\n");
close(sock);
sock = -1;
run = 0;

View File

@@ -39,7 +39,7 @@ static int socket = -1;
void force_stop(int x)
{
printf("\ngently quit (%d)...\n", x);
printf("\ngently quit...\n");
close(socket);
socket = -1;
run = 0;

View File

@@ -249,7 +249,7 @@ static int socket_fd = -1;
void force_stop(int x)
{
logi("gently quit %d", x);
logi("gently quit...");
close(socket_fd);
socket_fd = -1;
run = 0;
@@ -785,7 +785,12 @@ uint8_t should_insert(EventBuffer &buf)
return 0;
}
int insert_event(clickhouse_config_t *ch, int event_id, const char *event_data, int data_length)
int insert_event(clickhouse_config_t *ch,
void *database,
int event_id,
const char *event_data,
int data_length,
std::chrono::high_resolution_clock::time_point t_start)
{
auto t_fn_start = std::chrono::high_resolution_clock::now();
@@ -1265,12 +1270,14 @@ int main(int n, char **v)
if (fullread(socket_fd, v + vpos, length) == -1)
goto read_error;
auto t_start = std::chrono::high_resolution_clock::now();
if (type == -1) {
append_received_config_chunk(v + vpos, length);
} else if (type == -2) {
verify_config();
} else if (type >= 0 && type < number_of_events && is_on[type]) {
if (insert_event(&ch_config, type, v + vpos, length) != 0) {
if (insert_event(&ch_config, database, type, v + vpos, length, t_start) != 0) {
loge("Failed to insert event type {}", type);
}
}

View File

@@ -417,7 +417,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
for (i = 0; i < 8; i++)
timeline_set_subline_background_color(g, timeline_plot, i,
new_color(g, i==0 || i==4 ? "#aaf" : "#eee"));
timeview = new_view_time(10, g, timeline_plot);
timeview = new_view_time(3600, 10, g, timeline_plot);
/* DL tick logging */
timelog = new_timelog(h, database, "UE_PHY_DL_TICK");
subview = new_subview_time(timeview, 0, new_color(g, "#77c"), 3600*1000);

View File

@@ -5,8 +5,6 @@
#ifndef _UTILS_H_
#define _UTILS_H_
#define UNUSED(x) (void)x
void new_thread(void *(*f)(void *), void *data);
void sleepms(int ms);
void bps(char *out, float v, char *suffix);

View File

@@ -100,7 +100,7 @@ static void vcd_main_gui(gui *g, event_handler *h, void *database)
for (i = 0; i < nb_functions; i++)
timeline_set_subline_background_color(g, w, i,
new_color(g, i & 1 ? "#ddd" : "#eee"));
timeview = new_view_time(10, g, w);
timeview = new_view_time(3600, 10, g, w);
i = 0;
for (j = 0; j < n; j++) {
if (strncmp(ids[j], "VCD_FUNCTION_", 13) != 0) continue;

View File

@@ -70,7 +70,6 @@ static void *scrolltti_thread(void *_this)
static void clear(view *this)
{
/* TODO */
UNUSED(this);
}
static void insert(struct scrolltti *this, double value)

View File

@@ -3,7 +3,6 @@
*/
#include "view.h"
#include "../utils.h"
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
@@ -16,7 +15,6 @@ struct stdout {
static void clear(view *this)
{
/* do nothing */
UNUSED(this);
}
static void append(view *_this, char *s)

View File

@@ -71,7 +71,6 @@ static void *textlist_thread(void *_this)
static void clear(view *this)
{
/* TODO */
UNUSED(this);
}
static void append(view *_this, char *s)
@@ -121,11 +120,9 @@ static void scroll(void *private, gui *g,
if (pthread_mutex_unlock(&this->lock)) abort();
}
static void click(void *private, gui *g, char *notification, widget *w, void *notification_data)
static void click(void *private, gui *g,
char *notification, widget *w, void *notification_data)
{
UNUSED(notification);
UNUSED(g);
UNUSED(w);
struct textlist *this = private;
int *d = notification_data;
int button = d[1];

View File

@@ -164,10 +164,9 @@ static void *ticktime_thread(void *_this)
return 0;
}
static void scroll(void *private, gui *g, char *notification, widget *w, void *notification_data)
static void scroll(void *private, gui *g,
char *notification, widget *w, void *notification_data)
{
UNUSED(g);
UNUSED(w);
struct ticktime *this = private;
int *d = notification_data;
int x = d[0];
@@ -226,11 +225,9 @@ end:
if (pthread_mutex_unlock(&this->lock)) abort();
}
static void click(void *private, gui *g, char *notification, widget *w, void *notification_data)
static void click(void *private, gui *g,
char *notification, widget *w, void *notification_data)
{
UNUSED(g);
UNUSED(w);
UNUSED(notification);
struct ticktime *this = private;
int *d = notification_data;
int button = *d;
@@ -368,9 +365,9 @@ struct clock_ticktime {
struct ticktime *parent;
};
static void clock_append(view *_this, struct timespec t, int frame, int subframe)
static void clock_append(view *_this, struct timespec t,
int frame, int subframe)
{
UNUSED(t);
struct clock_ticktime *this = (struct clock_ticktime *)_this;
struct ticktime *tt = this->parent;
int64_t diff;

Some files were not shown because too many files have changed in this diff Show More