Commit a5ca7c4b authored by Laurent THOMAS's avatar Laurent THOMAS

merge develop

parents 3fde37a2 b04731d7
......@@ -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)),
......
......@@ -178,7 +178,8 @@ class Containerize():
self.dockerfileprefix = '.rhel8.2'
self.cliBuildOptions = '--no-cache --disable-compression'
imageNames = []
# we always build the ran-build image with all targets
imageNames = [('ran-build', 'build')]
result = re.search('eNB', self.imageKind)
# Creating a tupple with the imageName and the DockerFile prefix pattern on obelix
if result is not None:
......@@ -198,8 +199,6 @@ class Containerize():
imageNames.append(('oai-physim', 'phySim'))
if self.host == 'Ubuntu':
imageNames.append(('oai-lte-ru', 'lteRU'))
if len(imageNames) == 0:
imageNames.append(('oai-enb', 'eNB'))
# Workaround for some servers, we need to erase completely the workspace
if self.forcedWorkspaceCleanup:
......@@ -216,37 +215,37 @@ class Containerize():
mySSH.command('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/', '\$', 5)
mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5)
sharedimage = 'ran-build'
sharedTag = 'develop'
forceSharedImageBuild = False
baseImage = 'ran-base'
baseTag = 'develop'
forceBaseImageBuild = False
imageTag = 'develop'
if (self.ranAllowMerge):
imageTag = 'ci-temp'
if self.ranTargetBranch == 'develop':
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.ran' + self.dockerfileprefix + ' | grep --colour=never -i INDEX', '\$', 5)
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.base' + self.dockerfileprefix + ' | grep --colour=never -i INDEX', '\$', 5)
result = re.search('index', mySSH.getBefore())
if result is not None:
forceSharedImageBuild = True
sharedTag = 'ci-temp'
forceBaseImageBuild = True
baseTag = 'ci-temp'
else:
forceSharedImageBuild = True
forceBaseImageBuild = True
# Let's remove any previous run artifacts if still there
mySSH.command(self.cli + ' image prune --force', '\$', 30)
if forceSharedImageBuild:
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag + ' || true', '\$', 30)
if forceBaseImageBuild:
mySSH.command(self.cli + ' image rm ' + baseImage + ':' + baseTag + ' || true', '\$', 30)
for image,pattern in imageNames:
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30)
# Build the shared image only on Push Events (not on Merge Requests)
# On when the shared image docker file is being modified.
if forceSharedImageBuild:
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
# First verify if the shared image was properly created.
# Build the base image only on Push Events (not on Merge Requests)
# On when the base image docker file is being modified.
if forceBaseImageBuild:
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + baseImage + ' --tag ' + baseImage + ':' + baseTag + ' --file docker/Dockerfile.base' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-base.log 2>&1', '\$', 1600)
# First verify if the base image was properly created.
status = True
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + sharedTag, '\$', 5)
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + baseImage + ':' + baseTag, '\$', 5)
if mySSH.getBefore().count('o such image') != 0:
logging.error('\u001B[1m Could not build properly ran-build\u001B[0m')
logging.error('\u001B[1m Could not build properly ran-base\u001B[0m')
status = False
else:
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore())
......@@ -254,20 +253,20 @@ class Containerize():
imageSize = float(result.group('size'))
imageSize = imageSize / 1000
if imageSize < 1000:
logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' kbytes'
logging.debug('\u001B[1m ran-base size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' kbytes'
else:
imageSize = imageSize / 1000
if imageSize < 1000:
logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Mbytes'
logging.debug('\u001B[1m ran-base size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' Mbytes'
else:
imageSize = imageSize / 1000
logging.debug('\u001B[1m ran-build size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Gbytes'
logging.debug('\u001B[1m ran-base size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' Gbytes'
else:
logging.debug('ran-build size is unknown')
# If the shared image failed, no need to continue
logging.debug('ran-base size is unknown')
# If the base image failed, no need to continue
if not status:
# Recover the name of the failed container?
mySSH.command(self.cli + ' ps --quiet --filter "status=exited" -n1 | xargs ' + self.cli + ' rm -f', '\$', 5)
......@@ -279,16 +278,18 @@ class Containerize():
sys.exit(1)
else:
# Recover build logs, for the moment only possible when build is successful
mySSH.command(self.cli + ' create --name test ' + sharedimage + ':' + sharedTag, '\$', 5)
mySSH.command('mkdir -p cmake_targets/log/ran-build', '\$', 5)
mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/ran-build', '\$', 5)
mySSH.command(self.cli + ' create --name test ' + baseImage + ':' + baseTag, '\$', 5)
mySSH.command('mkdir -p cmake_targets/log/ran-base', '\$', 5)
mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/ran-base', '\$', 5)
mySSH.command(self.cli + ' rm -f test', '\$', 5)
# Build the target image(s)
for image,pattern in imageNames:
# the archived Dockerfiles have "ran-build:latest" as base image
# the archived Dockerfiles have "ran-base:latest" as base image
# we need to update them with proper tag
mySSH.command('sed -i -e "s#' + sharedimage + ':latest#' + sharedimage + ':' + sharedTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
mySSH.command('sed -i -e "s#' + baseImage + ':latest#' + baseImage + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
if image != 'ran-build':
mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200)
# split the log
mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5)
......@@ -319,7 +320,7 @@ class Containerize():
logging.debug('\u001B[1m ' + image + ' size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
self.allImagesSize[image] = str(round(imageSize,1)) + ' Gbytes'
else:
logging.debug('ran-build size is unknown')
logging.debug('ran-base size is unknown')
self.allImagesSize[image] = 'unknown'
# Now pruning dangling images in between target builds
mySSH.command(self.cli + ' image prune --force', '\$', 30)
......@@ -343,8 +344,8 @@ class Containerize():
#Trying to identify the errors and warnings for each built images
imageNames1 = imageNames
shared = ('ran-build','ran')
imageNames1.insert(0, shared)
base = ('ran-base','ran')
imageNames1.insert(0, base)
for image,pattern in imageNames1:
files = {}
file_list = [f for f in os.listdir('build_log_' + self.testCase_id + '/' + image) if os.path.isfile(os.path.join('build_log_' + self.testCase_id + '/' + image, f)) and f.endswith('.txt')]
......
......@@ -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
......
......@@ -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 \
......@@ -100,16 +90,15 @@ COPY --from=enb-build \
/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 \
......@@ -106,16 +96,15 @@ COPY --from=gnb-build \
/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 \
......@@ -104,16 +94,15 @@ COPY --from=lte-ue-build \
/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 \
......@@ -107,16 +98,15 @@ COPY --from=nr-ue-build \
/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:
......
......@@ -235,20 +235,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
......
......@@ -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);
}
}
......
......@@ -855,11 +855,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;
......@@ -1039,17 +1035,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
......@@ -1102,19 +1092,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));
......@@ -1424,11 +1407,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
......@@ -1518,11 +1498,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" );
......@@ -1891,14 +1868,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
......@@ -1974,9 +1946,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);
......@@ -1986,11 +1956,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
......
......@@ -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);
}
......
......@@ -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 {
......
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