Commit 9e8c0c97 authored by francescomani's avatar francescomani

Merge remote-tracking branch 'origin/develop' into NR_RRC_configuration_functions

parents fc4a76a8 3ea34db9
......@@ -37,6 +37,7 @@ def testStageName = params.pipelineTestStageName
// Name of the phone/server resource
def ciSmartPhonesResource1 = params.SmartPhonesResource1
def ciSmartPhonesResource2 = params.SmartPhonesResource2
def ciSmartPhonesResource3 = params.SmartPhonesResource3
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
......@@ -55,7 +56,7 @@ pipeline {
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource1]],resource: ciSmartPhonesResource3)
}
stages {
stage("Build Init") {
......@@ -87,6 +88,9 @@ pipeline {
if (params.SmartPhonesResource2 == null) {
allParametersPresent = false
}
if (params.SmartPhonesResource3 == null) {
allParametersPresent = false
}
// 1st eNB parameters
if (params.eNB_IPAddress == null) {
allParametersPresent = false
......@@ -378,6 +382,19 @@ pipeline {
}
}
}
stage ("Result Update"){
when {
expression { params.DataBaseHost != "none" }
}
agent {label DataBaseHost}
steps {
script {
dir ('ci-scripts/ran_dashboard') {
sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${env.BUILD_ID} ${StatusForDb} "
}
}
}
}
}
}
}
......
......@@ -80,13 +80,13 @@ pipeline {
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
//calling OAIUE B200
build job: "RAN-SA-OAIUE-B200-CN5G", 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_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
//build job: "RAN-SA-OAIUE-B200-CN5G", 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_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
//]
//calling OAIUE N310
build job: "RAN-SA-OAIUE-N310-CN5G", wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
......
This diff is collapsed.
......@@ -126,6 +126,7 @@ class OaiCiTest():
self.desc = ''
self.ping_args = ''
self.ping_packetloss_threshold = ''
self.ping_rttavg_threshold =''
self.iperf_args = ''
self.iperf_packetloss_threshold = ''
self.iperf_profile = ''
......@@ -1632,6 +1633,7 @@ class OaiCiTest():
min_msg = 'RTT(Min) : ' + rtt_min + ' ms'
avg_msg = 'RTT(Avg) : ' + rtt_avg + ' ms'
max_msg = 'RTT(Max) : ' + rtt_max + ' ms'
lock.acquire()
logging.debug('\u001B[1;37;44m ping result (' + UE_IPAddress + ') \u001B[0m')
logging.debug('\u001B[1;34m ' + pal_msg + '\u001B[0m')
......@@ -1658,17 +1660,29 @@ class OaiCiTest():
ping_stat_msg+='RTT(Max) : ' + str("{:.2f}".format(ping_stat['max_1'])) + 'ms \n'
#building html message
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg
#checking packet loss compliance
packetLossOK = True
if packetloss is not None:
if float(packetloss) > float(self.ping_packetloss_threshold):
qMsg += '\nPacket Loss too high'
logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m')
logging.debug('\u001B[1;37;41m Packet Loss too high; Target: '+ self.ping_packetloss_threshold + '%\u001B[0m')
packetLossOK = False
elif float(packetloss) > 0:
qMsg += '\nPacket Loss is not 0%'
logging.debug('\u001B[1;30;43m Packet Loss is not 0% \u001B[0m')
if (packetLossOK):
#checking RTT avg compliance
rttavgOK = True
if self.ping_rttavg_threshold != '':
if float(rtt_avg)>float(self.ping_rttavg_threshold):
ping_rttavg_error_msg = 'RTT(Avg) too high: ' + rtt_avg + ' ms; Target: '+ self.ping_rttavg_threshold+ ' ms'
qMsg += '\n'+ping_rttavg_error_msg
logging.debug('\u001B[1;37;41m'+ ping_rttavg_error_msg +' \u001B[0m')
rttavgOK = False
if packetLossOK and rttavgOK:
statusQueue.put(0)
else:
statusQueue.put(-1)
......
......@@ -295,6 +295,11 @@ def GetParametersFromXML(action):
CiTestObj.ue_id = ""
else:
CiTestObj.ue_id = ue_id
ping_rttavg_threshold = test.findtext('ping_rttavg_threshold')
if (ping_rttavg_threshold is None):
CiTestObj.ping_rttavg_threshold = ""
else:
CiTestObj.ping_rttavg_threshold = ping_rttavg_threshold
elif action == 'Iperf':
CiTestObj.iperf_args = test.findtext('iperf_args')
......
......@@ -752,6 +752,7 @@ class RANManagement():
msgLine = 0
foundSegFault = False
foundRealTimeIssue = False
foundRealTimeIssue_cnt = 0
rrcSetupComplete = 0
rrcReleaseRequest = 0
rrcReconfigRequest = 0
......@@ -890,6 +891,7 @@ class RANManagement():
result = re.search('LLL', str(line))
if result is not None and not exitSignalReceived:
foundRealTimeIssue = True
foundRealTimeIssue_cnt += 1
if foundAssertion and (msgLine < 3):
msgLine += 1
msgAssertion += str(line)
......@@ -1258,7 +1260,7 @@ class RANManagement():
global_status = CONST.ENB_PROCESS_ASSERTION
if foundRealTimeIssue:
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB faced real time issues! \u001B[0m')
htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues!\n'
htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues! COUNT = '+ str(foundRealTimeIssue_cnt) +' lines\n'
if rlcDiscardBuffer > 0:
rlcMsg = nodeB_prefix + 'NB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)'
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
......
......@@ -43,7 +43,7 @@ import gitlab
import yaml
import os
import time
import sys
from sqlconnect import SQLConnect
......@@ -61,7 +61,9 @@ class Dashboard:
self.git = self.__getGitData(cmd) #git data from Gitlab
self.tests = self.__loadCfg('ran_dashboard_cfg.yaml') #tests table setup from yaml
self.db = self.__loadFromDB() #test results from database
self.mr_list=[] #mr list in string format
for x in range(len(self.git)):
self.mr_list.append(str(self.git[x]['iid']))
def __loadCfg(self,yaml_file):
with open(yaml_file,'r') as f:
......@@ -86,6 +88,29 @@ class Dashboard:
mydb.close_connection()
return mydb.data
def singleMR_initHTML(self, date):
self.f_html.write('<!DOCTYPE html>\n')
self.f_html.write('<head>\n')
self.f_html.write('<link rel="stylesheet" href="../test_styles.css">\n')
self.f_html.write('<title>Test Dashboard</title>\n')
self.f_html.write('</head>\n')
self.f_html.write('<br>\n')
self.f_html.write('<br>\n')
self.f_html.write('<table>\n')
self.f_html.write('<tr>\n')
self.f_html.write('<td class="Main">OAI RAN TEST Status Dashboard</td>\n')
self.f_html.write('</td>\n')
self.f_html.write('<tr>\n')
self.f_html.write('<tr></tr>\n')
self.f_html.write('<tr>\n')
self.f_html.write('<td class="Date">Update : '+date+'</td>\n')
self.f_html.write('</td>\n')
self.f_html.write('</tr>\n')
self.f_html.write('</table>\n')
self.f_html.write('<br>\n')
self.f_html.write('<br>\n')
def Test_initHTML(self, date):
self.f_html.write('<!DOCTYPE html>\n')
self.f_html.write('<head>\n')
......@@ -197,11 +222,13 @@ class Dashboard:
self.f_html.write('</tr>\n')
def Build(self, type, htmlfilename):
def Build(self, type, mr, htmlfilename):
if type=='MR':
self.Build_MR_Table(htmlfilename)
elif type=='Tests':
self.Build_Test_Table(htmlfilename)
elif type=='singleMR':
self.Build_singleMR_Table(mr,htmlfilename)
else :
print("Undefined Dashboard Type, options : MR or Tests")
......@@ -291,6 +318,93 @@ class Dashboard:
self.Test_terminateHTML()
def Build_singleMR_Table(self,singlemr,htmlfilename):
print("Building single MR Tests Results...")
self.f_html=open(htmlfilename,'w')
###update date/time, format dd/mm/YY H:M:S
now = datetime.now()
dt_string = now.strftime("%d/%m/%Y %H:%M")
#HTML table header
self.singleMR_initHTML(dt_string)
#1 table per MR if test results exist => 1 table for matching mr
for x in range(len(self.git)):
mr=str(self.git[x]['iid'])
if mr==singlemr:
#if 'PASS' not in self.db[mr]:
self.f_html.write('<h3><a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/'+mr+'">'+mr+'</a>'+' '+self.git[x]['title'] + '</h3>\n')
self.f_html.write('<table class="Test_Table">\n')
self.f_html.write('<tr>\n')
self.f_html.write('<th class="Test_Name">Test Name</th>\n')
self.f_html.write('<th class="Test_Descr">Bench</th> \n')
self.f_html.write('<th class="Test_Descr">Test</th> \n')
self.f_html.write('<th class="Pass"># Pass</th>\n')
self.f_html.write('<th class="Fail"># Fail</th>\n')
self.f_html.write('<th class="Last_Pass">Last Pass</th>\n')
self.f_html.write('<th class="Last_Fail">Last Fail</th>\n')
self.f_html.write('</tr>\n')
#parsing the tests
for t in self.tests:
row=[]
short_name= t
hyperlink= self.tests[t]['link']
job=self.tests[t]['job']
if job in self.db[mr]:
if 'PASS' in self.db[mr][job]:
row.append(self.db[mr][job]['PASS'])
else:
row.append('')
if 'FAIL' in self.db[mr][job]:
row.append(self.db[mr][job]['FAIL'])
else:
row.append('')
#2 columns for last_pass and last_fail links
if 'last_pass' in self.db[mr][job]:
lastpasshyperlink= self.db[mr][job]['last_pass'][1]
lastpasstext= self.db[mr][job]['last_pass'][0]
else:
lastpasshyperlink=''
lastpasstext=''
if 'last_fail' in self.db[mr][job]:
lastfailhyperlink= self.db[mr][job]['last_fail'][1]
lastfailtext= self.db[mr][job]['last_fail'][0]
else:
lastfailhyperlink=''
lastfailtext=''
self.f_html.write('<tr>\n')
self.f_html.write('<td><a href='+hyperlink+'>'+short_name+'</a></td>\n')
self.f_html.write('<td>'+self.tests[t]['bench']+'</td>\n')
self.f_html.write('<td>'+self.tests[t]['test']+'</td>\n')
if row[0]!='':
self.f_html.write('<td style="background-color: rgb(58, 236, 58);">'+str(row[0])+'</td>\n')
else:
self.f_html.write('<td></td>\n')
if row[1]!='':
self.f_html.write('<td style="background-color: red;">'+str(row[1])+'</td>\n')
else:
self.f_html.write('<td></td>\n')
self.f_html.write('<td><a href='+lastpasshyperlink+'>'+lastpasstext+'</a></td>\n')
self.f_html.write('<td><a href='+lastfailhyperlink+'>'+lastfailtext+'</a></td>\n')
self.f_html.write('</tr>\n')
self.f_html.write('</table>\n')
#terminate HTML table and close file
self.Test_terminateHTML()
def Build_MR_Table(self,htmlfilename):
print("Building Merge Requests Dashboard...")
......@@ -379,6 +493,7 @@ class Dashboard:
#terminate HTML table and close file
self.MR_terminateHTML()
def CopyToS3(self,htmlfilename,bucket,key):
print("Uploading to S3 bucket")
#Creating Session With Boto3.
......@@ -387,15 +502,58 @@ class Dashboard:
#Creating S3 Resource From the Session.
result = s3.upload_file(htmlfilename, bucket,key, ExtraArgs={'ACL':'public-read','ContentType': 'text/html'})
#unused
def CopyCSS(self,path):
s3 = boto3.resource('s3')
copy_source = {'Bucket': 'oaitestdashboard','Key':'test_styles.css'}
s3.meta.client.copy(copy_source, 'oaitestdashboard', path+'/'+ 'test_styles.css')
def PostGitNote(self,mr,jobname,buildurl,buildid,status):
gl = gitlab.Gitlab.from_config('OAI')
project_id = 223
project = gl.projects.get(project_id)
editable_mr = project.mergerequests.get(int(mr))
mr_notes = editable_mr.notes.list()
mr_note = editable_mr.notes.create({
'body': 'Completed Test : '+jobname+', status: <b>'+status+'</b>, '+\
'(<a href="'+buildurl+'">'+buildid+'</a>)<br>'+\
'<a href="https://oaitestdashboard.s3.eu-west-1.amazonaws.com/MR'+mr+'/index.html">Consolidated Test Results</a>'
})
editable_mr.save()
def main():
htmlDash=Dashboard()
htmlDash.Build('MR','/tmp/MR_index.html')
htmlDash.CopyToS3('/tmp/MR_index.html','oairandashboard','index.html')
htmlDash.Build('Tests','/tmp/Tests_index.html')
htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html')
#call from Jenkinsfile : sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${env.BUILD_ID} ${StatusForDb} "
#individual MR test results + test dashboard, event based (end of jenkins pipeline)
if len(sys.argv)>1:
if sys.argv[1]=="testevent" :
mr=sys.argv[2]
jobname=sys.argv[3]
buildurl=sys.argv[4]
buildid=sys.argv[5]
status=sys.argv[6]
htmlDash=Dashboard()
if mr in htmlDash.mr_list:
htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html')
htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html')
htmlDash.Build('Tests','0000','/tmp/Tests_index.html')
htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html')
htmlDash.PostGitNote(mr,jobname,buildurl,buildid,status)
else:
print("Not a Merge Request => this build is for testing/debug purpose, no report to git")
#test and MR status dash boards, cron based
else:
htmlDash=Dashboard()
htmlDash.Build('MR','0000','/tmp/MR_index.html')
htmlDash.CopyToS3('/tmp/MR_index.html','oairandashboard','index.html')
htmlDash.Build('Tests','0000','/tmp/Tests_index.html')
htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html')
if __name__ == "__main__":
# execute only if run as a script
main()
......@@ -39,6 +39,8 @@
050001
070000
070001
050000
050001
010002
000001
030202
......@@ -103,6 +105,7 @@
<id>idefix</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="050001">
......@@ -111,6 +114,7 @@
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="070000">
......
......@@ -87,14 +87,16 @@
<desc>Ping: 20 pings</desc>
<id>nrmodule2_quectel</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>40</ping_rttavg_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 100 pings, size 1024</desc>
<id>nrmodule2_quectel</id>
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>30</ping_rttavg_threshold>
</testCase>
......
......@@ -38,6 +38,8 @@
000001
070001
000001
050000
050001
010002
080001
080000
......@@ -98,6 +100,7 @@
<id>idefix</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="050001">
......@@ -106,6 +109,7 @@
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="070000">
......
......@@ -85,7 +85,8 @@
<desc>Ping: 20pings in 20sec</desc>
<id>nrmodule2_quectel</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="050001">
......@@ -93,7 +94,8 @@
<desc>Ping: 100pings in 20sec</desc>
<id>nrmodule2_quectel</id>
<ping_args>-c 100 -i 0,2</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="070000">
......
......@@ -92,7 +92,8 @@
<desc>Ping: 20pings in 20sec</desc>
<id>nrmodule2_quectel</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
......
This diff is collapsed.
......@@ -27,9 +27,8 @@
set -e
# Include helper functions
ORIGIN_PATH=$PWD
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/tools/build_helper
THIS_SCRIPT_PATH=$(dirname $(readlink -f "$0"))
source "$THIS_SCRIPT_PATH"/tools/build_helper
# Set environment variables (OPENAIR_HOME, ...)
set_openair_env
......@@ -38,7 +37,6 @@ set_openair_env
gen_nvram_path=$OPENAIR_DIR/targets/bin
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
MSC_GEN=0
XFORMS="True"
SKIP_SHARED_LIB_FLAG="False"
UE_EXPANSION="False"
......@@ -106,7 +104,7 @@ Options
--nrUE
Makes the NR UE softmodem
--RU
Makes the OAI RRU (without full stack)
Makes the OAI RRU
--UE
Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file
--UE-conf-nvram [configuration file]
......@@ -208,28 +206,24 @@ function main() {
-g | --run-with-gdb)
case "$2" in
"Release")
GDB=0
CMAKE_BUILD_TYPE="Release"
echo_info "Will Compile without gdb symbols and with compiler optimization"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Release"
shift
;;
"RelWithDebInfo")
GDB=0
CMAKE_BUILD_TYPE="RelWithDebInfo"
echo_info "Will Compile with gdb symbols"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
shift
;;
"MinSizeRel")
GDB=0
CMAKE_BUILD_TYPE="MinSizeRel"
echo_info "Will Compile for minimal exec size"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=MinSizeRel"
shift
;;
"Debug" | *)
GDB=1
CMAKE_BUILD_TYPE="Debug"
echo_info "Will Compile with gdb symbols and disable compiler optimization"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug"
......@@ -244,37 +238,30 @@ function main() {
shift;;
--eNB)
eNB=1
RU=0
echo_info "Will compile eNB"
shift;;
--eNBocp)
eNBocp=1
RU=0
echo_info "Will compile OCP eNB"
shift;;
--gNB)
gNB=1
RU=0
NR="True"
echo_info "Will compile gNB"
shift;;
--RU)
RU=1
RU=1
echo_info "Will compile RRU"
shift;;
-a | --agent)
echo_info "FlexRAN support is always compiled into the eNB"
shift;;
--UE)
RU=0
UE=1
echo_info "Will compile UE"
shift;;
--nrUE)
RU=0
nrUE=1
rfsimNas=1
NR="True"
echo_info "Will compile NR UE"
shift;;
--mu)
......@@ -282,10 +269,10 @@ function main() {
echo_info "Will compile with UE_EXPANSION"
shift;;
--UE-conf-nvram)
conf_nvram_path=$(readlink -f $2)
conf_nvram_path=$(readlink -f "$2")
shift 2;;
--UE-gen-nvram)
gen_nvram_path=$(readlink -f $2)
gen_nvram_path=$(readlink -f "$2")
shift 2;;
-w | --hardware)
# Use OAI_USRP as the key word USRP is used inside UHD driver
......@@ -309,7 +296,6 @@ function main() {
shift 2;;
-P | --phy_simulators)
SIMUS_PHY=1
RU=0
echo_info "Will compile dlsim, ulsim, ..."
shift;;
-S | --core_simulators)
......@@ -344,11 +330,11 @@ function main() {
echo_info "Will compile hw latency test program"
shift;;
--verbose-ci)
VERBOSE_CI=1
VERBOSE_CI=1
echo_info "Will compile with verbose instructions in CI Docker env"
shift;;
--verbose-compile)
VERBOSE_COMPILE=1
VERBOSE_COMPILE=1
echo_info "Will compile with verbose instructions"
shift;;
--cflags_processor)
......@@ -478,7 +464,7 @@ function main() {
########################################################
# to be discussed
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" -o "$RU" = "1" ] ; then
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" ] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_info "No local radio head and no transport protocol selected"
fi
......@@ -629,7 +615,6 @@ function main() {
echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file
echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file
echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file
echo "set ( RU $RU )" >> $cmake_file
echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file
echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
......@@ -677,14 +662,10 @@ function main() {
$build_dir $config_libconfig_shlib \
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
if [ "$RU" = "0" ] ; then
compilations \
$build_dir coding \
libcoding.so $dbin/libcoding.so
fi
fi
fi
......
......@@ -51,7 +51,6 @@
#include <dlfcn.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <form.h>
#include "common/utils/load_module_shlib.h"
#include "common/config/config_userapi.h"
#include "common/utils/threadPool/thread-pool.h"
......
......@@ -307,8 +307,10 @@ The following features are valid for the gNB and the 5G-NR UE.
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
- Scheduler procedures for SIB1
- Scheduler procedures for RA
- Contention free RA procedure
- Contention based RA procedure
- Contention Free RA procedure
- Contention Based RA procedure
- Msg3 can transfer uplink CCCH, DTCH or DCCH messages
- CBRA can be performed using MAC CE or C-RNTI
- Scheduler procedures for CSI-RS
- MAC downlink scheduler
- phy-test scheduler (fixed allocation and usable also without UE)
......
......@@ -26,7 +26,7 @@
#---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-base
ARG NEEDED_GIT_PROXY
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
......
......@@ -26,7 +26,7 @@
#---------------------------------------------------------------------
FROM ubuntu:bionic AS ran-build
FROM ubuntu:bionic AS ran-base
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......
#/*
# * 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-base:latest as ran-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 --eNB --gNB --RU --UE --nrUE --ninja -w USRP --verbose-ci
#/*
# * 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-base:latest as ran-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja -w USRP --verbose-ci
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS enb-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest AS enb-base
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --ninja -w USRP --verbose-ci
FROM ran-build:latest AS enb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
......@@ -68,20 +60,18 @@ COPY --from=enb-build \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /usr/local/lib/
COPY --from=enb-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
COPY --from=enb-build \
COPY --from=enb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
......@@ -97,19 +87,22 @@ COPY --from=enb-build \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
COPY --from=enb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=enb-build /usr/local/share/uhd/rfnoc/ .
COPY --from=enb-base /usr/local/share/uhd/rfnoc/ .
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for eNB
......
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS enb-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest as enb-base
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --ninja -w USRP --verbose-ci
FROM ran-build:latest AS enb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
......@@ -75,25 +67,25 @@ COPY --from=enb-build \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /usr/local/lib/
COPY --from=enb-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
# Now we are copying from builder-image the UHD files.
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=enb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=enb-build \
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-base \
/usr/local/lib/libuhd.so.3.15.0 \
/usr/local/lib/libprotobuf-c.so.1 \
/usr/local/lib/
COPY --from=enb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
COPY --from=enb-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
......@@ -101,11 +93,9 @@ COPY --from=enb-build \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
./
/usr/lib/x86_64-linux-gnu/
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for eNB
......
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS gnb-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest AS gnb-base
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci
FROM ran-build:latest AS gnb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
......@@ -70,23 +62,21 @@ COPY --from=gnb-build \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /usr/local/lib/
COPY --from=gnb-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
COPY --from=gnb-build \
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
......@@ -103,19 +93,21 @@ COPY --from=gnb-build \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=gnb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
COPY --from=gnb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=gnb-build /usr/local/share/uhd/rfnoc/ .
COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ .
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for gNB
......
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS gnb-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest as gnb-base
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci
FROM ran-build:latest AS gnb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
......@@ -74,28 +66,28 @@ COPY --from=gnb-build \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /usr/local/lib/
COPY --from=gnb-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=gnb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=gnb-build \
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base \
/usr/local/lib/libuhd.so.3.15.0 \
/usr/local/lib/libprotobuf-c.so.1 \
/usr/local/lib/
COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
COPY --from=gnb-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
......@@ -103,11 +95,9 @@ COPY --from=gnb-build \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
./
/usr/lib/x86_64-linux-gnu/
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for gNB
......
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS ru-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest AS ru-base
#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
FROM ran-build:latest AS ru-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
cp /oai-ran/docker/scripts/lte_ru_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
......@@ -65,17 +57,16 @@ COPY --from=ru-build \
/oai-ran/docker/scripts/entrypoint.sh \
.
WORKDIR /usr/local/lib/
COPY --from=ru-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
./
/usr/local/lib/
COPY --from=ru-build \
COPY --from=ru-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
......@@ -94,16 +85,14 @@ COPY --from=ru-build \
/lib64/
# Copying from the ran-build image the USRP needed packages
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=ru-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=ru-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=ru-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=ru-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=ru-build /usr/local/share/uhd/rfnoc/ .
COPY --from=ru-base /usr/local/share/uhd/rfnoc/ .
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for RRU
......
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS ru-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest as ru-base
#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
FROM ran-build:latest AS ru-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
cp /oai-ran/docker/scripts/lte_ru_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
......@@ -70,34 +62,30 @@ COPY --from=ru-build \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /usr/local/lib/
COPY --from=ru-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
./
/usr/local/lib/
# Now we are copying from builder-image the UHD files.
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=ru-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=ru-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=ru-base /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=ru-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=ru-build \
COPY --from=ru-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
./
/usr/lib/x86_64-linux-gnu/
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for RRU
......
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS lte-ue-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest AS lte-ue-base
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --UE --ninja -w USRP --verbose-ci
FROM ran-build:latest AS lte-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
......@@ -72,20 +64,18 @@ COPY --from=lte-ue-build \
/oai-ran/targets/bin/usim \
./
WORKDIR /usr/local/lib/
COPY --from=lte-ue-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
COPY --from=lte-ue-build \
COPY --from=lte-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
......@@ -101,19 +91,21 @@ COPY --from=lte-ue-build \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=lte-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
COPY --from=lte-ue-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=lte-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=lte-ue-build /usr/local/share/uhd/rfnoc/ .
COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ .
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for UE
......
......@@ -25,17 +25,9 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS lte-ue-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest AS lte-ue-base
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --UE --ninja -w USRP --verbose-ci
FROM ran-build:latest AS lte-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
......@@ -79,26 +71,26 @@ COPY --from=lte-ue-build \
/oai-ran/targets/bin/usim \
./
WORKDIR /usr/local/lib/
COPY --from=lte-ue-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
# Now we are copying from builder-image the UHD files.
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=lte-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-base \
/usr/local/lib/libuhd.so.3.15.0 \
/usr/local/lib/libprotobuf-c.so.1 \
/usr/local/lib/
COPY --from=lte-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=lte-ue-build \
COPY --from=lte-ue-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
......@@ -106,11 +98,9 @@ COPY --from=lte-ue-build \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
./
/usr/lib/x86_64-linux-gnu/
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for UE
......
......@@ -25,18 +25,11 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS nr-ue-build
FROM ran-base:latest AS nr-ue-base
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-build:latest AS nr-ue-build
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --nrUE --ninja -w USRP --verbose-ci && \
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-ue
......@@ -71,23 +64,21 @@ COPY --from=nr-ue-build \
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
WORKDIR /usr/local/lib/
COPY --from=nr-ue-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
COPY --from=nr-ue-build \
COPY --from=nr-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
......@@ -104,19 +95,21 @@ COPY --from=nr-ue-build \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=nr-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
COPY --from=nr-ue-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=nr-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=nr-ue-build /usr/local/share/uhd/rfnoc/ .
COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ .
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for eNB
......
......@@ -25,18 +25,11 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS nr-ue-build
FROM ran-base:latest AS nr-ue-base
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-build:latest AS nr-ue-build
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --nrUE --ninja -w USRP --verbose-ci && \
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM ubuntu:bionic as oai-nr-ue
......@@ -76,29 +69,29 @@ COPY --from=nr-ue-build \
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
WORKDIR /usr/local/lib/
COPY --from=nr-ue-build \
/oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \
/oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \
/oai-ran/targets/bin/librfsimulator.so.Rel15 \
/oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \
/oai-ran/targets/bin/libcoding.so \
/oai-ran/targets/bin/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/usr/local/lib/libprotobuf-c.so.1 \
./
/usr/local/lib/
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=nr-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-base \
/usr/local/lib/libuhd.so.3.15.0 \
/usr/local/lib/libprotobuf-c.so.1 \
/usr/local/lib/
COPY --from=nr-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=nr-ue-build \
COPY --from=nr-ue-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
......@@ -106,11 +99,9 @@ COPY --from=nr-ue-build \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
./
/usr/lib/x86_64-linux-gnu/
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" && \
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
WORKDIR /opt/oai-nr-ue
......
......@@ -25,11 +25,7 @@
#
#---------------------------------------------------------------------
FROM ran-build:develop AS phy-sim-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
FROM ran-base:latest AS phy-sim-build
#run build_oai to build the target image
RUN /bin/sh oaienv && \
......@@ -73,7 +69,6 @@ COPY --from=phy-sim-build \
/oai-ran/targets/bin/smallblocktest.Rel15 \
./
WORKDIR /usr/local/lib/
COPY --from=phy-sim-build \
/oai-ran/targets/bin/libcoding.so \
/lib64/liblapacke.so.3 \
......@@ -90,7 +85,7 @@ COPY --from=phy-sim-build \
/oai-ran/cmake_targets/phy_simulators/build/libSIMU.so \
/oai-ran/cmake_targets/phy_simulators/build/libldpc.so \
/oai-ran/cmake_targets/phy_simulators/build/libldpc_orig.so \
./
/usr/local/lib/
RUN ldconfig
......
......@@ -26,7 +26,7 @@
#---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi7/ubi:latest AS ran-build
FROM registry.access.redhat.com/ubi7/ubi:latest AS ran-base
# Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps
# It is pre-requisite
......
......@@ -26,7 +26,7 @@
#---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-base
# Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps
# It is pre-requisite
......
......@@ -29,12 +29,18 @@
For all platforms, the strategy for building docker/podman images is the same:
* First we create a common shared image that contains:
* First we create a common shared image `ran-base` that contains:
- the latest source files (by using the `COPY` function)
- all the means to build an OAI RAN executable
* all packages, compilers, ...
* especially UHD is installed
* Then from this shared image (`ran-build`) we can build target images for:
* Then, from the `ran-base` shared image, we create a shared image `ran-build`
in which all targets are compiled:
- eNB
- gNB
- lte-UE
- nr-UE
* Then from the `ran-build` shared image we can build target images for:
- eNB
- gNB
- lte-UE
......@@ -58,7 +64,8 @@ Dockerfiles are named with the following naming convention: `Dockerfile.${target
Targets can be:
- `ran` for an image named `ran-build` (the shared image)
- `base` for an image named `ran-base` (shared image)
- `ran` for an image named `ran-build` (shared image)
- `eNB` for an image named `oai-enb`
- `gNB` for an image named `oai-gnb`
- `lteUE` for an image named `oai-lte-ue`
......@@ -85,9 +92,11 @@ For more details in build within a Openshift Cluster, see [OpenShift README](../
* `docker-ce` installed
* Pulling `ubuntu:bionic` from DockerHub
## 3.2. Building the shared image ##
## 3.2. Building the shared images ##
This can be done starting `2020.w41` tag on the `develop` branch, or any branch that includes that tag.
Note: This can be done starting `2020.XX` tag on the `develop` branch, or any branch that includes that tag.
There are two shared images: one that has all dependencies, and a second that compiles all targets (eNB, gNB, [nr]UE).
```bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
......@@ -98,21 +107,25 @@ git checkout develop
In our Eurecom/OSA environment we need to pass a GIT proxy.
```bash
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
```
if you don't need it, do NOT pass any value:
```bash
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 .
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 .
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 .
```
After a while:
After building both:
```bash
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ran-build latest ccb721bc0b57 1 minute ago 4.06GB
ran-build latest f2633a7f5102 1 minute ago 6.81GB
ran-base latest 5c9c02a5b4a8 1 minute ago 2.4GB
...
```
......@@ -131,7 +144,8 @@ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
oai-enb latest 25ddbd8b7187 1 minute ago 516MB
<none> <none> 875ea3b05b60 8 minutes ago 8.18GB
ran-build latest ccb721bc0b57 1 hour ago 4.06GB
ran-build latest f2633a7f5102 1 hour ago 6.81GB
ran-base latest 5c9c02a5b4a8 1 hour ago 2.4GB
```
Do not forget to remove the temporary image:
......
......@@ -233,20 +233,15 @@ nrUE_params_t *get_nrUE_params(void) {
/* initialie thread pools used for NRUE processing paralleliation */
void init_tpools(uint8_t nun_dlsch_threads) {
char *params = NULL;
if (IS_SOFTMODEM_RFSIM) {
params = calloc(1,2);
memcpy(params,"N",1);
}
else {
params = calloc(1,(NR_RX_NB_TH*NR_NB_TH_SLOT*3)+1);
for (int i=0; i<NR_RX_NB_TH*NR_NB_TH_SLOT; i++) {
memcpy(params+(i*3),"-1,",3);
}
params = calloc(1,(NR_RX_NB_TH*NR_NB_TH_SLOT*3)+1);
for (int i=0; i<NR_RX_NB_TH*NR_NB_TH_SLOT; i++) {
memcpy(params+(i*3),"-1,",3);
}
initTpool(params, &(nrUE_params.Tpool), false);
free(params);
init_dlsch_tpool( nun_dlsch_threads);
}
static void get_options(void) {
nrUE_params.ofdm_offset_divisor = 8;
......
......@@ -57,6 +57,7 @@
/// UL_CONFIG_REQ
#define FAPI_NR_UL_CONFIG_LIST_NUM 10
#define FAPI_NR_UL_CONFIG_TYPE_DONE 0x00
#define FAPI_NR_UL_CONFIG_TYPE_PRACH 0x01
#define FAPI_NR_UL_CONFIG_TYPE_PUCCH 0x02
#define FAPI_NR_UL_CONFIG_TYPE_PUSCH 0x03
......
......@@ -449,6 +449,7 @@ static OAI_phy_scope_t *create_phy_scope_gnb(void) {
OAI_phy_scope_t *fdui = calloc(( sizeof *fdui ),1);
// Define form
fdui->phy_scope = fl_bgn_form( FL_NO_BOX, 800, 800 );
fl_set_form_dblbuffer(fdui->phy_scope, 1);
// This the whole UI box
obj = fl_add_box( FL_BORDER_BOX, 0, 0, 800, 800, "" );
fl_set_object_color( obj, FL_BLACK, FL_WHITE );
......@@ -530,7 +531,10 @@ static void *scope_thread_gNB(void *arg) {
OAI_phy_scope_t *form_gnb = create_phy_scope_gnb();
while (!oai_exit) {
fl_freeze_form(form_gnb->phy_scope);
phy_scope_gNB(form_gnb, p, nb_ue);
fl_unfreeze_form(form_gnb->phy_scope);
fl_redraw_form(form_gnb->phy_scope);
usleep(99*1000);
}
......@@ -801,6 +805,7 @@ static OAI_phy_scope_t *create_phy_scope_nrue( int ID ) {
OAI_phy_scope_t *fdui = calloc(( sizeof *fdui ),1);
// Define form
fdui->phy_scope = fl_bgn_form( FL_NO_BOX, 800, 900 );
fl_set_form_dblbuffer(fdui->phy_scope, 1);
// This the whole UI box
obj = fl_add_box( FL_BORDER_BOX, 0, 0, 800, 900, "" );
fl_set_object_color( obj, FL_BLACK, FL_BLACK );
......
......@@ -25,20 +25,17 @@
#include <unistd.h>
#include <string.h>
#include "assertions.h"
#ifndef PHYSIM
#include <pthread.h>
#include "common/config/config_userapi.h"
#endif
#include <pthread.h>
#include "common/config/config_userapi.h"
#include <common/utils/threadPool/thread-pool.h>
// global var for openair performance profiler
int opp_enabled = 0;
double cpu_freq_GHz __attribute__ ((aligned(32)));
double cpu_freq_GHz __attribute__ ((aligned(32)))=0.0;
#ifndef PHYSIM
static uint32_t max_cpumeasur;
static time_stats_t **measur_table;
notifiedFIFO_t measur_fifo;
#endif
double get_cpu_freq_GHz(void)
{
if (cpu_freq_GHz <1 ) {
......@@ -187,7 +184,6 @@ double get_time_meas_us(time_stats_t *ts)
return 0;
}
#ifndef PHYSIM
/* function for the asynchronous measurment module: cpu stat are sent to a dedicated thread
* which is in charge of computing the cpu time spent in a given function/algorithm...
*/
......@@ -294,4 +290,3 @@ void end_meas(void) {
msg->msgid = TIMESTAT_MSGID_END ;
pushNotifiedFIFO(&measur_fifo, nfe);
}
#endif
......@@ -31,9 +31,7 @@
#include <pthread.h>
#include <linux/kernel.h>
#include <linux/types.h>
#ifndef PHYSIM
#include "common/utils/threadPool/thread-pool.h"
#endif
#include "common/utils/threadPool/thread-pool.h"
// global var to enable openair performance profiler
extern int opp_enabled;
extern double cpu_freq_GHz __attribute__ ((aligned(32)));;
......@@ -72,10 +70,8 @@ typedef struct {
char *meas_name; /*!< \brief name to use when printing the measure (not used for PHY simulators)*/
int meas_index; /*!< \brief index of this measure in the measure array (not used for PHY simulators)*/
int meas_enabled; /*!< \brief per measure enablement flag. send_meas tests this flag, unused today in start_meas and stop_meas*/
#ifndef PHYSIM
notifiedFIFO_elt_t *tpoolmsg; /*!< \brief message pushed to the cpu measurment queue to report a measure START or STOP */
time_stats_msg_t *tstatptr; /*!< \brief pointer to the time_stats_msg_t data in the tpoolmsg, stored here for perf considerations*/
#endif
} time_stats_t;
#define MEASURE_ENABLED(X) (X->meas_enabled)
......@@ -165,7 +161,6 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) {
}
}
#ifndef PHYSIM
extern notifiedFIFO_t measur_fifo;
#define CPUMEASUR_SECTION "cpumeasur"
......@@ -187,5 +182,4 @@ extern notifiedFIFO_t measur_fifo;
}
void end_meas(void);
#endif //ifndef PHYSIM
#endif
......@@ -153,8 +153,10 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
if (scheduled_response->ul_config != NULL){
fapi_nr_ul_config_request_t *ul_config = scheduled_response->ul_config;
int pdu_done = 0;
pthread_mutex_lock(&ul_config->mutex_ul_config);
LOG_D(PHY, "%d.%d ul S ul_config %p pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_done, ul_config->number_pdus);
for (i = 0; i < ul_config->number_pdus; ++i){
AssertFatal(ul_config->ul_config_list[i].pdu_type <= FAPI_NR_UL_CONFIG_TYPES,"pdu_type %d out of bounds\n",ul_config->ul_config_list[i].pdu_type);
......@@ -168,6 +170,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu;
/* PUCCH */
fapi_nr_ul_config_pucch_pdu *pucch_config_pdu;
LOG_D(PHY, "%d.%d ul B ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
switch (pdu_type){
......@@ -189,10 +192,13 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
if (scheduled_response->tx_request) {
for (int j=0; j<scheduled_response->tx_request->number_of_pdus; j++) {
fapi_nr_tx_request_body_t *tx_req_body = &scheduled_response->tx_request->tx_request_body[j];
if (tx_req_body->pdu_index == i) {
if ((tx_req_body->pdu_index == i) && (tx_req_body->pdu_length > 0)) {
LOG_D(PHY,"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)\n",scheduled_response->frame,slot,tx_req_body->pdu_length,current_harq_pid);
memcpy(harq_process_ul_ue->a, tx_req_body->pdu, tx_req_body->pdu_length);
harq_process_ul_ue->status = ACTIVE;
ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more
pdu_done++;
LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
break;
}
}
......@@ -216,6 +222,9 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
memcpy((void*)&(pucch_vars->pucch_pdu[j]), (void*)pucch_config_pdu, sizeof(fapi_nr_ul_config_pucch_pdu));
pucch_vars->active[j] = true;
found = true;
ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more
pdu_done++;
LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
break;
}
}
......@@ -227,18 +236,34 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
// prach config pdu
prach_config_pdu = &ul_config->ul_config_list[i].prach_config_pdu;
memcpy((void*)&(PHY_vars_UE_g[module_id][cc_id]->prach_vars[gNB_id]->prach_pdu), (void*)prach_config_pdu, sizeof(fapi_nr_ul_config_prach_pdu));
ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more
pdu_done++;
LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
break;
case (FAPI_NR_UL_CONFIG_TYPE_DONE):
pdu_done++; // count the no of pdu processed
LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
break;
default:
ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more
pdu_done++; // count the no of pdu processed
LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
break;
}
}
if (scheduled_response->tx_request)
scheduled_response->tx_request->number_of_pdus = 0;
ul_config->sfn = 0;
ul_config->slot = 0;
ul_config->number_pdus = 0;
memset(ul_config->ul_config_list, 0, sizeof(ul_config->ul_config_list));
//Clear the fields when all the config pdu are done
if (pdu_done == ul_config->number_pdus) {
if (scheduled_response->tx_request)
scheduled_response->tx_request->number_of_pdus = 0;
ul_config->sfn = 0;
ul_config->slot = 0;
ul_config->number_pdus = 0;
LOG_D(PHY, "%d.%d clear ul_config %p\n", scheduled_response->frame, slot, ul_config);
memset(ul_config->ul_config_list, 0, sizeof(ul_config->ul_config_list));
}
pthread_mutex_unlock(&ul_config->mutex_ul_config);
}
}
......
......@@ -844,11 +844,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
} else AssertFatal(1==0,"Not RA_PDSCH, SI_PDSCH or PDSCH\n");
stop_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]);
#if PHYSIM
printf("[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",frame_rx,nr_slot_rx,m,ue->dlsch_llr_stats_parallelization[proc->thread_id][slot].p_time/(cpuf*1000.0));
#else
LOG_D(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",frame_rx,nr_slot_rx,m,ue->dlsch_llr_stats_parallelization[proc->thread_id][slot].p_time/(cpuf*1000.0));
#endif
if(first_symbol_flag) {
proc->first_symbol_available = 1;
......@@ -1028,17 +1024,11 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
#if PHYSIM
printf(" --> Unscrambling for CW0 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
printf("AbsSubframe %d.%d --> LDPC Decoding for CW0 %5.3f\n",
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
#else
LOG_I(PHY, " --> Unscrambling for CW0 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
LOG_I(PHY, "AbsSubframe %d.%d --> LDPC Decoding for CW0 %5.3f\n",
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
#endif
if(is_cw1_active) {
// start ldpc decode for CW 1
......@@ -1091,19 +1081,12 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
}
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
#if PHYSIM
printf(" --> Unscrambling for CW1 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
printf("AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n",
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
#else
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
LOG_D(PHY, " --> Unscrambling for CW1 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
LOG_D(PHY, "AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n",
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
#endif
LOG_D(PHY,"AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n",
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
......@@ -1413,11 +1396,8 @@ void *UE_thread_slot1_dl_processing(void *arg) {
stop_meas(&ue->ue_front_end_per_slot_stat[proc->thread_id][1]);
#if PHYSIM
printf("[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,nr_slot_rx,ue->ue_front_end_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
#else
LOG_D(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,nr_slot_rx,ue->ue_front_end_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
#endif
//wait until pdcch is decoded
......@@ -1507,11 +1487,8 @@ void *UE_thread_slot1_dl_processing(void *arg) {
//printf("Set available LLR slot1 to 1 AbsSubframe %d.%d \n",frame_rx,nr_slot_rx);
stop_meas(&ue->pdsch_procedures_per_slot_stat[proc->thread_id][1]);
#if PHYSIM
printf("[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,nr_slot_rx,ue->pdsch_procedures_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
#else
LOG_D(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,nr_slot_rx,ue->pdsch_procedures_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
#endif
if (pthread_mutex_lock(&proc->mutex_slot1_dl_processing) != 0) {
LOG_E( PHY, "[SCHED][UE] error locking mutex for UE RXTX\n" );
......@@ -1880,14 +1857,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
dlsch_parallel);
stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
#if PHYSIM
printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
#else
LOG_D(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
#endif
// deactivate dlsch once dlsch proc is done
......@@ -1963,9 +1935,7 @@ if (nr_slot_rx==9) {
}
stop_meas(&ue->generic_stat);
#if PHYSIM
printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
#endif
LOG_D(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
#ifdef EMOS
phy_procedures_emos_UE_RX(ue,slot,gNB_id);
......@@ -1975,11 +1945,8 @@ phy_procedures_emos_UE_RX(ue,slot,gNB_id);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
stop_meas(&ue->phy_proc_rx[proc->thread_id]);
#if PHYSIM
printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
#else
LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
#endif
//#endif //pdsch
......
......@@ -192,8 +192,13 @@ uint8_t get_transformPrecoding(const NR_BWP_UplinkCommon_t *initialUplinkBWP,
uint8_t configuredGrant);
void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP,
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP) ;
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP);
void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP);
#endif
......@@ -60,6 +60,12 @@ static prach_association_pattern_t prach_assoc_pattern;
static ssb_list_info_t ssb_list;
void fill_ul_config(fapi_nr_ul_config_request_t *ul_config, frame_t frame_tx, int slot_tx, uint8_t pdu_type){
// clear ul_config for new frame/slot
if ((ul_config->slot != slot_tx || ul_config->sfn != frame_tx) && ul_config->number_pdus != 0) {
LOG_D(MAC, "%d.%d %d.%d f clear ul_config %p t %d pdu %d\n", frame_tx, slot_tx, ul_config->sfn, ul_config->slot, ul_config, pdu_type, ul_config->number_pdus);
ul_config->number_pdus = 0;
memset(ul_config->ul_config_list, 0, sizeof(ul_config->ul_config_list));
}
ul_config->ul_config_list[ul_config->number_pdus].pdu_type = pdu_type;
ul_config->slot = slot_tx;
ul_config->sfn = frame_tx;
......@@ -931,8 +937,8 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
} else if (ul_info) {
int cc_id = ul_info->cc_id;
frame_t rx_frame = ul_info->frame_rx;
slot_t rx_slot = ul_info->slot_rx;
//frame_t rx_frame = ul_info->frame_rx;
//slot_t rx_slot = ul_info->slot_rx;
frame_t frame_tx = ul_info->frame_tx;
slot_t slot_tx = ul_info->slot_tx;
module_id_t mod_id = ul_info->module_id;
......@@ -1020,7 +1026,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
}
pthread_mutex_unlock(&ul_config->mutex_ul_config); // avoid double lock
fill_scheduled_response(&scheduled_response, NULL, ul_config, &tx_req, mod_id, cc_id, rx_frame, rx_slot, ul_info->thread_id);
fill_scheduled_response(&scheduled_response, NULL, ul_config, &tx_req, mod_id, cc_id, frame_tx, slot_tx, ul_info->thread_id);
if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){
mac->if_module->scheduled_response(&scheduled_response);
}
......
......@@ -822,6 +822,24 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
ra->state = Msg4;
ra->Msg4_frame = (frameP + 2) % 1024;
ra->Msg4_slot = 1;
if (ra->msg3_dcch_dtch) {
// Check if the UE identified by C-RNTI still exists at the gNB
int UE_id_C = find_nr_UE_id(gnb_mod_idP, ra->crnti);
if (UE_id_C < 0) {
// The UE identified by C-RNTI no longer exists at the gNB
// Let's abort the current RA, so the UE will trigger a new RA later but using RRCSetupRequest instead. A better solution may be implemented
mac_remove_nr_ue(gnb_mod_idP, ra->rnti);
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
return;
} else {
// The UE identified by C-RNTI still exists at the gNB
// Reset uplink failure flags/counters/timers at MAC and at RRC so gNB will resume again scheduling resources for this UE
UE_info->UE_sched_ctrl[UE_id_C].pusch_consecutive_dtx_cnt = 0;
UE_info->UE_sched_ctrl[UE_id_C].ul_failure = 0;
nr_mac_gNB_rrc_ul_failure_reset(gnb_mod_idP, frameP, slotP, ra->crnti);
}
}
LOG_I(NR_MAC, "Scheduling RA-Msg4 for TC_RNTI 0x%04x (state %d, frame %d, slot %d)\n",
(ra->msg3_dcch_dtch?ra->crnti:ra->rnti), ra->state, ra->Msg4_frame, ra->Msg4_slot);
}
......
......@@ -215,6 +215,182 @@ void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
/* rlc_data_req queue - end */
/****************************************************************************/
/****************************************************************************/
/* pdcp_data_ind thread - begin */
/****************************************************************************/
typedef struct {
protocol_ctxt_t ctxt_pP;
srb_flag_t srb_flagP;
MBMS_flag_t MBMS_flagP;
rb_id_t rb_id;
sdu_size_t sdu_buffer_size;
mem_block_t *sdu_buffer;
} pdcp_data_ind_queue_item;
#define PDCP_DATA_IND_QUEUE_SIZE 10000
typedef struct {
pdcp_data_ind_queue_item q[PDCP_DATA_IND_QUEUE_SIZE];
volatile int start;
volatile int length;
pthread_mutex_t m;
pthread_cond_t c;
} pdcp_data_ind_queue;
static pdcp_data_ind_queue pq;
static void do_pdcp_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_id,
const sdu_size_t sdu_buffer_size,
mem_block_t *const sdu_buffer)
{
nr_pdcp_ue_t *ue;
nr_pdcp_entity_t *rb;
int rnti = ctxt_pP->rnti;
if (ctxt_pP->module_id != 0 ||
//ctxt_pP->enb_flag != 1 ||
ctxt_pP->instance != 0 ||
ctxt_pP->eNB_index != 0 ||
ctxt_pP->configured != 1 ||
ctxt_pP->brOption != 0) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}
if (ctxt_pP->enb_flag)
T(T_ENB_PDCP_UL, T_INT(ctxt_pP->module_id), T_INT(rnti),
T_INT(rb_id), T_INT(sdu_buffer_size));
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
if (srb_flagP == 1) {
if (rb_id < 1 || rb_id > 2)
rb = NULL;
else
rb = ue->srb[rb_id - 1];
} else {
if (rb_id < 1 || rb_id > 5)
rb = NULL;
else
rb = ue->drb[rb_id - 1];
}
if (rb != NULL) {
rb->recv_pdu(rb, (char *)sdu_buffer->data, sdu_buffer_size);
} else {
LOG_E(PDCP, "%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)\n",
__FILE__, __LINE__, __FUNCTION__, rb_id, srb_flagP);
exit(1);
}
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
free_mem_block(sdu_buffer, __FUNCTION__);
}
static void *pdcp_data_ind_thread(void *_)
{
int i;
pthread_setname_np(pthread_self(), "PDCP data ind");
while (1) {
if (pthread_mutex_lock(&pq.m) != 0) abort();
while (pq.length == 0)
if (pthread_cond_wait(&pq.c, &pq.m) != 0) abort();
i = pq.start;
if (pthread_mutex_unlock(&pq.m) != 0) abort();
do_pdcp_data_ind(&pq.q[i].ctxt_pP,
pq.q[i].srb_flagP,
pq.q[i].MBMS_flagP,
pq.q[i].rb_id,
pq.q[i].sdu_buffer_size,
pq.q[i].sdu_buffer);
if (pthread_mutex_lock(&pq.m) != 0) abort();
pq.length--;
pq.start = (pq.start + 1) % PDCP_DATA_IND_QUEUE_SIZE;
if (pthread_cond_signal(&pq.c) != 0) abort();
if (pthread_mutex_unlock(&pq.m) != 0) abort();
}
}
static void init_nr_pdcp_data_ind_queue(void)
{
pthread_t t;
pthread_mutex_init(&pq.m, NULL);
pthread_cond_init(&pq.c, NULL);
if (pthread_create(&t, NULL, pdcp_data_ind_thread, NULL) != 0) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}
}
static void enqueue_pdcp_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_id,
const sdu_size_t sdu_buffer_size,
mem_block_t *const sdu_buffer)
{
int i;
int logged = 0;
if (pthread_mutex_lock(&pq.m) != 0) abort();
while (pq.length == PDCP_DATA_IND_QUEUE_SIZE) {
if (!logged) {
logged = 1;
LOG_W(PDCP, "%s: pdcp_data_ind queue is full\n", __FUNCTION__);
}
if (pthread_cond_wait(&pq.c, &pq.m) != 0) abort();
}
i = (pq.start + pq.length) % PDCP_DATA_IND_QUEUE_SIZE;
pq.length++;
pq.q[i].ctxt_pP = *ctxt_pP;
pq.q[i].srb_flagP = srb_flagP;
pq.q[i].MBMS_flagP = MBMS_flagP;
pq.q[i].rb_id = rb_id;
pq.q[i].sdu_buffer_size = sdu_buffer_size;
pq.q[i].sdu_buffer = sdu_buffer;
if (pthread_cond_signal(&pq.c) != 0) abort();
if (pthread_mutex_unlock(&pq.m) != 0) abort();
}
boolean_t pdcp_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_id,
const sdu_size_t sdu_buffer_size,
mem_block_t *const sdu_buffer)
{
enqueue_pdcp_data_ind(ctxt_pP,
srb_flagP,
MBMS_flagP,
rb_id,
sdu_buffer_size,
sdu_buffer);
return true;
}
/****************************************************************************/
/* pdcp_data_ind thread - end */
/****************************************************************************/
/****************************************************************************/
/* hacks to be cleaned up at some point - begin */
/****************************************************************************/
......@@ -375,6 +551,7 @@ void pdcp_layer_init(void)
init_nr_rlc_data_req_queue();
}
init_nr_pdcp_data_ind_queue();
nr_pdcp_init_timer_thread(nr_pdcp_ue_manager);
}
......@@ -639,62 +816,6 @@ srb_found:
}
}
boolean_t pdcp_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_id,
const sdu_size_t sdu_buffer_size,
mem_block_t *const sdu_buffer)
{
nr_pdcp_ue_t *ue;
nr_pdcp_entity_t *rb;
int rnti = ctxt_pP->rnti;
if (ctxt_pP->module_id != 0 ||
//ctxt_pP->enb_flag != 1 ||
ctxt_pP->instance != 0 ||
ctxt_pP->eNB_index != 0 ||
ctxt_pP->configured != 1 ||
ctxt_pP->brOption != 0) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}
if (ctxt_pP->enb_flag)
T(T_ENB_PDCP_UL, T_INT(ctxt_pP->module_id), T_INT(rnti),
T_INT(rb_id), T_INT(sdu_buffer_size));
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
if (srb_flagP == 1) {
if (rb_id < 1 || rb_id > 2)
rb = NULL;
else
rb = ue->srb[rb_id - 1];
} else {
if (rb_id < 1 || rb_id > 5)
rb = NULL;
else
rb = ue->drb[rb_id - 1];
}
if (rb != NULL) {
rb->recv_pdu(rb, (char *)sdu_buffer->data, sdu_buffer_size);
} else {
LOG_E(PDCP, "%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)\n",
__FILE__, __LINE__, __FUNCTION__, rb_id, srb_flagP);
exit(1);
}
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
free_mem_block(sdu_buffer, __FUNCTION__);
return 1;
}
void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
{
MessageDef *msg_p;
......
......@@ -68,64 +68,6 @@ typedef enum {
} UE_MAC_Tx_ind_type_e;
// *** UE_UL_Config.request related structures
typedef struct{
//module_id_t module_idP;
//int CC_id;
//frame_t frameP;
uint8_t eNB_id;
//uint16_t rnti;
//sub_frame_t subframe_tx;
uint32_t SR_payload; //0 or 1
}UE_MAC_ul_config_SR;
typedef struct{
//module_id_t module_idP;
//int CC_id;
//frame_t frameP;
uint8_t eNB_indexP;
//sub_frame_t subframeP;
uint8_t ra_RACH_MaskIndex;
int8_t ra_PREAMBLE_RECEIVED_TARGET_POWER;
uint8_t ra_TDD_map_index;
uint16_t ra_RNTI;
uint8_t *Msg3;
}UE_MAC_ul_config_rach;
typedef struct {
union {
UE_MAC_ul_config_rach ue_rach_config;
//UE_MAC_ul_config_ULSCH ue_ULSCH_pdu;
UE_MAC_ul_config_SR ue_SR_config;
};
} UE_MAC_ul_config_request_list;
typedef struct {
nfapi_tl_t tl;
uint16_t length_list;
UE_MAC_ul_config_request_list* ue_ul_config_list;
} UE_MAC_ul_config_request_body_t;
typedef struct {
//nfapi_p7_message_header_t header;
uint16_t sfn_sf;
UE_MAC_ul_config_request_body_t ue_ul_config_request_body; //nfapi_dl_config_request_body_t
} UE_MAC_ul_config_request_t;
// *** UE_Tx.request related structures
typedef struct {
......
......@@ -383,3 +383,17 @@ void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP,
LOG_D(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP);
}
}
void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP) {
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[Mod_instP], rntiP);
if (ue_context_p != NULL) {
LOG_W(RRC,"Frame %d, Subframe %d: UE %x UL failure reset, deactivating timer\n",frameP,subframeP,rntiP);
ue_context_p->ue_context.ul_failure_timer=0;
} else {
LOG_W(RRC,"Frame %d, Subframe %d: UL failure reset: UE %x unknown \n",frameP,subframeP,rntiP);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment