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
常顺宇
OpenXG-RAN
Commits
831c47c4
Commit
831c47c4
authored
Jun 29, 2021
by
Mahesh
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into nfapi_nr_arch_mod
parents
ba2c28f6
635dabae
Changes
45
Show whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
1421 additions
and
390 deletions
+1421
-390
ci-scripts/Jenkinsfile-gitlab
ci-scripts/Jenkinsfile-gitlab
+6
-13
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
+2
-6
ci-scripts/Jenkinsfile-trig-nsa
ci-scripts/Jenkinsfile-trig-nsa
+13
-4
ci-scripts/ci_ueinfra.yaml
ci-scripts/ci_ueinfra.yaml
+1
-1
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+2
-0
ci-scripts/cls_log_mgt.py
ci-scripts/cls_log_mgt.py
+103
-0
ci-scripts/cls_module_ue.py
ci-scripts/cls_module_ue.py
+46
-3
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+127
-84
ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
+2
-2
ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
...cripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
+2
-2
ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
...nf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
+87
-87
ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
...pts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
+93
-93
ci-scripts/main.py
ci-scripts/main.py
+25
-10
ci-scripts/ran.py
ci-scripts/ran.py
+36
-2
ci-scripts/runTestOnVM.sh
ci-scripts/runTestOnVM.sh
+6
-0
ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml
ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band13_build.xml
ci-scripts/xml_files/enb_usrp210_band13_build.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band40_build.xml
ci-scripts/xml_files/enb_usrp210_band40_build.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band7_build.xml
ci-scripts/xml_files/enb_usrp210_band7_build.xml
+1
-1
ci-scripts/xml_files/fr1_nsa_quectel.xml
ci-scripts/xml_files/fr1_nsa_quectel.xml
+10
-8
ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml
ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml
+168
-0
ci-scripts/xml_files/fr1_nsa_quectel_long.xml
ci-scripts/xml_files/fr1_nsa_quectel_long.xml
+148
-0
ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
+1
-1
ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
+1
-1
ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml
ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml
+1
-1
cmake_targets/tools/setup_routes.sh
cmake_targets/tools/setup_routes.sh
+13
-0
common/utils/system.c
common/utils/system.c
+70
-16
common/utils/system.h
common/utils/system.h
+8
-0
doc/TESTING_GNB_W_COTS_UE.md
doc/TESTING_GNB_W_COTS_UE.md
+1
-0
docker/Dockerfile.lteRU.rhel8.2
docker/Dockerfile.lteRU.rhel8.2
+99
-0
docker/Dockerfile.lteRU.ubuntu18
docker/Dockerfile.lteRU.ubuntu18
+94
-0
docker/scripts/enb_entrypoint.sh
docker/scripts/enb_entrypoint.sh
+2
-0
docker/scripts/enb_parameters.yaml
docker/scripts/enb_parameters.yaml
+88
-2
docker/scripts/generateTemplate.py
docker/scripts/generateTemplate.py
+6
-2
docker/scripts/lte_ru_entrypoint.sh
docker/scripts/lte_ru_entrypoint.sh
+62
-0
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+10
-13
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+7
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+6
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
+6
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
+2
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+7
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
+10
-1
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+1
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+16
-6
targets/RT/USER/rt_wrapper.c
targets/RT/USER/rt_wrapper.c
+29
-20
No files found.
ci-scripts/Jenkinsfile-gitlab
View file @
831c47c4
...
@@ -30,8 +30,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
...
@@ -30,8 +30,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
}
}
}
}
def
doFlexranCtrlTest
=
false
// Location of the executor node
// Location of the executor node
def
nodeExecutor
=
params
.
nodeExecutor
def
nodeExecutor
=
params
.
nodeExecutor
...
@@ -66,9 +64,6 @@ pipeline {
...
@@ -66,9 +64,6 @@ pipeline {
echo
"Platform is ${env.TESTPLATFORM_OWNER}"
echo
"Platform is ${env.TESTPLATFORM_OWNER}"
}
}
if
(
params
.
FlexRanRtcGitLabRepository_Credentials
!=
null
)
{
doFlexranCtrlTest
=
true
}
if
(
fileExists
(
"flexran"
))
{
if
(
fileExists
(
"flexran"
))
{
sh
"rm -Rf flexran > /dev/null 2>&1"
sh
"rm -Rf flexran > /dev/null 2>&1"
}
}
...
@@ -141,15 +136,13 @@ pipeline {
...
@@ -141,15 +136,13 @@ pipeline {
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
sh
"./ci-scripts/checkCodingFormattingRules.sh"
sh
"./ci-scripts/checkCodingFormattingRules.sh"
}
}
if
(
doFlexranCtrlTest
&&
doMandatoryTests
)
{
// With Mosaic 5G being part of OSA and making all it's repositories public
// No need to pass credentials to clone flexran-rtc
if
(
doMandatoryTests
)
{
sh
"mkdir flexran"
sh
"mkdir flexran"
dir
(
'flexran'
)
{
dir
(
'flexran'
)
{
withCredentials
([
sh
"git clone https://gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
[
$class
:
'UsernamePasswordMultiBinding'
,
credentialsId:
"${params.FlexRanRtcGitLabRepository_Credentials}"
,
usernameVariable:
'git_username'
,
passwordVariable:
'git_password'
]
])
{
sh
"git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
sh
"git checkout develop >> ../git_clone.log 2>&1"
sh
"git checkout develop >> ../git_clone.log 2>&1"
}
sh
"zip -r -qq flexran.zip ."
sh
"zip -r -qq flexran.zip ."
}
}
}
}
...
@@ -315,7 +308,7 @@ pipeline {
...
@@ -315,7 +308,7 @@ pipeline {
stages
{
stages
{
stage
(
"Build Flexran Controller"
)
{
stage
(
"Build Flexran Controller"
)
{
when
{
when
{
expression
{
do
FlexranCtrlTest
&&
do
MandatoryTests
}
expression
{
doMandatoryTests
}
}
}
steps
{
steps
{
lock
(
vmResource
)
{
lock
(
vmResource
)
{
...
...
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
View file @
831c47c4
...
@@ -33,10 +33,9 @@ def buildStageStatus = true
...
@@ -33,10 +33,9 @@ def buildStageStatus = true
// Name of the test stage
// Name of the test stage
def
testStageName
=
params
.
pipelineTestStageName
def
testStageName
=
params
.
pipelineTestStageName
// Name of the phone resource
// Name of the phone
/server
resource
def
ciSmartPhonesResource1
=
params
.
SmartPhonesResource1
def
ciSmartPhonesResource1
=
params
.
SmartPhonesResource1
def
ciSmartPhonesResource2
=
params
.
SmartPhonesResource2
def
ciSmartPhonesResource2
=
params
.
SmartPhonesResource2
def
ciSmartPhonesResource3
=
params
.
SmartPhonesResource3
// Global Parameters. Normally they should be populated when the master job
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
// triggers the slave job with parameters
...
@@ -53,7 +52,7 @@ pipeline {
...
@@ -53,7 +52,7 @@ pipeline {
options
{
options
{
disableConcurrentBuilds
()
disableConcurrentBuilds
()
ansiColor
(
'xterm'
)
ansiColor
(
'xterm'
)
lock
(
extra:
[[
resource:
ciSmartPhonesResource2
]
,[
resource:
ciSmartPhonesResource3
]
],
resource:
ciSmartPhonesResource1
)
lock
(
extra:
[[
resource:
ciSmartPhonesResource2
]],
resource:
ciSmartPhonesResource1
)
}
}
stages
{
stages
{
stage
(
"Build Init"
)
{
stage
(
"Build Init"
)
{
...
@@ -85,9 +84,6 @@ pipeline {
...
@@ -85,9 +84,6 @@ pipeline {
if
(
params
.
SmartPhonesResource2
==
null
)
{
if
(
params
.
SmartPhonesResource2
==
null
)
{
allParametersPresent
=
false
allParametersPresent
=
false
}
}
if
(
params
.
SmartPhonesResource3
==
null
)
{
allParametersPresent
=
false
}
// 1st eNB parameters
// 1st eNB parameters
if
(
params
.
eNB_IPAddress
==
null
)
{
if
(
params
.
eNB_IPAddress
==
null
)
{
allParametersPresent
=
false
allParametersPresent
=
false
...
...
ci-scripts/Jenkinsfile-trig-nsa
View file @
831c47c4
...
@@ -36,7 +36,7 @@ pipeline {
...
@@ -36,7 +36,7 @@ pipeline {
stage
(
"Launcher"
)
{
stage
(
"Launcher"
)
{
steps
{
steps
{
script
{
script
{
//retrieve MR that are opened nd with tag
READY_TO_BE_MERGED
//retrieve MR that are opened nd with tag
NSA
MR_LIST
=
sh
returnStdout:
true
,
script:
'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true '
MR_LIST
=
sh
returnStdout:
true
,
script:
'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true '
echo
"List of selected MR:\n${MR_LIST}"
echo
"List of selected MR:\n${MR_LIST}"
def
MR_ARRAY
=
MR_LIST
.
split
(
'\n'
)
def
MR_ARRAY
=
MR_LIST
.
split
(
'\n'
)
...
@@ -48,21 +48,30 @@ pipeline {
...
@@ -48,21 +48,30 @@ pipeline {
COMMIT_ID
=
COMMIT_ID
.
trim
()
COMMIT_ID
=
COMMIT_ID
.
trim
()
echo
"Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
echo
"Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
//calling NSA sub job
//calling NSA sub job
build
job:
"RAN-
CI-NSA-B210-N310-ModuleUE"
,
wait
:
fals
e
,
propagate
:
false
,
parameters:
[
build
job:
"RAN-
NSA-Mini-Module"
,
wait
:
tru
e
,
propagate
:
false
,
parameters:
[
string
(
name:
'eNB_MR'
,
value:
String
.
valueOf
(
MR
)),
string
(
name:
'eNB_MR'
,
value:
String
.
valueOf
(
MR
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
SRC_BRANCH
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
SRC_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
COMMIT_ID
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
COMMIT_ID
)),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
]
]
//calling
Benetel
sub job
//calling
NSA long
sub job
build
job:
"RAN-
CI-BENETEL"
,
wait
:
fals
e
,
propagate
:
false
,
parameters:
[
build
job:
"RAN-
NSA-Mini-Module-Long"
,
wait
:
tru
e
,
propagate
:
false
,
parameters:
[
string
(
name:
'eNB_MR'
,
value:
String
.
valueOf
(
MR
)),
string
(
name:
'eNB_MR'
,
value:
String
.
valueOf
(
MR
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
SRC_BRANCH
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
SRC_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
COMMIT_ID
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
COMMIT_ID
)),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
]
]
//calling NSA attach/detach job
build
job:
"RAN-NSA-Mini-Module-Attach-Detach"
,
wait
:
true
,
propagate
:
false
,
parameters:
[
string
(
name:
'eNB_MR'
,
value:
String
.
valueOf
(
MR
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
SRC_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
COMMIT_ID
)),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
TARGET_BRANCH
)),
booleanParam
(
name:
'eNB_AllowMergeRequestProcess'
,
value:
Boolean
.
valueOf
(
ALLOW_MERGE
))
]
}
}
}
}
}
}
...
...
ci-scripts/ci_ueinfra.yaml
View file @
831c47c4
...
@@ -8,7 +8,7 @@ idefix:
...
@@ -8,7 +8,7 @@ idefix:
WakeupScript
:
ci_ctl_qtel.py /dev/ttyUSB2 wup
WakeupScript
:
ci_ctl_qtel.py /dev/ttyUSB2 wup
DetachScript
:
ci_ctl_qtel.py /dev/ttyUSB2 detach
DetachScript
:
ci_ctl_qtel.py /dev/ttyUSB2 detach
PLMN
:
22201
PLMN
:
22201
UENetwork
:
enxb22a941dbf0
0
UENetwork
:
wwan
0
HostIPAddress
:
192.168.18.188
HostIPAddress
:
192.168.18.188
HostUsername
:
oaicicd
HostUsername
:
oaicicd
HostPassword
:
oaicicd
HostPassword
:
oaicicd
...
...
ci-scripts/cls_containerize.py
View file @
831c47c4
...
@@ -150,6 +150,8 @@ class Containerize():
...
@@ -150,6 +150,8 @@ class Containerize():
imageNames
.
append
((
'oai-nr-ue'
,
'nrUE'
))
imageNames
.
append
((
'oai-nr-ue'
,
'nrUE'
))
if
self
.
host
==
'Red Hat'
:
if
self
.
host
==
'Red Hat'
:
imageNames
.
append
((
'oai-physim'
,
'phySim'
))
imageNames
.
append
((
'oai-physim'
,
'phySim'
))
if
self
.
host
==
'Ubuntu'
:
imageNames
.
append
((
'oai-lte-ru'
,
'lteRU'
))
if
len
(
imageNames
)
==
0
:
if
len
(
imageNames
)
==
0
:
imageNames
.
append
((
'oai-enb'
,
'eNB'
))
imageNames
.
append
((
'oai-enb'
,
'eNB'
))
...
...
ci-scripts/cls_log_mgt.py
0 → 100644
View file @
831c47c4
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Required Python Version
# Python 3.x
#
#---------------------------------------------------------------------
#USAGE:
# log=Log_Mgt(IPAddress,Password,Path)
# log.LogRotation()
import
re
import
subprocess
import
logging
import
math
class
Log_Mgt
:
def
__init__
(
self
,
IPAddress
,
Password
,
Path
):
self
.
IPAddress
=
IPAddress
self
.
Password
=
Password
self
.
path
=
Path
#-----------------$
#PRIVATE# Methods$
#-----------------$
def
__CheckAvailSpace
(
self
):
HOST
=
self
.
IPAddress
COMMAND
=
"df "
+
self
.
path
ssh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
HOST
,
COMMAND
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
result
=
ssh
.
stdout
.
readlines
()
s
=
result
[
1
].
decode
(
'utf-8'
).
rstrip
()
#result[1] is the second line with the results we are looking for
tmp
=
s
.
split
()
return
tmp
[
3
]
#return avail space from the line
def
__GetOldestFile
(
self
):
HOST
=
self
.
IPAddress
COMMAND
=
"ls -rtl "
+
self
.
path
#-rtl will bring oldest file on top
ssh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
HOST
,
COMMAND
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
result
=
ssh
.
stdout
.
readlines
()
s
=
result
[
1
].
decode
(
'utf-8'
).
rstrip
()
tmp
=
s
.
split
()
return
tmp
[
8
]
#return filename from the line
def
__AvgSize
(
self
):
HOST
=
self
.
IPAddress
COMMAND
=
"ls -rtl "
+
self
.
path
ssh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
HOST
,
COMMAND
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
result
=
ssh
.
stdout
.
readlines
()
total_size
=
0
for
i
in
range
(
1
,
len
(
result
)):
s
=
result
[
i
].
decode
(
'utf-8'
).
rstrip
()
tmp
=
s
.
split
()
total_size
+=
int
(
tmp
[
4
])
#get filesize
return
math
.
floor
(
total_size
/
(
len
(
result
)
-
1
))
#compute average file/artifact size
#-----------------$
#PUBLIC Methods$
#-----------------$
def
LogRotation
(
self
):
avail_space
=
int
(
self
.
__CheckAvailSpace
())
*
1000
#avail space in target folder, initially displayed in Gb
avg_size
=
self
.
__AvgSize
()
#average size of artifacts in the target folder
logging
.
debug
(
"Avail Space : "
+
str
(
avail_space
)
+
" / Artifact Avg Size : "
+
str
(
avg_size
))
if
avail_space
<
2
*
avg_size
:
#reserved space is 2x artifact file ; oldest file will be deleted
oldestfile
=
self
.
__GetOldestFile
()
HOST
=
self
.
IPAddress
COMMAND
=
"echo "
+
self
.
Password
+
" | sudo -S rm "
+
self
.
path
+
"/"
+
oldestfile
logging
.
debug
(
COMMAND
)
ssh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
HOST
,
COMMAND
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
else
:
logging
.
debug
(
"Still some space left for artifacts storage"
)
ci-scripts/cls_module_ue.py
View file @
831c47c4
...
@@ -37,7 +37,10 @@ import time
...
@@ -37,7 +37,10 @@ import time
import
re
import
re
import
subprocess
import
subprocess
from
datetime
import
datetime
#for log rotation mgt
import
cls_log_mgt
class
Module_UE
:
class
Module_UE
:
...
@@ -48,6 +51,7 @@ class Module_UE:
...
@@ -48,6 +51,7 @@ class Module_UE:
self
.
UEIPAddress
=
""
self
.
UEIPAddress
=
""
#dictionary linking command names and related module scripts
#dictionary linking command names and related module scripts
self
.
cmd_dict
=
{
"wup"
:
self
.
WakeupScript
,
"detach"
:
self
.
DetachScript
}
#dictionary of function scripts
self
.
cmd_dict
=
{
"wup"
:
self
.
WakeupScript
,
"detach"
:
self
.
DetachScript
}
#dictionary of function scripts
self
.
ue_trace
=
''
...
@@ -72,9 +76,10 @@ class Module_UE:
...
@@ -72,9 +76,10 @@ class Module_UE:
logging
.
debug
(
'Starting '
+
self
.
Process
[
'Name'
])
logging
.
debug
(
'Starting '
+
self
.
Process
[
'Name'
])
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
mySSH
.
command
(
'echo
'
+
self
.
HostPassword
+
' |
sudo -S '
+
self
.
Process
[
'Cmd'
]
+
' &'
,
'\$'
,
5
)
mySSH
.
command
(
'echo
$USER; echo '
+
self
.
HostPassword
+
' | nohup
sudo -S '
+
self
.
Process
[
'Cmd'
]
+
' &'
,
'\$'
,
5
)
mySSH
.
close
()
mySSH
.
close
()
#checking the process
#checking the process
time
.
sleep
(
5
)
HOST
=
self
.
HostIPAddress
HOST
=
self
.
HostIPAddress
COMMAND
=
"ps aux | grep "
+
self
.
Process
[
'Name'
]
+
" | grep -v grep "
COMMAND
=
"ps aux | grep "
+
self
.
Process
[
'Name'
]
+
" | grep -v grep "
logging
.
debug
(
COMMAND
)
logging
.
debug
(
COMMAND
)
...
@@ -101,7 +106,7 @@ class Module_UE:
...
@@ -101,7 +106,7 @@ class Module_UE:
def
GetModuleIPAddress
(
self
):
def
GetModuleIPAddress
(
self
):
HOST
=
self
.
HostIPAddress
HOST
=
self
.
HostIPAddress
response
=
[]
response
=
[]
tentative
=
10
tentative
=
3
while
(
len
(
response
)
==
0
)
and
(
tentative
>
0
):
while
(
len
(
response
)
==
0
)
and
(
tentative
>
0
):
COMMAND
=
"ip a show dev "
+
self
.
UENetwork
+
" | grep inet | grep "
+
self
.
UENetwork
COMMAND
=
"ip a show dev "
+
self
.
UENetwork
+
" | grep inet | grep "
+
self
.
UENetwork
logging
.
debug
(
COMMAND
)
logging
.
debug
(
COMMAND
)
...
@@ -126,7 +131,45 @@ class Module_UE:
...
@@ -126,7 +131,45 @@ class Module_UE:
logging
.
debug
(
'
\u001B
[1;37;41m Module IP Address Not Found!
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;37;41m Module IP Address Not Found!
\u001B
[0m'
)
return
-
1
return
-
1
def
EnableTrace
(
self
):
if
self
.
ue_trace
==
"yes"
:
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
#delete old artifacts
mySSH
.
command
(
'echo '
+
self
.
HostPassword
+
' | sudo -S rm -rf ci_qlog'
,
'\$'
,
5
)
#start Trace, artifact is created in home dir
mySSH
.
command
(
'echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &'
,
'\$'
,
5
)
mySSH
.
close
()
def
DisableTrace
(
self
):
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
mySSH
.
command
(
'echo '
+
self
.
HostPassword
+
' | sudo -S killall --signal=SIGINT *QLog*'
,
'\$'
,
5
)
mySSH
.
close
()
def
DisableCM
(
self
):
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
mySSH
.
command
(
'echo '
+
self
.
HostPassword
+
' | sudo -S killall --signal SIGKILL *'
+
self
.
Process
[
'Name'
]
+
'*'
,
'\$'
,
5
)
mySSH
.
close
()
def
LogCollect
(
self
):
if
self
.
ue_trace
==
"yes"
:
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
HostIPAddress
,
self
.
HostUsername
,
self
.
HostPassword
)
#archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix
now
=
datetime
.
now
()
now_string
=
now
.
strftime
(
"%Y%m%d-%H%M"
)
source
=
'ci_qlog'
destination
=
'/media/usb-drive/ci_qlogs/ci_qlog_'
+
now_string
+
'.zip'
#qlog artifact is zipped into the target folder
mySSH
.
command
(
'echo $USER; echo '
+
self
.
HostPassword
+
' | nohup sudo -S zip -r '
+
destination
+
' '
+
source
+
' &'
,
'\$'
,
10
)
mySSH
.
close
()
#post action : log cleaning to make sure enough space is reserved for the next run
Log_Mgt
=
cls_log_mgt
.
Log_Mgt
(
self
.
HostIPAddress
,
self
.
HostPassword
,
"/media/usb-drive/ci_qlogs"
)
Log_Mgt
.
LogRotation
()
else
:
destination
=
""
return
destination
ci-scripts/cls_oaicitest.py
View file @
831c47c4
...
@@ -160,6 +160,7 @@ class OaiCiTest():
...
@@ -160,6 +160,7 @@ class OaiCiTest():
self
.
air_interface
=
''
self
.
air_interface
=
''
self
.
expectedNbOfConnectedUEs
=
0
self
.
expectedNbOfConnectedUEs
=
0
self
.
ue_id
=
''
#used for module identification
self
.
ue_id
=
''
#used for module identification
self
.
ue_trace
=
''
#used to enable QLog trace for Module UE, passed to Module UE object at InitializeUE()
def
BuildOAIUE
(
self
,
HTML
):
def
BuildOAIUE
(
self
,
HTML
):
...
@@ -367,7 +368,7 @@ class OaiCiTest():
...
@@ -367,7 +368,7 @@ class OaiCiTest():
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
InitializeUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
def
InitializeUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
ue_trace
):
if
self
.
ue_id
==
''
:
#no ID specified, then it is a COTS controlled by ADB
if
self
.
ue_id
==
''
:
#no ID specified, then it is a COTS controlled by ADB
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
...
@@ -386,20 +387,26 @@ class OaiCiTest():
...
@@ -386,20 +387,26 @@ class OaiCiTest():
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
#RH
#RH
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
.
ue_trace
=
ue_trace
is_module
=
Module_UE
.
CheckCMProcess
()
is_module
=
Module_UE
.
CheckCMProcess
()
if
is_module
:
if
is_module
:
Module_UE
.
EnableTrace
()
time
.
sleep
(
5
)
Module_UE
.
Command
(
"wup"
)
Module_UE
.
Command
(
"wup"
)
logging
.
debug
(
"Waiting for IP address to be assigned"
)
time
.
sleep
(
20
)
logging
.
debug
(
"Retrieve IP address"
)
status
=
Module_UE
.
GetModuleIPAddress
()
status
=
Module_UE
.
GetModuleIPAddress
()
if
status
==
0
:
if
status
==
0
:
HTML
.
CreateHtmlTestRow
(
Module_UE
.
UEIPAddress
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
Module_UE
.
UEIPAddress
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
logging
.
debug
(
'UE IP addresss : '
+
Module_UE
.
UEIPAddress
)
logging
.
debug
(
'UE IP addresss : '
+
Module_UE
.
UEIPAddress
)
else
:
#status==-1 failed to retrieve IP address
else
:
#status==-1 failed to retrieve IP address
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
def
InitializeOAIUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
):
def
InitializeOAIUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
if
self
.
UEIPAddress
==
''
or
self
.
UEUserName
==
''
or
self
.
UEPassword
==
''
or
self
.
UESourceCodePath
==
''
:
if
self
.
UEIPAddress
==
''
or
self
.
UEUserName
==
''
or
self
.
UEPassword
==
''
or
self
.
UESourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
...
@@ -623,7 +630,7 @@ class OaiCiTest():
...
@@ -623,7 +630,7 @@ class OaiCiTest():
HTML
.
htmlUEFailureMsg
=
'nr-uesoftmodem did NOT synced'
HTML
.
htmlUEFailureMsg
=
'nr-uesoftmodem did NOT synced'
HTML
.
CreateHtmlTestRow
(
self
.
air_interface
+
' '
+
self
.
Initialize_OAI_UE_args
,
'KO'
,
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
,
'OAI UE'
)
HTML
.
CreateHtmlTestRow
(
self
.
air_interface
+
' '
+
self
.
Initialize_OAI_UE_args
,
'KO'
,
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
,
'OAI UE'
)
logging
.
error
(
'
\033
[91mInitialize OAI UE Failed!
\033
[0m'
)
logging
.
error
(
'
\033
[91mInitialize OAI UE Failed!
\033
[0m'
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
def
checkDevTTYisUnlocked
(
self
):
def
checkDevTTYisUnlocked
(
self
):
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
...
@@ -701,7 +708,7 @@ class OaiCiTest():
...
@@ -701,7 +708,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
checkDevTTYisUnlocked
()
self
.
checkDevTTYisUnlocked
()
def
AttachCatM
(
self
,
HTML
,
RAN
,
COTS_UE
,
EPC
):
def
AttachCatM
(
self
,
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
):
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
...
@@ -774,9 +781,9 @@ class OaiCiTest():
...
@@ -774,9 +781,9 @@ class OaiCiTest():
html_cell
=
'<pre style="background-color:white">CAT-M module Attachment Failed</pre>'
html_cell
=
'<pre style="background-color:white">CAT-M module Attachment Failed</pre>'
html_queue
.
put
(
html_cell
)
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
1
,
html_queue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
def
PingCatM
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
):
def
PingCatM
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
...
@@ -785,7 +792,7 @@ class OaiCiTest():
...
@@ -785,7 +792,7 @@ class OaiCiTest():
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
if
(
pStatus
<
0
):
if
(
pStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
try
:
try
:
statusQueue
=
SimpleQueue
()
statusQueue
=
SimpleQueue
()
...
@@ -806,7 +813,7 @@ class OaiCiTest():
...
@@ -806,7 +813,7 @@ class OaiCiTest():
moduleIPAddr
=
result
.
group
(
'ipaddr'
)
moduleIPAddr
=
result
.
group
(
'ipaddr'
)
else
:
else
:
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
ping_time
=
re
.
findall
(
"-c (\d+)"
,
str
(
self
.
ping_args
))
ping_time
=
re
.
findall
(
"-c (\d+)"
,
str
(
self
.
ping_args
))
device_id
=
'catm'
device_id
=
'catm'
...
@@ -870,7 +877,7 @@ class OaiCiTest():
...
@@ -870,7 +877,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
1
,
statusQueue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
1
,
statusQueue
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
1
,
statusQueue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
1
,
statusQueue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
...
@@ -962,7 +969,7 @@ class OaiCiTest():
...
@@ -962,7 +969,7 @@ class OaiCiTest():
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
AttachUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
):
def
AttachUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
if
self
.
ue_id
==
''
:
#no ID specified, then it is a COTS controlled by ADB
if
self
.
ue_id
==
''
:
#no ID specified, then it is a COTS controlled by ADB
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
...
@@ -972,7 +979,7 @@ class OaiCiTest():
...
@@ -972,7 +979,7 @@ class OaiCiTest():
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
if
(
pStatus
<
0
):
if
(
pStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
multi_jobs
=
[]
multi_jobs
=
[]
status_queue
=
SimpleQueue
()
status_queue
=
SimpleQueue
()
...
@@ -991,7 +998,7 @@ class OaiCiTest():
...
@@ -991,7 +998,7 @@ class OaiCiTest():
if
(
status_queue
.
empty
()):
if
(
status_queue
.
empty
()):
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
else
:
else
:
attach_status
=
True
attach_status
=
True
...
@@ -1020,7 +1027,24 @@ class OaiCiTest():
...
@@ -1020,7 +1027,24 @@ class OaiCiTest():
time
.
sleep
(
5
)
time
.
sleep
(
5
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
#Attention, as opposed to InitializeUE, the connect manager process is not checked as it is supposed to be active already
#only 1- module wakeup, 2- check IP address
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
.
Command
(
"wup"
)
logging
.
debug
(
"Waiting for IP address to be assigned"
)
time
.
sleep
(
20
)
logging
.
debug
(
"Retrieve IP address"
)
status
=
Module_UE
.
GetModuleIPAddress
()
if
status
==
0
:
HTML
.
CreateHtmlTestRow
(
Module_UE
.
UEIPAddress
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
logging
.
debug
(
'UE IP addresss : '
+
Module_UE
.
UEIPAddress
)
else
:
#status==-1 failed to retrieve IP address
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
def
DetachUE_common
(
self
,
device_id
,
idx
,
COTS_UE
):
def
DetachUE_common
(
self
,
device_id
,
idx
,
COTS_UE
):
try
:
try
:
...
@@ -1054,7 +1078,7 @@ class OaiCiTest():
...
@@ -1054,7 +1078,7 @@ class OaiCiTest():
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
if
(
pStatus
<
0
):
if
(
pStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
multi_jobs
=
[]
multi_jobs
=
[]
cnt
=
0
cnt
=
0
...
@@ -1079,7 +1103,7 @@ class OaiCiTest():
...
@@ -1079,7 +1103,7 @@ class OaiCiTest():
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
.
Command
(
"detach"
)
Module_UE
.
Command
(
"detach"
)
HTML
.
CreateHtmlTestRow
(
'N
/
A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'NA'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
...
@@ -1329,7 +1353,7 @@ class OaiCiTest():
...
@@ -1329,7 +1353,7 @@ class OaiCiTest():
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
CheckStatusUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
):
def
CheckStatusUE
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
if
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
...
@@ -1376,7 +1400,7 @@ class OaiCiTest():
...
@@ -1376,7 +1400,7 @@ class OaiCiTest():
if
(
status_queue
.
empty
()):
if
(
status_queue
.
empty
()):
HTML
.
CreateHtmlTestRow
(
htmlOptions
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
htmlOptions
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
else
:
else
:
check_status
=
True
check_status
=
True
html_queue
=
SimpleQueue
()
html_queue
=
SimpleQueue
()
...
@@ -1392,7 +1416,7 @@ class OaiCiTest():
...
@@ -1392,7 +1416,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
def
GetAllUEIPAddresses
(
self
):
def
GetAllUEIPAddresses
(
self
):
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
...
@@ -1612,14 +1636,14 @@ class OaiCiTest():
...
@@ -1612,14 +1636,14 @@ class OaiCiTest():
html_queue
.
put
(
html_cell
)
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
def
PingNoS1
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
):
def
PingNoS1
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
check_eNB
=
True
check_eNB
=
True
check_OAI_UE
=
True
check_OAI_UE
=
True
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
if
(
pStatus
<
0
):
if
(
pStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
ping_from_eNB
=
re
.
search
(
'oaitun_enb1'
,
str
(
self
.
ping_args
))
ping_from_eNB
=
re
.
search
(
'oaitun_enb1'
,
str
(
self
.
ping_args
))
if
ping_from_eNB
is
not
None
:
if
ping_from_eNB
is
not
None
:
...
@@ -1708,7 +1732,7 @@ class OaiCiTest():
...
@@ -1708,7 +1732,7 @@ class OaiCiTest():
def
Ping
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
def
Ping
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
result
=
re
.
search
(
'noS1'
,
str
(
RAN
.
Initialize_eNB_args
))
result
=
re
.
search
(
'noS1'
,
str
(
RAN
.
Initialize_eNB_args
))
if
result
is
not
None
:
if
result
is
not
None
:
self
.
PingNoS1
(
HTML
,
RAN
,
EPC
,
COTS_UE
)
self
.
PingNoS1
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
return
return
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
...
@@ -1721,7 +1745,7 @@ class OaiCiTest():
...
@@ -1721,7 +1745,7 @@ class OaiCiTest():
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
if
(
pStatus
<
0
):
if
(
pStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
if
self
.
ue_id
==
""
:
if
self
.
ue_id
==
""
:
...
@@ -1729,7 +1753,7 @@ class OaiCiTest():
...
@@ -1729,7 +1753,7 @@ class OaiCiTest():
ueIpStatus
=
self
.
GetAllUEIPAddresses
()
ueIpStatus
=
self
.
GetAllUEIPAddresses
()
if
(
ueIpStatus
<
0
):
if
(
ueIpStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
else
:
else
:
self
.
UEIPAddresses
=
[]
self
.
UEIPAddresses
=
[]
...
@@ -1756,7 +1780,7 @@ class OaiCiTest():
...
@@ -1756,7 +1780,7 @@ class OaiCiTest():
if
(
status_queue
.
empty
()):
if
(
status_queue
.
empty
()):
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
self
.
ping_args
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
else
:
else
:
ping_status
=
True
ping_status
=
True
html_queue
=
SimpleQueue
()
html_queue
=
SimpleQueue
()
...
@@ -1773,7 +1797,7 @@ class OaiCiTest():
...
@@ -1773,7 +1797,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
def
Iperf_ComputeTime
(
self
):
def
Iperf_ComputeTime
(
self
):
result
=
re
.
search
(
'-t (?P<iperf_time>\d+)'
,
str
(
self
.
iperf_args
))
result
=
re
.
search
(
'-t (?P<iperf_time>\d+)'
,
str
(
self
.
iperf_args
))
...
@@ -2226,7 +2250,7 @@ class OaiCiTest():
...
@@ -2226,7 +2250,7 @@ class OaiCiTest():
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
cmd
=
'rm iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
cmd
=
'rm iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
command
(
cmd
,
'\$'
,
5
)
cmd
=
'echo $USER; nohup iperf -s -
i 1 -
u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
cmd
=
'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
command
(
cmd
,
'\$'
,
5
)
#client side UE
#client side UE
...
@@ -2244,6 +2268,13 @@ class OaiCiTest():
...
@@ -2244,6 +2268,13 @@ class OaiCiTest():
else
:
else
:
logging
.
debug
(
"Incorrect or missing IPERF direction in XML"
)
logging
.
debug
(
"Incorrect or missing IPERF direction in XML"
)
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
cmd
=
'killall --signal=SIGKILL iperf'
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
cmd
=
'killall --signal=SIGKILL iperf'
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
close
()
SSH
.
close
()
return
return
...
@@ -2467,7 +2498,7 @@ class OaiCiTest():
...
@@ -2467,7 +2498,7 @@ class OaiCiTest():
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
IperfNoS1
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
):
def
IperfNoS1
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
if
RAN
.
eNBIPAddress
==
''
or
RAN
.
eNBUserName
==
''
or
RAN
.
eNBPassword
==
''
or
self
.
UEIPAddress
==
''
or
self
.
UEUserName
==
''
or
self
.
UEPassword
==
''
:
if
RAN
.
eNBIPAddress
==
''
or
RAN
.
eNBUserName
==
''
or
RAN
.
eNBPassword
==
''
or
self
.
UEIPAddress
==
''
or
self
.
UEUserName
==
''
or
self
.
UEPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
...
@@ -2477,7 +2508,7 @@ class OaiCiTest():
...
@@ -2477,7 +2508,7 @@ class OaiCiTest():
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
if
(
pStatus
<
0
):
if
(
pStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
server_on_enb
=
re
.
search
(
'-R'
,
str
(
self
.
iperf_args
))
server_on_enb
=
re
.
search
(
'-R'
,
str
(
self
.
iperf_args
))
if
server_on_enb
is
not
None
:
if
server_on_enb
is
not
None
:
...
@@ -2576,12 +2607,12 @@ class OaiCiTest():
...
@@ -2576,12 +2607,12 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
def
Iperf
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
def
Iperf
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
):
result
=
re
.
search
(
'noS1'
,
str
(
RAN
.
Initialize_eNB_args
))
result
=
re
.
search
(
'noS1'
,
str
(
RAN
.
Initialize_eNB_args
))
if
result
is
not
None
:
if
result
is
not
None
:
self
.
IperfNoS1
(
HTML
,
RAN
,
EPC
,
COTS_UE
)
self
.
IperfNoS1
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
return
return
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
or
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
or
self
.
ADBIPAddress
==
''
or
self
.
ADBUserName
==
''
or
self
.
ADBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
...
@@ -2594,14 +2625,14 @@ class OaiCiTest():
...
@@ -2594,14 +2625,14 @@ class OaiCiTest():
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
pStatus
=
self
.
CheckProcessExist
(
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
)
if
(
pStatus
<
0
):
if
(
pStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
pStatus
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
if
self
.
ue_id
==
""
:
#is not a module, follow legacy code
if
self
.
ue_id
==
""
:
#is not a module, follow legacy code
ueIpStatus
=
self
.
GetAllUEIPAddresses
()
ueIpStatus
=
self
.
GetAllUEIPAddresses
()
if
(
ueIpStatus
<
0
):
if
(
ueIpStatus
<
0
):
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
CONST
.
UE_IP_ADDRESS_ISSUE
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
return
return
else
:
#is a module
else
:
#is a module
self
.
UEIPAddresses
=
[]
self
.
UEIPAddresses
=
[]
...
@@ -2646,7 +2677,7 @@ class OaiCiTest():
...
@@ -2646,7 +2677,7 @@ class OaiCiTest():
if
(
status_queue
.
empty
()):
if
(
status_queue
.
empty
()):
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
self
.
iperf_args
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfaUE
)
else
:
else
:
iperf_status
=
True
iperf_status
=
True
iperf_noperf
=
False
iperf_noperf
=
False
...
@@ -2668,7 +2699,7 @@ class OaiCiTest():
...
@@ -2668,7 +2699,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
def
CheckProcessExist
(
self
,
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
):
def
CheckProcessExist
(
self
,
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
):
multi_jobs
=
[]
multi_jobs
=
[]
...
@@ -3073,7 +3104,8 @@ class OaiCiTest():
...
@@ -3073,7 +3104,8 @@ class OaiCiTest():
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
TerminateUE
(
self
,
HTML
,
COTS_UE
):
def
TerminateUE
(
self
,
HTML
,
COTS_UE
,
InfraUE
,
ue_trace
):
if
self
.
ue_id
==
''
:
#no ID specified, then it is a COTS controlled by ADB
terminate_ue_flag
=
False
terminate_ue_flag
=
False
self
.
GetAllUEDevices
(
terminate_ue_flag
)
self
.
GetAllUEDevices
(
terminate_ue_flag
)
multi_jobs
=
[]
multi_jobs
=
[]
...
@@ -3087,8 +3119,19 @@ class OaiCiTest():
...
@@ -3087,8 +3119,19 @@ class OaiCiTest():
for
job
in
multi_jobs
:
for
job
in
multi_jobs
:
job
.
join
()
job
.
join
()
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
Module_UE
.
ue_trace
=
ue_trace
Module_UE
.
Command
(
"detach"
)
Module_UE
.
DisableTrace
()
Module_UE
.
DisableCM
()
archive_destination
=
Module_UE
.
LogCollect
()
if
Module_UE
.
ue_trace
==
'yes'
:
HTML
.
CreateHtmlTestRow
(
'QLog at : '
+
archive_destination
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
HTML
.
CreateHtmlTestRow
(
'QLog trace is disabled'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
TerminateOAIUE
(
self
,
HTML
,
RAN
,
COTS_UE
,
EPC
):
def
TerminateOAIUE
(
self
,
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
):
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
SSH
.
open
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
)
SSH
.
open
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
)
SSH
.
command
(
'cd '
+
self
.
UESourceCodePath
+
'/cmake_targets'
,
'\$'
,
5
)
SSH
.
command
(
'cd '
+
self
.
UESourceCodePath
+
'/cmake_targets'
,
'\$'
,
5
)
...
@@ -3129,11 +3172,11 @@ class OaiCiTest():
...
@@ -3129,11 +3172,11 @@ class OaiCiTest():
# Not an error then
# Not an error then
if
(
logStatus
!=
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
)
or
(
ueAction
!=
'Sniffing'
):
if
(
logStatus
!=
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
)
or
(
ueAction
!=
'Sniffing'
):
self
.
Initialize_OAI_UE_args
=
''
self
.
Initialize_OAI_UE_args
=
''
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
else
:
else
:
if
(
logStatus
==
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
):
if
(
logStatus
==
CONST
.
OAI_UE_PROCESS_COULD_NOT_SYNC
):
self
.
Initialize_OAI_UE_args
=
''
self
.
Initialize_OAI_UE_args
=
''
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
else
:
else
:
logging
.
debug
(
'
\u001B
[1m'
+
ueAction
+
' Completed
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m'
+
ueAction
+
' Completed
\u001B
[0m'
)
HTML
.
htmlUEFailureMsg
=
'<b>'
+
ueAction
+
' Completed</b>
\n
'
+
HTML
.
htmlUEFailureMsg
HTML
.
htmlUEFailureMsg
=
'<b>'
+
ueAction
+
' Completed</b>
\n
'
+
HTML
.
htmlUEFailureMsg
...
@@ -3142,21 +3185,21 @@ class OaiCiTest():
...
@@ -3142,21 +3185,21 @@ class OaiCiTest():
else
:
else
:
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
AutoTerminateUEandeNB
(
self
,
HTML
,
RAN
,
COTS_UE
,
EPC
):
def
AutoTerminateUEandeNB
(
self
,
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
):
if
(
self
.
ADBIPAddress
!=
'none'
):
if
(
self
.
ADBIPAddress
!=
'none'
):
self
.
testCase_id
=
'AUTO-KILL-UE'
self
.
testCase_id
=
'AUTO-KILL-UE'
HTML
.
testCase_id
=
self
.
testCase_id
HTML
.
testCase_id
=
self
.
testCase_id
self
.
desc
=
'Automatic Termination of UE'
self
.
desc
=
'Automatic Termination of UE'
HTML
.
desc
=
'Automatic Termination of UE'
HTML
.
desc
=
'Automatic Termination of UE'
self
.
ShowTestID
()
self
.
ShowTestID
()
self
.
TerminateUE
(
HTML
,
COTS_UE
)
self
.
TerminateUE
(
HTML
,
COTS_UE
,
InfraUE
,
self
.
ue_trace
)
if
(
self
.
Initialize_OAI_UE_args
!=
''
):
if
(
self
.
Initialize_OAI_UE_args
!=
''
):
self
.
testCase_id
=
'AUTO-KILL-OAI-UE'
self
.
testCase_id
=
'AUTO-KILL-OAI-UE'
HTML
.
testCase_id
=
self
.
testCase_id
HTML
.
testCase_id
=
self
.
testCase_id
self
.
desc
=
'Automatic Termination of OAI-UE'
self
.
desc
=
'Automatic Termination of OAI-UE'
HTML
.
desc
=
'Automatic Termination of OAI-UE'
HTML
.
desc
=
'Automatic Termination of OAI-UE'
self
.
ShowTestID
()
self
.
ShowTestID
()
self
.
TerminateOAIUE
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
self
.
TerminateOAIUE
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
if
(
RAN
.
Initialize_eNB_args
!=
''
):
if
(
RAN
.
Initialize_eNB_args
!=
''
):
self
.
testCase_id
=
'AUTO-KILL-RAN'
self
.
testCase_id
=
'AUTO-KILL-RAN'
HTML
.
testCase_id
=
self
.
testCase_id
HTML
.
testCase_id
=
self
.
testCase_id
...
...
ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
View file @
831c47c4
...
@@ -260,11 +260,11 @@ RUs = (
...
@@ -260,11 +260,11 @@ RUs = (
local_rf
=
"yes"
local_rf
=
"yes"
nb_tx
=
1
nb_tx
=
1
nb_rx
=
1
nb_rx
=
1
att_tx
=
0
att_tx
=
3
att_rx
=
0
;
att_rx
=
0
;
bands
= [
7
];
bands
= [
7
];
max_pdschReferenceSignalPower
= -
27
;
max_pdschReferenceSignalPower
= -
27
;
max_rxgain
=
11
8
;
max_rxgain
=
11
5
;
eNB_instances
= [
0
];
eNB_instances
= [
0
];
# clock_src = "external";
# clock_src = "external";
}
}
...
...
ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
View file @
831c47c4
...
@@ -244,11 +244,11 @@ RUs = (
...
@@ -244,11 +244,11 @@ RUs = (
local_rf
=
"yes"
local_rf
=
"yes"
nb_tx
=
1
nb_tx
=
1
nb_rx
=
1
nb_rx
=
1
att_tx
=
0
att_tx
=
3
att_rx
=
0
;
att_rx
=
0
;
bands
= [
7
];
bands
= [
7
];
max_pdschReferenceSignalPower
= -
27
;
max_pdschReferenceSignalPower
= -
27
;
max_rxgain
=
11
4
;
max_rxgain
=
11
1
;
eNB_instances
= [
0
];
eNB_instances
= [
0
];
# clock_src = "external";
# clock_src = "external";
}
}
...
...
ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
View file @
831c47c4
ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
View file @
831c47c4
...
@@ -260,8 +260,8 @@ NETWORK_CONTROLLER :
...
@@ -260,8 +260,8 @@ NETWORK_CONTROLLER :
FLEXRAN_AWAIT_RECONF
=
"no"
;
FLEXRAN_AWAIT_RECONF
=
"no"
;
};
};
log_config
:
log_config
:
{
{
global_log_level
=
"info"
;
global_log_level
=
"info"
;
global_log_verbosity
=
"medium"
;
global_log_verbosity
=
"medium"
;
hw_log_level
=
"info"
;
hw_log_level
=
"info"
;
...
@@ -276,4 +276,4 @@ NETWORK_CONTROLLER :
...
@@ -276,4 +276,4 @@ NETWORK_CONTROLLER :
pdcp_log_verbosity
=
"medium"
;
pdcp_log_verbosity
=
"medium"
;
rrc_log_level
=
"info"
;
rrc_log_level
=
"info"
;
rrc_log_verbosity
=
"medium"
;
rrc_log_verbosity
=
"medium"
;
};
};
ci-scripts/main.py
View file @
831c47c4
...
@@ -152,6 +152,7 @@ def GetParametersFromXML(action):
...
@@ -152,6 +152,7 @@ def GetParametersFromXML(action):
RAN
.
eNB_serverId
[
RAN
.
eNB_instance
]
=
eNB_serverId
RAN
.
eNB_serverId
[
RAN
.
eNB_instance
]
=
eNB_serverId
elif
action
==
'Initialize_eNB'
:
elif
action
==
'Initialize_eNB'
:
RAN
.
eNB_Trace
=
test
.
findtext
(
'eNB_Trace'
)
RAN
.
Initialize_eNB_args
=
test
.
findtext
(
'Initialize_eNB_args'
)
RAN
.
Initialize_eNB_args
=
test
.
findtext
(
'Initialize_eNB_args'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
if
(
eNB_instance
is
None
):
if
(
eNB_instance
is
None
):
...
@@ -196,6 +197,7 @@ def GetParametersFromXML(action):
...
@@ -196,6 +197,7 @@ def GetParametersFromXML(action):
elif
action
==
'Initialize_UE'
:
elif
action
==
'Initialize_UE'
:
ue_id
=
test
.
findtext
(
'id'
)
ue_id
=
test
.
findtext
(
'id'
)
CiTestObj
.
ue_trace
=
test
.
findtext
(
'UE_Trace'
)
#temporary variable, to be passed to Module_UE in Initialize_UE call
if
(
ue_id
is
None
):
if
(
ue_id
is
None
):
CiTestObj
.
ue_id
=
""
CiTestObj
.
ue_id
=
""
else
:
else
:
...
@@ -209,12 +211,25 @@ def GetParametersFromXML(action):
...
@@ -209,12 +211,25 @@ def GetParametersFromXML(action):
CiTestObj
.
ue_id
=
ue_id
CiTestObj
.
ue_id
=
ue_id
elif
action
==
'Attach_UE'
:
elif
action
==
'Attach_UE'
:
ue_id
=
test
.
findtext
(
'id'
)
if
(
ue_id
is
None
):
CiTestObj
.
ue_id
=
""
else
:
CiTestObj
.
ue_id
=
ue_id
nbMaxUEtoAttach
=
test
.
findtext
(
'nbMaxUEtoAttach'
)
nbMaxUEtoAttach
=
test
.
findtext
(
'nbMaxUEtoAttach'
)
if
(
nbMaxUEtoAttach
is
None
):
if
(
nbMaxUEtoAttach
is
None
):
CiTestObj
.
nbMaxUEtoAttach
=
-
1
CiTestObj
.
nbMaxUEtoAttach
=
-
1
else
:
else
:
CiTestObj
.
nbMaxUEtoAttach
=
int
(
nbMaxUEtoAttach
)
CiTestObj
.
nbMaxUEtoAttach
=
int
(
nbMaxUEtoAttach
)
elif
action
==
'Terminate_UE'
:
ue_id
=
test
.
findtext
(
'id'
)
if
(
ue_id
is
None
):
CiTestObj
.
ue_id
=
""
else
:
CiTestObj
.
ue_id
=
ue_id
elif
action
==
'CheckStatusUE'
:
elif
action
==
'CheckStatusUE'
:
expectedNBUE
=
test
.
findtext
(
'expectedNbOfConnectedUEs'
)
expectedNBUE
=
test
.
findtext
(
'expectedNbOfConnectedUEs'
)
if
(
expectedNBUE
is
None
):
if
(
expectedNBUE
is
None
):
...
@@ -468,13 +483,13 @@ elif re.match('^TerminateUE$', mode, re.IGNORECASE):
...
@@ -468,13 +483,13 @@ elif re.match('^TerminateUE$', mode, re.IGNORECASE):
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
CiTestObj
.
TerminateUE
(
HTML
,
COTS_UE
)
CiTestObj
.
TerminateUE
(
HTML
,
COTS_UE
,
InfraUE
,
CiTestObj
.
ue_trace
)
elif
re
.
match
(
'^TerminateOAIUE$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^TerminateOAIUE$'
,
mode
,
re
.
IGNORECASE
):
if
CiTestObj
.
UEIPAddress
==
''
or
CiTestObj
.
UEUserName
==
''
or
CiTestObj
.
UEPassword
==
''
:
if
CiTestObj
.
UEIPAddress
==
''
or
CiTestObj
.
UEUserName
==
''
or
CiTestObj
.
UEPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
sys
.
exit
(
'Insufficient Parameter'
)
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
CiTestObj
.
TerminateOAIUE
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
CiTestObj
.
TerminateOAIUE
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
elif
re
.
match
(
'^TerminateHSS$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^TerminateHSS$'
,
mode
,
re
.
IGNORECASE
):
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
Type
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
...
@@ -713,11 +728,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -713,11 +728,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif
action
==
'Terminate_eNB'
:
elif
action
==
'Terminate_eNB'
:
RAN
.
TerminateeNB
(
HTML
,
EPC
)
RAN
.
TerminateeNB
(
HTML
,
EPC
)
elif
action
==
'Initialize_UE'
:
elif
action
==
'Initialize_UE'
:
CiTestObj
.
InitializeUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
CiTestObj
.
InitializeUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CiTestObj
.
ue_trace
)
elif
action
==
'Terminate_UE'
:
elif
action
==
'Terminate_UE'
:
CiTestObj
.
TerminateUE
(
HTML
,
COTS_UE
)
CiTestObj
.
TerminateUE
(
HTML
,
COTS_UE
,
InfraUE
,
CiTestObj
.
ue_trace
)
elif
action
==
'Attach_UE'
:
elif
action
==
'Attach_UE'
:
CiTestObj
.
AttachUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
)
CiTestObj
.
AttachUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
elif
action
==
'Detach_UE'
:
elif
action
==
'Detach_UE'
:
CiTestObj
.
DetachUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
CiTestObj
.
DetachUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
elif
action
==
'DataDisable_UE'
:
elif
action
==
'DataDisable_UE'
:
...
@@ -725,23 +740,23 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -725,23 +740,23 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif
action
==
'DataEnable_UE'
:
elif
action
==
'DataEnable_UE'
:
CiTestObj
.
DataEnableUE
(
HTML
)
CiTestObj
.
DataEnableUE
(
HTML
)
elif
action
==
'CheckStatusUE'
:
elif
action
==
'CheckStatusUE'
:
CiTestObj
.
CheckStatusUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
)
CiTestObj
.
CheckStatusUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
elif
action
==
'Build_OAI_UE'
:
elif
action
==
'Build_OAI_UE'
:
CiTestObj
.
BuildOAIUE
(
HTML
)
CiTestObj
.
BuildOAIUE
(
HTML
)
elif
action
==
'Initialize_OAI_UE'
:
elif
action
==
'Initialize_OAI_UE'
:
CiTestObj
.
InitializeOAIUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
)
CiTestObj
.
InitializeOAIUE
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
elif
action
==
'Terminate_OAI_UE'
:
elif
action
==
'Terminate_OAI_UE'
:
CiTestObj
.
TerminateOAIUE
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
CiTestObj
.
TerminateOAIUE
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
elif
action
==
'Initialize_CatM_module'
:
elif
action
==
'Initialize_CatM_module'
:
CiTestObj
.
InitializeCatM
(
HTML
)
CiTestObj
.
InitializeCatM
(
HTML
)
elif
action
==
'Terminate_CatM_module'
:
elif
action
==
'Terminate_CatM_module'
:
CiTestObj
.
TerminateCatM
(
HTML
)
CiTestObj
.
TerminateCatM
(
HTML
)
elif
action
==
'Attach_CatM_module'
:
elif
action
==
'Attach_CatM_module'
:
CiTestObj
.
AttachCatM
(
HTML
,
RAN
,
COTS_UE
,
EPC
)
CiTestObj
.
AttachCatM
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
)
elif
action
==
'Detach_CatM_module'
:
elif
action
==
'Detach_CatM_module'
:
CiTestObj
.
TerminateCatM
(
HTML
)
CiTestObj
.
TerminateCatM
(
HTML
)
elif
action
==
'Ping_CatM_module'
:
elif
action
==
'Ping_CatM_module'
:
CiTestObj
.
PingCatM
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
EPC
)
CiTestObj
.
PingCatM
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
EPC
,
InfraUE
)
elif
action
==
'Ping'
:
elif
action
==
'Ping'
:
CiTestObj
.
Ping
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
CiTestObj
.
Ping
(
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
)
elif
action
==
'Iperf'
:
elif
action
==
'Iperf'
:
...
...
ci-scripts/ran.py
View file @
831c47c4
...
@@ -93,6 +93,7 @@ class RANManagement():
...
@@ -93,6 +93,7 @@ class RANManagement():
self
.
epcPcapFile
=
''
self
.
epcPcapFile
=
''
self
.
runtime_stats
=
''
self
.
runtime_stats
=
''
self
.
datalog_rt_stats
=
{}
self
.
datalog_rt_stats
=
{}
self
.
eNB_Trace
=
''
#if 'yes', Tshark will be launched at initialization
...
@@ -344,6 +345,22 @@ class RANManagement():
...
@@ -344,6 +345,22 @@ class RANManagement():
HTML
.
CreateHtmlTestRow
(
self
.
air_interface
[
self
.
eNB_instance
]
+
' '
+
self
.
Initialize_eNB_args
,
'KO'
,
self
.
pStatus
)
HTML
.
CreateHtmlTestRow
(
self
.
air_interface
[
self
.
eNB_instance
]
+
' '
+
self
.
Initialize_eNB_args
,
'KO'
,
self
.
pStatus
)
HTML
.
CreateHtmlTabFooter
(
False
)
HTML
.
CreateHtmlTabFooter
(
False
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
#Get pcap on S1 and X2 eNB interface, if enabled in the xml
#will not work for gNB at this stage
if
((
self
.
air_interface
[
self
.
eNB_instance
]
==
'lte-softmodem'
)
or
(
self
.
air_interface
[
self
.
eNB_instance
]
==
'ocp-enb'
))
and
self
.
eNB_Trace
==
'yes'
:
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
mySSH
.
command
(
'ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"'
,
'\$'
,
5
)
result
=
re
.
search
(
'interfaceToUse=(?P<eth_interface>[a-zA-Z0-9\-\_]+)done'
,
mySSH
.
getBefore
())
if
result
is
not
None
:
eth_interface
=
result
.
group
(
'eth_interface'
)
logging
.
debug
(
'
\u001B
[1m Launching tshark on interface '
+
eth_interface
+
'
\u001B
[0m'
)
pcapfile
=
'enb_'
+
self
.
testCase_id
+
'_s1x2log.pcap'
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S rm -f /tmp/'
+
pcapfile
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo -E tshark -i '
+
eth_interface
+
' -w /tmp/'
+
pcapfile
+
' 2>&1 &'
,
'\$'
,
5
)
mySSH
.
close
()
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
result
=
re
.
search
(
'T_stdout'
,
str
(
self
.
Initialize_eNB_args
))
result
=
re
.
search
(
'T_stdout'
,
str
(
self
.
Initialize_eNB_args
))
if
(
result
is
not
None
):
if
(
result
is
not
None
):
...
@@ -579,6 +596,10 @@ class RANManagement():
...
@@ -579,6 +596,10 @@ class RANManagement():
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true'
,
'\$'
,
5
)
time
.
sleep
(
5
)
time
.
sleep
(
5
)
mySSH
.
command
(
'rm -f my-lte-softmodem-run'
+
str
(
self
.
eNB_instance
)
+
'.sh'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f my-lte-softmodem-run'
+
str
(
self
.
eNB_instance
)
+
'.sh'
,
'\$'
,
5
)
#stopping tshark (valid if eNB and enabled in xml, will not harm otherwise)
logging
.
debug
(
'
\u001B
[1m Stopping tshark
\u001B
[0m'
)
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S killall --signal SIGKILL tshark'
,
'\$'
,
5
)
time
.
sleep
(
1
)
mySSH
.
close
()
mySSH
.
close
()
# If tracer options is on, stopping tshark on EPC side
# If tracer options is on, stopping tshark on EPC side
result
=
re
.
search
(
'T_stdout'
,
str
(
self
.
Initialize_eNB_args
))
result
=
re
.
search
(
'T_stdout'
,
str
(
self
.
Initialize_eNB_args
))
...
@@ -597,6 +618,7 @@ class RANManagement():
...
@@ -597,6 +618,7 @@ class RANManagement():
mySSH
.
close
()
mySSH
.
close
()
logging
.
debug
(
'
\u001B
[1m Replaying RAW record file
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m Replaying RAW record file
\u001B
[0m'
)
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
mySSH
.
command
(
'killall --signal SIGKILL record'
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
lSourcePath
+
'/common/utils/T/tracer/'
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
lSourcePath
+
'/common/utils/T/tracer/'
,
'\$'
,
5
)
enbLogFile
=
self
.
eNBLogFiles
[
int
(
self
.
eNB_instance
)]
enbLogFile
=
self
.
eNBLogFiles
[
int
(
self
.
eNB_instance
)]
raw_record_file
=
enbLogFile
.
replace
(
'.log'
,
'_record.raw'
)
raw_record_file
=
enbLogFile
.
replace
(
'.log'
,
'_record.raw'
)
...
@@ -650,9 +672,10 @@ class RANManagement():
...
@@ -650,9 +672,10 @@ class RANManagement():
mySSH
.
open
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
)
mySSH
.
open
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
)
mySSH
.
command
(
'cd '
+
self
.
eNBSourceCodePath
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
self
.
eNBSourceCodePath
,
'\$'
,
5
)
mySSH
.
command
(
'cd cmake_targets'
,
'\$'
,
5
)
mySSH
.
command
(
'cd cmake_targets'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S mv /tmp/enb_*_s1x2log.pcap .'
,
'\$'
,
20
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm -f enb.log.zip'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm -f enb.log.zip'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log'
,
'\$'
,
60
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log
*stats.log
'
,
'\$'
,
60
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt
physim_*.log *stats.log
'
,
'\$'
,
5
)
mySSH
.
close
()
mySSH
.
close
()
def
AnalyzeLogFile_eNB
(
self
,
eNBlogFile
,
HTML
):
def
AnalyzeLogFile_eNB
(
self
,
eNBlogFile
,
HTML
):
...
@@ -707,6 +730,8 @@ class RANManagement():
...
@@ -707,6 +730,8 @@ class RANManagement():
real_time_stats
=
{}
real_time_stats
=
{}
#count "problem receiving samples" msg
#count "problem receiving samples" msg
pb_receiving_samples_cnt
=
0
pb_receiving_samples_cnt
=
0
#count "removing UE" msg
removing_ue
=
0
#NSA specific log markers
#NSA specific log markers
nsa_markers
=
{
'SgNBReleaseRequestAcknowledge'
:
[],
'FAILURE'
:
[],
'scgFailureInformationNR-r15'
:
[],
'SgNBReleaseRequest'
:
[]}
nsa_markers
=
{
'SgNBReleaseRequestAcknowledge'
:
[],
'FAILURE'
:
[],
'scgFailureInformationNR-r15'
:
[],
'SgNBReleaseRequest'
:
[]}
...
@@ -903,6 +928,10 @@ class RANManagement():
...
@@ -903,6 +928,10 @@ class RANManagement():
result
=
re
.
search
(
'\[PHY\]\s+problem receiving samples'
,
str
(
line
))
result
=
re
.
search
(
'\[PHY\]\s+problem receiving samples'
,
str
(
line
))
if
result
is
not
None
:
if
result
is
not
None
:
pb_receiving_samples_cnt
+=
1
pb_receiving_samples_cnt
+=
1
#count "Removing UE" msg
result
=
re
.
search
(
'\[MAC\]\s+Removing UE'
,
str
(
line
))
if
result
is
not
None
:
removing_ue
+=
1
#nsa markers logging
#nsa markers logging
for
k
in
nsa_markers
:
for
k
in
nsa_markers
:
...
@@ -992,6 +1021,11 @@ class RANManagement():
...
@@ -992,6 +1021,11 @@ class RANManagement():
htmleNBFailureMsg
+=
statMsg
htmleNBFailureMsg
+=
statMsg
else
:
else
:
#Removing UE log
statMsg
=
'[MAC] Removing UE msg count = '
+
str
(
removing_ue
)
htmlMsg
=
statMsg
+
'
\n
'
logging
.
debug
(
statMsg
)
htmleNBFailureMsg
+=
htmlMsg
#nsa markers
#nsa markers
statMsg
=
'logfile line count = '
+
str
(
line_cnt
)
statMsg
=
'logfile line count = '
+
str
(
line_cnt
)
htmlMsg
=
statMsg
+
'
\n
'
htmlMsg
=
statMsg
+
'
\n
'
...
...
ci-scripts/runTestOnVM.sh
View file @
831c47c4
...
@@ -964,6 +964,12 @@ function start_l2_sim_ue {
...
@@ -964,6 +964,12 @@ function start_l2_sim_ue {
echo
"ifconfig"
>
$1
echo
"ifconfig"
>
$1
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_UE_VM_IP_ADDR
<
$1
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_UE_VM_IP_ADDR
<
$1
rm
$1
rm
$1
else
echo
"Setting Routes for all UEs"
echo
"cd /home/ubuntu/tmp/cmake_targets/tools"
>
$1
echo
"./setup_routes.sh
$LOC_NB_UES
"
>>
$1
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_UE_VM_IP_ADDR
<
$1
rm
$1
fi
fi
}
}
...
...
ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml
View file @
831c47c4
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<testCase
id=
"010101"
>
<testCase
id=
"010101"
>
<class>
Build_eNB
</class>
<class>
Build_eNB
</class>
<desc>
Build eNB (USRP)
</desc>
<desc>
Build eNB (USRP)
</desc>
<Build_eNB_args>
-w USRP -c --eNB
</Build_eNB_args>
<Build_eNB_args>
-w USRP -c --eNB
--ninja
</Build_eNB_args>
</testCase>
</testCase>
</testCaseList>
</testCaseList>
ci-scripts/xml_files/enb_usrp210_band13_build.xml
View file @
831c47c4
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<testCase
id=
"010101"
>
<testCase
id=
"010101"
>
<class>
Build_eNB
</class>
<class>
Build_eNB
</class>
<desc>
Build eNB (USRP)
</desc>
<desc>
Build eNB (USRP)
</desc>
<Build_eNB_args>
-w USRP -c --eNB
</Build_eNB_args>
<Build_eNB_args>
-w USRP -c --eNB
--ninja
</Build_eNB_args>
</testCase>
</testCase>
</testCaseList>
</testCaseList>
ci-scripts/xml_files/enb_usrp210_band40_build.xml
View file @
831c47c4
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<testCase
id=
"010101"
>
<testCase
id=
"010101"
>
<class>
Build_eNB
</class>
<class>
Build_eNB
</class>
<desc>
Build eNB (USRP)
</desc>
<desc>
Build eNB (USRP)
</desc>
<Build_eNB_args>
-w USRP -c --eNB
</Build_eNB_args>
<Build_eNB_args>
-w USRP -c --eNB
--ninja
</Build_eNB_args>
</testCase>
</testCase>
</testCaseList>
</testCaseList>
ci-scripts/xml_files/enb_usrp210_band7_build.xml
View file @
831c47c4
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<testCase
id=
"010101"
>
<testCase
id=
"010101"
>
<class>
Build_eNB
</class>
<class>
Build_eNB
</class>
<desc>
Build eNB (USRP)
</desc>
<desc>
Build eNB (USRP)
</desc>
<Build_eNB_args>
-w USRP -c --eNB
</Build_eNB_args>
<Build_eNB_args>
-w USRP -c --eNB
--ninja
</Build_eNB_args>
</testCase>
</testCase>
</testCaseList>
</testCaseList>
ci-scripts/xml_files/fr1_nsa_quectel.xml
View file @
831c47c4
...
@@ -24,21 +24,21 @@
...
@@ -24,21 +24,21 @@
<htmlTabRef>
TEST-NSA-FR1-TM1
</htmlTabRef>
<htmlTabRef>
TEST-NSA-FR1-TM1
</htmlTabRef>
<htmlTabName>
NSA Ping DL UL with QUECTEL
</htmlTabName>
<htmlTabName>
NSA Ping DL UL with QUECTEL
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
3
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
<TestCaseRequestedList>
030000
030000
040000
040000
000002
000002
010000
010000
000001
050000
050000
050001
050001
000001
000001
070000
070000
000001
000001
07000
0
07000
1
000001
000001
010002
010002
000001
080001
080001
080000
080000
</TestCaseRequestedList>
</TestCaseRequestedList>
...
@@ -48,12 +48,13 @@
...
@@ -48,12 +48,13 @@
<class>
Initialize_UE
</class>
<class>
Initialize_UE
</class>
<desc>
Initialize Quectel
</desc>
<desc>
Initialize Quectel
</desc>
<id>
idefix
</id>
<id>
idefix
</id>
<UE_Trace>
yes
</UE_Trace>
</testCase>
</testCase>
<testCase
id=
"010002"
>
<testCase
id=
"010002"
>
<class>
Detach
_UE
</class>
<class>
Terminate
_UE
</class>
<desc>
Detach UE
</desc>
<desc>
Terminate Quectel
</desc>
<id>
idefix
</id>
<id>
idefix
</id>
</testCase>
</testCase>
...
@@ -65,13 +66,14 @@
...
@@ -65,13 +66,14 @@
<eNB_instance>
0
</eNB_instance>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
<eNB_serverId>
0
</eNB_serverId>
<air_interface>
lte
</air_interface>
<air_interface>
lte
</air_interface>
<eNB_Trace>
yes
</eNB_Trace>
</testCase>
</testCase>
<testCase
id=
"040000"
>
<testCase
id=
"040000"
>
<class>
Initialize_eNB
</class>
<class>
Initialize_eNB
</class>
<desc>
Initialize gNB
</desc>
<desc>
Initialize gNB
</desc>
<Initialize_eNB_args>
-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrp
n310.conf
-q
</Initialize_eNB_args>
<Initialize_eNB_args>
-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrp
b210.conf -E
-q
</Initialize_eNB_args>
<eNB_instance>
1
</eNB_instance>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
<air_interface>
nr
</air_interface>
...
@@ -109,7 +111,7 @@
...
@@ -109,7 +111,7 @@
<testCase
id=
"070000"
>
<testCase
id=
"070000"
>
<class>
Iperf
</class>
<class>
Iperf
</class>
<desc>
iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<desc>
iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b 20M -t 60
-i 1
</iperf_args>
<iperf_args>
-u -b 20M -t 60
</iperf_args>
<direction>
DL
</direction>
<direction>
DL
</direction>
<id>
idefix
</id>
<id>
idefix
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
...
@@ -119,7 +121,7 @@
...
@@ -119,7 +121,7 @@
<testCase
id=
"070001"
>
<testCase
id=
"070001"
>
<class>
Iperf
</class>
<class>
Iperf
</class>
<desc>
iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<desc>
iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b 3M -t 60
-i 1
</iperf_args>
<iperf_args>
-u -b 3M -t 60
</iperf_args>
<direction>
UL
</direction>
<direction>
UL
</direction>
<id>
idefix
</id>
<id>
idefix
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
...
...
ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml
0 → 100644
View file @
831c47c4
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>
TEST-NSA-FR1-TM1
</htmlTabRef>
<htmlTabName>
NSA Ping Attach Detach with QUECTEL
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030000
040000
000002
010000
000001
050000
000001
010004
000001
010003
000001
050000
000001
010004
000001
010003
000001
050000
000001
010002
080001
080000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase
id=
"010000"
>
<class>
Initialize_UE
</class>
<desc>
Initialize Quectel
</desc>
<id>
idefix
</id>
<UE_Trace>
yes
</UE_Trace>
</testCase>
<testCase
id=
"010002"
>
<class>
Terminate_UE
</class>
<desc>
Terminate Quectel
</desc>
<id>
idefix
</id>
</testCase>
<testCase
id=
"010003"
>
<class>
Attach_UE
</class>
<desc>
Attach Quectel
</desc>
<id>
idefix
</id>
</testCase>
<testCase
id=
"010004"
>
<class>
Detach_UE
</class>
<desc>
Detach Quectel
</desc>
<id>
idefix
</id>
</testCase>
<testCase
id=
"030000"
>
<class>
Initialize_eNB
</class>
<desc>
Initialize eNB
</desc>
<Initialize_eNB_args>
-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
</Initialize_eNB_args>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
<air_interface>
lte
</air_interface>
<eNB_Trace>
yes
</eNB_Trace>
</testCase>
<testCase
id=
"040000"
>
<class>
Initialize_eNB
</class>
<desc>
Initialize gNB
</desc>
<Initialize_eNB_args>
-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q
</Initialize_eNB_args>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
</testCase>
<testCase
id=
"000001"
>
<class>
IdleSleep
</class>
<desc>
Sleep
</desc>
<idle_sleep_time_in_sec>
5
</idle_sleep_time_in_sec>
</testCase>
<testCase
id=
"000002"
>
<class>
IdleSleep
</class>
<desc>
Sleep
</desc>
<idle_sleep_time_in_sec>
20
</idle_sleep_time_in_sec>
</testCase>
<testCase
id=
"050000"
>
<class>
Ping
</class>
<desc>
Ping: 20pings in 20sec
</desc>
<id>
idefix
</id>
<ping_args>
-c 20
</ping_args>
<ping_packetloss_threshold>
50
</ping_packetloss_threshold>
</testCase>
<testCase
id=
"050001"
>
<class>
Ping
</class>
<desc>
Ping: 100pings in 20sec
</desc>
<id>
idefix
</id>
<ping_args>
-c 100 -i 0.2
</ping_args>
<ping_packetloss_threshold>
50
</ping_packetloss_threshold>
</testCase>
<testCase
id=
"070000"
>
<class>
Iperf
</class>
<desc>
iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b 20M -t 60
</iperf_args>
<direction>
DL
</direction>
<id>
idefix
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
<iperf_profile>
single-ue
</iperf_profile>
</testCase>
<testCase
id=
"070001"
>
<class>
Iperf
</class>
<desc>
iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b 3M -t 60
</iperf_args>
<direction>
UL
</direction>
<id>
idefix
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
<iperf_profile>
single-ue
</iperf_profile>
</testCase>
<testCase
id=
"080000"
>
<class>
Terminate_eNB
</class>
<desc>
Terminate eNB
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
<air_interface>
lte
</air_interface>
</testCase>
<testCase
id=
"080001"
>
<class>
Terminate_eNB
</class>
<desc>
Terminate gNB
</desc>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
</testCase>
</testCaseList>
ci-scripts/xml_files/fr1_nsa_quectel_long.xml
0 → 100644
View file @
831c47c4
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>
TEST-NSA-FR1-TM1
</htmlTabRef>
<htmlTabName>
NSA Ping DL UL with QUECTEL (Longer)
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030000
040000
000002
010000
000001
050000
050001
000001
070000
000001
070001
000001
010002
080001
080000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase
id=
"010000"
>
<class>
Initialize_UE
</class>
<desc>
Initialize Quectel
</desc>
<id>
idefix
</id>
</testCase>
<testCase
id=
"010002"
>
<class>
Terminate_UE
</class>
<desc>
Terminate Quectel
</desc>
<id>
idefix
</id>
</testCase>
<testCase
id=
"030000"
>
<class>
Initialize_eNB
</class>
<desc>
Initialize eNB
</desc>
<Initialize_eNB_args>
-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
</Initialize_eNB_args>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
<air_interface>
lte
</air_interface>
<eNB_Trace>
yes
</eNB_Trace>
</testCase>
<testCase
id=
"040000"
>
<class>
Initialize_eNB
</class>
<desc>
Initialize gNB
</desc>
<Initialize_eNB_args>
-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q
</Initialize_eNB_args>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
</testCase>
<testCase
id=
"000001"
>
<class>
IdleSleep
</class>
<desc>
Sleep
</desc>
<idle_sleep_time_in_sec>
5
</idle_sleep_time_in_sec>
</testCase>
<testCase
id=
"000002"
>
<class>
IdleSleep
</class>
<desc>
Sleep
</desc>
<idle_sleep_time_in_sec>
20
</idle_sleep_time_in_sec>
</testCase>
<testCase
id=
"050000"
>
<class>
Ping
</class>
<desc>
Ping: 20pings in 20sec
</desc>
<id>
idefix
</id>
<ping_args>
-c 20
</ping_args>
<ping_packetloss_threshold>
50
</ping_packetloss_threshold>
</testCase>
<testCase
id=
"050001"
>
<class>
Ping
</class>
<desc>
Ping: 100pings in 20sec
</desc>
<id>
idefix
</id>
<ping_args>
-c 100 -i 0.2
</ping_args>
<ping_packetloss_threshold>
50
</ping_packetloss_threshold>
</testCase>
<testCase
id=
"070000"
>
<class>
Iperf
</class>
<desc>
iperf (DL/20Mbps/UDP)(600 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b 20M -t 600
</iperf_args>
<direction>
DL
</direction>
<id>
idefix
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
<iperf_profile>
single-ue
</iperf_profile>
</testCase>
<testCase
id=
"070001"
>
<class>
Iperf
</class>
<desc>
iperf (UL/3Mbps/UDP)(600 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b 3M -t 600
</iperf_args>
<direction>
UL
</direction>
<id>
idefix
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
<iperf_profile>
single-ue
</iperf_profile>
</testCase>
<testCase
id=
"080000"
>
<class>
Terminate_eNB
</class>
<desc>
Terminate eNB
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
<air_interface>
lte
</air_interface>
</testCase>
<testCase
id=
"080001"
>
<class>
Terminate_eNB
</class>
<desc>
Terminate gNB
</desc>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
</testCase>
</testCaseList>
ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
View file @
831c47c4
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<testCase
id=
"010101"
>
<testCase
id=
"010101"
>
<class>
Build_eNB
</class>
<class>
Build_eNB
</class>
<desc>
Build eNB (USRP -- Ethernet Fronthaul)
</desc>
<desc>
Build eNB (USRP -- Ethernet Fronthaul)
</desc>
<Build_eNB_args>
-w USRP -c --eNB
</Build_eNB_args>
<Build_eNB_args>
-w USRP -c --eNB
--ninja
</Build_eNB_args>
</testCase>
</testCase>
</testCaseList>
</testCaseList>
ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
View file @
831c47c4
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<testCase
id=
"010101"
>
<testCase
id=
"010101"
>
<class>
Build_eNB
</class>
<class>
Build_eNB
</class>
<desc>
Build eNB (USRP -- Ethernet Fronthaul)
</desc>
<desc>
Build eNB (USRP -- Ethernet Fronthaul)
</desc>
<Build_eNB_args>
-w USRP -c --eNB
</Build_eNB_args>
<Build_eNB_args>
-w USRP -c --eNB
--ninja
</Build_eNB_args>
</testCase>
</testCase>
</testCaseList>
</testCaseList>
ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml
View file @
831c47c4
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<testCase
id=
"010102"
>
<testCase
id=
"010102"
>
<class>
Build_eNB
</class>
<class>
Build_eNB
</class>
<desc>
Build Slave eNB (USRP)
</desc>
<desc>
Build Slave eNB (USRP)
</desc>
<Build_eNB_args>
-w USRP -c --eNB
</Build_eNB_args>
<Build_eNB_args>
-w USRP -c --eNB
--ninja
</Build_eNB_args>
<eNB_instance>
1
</eNB_instance>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<eNB_serverId>
1
</eNB_serverId>
</testCase>
</testCase>
...
...
cmake_targets/tools/setup_routes.sh
0 → 100755
View file @
831c47c4
#!/bin/bash
for
i
in
$(
seq
1
$1
)
;
do
let
table
=
1000+
$i
echo
"sudo ip route add 10.0.1.0/24 dev oaitun_ue
$i
table
$table
"
sudo
ip route add 10.0.1.0/24 dev oaitun_ue
$i
table
$table
echo
"sudo ip route add default via 10.0.1.1 dev oaitun_ue
$i
table
$table
"
sudo
ip route add default via 10.0.1.1 dev oaitun_ue
$i
table
$table
let
octet
=
$i
+1
echo
"sudo ip rule add from 10.0.1.
$octet
table
$table
"
sudo
ip rule add from 10.0.1.
$octet
table
$table
done
common/utils/system.c
View file @
831c47c4
...
@@ -96,6 +96,51 @@ static void read_pipe(int p, char *b, int size) {
...
@@ -96,6 +96,51 @@ static void read_pipe(int p, char *b, int size) {
}
}
}
}
static
int
baseRunTimeCommand
(
char
*
cmd
,
size_t
cmdSize
)
{
FILE
*
fp
;
size_t
retSize
=
0
;
fp
=
popen
(
cmd
,
"r"
);
memset
(
cmd
,
0
,
cmdSize
);
retSize
=
fread
(
cmd
,
1
,
cmdSize
,
fp
);
fclose
(
fp
);
if
(
retSize
==
0
)
{
return
0
;
}
return
atoi
(
cmd
);
}
int
checkIfFedoraDistribution
(
void
)
{
char
cmd
[
200
];
memset
(
cmd
,
0
,
200
);
sprintf
(
cmd
,
"cat /etc/os-release | grep ID_LIKE | grep -ic fedora || true"
);
return
baseRunTimeCommand
(
cmd
,
200
);
}
int
checkIfGenericKernelOnFedora
(
void
)
{
char
cmd
[
200
];
memset
(
cmd
,
0
,
200
);
sprintf
(
cmd
,
"uname -a | grep -c rt || true"
);
return
(
1
-
baseRunTimeCommand
(
cmd
,
200
));
}
int
checkIfInsideContainer
(
void
)
{
char
cmd
[
200
];
int
res
=
0
;
memset
(
cmd
,
0
,
200
);
sprintf
(
cmd
,
"cat /proc/self/cgroup | egrep -c 'libpod|podman|kubepods' || true"
);
res
=
baseRunTimeCommand
(
cmd
,
200
);
if
(
res
>
0
)
return
1
;
else
return
0
;
}
/********************************************************************/
/********************************************************************/
/* background process */
/* background process */
/********************************************************************/
/********************************************************************/
...
@@ -200,12 +245,19 @@ void start_background_system(void) {
...
@@ -200,12 +245,19 @@ void start_background_system(void) {
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
){
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
){
pthread_attr_t
attr
;
pthread_attr_t
attr
;
int
ret
;
int
ret
;
int
settingPriority
=
1
;
ret
=
pthread_attr_init
(
&
attr
);
ret
=
pthread_attr_init
(
&
attr
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
);
ret
=
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
ret
=
pthread_attr_setinheritsched
(
&
attr
,
PTHREAD_EXPLICIT_SCHED
);
ret
=
pthread_attr_setinheritsched
(
&
attr
,
PTHREAD_EXPLICIT_SCHED
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
if
(
checkIfFedoraDistribution
())
if
(
checkIfGenericKernelOnFedora
())
if
(
checkIfInsideContainer
())
settingPriority
=
0
;
if
(
settingPriority
)
{
ret
=
pthread_attr_setschedpolicy
(
&
attr
,
SCHED_OAI
);
ret
=
pthread_attr_setschedpolicy
(
&
attr
,
SCHED_OAI
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
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
))
{
if
(
priority
<
sched_get_priority_min
(
SCHED_OAI
)
||
priority
>
sched_get_priority_max
(
SCHED_FIFO
))
{
...
@@ -223,6 +275,8 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
...
@@ -223,6 +275,8 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
sparam
.
sched_priority
=
priority
;
sparam
.
sched_priority
=
priority
;
ret
=
pthread_attr_setschedparam
(
&
attr
,
&
sparam
);
ret
=
pthread_attr_setschedparam
(
&
attr
,
&
sparam
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
}
ret
=
pthread_create
(
t
,
&
attr
,
func
,
param
);
ret
=
pthread_create
(
t
,
&
attr
,
func
,
param
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
...
...
common/utils/system.h
View file @
831c47c4
...
@@ -58,6 +58,14 @@ void thread_top_init(char *thread_name,
...
@@ -58,6 +58,14 @@ void thread_top_init(char *thread_name,
uint64_t
deadline
,
uint64_t
deadline
,
uint64_t
period
);
uint64_t
period
);
/****************************************************
* Functions to check system at runtime.
****************************************************/
int
checkIfFedoraDistribution
(
void
);
int
checkIfGenericKernelOnFedora
(
void
);
int
checkIfInsideContainer
(
void
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
doc/TESTING_GNB_W_COTS_UE.md
View file @
831c47c4
...
@@ -44,6 +44,7 @@ Our code might not work with all 5G phones yet, but we are constantly improving
...
@@ -44,6 +44,7 @@ Our code might not work with all 5G phones yet, but we are constantly improving
*
Oppo Reno 5G
*
Oppo Reno 5G
*
Samsung A90 5G
*
Samsung A90 5G
*
Samsung A42 5G
*
Google Pixel 5G (note1)
*
Google Pixel 5G (note1)
*
Simcom SIMCOM8200EA
*
Simcom SIMCOM8200EA
*
Quectel RM500Q-GL
*
Quectel RM500Q-GL
...
...
docker/Dockerfile.lteRU.rhel8.2
0 → 100644
View file @
831c47c4
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for RHEL8
#
#---------------------------------------------------------------------
FROM ran-build:latest AS ru-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --RU --ninja -w USRP --verbose-ci
RUN yum install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru
ENV TZ=Europe/Paris
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
tzdata \
atlas \
net-tools \
iputils \
iproute && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-lte-ru/bin
COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
# Copying from the ran-build image the USRP needed packages
COPY --from=ru-build /lib64/libconfig.so.9 /lib64
COPY --from=ru-build /lib64/libblas.so.3 /lib64
COPY --from=ru-build /lib64/liblapack.so.3 /lib64
COPY --from=ru-build /lib64/liblapacke.so.3 /lib64
COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_program_options.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_serialization.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_thread.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
ldconfig
# Copy the relevant configuration files for RRU
WORKDIR /opt/oai-lte-ru/etc
COPY --from=ru-build /oai-ran/docker/etc/rru* ./
WORKDIR /opt/oai-lte-ru
ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
docker/Dockerfile.lteRU.ubuntu18
0 → 100644
View file @
831c47c4
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
#
#---------------------------------------------------------------------
FROM ran-build:latest AS ru-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --RU --ninja -w USRP --verbose-ci
RUN apt-get install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM ubuntu:bionic as oai-lte-ru
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
tzdata \
software-properties-common \
libblas3 \
libatlas3-base \
libconfig9 \
net-tools \
iputils-ping \
iproute2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \
libusb-1.0-0 \
libuhd003 \
uhd-host && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-lte-ru/bin
COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
ldconfig
# Copy the relevant configuration files for RRU
WORKDIR /opt/oai-lte-ru/etc
COPY --from=ru-build /oai-ran/docker/etc/rru* ./
WORKDIR /opt/oai-lte-ru
ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
docker/scripts/enb_entrypoint.sh
View file @
831c47c4
...
@@ -11,6 +11,8 @@ if [[ -v USE_FDD_DU ]]; then ln -s $PREFIX/etc/du.fdd.conf $PREFIX/etc/enb.conf;
...
@@ -11,6 +11,8 @@ if [[ -v USE_FDD_DU ]]; then ln -s $PREFIX/etc/du.fdd.conf $PREFIX/etc/enb.conf;
if
[[
-v
USE_FDD_MONO
]]
;
then
ln
-s
$PREFIX
/etc/enb.fdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_FDD_MONO
]]
;
then
ln
-s
$PREFIX
/etc/enb.fdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_TDD_MONO
]]
;
then
ln
-s
$PREFIX
/etc/enb.tdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_TDD_MONO
]]
;
then
ln
-s
$PREFIX
/etc/enb.tdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_FDD_FAPI_RCC
]]
;
then
ln
-s
$PREFIX
/etc/rcc.nfapi.fdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_FDD_FAPI_RCC
]]
;
then
ln
-s
$PREFIX
/etc/rcc.nfapi.fdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_FDD_IF4P5_RCC
]]
;
then
ln
-s
$PREFIX
/etc/rcc.if4p5.fdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_TDD_IF4P5_RCC
]]
;
then
ln
-s
$PREFIX
/etc/rcc.if4p5.tdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_FDD_RRU
]]
;
then
ln
-s
$PREFIX
/etc/rru.fdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_FDD_RRU
]]
;
then
ln
-s
$PREFIX
/etc/rru.fdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_TDD_RRU
]]
;
then
ln
-s
$PREFIX
/etc/rru.tdd.conf
$PREFIX
/etc/enb.conf
;
fi
if
[[
-v
USE_TDD_RRU
]]
;
then
ln
-s
$PREFIX
/etc/rru.tdd.conf
$PREFIX
/etc/enb.conf
;
fi
...
...
docker/scripts/enb_parameters.yaml
View file @
831c47c4
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
dest_dir
:
docker/etc
dest_dir
:
docker/etc
-
configurations
:
-
configurations
:
-
filePrefix
:
cu
-
filePrefix
:
cu
.band7.tm1.25PRB
outputfilename
:
"
cu.fdd.conf"
outputfilename
:
"
cu.fdd.conf"
config
:
config
:
-
key
:
Active_eNBs
-
key
:
Active_eNBs
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
-
key
:
ENB_IPV4_ADDRESS_FOR_X2C
-
key
:
ENB_IPV4_ADDRESS_FOR_X2C
env
:
"
@F1_CU_IP_ADDRESS@"
env
:
"
@F1_CU_IP_ADDRESS@"
-
filePrefix
:
du
-
filePrefix
:
du
.band7.tm1.25PRB
outputfilename
:
"
du.fdd.conf"
outputfilename
:
"
du.fdd.conf"
config
:
config
:
-
key
:
Active_eNBs
-
key
:
Active_eNBs
...
@@ -248,3 +248,89 @@
...
@@ -248,3 +248,89 @@
-
key
:
ENB_IPV4_ADDRESS_FOR_X2C
-
key
:
ENB_IPV4_ADDRESS_FOR_X2C
env
:
"
@F1_CU_IP_ADDRESS@"
env
:
"
@F1_CU_IP_ADDRESS@"
-
filePrefix
:
"
rcc.band7.tm1.if4p5.lo.25PRB"
outputfilename
:
"
rcc.if4p5.fdd.conf"
config
:
-
key
:
Active_eNBs
env
:
"
@ENB_NAME@"
-
key
:
eNB_name
env
:
"
@ENB_NAME@"
-
key
:
plmn_list
env
:
mcc
:
"
@MCC@"
mnc
:
"
@MNC@"
mnc_length
:
"
@MNC_LENGTH@"
-
key
:
tracking_area_code
env
:
"
@TAC@"
-
key
:
eutra_band
env
:
"
@UTRA_BAND_ID@"
-
key
:
downlink_frequency
env
:
"
@DL_FREQUENCY_IN_MHZ@000000"
-
key
:
uplink_frequency_offset
env
:
"
@UL_FREQUENCY_OFFSET_IN_MHZ@000000"
-
key
:
Nid_cell
env
:
"
@NID_CELL@"
-
key
:
N_RB_DL
env
:
"
@NB_PRB@"
-
key
:
ipv4
env
:
"
@MME_S1C_IP_ADDRESS@"
-
key
:
ENB_INTERFACE_NAME_FOR_S1_MME
env
:
"
@RCC_IF_NAME@"
-
key
:
ENB_IPV4_ADDRESS_FOR_S1_MME
env
:
"
@RCC_S1C_IP_ADDRESS@"
-
key
:
ENB_INTERFACE_NAME_FOR_S1U
env
:
"
@RCC_IF_NAME@"
-
key
:
ENB_IPV4_ADDRESS_FOR_S1U
env
:
"
@RCC_IP_ADDRESS@"
-
key
:
ENB_IPV4_ADDRESS_FOR_X2C
env
:
"
@RCC_IP_ADDRESS@"
-
key
:
local_if_name
env
:
"
@IF4P5_IF_NAME@"
-
key
:
remote_address
env
:
"
@IF4P5_RRU_IP_ADDRESS@"
-
key
:
local_address
env
:
"
@IF4P5_RCC_IP_ADDRESS@"
-
filePrefix
:
"
rcc.band40.tm1.25PRB"
outputfilename
:
"
rcc.if4p5.tdd.conf"
config
:
-
key
:
Active_eNBs
env
:
"
@ENB_NAME@"
-
key
:
eNB_name
env
:
"
@ENB_NAME@"
-
key
:
plmn_list
env
:
mcc
:
"
@MCC@"
mnc
:
"
@MNC@"
mnc_length
:
"
@MNC_LENGTH@"
-
key
:
tracking_area_code
env
:
"
@TAC@"
-
key
:
eutra_band
env
:
"
@UTRA_BAND_ID@"
-
key
:
downlink_frequency
env
:
"
@DL_FREQUENCY_IN_MHZ@000000"
-
key
:
uplink_frequency_offset
env
:
"
@UL_FREQUENCY_OFFSET_IN_MHZ@000000"
-
key
:
Nid_cell
env
:
"
@NID_CELL@"
-
key
:
N_RB_DL
env
:
"
@NB_PRB@"
-
key
:
ipv4
env
:
"
@MME_S1C_IP_ADDRESS@"
-
key
:
ENB_INTERFACE_NAME_FOR_S1_MME
env
:
"
@RCC_IF_NAME@"
-
key
:
ENB_IPV4_ADDRESS_FOR_S1_MME
env
:
"
@RCC_S1C_IP_ADDRESS@"
-
key
:
ENB_INTERFACE_NAME_FOR_S1U
env
:
"
@RCC_IF_NAME@"
-
key
:
ENB_IPV4_ADDRESS_FOR_S1U
env
:
"
@RCC_IP_ADDRESS@"
-
key
:
ENB_IPV4_ADDRESS_FOR_X2C
env
:
"
@RCC_IP_ADDRESS@"
-
key
:
local_if_name
env
:
"
@IF4P5_IF_NAME@"
-
key
:
remote_address
env
:
"
@IF4P5_RRU_IP_ADDRESS@"
-
key
:
local_address
env
:
"
@IF4P5_RCC_IP_ADDRESS@"
docker/scripts/generateTemplate.py
View file @
831c47c4
...
@@ -39,20 +39,24 @@ def main():
...
@@ -39,20 +39,24 @@ def main():
for
config
in
data
[
1
][
"configurations"
]:
for
config
in
data
[
1
][
"configurations"
]:
filePrefix
=
config
[
"filePrefix"
]
filePrefix
=
config
[
"filePrefix"
]
outputfilename
=
config
[
"outputfilename"
]
outputfilename
=
config
[
"outputfilename"
]
print
(
'================================================'
)
print
(
'filePrefix = '
+
filePrefix
)
print
(
'filePrefix = '
+
filePrefix
)
print
(
'outputfilename = '
+
outputfilename
)
print
(
'outputfilename = '
+
outputfilename
)
for
inputfile
in
dir
:
for
inputfile
in
dir
:
if
inputfile
.
find
(
filePrefix
)
>=
0
:
if
inputfile
.
find
(
filePrefix
)
>=
0
:
prefix_outputfile
=
{
"cu"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
prefix_outputfile
=
{
"cu
.band7.tm1.25PRB
"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"du"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"du
.band7.tm1.25PRB
"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rru.fdd"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rru.fdd"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rru.tdd"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rru.tdd"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"enb.band7.tm1.25PRB.usrpb210"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"enb.band7.tm1.25PRB.usrpb210"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"enb.band40.tm1.25PRB.FairScheduler.usrpb210"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"enb.band40.tm1.25PRB.FairScheduler.usrpb210"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rcc.band7.tm1.nfapi"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rcc.band7.tm1.nfapi"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rcc.band7.tm1.if4p5.lo.25PRB"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"rcc.band40.tm1.25PRB"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"ue.nfapi"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"ue.nfapi"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
,
"ue_sim_ci"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
"ue_sim_ci"
:
f'
{
data
[
0
][
"paths"
][
"dest_dir"
]
}
/
{
outputfilename
}
'
}
}
print
(
'inputfile = '
+
inputfile
)
if
filePrefix
in
prefix_outputfile
:
if
filePrefix
in
prefix_outputfile
:
outputfile1
=
prefix_outputfile
[
filePrefix
]
outputfile1
=
prefix_outputfile
[
filePrefix
]
...
...
docker/scripts/lte_ru_entrypoint.sh
0 → 100755
View file @
831c47c4
#!/bin/bash
set
-euo
pipefail
PREFIX
=
/opt/oai-lte-ru
# Based another env var, pick one template to use
if
[[
-v
USE_FDD_RRU
]]
;
then
ln
-s
$PREFIX
/etc/rru.fdd.conf
$PREFIX
/etc/rru.conf
;
fi
if
[[
-v
USE_TDD_RRU
]]
;
then
ln
-s
$PREFIX
/etc/rru.tdd.conf
$PREFIX
/etc/rru.conf
;
fi
# Only this template will be manipulated
CONFIG_FILES
=
`
ls
$PREFIX
/etc/rru.conf
||
true
`
for
c
in
${
CONFIG_FILES
}
;
do
# grep variable names (format: ${VAR}) from template to be rendered
VARS
=
$(
grep
-oP
'@[a-zA-Z0-9_]+@'
${
c
}
|
sort
|
uniq
| xargs
)
# create sed expressions for substituting each occurrence of ${VAR}
# with the value of the environment variable "VAR"
EXPRESSIONS
=
""
for
v
in
${
VARS
}
;
do
NEW_VAR
=
`
echo
$v
|
sed
-e
"s#@##g"
`
if
[[
"
${
!NEW_VAR
}
x"
==
"x"
]]
;
then
echo
"Error: Environment variable '
${
NEW_VAR
}
' is not set."
\
"Config file '
$(
basename
$c
)
' requires all of
$VARS
."
exit
1
fi
EXPRESSIONS
=
"
${
EXPRESSIONS
}
;s|
${
v
}
|
${
!NEW_VAR
}
|g"
done
EXPRESSIONS
=
"
${
EXPRESSIONS
#
';'
}
"
# render template and inline replace config file
sed
-i
"
${
EXPRESSIONS
}
"
${
c
}
done
# Load the USRP binaries
if
[[
-v
USE_B2XX
]]
;
then
/usr/lib/uhd/utils/uhd_images_downloader.py
-t
b2xx
elif
[[
-v
USE_X3XX
]]
;
then
/usr/lib/uhd/utils/uhd_images_downloader.py
-t
x3xx
elif
[[
-v
USE_N3XX
]]
;
then
/usr/lib/uhd/utils/uhd_images_downloader.py
-t
n3xx
fi
echo
"=================================="
echo
"== Starting eNB soft modem"
if
[[
-v
USE_ADDITIONAL_OPTIONS
]]
;
then
echo
"Additional option(s):
${
USE_ADDITIONAL_OPTIONS
}
"
new_args
=()
while
[[
$#
-gt
0
]]
;
do
new_args+
=(
"
$1
"
)
shift
done
for
word
in
${
USE_ADDITIONAL_OPTIONS
}
;
do
new_args+
=(
"
$word
"
)
done
echo
"
${
new_args
[@]
}
"
exec
"
${
new_args
[@]
}
"
else
echo
"
$@
"
exec
"
$@
"
fi
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
831c47c4
...
@@ -417,7 +417,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
...
@@ -417,7 +417,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int
dmrs_scrambling_id
=
0
,
data_scrambling_id
=
0
;
int
dmrs_scrambling_id
=
0
,
data_scrambling_id
=
0
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
NR_PUCCH_Resource_t
*
pucch_resource
;
NR_PUCCH_Resource_t
*
pucch_resource
=
NULL
;
uint16_t
crnti
=
mac
->
crnti
;
uint16_t
crnti
=
mac
->
crnti
;
NR_BWP_Id_t
bwp_id
=
mac
->
UL_BWP_Id
;
NR_BWP_Id_t
bwp_id
=
mac
->
UL_BWP_Id
;
...
@@ -497,7 +497,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
...
@@ -497,7 +497,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
pucch_resource_set
=
find_pucch_resource_set
(
mac
,
gNB_id
,
N_UCI
);
pucch_resource_set
=
find_pucch_resource_set
(
mac
,
gNB_id
,
N_UCI
);
if
(
pucch_resource_set
!=
MAX_NB_OF_PUCCH_RESOURCE_SETS
)
{
if
(
pucch_resource_set
!=
MAX_NB_OF_PUCCH_RESOURCE_SETS
)
{
pucch_resource_indicator
=
0
;
pucch_resource_indicator
=
0
;
pucch_resource_id
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set
]
->
resourceList
.
list
.
array
[
pucch_resource_indicator
][
0
];
/* get the first resource of the set */
/* get the first resource of the set */
pucch_resource_id
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set
]
->
resourceList
.
list
.
array
[
pucch_resource_indicator
][
0
];
}
}
else
{
else
{
LOG_W
(
PHY
,
"PUCCH no resource set found for CSI at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
LOG_W
(
PHY
,
"PUCCH no resource set found for CSI at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
...
@@ -639,7 +640,6 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
...
@@ -639,7 +640,6 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int
O_CRC
=
0
;
int
O_CRC
=
0
;
nb_symbols
=
nb_symbols_total
;
/* by default, it can be reduced due to symbols reserved for dmrs */
nb_symbols
=
nb_symbols_total
;
/* by default, it can be reduced due to symbols reserved for dmrs */
pucch_resource
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
array
[
pucch_resource_id
];
switch
(
format
)
{
switch
(
format
)
{
case
pucch_format0_nr
:
case
pucch_format0_nr
:
...
@@ -1122,7 +1122,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
...
@@ -1122,7 +1122,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
int
current_resource_id
=
MAX_NB_OF_PUCCH_RESOURCES
;
int
current_resource_id
=
MAX_NB_OF_PUCCH_RESOURCES
;
pucch_format_nr_t
format_pucch
;
pucch_format_nr_t
format_pucch
;
int
ready_pucch_resource_id
=
FALSE
;
/* in the case that it is already given */
int
ready_pucch_resource_id
=
FALSE
;
/* in the case that it is already given */
NR_PUCCH_Resource_t
*
pucch_resource
;
NR_PUCCH_Resource_t
*
pucch_resource
=
NULL
;
NR_BWP_Id_t
bwp_id
=
mac
->
UL_BWP_Id
;
NR_BWP_Id_t
bwp_id
=
mac
->
UL_BWP_Id
;
/* ini values to unset */
/* ini values to unset */
...
@@ -1193,6 +1193,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
...
@@ -1193,6 +1193,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
}
}
if
(
resource_set_found
==
TRUE
)
{
if
(
resource_set_found
==
TRUE
)
{
if
(
pucch_resource_indicator
<
MAX_PUCCH_RESOURCE_INDICATOR
)
{
if
(
pucch_resource_indicator
<
MAX_PUCCH_RESOURCE_INDICATOR
)
{
// Verify that the value of pucch_resource_indicator is valid
// Verify that the value of pucch_resource_indicator is valid
if
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
resourceList
.
list
.
count
<=
pucch_resource_indicator
)
if
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
resourceList
.
list
.
count
<=
pucch_resource_indicator
)
...
@@ -1202,7 +1203,6 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
...
@@ -1202,7 +1203,6 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
}
}
/* check if resource indexing by pucch_resource_indicator of this set is compatible */
/* check if resource indexing by pucch_resource_indicator of this set is compatible */
if
((
ready_pucch_resource_id
==
TRUE
)
||
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
resourceList
.
list
.
array
[
pucch_resource_indicator
][
0
]
!=
MAX_NB_OF_PUCCH_RESOURCES
))
{
if
((
ready_pucch_resource_id
==
TRUE
)
||
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
resourceList
.
list
.
array
[
pucch_resource_indicator
][
0
]
!=
MAX_NB_OF_PUCCH_RESOURCES
))
{
if
(
ready_pucch_resource_id
==
TRUE
)
{
if
(
ready_pucch_resource_id
==
TRUE
)
{
current_resource_id
=
*
resource_id
;
current_resource_id
=
*
resource_id
;
}
}
...
@@ -1236,17 +1236,14 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
...
@@ -1236,17 +1236,14 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
}
}
}
}
/*uint8_t pucch_resource_count = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList.
list.count;
uint8_t
pucch_resource_count
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
count
;
for
(
uint8_t
i
=
0
;
i
<
pucch_resource_count
;
i
++
)
{
for
(
uint8_t
i
=
0
;
i
<
pucch_resource_count
;
i
++
)
{
if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList.list.array[i]->pucch_ResourceId == current_resource_id)
if
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
array
[
i
]
->
pucch_ResourceId
==
current_resource_id
)
pucch_resource = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList.list.array[i];
pucch_resource
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
array
[
i
];
}*/
}
pucch_resource
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
array
[
current_resource_id
];
if
(
pucch_resource
!=
NULL
)
{
if
(
pucch_resource
!=
NULL
)
{
format_pucch
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
array
[
current_resource_id
]
->
format
.
present
;
format_pucch
=
pucch_resource
->
format
.
present
;
nb_symbols_for_tx
=
get_nb_symbols_pucch
(
pucch_resource
,
format_pucch
);
nb_symbols_for_tx
=
get_nb_symbols_pucch
(
pucch_resource
,
format_pucch
);
if
(
check_pucch_format
(
mac
,
gNB_id
,
format_pucch
,
nb_symbols_for_tx
,
uci_size
)
==
TRUE
)
{
if
(
check_pucch_format
(
mac
,
gNB_id
,
format_pucch
,
nb_symbols_for_tx
,
uci_size
)
==
TRUE
)
{
*
resource_set_id
=
pucch_resource_set_id
;
*
resource_set_id
=
pucch_resource_set_id
;
*
resource_id
=
current_resource_id
;
*
resource_id
=
current_resource_id
;
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
831c47c4
...
@@ -1081,6 +1081,12 @@ pdcp_data_ind(
...
@@ -1081,6 +1081,12 @@ pdcp_data_ind(
pdcpHead
->
inst
=
1
;
pdcpHead
->
inst
=
1
;
}
}
}
// nfapi_mode
}
// nfapi_mode
}
else
{
if
(
UE_NAS_USE_TUN
)
{
pdcpHead
->
inst
=
ctxt_pP
->
module_id
;
}
else
if
(
ENB_NAS_USE_TUN
)
{
pdcpHead
->
inst
=
0
;
}
}
}
}
else
{
}
else
{
pdcpHead
->
rb_id
=
rb_id
+
(
ctxt_pP
->
module_id
*
LTE_maxDRB
);
pdcpHead
->
rb_id
=
rb_id
+
(
ctxt_pP
->
module_id
*
LTE_maxDRB
);
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
831c47c4
...
@@ -43,6 +43,7 @@ extern int otg_enabled;
...
@@ -43,6 +43,7 @@ extern int otg_enabled;
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <unistd.h>
#include <unistd.h>
#include <netinet/ip.h>
#define rtf_put write
#define rtf_put write
#define rtf_get read
#define rtf_get read
...
@@ -222,7 +223,11 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -222,7 +223,11 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
key
=
PDCP_COLL_KEY_DEFAULT_DRB_VALUE
(
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
);
key
=
PDCP_COLL_KEY_DEFAULT_DRB_VALUE
(
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
);
h_rc
=
hashtable_get
(
pdcp_coll_p
,
key
,
(
void
**
)
&
pdcp_p
);
h_rc
=
hashtable_get
(
pdcp_coll_p
,
key
,
(
void
**
)
&
pdcp_p
);
}
else
{
// => ENB_NAS_USE_TUN
}
else
{
// => ENB_NAS_USE_TUN
ctxt
.
rnti
=
pdcp_eNB_UE_instance_to_rnti
[
0
];
/* Get the IP from a packet */
struct
ip
*
ip_pack
=
(
struct
ip
*
)
nl_rx_buf
;
/* Use last octet of destination IP to get index of UE */
int
ue_indx
=
((
ip_pack
->
ip_dst
.
s_addr
>>
24
)
-
2
)
%
MAX_MOBILES_PER_ENB
;
ctxt
.
rnti
=
pdcp_eNB_UE_instance_to_rnti
[
ue_indx
];
ctxt
.
enb_flag
=
ENB_FLAG_YES
;
ctxt
.
enb_flag
=
ENB_FLAG_YES
;
ctxt
.
module_id
=
0
;
ctxt
.
module_id
=
0
;
key
=
PDCP_COLL_KEY_VALUE
(
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
,
rab_id
,
SRB_FLAG_NO
);
key
=
PDCP_COLL_KEY_VALUE
(
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
,
rab_id
,
SRB_FLAG_NO
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
View file @
831c47c4
...
@@ -77,7 +77,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
...
@@ -77,7 +77,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
}
}
rx_deliv_sn
=
entity
->
rx_deliv
&
entity
->
sn_max
;
rx_deliv_sn
=
entity
->
rx_deliv
&
entity
->
sn_max
;
rx_deliv_hfn
=
(
entity
->
rx_deliv
>>
entity
->
sn_size
)
&
~
entity
->
sn_max
;
rx_deliv_hfn
=
entity
->
rx_deliv
>>
entity
->
sn_size
;
if
(
rcvd_sn
<
rx_deliv_sn
-
entity
->
window_size
)
{
if
(
rcvd_sn
<
rx_deliv_sn
-
entity
->
window_size
)
{
rcvd_hfn
=
rx_deliv_hfn
+
1
;
rcvd_hfn
=
rx_deliv_hfn
+
1
;
...
@@ -138,7 +138,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
...
@@ -138,7 +138,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
entity
->
rx_deliv
=
count
;
entity
->
rx_deliv
=
count
;
}
}
if
(
entity
->
t_reordering_start
!=
0
&&
entity
->
rx_deliv
>
entity
->
rx_reord
)
{
if
(
entity
->
t_reordering_start
!=
0
&&
entity
->
rx_deliv
>
=
entity
->
rx_reord
)
{
/* stop and reset t-Reordering */
/* stop and reset t-Reordering */
entity
->
t_reordering_start
=
0
;
entity
->
t_reordering_start
=
0
;
}
}
...
@@ -217,6 +217,10 @@ static void check_t_reordering(nr_pdcp_entity_t *entity)
...
@@ -217,6 +217,10 @@ static void check_t_reordering(nr_pdcp_entity_t *entity)
{
{
uint32_t
count
;
uint32_t
count
;
/* if t_reordering is set to "infinity" (seen as -1) then do nothing */
if
(
entity
->
t_reordering
==
-
1
)
return
;
if
(
entity
->
t_reordering_start
==
0
if
(
entity
->
t_reordering_start
==
0
||
entity
->
t_current
<=
entity
->
t_reordering_start
+
entity
->
t_reordering
)
||
entity
->
t_current
<=
entity
->
t_reordering_start
+
entity
->
t_reordering
)
return
;
return
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
View file @
831c47c4
...
@@ -55,8 +55,8 @@ typedef struct nr_pdcp_entity_t {
...
@@ -55,8 +55,8 @@ typedef struct nr_pdcp_entity_t {
int
rb_id
;
int
rb_id
;
int
sn_size
;
/* SN size, in bits */
int
sn_size
;
/* SN size, in bits */
int
t_reordering
;
/* unit: ms */
int
t_reordering
;
/* unit: ms
, -1 for infinity
*/
int
discard_timer
;
/* unit: ms */
int
discard_timer
;
/* unit: ms
, -1 for infinity
*/
int
sn_max
;
/* (2^SN_size) - 1 */
int
sn_max
;
/* (2^SN_size) - 1 */
int
window_size
;
/* 2^(SN_size - 1) */
int
window_size
;
/* 2^(SN_size - 1) */
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
831c47c4
...
@@ -610,11 +610,17 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
...
@@ -610,11 +610,17 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
nr_pdcp_ue_t
*
ue
;
nr_pdcp_ue_t
*
ue
;
int
drb_id
=
s
->
drb_Identity
;
int
drb_id
=
s
->
drb_Identity
;
int
t_reordering
=
decode_t_reordering
(
*
s
->
pdcp_Config
->
t_Reordering
)
;
int
t_reordering
;
int
sn_size_ul
=
decode_sn_size_ul
(
*
s
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
);
int
sn_size_ul
=
decode_sn_size_ul
(
*
s
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
);
int
sn_size_dl
=
decode_sn_size_dl
(
*
s
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
);
int
sn_size_dl
=
decode_sn_size_dl
(
*
s
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
);
int
discard_timer
=
decode_discard_timer
(
*
s
->
pdcp_Config
->
drb
->
discardTimer
);
int
discard_timer
=
decode_discard_timer
(
*
s
->
pdcp_Config
->
drb
->
discardTimer
);
/* if pdcp_Config->t_Reordering is not present, it means infinity (-1) */
if
(
s
->
pdcp_Config
->
t_Reordering
!=
NULL
)
t_reordering
=
decode_t_reordering
(
*
s
->
pdcp_Config
->
t_Reordering
);
else
t_reordering
=
-
1
;
/* TODO(?): accept different UL and DL SN sizes? */
/* TODO(?): accept different UL and DL SN sizes? */
if
(
sn_size_ul
!=
sn_size_dl
)
{
if
(
sn_size_ul
!=
sn_size_dl
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal, bad SN sizes, must be same. ul=%d, dl=%d
\n
"
,
LOG_E
(
PDCP
,
"%s:%d:%s: fatal, bad SN sizes, must be same. ul=%d, dl=%d
\n
"
,
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
View file @
831c47c4
...
@@ -27,12 +27,21 @@
...
@@ -27,12 +27,21 @@
#include <nettle/aes.h>
#include <nettle/aes.h>
#include <nettle/ctr.h>
#include <nettle/ctr.h>
#ifndef NETTLE_VERSION_MAJOR
/* hack: include bignum.h, not version.h because version.h does not exist
* in old versions and bignum.h includes version.h (as of today).
* May completely fail to work... maybe we should skip support of old
* versions of nettle.
*/
#include <nettle/bignum.h>
#endif
void
*
nr_pdcp_security_nea2_init
(
unsigned
char
*
ciphering_key
)
void
*
nr_pdcp_security_nea2_init
(
unsigned
char
*
ciphering_key
)
{
{
void
*
ctx
=
calloc
(
1
,
nettle_aes128
.
context_size
);
void
*
ctx
=
calloc
(
1
,
nettle_aes128
.
context_size
);
if
(
ctx
==
NULL
)
exit
(
1
);
if
(
ctx
==
NULL
)
exit
(
1
);
#if NETTLE_VERSION_MAJOR < 3
#if
!defined(NETTLE_VERSION_MAJOR) ||
NETTLE_VERSION_MAJOR < 3
nettle_aes128
.
set_encrypt_key
(
ctx
,
16
,
ciphering_key
);
nettle_aes128
.
set_encrypt_key
(
ctx
,
16
,
ciphering_key
);
#else
#else
nettle_aes128
.
set_encrypt_key
(
ctx
,
ciphering_key
);
nettle_aes128
.
set_encrypt_key
(
ctx
,
ciphering_key
);
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
831c47c4
...
@@ -561,7 +561,7 @@ static void max_retx_reached(void *_ue, nr_rlc_entity_t *entity)
...
@@ -561,7 +561,7 @@ static void max_retx_reached(void *_ue, nr_rlc_entity_t *entity)
exit
(
1
);
exit
(
1
);
rb_found:
rb_found:
LOG_
D
(
RLC
,
"max RETX reached on %s %d
\n
"
,
LOG_
E
(
RLC
,
"max RETX reached on %s %d
\n
"
,
is_srb
?
"SRB"
:
"DRB"
,
is_srb
?
"SRB"
:
"DRB"
,
rb_id
);
rb_id
);
...
...
targets/RT/USER/lte-ue.c
View file @
831c47c4
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "lte-softmodem.h"
#include "lte-softmodem.h"
#include "rt_wrapper.h"
#include "rt_wrapper.h"
#include "system.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/LTE/rrc_extern.h"
...
@@ -230,7 +231,14 @@ void init_thread(int sched_runtime,
...
@@ -230,7 +231,14 @@ void init_thread(int sched_runtime,
}
}
#else
#else
int
settingPriority
=
1
;
if
(
checkIfFedoraDistribution
())
if
(
checkIfGenericKernelOnFedora
())
if
(
checkIfInsideContainer
())
settingPriority
=
0
;
if
(
settingPriority
)
{
if
(
CPU_COUNT
(
cpuset
)
>
0
)
if
(
CPU_COUNT
(
cpuset
)
>
0
)
AssertFatal
(
0
==
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
cpuset
),
""
);
AssertFatal
(
0
==
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
cpuset
),
""
);
...
@@ -238,6 +246,8 @@ void init_thread(int sched_runtime,
...
@@ -238,6 +246,8 @@ void init_thread(int sched_runtime,
sp
.
sched_priority
=
sched_fifo
;
sp
.
sched_priority
=
sched_fifo
;
AssertFatal
(
pthread_setschedparam
(
pthread_self
(),
SCHED_FIFO
,
&
sp
)
==
0
,
AssertFatal
(
pthread_setschedparam
(
pthread_self
(),
SCHED_FIFO
,
&
sp
)
==
0
,
"Can't set thread priority, Are you root?
\n
"
);
"Can't set thread priority, Are you root?
\n
"
);
}
/* Check the actual affinity mask assigned to the thread */
/* Check the actual affinity mask assigned to the thread */
cpu_set_t
*
cset
=
CPU_ALLOC
(
CPU_SETSIZE
);
cpu_set_t
*
cset
=
CPU_ALLOC
(
CPU_SETSIZE
);
...
...
targets/RT/USER/rt_wrapper.c
View file @
831c47c4
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
#include <getopt.h>
#include <getopt.h>
#include <sys/sysinfo.h>
#include <sys/sysinfo.h>
#include "rt_wrapper.h"
#include "rt_wrapper.h"
#include "system.h"
#include <errno.h>
#include <errno.h>
#include <common/utils/msc/msc.h>
#include <common/utils/msc/msc.h>
...
@@ -294,6 +295,7 @@ void thread_top_init(char *thread_name,
...
@@ -294,6 +295,7 @@ void thread_top_init(char *thread_name,
struct
sched_param
sparam
;
struct
sched_param
sparam
;
char
cpu_affinity
[
1024
];
char
cpu_affinity
[
1024
];
cpu_set_t
cpuset
;
cpu_set_t
cpuset
;
int
settingPriority
=
1
;
/* Set affinity mask to include CPUs 2 to MAX_CPUS */
/* Set affinity mask to include CPUs 2 to MAX_CPUS */
/* CPU 0 is reserved for UHD threads */
/* CPU 0 is reserved for UHD threads */
...
@@ -340,9 +342,15 @@ void thread_top_init(char *thread_name,
...
@@ -340,9 +342,15 @@ void thread_top_init(char *thread_name,
}
}
}
}
if
(
checkIfFedoraDistribution
())
if
(
checkIfGenericKernelOnFedora
())
if
(
checkIfInsideContainer
())
settingPriority
=
0
;
if
(
settingPriority
)
{
memset
(
&
sparam
,
0
,
sizeof
(
sparam
));
memset
(
&
sparam
,
0
,
sizeof
(
sparam
));
sparam
.
sched_priority
=
sched_get_priority_max
(
SCHED_FIFO
);
sparam
.
sched_priority
=
sched_get_priority_max
(
SCHED_FIFO
);
policy
=
SCHED_FIFO
;
policy
=
SCHED_FIFO
;
s
=
pthread_setschedparam
(
pthread_self
(),
policy
,
&
sparam
);
s
=
pthread_setschedparam
(
pthread_self
(),
policy
,
&
sparam
);
if
(
s
!=
0
)
{
if
(
s
!=
0
)
{
...
@@ -364,6 +372,7 @@ void thread_top_init(char *thread_name,
...
@@ -364,6 +372,7 @@ void thread_top_init(char *thread_name,
(
policy
==
SCHED_OTHER
)
?
"SCHED_OTHER"
:
(
policy
==
SCHED_OTHER
)
?
"SCHED_OTHER"
:
"???"
,
"???"
,
sparam
.
sched_priority
,
cpu_affinity
);
sparam
.
sched_priority
,
cpu_affinity
);
}
#endif //LOW_LATENCY
#endif //LOW_LATENCY
...
...
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