Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
86f1c69f
Commit
86f1c69f
authored
Apr 13, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code review remarks, merge develop, revert some merge errors
parent
04f2ec23
Changes
49
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
359 additions
and
219 deletions
+359
-219
ci-scripts/Jenkinsfile-GitLab-Container
ci-scripts/Jenkinsfile-GitLab-Container
+29
-7
ci-scripts/Jenkinsfile-gitlab
ci-scripts/Jenkinsfile-gitlab
+9
-38
ci-scripts/args_parse.py
ci-scripts/args_parse.py
+10
-1
ci-scripts/buildOnVM.sh
ci-scripts/buildOnVM.sh
+1
-1
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+7
-2
ci-scripts/createVM.sh
ci-scripts/createVM.sh
+1
-1
ci-scripts/html.py
ci-scripts/html.py
+85
-0
ci-scripts/main.py
ci-scripts/main.py
+5
-1
ci-scripts/reportBuildLocally.sh
ci-scripts/reportBuildLocally.sh
+3
-0
ci-scripts/waitBuildOnVM.sh
ci-scripts/waitBuildOnVM.sh
+5
-2
ci-scripts/xml_class_list.yml
ci-scripts/xml_class_list.yml
+1
-0
common/utils/assertions.h
common/utils/assertions.h
+1
-1
common/utils/system.c
common/utils/system.c
+12
-6
common/utils/system.h
common/utils/system.h
+1
-1
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+14
-7
common/utils/threadPool/thread-pool.md
common/utils/threadPool/thread-pool.md
+1
-1
executables/main-ocp.c
executables/main-ocp.c
+2
-2
executables/nr-gnb.c
executables/nr-gnb.c
+2
-2
executables/nr-ru.c
executables/nr-ru.c
+4
-3
executables/nr-softmodem.c
executables/nr-softmodem.c
+1
-1
executables/nr-ue.c
executables/nr-ue.c
+8
-0
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+1
-1
executables/ocp-gnb.c
executables/ocp-gnb.c
+1
-1
executables/softmodem-common.c
executables/softmodem-common.c
+1
-1
executables/softmodem-common.h
executables/softmodem-common.h
+2
-2
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+18
-18
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+1
-1
openair1/PHY/TOOLS/calibration_test.c
openair1/PHY/TOOLS/calibration_test.c
+1
-0
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+3
-3
openair1/PHY/TOOLS/nr_phy_scope.c
openair1/PHY/TOOLS/nr_phy_scope.c
+67
-73
openair1/PHY/TOOLS/nr_phy_scope.h
openair1/PHY/TOOLS/nr_phy_scope.h
+1
-7
openair1/PHY/TOOLS/phy_scope_interface.h
openair1/PHY/TOOLS/phy_scope_interface.h
+19
-0
openair1/PHY/TOOLS/time_meas.c
openair1/PHY/TOOLS/time_meas.c
+8
-8
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+1
-1
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+1
-1
openair2/GNB_APP/L1_nr_paramdef.h
openair2/GNB_APP/L1_nr_paramdef.h
+1
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+4
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+4
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+4
-2
openair2/NETWORK_DRIVER/UE_IP/netlink.c
openair2/NETWORK_DRIVER/UE_IP/netlink.c
+1
-1
openair2/PHY_INTERFACE/phy_stub_UE.h
openair2/PHY_INTERFACE/phy_stub_UE.h
+1
-9
openair2/RRC/LTE/plmn_data.h
openair2/RRC/LTE/plmn_data.h
+0
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
...ENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
+9
-0
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+2
-2
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-1
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+2
-2
No files found.
ci-scripts/Jenkinsfile-GitLab-Container
View file @
86f1c69f
...
...
@@ -27,6 +27,9 @@ def nodeExecutor = params.nodeExecutor
def
doMandatoryTests
=
false
def
doFullTestsuite
=
false
//
def
gitCommitAuthorEmailAddr
pipeline
{
agent
{
label
nodeExecutor
...
...
@@ -152,21 +155,40 @@ pipeline {
}
}
}
stage
(
"CppCheck Analysis"
)
{
steps
{
script
{
triggerSlaveJob
(
'RAN-cppcheck'
,
'CppCheck Analysis'
)
}
}
post
{
always
{
script
{
finalizeSlaveJob
(
'RAN-cppcheck'
)
}
}
failure
{
script
{
currentBuild
.
result
=
'FAILURE'
}
}
}
}
}
}
}
post
{
always
{
script
{
def
eSubject
=
JOB_NAME
+
' - Build # '
+
BUILD_ID
+
' - '
+
currentBuild
.
result
+
'!'
def
eBody
=
"Hi,\n\n"
eBody
+=
"Here are attached HTML report files for "
+
JOB_NAME
+
" - Build # "
+
BUILD_ID
+
" - "
+
currentBuild
.
result
+
"!\n\n"
eBody
+=
"Regards,\n"
eBody
+=
"OAI CI Team"
emailext
attachmentsPattern:
'*results*.html'
,
body:
'''Hi,
Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
Regards,
OAI CI Team'''
,
body:
eBody
,
replyTo:
'no-reply@openairinterface.org'
,
subject:
'$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
,
subject:
eSubject
,
to:
gitCommitAuthorEmailAddr
if
(
fileExists
(
'.git/CI_COMMIT_MSG'
))
{
...
...
ci-scripts/Jenkinsfile-gitlab
View file @
86f1c69f
...
...
@@ -226,31 +226,12 @@ pipeline {
}
}
stage
(
"Start VM -- cppcheck"
)
{
steps
{
lock
(
vmResource
)
{
timeout
(
time:
7
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
}
}
}
}
stage
(
"Variant Builds"
)
{
parallel
{
stage
(
"Analysis with cppcheck"
)
{
steps
{
gitlabCommitStatus
(
name:
"Analysis with cppcheck"
)
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
}
}
}
stage
(
"Build basic simulator"
)
{
steps
{
gitlabCommitStatus
(
name:
"Build basic-sim"
)
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
timeout
(
time:
45
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
...
...
@@ -259,7 +240,7 @@ pipeline {
stage
(
"Build 5G gNB-USRP"
)
{
steps
{
gitlabCommitStatus
(
name:
"Build gNB-USRP"
)
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
timeout
(
time:
45
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
...
...
@@ -268,7 +249,7 @@ pipeline {
stage
(
"Build 5G NR-UE-USRP"
)
{
steps
{
gitlabCommitStatus
(
name:
"Build nr-UE-USRP"
)
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
timeout
(
time:
45
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
...
...
@@ -277,7 +258,7 @@ pipeline {
stage
(
"Build physical simulators"
)
{
steps
{
gitlabCommitStatus
(
name:
"Build phy-sim"
)
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
timeout
(
time:
45
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
...
...
@@ -286,7 +267,7 @@ pipeline {
stage
(
"Build eNB-ethernet"
)
{
steps
{
gitlabCommitStatus
(
name:
"Build eNB-ethernet"
)
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
timeout
(
time:
45
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
...
...
@@ -297,7 +278,7 @@ pipeline {
// This is typically the last one to finish.
lock
(
vmResource
)
{
gitlabCommitStatus
(
name:
"Build UE-ethernet"
)
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
timeout
(
time:
45
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
...
...
@@ -315,9 +296,9 @@ pipeline {
script
{
dir
(
'archives'
)
{
if
(
fileExists
(
'red_hat'
))
{
sh
"zip -r -qq vm_build_logs.zip basic_sim
enb_usrp phy_sim cppcheck
enb_eth ue_eth gnb_usrp nr_ue_usrp red_hat"
sh
"zip -r -qq vm_build_logs.zip basic_sim
phy_sim
enb_eth ue_eth gnb_usrp nr_ue_usrp red_hat"
}
else
{
sh
"zip -r -qq vm_build_logs.zip basic_sim
enb_usrp phy_sim cppcheck
enb_eth ue_eth gnb_usrp nr_ue_usrp"
sh
"zip -r -qq vm_build_logs.zip basic_sim
phy_sim
enb_eth ue_eth gnb_usrp nr_ue_usrp"
}
}
if
(
fileExists
(
'archives/vm_build_logs.zip'
))
{
...
...
@@ -325,16 +306,6 @@ pipeline {
}
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
sh
"./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
// If the merge request has introduced more CPPCHECK errors or warnings, notifications in GitLab
if
(
fileExists
(
'oai_cppcheck_added_errors.txt'
))
{
def
ret
=
readFile
(
'./oai_cppcheck_added_errors.txt'
).
trim
();
if
(
"0"
.
equals
(
ret
))
{
echo
"No added cppcheck warnings/errors in this merge request"
}
else
{
def
message
=
"OAI "
+
JOB_NAME
+
" build ("
+
BUILD_ID
+
"): Some modified files in Merge Request MAY have INTRODUCED up to "
+
ret
+
" CPPCHECK errors/warnings"
addGitLabMRComment
comment:
message
}
}
// If the merge request has introduced compilation warnings, notifications in GitLab
sh
"./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
def
res
=
readFile
(
'./oai_warning_files.txt'
).
trim
();
...
...
ci-scripts/args_parse.py
View file @
86f1c69f
...
...
@@ -41,7 +41,7 @@ import constants as CONST
#-----------------------------------------------------------
def
ArgsParse
(
argvs
,
CiTestObj
,
RAN
,
HTML
,
EPC
,
ldpc
,
CONTAINERS
,
HELP
):
def
ArgsParse
(
argvs
,
CiTestObj
,
RAN
,
HTML
,
EPC
,
ldpc
,
CONTAINERS
,
HELP
,
SCA
):
py_param_file_present
=
False
...
...
@@ -80,6 +80,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
HTML
.
ranRepository
=
matchReg
.
group
(
1
)
ldpc
.
ranRepository
=
matchReg
.
group
(
1
)
CONTAINERS
.
ranRepository
=
matchReg
.
group
(
1
)
SCA
.
ranRepository
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNB_AllowMerge=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNB_AllowMerge=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
...
...
@@ -92,6 +93,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
RAN
.
ranAllowMerge
=
True
HTML
.
ranAllowMerge
=
True
CONTAINERS
.
ranAllowMerge
=
True
SCA
.
ranAllowMerge
=
True
elif
re
.
match
(
'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNBBranch=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
...
...
@@ -102,6 +104,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
HTML
.
ranBranch
=
matchReg
.
group
(
1
)
ldpc
.
ranBranch
=
matchReg
.
group
(
1
)
CONTAINERS
.
ranBranch
=
matchReg
.
group
(
1
)
SCA
.
ranBranch
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNBCommitID=(.*)$'
,
myArgv
,
re
.
IGNORECASE
)
...
...
@@ -112,6 +115,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
HTML
.
ranCommitID
=
matchReg
.
group
(
1
)
ldpc
.
ranCommitID
=
matchReg
.
group
(
1
)
CONTAINERS
.
ranCommitID
=
matchReg
.
group
(
1
)
SCA
.
ranCommitID
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNBTargetBranch=(.*)$'
,
myArgv
,
re
.
IGNORECASE
)
...
...
@@ -122,12 +126,14 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
HTML
.
ranTargetBranch
=
matchReg
.
group
(
1
)
ldpc
.
ranTargetBranch
=
matchReg
.
group
(
1
)
CONTAINERS
.
ranTargetBranch
=
matchReg
.
group
(
1
)
SCA
.
ranTargetBranch
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
if
re
.
match
(
'^\-\-eNBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNBIPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
RAN
.
eNBIPAddress
=
matchReg
.
group
(
1
)
ldpc
.
eNBIpAddr
=
matchReg
.
group
(
1
)
CONTAINERS
.
eNBIPAddress
=
matchReg
.
group
(
1
)
SCA
.
eNBIPAddress
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNB1IPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNB1IPAddress=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
RAN
.
eNB1IPAddress
=
matchReg
.
group
(
1
)
...
...
@@ -142,6 +148,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
RAN
.
eNBUserName
=
matchReg
.
group
(
1
)
ldpc
.
eNBUserName
=
matchReg
.
group
(
1
)
CONTAINERS
.
eNBUserName
=
matchReg
.
group
(
1
)
SCA
.
eNBUserName
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNB1UserName=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNB1UserName=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
RAN
.
eNB1UserName
=
matchReg
.
group
(
1
)
...
...
@@ -156,6 +163,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
RAN
.
eNBPassword
=
matchReg
.
group
(
1
)
ldpc
.
eNBPassWord
=
matchReg
.
group
(
1
)
CONTAINERS
.
eNBPassword
=
matchReg
.
group
(
1
)
SCA
.
eNBPassword
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNB1Password=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNB1Password=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
RAN
.
eNB1Password
=
matchReg
.
group
(
1
)
...
...
@@ -170,6 +178,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
RAN
.
eNBSourceCodePath
=
matchReg
.
group
(
1
)
ldpc
.
eNBSourceCodePath
=
matchReg
.
group
(
1
)
CONTAINERS
.
eNBSourceCodePath
=
matchReg
.
group
(
1
)
SCA
.
eNBSourceCodePath
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-eNB1SourceCodePath=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-eNB1SourceCodePath=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
RAN
.
eNB1SourceCodePath
=
matchReg
.
group
(
1
)
...
...
ci-scripts/buildOnVM.sh
View file @
86f1c69f
...
...
@@ -62,7 +62,7 @@ function build_on_vm {
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
echo
"BUILD_OPTIONS =
$BUILD_OPTIONS
"
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
||
[[
"
$VM_NAME
"
==
*
"-cppcheck"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
...
...
ci-scripts/cls_containerize.py
View file @
86f1c69f
...
...
@@ -83,6 +83,7 @@ class Containerize():
self
.
flexranCtrlDeployed
=
False
self
.
flexranCtrlIpAddress
=
''
self
.
cli
=
''
self
.
cliBuildOptions
=
''
self
.
dockerfileprefix
=
''
self
.
host
=
''
self
.
allImagesSize
=
{}
...
...
@@ -124,9 +125,11 @@ class Containerize():
if
self
.
host
==
'Ubuntu'
:
self
.
cli
=
'docker'
self
.
dockerfileprefix
=
'.ubuntu18'
self
.
cliBuildOptions
=
'--no-cache'
elif
self
.
host
==
'Red Hat'
:
self
.
cli
=
'sudo podman'
self
.
dockerfileprefix
=
'.rhel8.2'
self
.
cliBuildOptions
=
'--no-cache --disable-compression'
imageNames
=
[]
result
=
re
.
search
(
'eNB'
,
self
.
imageKind
)
...
...
@@ -144,6 +147,8 @@ class Containerize():
imageNames
.
append
((
'oai-gnb'
,
'gNB'
))
imageNames
.
append
((
'oai-lte-ue'
,
'lteUE'
))
imageNames
.
append
((
'oai-nr-ue'
,
'nrUE'
))
if
self
.
host
==
'Red Hat'
:
imageNames
.
append
((
'oai-physim'
,
'phySim'
))
if
len
(
imageNames
)
==
0
:
imageNames
.
append
((
'oai-enb'
,
'eNB'
))
...
...
@@ -201,7 +206,7 @@ class Containerize():
# Build the shared image only on Push Events (not on Merge Requests)
if
(
not
self
.
ranAllowMerge
):
mySSH
.
command
(
self
.
cli
+
' build --target '
+
sharedimage
+
' --tag '
+
sharedimage
+
':'
+
sharedTag
+
' --file docker/Dockerfile.ran'
+
self
.
dockerfileprefix
+
' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1'
,
'\$'
,
1600
)
mySSH
.
command
(
self
.
cli
+
' build
'
+
self
.
cliBuildOptions
+
'
--target '
+
sharedimage
+
' --tag '
+
sharedimage
+
':'
+
sharedTag
+
' --file docker/Dockerfile.ran'
+
self
.
dockerfileprefix
+
' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1'
,
'\$'
,
1600
)
# First verify if the shared image was properly created.
status
=
True
mySSH
.
command
(
self
.
cli
+
' image inspect --format=
\'
Size = {{.Size}} bytes
\'
'
+
sharedimage
+
':'
+
sharedTag
,
'\$'
,
5
)
...
...
@@ -249,7 +254,7 @@ class Containerize():
# the archived Dockerfiles have "ran-build:latest" as base image
# we need to update them with proper tag
mySSH
.
command
(
'sed -i -e "s#'
+
sharedimage
+
':latest#'
+
sharedimage
+
':'
+
sharedTag
+
'#" docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
,
'\$'
,
5
)
mySSH
.
command
(
self
.
cli
+
' build --target '
+
image
+
' --tag '
+
image
+
':'
+
imageTag
+
' --file docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
+
' . > cmake_targets/log/'
+
image
+
'.log 2>&1'
,
'\$'
,
1200
)
mySSH
.
command
(
self
.
cli
+
' build
'
+
self
.
cliBuildOptions
+
'
--target '
+
image
+
' --tag '
+
image
+
':'
+
imageTag
+
' --file docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
+
' . > cmake_targets/log/'
+
image
+
'.log 2>&1'
,
'\$'
,
1200
)
# split the log
mySSH
.
command
(
'mkdir -p cmake_targets/log/'
+
image
,
'\$'
,
5
)
mySSH
.
command
(
'python3 ci-scripts/docker_log_split.py --logfilename=cmake_targets/log/'
+
image
+
'.log'
,
'\$'
,
5
)
...
...
ci-scripts/createVM.sh
View file @
86f1c69f
...
...
@@ -87,7 +87,7 @@ function create_vm {
echo
"VM_CPU =
$VM_CPU
"
echo
"VM_DISK =
$VM_DISK
GBytes"
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
||
[[
"
$VM_NAME
"
==
*
"-cppcheck"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
...
...
ci-scripts/html.py
View file @
86f1c69f
...
...
@@ -479,3 +479,88 @@ class HTMLManagement():
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
close
()
def
CreateHtmlTestRowCppCheckResults
(
self
,
CCR
):
if
(
self
.
htmlFooterCreated
or
(
not
self
.
htmlHeaderCreated
)):
return
self
.
htmlFile
=
open
(
'test_results.html'
,
'a'
)
vId
=
0
for
version
in
CCR
.
versions
:
self
.
htmlFile
.
write
(
' <tr bgcolor = "#F0F0F0" >
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
5
+
self
.
htmlUEConnected
)
+
'><b> Results for cppcheck v '
+
version
+
' </b></td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> NB ERRORS</b></td>
\n
'
)
if
CCR
.
nbErrors
[
vId
]
==
0
:
myColor
=
'lightgreen'
elif
CCR
.
nbErrors
[
vId
]
<
20
:
myColor
=
'orange'
else
:
myColor
=
'lightcoral'
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
' bgcolor = "'
+
myColor
+
'"><b>'
+
str
(
CCR
.
nbErrors
[
vId
])
+
'</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> NB WARNINGS</b></td>
\n
'
)
if
CCR
.
nbWarnings
[
vId
]
==
0
:
myColor
=
'lightgreen'
elif
CCR
.
nbWarnings
[
vId
]
<
20
:
myColor
=
'orange'
else
:
myColor
=
'lightcoral'
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
' bgcolor = "'
+
myColor
+
'"><b>'
+
str
(
CCR
.
nbWarnings
[
vId
])
+
'</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr bgcolor = "#F0F0F0" >
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
5
+
self
.
htmlUEConnected
)
+
'> ----------------- </td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Memory leak</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbMemLeaks
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Possible null pointer deference</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbNullPtrs
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Uninitialized variable</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbUninitVars
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Undefined behaviour shifting</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbTooManyBitsShift
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Signed integer overflow</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbIntegerOverflow
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr bgcolor = "#F0F0F0" >
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
5
+
self
.
htmlUEConnected
)
+
'> </td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Printf formatting issues</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbInvalidPrintf
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Modulo result is predetermined</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbModuloAlways
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Opposite Condition -> dead code</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbOppoInnerCondition
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <td></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan=2 bgcolor = "lightcyan" ><b> Wrong Scanf Nb Args</b></td>
\n
'
)
self
.
htmlFile
.
write
(
' <td colspan='
+
str
(
2
+
self
.
htmlUEConnected
)
+
'>'
+
str
(
CCR
.
nbWrongScanfArg
[
vId
])
+
'</td>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
vId
+=
1
self
.
htmlFile
.
close
()
ci-scripts/main.py
View file @
86f1c69f
...
...
@@ -42,6 +42,7 @@ import cls_oaicitest #main class for OAI CI test framework
import
cls_physim
#class PhySim for physical simulators build and test
import
cls_cots_ue
#class CotsUe for Airplane mode control
import
cls_containerize
#class Containerize for all container-based operations on RAN/UE objects
import
cls_static_code_analysis
#class for static code analysis
import
sshconnection
...
...
@@ -378,6 +379,7 @@ EPC = epc.EPCManagement()
RAN
=
ran
.
RANManagement
()
HTML
=
html
.
HTMLManagement
()
CONTAINERS
=
cls_containerize
.
Containerize
()
SCA
=
cls_static_code_analysis
.
StaticCodeAnalysis
()
ldpc
=
cls_physim
.
PhySim
()
#create an instance for LDPC test using GPU or CPU build
...
...
@@ -388,7 +390,7 @@ ldpc=cls_physim.PhySim() #create an instance for LDPC test using GPU or CPU b
#-----------------------------------------------------------
import
args_parse
py_param_file_present
,
py_params
,
mode
=
args_parse
.
ArgsParse
(
sys
.
argv
,
CiTestObj
,
RAN
,
HTML
,
EPC
,
ldpc
,
CONTAINERS
,
HELP
)
py_param_file_present
,
py_params
,
mode
=
args_parse
.
ArgsParse
(
sys
.
argv
,
CiTestObj
,
RAN
,
HTML
,
EPC
,
ldpc
,
CONTAINERS
,
HELP
,
SCA
)
...
...
@@ -741,6 +743,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CONTAINERS
.
DeployObject
(
HTML
,
EPC
)
elif
action
==
'Undeploy_Object'
:
CONTAINERS
.
UndeployObject
(
HTML
,
RAN
)
elif
action
==
'Cppcheck_Analysis'
:
SCA
.
CppCheckAnalysis
(
HTML
)
else
:
sys
.
exit
(
'Invalid class (action) from xml'
)
if
not
RAN
.
prematureExit
:
...
...
ci-scripts/reportBuildLocally.sh
View file @
86f1c69f
...
...
@@ -568,6 +568,8 @@ function report_build {
echo
" <h2>Ubuntu 16.04 LTS -- Summary</h2>"
>>
./build_results.html
if
[
-f
./archives/cppcheck/cppcheck.xml
]
then
sca_summary_table_header ./archives/cppcheck/cppcheck.xml
"OAI Static Code Analysis with CPPCHECK"
sca_summary_table_row ./archives/cppcheck/cppcheck.xml
"Uninitialized variable"
uninitvar
sca_summary_table_row ./archives/cppcheck/cppcheck.xml
"Uninitialized struct member"
uninitStructMember
...
...
@@ -579,6 +581,7 @@ function report_build {
sca_summary_table_row ./archives/cppcheck/cppcheck.xml
"Buffer is accessed out of bounds"
bufferAccessOutOfBounds
sca_summary_table_row ./archives/cppcheck/cppcheck.xml
"Expression depends on order of evaluation of side effects"
unknownEvaluationOrder
sca_summary_table_footer ./archives/cppcheck/cppcheck.xml
fi
# summary_table_header "OAI Build: 4G LTE eNB -- USRP option" ./archives/enb_usrp
# summary_table_row "LTE SoftModem - Release 15" ./archives/enb_usrp/lte-softmodem.Rel15.txt "Built target lte-softmodem" ./enb_usrp_row1.html
...
...
ci-scripts/waitBuildOnVM.sh
View file @
86f1c69f
...
...
@@ -47,7 +47,7 @@ function wait_on_vm_build {
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
echo
"BUILD_OPTIONS =
$BUILD_OPTIONS
"
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
||
[[
"
$VM_NAME
"
==
*
"-cppcheck"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
...
...
@@ -73,6 +73,9 @@ function wait_on_vm_build {
echo
"############################################################"
echo
"Waiting build process to end on VM (
$VM_NAME
)"
echo
"############################################################"
# Since the last VM was cppcheck and is removed
# we are going too fast in wait and the build_oai is not yet started
sleep
120
if
[[
"
$VM_NAME
"
==
*
"-cppcheck"
*
]]
then
...
...
@@ -90,7 +93,7 @@ function wait_on_vm_build {
}
function
check_on_vm_build
{
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
||
[[
"
$VM_NAME
"
==
*
"-cppcheck"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
...
...
ci-scripts/xml_class_list.yml
View file @
86f1c69f
...
...
@@ -37,3 +37,4 @@
-
Build_Image
-
Deploy_Object
-
Undeploy_Object
-
Cppcheck_Analysis
common/utils/assertions.h
View file @
86f1c69f
...
...
@@ -39,7 +39,7 @@ void output_log_mem(void);
display_backtrace(); \
fflush(stdout); \
fflush(stderr); \
exit(EXIT_FAILURE); \
abort();
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
do { \
...
...
common/utils/system.c
View file @
86f1c69f
...
...
@@ -200,10 +200,14 @@ void start_background_system(void) {
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
){
pthread_attr_t
attr
;
int
ret
;
AssertFatal
(
0
==
(
ret
=
pthread_attr_init
(
&
attr
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_attr_setinheritsched
(
&
attr
,
PTHREAD_EXPLICIT_SCHED
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_attr_setschedpolicy
(
&
attr
,
SCHED_OAI
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_attr_init
(
&
attr
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_attr_setinheritsched
(
&
attr
,
PTHREAD_EXPLICIT_SCHED
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_attr_setschedpolicy
(
&
attr
,
SCHED_OAI
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
if
(
priority
<
sched_get_priority_min
(
SCHED_OAI
)
||
priority
>
sched_get_priority_max
(
SCHED_FIFO
))
{
LOG_E
(
TMR
,
"Prio not possible: %d, min is %d, max: %d, forced in the range
\n
"
,
priority
,
...
...
@@ -217,8 +221,10 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
AssertFatal
(
priority
<=
sched_get_priority_max
(
SCHED_OAI
),
""
);
struct
sched_param
sparam
=
{
0
};
sparam
.
sched_priority
=
priority
;
AssertFatal
(
0
==
(
ret
=
pthread_attr_setschedparam
(
&
attr
,
&
sparam
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_create
(
t
,
&
attr
,
func
,
param
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_attr_setschedparam
(
&
attr
,
&
sparam
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_create
(
t
,
&
attr
,
func
,
param
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
pthread_setname_np
(
*
t
,
name
);
if
(
affinity
!=
-
1
)
{
...
...
common/utils/system.h
View file @
86f1c69f
...
...
@@ -49,7 +49,7 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
#define SCHED_OAI SCHED_RR
#define OAI_PRIORITY_RT_LOW sched_get_priority_min(SCHED_OAI)
#define OAI_PRIORITY_RT ((sched_get_priority_min(SCHED_OAI)+sched_get_priority_m
in
(SCHED_OAI))/2)
#define OAI_PRIORITY_RT ((sched_get_priority_min(SCHED_OAI)+sched_get_priority_m
ax
(SCHED_OAI))/2)
#define OAI_PRIORITY_RT_MAX sched_get_priority_max(SCHED_OAI)-2
void
thread_top_init
(
char
*
thread_name
,
...
...
common/utils/threadPool/thread-pool.h
View file @
86f1c69f
...
...
@@ -37,14 +37,21 @@
#else
#define THREADINIT PTHREAD_MUTEX_INITIALIZER
#endif
#define mutexinit(mutex) AssertFatal(pthread_mutex_init(&mutex,NULL)==0,"");
#define condinit(signal) AssertFatal(pthread_cond_init(&signal,NULL)==0,"");
#define mutexlock(mutex) AssertFatal(pthread_mutex_lock(&mutex)==0,"");
#define mutexinit(mutex) {int ret=pthread_mutex_init(&mutex,NULL); \
AssertFatal(ret==0,"ret=%d\n",ret);}
#define condinit(signal) {int ret=pthread_cond_init(&signal,NULL); \
AssertFatal(ret==0,"ret=%d\n",ret);}
#define mutexlock(mutex) {int ret=pthread_mutex_lock(&mutex); \
AssertFatal(ret==0,"ret=%d\n",ret);}
#define mutextrylock(mutex) pthread_mutex_trylock(&mutex)
#define mutexunlock(mutex) AssertFatal(pthread_mutex_unlock(&mutex)==0,"");
#define condwait(condition, mutex) AssertFatal(pthread_cond_wait(&condition, &mutex)==0,"");
#define condbroadcast(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
#define condsignal(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
#define mutexunlock(mutex) {int ret=pthread_mutex_unlock(&mutex); \
AssertFatal(ret==0,"ret=%d\n",ret);}
#define condwait(condition, mutex) {int ret=pthread_cond_wait(&condition, &mutex); \
AssertFatal(ret==0,"ret=%d\n",ret);}
#define condbroadcast(signal) {int ret=pthread_cond_broadcast(&signal); \
AssertFatal(ret==0,"ret=%d\n",ret);}
#define condsignal(signal) {int ret=pthread_cond_broadcast(&signal); \
AssertFatal(ret==0,"ret=%d\n",ret);}
#define tpool_nbthreads(tpool) (tpool.nbThreads)
typedef
struct
notifiedFIFO_elt_s
{
struct
notifiedFIFO_elt_s
*
next
;
...
...
common/utils/threadPool/thread-pool.md
View file @
86f1c69f
executables/main-ocp.c
View file @
86f1c69f
...
...
@@ -1321,7 +1321,7 @@ int main ( int argc, char **argv ) {
// end of CI modifications
//getchar();
if
(
IS_SOFTMODEM_DO
FORMS
)
if
(
IS_SOFTMODEM_DO
SCOPE
)
load_softscope
(
"enb"
,
NULL
);
itti_wait_tasks_end
();
...
...
@@ -1330,7 +1330,7 @@ int main ( int argc, char **argv ) {
// stop threads
if
(
RC
.
nb_inst
==
0
||
!
NODE_IS_CU
(
node_type
))
{
if
(
IS_SOFTMODEM_DO
FORMS
)
if
(
IS_SOFTMODEM_DO
SCOPE
)
end_forms
();
LOG_I
(
ENB_APP
,
"stopping MODEM threads
\n
"
);
...
...
executables/nr-gnb.c
View file @
86f1c69f
...
...
@@ -126,7 +126,7 @@ void tx_func(void *param) {
syncMsg
->
slot_tx
=
slot_tx
;
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
syncMsg
->
ru
=
gNB
->
RU_list
[
0
];
res
->
key
=
1000
+
slot_tx
;
res
->
key
=
slot_tx
;
pushTpool
(
gNB
->
threadPool
,
res
);
}
...
...
@@ -275,7 +275,7 @@ void rx_func(void *param) {
syncMsg
->
frame_tx
=
frame_tx
;
syncMsg
->
slot_tx
=
slot_tx
;
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
res
->
key
=
2000
+
slot_tx
;
res
->
key
=
slot_tx
;
pushTpool
(
gNB
->
threadPool
,
res
);
}
...
...
executables/nr-ru.c
View file @
86f1c69f
...
...
@@ -89,7 +89,7 @@ static int DEFBFW[] = {0x00007fff};
#include "s1ap_eNB.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
#include "T.h"
...
...
@@ -1344,7 +1344,8 @@ void *ru_thread( void *param ) {
for
(
aa
=
0
;
aa
<
ru
->
nb_rx
;
aa
++
)
memcpy
((
void
*
)
RC
.
gNB
[
0
]
->
common_vars
.
rxdataF
[
aa
],
(
void
*
)
ru
->
common
.
rxdataF
[
aa
],
fp
->
symbols_per_slot
*
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
if
(
IS_SOFTMODEM_DOSCOPE
&&
RC
.
gNB
[
0
]
->
scopeData
)
((
scopeData_t
*
)
RC
.
gNB
[
0
]
->
scopeData
)
->
slotFunc
(
ru
->
common
.
rxdataF
[
0
],
proc
->
tti_rx
,
RC
.
gNB
[
0
]
->
scopeData
);
// Do PRACH RU processing
int
prach_id
=
find_nr_prach_ru
(
ru
,
proc
->
frame_rx
,
proc
->
tti_rx
,
SEARCH_EXIST
);
...
...
@@ -1390,7 +1391,7 @@ void *ru_thread( void *param ) {
syncMsg
->
frame_tx
=
proc
->
frame_tx
;
syncMsg
->
slot_tx
=
proc
->
tti_tx
;
syncMsg
->
timestamp_tx
=
proc
->
timestamp_tx
;
res
->
key
=
3000
+
proc
->
tti_rx
;
res
->
key
=
proc
->
tti_rx
;
pushTpool
(
gNB
->
threadPool
,
res
);
}
...
...
executables/nr-softmodem.c
View file @
86f1c69f
...
...
@@ -809,7 +809,7 @@ if(!IS_SOFTMODEM_NOS1)
printf
(
"RC.nb_RU:%d
\n
"
,
RC
.
nb_RU
);
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
printf
(
"ALL RUs ready - init gNBs
\n
"
);
if
(
IS_SOFTMODEM_DO
FORMS
)
{
if
(
IS_SOFTMODEM_DO
SCOPE
)
{
sleep
(
1
);
scopeParms_t
p
;
p
.
argc
=&
argc
;
...
...
executables/nr-ue.c
View file @
86f1c69f
...
...
@@ -332,6 +332,14 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
protocol_ctxt_t
ctxt
;
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
UE
->
Mod_id
,
ENB_FLAG_NO
,
mac
->
crnti
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
,
0
);
pdcp_run
(
&
ctxt
);
/* send tick to RLC and PDCP every ms */
if
(
proc
->
nr_slot_rx
%
UE
->
frame_parms
.
slots_per_subframe
==
0
)
{
void
nr_rlc_tick
(
int
frame
,
int
subframe
);
void
nr_pdcp_tick
(
int
frame
,
int
subframe
);
nr_rlc_tick
(
proc
->
frame_rx
,
proc
->
nr_slot_rx
/
UE
->
frame_parms
.
slots_per_subframe
);
nr_pdcp_tick
(
proc
->
frame_rx
,
proc
->
nr_slot_rx
/
UE
->
frame_parms
.
slots_per_subframe
);
}
}
}
...
...
executables/nr-uesoftmodem.c
View file @
86f1c69f
...
...
@@ -472,7 +472,7 @@ int main( int argc, char **argv ) {
configure_linux
();
mlockall
(
MCL_CURRENT
|
MCL_FUTURE
);
if
(
IS_SOFTMODEM_DO
FORMS
)
{
if
(
IS_SOFTMODEM_DO
SCOPE
)
{
load_softscope
(
"nr"
,
PHY_vars_UE_g
[
0
][
0
]);
}
...
...
executables/ocp-gnb.c
View file @
86f1c69f
...
...
@@ -994,7 +994,7 @@ int main( int argc, char **argv ) {
(
void
*
)
NULL
,
"time_meas"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
}
if
(
IS_SOFTMODEM_DO
FORMS
)
{
if
(
IS_SOFTMODEM_DO
SCOPE
)
{
scopeParms_t
tmp
=
{
&
argc
,
argv
,
&
ru
,
RC
.
gNB
[
0
]};
load_softscope
(
"nr"
,
&
tmp
);
}
...
...
executables/softmodem-common.c
View file @
86f1c69f
...
...
@@ -140,7 +140,7 @@ void get_common_options(uint32_t execmask) {
}
if
(
do_forms
)
{
set_softmodem_optmask
(
SOFTMODEM_DO
FORMS
_BIT
);
set_softmodem_optmask
(
SOFTMODEM_DO
SCOPE
_BIT
);
}
if
(
parallel_config
!=
NULL
)
set_parallel_conf
(
parallel_config
);
...
...
executables/softmodem-common.h
View file @
86f1c69f
...
...
@@ -188,7 +188,7 @@ extern "C"
#define SOFTMODEM_RFSIM_BIT (1<<10)
#define SOFTMODEM_BASICSIM_BIT (1<<11)
#define SOFTMODEM_SIML1_BIT (1<<12)
#define SOFTMODEM_DO
FORMS
_BIT (1<<15)
#define SOFTMODEM_DO
SCOPE
_BIT (1<<15)
#define SOFTMODEM_RECPLAY_BIT (1<<16)
#define SOFTMODEM_ENB_BIT (1<<20)
#define SOFTMODEM_GNB_BIT (1<<21)
...
...
@@ -204,7 +204,7 @@ extern "C"
#define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT)
#define IS_SOFTMODEM_BASICSIM ( get_softmodem_optmask() & SOFTMODEM_BASICSIM_BIT)
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
#define IS_SOFTMODEM_DO
FORMS ( get_softmodem_optmask() & SOFTMODEM_DOFORMS
_BIT)
#define IS_SOFTMODEM_DO
SCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE
_BIT)
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT)
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
...
...
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
View file @
86f1c69f
...
...
@@ -68,7 +68,7 @@ static void doIdft(int size, short *in, short *out) {
abort
();
break
;
}
}
}
static
void
copyPrimary
(
struct
complex16
*
out
,
struct
complex16
*
in
,
int
ofdmSize
)
{
int
k
=
ofdmSize
-
36
;
...
...
@@ -83,7 +83,7 @@ static void copyPrimary( struct complex16 *out, struct complex16 *in, int ofdmSi
k
-=
ofdmSize
;
}
}
}
}
int
lte_sync_time_init
(
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
// LTE_UE_COMMON *common_vars
struct
complex16
syncF_tmp
[
2048
]
__attribute__
((
aligned
(
32
)))
=
{
0
};
...
...
@@ -102,7 +102,7 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) { // LTE_UE_COMMON *com
copyPrimary
(
syncF_tmp
,
(
struct
complex16
*
)
primary_synch2
,
frame_parms
->
ofdm_symbol_size
);
doIdft
(
frame_parms
->
N_RB_DL
,
(
short
*
)
syncF_tmp
,(
short
*
)
primary_synch2_time
);
if
(
LOG_DUMPFLAG
(
DEBUG_LTEESTIM
))
{
if
(
LOG_DUMPFLAG
(
DEBUG_LTEESTIM
)){
LOG_M
(
"primary_sync0.m"
,
"psync0"
,
primary_synch0_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync1.m"
,
"psync1"
,
primary_synch1_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync2.m"
,
"psync2"
,
primary_synch2_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
...
...
@@ -135,7 +135,7 @@ void lte_sync_time_free(void) {
static
inline
int
abs32
(
int
x
)
{
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
}
static
inline
double
absF
(
struct
complexd
x
)
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
86f1c69f
...
...
@@ -52,7 +52,7 @@
* set as command line argument, see lte-softmodem.c
* default value: 0
*/
int
16
_t
nr_dlsch_demod_shift
=
0
;
int
32
_t
nr_dlsch_demod_shift
=
0
;
//int16_t interf_unaw_shift = 13;
//#define DEBUG_HARQ
...
...
openair1/PHY/TOOLS/calibration_test.c
View file @
86f1c69f
...
...
@@ -15,6 +15,7 @@ uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
int
opp_enabled
;
static
double
snr_dB
=
20
;
THREAD_STRUCT
thread_struct
;
#include <executables/nr-softmodem.h>
int
read_recplayconfig
(
recplay_conf_t
**
recplay_conf
,
recplay_state_t
**
recplay_state
)
{
return
0
;}
...
...
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
86f1c69f
...
...
@@ -679,7 +679,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
fl_set_xyplot_data
(
form
->
pdcch_llr
,
bit_pdcch
,
llr_pdcch
,
12
*
frame_parms
->
N_RB_DL
*
2
*
num_pdcch_symbols
,
""
,
""
,
""
);
}
else
{
LOG_D
(
HW
,
"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
LOG_D
(
PHY
,
"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
}
}
...
...
@@ -693,7 +693,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
fl_set_xyplot_data
(
form
->
pdcch_comp
,
I
,
Q
,
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
,
""
,
""
,
""
);
}
else
{
LOG_D
(
HW
,
"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
LOG_D
(
PHY
,
"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
}
}
...
...
@@ -709,7 +709,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
fl_set_xyplot_data
(
form
->
pdsch_llr
,
bit
,
llr
,
coded_bits_per_codeword
,
""
,
""
,
""
);
}
else
{
LOG_D
(
HW
,
"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
LOG_D
(
PHY
,
"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
}
}
...
...
openair1/PHY/TOOLS/nr_phy_scope.c
View file @
86f1c69f
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/nr_phy_scope.h
View file @
86f1c69f
...
...
@@ -33,13 +33,7 @@
//#include "PHY/impl_defs_top.h"
#include "PHY/defs_nr_UE.h"
typedef
struct
{
int
*
argc
;
char
**
argv
;
RU_t
*
ru
;
PHY_VARS_gNB
*
gNB
;
}
scopeParms_t
;
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
extern
RAN_CONTEXT_t
RC
;
#endif
openair1/PHY/TOOLS/phy_scope_interface.h
View file @
86f1c69f
...
...
@@ -29,7 +29,26 @@
* \note
* \warning
*/
#ifndef __PHY_SCOPE_INTERFACE_H__
#define __PHY_SCOPE_INTERFACE_H__
#include <openair1/PHY/defs_gNB.h>
typedef
struct
{
int
*
argc
;
char
**
argv
;
RU_t
*
ru
;
PHY_VARS_gNB
*
gNB
;
}
scopeParms_t
;
typedef
struct
scopeData_s
{
int
*
argc
;
char
**
argv
;
RU_t
*
ru
;
PHY_VARS_gNB
*
gNB
;
int32_t
*
rxdataF
;
void
(
*
slotFunc
)(
int32_t
*
data
,
int
slot
,
void
*
scopeData
);
}
scopeData_t
;
int
load_softscope
(
char
*
exectype
,
void
*
initarg
);
int
end_forms
(
void
)
;
#endif
openair1/PHY/TOOLS/time_meas.c
View file @
86f1c69f
openair1/PHY/defs_gNB.h
View file @
86f1c69f
...
...
@@ -846,7 +846,7 @@ typedef struct PHY_VARS_gNB_s {
tpool_t
*
threadPool
;
int
nbDecode
;
uint8_t
pusch_proc_threads
;
void
*
scopeData
;
}
PHY_VARS_gNB
;
typedef
struct
LDPCDecode_s
{
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
86f1c69f
...
...
@@ -1134,7 +1134,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
LOG_D
(
PHY
,
"harq_pid: %d, TBS expected dlsch1: %d
\n
"
,
harq_pid
,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
);
}
LOG_D
(
PHY
,
" ------ end ldpc decoder for AbsSubframe %d.%d ------
\n
"
,
frame_rx
,
nr_slot_rx
);
LOG_D
(
PHY
,
" ------ end ldpc decoder for AbsSubframe %d.%d ------
decoded in %d
\n
"
,
frame_rx
,
nr_slot_rx
,
ret
);
LOG_D
(
PHY
,
"harq_pid: %d, TBS expected dlsch0: %d
\n
"
,
harq_pid
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
);
if
(
ret
<
dlsch0
->
max_ldpc_iterations
+
1
){
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
86f1c69f
...
...
@@ -975,7 +975,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t
LOG_E
(
PHY
,
"PUCCH Downlink DAI has an invalid value : at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
}
else
if
(
harq_status
->
send_harq_status
==
0
)
{
LOG_
D
(
PHY
,
"PUCCH Downlink ack can not be transmitted : at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
LOG_
E
(
PHY
,
"PUCCH Downlink ack can not be transmitted : at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
}
else
{
...
...
openair2/GNB_APP/L1_nr_paramdef.h
View file @
86f1c69f
...
...
@@ -62,7 +62,7 @@
{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PUSCH_PROC_THREADS, NULL, 0, uptr:NULL, defintval:
1
, TYPE_UINT, 0} \
{CONFIG_STRING_L1_PUSCH_PROC_THREADS, NULL, 0, uptr:NULL, defintval:
3
, TYPE_UINT, 0} \
}
#define L1_CC_IDX 0
#define L1_TRANSPORT_N_PREFERENCE_IDX 1
...
...
openair2/GNB_APP/gnb_config.c
View file @
86f1c69f
...
...
@@ -1014,14 +1014,16 @@ int RCconfig_nr_gtpu(void ) {
MessageDef
*
message
;
if
(
gnb_mode
==
1
)
{
// NSA
AssertFatal
((
message
=
itti_alloc_new_message
(
TASK_GNB_APP
,
0
,
GTPV1U_ENB_S1_REQ
))
!=
NULL
,
""
);
message
=
itti_alloc_new_message
(
TASK_GNB_APP
,
0
,
GTPV1U_ENB_S1_REQ
);
AssertFatal
(
message
!=
NULL
,
""
);
// IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" );
// LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up);
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
,
"BAD IP ADDRESS FORMAT FOR eNB S1_U !
\n
"
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
);
GTPV1U_ENB_S1_REQ
(
message
).
enb_port_for_S1u_S12_S4_up
=
gnb_port_for_S1U
;
}
else
{
// TODO SA
AssertFatal
((
message
=
itti_alloc_new_message
(
TASK_GNB_APP
,
0
,
GTPV1U_GNB_NG_REQ
))
!=
NULL
,
""
);
message
=
itti_alloc_new_message
(
TASK_GNB_APP
,
0
,
GTPV1U_GNB_NG_REQ
);
AssertFatal
(
message
!=
NULL
,
""
);
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
GTPV1U_GNB_NG_REQ
(
message
).
gnb_ip_address_for_NGu_up
,
"BAD IP ADDRESS FORMAT FOR gNB NG_U !
\n
"
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
GTPV1U_GNB_NG_REQ
(
message
).
gnb_ip_address_for_NGu_up
);
GTPV1U_GNB_NG_REQ
(
message
).
gnb_port_for_NGu_up
=
gnb_port_for_NGU
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
86f1c69f
...
...
@@ -981,7 +981,7 @@ int nr_ue_pusch_scheduler(NR_UE_MAC_INST_t *mac,
struct
NR_PUSCH_TimeDomainResourceAllocationList
*
pusch_TimeDomainAllocationList
=
ubwp
->
bwp_Common
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
;
// k2 as per 3GPP TS 38.214 version 15.9.0 Release 15 ch 6.1.2.1.1
// PUSCH time domain resource allocation is higher layer configured from uschTimeDomainAllocationList in either pusch-ConfigCommon
uint8_
t
k2
;
in
t
k2
;
if
(
is_Msg3
)
{
k2
=
*
pusch_TimeDomainAllocationList
->
list
.
array
[
tda_id
]
->
k2
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
86f1c69f
...
...
@@ -806,6 +806,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdsch_pdu
->
qamModOrder
[
0
]
=
Qm
;
pdsch_pdu
->
mcsIndex
[
0
]
=
sched_ctrl
->
mcs
;
pdsch_pdu
->
mcsTable
[
0
]
=
sched_ctrl
->
mcsTableIdx
;
AssertFatal
(
harq
->
round
<
4
,
"%d"
,
harq
->
round
);
pdsch_pdu
->
rvIndex
[
0
]
=
nr_rv_round_map
[
harq
->
round
];
pdsch_pdu
->
TBSize
[
0
]
=
TBS
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
86f1c69f
...
...
@@ -569,7 +569,9 @@ static void handle_dl_harq(module_id_t mod_id,
add_tail_nr_list
(
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
available_dl_harq
,
harq_pid
);
harq
->
round
=
0
;
harq
->
ndi
^=
1
;
}
else
if
(
harq
->
round
==
MAX_HARQ_ROUNDS
)
{
}
else
{
harq
->
round
++
;
if
(
harq
->
round
==
MAX_HARQ_ROUNDS
)
{
add_tail_nr_list
(
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
available_dl_harq
,
harq_pid
);
harq
->
round
=
0
;
harq
->
ndi
^=
1
;
...
...
@@ -578,7 +580,7 @@ static void handle_dl_harq(module_id_t mod_id,
LOG_D
(
MAC
,
"retransmission error for UE %d (total %d)
\n
"
,
UE_id
,
stats
->
dlsch_errors
);
}
else
{
add_tail_nr_list
(
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
retrans_dl_harq
,
harq_pid
);
harq
->
round
++
;
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
86f1c69f
...
...
@@ -346,7 +346,9 @@ void handle_nr_ul_harq(module_id_t mod_id,
harq_pid
,
crc_pdu
->
rnti
);
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq_pid
);
}
else
if
(
harq
->
round
==
MAX_HARQ_ROUNDS
)
{
}
else
{
harq
->
round
++
;
if
(
harq
->
round
==
MAX_HARQ_ROUNDS
)
{
harq
->
ndi
^=
1
;
harq
->
round
=
0
;
LOG_D
(
MAC
,
...
...
@@ -356,13 +358,13 @@ void handle_nr_ul_harq(module_id_t mod_id,
UE_info
->
mac_stats
[
UE_id
].
ulsch_errors
++
;
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq_pid
);
}
else
{
harq
->
round
++
;
LOG_D
(
MAC
,
"Ulharq id %d crc failed for RNTI %04x
\n
"
,
harq_pid
,
crc_pdu
->
rnti
);
add_tail_nr_list
(
&
sched_ctrl
->
retrans_ul_harq
,
harq_pid
);
}
}
}
/*
...
...
openair2/NETWORK_DRIVER/UE_IP/netlink.c
View file @
86f1c69f
...
...
@@ -39,7 +39,7 @@
#include "local.h"
#include "proto_extern.h"
MODULE_LICENSE
(
"
GPL
"
);
MODULE_LICENSE
(
"
OAI
"
);
#define OAI_IP_DRIVER_NETLINK_ID 31
#define NL_DEST_PID 1
...
...
openair2/PHY_INTERFACE/phy_stub_UE.h
View file @
86f1c69f
...
...
@@ -18,7 +18,6 @@
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
//below 2 difinitions move to phy_stub_UE.c to add initialization when difinition.
extern
int
tx_req_num_elems
;
extern
UL_IND_t
*
UL_INFO
;
extern
nfapi_tx_request_pdu_t
*
tx_request_pdu_list
;
// New
...
...
@@ -27,14 +26,7 @@ extern nfapi_tx_request_pdu_t* tx_request_pdu_list;
extern
nfapi_dl_config_request_t
*
dl_config_req
;
extern
nfapi_ul_config_request_t
*
ul_config_req
;
extern
nfapi_hi_dci0_request_t
*
hi_dci0_req
;
//below 2 difinitions move to lte-ue.c to add initialization when difinition.
//int next_ra_frame;
//module_id_t next_Mod_id;
extern
int
tx_req_num_elems
;
// This function should return all the sched_response config messages which concern a specific UE. Inside this
// function we should somehow make the translation of config message's rnti to Mod_ID.
...
...
openair2/RRC/LTE/plmn_data.h
View file @
86f1c69f
...
...
@@ -2296,7 +2296,6 @@ static const plmn_data_t plmn_data[] = {
648 4 Econet Wireless Econet Operational
*/
};
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
View file @
86f1c69f
...
...
@@ -282,6 +282,15 @@ THREAD_STRUCT = (
}
);
rfsimulator
:
{
serveraddr
=
"server"
;
serverport
=
"4043"
;
options
= ();
#("saviq"); or/and "chanmod"
modelname
=
"AWGN"
;
IQfile
=
"/tmp/rfsimulator.iqs"
;
};
log_config
:
{
global_log_level
=
"info"
;
...
...
targets/RT/USER/lte-softmodem.c
View file @
86f1c69f
...
...
@@ -732,7 +732,7 @@ int main ( int argc, char **argv )
fflush
(
stderr
);
// end of CI modifications
//getchar();
if
(
IS_SOFTMODEM_DO
FORMS
)
if
(
IS_SOFTMODEM_DO
SCOPE
)
load_softscope
(
"enb"
,
NULL
);
itti_wait_tasks_end
();
oai_exit
=
1
;
...
...
@@ -740,7 +740,7 @@ int main ( int argc, char **argv )
// stop threads
if
(
RC
.
nb_inst
==
0
||
!
NODE_IS_CU
(
node_type
))
{
if
(
IS_SOFTMODEM_DO
FORMS
)
if
(
IS_SOFTMODEM_DO
SCOPE
)
end_forms
();
LOG_I
(
ENB_APP
,
"stopping MODEM threads
\n
"
);
...
...
targets/RT/USER/lte-ue.c
View file @
86f1c69f
...
...
@@ -183,7 +183,7 @@ PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
{
PHY_VARS_UE
*
ue
=
(
PHY_VARS_UE
*
)
calloc
(
1
,
sizeof
(
PHY_VARS_UE
));
AssertFatal
(
ue
,
""
);
if
(
frame_parms
!=
(
LTE_DL_FRAME_PARMS
*
)
NULL
)
{
// if we want to give initial frame parms, allocate the PHY_VARS_UE structure and put them in
memcpy
(
&
(
ue
->
frame_parms
),
frame_parms
,
sizeof
(
LTE_DL_FRAME_PARMS
));
}
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
86f1c69f
...
...
@@ -759,7 +759,7 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g
[
0
][
0
]
->
no_timing_correction
=
1
;
}
if
(
IS_SOFTMODEM_DO
FORMS
)
if
(
IS_SOFTMODEM_DO
SCOPE
)
load_softscope
(
"ue"
,
NULL
);
config_check_unknown_cmdlineopt
(
CONFIG_CHECKALLSECTIONS
);
...
...
@@ -784,7 +784,7 @@ int main( int argc, char **argv ) {
printf
(
"oai_exit=%d
\n
"
,
oai_exit
);
// stop threads
if
(
IS_SOFTMODEM_DO
FORMS
)
if
(
IS_SOFTMODEM_DO
SCOPE
)
end_forms
();
printf
(
"stopping MODEM threads
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment