diff --git a/charts/physims/charts/dlsim/values.yaml b/charts/physims/charts/dlsim/values.yaml index d78fbb7409..7f45b42f72 100644 --- a/charts/physims/charts/dlsim/values.yaml +++ b/charts/physims/charts/dlsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/ldpctest/values.yaml b/charts/physims/charts/ldpctest/values.yaml index e2e6467923..b3cc476cf8 100644 --- a/charts/physims/charts/ldpctest/values.yaml +++ b/charts/physims/charts/ldpctest/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/nr-dlschsim/values.yaml b/charts/physims/charts/nr-dlschsim/values.yaml index 8944e7e724..b7ef28f47a 100644 --- a/charts/physims/charts/nr-dlschsim/values.yaml +++ b/charts/physims/charts/nr-dlschsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/nr-dlsim/values.yaml b/charts/physims/charts/nr-dlsim/values.yaml index 573e8630de..2a35912fee 100644 --- a/charts/physims/charts/nr-dlsim/values.yaml +++ b/charts/physims/charts/nr-dlsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/nr-pbchsim/values.yaml b/charts/physims/charts/nr-pbchsim/values.yaml index 28c4678334..9a25d2810d 100644 --- a/charts/physims/charts/nr-pbchsim/values.yaml +++ b/charts/physims/charts/nr-pbchsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/nr-prachsim/values.yaml b/charts/physims/charts/nr-prachsim/values.yaml index 9e3c68b54d..dba6cc16c0 100644 --- a/charts/physims/charts/nr-prachsim/values.yaml +++ b/charts/physims/charts/nr-prachsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/nr-pucchsim/values.yaml b/charts/physims/charts/nr-pucchsim/values.yaml index 449670f713..77fe0963ac 100644 --- a/charts/physims/charts/nr-pucchsim/values.yaml +++ b/charts/physims/charts/nr-pucchsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/nr-ulschsim/values.yaml b/charts/physims/charts/nr-ulschsim/values.yaml index a3afc090e8..efb011a7f6 100644 --- a/charts/physims/charts/nr-ulschsim/values.yaml +++ b/charts/physims/charts/nr-ulschsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/nr-ulsim/values.yaml b/charts/physims/charts/nr-ulsim/values.yaml index 2bf96498e8..71c455b69c 100644 --- a/charts/physims/charts/nr-ulsim/values.yaml +++ b/charts/physims/charts/nr-ulsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/polartest/values.yaml b/charts/physims/charts/polartest/values.yaml index e0a532fdd8..e0751e8ec4 100644 --- a/charts/physims/charts/polartest/values.yaml +++ b/charts/physims/charts/polartest/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/smallblocktest/values.yaml b/charts/physims/charts/smallblocktest/values.yaml index f2f113d9b6..f933a978fd 100644 --- a/charts/physims/charts/smallblocktest/values.yaml +++ b/charts/physims/charts/smallblocktest/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/ulsim/values.yaml b/charts/physims/charts/ulsim/values.yaml index 35dc14d596..d25b6fc2a5 100644 --- a/charts/physims/charts/ulsim/values.yaml +++ b/charts/physims/charts/ulsim/values.yaml @@ -4,11 +4,11 @@ replicaCount: 1 -namespace: "oaicicd-ran-tmp" +namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: temp # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/templates/rbac.yaml b/charts/physims/templates/rbac.yaml index 35f956a203..b341744796 100644 --- a/charts/physims/templates/rbac.yaml +++ b/charts/physims/templates/rbac.yaml @@ -1,12 +1,26 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role metadata: - name: {{ .Chart.Name }}-{{ .Values.global.namespace }}-rbac -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role +rules: +- apiGroups: + - security.openshift.io + resourceNames: + - privileged + resources: + - securitycontextconstraints + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount name: {{ .Values.global.serviceAccountName }} - namespace: {{ .Values.global.namespace }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role + apiGroup: rbac.authorization.k8s.io diff --git a/charts/physims/values.yaml b/charts/physims/values.yaml index b348e822bb..d5253c7812 100644 --- a/charts/physims/values.yaml +++ b/charts/physims/values.yaml @@ -4,9 +4,9 @@ global: serviceAccountName: oai-physim-sa - namespace: "oaicicd-ran-tmp" + namespace: "OAICICD_PROJECT" image: - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim version: TAG ## Declaring values specific to coressponding physim to overwrite diff --git a/ci-scripts/build_fr1_template.yaml b/ci-scripts/build_fr1_template.yaml index 02e49bc4b5..5c7b2fc6f4 100755 --- a/ci-scripts/build_fr1_template.yaml +++ b/ci-scripts/build_fr1_template.yaml @@ -14,7 +14,7 @@ steps: ADB: #on Caracal - ADBIPAddress : 192.168.18.196 + ADBIPAddress : 172.21.16.132 ADBUserName : oaici ADBPassword : KkexF6CErOi1fNuebCPsuIVK diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml index 89bda5fa92..b888f6bb59 100644 --- a/ci-scripts/ci_ueinfra.yaml +++ b/ci-scripts/ci_ueinfra.yaml @@ -12,7 +12,7 @@ idefix: LogStore : /media/usb-drive/ci_qlogs PLMN : 22201 UENetwork : wwan0 - HostIPAddress : 192.168.18.188 + HostIPAddress : 172.21.16.135 HostUsername : oaicicd HostPassword : oaicicd HostSourceCodePath : none @@ -32,7 +32,7 @@ nrmodule2_quectel: LogStore : /media/ci_qlogs PLMN : 20897 UENetwork : wwan0 - HostIPAddress : 192.168.18.189 + HostIPAddress : 172.21.16.139 HostUsername : nrmodule2 HostPassword : linux HostSourceCodePath : none @@ -40,6 +40,7 @@ nrmodule2_quectel: - sudo -S ip link set dev wwan1 mtu 1500 MTU : 1500 +# CAUTION: 192.168.18.89 address has to be changed when the server is moved #single UE single ping amarisoft_ue_1: ID: amarisoft_ue_1 @@ -97,7 +98,7 @@ dummy: DetachScript : '' PLMN : 22201 UENetwork : wwan0 - HostIPAddress : 192.168.18.188 + HostIPAddress : 172.21.16.135 HostUsername : oaicicd HostPassword : oaicicd HostSourceCodePath : none diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 8092febe39..89a3ac586d 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -243,7 +243,7 @@ class Containerize(): # 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) + mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + baseImage + ' --tag ' + baseImage + ':' + baseTag + ' --file docker/Dockerfile.base' + self.dockerfileprefix + ' . > 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\' ' + baseImage + ':' + baseTag, '\$', 5) @@ -1146,19 +1146,19 @@ class Containerize(): mySSH.open(ipAddr, userName, password) # Check if route to asterix gnb exists mySSH.command('ip route | grep --colour=never "192.168.68.64/26"', '\$', 10) - result = re.search('192.168.18.194', mySSH.getBefore()) + result = re.search('172.21.16.127', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.64/26 via 192.168.18.194 dev eno1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.64/26 via 172.21.16.127 dev eno1', '\$', 10) # Check if route to obelix enb exists mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10) - result = re.search('192.168.18.193', mySSH.getBefore()) + result = re.search('172.21.16.128', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 192.168.18.193 dev eno1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev eno1', '\$', 10) # Check if route to nepes gnb exists mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10) - result = re.search('192.168.18.209', mySSH.getBefore()) + result = re.search('172.21.16.137', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 192.168.18.209 dev eno1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 172.21.16.137 dev eno1', '\$', 10) # Check if forwarding is enabled mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10) result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore()) @@ -1174,19 +1174,19 @@ class Containerize(): mySSH.open(ipAddr, userName, password) # Check if route to porcepix epc exists mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10) - result = re.search('192.168.18.210', mySSH.getBefore()) + result = re.search('172.21.16.136', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 192.168.18.210 dev em1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 172.21.16.136 dev em1', '\$', 10) # Check if route to porcepix cn5g exists mySSH.command('ip route | grep --colour=never "192.168.70.128/26"', '\$', 10) - result = re.search('192.168.18.210', mySSH.getBefore()) + result = re.search('172.21.16.136', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.70.128/26 via 192.168.18.210 dev em1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.70.128/26 via 172.21.16.136 dev em1', '\$', 10) # Check if X2 route to obelix enb exists mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10) - result = re.search('192.168.18.193', mySSH.getBefore()) + result = re.search('172.21.16.128', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 192.168.18.193 dev em1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev em1', '\$', 10) # Check if forwarding is enabled mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10) result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore()) @@ -1202,19 +1202,19 @@ class Containerize(): mySSH.open(ipAddr, userName, password) # Check if route to porcepix epc exists mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10) - result = re.search('192.168.18.210', mySSH.getBefore()) + result = re.search('172.21.16.136', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 192.168.18.210 dev eno1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 172.21.16.136 dev eno1', '\$', 10) # Check if X2 route to asterix gnb exists mySSH.command('ip route | grep --colour=never "192.168.68.64/26"', '\$', 10) - result = re.search('192.168.18.194', mySSH.getBefore()) + result = re.search('172.21.16.127', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.64/26 via 192.168.18.194 dev eno1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.64/26 via 172.21.16.127 dev eno1', '\$', 10) # Check if X2 route to nepes gnb exists mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10) - result = re.search('192.168.18.209', mySSH.getBefore()) + result = re.search('172.21.16.137', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 192.168.18.209 dev eno1', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 172.21.16.137 dev eno1', '\$', 10) # Check if forwarding is enabled mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10) result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore()) @@ -1230,14 +1230,14 @@ class Containerize(): mySSH.open(ipAddr, userName, password) # Check if route to porcepix epc exists mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10) - result = re.search('192.168.18.210', mySSH.getBefore()) + result = re.search('172.21.16.136', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 192.168.18.210 dev enp0s31f6', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 172.21.16.136 dev enp0s31f6', '\$', 10) # Check if X2 route to obelix enb exists mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10) - result = re.search('192.168.18.193', mySSH.getBefore()) + result = re.search('172.21.16.128', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 192.168.18.193 dev enp0s31f6', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev enp0s31f6', '\$', 10) # Check if forwarding is enabled mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10) result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore()) diff --git a/ci-scripts/cls_log_mgt.py b/ci-scripts/cls_log_mgt.py index 905a105512..e29e9168b7 100644 --- a/ci-scripts/cls_log_mgt.py +++ b/ci-scripts/cls_log_mgt.py @@ -64,10 +64,10 @@ class Log_Mgt: if m is not None: return int(m.group(1)) - def __RemoveOldest(self): + def __RemoveOldest(self, days): mySSH = sshconnection.SSHConnection() mySSH.open(self.IPAddress, self.Username, self.Password) - COMMAND='echo ' + self.Password + ' | sudo -S find ' + self.path + ' -type f -mtime +14 -delete' + COMMAND='echo ' + self.Password + ' | sudo -S find ' + self.path + ' -type f -mtime +' + str(days) + ' -delete' mySSH.command(COMMAND,'\$',20) mySSH.close() @@ -79,13 +79,18 @@ class Log_Mgt: def LogRotation(self): - used_space = self.__CheckUsedSpace() #avail space in target folder - if used_space > 80 : - logging.debug('\u001B[1;37;41m Used Disk > 80%, on ' + self.Username+'@'+self.IPAddress + '\u001B[0m') - logging.debug('\u001B[1;37;41m Removing Artifacts older than 14 days \u001B[0m') - self.__RemoveOldest() - else: - logging.debug('Used Disk < 80%, on ' + self.Username+'@'+self.IPAddress +', no cleaning required') + doLoop = True + nbDays = 14 + while doLoop and nbDays > 2: + used_space = self.__CheckUsedSpace() #avail space in target folder + if used_space > 80 : + logging.debug('\u001B[1;37;41m Used Disk (' + str(used_space) + '%) > 80%, on ' + self.Username+'@'+self.IPAddress + '\u001B[0m') + logging.debug('\u001B[1;37;41m Removing Artifacts older than ' + nbDays + ' days \u001B[0m') + self.__RemoveOldest(nbDays) + nbDays -= 1 + else: + logging.debug('Used Disk (' + str(used_space) + '%) < 80%, on ' + self.Username+'@'+self.IPAddress +', no cleaning required') + doLoop = False diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index fb10700798..dcf75a34fc 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -107,14 +107,15 @@ class Module_UE: def GetModuleIPAddress(self): HOST=self.HostUsername+'@'+self.HostIPAddress response= [] - tentative = 3 + tentative = 8 while (len(response)==0) and (tentative>0): COMMAND="ip a show dev " + self.UENetwork + " | grep --colour=never inet | grep " + self.UENetwork - logging.debug(COMMAND) + if tentative == 8: + logging.debug(COMMAND) ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) response = ssh.stdout.readlines() tentative-=1 - time.sleep(10) + time.sleep(2) if (tentative==0) and (len(response)==0): logging.debug('\u001B[1;37;41m Module IP Address Not Found! Time expired \u001B[0m') return -1 diff --git a/ci-scripts/html.py b/ci-scripts/cls_oai_html.py similarity index 100% rename from ci-scripts/html.py rename to ci-scripts/cls_oai_html.py diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 33910f1f9b..9d5ae84038 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -439,7 +439,7 @@ class OaiCiTest(): while cnt < 4: Module_UE.Command("wup") logging.debug("Waiting for IP address to be assigned") - time.sleep(20) + time.sleep(5) logging.debug("Retrieve IP address") status=Module_UE.GetModuleIPAddress() if status==0: @@ -1111,7 +1111,7 @@ class OaiCiTest(): while cnt < 4: Module_UE.Command("wup") logging.debug("Waiting for IP address to be assigned") - time.sleep(20) + time.sleep(5) logging.debug("Retrieve IP address") status=Module_UE.GetModuleIPAddress() if status==0: diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index 33792f6ca4..ecd8f63af1 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -32,7 +32,7 @@ import logging #to create a SSH object locally in the methods import sshconnection #to update the HTML object -import html +import cls_oai_html from multiprocessing import SimpleQueue #for log folder maintenance import os diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 83fb74b7cb..3907fc2a34 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -33,7 +33,7 @@ #----------------------------------------------------------- import logging import sshconnection as SSH -import html +import cls_oai_html import os import re import time @@ -153,6 +153,7 @@ class PhySim: mySSH.command(f'oc project {ocProjectName}', '\$', 30) if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0: logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m') + mySSH.command('oc logout', '\$', 30) mySSH.close() HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL) RAN.prematureExit = True @@ -161,9 +162,10 @@ class PhySim: logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m') # Tag the image and push to the OC cluster - mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/ --tls-verify=false', '\$', 30) + mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/ --tls-verify=false', '\$', 30) if mySSH.getBefore().count('Login Succeeded!') == 0: logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m') + mySSH.command('oc logout', '\$', 30) mySSH.close() HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) RAN.prematureExit = True @@ -171,9 +173,11 @@ class PhySim: else: logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m') time.sleep(2) - mySSH.command('oc create -f openshift/oai-physim-image-stream.yml', '\$', 30) + mySSH.command('oc create -f openshift/oai-physim-image-stream.yml || true', '\$', 30) if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0: logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m') + mySSH.command('sudo podman logout https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/', '\$', 6) + mySSH.command('oc logout', '\$', 30) mySSH.close() HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL) RAN.prematureExit = True @@ -181,11 +185,13 @@ class PhySim: else: logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m') time.sleep(2) - mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 30) + mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 30) time.sleep(2) - mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag} --tls-verify=false', '\$', 180) + mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag} --tls-verify=false', '\$', 180) if mySSH.getBefore().count('Storing signatures') == 0: logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m') + mySSH.command('sudo podman logout https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/', '\$', 6) + mySSH.command('oc logout', '\$', 30) mySSH.close() HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL) RAN.prematureExit = True @@ -195,8 +201,9 @@ class PhySim: # Using helm charts deployment time.sleep(5) + mySSH.command(f'grep -rl OAICICD_PROJECT ./charts/ | xargs sed -i -e "s#OAICICD_PROJECT#{ocProjectName}#"', '\$', 30) mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6) - mySSH.command('helm install physim ./charts/physims/ | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30) + mySSH.command('helm install physim ./charts/physims/ 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30) if mySSH.getBefore().count('STATUS: deployed') == 0: logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m') mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30) @@ -206,8 +213,10 @@ class PhySim: mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True) if re.search('No resources found', mySSH.getBefore()): isFinished1 = True - mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 30) + mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 30) mySSH.command('oc delete is oai-physim', '\$', 30) + mySSH.command('sudo podman logout https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/', '\$', 6) + mySSH.command('oc logout', '\$', 30) mySSH.close() self.AnalyzeLogFile_phySim(HTML) RAN.prematureExit = True @@ -227,7 +236,7 @@ class PhySim: if isRunning == False: logging.error('\u001B[1m Some PODS Running FAILED \u001B[0m') mySSH.command('oc get pods -l app.kubernetes.io/instance=physim 2>&1 | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6) - mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) + mySSH.command('helm uninstall physim 2>&1 >> cmake_targets/log/physim_helm_summary.txt', '\$', 6) self.AnalyzeLogFile_phySim(HTML) isFinished1 = False while(isFinished1 == False): @@ -235,8 +244,10 @@ class PhySim: mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True) if re.search('No resources found', mySSH.getBefore()): isFinished1 = True - mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) + mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) mySSH.command('oc delete is oai-physim', '\$', 6) + mySSH.command('sudo podman logout https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/', '\$', 6) + mySSH.command('oc logout', '\$', 30) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL) HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) RAN.prematureExit = True @@ -293,9 +304,10 @@ class PhySim: isFinished1 = True if isFinished1 == True: logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m') - mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) + mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) mySSH.command('oc delete is oai-physim', '\$', 6) logging.debug('\u001B[1m Deleted the Image and ImageStream\u001B[0m') + mySSH.command('sudo podman logout https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/', '\$', 6) mySSH.command('oc logout', '\$', 6) mySSH.close() self.AnalyzeLogFile_phySim(HTML) diff --git a/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf b/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf index fe2e031acb..a7100a97e3 100644 --- a/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf +++ b/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf @@ -237,7 +237,7 @@ RUs = ( max_pdschReferenceSignalPower = -27; max_rxgain = 75; eNB_instances = [0]; - sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.20.2,second_addr=192.168.10.2"; + sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.20.2,second_addr=192.168.10.2"; } ); diff --git a/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf b/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf index a0742c57a6..1f358c1571 100644 --- a/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf +++ b/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf @@ -237,7 +237,7 @@ RUs = ( max_pdschReferenceSignalPower = -27; max_rxgain = 75; eNB_instances = [0]; - sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.20.2,second_addr=192.168.10.2"; + sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.20.2,second_addr=192.168.10.2"; } ); diff --git a/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf b/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf index dfc9beda71..f7088aee52 100644 --- a/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf +++ b/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf @@ -237,7 +237,7 @@ RUs = ( max_pdschReferenceSignalPower = -27; max_rxgain = 75; eNB_instances = [0]; - sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.20.2,second_addr=192.168.10.2"; + sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.20.2,second_addr=192.168.10.2"; } ); diff --git a/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf index 40f6f911b1..51ffb1d5cd 100644 --- a/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -239,7 +239,7 @@ RUs = ( #beamforming 1x4 matrix: bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000]; #clock_src = "external"; - sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf index edcd4f06ff..f80ce3751a 100644 --- a/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -240,7 +240,7 @@ RUs = ( #beamforming 1x4 matrix: bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000]; #clock_src = "external"; - sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf index 33ab30887f..d6edc09286 100644 --- a/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf @@ -209,9 +209,9 @@ gNBs = { GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.194/24"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.127/24"; GNB_INTERFACE_NAME_FOR_NGU = "em1"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.194/24"; + GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.127/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; @@ -258,7 +258,7 @@ RUs = ( ## beamforming 4x4 matrix: #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf index 4a5eaec89b..7f4b11c35d 100644 --- a/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf @@ -206,9 +206,9 @@ gNBs = { GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.194/24"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.127/24"; GNB_INTERFACE_NAME_FOR_NGU = "em1"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.194/24"; + GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.127/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; @@ -254,7 +254,7 @@ RUs = ( ## beamforming 4x4 matrix: #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf index 21863dcfc7..e3bd49e7fc 100644 --- a/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf @@ -230,7 +230,7 @@ RUs = ( bf_weights = [0x00007fff, 0x00007fff]; #clock_src = "external"; sf_extension = 0 - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf index 60fb16318f..5e6b3fb217 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf @@ -264,7 +264,7 @@ RUs = ( ## beamforming 4x4 matrix: #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; sf_extension = 0 - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf index 1d7c4b57f0..8489008300 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf @@ -261,7 +261,7 @@ RUs = ( ## beamforming 4x4 matrix: #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; sf_extension = 0 - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf index e2b331939b..9e1f499f03 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -263,7 +263,7 @@ RUs = ( ## beamforming 4x4 matrix: #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; sf_extension = 0 - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf index 324b3d2ce1..ce63578dd3 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf @@ -262,7 +262,7 @@ RUs = ( ## beamforming 4x4 matrix: #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; sf_extension = 0 - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" + sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal" } ); diff --git a/ci-scripts/main.py b/ci-scripts/main.py index c838c3740d..03947bdfc9 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -49,7 +49,7 @@ import cls_physim1 #class PhySim for physical simulators deploy and run import sshconnection import epc import ran -import html +import cls_oai_html #----------------------------------------------------------- @@ -518,7 +518,7 @@ CiTestObj = cls_oaicitest.OaiCiTest() SSH = sshconnection.SSHConnection() EPC = epc.EPCManagement() RAN = ran.RANManagement() -HTML = html.HTMLManagement() +HTML = cls_oai_html.HTMLManagement() CONTAINERS = cls_containerize.Containerize() SCA = cls_static_code_analysis.StaticCodeAnalysis() PHYSIM = cls_physim1.PhySim() @@ -779,19 +779,19 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HTML.CreateHtmlTabHeader() # On CI bench w/ containers, we need to validate if IP routes are set - if EPC.IPAddress == '192.168.18.210': + if EPC.IPAddress == '172.21.16.136': CONTAINERS.CheckAndAddRoute('porcepix', EPC.IPAddress, EPC.UserName, EPC.Password) - if CONTAINERS.eNBIPAddress == '192.168.18.194': + if CONTAINERS.eNBIPAddress == '172.21.16.127': CONTAINERS.CheckAndAddRoute('asterix', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword) - if CONTAINERS.eNB1IPAddress == '192.168.18.194': + if CONTAINERS.eNB1IPAddress == '172.21.16.127': CONTAINERS.CheckAndAddRoute('asterix', CONTAINERS.eNB1IPAddress, CONTAINERS.eNB1UserName, CONTAINERS.eNB1Password) - if CONTAINERS.eNBIPAddress == '192.168.18.193': + if CONTAINERS.eNBIPAddress == '172.21.16.128': CONTAINERS.CheckAndAddRoute('obelix', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword) - if CONTAINERS.eNB1IPAddress == '192.168.18.193': + if CONTAINERS.eNB1IPAddress == '172.21.16.128': CONTAINERS.CheckAndAddRoute('obelix', CONTAINERS.eNB1IPAddress, CONTAINERS.eNB1UserName, CONTAINERS.eNB1Password) - if CONTAINERS.eNBIPAddress == '192.168.18.209': + if CONTAINERS.eNBIPAddress == '172.21.16.137': CONTAINERS.CheckAndAddRoute('nepes', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword) - if CONTAINERS.eNB1IPAddress == '192.168.18.209': + if CONTAINERS.eNB1IPAddress == '172.21.16.137': CONTAINERS.CheckAndAddRoute('nepes', CONTAINERS.eNB1IPAddress, CONTAINERS.eNB1UserName, CONTAINERS.eNB1Password) CiTestObj.FailReportCnt = 0 diff --git a/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml b/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml index 56694920ba..a4dcb58e8b 100644 --- a/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml @@ -68,7 +68,7 @@ lte yes yes - 192.168.18.241 + 172.21.19.13 @@ -81,7 +81,7 @@ nr yes datalog_rt_stats.2x2.yaml - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_nsa_2x2_quectel_attach_detach.xml b/ci-scripts/xml_files/fr1_nsa_2x2_quectel_attach_detach.xml index 840521481e..335fe873a1 100644 --- a/ci-scripts/xml_files/fr1_nsa_2x2_quectel_attach_detach.xml +++ b/ci-scripts/xml_files/fr1_nsa_2x2_quectel_attach_detach.xml @@ -87,7 +87,7 @@ lte yes yes - 192.168.18.241 + 172.21.19.13 @@ -100,7 +100,7 @@ nr yes datalog_rt_stats.2x2.yaml - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_amarisoft_ue_1x.xml b/ci-scripts/xml_files/fr1_sa_amarisoft_ue_1x.xml index 194ed4e453..ea031a0174 100644 --- a/ci-scripts/xml_files/fr1_sa_amarisoft_ue_1x.xml +++ b/ci-scripts/xml_files/fr1_sa_amarisoft_ue_1x.xml @@ -52,7 +52,7 @@ yes yes datalog_rt_stats.2x2.yaml - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index 55268b909d..5995f75a64 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -60,7 +60,7 @@ nr yes yes - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml b/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml index 53b696c6eb..468005f54f 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml @@ -42,7 +42,7 @@ Initialize_OAI_UE Initialize OAI UE (N310) nr - --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=192.168.18.241,addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time + --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=172.21.19.13,addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time @@ -60,7 +60,7 @@ nr yes yes - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml b/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml index 8c2f7052e4..ef001a7518 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml @@ -60,7 +60,7 @@ nr yes yes - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_quectel.xml b/ci-scripts/xml_files/fr1_sa_quectel.xml index 576456ebc9..4d4edab56b 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel.xml @@ -70,7 +70,7 @@ yes yes datalog_rt_stats.2x2.yaml - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml b/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml index c5f2ddad5f..23eaccfcfd 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml @@ -68,7 +68,7 @@ yes yes datalog_rt_stats.2x2.yaml - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_quectel_stages.xml b/ci-scripts/xml_files/fr1_sa_quectel_stages.xml index 2707fd4ebf..603f3f919b 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel_stages.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel_stages.xml @@ -74,7 +74,7 @@ yes yes datalog_rt_stats.2x2.yaml - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/fr1_sa_quectel_stages_162prb.xml b/ci-scripts/xml_files/fr1_sa_quectel_stages_162prb.xml index 661bcb32fe..9371e46ec9 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel_stages_162prb.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel_stages_162prb.xml @@ -74,7 +74,7 @@ yes yes datalog_rt_stats.2x2.yaml - 192.168.18.252 + 172.21.19.14 diff --git a/ci-scripts/xml_files/lte_2x2_tm1_quectel.xml b/ci-scripts/xml_files/lte_2x2_tm1_quectel.xml index 11c4abce1b..6aa53200c8 100644 --- a/ci-scripts/xml_files/lte_2x2_tm1_quectel.xml +++ b/ci-scripts/xml_files/lte_2x2_tm1_quectel.xml @@ -65,7 +65,7 @@ lte yes yes - 192.168.18.241 + 172.21.19.13 diff --git a/ci-scripts/xml_files/lte_2x2_tm2_quectel.xml b/ci-scripts/xml_files/lte_2x2_tm2_quectel.xml index 714cf51a9b..84aa87aa23 100644 --- a/ci-scripts/xml_files/lte_2x2_tm2_quectel.xml +++ b/ci-scripts/xml_files/lte_2x2_tm2_quectel.xml @@ -65,7 +65,7 @@ lte yes yes - 192.168.18.241 + 172.21.19.13 diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md index 400559d269..be0d63838b 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md @@ -505,7 +505,7 @@ In my traffic test, I was able to ping outside of my local network. in SPGW-C config: ```yaml - DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100 DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4 PUSH_PROTOCOL_OPTION: 'true' ``` diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml index b15e794c10..a260857a34 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml @@ -115,7 +115,7 @@ services: TZ: Europe/Paris SGW_INTERFACE_NAME_FOR_S11: eth0 PGW_INTERFACE_NAME_FOR_SX: eth0 - DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100 DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4 PUSH_PROTOCOL_OPTION: 'true' APN_NI_1: oai.ipv4 diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml index e1e992c94c..3f63953b0e 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml @@ -115,7 +115,7 @@ services: TZ: Europe/Paris SGW_INTERFACE_NAME_FOR_S11: eth0 PGW_INTERFACE_NAME_FOR_SX: eth0 - DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100 DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4 PUSH_PROTOCOL_OPTION: 'true' APN_NI_1: oai.ipv4 diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml index ad665813f2..1165400273 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml @@ -115,7 +115,7 @@ services: TZ: Europe/Paris SGW_INTERFACE_NAME_FOR_S11: eth0 PGW_INTERFACE_NAME_FOR_SX: eth0 - DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100 DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4 PUSH_PROTOCOL_OPTION: 'true' APN_NI_1: oai.ipv4 diff --git a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml index ffa92bac49..86f6c80b59 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml @@ -115,7 +115,7 @@ services: TZ: Europe/Paris SGW_INTERFACE_NAME_FOR_S11: eth0 PGW_INTERFACE_NAME_FOR_SX: eth0 - DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100 DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4 PUSH_PROTOCOL_OPTION: 'true' APN_NI_1: oai.ipv4 diff --git a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml index 74a23905f0..d52b228ec6 100644 --- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml @@ -120,7 +120,7 @@ services: - SMF_INTERFACE_PORT_FOR_SBI=80 - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - SMF_API_VERSION=v1 - - DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129 + - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - AMF_IPV4_ADDRESS=0.0.0.0 - AMF_PORT=80 diff --git a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml index 3e46adb9e7..7758c39592 100644 --- a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml @@ -120,7 +120,7 @@ services: - SMF_INTERFACE_PORT_FOR_SBI=80 - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - SMF_API_VERSION=v1 - - DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129 + - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - AMF_IPV4_ADDRESS=0.0.0.0 - AMF_PORT=80 diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md index 531f2406ef..f1e1287995 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md @@ -326,16 +326,16 @@ Removing network l2sim-oai-traffic-net In the `SMF` section, provide your own DNS IP address: ```yaml - DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 ``` -In the `gNB` section, provide your docker-host primary IP address and interface name: in our case `192.168.18.193` and `eno1`. +In the `gNB` section, provide your docker-host primary IP address and interface name: in our case `172.21.16.128` and `eno1`. ```yaml GNB_NGA_IF_NAME: eno1 - GNB_NGA_IP_ADDRESS: 192.168.18.193 + GNB_NGA_IP_ADDRESS: 172.21.16.128 GNB_NGU_IF_NAME: eno1 - GNB_NGU_IP_ADDRESS: 192.168.18.193 + GNB_NGU_IP_ADDRESS: 172.21.16.128 ``` Same thing in the `nr-ue` section: diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml index c899f8cc7e..a28b640e1a 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml @@ -120,7 +120,7 @@ services: - SMF_INTERFACE_PORT_FOR_SBI=80 - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - SMF_API_VERSION=v1 - - DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129 + - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - AMF_IPV4_ADDRESS=0.0.0.0 - AMF_PORT=80 @@ -241,9 +241,9 @@ services: NSSAI_SD1: 112233 AMF_IP_ADDRESS: 192.168.71.132 GNB_NGA_IF_NAME: eno1 - GNB_NGA_IP_ADDRESS: 192.168.18.193 + GNB_NGA_IP_ADDRESS: 172.21.16.128 GNB_NGU_IF_NAME: eno1 - GNB_NGU_IP_ADDRESS: 192.168.18.193 + GNB_NGU_IP_ADDRESS: 172.21.16.128 LOCAL_S_IF_NAME: 'lo:' REMOTE_S_ADDRESS: 127.0.0.1 LOCAL_S_ADDRESS: 127.0.0.2 diff --git a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml index f27ec3050d..696d8c6698 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml @@ -120,7 +120,7 @@ services: - SMF_INTERFACE_PORT_FOR_SBI=80 - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - SMF_API_VERSION=v1 - - DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129 + - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - AMF_IPV4_ADDRESS=0.0.0.0 - AMF_PORT=80 diff --git a/ci-scripts/yaml_files/fr1_epc_20897/docker-compose.yml b/ci-scripts/yaml_files/fr1_epc_20897/docker-compose.yml index a3675dc78e..91d15b5251 100644 --- a/ci-scripts/yaml_files/fr1_epc_20897/docker-compose.yml +++ b/ci-scripts/yaml_files/fr1_epc_20897/docker-compose.yml @@ -132,7 +132,7 @@ services: TZ: Europe/Paris SGW_INTERFACE_NAME_FOR_S11: eth0 PGW_INTERFACE_NAME_FOR_SX: eth0 - DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100 DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4 PUSH_PROTOCOL_OPTION: 'true' APN_NI_1: oai.ipv4 diff --git a/ci-scripts/yaml_files/magma_nsa_20897/docker-compose.yml b/ci-scripts/yaml_files/magma_nsa_20897/docker-compose.yml index df14e900e7..f320e7e3df 100644 --- a/ci-scripts/yaml_files/magma_nsa_20897/docker-compose.yml +++ b/ci-scripts/yaml_files/magma_nsa_20897/docker-compose.yml @@ -116,7 +116,7 @@ services: TZ: Europe/Paris SGW_INTERFACE_NAME_FOR_S11: eth0 PGW_INTERFACE_NAME_FOR_SX: eth0 - DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129 + DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100 DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4 PUSH_PROTOCOL_OPTION: 'true' APN_NI_1: oai.ipv4 diff --git a/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml b/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml index 92ccdf8a0a..2df5eac61b 100644 --- a/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml +++ b/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml @@ -20,7 +20,7 @@ services: NB_PRB: 25 ENABLE_MEASUREMENT_REPORTS: 'yes' ENABLE_X2: 'yes' - MME_S1C_IP_ADDRESS: 192.168.18.210 + MME_S1C_IP_ADDRESS: 172.21.16.136 ENB_S1C_IF_NAME: eth0 ENB_S1C_IP_ADDRESS: 192.168.68.130 ENB_S1U_IF_NAME: eth0 @@ -29,7 +29,7 @@ services: RRC_INACTIVITY_THRESHOLD: 0 FLEXRAN_ENABLED: 'no' FLEXRAN_INTERFACE_NAME: eth0 - FLEXRAN_IPV4_ADDRESS: 192.168.18.210 + FLEXRAN_IPV4_ADDRESS: 172.21.16.136 THREAD_PARALLEL_CONFIG: PARALLEL_SINGLE_THREAD USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function volumes: diff --git a/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml index c6096956a8..61266aa2b1 100644 --- a/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml @@ -15,7 +15,7 @@ services: TAC: 1 ENABLE_X2: 'yes' ENB_X2_IP_ADDRESS: 192.168.68.130 - MME_S1C_IP_ADDRESS: 192.168.18.210 + MME_S1C_IP_ADDRESS: 172.21.16.136 GNB_S1C_IF_NAME: eth0 GNB_S1C_IP_ADDRESS: 192.168.68.194 GNB_S1U_IF_NAME: eth0 @@ -24,7 +24,7 @@ services: RRC_INACTIVITY_THRESHOLD: 0 FLEXRAN_ENABLED: 'no' FLEXRAN_INTERFACE_NAME: eth0 - FLEXRAN_IPV4_ADDRESS: 192.168.18.210 + FLEXRAN_IPV4_ADDRESS: 172.21.16.136 THREAD_PARALLEL_CONFIG: PARALLEL_RU_L1_TRX_SPLIT USE_ADDITIONAL_OPTIONS: -E -q --RUs.[0].sdr_addrs serial=30C51D4 --log_config.global_log_options level,nocolor,time,line_num,function volumes: diff --git a/doc/TESTING_5GSA_setup.md b/doc/TESTING_5GSA_setup.md index f8c85bf2ca..9b27549df4 100644 --- a/doc/TESTING_5GSA_setup.md +++ b/doc/TESTING_5GSA_setup.md @@ -36,6 +36,8 @@ At the moment of writing this document interoperability with the following COTS - [Quectel RM500Q-GL](https://www.quectel.com/product/5g-rm500q-gl/) - [Simcom SIMCOM8200EA](https://www.simcom.com/product/SIM8200EA_M2.html) - Huawei Mate 30 Pro + - Oneplus 8 + - Google Pixel 5 End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using SIMCOM/Quectel modules and Huawei Mate 30 pro. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with: diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 69109dcd72..f2f641c488 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -663,6 +663,7 @@ void processSlotRX(void *arg) { int rx_slot_type = nr_ue_slot_select(cfg, proc->frame_rx, proc->nr_slot_rx); int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx); uint8_t gNB_id = 0; + NR_UE_PDCCH_CONFIG phy_pdcch_config={0}; if (IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) { /* send tick to RLC and PDCP every ms */ @@ -678,7 +679,7 @@ void processSlotRX(void *arg) { if(UE->if_inst != NULL && UE->if_inst->dl_indication != NULL) { nr_downlink_indication_t dl_indication; - nr_fill_dl_indication(&dl_indication, NULL, NULL, proc, UE, gNB_id); + nr_fill_dl_indication(&dl_indication, NULL, NULL, proc, UE, gNB_id, &phy_pdcch_config); UE->if_inst->dl_indication(&dl_indication, NULL); } @@ -687,7 +688,7 @@ void processSlotRX(void *arg) { phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL ); #else uint64_t a=rdtsc_oai(); - phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel, &rxtxD->txFifo); + phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel, &phy_pdcch_config, &rxtxD->txFifo); LOG_D(PHY, "In %s: slot %d, time %llu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc_oai()-a)/3500); #endif diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 08434865d2..0c672061fb 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -159,7 +159,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) NR_UE_COMMON *const common_vars = &ue->common_vars; NR_UE_PBCH **const pbch_vars = ue->pbch_vars; NR_UE_PRACH **const prach_vars = ue->prach_vars; - int i,j,slot,symb, gNB_id, th_id; + int i,slot,symb, gNB_id, th_id; NR_UE_SRS **const srs_vars = ue->srs_vars; @@ -359,36 +359,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ue->nr_srs_info->srs_estimated_channel_time_shifted[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t)); } - // 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE - for (th_id=0; th_idpdcch_vars[th_id][gNB_id]->llr = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); - ue->pdcch_vars[th_id][gNB_id]->llr16 = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); - ue->pdcch_vars[th_id][gNB_id]->wbar = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); - ue->pdcch_vars[th_id][gNB_id]->e_rx = (int16_t *)malloc16_clear( 4*2*100*12 ); - ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) ); - ue->pdcch_vars[th_id][gNB_id]->rho = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) ); - ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) ); - ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) ); - // Channel estimates - ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(4*fp->nb_antennas_rx*sizeof(int32_t *)); - ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(4*fp->nb_antennas_rx*sizeof(int32_t *)); - - for (i=0; inb_antennas_rx; i++) { - ue->pdcch_vars[th_id][gNB_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(100*12*4)); - - for (j=0; j<4; j++) { - int idx = (j*fp->nb_antennas_rx)+i; - ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) ); - ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 ); - // size_t num = 7*2*fp->N_RB_DL*12; - size_t num = 4*273*12; // 4 symbols, 100 PRBs, 12 REs per PRB - ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num); - ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num); - ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num); - } - } - } - // RACH prach_vars[gNB_id]->prachF = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) ); prach_vars[gNB_id]->prach = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) ); @@ -485,28 +455,6 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) for (int gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) { for (int th_id = 0; th_id < RX_NB_TH_MAX; th_id++) { - for (int i = 0; i < fp->nb_antennas_rx; i++) { - for (int j = 0; j < 4; j++) { - int idx = j * fp->nb_antennas_rx + i; - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates[idx]); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time[idx]); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp[idx]); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext[idx]); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext[idx]); - } - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->rho[i]); - } - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->llr); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->llr16); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->wbar); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->e_rx); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->rho); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time); - free_and_zero(ue->pdcch_vars[th_id][gNB_id]); } diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 5c415e7d40..3b4ce9a423 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -468,7 +468,9 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, unsigned char symbol, unsigned short scrambling_id, unsigned short coreset_start_subcarrier, - unsigned short nb_rb_coreset) + unsigned short nb_rb_coreset, + int32_t pdcch_est_size, + int32_t pdcch_dl_ch_estimates[][pdcch_est_size]) { unsigned char aarx; @@ -477,7 +479,6 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, int16_t ch[2],*pil,*rxF,*dl_ch,*fl,*fm,*fr; int ch_offset,symbol_offset; - int **dl_ch_estimates =ue->pdcch_vars[proc->thread_id][gNB_id]->dl_ch_estimates; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF; ch_offset = ue->frame_parms.ofdm_symbol_size*symbol; @@ -510,7 +511,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, k = coreset_start_subcarrier; pil = (int16_t *)&pilot[0]; rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+1)]; - dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset]; + dl_ch = (int16_t *)&pdcch_dl_ch_estimates[aarx][ch_offset]; memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size)); diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index 963a845876..ce99f0f9c9 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -46,7 +46,9 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, unsigned char symbol, unsigned short scrambling_id, unsigned short coreset_start_subcarrier, - unsigned short nb_rb_coreset); + unsigned short nb_rb_coreset, + int32_t pdcch_est_size, + int32_t pdcch_dl_ch_estimates[][pdcch_est_size]); int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index b5cc765be4..5fe29b1f28 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -42,6 +42,7 @@ #include "PHY/CODING/coding_extern.h" #include "PHY/sse_intrin.h" #include "common/utils/nr/nr_common.h" +#include #include "assertions.h" #include "T.h" @@ -201,7 +202,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr, } } -int32_t nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, +int32_t nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t rx_size, int32_t rxdataF_comp[][rx_size], int16_t *pdcch_llr, uint8_t symbol,uint32_t coreset_nbr_rb) { int16_t *rxF = (int16_t *) &rxdataF_comp[0][(symbol * coreset_nbr_rb * 12)]; int32_t i; @@ -270,7 +271,8 @@ int32_t pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, //__m128i avg128P; //compute average channel_level on each (TX,RX) antenna pair -void nr_pdcch_channel_level(int32_t **dl_ch_estimates_ext, +void nr_pdcch_channel_level(int32_t rx_size, + int32_t dl_ch_estimates_ext[][rx_size], NR_DL_FRAME_PARMS *frame_parms, int32_t *avg, int symbol, @@ -337,9 +339,11 @@ void nr_pdcch_channel_level(int32_t **dl_ch_estimates_ext, // This function will extract the mapped DM-RS PDCCH REs as per 38.211 Section 7.4.1.3.2 (Mapping to physical resources) void nr_pdcch_extract_rbs_single(int32_t **rxdataF, - int32_t **dl_ch_estimates, - int32_t **rxdataF_ext, - int32_t **dl_ch_estimates_ext, + int32_t est_size, + int32_t dl_ch_estimates[][est_size], + int32_t rx_size, + int32_t rxdataF_ext[][rx_size], + int32_t dl_ch_estimates_ext[][rx_size], uint8_t symbol, NR_DL_FRAME_PARMS *frame_parms, uint8_t *coreset_freq_dom, @@ -515,9 +519,9 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, #define print_shorts(s,x) printf("%s %d,%d,%d,%d,%d,%d,%d,%d\n",s,(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],(x)[5],(x)[6],(x)[7]) -void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, - int32_t **dl_ch_estimates_ext, - int32_t **rxdataF_comp, +void nr_pdcch_channel_compensation(int32_t rx_size, int32_t rxdataF_ext[][rx_size], + int32_t dl_ch_estimates_ext[][rx_size], + int32_t rxdataF_comp[][rx_size], int32_t **rho, NR_DL_FRAME_PARMS *frame_parms, uint8_t symbol, @@ -628,7 +632,8 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, void nr_pdcch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t rx_size, + int32_t rxdataF_comp[][rx_size], uint8_t symbol) { #if defined(__x86_64__) || defined(__i386__) __m128i *rxdataF_comp128_0,*rxdataF_comp128_1; @@ -664,18 +669,31 @@ void nr_pdcch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms, int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, + int32_t pdcch_est_size, + int32_t pdcch_dl_ch_estimates[][pdcch_est_size], + int16_t *pdcch_e_rx, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15) { uint32_t frame = proc->frame_rx; uint32_t slot = proc->nr_slot_rx; NR_UE_COMMON *common_vars = &ue->common_vars; NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; - NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0]; uint8_t log2_maxh, aarx; int32_t avgs; int32_t avgP[4]; int n_rb,rb_offset; + + // Pointers to extracted PDCCH symbols in frequency-domain. + int32_t rx_size = 4*273*12; + int32_t rxdataF_ext[4*frame_parms->nb_antennas_rx][rx_size]; + int32_t rxdataF_comp[4*frame_parms->nb_antennas_rx][rx_size]; + int32_t pdcch_dl_ch_estimates_ext[4*frame_parms->nb_antennas_rx][rx_size]; + + // Pointer to llrs, 4-bit resolution. + int32_t llr_size = 2*4*100*12; + int16_t llr[llr_size]; + get_coreset_rballoc(rel15->coreset.frequency_domain_resource,&n_rb,&rb_offset); LOG_D(PHY,"pdcch coreset: freq %x, n_rb %d, rb_offset %d\n", rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset); @@ -683,9 +701,11 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, LOG_D(PHY,"in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n"); nr_pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF, - pdcch_vars->dl_ch_estimates, - pdcch_vars->rxdataF_ext, - pdcch_vars->dl_ch_estimates_ext, + pdcch_est_size, + pdcch_dl_ch_estimates, + rx_size, + rxdataF_ext, + pdcch_dl_ch_estimates_ext, s, frame_parms, rel15->coreset.frequency_domain_resource, @@ -695,7 +715,8 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, LOG_D(PHY,"we enter nr_pdcch_channel_level(avgP=%d) => compute channel level based on ofdm symbol 0, pdcch_vars[eNB_id]->dl_ch_estimates_ext\n",*avgP); LOG_D(PHY,"in nr_pdcch_channel_level(dl_ch_estimates_ext -> dl_ch_estimates_ext)\n"); // compute channel level based on ofdm symbol 0 - nr_pdcch_channel_level(pdcch_vars->dl_ch_estimates_ext, + nr_pdcch_channel_level(rx_size, + pdcch_dl_ch_estimates_ext, frame_parms, avgP, s, @@ -717,26 +738,33 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, LOG_D(PHY,"we enter nr_pdcch_channel_compensation(log2_maxh=%d)\n",log2_maxh); LOG_D(PHY,"in nr_pdcch_channel_compensation(rxdataF_ext x dl_ch_estimates_ext -> rxdataF_comp)\n"); // compute LLRs for ofdm symbol 0 only - nr_pdcch_channel_compensation(pdcch_vars->rxdataF_ext, - pdcch_vars->dl_ch_estimates_ext, - pdcch_vars->rxdataF_comp, + nr_pdcch_channel_compensation(rx_size, rxdataF_ext, + pdcch_dl_ch_estimates_ext, + rxdataF_comp, NULL, frame_parms, s, log2_maxh, n_rb); // log2_maxh+I0_shift + + UEscopeCopy(ue, pdcchRxdataF_comp, rxdataF_comp, sizeof(struct complex16), frame_parms->nb_antennas_rx, rx_size); + if (frame_parms->nb_antennas_rx > 1) { LOG_D(PHY,"we enter nr_pdcch_detection_mrc(frame_parms->nb_antennas_rx=%d)\n", frame_parms->nb_antennas_rx); - nr_pdcch_detection_mrc(frame_parms, pdcch_vars->rxdataF_comp,s); + nr_pdcch_detection_mrc(frame_parms, rx_size, rxdataF_comp,s); } LOG_D(PHY,"we enter nr_pdcch_llr(for symbol %d), pdcch_vars[eNB_id]->rxdataF_comp ---> pdcch_vars[eNB_id]->llr \n",s); LOG_D(PHY,"in nr_pdcch_llr(rxdataF_comp -> llr)\n"); nr_pdcch_llr(frame_parms, - pdcch_vars->rxdataF_comp, - pdcch_vars->llr, + rx_size, + rxdataF_comp, + llr, s, n_rb); + + UEscopeCopy(ue, pdcchLlr, llr, sizeof(int16_t), 1, llr_size); + #if T_TRACER // T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL), @@ -750,8 +778,8 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, } LOG_D(PHY,"we enter nr_pdcch_demapping_deinterleaving(), number of candidates %d\n",rel15->number_of_candidates); - nr_pdcch_demapping_deinterleaving((uint32_t *) pdcch_vars->llr, - (uint32_t *) pdcch_vars->e_rx, + nr_pdcch_demapping_deinterleaving((uint32_t *) llr, + (uint32_t *) pdcch_e_rx, rel15->coreset.duration, rel15->coreset.StartSymbolIndex, n_rb, @@ -832,10 +860,10 @@ static uint16_t nr_dci_false_detection(uint64_t *dci, uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, + int16_t *pdcch_e_rx, fapi_nr_dci_indication_t *dci_ind, - fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15) { - - NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0]; + fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, + NR_UE_PDCCH_CONFIG *phy_pdcch_config) { //int gNB_id = 0; int16_t tmp_e[16*108]; @@ -865,7 +893,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, LOG_D(PHY, "(%i.%i) Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d, length %d, format %s\n", proc->frame_rx, proc->nr_slot_rx, j, rel15->number_of_candidates, CCEind, e_rx_cand_idx, L, dci_length, nr_dci_format_string[rel15->dci_format_options[k]]); - nr_pdcch_unscrambling(&pdcch_vars->e_rx[e_rx_cand_idx], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e); + nr_pdcch_unscrambling(&pdcch_e_rx[e_rx_cand_idx], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e); #ifdef DEBUG_DCI_DECODING uint32_t *z = (uint32_t *) &pdcch_vars->e_rx[e_rx_cand_idx]; @@ -910,7 +938,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, } e_rx_cand_idx += 9*L*6*2; //e_rx index for next candidate (L CCEs, 6 REGs per CCE and 9 REs per REG and 2 uint16_t per RE) } - pdcch_vars->nb_search_space = 0; + phy_pdcch_config->nb_search_space = 0; return(dci_ind->number_of_dcis); } diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index b806e4c381..3e710c7c33 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -101,7 +101,7 @@ void free_list(NR_UE_SSB *node) { } -int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_initial_symbol) +int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_initial_symbol, NR_UE_PDCCH_CONFIG *phy_pdcch_config) { NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; int ret =-1; @@ -165,6 +165,7 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini 0, temp_ptr->i_ssb, SISO, + phy_pdcch_config, &result); temp_ptr=temp_ptr->next_ssb; @@ -215,6 +216,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, NR_DL_FRAME_PARMS *fp = &ue->frame_parms; int ret=-1; int rx_power=0; //aarx, + + NR_UE_PDCCH_CONFIG phy_pdcch_config={0}; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_IN); @@ -334,7 +337,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, } nr_gold_pbch(ue); - ret = nr_pbch_detection(proc, ue, 1); // start pbch detection at first symbol after pss + ret = nr_pbch_detection(proc, ue, 1, &phy_pdcch_config); // start pbch detection at first symbol after pss if (ret == 0) { // sync at symbol ue->symbol_offset @@ -531,34 +534,40 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, // if stand alone and sync on ssb do sib1 detection as part of initial sync if (sa==1 && ret==0) { bool dec = false; - NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0]; int gnb_id = 0; //FIXME int coreset_nb_rb=0; int coreset_start_rb=0; - for(int n_ss = 0; n_ssnb_search_space; n_ss++) { - uint8_t nb_symb_pdcch = pdcch_vars->pdcch_config[n_ss].coreset.duration; - int start_symb = pdcch_vars->pdcch_config[n_ss].coreset.StartSymbolIndex; - get_coreset_rballoc(pdcch_vars->pdcch_config[n_ss].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb); + // Hold the channel estimates in frequency domain. + int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16); + __attribute__ ((aligned(16))) int32_t pdcch_dl_ch_estimates[4*fp->nb_antennas_rx][pdcch_est_size]; + + + for(int n_ss = 0; n_ssslot, - is*fp->samples_per_frame+pdcch_vars->sfn*fp->samples_per_frame+ue->rx_offset); + phy_pdcch_config.slot, + is*fp->samples_per_frame+phy_pdcch_config.sfn*fp->samples_per_frame+ue->rx_offset); if (coreset_nb_rb > 0) nr_pdcch_channel_estimation(ue, proc, 0, - pdcch_vars->slot, + phy_pdcch_config.slot, l, fp->Nid_cell, - fp->first_carrier_offset+(pdcch_vars->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12, - coreset_nb_rb); + fp->first_carrier_offset+(phy_pdcch_config.pdcch_config[n_ss].BWPStart + coreset_start_rb)*12, + coreset_nb_rb, + pdcch_est_size, + pdcch_dl_ch_estimates); } - int dci_cnt = nr_ue_pdcch_procedures(gnb_id, ue, proc, n_ss); + int dci_cnt = nr_ue_pdcch_procedures(gnb_id, ue, proc, pdcch_est_size, pdcch_dl_ch_estimates, &phy_pdcch_config, n_ss); if (dci_cnt>0){ NR_UE_DLSCH_t *dlsch = ue->dlsch_SI[gnb_id]; if (dlsch && (dlsch->active == 1)) { @@ -571,8 +580,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, nr_slot_fep_init_sync(ue, proc, m, - pdcch_vars->slot, // same slot and offset as pdcch - is*fp->samples_per_frame+pdcch_vars->sfn*fp->samples_per_frame+ue->rx_offset); + phy_pdcch_config.slot, // same slot and offset as pdcch + is*fp->samples_per_frame+phy_pdcch_config.sfn*fp->samples_per_frame+ue->rx_offset); } int ret = nr_ue_pdsch_procedures(ue, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 2705132bc6..48b08d761e 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -391,6 +391,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t i_ssb, MIMO_mode_t mimo_mode, + NR_UE_PDCCH_CONFIG *phy_pdcch_config, fapiPbch_t *result) { NR_UE_COMMON *nr_ue_common_vars = &ue->common_vars; int max_h=0; @@ -577,7 +578,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, nr_downlink_indication_t dl_indication; fapi_nr_rx_indication_t *rx_ind=calloc(sizeof(*rx_ind),1); uint16_t number_pdus = 1; - nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id); + + nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id, phy_pdcch_config); nr_fill_rx_indication(rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, NULL, number_pdus, proc,(void *)result); if (ue->if_inst && ue->if_inst->dl_indication) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index 9855224ee2..84cf77fc42 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -1078,6 +1078,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_NR_UE *phy_vars_ue, int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, + int32_t pdcch_est_size, + int32_t pdcch_dl_ch_estimates[][pdcch_est_size], + int16_t *pdcch_e_rx, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15); @@ -1132,11 +1135,13 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t i_ssb, MIMO_mode_t mimo_mode, - fapiPbch_t* result); + NR_UE_PDCCH_CONFIG *phy_pdcch_config, + fapiPbch_t* result); int nr_pbch_detection(UE_nr_rxtx_proc_t *proc, - PHY_VARS_NR_UE *ue, - int pbch_initial_symbol); + PHY_VARS_NR_UE *ue, + int pbch_initial_symbol, + NR_UE_PDCCH_CONFIG *phy_pdcch_config); uint16_t rx_pbch_emul(PHY_VARS_NR_UE *phy_vars_ue, uint8_t eNB_id, @@ -1642,8 +1647,10 @@ uint8_t get_prach_prb_offset(NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, + int16_t *pdcch_e_rx, fapi_nr_dci_indication_t *dci_ind, - fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15); + fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, + NR_UE_PDCCH_CONFIG *phy_pdcch_config); /** \brief This function is the top-level entry point to PDSCH demodulation, after frequency-domain transformation and channel estimation. It performs diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index fe0f785ef4..81ca5bf3dd 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -678,52 +678,42 @@ static void uePbchIQ (scopeGraphData_t **data, OAIgraph_t *graph, PHY_VARS_NR_U static void uePcchLLR (scopeGraphData_t **data, OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) { // PDCCH LLRs - if (!phy_vars_ue->pdcch_vars[0][eNB_id]->llr) + if (!data[pdcchLlr]) return; //int num_re = 4*273*12; // 12*frame_parms->N_RB_DL*num_pdcch_symbols //int Qm = 2; - int coded_bits_per_codeword = 2*4*100*12; //num_re*Qm; + const int sz=data[pdcchLlr]->lineSz; float *llr, *bit; - oai_xygraph_getbuff(graph, &bit, &llr, coded_bits_per_codeword*RX_NB_TH_MAX, 0); - int base=0; + oai_xygraph_getbuff(graph, &bit, &llr, sz, 0); - for (int thr=0 ; thr < RX_NB_TH_MAX ; thr ++ ) { - int16_t *pdcch_llr = (int16_t *) phy_vars_ue->pdcch_vars[thr][eNB_id]->llr; + int16_t *pdcch_llr = (int16_t *)(data[pdcchLlr]+1); - for (int i=0; ipdcch_vars[0][eNB_id]->rxdataF_comp[0]) + if (!data[pdcchRxdataF_comp]) return; - int nb=4*273*12; // 12*frame_parms->N_RB_DL*num_pdcch_symbols + const int sz=data[pdcchRxdataF_comp]->lineSz; + //const int antennas=data[pdcchRxdataF_comp]->colSz; + // We take the first antenna only for now float *I, *Q; - oai_xygraph_getbuff(graph, &I, &Q, nb*RX_NB_TH_MAX, 0); - int base=0; + oai_xygraph_getbuff(graph, &I, &Q, sz, 0); - for (int thr=0 ; thr < RX_NB_TH_MAX ; thr ++ ) { - scopeSample_t *pdcch_comp = (scopeSample_t *) phy_vars_ue->pdcch_vars[thr][eNB_id]->rxdataF_comp[0]; + scopeSample_t *pdcch_comp = (scopeSample_t *) (data[pdcchRxdataF_comp]+1); - for (int i=0; i< nb; i++) { - I[base+i] = pdcch_comp[i].r; - Q[base+i] = pdcch_comp[i].i; - } - - base+=nb; + for (int i=0; iscopeData)->liveData=calloc(sizeof(scopeGraphData_t *), UEdataTypeNumberOfItems); while (!oai_exit) { fl_freeze_form(form_nrue->phy_scope); @@ -925,28 +914,43 @@ static void *nrUEscopeThread(void *arg) { } void UEcopyData(PHY_VARS_NR_UE *ue, enum UEdataType type, void *dataIn, int elementSz, int colSz, int lineSz) { + // Local static copy of the scope data bufs + // The active data buf is alterned to avoid interference between the Scope thread (display) and the Rx thread (data input) + // Index of "2" could be set to the number of Rx threads + 1 + static scopeGraphData_t *copyDataBufs[UEdataTypeNumberOfItems][2] = {0}; + static int copyDataBufsIdx[UEdataTypeNumberOfItems] = {0}; + scopeData_t *tmp=(scopeData_t *)ue->scopeData; if (tmp) { - scopeGraphData_t *live= ((scopeGraphData_t **)tmp->liveData)[type]; + // Begin of critical zone between UE Rx threads that might copy new data at the same time: might require a mutex + int newCopyDataIdx = (copyDataBufsIdx[type]==0)?1:0; + copyDataBufsIdx[type] = newCopyDataIdx; + // End of critical zone between UE Rx threads - if (live == NULL || live->dataSize < elementSz*colSz*lineSz) { - scopeGraphData_t *ptr=realloc(live, sizeof(scopeGraphData_t) + elementSz*colSz*lineSz); + // New data will be copied in a different buffer than the live one + scopeGraphData_t *copyData= copyDataBufs[type][newCopyDataIdx]; + + if (copyData == NULL || copyData->dataSize < elementSz*colSz*lineSz) { + scopeGraphData_t *ptr=realloc(copyData, sizeof(scopeGraphData_t) + elementSz*colSz*lineSz); if (!ptr) { LOG_E(PHY,"can't realloc\n"); return; } else { - live=ptr; + copyData=ptr; } } - live->dataSize=elementSz*colSz*lineSz; - live->elementSz=elementSz; - live->colSz=colSz; - live->lineSz=lineSz; - memcpy(live+1, dataIn, elementSz*colSz*lineSz); - ((scopeGraphData_t **)tmp->liveData)[type]=live; + copyData->dataSize=elementSz*colSz*lineSz; + copyData->elementSz=elementSz; + copyData->colSz=colSz; + copyData->lineSz=lineSz; + memcpy(copyData+1, dataIn, elementSz*colSz*lineSz); + copyDataBufs[type][newCopyDataIdx] = copyData; + + // The new data just copied in the local static buffer becomes live now + ((scopeGraphData_t **)tmp->liveData)[type]=copyData; } } @@ -954,6 +958,7 @@ void nrUEinitScope(PHY_VARS_NR_UE *ue) { AssertFatal(ue->scopeData=malloc(sizeof(scopeData_t)),""); scopeData_t *scope=(scopeData_t *) ue->scopeData; scope->copyData=UEcopyData; + AssertFatal(scope->liveData=calloc(sizeof(scopeGraphData_t *), UEdataTypeNumberOfItems),""); pthread_t forms_thread; threadCreate(&forms_thread, nrUEscopeThread, ue, "scope", -1, OAI_PRIORITY_RT_LOW); } diff --git a/openair1/PHY/TOOLS/phy_scope_interface.h b/openair1/PHY/TOOLS/phy_scope_interface.h index 9cd8e1dc40..6162e1eee5 100644 --- a/openair1/PHY/TOOLS/phy_scope_interface.h +++ b/openair1/PHY/TOOLS/phy_scope_interface.h @@ -45,6 +45,8 @@ enum UEdataType { pbchDlChEstimateTime, pbchLlr, pbchRxdataF_comp, + pdcchLlr, + pdcchRxdataF_comp, UEdataTypeNumberOfItems }; diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index ddd84fbc41..82de7ed96e 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -550,60 +550,20 @@ typedef struct { } NR_UE_PDCCH_SEARCHSPACE; #endif typedef struct { - /// \brief Pointers to extracted PDCCH symbols in frequency-domain. - /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx - /// - second index: ? [0..168*N_RB_DL[ - int32_t **rxdataF_ext; - /// \brief Pointers to extracted and compensated PDCCH symbols in frequency-domain. - /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx - /// - second index: ? [0..168*N_RB_DL[ - int32_t **rxdataF_comp; - /// \brief Hold the channel estimates in frequency domain. - /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx - /// - second index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[ - int32_t **dl_ch_estimates; - /// \brief Hold the channel estimates in time domain (used for tracking). - /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx - /// - second index: samples? [0..2*ofdm_symbol_size[ - int32_t **dl_ch_estimates_time; - /// \brief Pointers to extracted channel estimates of PDCCH symbols. - /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx - /// - second index: ? [0..168*N_RB_DL[ - int32_t **dl_ch_estimates_ext; - /// \brief Pointers to channel cross-correlation vectors for multi-gNB detection. - /// - first index: rx antenna [0..nb_antennas_rx[ - /// - second index: ? [0..] - int32_t **rho; - /// \brief Pointer to llrs, 4-bit resolution. - /// - first index: ? [0..48*N_RB_DL[ - int16_t *llr; - /// \brief Pointer to llrs, 16-bit resolution. - /// - first index: ? [0..96*N_RB_DL[ - int16_t *llr16; - /// \brief \f$\overline{w}\f$ from 36-211. - /// - first index: ? [0..48*N_RB_DL[ - int16_t *wbar; - /// \brief PDCCH/DCI e-sequence (input to rate matching). - /// - first index: ? [0..96*N_RB_DL[ - int16_t *e_rx; - /// Total number of PDU errors (diagnostic mode) - uint32_t dci_errors; + int nb_search_space; + uint16_t sfn; + uint16_t slot; + fapi_nr_dl_config_dci_dl_pdu_rel15_t pdcch_config[FAPI_NR_MAX_SS]; +} NR_UE_PDCCH_CONFIG; + +typedef struct { /// Total number of PDU received uint32_t dci_received; /// Total number of DCI False detection (diagnostic mode) uint32_t dci_false; /// Total number of DCI missed (diagnostic mode) uint32_t dci_missed; - /// nCCE for PDCCH per subframe - uint8_t nCCE[10]; - //Check for specific DCIFormat and AgregationLevel - uint8_t dciFormat; - uint8_t agregationLevel; - int nb_search_space; - fapi_nr_dl_config_dci_dl_pdu_rel15_t pdcch_config[FAPI_NR_MAX_SS]; - // frame and slot for sib1 in initial sync - uint16_t sfn; - uint16_t slot; + /* #ifdef NR_PDCCH_DEFS_NR_UE int nb_searchSpaces; diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index eeea57ffc6..9bcf659eac 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -116,16 +116,18 @@ int phy_procedures_RN_UE_RX(unsigned char last_slot, unsigned char next_slot, re void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB_id); /*! \brief Scheduling for UE RX procedures in normal subframes. - @param ue Pointer to UE variables on which to act - @param proc Pointer to proc information - @param gNB_id Local id of eNB on which to act - @param dlsch_parallel use multithreaded dlsch processing - @param txFifo Result fifo if PDSCH is run in parallel + @param ue Pointer to UE variables on which to act + @param proc Pointer to proc information + @param gNB_id Local id of eNB on which to act + @param dlsch_parallel use multithreaded dlsch processing + @param phy_pdcch_config PDCCH Config for this slot + @param txFifo Result fifo if PDSCH is run in parallel */ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, uint8_t dlsch_parallel, + NR_UE_PDCCH_CONFIG *phy_pdcch_config, notifiedFIFO_t *txFifo); int phy_procedures_slot_parallelization_nrUE_RX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB_id, uint8_t abstraction_flag, uint8_t do_pdcch_flag, relaying_type_t r_type); @@ -383,7 +385,8 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, fapi_nr_rx_indication_t *rx_ind, UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, - uint8_t gNB_id); + uint8_t gNB_id, + void *phy_data); /*@}*/ @@ -417,8 +420,11 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1); int nr_ue_pdcch_procedures(uint8_t gNB_id, - PHY_VARS_NR_UE *ue, - UE_nr_rxtx_proc_t *proc, + PHY_VARS_NR_UE *ue, + UE_nr_rxtx_proc_t *proc, + int32_t pdcch_est_size, + int32_t pdcch_dl_ch_estimates[][pdcch_est_size], + NR_UE_PDCCH_CONFIG *phy_pdcch_config, int n_ss); diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 8321771f45..a5891ae90d 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -353,15 +353,14 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ // Note: we have to handle the thread IDs for this. To be revisited completely. thread_id = scheduled_response->thread_id; NR_UE_DLSCH_t *dlsch0 = NULL; - NR_UE_PDCCH *pdcch_vars = PHY_vars_UE_g[module_id][cc_id]->pdcch_vars[thread_id][0]; NR_UE_ULSCH_t *ulsch = PHY_vars_UE_g[module_id][cc_id]->ulsch[thread_id][0]; NR_UE_PUCCH *pucch_vars = PHY_vars_UE_g[module_id][cc_id]->pucch_vars[thread_id][0]; + NR_UE_PDCCH_CONFIG *phy_pdcch_config = NULL; if(scheduled_response->dl_config != NULL){ fapi_nr_dl_config_request_t *dl_config = scheduled_response->dl_config; fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu; fapi_nr_dl_config_dci_dl_pdu_rel15_t *pdcch_config; - pdcch_vars->nb_search_space = 0; for (int i = 0; i < dl_config->number_pdus; ++i){ AssertFatal(dl_config->number_pdus < FAPI_NR_DL_CONFIG_LIST_NUM,"dl_config->number_pdus %d out of bounds\n",dl_config->number_pdus); @@ -371,12 +370,16 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ switch(dl_config->dl_config_list[i].pdu_type) { case FAPI_NR_DL_CONFIG_TYPE_DCI: + if (NULL == phy_pdcch_config) { + phy_pdcch_config = (NR_UE_PDCCH_CONFIG *)scheduled_response->phy_data; + phy_pdcch_config->nb_search_space = 0; + } pdcch_config = &dl_config->dl_config_list[i].dci_config_pdu.dci_config_rel15; - memcpy(&pdcch_vars->pdcch_config[pdcch_vars->nb_search_space],pdcch_config,sizeof(*pdcch_config)); - pdcch_vars->nb_search_space = pdcch_vars->nb_search_space + 1; - pdcch_vars->sfn = scheduled_response->frame; - pdcch_vars->slot = slot; - LOG_D(PHY,"Number of DCI SearchSpaces %d\n",pdcch_vars->nb_search_space); + memcpy((void*)&phy_pdcch_config->pdcch_config[phy_pdcch_config->nb_search_space],(void*)pdcch_config,sizeof(*pdcch_config)); + phy_pdcch_config->nb_search_space = phy_pdcch_config->nb_search_space + 1; + phy_pdcch_config->sfn = scheduled_response->frame; + phy_pdcch_config->slot = slot; + LOG_D(PHY,"Number of DCI SearchSpaces %d\n",phy_pdcch_config->nb_search_space); break; case FAPI_NR_DL_CONFIG_TYPE_CSI_IM: LOG_I(PHY,"Received CSI-IM PDU at FAPI\n"); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 8f3b0a552d..cd1030b0bb 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -87,7 +87,8 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, fapi_nr_rx_indication_t *rx_ind, UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, - uint8_t gNB_id){ + uint8_t gNB_id, + void *phy_data){ memset((void*)dl_ind, 0, sizeof(nr_downlink_indication_t)); @@ -97,6 +98,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, dl_ind->frame = proc->frame_rx; dl_ind->slot = proc->nr_slot_rx; dl_ind->thread_id = proc->thread_id; + dl_ind->phy_data = phy_data; if (dci_ind) { @@ -363,7 +365,7 @@ void nr_ue_measurement_procedures(uint16_t l, static void nr_ue_pbch_procedures(uint8_t gNB_id, PHY_VARS_NR_UE *ue, - UE_nr_rxtx_proc_t *proc,int estimateSz, struct complex16 dl_ch_estimates[][estimateSz]) + UE_nr_rxtx_proc_t *proc,int estimateSz, struct complex16 dl_ch_estimates[][estimateSz], NR_UE_PDCCH_CONFIG *phy_pdcch_config) { int ret = 0; @@ -383,7 +385,8 @@ static void nr_ue_pbch_procedures(uint8_t gNB_id, gNB_id, (ue->frame_parms.ssb_index)&7, SISO, - &result); + phy_pdcch_config, + &result); if (ret==0) { @@ -489,6 +492,9 @@ unsigned int nr_get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb int nr_ue_pdcch_procedures(uint8_t gNB_id, PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, + int32_t pdcch_est_size, + int32_t pdcch_dl_ch_estimates[][pdcch_est_size], + NR_UE_PDCCH_CONFIG *phy_pdcch_config, int n_ss) { int frame_rx = proc->frame_rx; @@ -497,13 +503,16 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id, fapi_nr_dci_indication_t *dci_ind = calloc(1, sizeof(*dci_ind)); nr_downlink_indication_t dl_indication; - NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][gNB_id]; - fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &pdcch_vars->pdcch_config[n_ss]; + fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &phy_pdcch_config->pdcch_config[n_ss]; start_meas(&ue->dlsch_rx_pdcch_stats); + /// PDCCH/DCI e-sequence (input to rate matching). + int32_t pdcch_e_rx_size = 2*4*100*12; + int16_t pdcch_e_rx[pdcch_e_rx_size]; + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN); - nr_rx_pdcch(ue, proc, rel15); + nr_rx_pdcch(ue, proc, pdcch_est_size, pdcch_dl_ch_estimates, pdcch_e_rx, rel15); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT); @@ -514,7 +523,7 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id, n_ss); #endif - dci_cnt = nr_dci_decoding_procedure(ue, proc, dci_ind, rel15); + dci_cnt = nr_dci_decoding_procedure(ue, proc, pdcch_e_rx, dci_ind, rel15, phy_pdcch_config); #ifdef NR_PDCCH_SCHED_DEBUG LOG_I(PHY,"<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Ending function nr_dci_decoding_procedure() -> dci_cnt=%u\n",dci_cnt); @@ -534,11 +543,13 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id, ue->pdcch_vars[proc->thread_id][gNB_id]->dci_received += dci_cnt; dci_ind->number_of_dcis = dci_cnt; + // fill dl_indication message - nr_fill_dl_indication(&dl_indication, dci_ind, NULL, proc, ue, gNB_id); + nr_fill_dl_indication(&dl_indication, dci_ind, NULL, proc, ue, gNB_id, phy_pdcch_config); // send to mac ue->if_inst->dl_indication(&dl_indication, NULL); + stop_meas(&ue->dlsch_rx_pdcch_stats); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_OUT); @@ -804,16 +815,16 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, switch (pdsch) { case RA_PDSCH: - nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id); + nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id, NULL); nr_fill_rx_indication(rx_ind, FAPI_NR_RX_PDU_TYPE_RAR, gNB_id, ue, dlsch0, NULL, number_pdus, proc, NULL); ue->UE_mode[gNB_id] = RA_RESPONSE; break; case PDSCH: - nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id); + nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id, NULL); nr_fill_rx_indication(rx_ind, FAPI_NR_RX_PDU_TYPE_DLSCH, gNB_id, ue, dlsch0, NULL, number_pdus, proc, NULL); break; case SI_PDSCH: - nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id); + nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id, NULL); nr_fill_rx_indication(rx_ind, FAPI_NR_RX_PDU_TYPE_SIB, gNB_id, ue, dlsch0, NULL, number_pdus, proc, NULL); break; default: @@ -1371,6 +1382,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, uint8_t dlsch_parallel, + NR_UE_PDCCH_CONFIG *phy_pdcch_config, notifiedFIFO_t *txFifo ) { @@ -1378,10 +1390,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, int nr_slot_rx = proc->nr_slot_rx; int slot_pbch; int slot_ssb; - NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0]; fapi_nr_config_request_t *cfg = &ue->nrUE_config; - uint8_t nb_symb_pdcch = pdcch_vars->nb_search_space > 0 ? pdcch_vars->pdcch_config[0].coreset.duration : 0; + uint8_t nb_symb_pdcch = phy_pdcch_config->nb_search_space > 0 ? phy_pdcch_config->pdcch_config[0].coreset.duration : 0; uint8_t dci_cnt = 0; NR_DL_FRAME_PARMS *fp = &ue->frame_parms; @@ -1400,8 +1411,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, int coreset_nb_rb=0; int coreset_start_rb=0; - if (pdcch_vars->nb_search_space > 0) - get_coreset_rballoc(pdcch_vars->pdcch_config[0].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb); + if (phy_pdcch_config->nb_search_space > 0) + get_coreset_rballoc(phy_pdcch_config->pdcch_config[0].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb); slot_pbch = is_pbch_in_slot(cfg, frame_rx, nr_slot_rx, fp); slot_ssb = is_ssb_in_slot(cfg, frame_rx, nr_slot_rx, fp); @@ -1432,7 +1443,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, if ((ue->decode_MIB == 1) && slot_pbch) { LOG_D(PHY," ------ Decode MIB: frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx); - nr_ue_pbch_procedures(gNB_id, ue, proc, estimateSz, dl_ch_estimates); + nr_ue_pbch_procedures(gNB_id, ue, proc, estimateSz, dl_ch_estimates, phy_pdcch_config); if (ue->no_timing_correction==0) { LOG_D(PHY,"start adjust sync slot = %d no timing %d\n", nr_slot_rx, ue->no_timing_correction); @@ -1473,13 +1484,17 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, nr_slot_rx); } + // Hold the channel estimates in frequency domain. + int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16); + __attribute__ ((aligned(16))) int32_t pdcch_dl_ch_estimates[4*fp->nb_antennas_rx][pdcch_est_size]; + dci_cnt = 0; - for(int n_ss = 0; n_ssnb_search_space; n_ss++) { + for(int n_ss = 0; n_ssnb_search_space; n_ss++) { for (uint16_t l=0; lfirst_carrier_offset, pdcch_vars->pdcch_config[n_ss].BWPStart, coreset_start_rb, coreset_nb_rb); + fp->first_carrier_offset, phy_pdcch_config->pdcch_config[n_ss].BWPStart, coreset_start_rb, coreset_nb_rb); if (coreset_nb_rb > 0) nr_pdcch_channel_estimation(ue, @@ -1487,14 +1502,16 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, gNB_id, nr_slot_rx, l, - pdcch_vars->pdcch_config[n_ss].coreset.pdcch_dmrs_scrambling_id, - fp->first_carrier_offset+(pdcch_vars->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12, - coreset_nb_rb); + phy_pdcch_config->pdcch_config[n_ss].coreset.pdcch_dmrs_scrambling_id, + fp->first_carrier_offset+(phy_pdcch_config->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12, + coreset_nb_rb, + pdcch_est_size, + pdcch_dl_ch_estimates); stop_meas(&ue->ofdm_demod_stats); } - dci_cnt = dci_cnt + nr_ue_pdcch_procedures(gNB_id, ue, proc, n_ss); + dci_cnt = dci_cnt + nr_ue_pdcch_procedures(gNB_id, ue, proc, pdcch_est_size, pdcch_dl_ch_estimates, phy_pdcch_config, n_ss); } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_OUT); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 412ab1a6ea..1de8d6ced4 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1003,6 +1003,8 @@ int main(int argc, char **argv) nr_dcireq_t dcireq; nr_scheduled_response_t scheduled_response; + NR_UE_PDCCH_CONFIG phy_pdcch_config={0}; + memset((void*)&dcireq,0,sizeof(dcireq)); memset((void*)&scheduled_response,0,sizeof(scheduled_response)); dcireq.module_id = 0; @@ -1017,6 +1019,7 @@ int main(int argc, char **argv) scheduled_response.frame = frame; scheduled_response.slot = slot; scheduled_response.thread_id = 0; + scheduled_response.phy_data = &phy_pdcch_config; nr_ue_phy_config_request(&UE_mac->phy_config); //NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels; @@ -1259,6 +1262,7 @@ int main(int argc, char **argv) &UE_proc, 0, dlsch_threads, + &phy_pdcch_config, NULL); //printf("dlsim round %d ends\n",round); @@ -1407,8 +1411,6 @@ int main(int argc, char **argv) LOG_M("chestF0.m","chF0",&UE->pdsch_vars[0][0]->dl_ch_estimates_ext[0][0],g_rbSize*12*14,1,1); write_output("rxF_comp.m","rxFc",&UE->pdsch_vars[0][0]->rxdataF_comp0[0][0],N_RB_DL*12*14,1,1); LOG_M("rxF_llr.m","rxFllr",UE->pdsch_vars[UE_proc.thread_id][0]->llr[0],available_bits,1,0); - LOG_M("pdcch_rxFcomp.m","pdcch_rxFcomp",&UE->pdcch_vars[0][0]->rxdataF_comp[0][0],96*12,1,1); - LOG_M("pdcch_rxFllr.m","pdcch_rxFllr",UE->pdcch_vars[0][0]->llr,96*12,1,1); break; } diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c index ee52a2c9db..21802cd41a 100644 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c +++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c @@ -30,7 +30,8 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, fapi_nr_rx_indication_t *rx_ind, UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, - uint8_t gNB_id) {} + uint8_t gNB_id, + void *phy_data) {} void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, uint8_t pdu_type, uint8_t gNB_id, diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 8fc6410538..62f6b21528 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -74,7 +74,10 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {} int nr_ue_pdcch_procedures(uint8_t gNB_id, PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - int n_ss) { + int32_t pdcch_est_size, + int32_t pdcch_dl_ch_estimates[][pdcch_est_size], + NR_UE_PDCCH_CONFIG *phy_pdcch_config, + int n_ss) { return 0; } @@ -722,6 +725,8 @@ int main(int argc, char **argv) } else { UE_nr_rxtx_proc_t proc={0}; + NR_UE_PDCCH_CONFIG phy_pdcch_config={0}; + UE->rx_offset=0; uint8_t ssb_index = 0; const int estimateSz=7*2*sizeof(int)*frame_parms->ofdm_symbol_size; @@ -750,7 +755,8 @@ int main(int argc, char **argv) 0, ssb_index%8, SISO, - &result); + &phy_pdcch_config, + &result); if (ret==0) { //UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index 3e4d53b985..7ed99b92b5 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -48,6 +48,7 @@ void nr_ue_init_mac(module_id_t module_idP); \param module_id module id \param cc_id component carrier id \param gNB_index gNB index + \param phy_data PHY structure to be filled in by the callee in the FAPI call (L1 caller -> indication to L2 -> FAPI call to L1 callee) \param extra_bits extra bits for frame calculation \param l_ssb_equal_64 check if ssb number of candicate is equal 64, 1=equal; 0=non equal. Reference 38.212 7.1.1 \param pduP pointer to pdu @@ -56,7 +57,8 @@ void nr_ue_init_mac(module_id_t module_idP); int8_t nr_ue_decode_mib( module_id_t module_id, int cc_id, - uint8_t gNB_index, + uint8_t gNB_index, + void *phy_data, uint8_t extra_bits, uint32_t ssb_length, uint32_t ssb_index, @@ -132,7 +134,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in @param int cc_id CC ID @param frame_t frame frame number @param int slot reference number - @param UE_nr_rxtx_proc_t *proc pointer to process context */ + @param void *phy_pata pointer to a PHY specific structure to be filled in the scheduler response (can be null) */ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response, fapi_nr_dl_config_request_t *dl_config, fapi_nr_ul_config_request_t *ul_config, @@ -141,7 +143,8 @@ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response, int cc_id, frame_t frame, int slot, - int thread_id); + int thread_id, + void *phy_data); /*! \fn int8_t nr_ue_get_SR(module_id_t module_idP, frame_t frameP, slot_t slotP); \brief Called by PHY to get sdu for PUSCH transmission. It performs the following operations: Checks BSR for DCCH, DCCH1 and DTCH corresponding to previous values computed either in SR or BSR procedures. It gets rlc status indications on DCCH,DCCH1 and DTCH and forms BSR elements and PHR in MAC header. CRNTI element is not supported yet. It computes transport block for up to 3 SDUs and generates header and forms the complete MAC SDU. @@ -373,7 +376,8 @@ void nr_ue_sib1_scheduler(module_id_t module_idP, uint8_t ssb_subcarrier_offset, uint32_t ssb_index, uint16_t ssb_start_subcarrier, - frequency_range_t frequency_range); + frequency_range_t frequency_range, + void *phy_data); /* \brief Function called by PHY to process the received RAR and check that the preamble matches what was sent by the gNB. It provides the timing advance and t-CRNTI. @param Mod_id Index of UE instance diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 58a75c165c..fe642e566e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -287,6 +287,7 @@ int get_rnti_type(NR_UE_MAC_INST_t *mac, uint16_t rnti){ int8_t nr_ue_decode_mib(module_id_t module_id, int cc_id, uint8_t gNB_index, + void *phy_data, uint8_t extra_bits, // 8bits 38.212 c7.1.1 uint32_t ssb_length, uint32_t ssb_index, @@ -362,7 +363,8 @@ int8_t nr_ue_decode_mib(module_id_t module_id, ssb_subcarrier_offset, ssb_index, ssb_start_subcarrier, - mac->frequency_range); + mac->frequency_range, + phy_data); } else { NR_ServingCellConfigCommon_t *scc = mac->scc; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index f1a0a2a372..799a8d7aa5 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -94,7 +94,8 @@ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response, int cc_id, frame_t frame, int slot, - int thread_id){ + int thread_id, + void *phy_data){ scheduled_response->dl_config = dl_config; scheduled_response->ul_config = ul_config; @@ -104,6 +105,7 @@ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response, scheduled_response->frame = frame; scheduled_response->slot = slot; scheduled_response->thread_id = thread_id; + scheduled_response->phy_data = phy_data; } @@ -1077,7 +1079,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in nr_ue_dcireq(&dcireq); //to be replaced with function pointer later mac->dl_config_request = dcireq.dl_config_req; - fill_scheduled_response(&scheduled_response, &dcireq.dl_config_req, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->thread_id); + fill_scheduled_response(&scheduled_response, &dcireq.dl_config_req, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->thread_id, dl_info->phy_data); if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) LOG_D(NR_MAC,"1# scheduled_response transmitted, %d, %d\n", rx_frame, rx_slot); mac->if_module->scheduled_response(&scheduled_response); @@ -1094,7 +1096,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in fill_dci_search_candidates(mac->ra.ss, rel15); dl_config->number_pdus = 1; LOG_D(MAC,"mac->cg %p: Calling fill_scheduled_response rnti %x, type0_pdcch, num_pdus %d\n",mac->cg,rel15->rnti,dl_config->number_pdus); - fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->thread_id); + fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->thread_id, dl_info->phy_data); if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) mac->if_module->scheduled_response(&scheduled_response); } @@ -1203,7 +1205,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, frame_tx, slot_tx, 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, NULL); if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){ LOG_D(NR_MAC,"3# scheduled_response transmitted,%d, %d\n", frame_tx, slot_tx); mac->if_module->scheduled_response(&scheduled_response); @@ -2359,7 +2361,7 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, in O_SR, O_ACK, O_CSI); LOG_D(NR_MAC, "Configuring pucch, is_common = %d\n", pucch.is_common); nr_scheduled_response_t scheduled_response; - fill_scheduled_response(&scheduled_response, NULL, ul_config, NULL, module_idP, 0 /*TBR fix*/, frameP, slotP, thread_id); + fill_scheduled_response(&scheduled_response, NULL, ul_config, NULL, module_idP, 0 /*TBR fix*/, frameP, slotP, thread_id, NULL); if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) mac->if_module->scheduled_response(&scheduled_response); } @@ -2706,7 +2708,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s } } // if format1 - fill_scheduled_response(&scheduled_response, NULL, ul_config, NULL, module_idP, 0 /*TBR fix*/, frameP, slotP, thread_id); + fill_scheduled_response(&scheduled_response, NULL, ul_config, NULL, module_idP, 0 /*TBR fix*/, frameP, slotP, thread_id, NULL); if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) mac->if_module->scheduled_response(&scheduled_response); } // is_nr_prach_slot @@ -2721,7 +2723,8 @@ void nr_ue_sib1_scheduler(module_id_t module_idP, uint8_t ssb_subcarrier_offset, uint32_t ssb_index, uint16_t ssb_start_subcarrier, - frequency_range_t frequency_range) { + frequency_range_t frequency_range, + void *phy_data) { NR_UE_MAC_INST_t *mac = get_mac_inst(module_idP); nr_scheduled_response_t scheduled_response; @@ -2769,7 +2772,7 @@ void nr_ue_sib1_scheduler(module_id_t module_idP, slot_s = mac->type0_PDCCH_CSS_config.n_c; } LOG_D(MAC,"Calling fill_scheduled_response, type0_pdcch, num_pdus %d\n",dl_config->number_pdus); - fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, module_idP, cc_id, frame_s, slot_s, 0); // TODO fix thread_id, for now assumed 0 + fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, module_idP, cc_id, frame_s, slot_s, 0, phy_data); // TODO fix thread_id, for now assumed 0 if (dl_config->number_pdus) { if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 26c60fbb9b..b7a134ae98 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -1064,7 +1064,7 @@ void *nrue_standalone_pnf_task(void *context) // L2 Abstraction Layer int handle_bcch_bch(module_id_t module_id, int cc_id, - unsigned int gNB_index, uint8_t *pduP, + unsigned int gNB_index, void *phy_data, uint8_t *pduP, unsigned int additional_bits, uint32_t ssb_index, uint32_t ssb_length, uint16_t ssb_start_subcarrier, uint16_t cell_id){ @@ -1072,6 +1072,7 @@ int handle_bcch_bch(module_id_t module_id, int cc_id, return nr_ue_decode_mib(module_id, cc_id, gNB_index, + phy_data, additional_bits, ssb_length, // Lssb = 64 is not support ssb_index, @@ -1208,7 +1209,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ if (ret >= 0) { AssertFatal( nr_ue_if_module_inst[module_id] != NULL, "IF module is NULL!\n" ); AssertFatal( nr_ue_if_module_inst[module_id]->scheduled_response != NULL, "scheduled_response is NULL!\n" ); - fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, dl_info->module_id, dl_info->cc_id, dl_info->frame, dl_info->slot, dl_info->thread_id); + fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, dl_info->module_id, dl_info->cc_id, dl_info->frame, dl_info->slot, dl_info->thread_id, dl_info->phy_data); nr_ue_if_module_inst[module_id]->scheduled_response(&scheduled_response); } memset(def_dci_pdu_rel15, 0, sizeof(*def_dci_pdu_rel15)); @@ -1229,7 +1230,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ switch(dl_info->rx_ind->rx_indication_body[i].pdu_type){ case FAPI_NR_RX_PDU_TYPE_SSB: mac->ssb_rsrp_dBm = (dl_info->rx_ind->rx_indication_body+i)->ssb_pdu.rsrp_dBm; - ret_mask |= (handle_bcch_bch(dl_info->module_id, dl_info->cc_id, dl_info->gNB_index, + ret_mask |= (handle_bcch_bch(dl_info->module_id, dl_info->cc_id, dl_info->gNB_index, dl_info->phy_data, (dl_info->rx_ind->rx_indication_body+i)->ssb_pdu.pdu, (dl_info->rx_ind->rx_indication_body+i)->ssb_pdu.additional_bits, (dl_info->rx_ind->rx_indication_body+i)->ssb_pdu.ssb_index, diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h index 034c1c6b48..45d1a071ca 100755 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h @@ -123,6 +123,9 @@ typedef struct { /// dci reception indication structure fapi_nr_dci_indication_t *dci_ind; + /// PHY specific data structure that can be passed on to L2 via nr_downlink_indication_t and + /// back to L1 via the nr_scheduled_response_t + void *phy_data; } nr_downlink_indication_t; @@ -176,6 +179,9 @@ typedef struct { /// data transmission request structure fapi_nr_tx_request_t *tx_request; + /// PHY data structure initially passed on to L2 via the nr_downlink_indication_t and + /// returned to L1 via nr_scheduled_response_t + void *phy_data; } nr_scheduled_response_t; typedef struct { @@ -286,6 +292,7 @@ int nr_ue_dcireq(nr_dcireq_t *dcireq); // TODO check /**\brief handle BCCH-BCH message from dl_indication + \param phy_data PHY structure to be filled in by the callee in the FAPI call (L1 caller -> indication to L2 -> FAPI call to L1 callee) \param pduP pointer to bch pdu \param additional_bits corresponding to 38.212 ch.7 \param ssb_index SSB index within 0 - (L_ssb-1) corresponding to 38.331 ch.13 parameter i @@ -294,6 +301,7 @@ int nr_ue_dcireq(nr_dcireq_t *dcireq); int handle_bcch_bch(module_id_t module_id, int cc_id, unsigned int gNB_index, + void *phy_data, uint8_t *pduP, unsigned int additional_bits, uint32_t ssb_index,