diff --git a/CMakeLists.txt b/CMakeLists.txt index 936938ed23..22453e5af6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -498,7 +498,6 @@ target_link_libraries(shlib_loader PRIVATE CONFIG_LIB) ########################################################## add_boolean_option(ENABLE_LDPC_T2 OFF "Build support for LDPC Offload to T2 library" OFF) -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/x86_64-linux-gnu/pkgconfig") if (ENABLE_LDPC_T2) pkg_check_modules(LIBDPDK_T2 REQUIRED libdpdk=20.11.9) find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS ${LIBDPDK_T2_LIBRARY_DIRS}) @@ -718,6 +717,7 @@ target_link_libraries(SCHED_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) set(SCHED_SRC_NR_UE ${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c + ${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue_sl.c ${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c ${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c ${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c @@ -1085,8 +1085,11 @@ set(PHY_SRC_UE ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/sss_nr.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/cic_filter_nr.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync.c + ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_pbch.c + ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_psbch_rx.c + ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_psbch_tx.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -2238,6 +2241,22 @@ target_link_libraries(nr_pbchsim PRIVATE ) target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) +add_executable(nr_psbchsim + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c + ${OPENAIR_DIR}/common/utils/nr/nr_common.c + ${OPENAIR_DIR}/executables/softmodem-common.c + ${OPENAIR2_DIR}/RRC/NAS/nas_config.c + ${NR_UE_RRC_DIR}/rrc_nsa.c + ${NFAPI_USER_DIR}/nfapi.c + ${NFAPI_USER_DIR}/gnb_ind_vars.c + ${PHY_INTERFACE_DIR}/queue_t.c + ) +target_link_libraries(nr_psbchsim PRIVATE + -Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -lz -Wl,--end-group + m pthread ${T_LIB} ITTI dl shlib_loader + ) +target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) #PUCCH ---> Prashanth add_executable(nr_pucchsim diff --git a/README.md b/README.md index 249e4cc965..9bb8b6de43 100644 --- a/README.md +++ b/README.md @@ -76,3 +76,20 @@ openairinterface5g ├── radio : Drivers for various radios such as USRP, AW2S, RFsim, ... └── targets : Some configuration files; only historical relevance, and might be deleted in the future ``` + +# How to get support from the OAI Community # + +You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList). + +Your email should contain below information: + +- A clear subject in your email. +- For all the queries there should be [Query\] in the subject of the email and for problems there should be [Problem\]. +- In case of a problem, add a small description. +- Do not share any photos unless you want to share a diagram. +- OAI gNB/DU/CU/CU-CP/CU-UP configuration file in `.conf` format only. +- Logs of OAI gNB/DU/CU/CU-CP/CU-UP in `.log` or `.txt` format only. +- In case your question is related to performance, include a small description of the machine (Operating System, Kernel version, CPU, RAM and networking card) and diagram of your testing environment. +- Known/open issues are present on [GitLab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues), so keep checking. + +Always remember a structured email will help us understand your issues quickly. diff --git a/charts/physims/charts/nr-psbchsim/Chart.yaml b/charts/physims/charts/nr-psbchsim/Chart.yaml new file mode 100644 index 0000000000..8f1af6d648 --- /dev/null +++ b/charts/physims/charts/nr-psbchsim/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-psbchsim +description: A Helm subchart for nr-psbchsim network function + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-psbchsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-psbchsim/templates/_helpers.tpl b/charts/physims/charts/nr-psbchsim/templates/_helpers.tpl new file mode 100644 index 0000000000..ef7fc150b5 --- /dev/null +++ b/charts/physims/charts/nr-psbchsim/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-psbchsim.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-psbchsim.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-psbchsim.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-psbchsim.labels" -}} +helm.sh/chart: {{ include "oai-nr-psbchsim.chart" . }} +{{ include "oai-nr-psbchsim.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-psbchsim.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-psbchsim.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-psbchsim.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-psbchsim.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-psbchsim/templates/job.yaml b/charts/physims/charts/nr-psbchsim/templates/job.yaml new file mode 100644 index 0000000000..a302630d3b --- /dev/null +++ b/charts/physims/charts/nr-psbchsim/templates/job.yaml @@ -0,0 +1,42 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ .Chart.Name }} +spec: + template: + metadata: + labels: + app: physim + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_psbchsim" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Never + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 + {{- if .Values.global.nodeSelector}} + nodeSelector: + {{- toYaml .Values.global.nodeSelector | nindent 12 }} + {{- end }} + {{- if .Values.global.nodeName.nrpsbchsim}} + nodeName: {{ .Values.global.nodeName.nrpsbchsim }} + {{- end }} diff --git a/charts/physims/charts/nr-psbchsim/values.yaml b/charts/physims/charts/nr-psbchsim/values.yaml new file mode 100644 index 0000000000..b6fa992ccf --- /dev/null +++ b/charts/physims/charts/nr-psbchsim/values.yaml @@ -0,0 +1,48 @@ +# Default values for oai-nr-psbchsim +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-psbchsim" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/values.yaml b/charts/physims/values.yaml index bac4ed3eb5..82374001a2 100644 --- a/charts/physims/values.yaml +++ b/charts/physims/values.yaml @@ -27,6 +27,7 @@ global: nrpbschsim106rb: dedale nrpbchsim217rb: dedale nrpbchsim273rb: dedale + nrpsbchsim: dedale nrprachsim: dedale nrpucchsim: dedale nrulschsim: theseus diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container index 8a3fc8f9e2..b1bf895111 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Container +++ b/ci-scripts/Jenkinsfile-GitLab-Container @@ -562,6 +562,29 @@ pipeline { } } } + stage ("SA-2x2-Module-CN5G") { + when { expression {do5Gtest} } + steps { + script { + triggerSlaveJob ('RAN-SA-2x2-Module-CN5G', 'SA-2x2-Module-CN5G') + } + } + post { + always { + script { + // Using a unique variable name for each test stage to avoid overwriting on a global variable + // due to parallel-time concurrency + saTDD2x2Status = finalizeSlaveJob('RAN-SA-2x2-Module-CN5G') + } + } + failure { + script { + currentBuild.result = 'FAILURE' + failingStages += saTDD2x2Status + } + } + } + } stage ("SA-OAIUE-CN5G") { when { expression {do5Gtest} } steps { diff --git a/ci-scripts/ci_infra.yaml b/ci-scripts/ci_infra.yaml index 8142e960dd..400b80e2e0 100644 --- a/ci-scripts/ci_infra.yaml +++ b/ci-scripts/ci_infra.yaml @@ -61,6 +61,12 @@ oc-cn5g: NetworkScript: echo "inet 172.21.6.102" RunIperf3Server: False +matix-cn5g: + Host: matix + NetworkScript: docker exec prod-trf-gen ip a show dev eth0 + CmdPrefix: docker exec prod-trf-gen + RunIperf3Server: False + porcepix-cn4g: Host: porcepix NetworkScript: docker exec prod-trf-gen ip a show dev eth0 @@ -327,6 +333,9 @@ rfsim4g_ue: NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim4g-oai-lte-ue0 IF: oaitun_ue1 + AttachScript: docker start rfsim4g-oai-lte-ue0 + DetachScript: docker stop rfsim4g-oai-lte-ue0 + MTU: 1500 rfsim4g_ext_dn: Host: localhost diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index 2e1bff7970..3604065caf 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -33,9 +33,11 @@ import logging import sshconnection #to update the HTML object import cls_oai_html +import cls_cmd from multiprocessing import SimpleQueue #for log folder maintenance import os +import re class PhySim: def __init__(self): @@ -63,7 +65,7 @@ class PhySim: #PRIVATE Methods #----------------- - def __CheckResults_LDPCTest(self,HTML,CONST,testcase_id): + def __CheckResults_LDPCcudaTest(self,HTML,CONST,testcase_id): mySSH = sshconnection.SSHConnection() mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) #retrieve run log file and store it locally$ @@ -84,42 +86,44 @@ class PhySim: HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', [info]) return HTML - def __CheckResults_LDPCt1Test(self,HTML,CONST,testcase_id): - thrs_NOK = 500 - thrs_KO = 1000 - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) + def __CheckResults_LDPCt2Test(self,HTML,CONST,testcase_id): + thrs_KO = int(self.timethrs) + mySSH = cls_cmd.getConnection(self.eNBIpAddr) #retrieve run log file and store it locally$ - mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.') + mySSH.copyin(f'{self.__workSpacePath}{self.__runLogFile}', f'{self.__runLogFile}') mySSH.close() - #parse results looking for Decoding values - runResultsT1=[] + #parse results looking for encoder/decoder processing time values + with open(self.__runLogFile) as g: for line in g: - if 'decoding time' in line: - runResultsT1.append(line) + res_enc = re.search(r"DLSCH encoding time\s+(\d+\.\d+)\s+us",line) + res_dec = re.search(r'ULSCH total decoding time\s+(\d+\.\d+)\s+us',line) + if res_dec is not None: + time = res_dec.group(1) + info = res_dec.group(0) + break + if res_enc is not None: + time = res_enc.group(1) + info = res_enc.group(0) + break - # In case the T1 board does work properly, there is no statistics - if len(runResultsT1) == 0: - logging.error('no statistics') + # In case the T2 board does work properly, there is no statistics + if res_enc is None and res_dec is None: + logging.error(f'no statistics: res_enc {res_enc} res_dec {res_dec}') HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', ['no statistics']) self.exitStatus = 1 - os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.') + os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.') return HTML - info = runResultsT1[0][15:-13] - result = int(''.join(filter(str.isdigit, info)))/100 - #once parsed move the local logfile to its folder for tidiness - os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.') - if result < thrs_NOK: + #once parsed move the local logfile to its folder + os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.') + if float(time) < thrs_KO: HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', [info]) - elif result > thrs_KO: - error_msg = f'Decoding time exceeds a limit of {thrs_KO} us' + else: + error_msg = f'Processing time exceeds a limit of {thrs_KO} us' logging.error(error_msg) HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', [info + '\n' + error_msg]) self.exitStatus = 1 - else: - HTML.CreateHtmlTestRowQueue(self.runargs, 'NOK', [info]) return HTML def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id): @@ -228,7 +232,7 @@ class PhySim: return lHTML - def Run_LDPCTest(self,htmlObj,constObj,testcase_id): + def Run_CUDATest(self,htmlObj,constObj,testcase_id): self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/' #create run logs folder locally os.system('mkdir -p ./'+self.__runLogPath) @@ -243,25 +247,24 @@ class PhySim: mySSH.close() #return updated HTML to main lHTML = cls_oai_html.HTMLManagement() - lHTML=self.__CheckResults_LDPCTest(htmlObj,constObj,testcase_id) + lHTML=self.__CheckResults_LDPCcudaTest(htmlObj,constObj,testcase_id) return lHTML - def Run_LDPCt1Test(self,htmlObj,constObj,testcase_id): - self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/' + def Run_T2Test(self,htmlObj,constObj,testcase_id): + self.__workSpacePath = f'{self.eNBSourceCodePath}/cmake_targets/' #create run logs folder locally - os.system('mkdir -p ./'+self.__runLogPath) + os.system(f'mkdir -p ./{self.__runLogPath}') #log file is tc_.log remotely - self.__runLogFile='physim_'+str(testcase_id)+'.log' + self.__runLogFile=f'physim_{str(testcase_id)}.log' #open a session for test run - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - mySSH.command('cd '+self.__workSpacePath,'\$',5) + mySSH = cls_cmd.getConnection(self.eNBIpAddr) + mySSH.run(f'cd {self.__workSpacePath}') #run and redirect the results to a log file - mySSH.command(f'sudo {self.__workSpacePath}ran_build/build/nr_ulsim {self.runargs} > {self.__runLogFile} 2>&1', '\$', 30) + mySSH.run(f'sudo {self.__workSpacePath}ran_build/build/{self.runsim} {self.runargs} > {self.__workSpacePath}{self.__runLogFile} 2>&1') mySSH.close() #return updated HTML to main lHTML = cls_oai_html.HTMLManagement() - lHTML=self.__CheckResults_LDPCt1Test(htmlObj,constObj,testcase_id) + lHTML=self.__CheckResults_LDPCt2Test(htmlObj,constObj,testcase_id) return lHTML def Run_NRulsimTest(self, htmlObj, constObj, testcase_id): diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 70f8729764..85d8520a5f 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -166,7 +166,7 @@ class PhySim: mySSH.command('oc get pods -o wide -l app=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 30, resync=True) running_count = mySSH.getBefore().count('Running') completed_count = mySSH.getBefore().count('Completed') - if (running_count + completed_count) == 21: + if (running_count + completed_count) == 22: logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m') isRunning = True podNames = re.findall('oai-[\S\d\w]+', mySSH.getBefore()) diff --git a/ci-scripts/conf_files/enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf b/ci-scripts/conf_files/enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf index 6ced7573e0..88194c94b7 100644 --- a/ci-scripts/conf_files/enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf +++ b/ci-scripts/conf_files/enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf @@ -137,13 +137,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); enable_measurement_reports = "no"; @@ -156,9 +150,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.45"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.45"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.45"; diff --git a/ci-scripts/conf_files/enb-rcc.band7.25prb.tm1.if4p5.conf b/ci-scripts/conf_files/enb-rcc.band7.25prb.tm1.if4p5.conf index 11bc672958..2eb186b542 100644 --- a/ci-scripts/conf_files/enb-rcc.band7.25prb.tm1.if4p5.conf +++ b/ci-scripts/conf_files/enb-rcc.band7.25prb.tm1.if4p5.conf @@ -174,13 +174,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); enable_measurement_reports = "no"; @@ -193,9 +187,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.46"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.46"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.46"; diff --git a/ci-scripts/conf_files/enb.band38.25prb.rfsim.conf b/ci-scripts/conf_files/enb.band38.25prb.rfsim.conf index e19cd4d68a..c98544557b 100644 --- a/ci-scripts/conf_files/enb.band38.25prb.rfsim.conf +++ b/ci-scripts/conf_files/enb.band38.25prb.rfsim.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; port = 36412; }); enable_measurement_reports = "no"; @@ -153,9 +147,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.20"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.20"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.61.20"; 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 53c4027662..183b91407c 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 @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.195"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.195"; }); enable_measurement_reports = "no"; @@ -190,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eno1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.16.128"; - ENB_INTERFACE_NAME_FOR_S1U = "eno1"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.16.128"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.16.128"; 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 e9cb3ee327..21fc241994 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 @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.195"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.195"; }); enable_measurement_reports = "no"; @@ -190,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eno1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.16.128"; - ENB_INTERFACE_NAME_FOR_S1U = "eno1"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.16.128"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.16.128"; 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 bc2cc8f61b..a3f3b2a64c 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 @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); enable_measurement_reports = "no"; @@ -190,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eno1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eno1"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/enb.band40.100prb.usrpb200.tm1-defaultscheduler.conf b/ci-scripts/conf_files/enb.band40.100prb.usrpb200.tm1-defaultscheduler.conf index 56ded888c8..8b2a689705 100644 --- a/ci-scripts/conf_files/enb.band40.100prb.usrpb200.tm1-defaultscheduler.conf +++ b/ci-scripts/conf_files/enb.band40.100prb.usrpb200.tm1-defaultscheduler.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); enable_measurement_reports = "no"; @@ -153,9 +147,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.45"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.45"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.45"; diff --git a/ci-scripts/conf_files/enb.band40.25prb.usrpb200.conf b/ci-scripts/conf_files/enb.band40.25prb.usrpb200.conf index 9b812aa755..4a8218e1b4 100644 --- a/ci-scripts/conf_files/enb.band40.25prb.usrpb200.conf +++ b/ci-scripts/conf_files/enb.band40.25prb.usrpb200.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); enable_measurement_reports = "no"; @@ -153,9 +147,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.45"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.45"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.45"; diff --git a/ci-scripts/conf_files/enb.band7.100prb.rfsim.conf b/ci-scripts/conf_files/enb.band7.100prb.rfsim.conf index 3c0b994017..bb73349202 100644 --- a/ci-scripts/conf_files/enb.band7.100prb.rfsim.conf +++ b/ci-scripts/conf_files/enb.band7.100prb.rfsim.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.20"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.20"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.61.20"; diff --git a/ci-scripts/conf_files/enb.band7.100prb.usrpb200.tm1.conf b/ci-scripts/conf_files/enb.band7.100prb.usrpb200.tm1.conf index 30d2549a48..b45b381a89 100644 --- a/ci-scripts/conf_files/enb.band7.100prb.usrpb200.tm1.conf +++ b/ci-scripts/conf_files/enb.band7.100prb.usrpb200.tm1.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.46"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.46"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.46"; diff --git a/ci-scripts/conf_files/enb.band7.25prb.l2sim.conf b/ci-scripts/conf_files/enb.band7.25prb.l2sim.conf index f4ed527153..c1890bbade 100644 --- a/ci-scripts/conf_files/enb.band7.25prb.l2sim.conf +++ b/ci-scripts/conf_files/enb.band7.25prb.l2sim.conf @@ -172,13 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; port = 36412; }); enable_measurement_reports = "no"; @@ -191,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.1"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.1"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.61.1"; @@ -206,7 +198,6 @@ eNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo"; remote_s_address = "127.0.0.1"; local_s_address = "127.0.0.1"; local_s_portc = 50001; diff --git a/ci-scripts/conf_files/enb.band7.25prb.rfsim.conf b/ci-scripts/conf_files/enb.band7.25prb.rfsim.conf index c5d8383860..63b96e0249 100644 --- a/ci-scripts/conf_files/enb.band7.25prb.rfsim.conf +++ b/ci-scripts/conf_files/enb.band7.25prb.rfsim.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.20"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.20"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.61.20"; diff --git a/ci-scripts/conf_files/enb.band7.25prb.rfsim.nos1.conf b/ci-scripts/conf_files/enb.band7.25prb.rfsim.nos1.conf index c5d8383860..63b96e0249 100644 --- a/ci-scripts/conf_files/enb.band7.25prb.rfsim.nos1.conf +++ b/ci-scripts/conf_files/enb.band7.25prb.rfsim.nos1.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.20"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.20"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.61.20"; diff --git a/ci-scripts/conf_files/enb.band7.25prb.usrpb200.conf b/ci-scripts/conf_files/enb.band7.25prb.usrpb200.conf index 7724fb9f1d..4d972d4570 100644 --- a/ci-scripts/conf_files/enb.band7.25prb.usrpb200.conf +++ b/ci-scripts/conf_files/enb.band7.25prb.usrpb200.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.30"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.30"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.61.30"; diff --git a/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1-norrc.conf b/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1-norrc.conf index 348c5f7ccd..0d84e971c2 100644 --- a/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1-norrc.conf +++ b/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1-norrc.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.46"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.46"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.46"; diff --git a/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1.conf b/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1.conf index 3e5088baad..64ea130a43 100644 --- a/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1.conf +++ b/ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.46"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.46"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.46"; diff --git a/ci-scripts/conf_files/enb.band7.50prb.rfsim.conf b/ci-scripts/conf_files/enb.band7.50prb.rfsim.conf index abfc3887cd..991b188092 100644 --- a/ci-scripts/conf_files/enb.band7.50prb.rfsim.conf +++ b/ci-scripts/conf_files/enb.band7.50prb.rfsim.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.20"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.20"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.61.20"; diff --git a/ci-scripts/conf_files/enb.band7.50prb.usrpb200.tm1.conf b/ci-scripts/conf_files/enb.band7.50prb.usrpb200.tm1.conf index 41c2e3a668..10430a3785 100644 --- a/ci-scripts/conf_files/enb.band7.50prb.usrpb200.tm1.conf +++ b/ci-scripts/conf_files/enb.band7.50prb.usrpb200.tm1.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.18.48"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.18.48"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.46"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.46"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.46"; diff --git a/ci-scripts/conf_files/enb.band7.tm1.25prb.rfsim.mbms.conf b/ci-scripts/conf_files/enb.band7.tm1.25prb.rfsim.mbms.conf index e0b5dc7257..4e0b0fa089 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.25prb.rfsim.mbms.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.25prb.rfsim.mbms.conf @@ -180,12 +180,7 @@ eNBs = t_dc_overall = 2000; /* unit: millisecond */ ////////// MCE parameters: - target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mce_m2_ip_address = ({ ipv4 = "127.0.0.7"; }); ///M2 enable_enb_m2 = "yes"; @@ -208,9 +203,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; @@ -252,12 +245,7 @@ MCEs = ( //M3 enable_mce_m3 = "yes"; - target_mme_m3_ip_address = ( { ipv4 = "127.0.0.18"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mme_m3_ip_address = ({ ipv4 = "127.0.0.18"; }); diff --git a/ci-scripts/conf_files/enb.band7.tm1.50prb.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.50prb.usrpb210.conf index 5fd6142c9d..dafdf0dd80 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.50prb.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.50prb.usrpb210.conf @@ -179,13 +179,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -198,9 +192,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/enb.nsa.band7.25prb.usrpb200.conf b/ci-scripts/conf_files/enb.nsa.band7.25prb.usrpb200.conf index fb4e2f58b5..b39bee72e5 100644 --- a/ci-scripts/conf_files/enb.nsa.band7.25prb.usrpb200.conf +++ b/ci-scripts/conf_files/enb.nsa.band7.25prb.usrpb200.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "yes"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "172.21.16.137"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "172.21.16.137"; port = 36412; }); ///X2 enable_x2 = "yes"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.68.130"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.68.130"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.68.130"; diff --git a/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf b/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf index 7f975cbcd4..e828389ca8 100644 --- a/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf +++ b/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf @@ -22,7 +22,6 @@ gNBs = tr_s_preference = "f1"; - local_s_if_name = "eth0"; local_s_address = "192.168.71.150"; remote_s_address = "192.168.71.171"; local_s_portc = 501; @@ -40,19 +39,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.150"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.150"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb-cu.sa.f1.conf b/ci-scripts/conf_files/gnb-cu.sa.f1.conf index c419979a96..1cd2d76318 100644 --- a/ci-scripts/conf_files/gnb-cu.sa.f1.conf +++ b/ci-scripts/conf_files/gnb-cu.sa.f1.conf @@ -22,7 +22,6 @@ gNBs = tr_s_preference = "f1"; - local_s_if_name = "eth0"; local_s_address = "192.168.68.194"; remote_s_address = "192.168.68.195"; local_s_portc = 501; @@ -40,19 +39,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.16.137"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.16.137"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.194"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.68.194"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb-cucp.sa.f1.conf b/ci-scripts/conf_files/gnb-cucp.sa.f1.conf index 94200b8189..66e3522181 100644 --- a/ci-scripts/conf_files/gnb-cucp.sa.f1.conf +++ b/ci-scripts/conf_files/gnb-cucp.sa.f1.conf @@ -23,7 +23,6 @@ gNBs = tr_s_preference = "f1"; - local_s_if_name = "lo"; local_s_address = "192.168.71.150"; remote_s_address = "0.0.0.0"; # multiple DUs local_s_portc = 501; @@ -41,12 +40,7 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "oai-amf"; }); E1_INTERFACE = ( @@ -61,8 +55,7 @@ gNBs = NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/24"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.150/24"; }; } ); @@ -94,5 +87,6 @@ security = { rrc_log_level ="info"; f1ap_log_level ="info"; ngap_log_level ="debug"; + sctp_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb-cucp.sa.f1.quectel.conf b/ci-scripts/conf_files/gnb-cucp.sa.f1.quectel.conf index 8b9e865e0d..7f7daa1370 100644 --- a/ci-scripts/conf_files/gnb-cucp.sa.f1.quectel.conf +++ b/ci-scripts/conf_files/gnb-cucp.sa.f1.quectel.conf @@ -23,7 +23,6 @@ gNBs = tr_s_preference = "f1"; - local_s_if_name = "eth0"; local_s_address = "192.168.68.194"; remote_s_address = "192.168.68.195"; local_s_portc = 501; @@ -41,12 +40,7 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.16.137"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.16.137"; }); E1_INTERFACE = ( @@ -61,7 +55,6 @@ gNBs = NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.194"; }; } diff --git a/ci-scripts/conf_files/gnb-cuup.sa.f1.conf b/ci-scripts/conf_files/gnb-cuup.sa.f1.conf index 07e3701749..a7e2daa298 100644 --- a/ci-scripts/conf_files/gnb-cuup.sa.f1.conf +++ b/ci-scripts/conf_files/gnb-cuup.sa.f1.conf @@ -21,7 +21,6 @@ gNBs = tr_s_preference = "f1"; - local_s_if_name = "lo"; local_s_address = "192.168.72.161"; remote_s_address = "192.168.72.171"; local_s_portc = 501; @@ -48,9 +47,7 @@ gNBs = NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.161/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.161/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb-cuup.sa.f1.quectel.conf b/ci-scripts/conf_files/gnb-cuup.sa.f1.quectel.conf index 7a2fc7db21..2b231e950d 100644 --- a/ci-scripts/conf_files/gnb-cuup.sa.f1.quectel.conf +++ b/ci-scripts/conf_files/gnb-cuup.sa.f1.quectel.conf @@ -21,7 +21,6 @@ gNBs = tr_s_preference = "f1"; - local_s_if_name = "lo"; local_s_address = "192.168.68.196"; remote_s_address = "192.168.68.195"; local_s_portc = 501; @@ -48,9 +47,7 @@ gNBs = NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.196"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.68.196"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf index 919c1d219f..780d424671 100644 --- a/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf @@ -168,7 +168,6 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "f1"; - local_n_if_name = "eth0"; local_n_address = "192.168.72.142"; remote_n_address = "192.168.72.140"; local_n_portc = 500; diff --git a/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf b/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf index 5abf74a828..5afadb781a 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf @@ -162,7 +162,6 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "f1"; - local_n_if_name = "eth0"; local_n_address = "192.168.68.195"; remote_n_address = "192.168.68.194"; local_n_portc = 500; diff --git a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf index 9d8a3cb57b..95c97dacb9 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf @@ -168,7 +168,6 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "f1"; - local_n_if_name = "eth0"; local_n_address = "192.168.71.171"; remote_n_address = "192.168.71.150"; local_n_portc = 500; @@ -231,3 +230,31 @@ log_config: { rlc_log_level = "info"; f1ap_log_level = "info"; }; + +#/* configuration for channel modelisation */ +#/* To be included in main config file when */ +#/* channel modelisation is used (rfsimulator with chanmod options enabled) */ +channelmod = { + max_chan = 10; + modellist = "modellist_rfsimu_1"; + modellist_rfsimu_1 = ( + { # DL, modify on UE side + model_name = "rfsimu_channel_enB0" + type = "AWGN"; + ploss_dB = 20; + noise_power_dB = -4; + forgetfact = 0; + offset = 0; + ds_tdl = 0; + }, + { # UL, modify on gNB side + model_name = "rfsimu_channel_ue0" + type = "AWGN"; + ploss_dB = 20; + noise_power_dB = -2; + forgetfact = 0; + offset = 0; + ds_tdl = 0; + } + ); +}; diff --git a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf index 5a8d1abd04..07be610807 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf @@ -169,7 +169,6 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "f1"; - local_n_if_name = "eth0"; local_n_address = "192.168.68.195"; remote_n_address = "192.168.68.194"; local_n_portc = 500; diff --git a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf index f1615c0247..dd8d3d80d1 100644 --- a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf @@ -190,19 +190,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.131"; - GNB_INTERFACE_NAME_FOR_NGU = "eno"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.131"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; @@ -213,7 +206,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50001; // vnf p5 port diff --git a/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf b/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf index 5bf2525092..a76aa1a096 100644 --- a/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf @@ -150,19 +150,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf index ab6c6b2467..551d860d33 100644 --- a/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf @@ -162,20 +162,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; port = 36412; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf index 453b03910b..aa2e7a31c2 100644 --- a/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf @@ -162,20 +162,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; port = 36412; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf index aefbe78887..79333e50ba 100644 --- a/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf @@ -162,18 +162,10 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; port = 36412; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf index 6331462d1b..29f420710a 100644 --- a/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf @@ -164,18 +164,10 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; port = 36412; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf index 39bf6858f1..f21eae2b1f 100644 --- a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf @@ -158,13 +158,7 @@ gNBs = ////////// MME parameters: -# mme_ip_address = ( { ipv4 = "192.168.68.130"; -# ipv6 = "192:168:30::17"; -# port = 36412 ; -# active = "yes"; -# preference = "ipv4"; -# } -# ); +# mme_ip_address = ({ ipv4 = "192.168.68.130"; port = 36412; }); ///X2 enable_x2 = "yes"; @@ -173,17 +167,11 @@ gNBs = t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( { ipv4 = "192.168.68.130"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.68.130"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.68.194"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.68.194"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.68.194"; diff --git a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf index b08faabb19..fa17a177b0 100644 --- a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf @@ -163,12 +163,7 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); ///X2 enable_x2 = "yes"; @@ -176,19 +171,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR"; diff --git a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf index 387bd959ad..e7bd046f48 100644 --- a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf @@ -162,18 +162,11 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/24"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf index c81c9fb0f6..a5a4f1ef8a 100644 --- a/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf @@ -160,19 +160,12 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf index 940bd210da..c4d063ef45 100644 --- a/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf @@ -161,18 +161,11 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/26"; - GNB_INTERFACE_NAME_FOR_NGU = "eno1"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/26"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf new file mode 100644 index 0000000000..fb19d44985 --- /dev/null +++ b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf @@ -0,0 +1,260 @@ +Active_gNBs = ( "gNB-OAI"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +sa = 1; +usrp-tx-thread-config = 1; +tune-offset = 30720000; + +gNBs = +( + { + ////////// Identification parameters: + gNB_ID = 0xe00; + gNB_name = "gNB-OAI"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ({ sst = 1; }) }); + + nr_cellid = 12345678L; + + ////////// Physical parameters: + + ssb_SubcarrierOffset = 0; + pdsch_AntennaPorts_XP = 2; + pusch_AntennaPorts = 2; + do_CSIRS = 1; + do_SRS = 1; + + servingCellConfigCommon = ( + { + #spCellConfigCommon + + physCellId = 0; + +# downlinkConfigCommon + #frequencyInfoDL + # this is 3300.60 MHz + 81*12*30e-3 MHz = 3329.76 + absoluteFrequencySSB = 673344; + # this is 3300.60 MHz + dl_absoluteFrequencyPointA = 671400; + dl_frequencyBand = 77; + #scs-SpecificCarrierList + dl_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing = 1; + dl_carrierBandwidth = 162; + #initialDownlinkBWP + #genericParameters + # this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart)) + initialDLBWPlocationAndBandwidth = 31624; + # +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 1; + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPsearchSpaceZero = 0; + + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 77; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 162; + pMax = 20; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 31624; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing = 1; + #rach-ConfigCommon + #rach-ConfigGeneric + prach_ConfigurationIndex = 98; +#prach_msg1_FDM +#0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM = 0; + prach_msg1_FrequencyStart = 0; + zeroCorrelationZoneConfig = 12; + preambleReceivedTargetPower = -96; +#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax = 6; +#powerRampingStep +# 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 1; +#ra_ReponseWindow +#1,2,4,8,10,20,40,80 + ra_ResponseWindow = 4; +#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; +#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; +#ra_ContentionResolutionTimer +#(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer = 7; + rsrp_ThresholdSSB = 19; +#prach-RootSequenceIndex_PR +#1 = 839, 2 = 139 + prach_RootSequenceIndex_PR = 2; + prach_RootSequenceIndex = 1; + # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex + # + msg1_SubcarrierSpacing = 1, +# restrictedSetConfig +# 0=unrestricted, 1=restricted type A, 2=restricted type B + restrictedSetConfig = 0, + + msg3_DeltaPreamble = 1; + p0_NominalWithGrant =-90; + +# pucch-ConfigCommon setup : +# pucchGroupHopping +# 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping = 0; + hoppingId = 40; + p0_nominal = -70; +# ssb_PositionsInBurs_BitmapPR +# 1=short, 2=medium, 3=long + ssb_PositionsInBurst_PR = 2; + ssb_PositionsInBurst_Bitmap = 1; + +# ssb_periodicityServingCell +# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 + ssb_periodicityServingCell = 2; + +# dmrs_TypeA_position +# 0 = pos2, 1 = pos3 + dmrs_TypeA_Position = 0; + +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + subcarrierSpacing = 1; + + + #tdd-UL-DL-ConfigurationCommon +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + referenceSubcarrierSpacing = 1; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 5; + nrofDownlinkSlots = 2; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; + + ssPBCH_BlockPower = -20; + } + + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// AMF parameters: + amf_ip_address = ( { ipv4 = "192.168.61.132"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + + NETWORK_INTERFACES : + { + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.61.129/26"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.61.129/26"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + } +); + +MACRLCs = ( +{ + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + pusch_TargetSNRx10 = 300; + pucch_TargetSNRx10 = 300; + ulsch_max_frame_inactivity = 0; + pusch_FailureThres = 100; + ul_max_mcs = 28; +} +); + +L1s = ( +{ + num_cc = 1; + tr_n_preference = "local_mac"; + prach_dtx_threshold = 120; + pusch_dtx_threshold = 20; + max_ldpc_iterations = 20; +} +); + +RUs = ( +{ + local_rf = "yes" + nb_tx = 2; + nb_rx = 2; + att_tx = 0; + att_rx = 0; + bands = [77]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 72; + eNB_instances = [0]; + ##beamforming 1x2 matrix: 1 layer x 2 antennas + bf_weights = [0x00007fff, 0x0000]; + #clock_src = "internal"; + sdr_addrs = "addr=192.168.80.53, clock_source=internal,time_source=internal" + +} +); + +security = { + # preferred ciphering algorithms + # the first one of the list that an UE supports in chosen + # valid values: nea0, nea1, nea2, nea3 + ciphering_algorithms = ( "nea0" ); + + # preferred integrity algorithms + # the first one of the list that an UE supports in chosen + # valid values: nia0, nia1, nia2, nia3 + integrity_algorithms = ( "nia2", "nia0" ); + + # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter + # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' + drb_ciphering = "yes"; + drb_integrity = "no"; +}; + +log_config : +{ + global_log_level ="info"; + hw_log_level ="info"; + phy_log_level ="info"; + mac_log_level ="info"; + rlc_log_level ="info"; + pdcp_log_level ="info"; + rrc_log_level ="info"; + ngap_log_level ="debug"; + f1ap_log_level ="debug"; +}; diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf new file mode 100644 index 0000000000..efe4bbcec8 --- /dev/null +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf @@ -0,0 +1,257 @@ +Active_gNBs = ( "gNB-OAI"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +sa = 1; +usrp-tx-thread-config = 1; + +gNBs = ( +{ + ////////// Identification parameters: + gNB_ID = 0xe00; + gNB_name = "gNB-OAI"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ({ sst = 1; }); }); + + nr_cellid = 12345678L; + + ////////// Physical parameters: + + pdsch_AntennaPorts_XP = 2; + pusch_AntennaPorts = 2; + do_CSIRS = 1; + do_SRS = 1; + ul_prbblacklist = "135,136,137,138" + + servingCellConfigCommon = ( + { + # spCellConfigCommon + + physCellId = 0; + + # downlinkConfigCommon + # frequencyInfoDL + # this is 3900.60 MHz + (134 PRBs + 4 SCs)@30kHz SCS (GSCN: 8158) + absoluteFrequencySSB = 673344; + dl_frequencyBand = 77; + # this is 3900.60 MHz + dl_absoluteFrequencyPointA = 670068; + + # scs-SpecificCarrierList + dl_offstToCarrier = 0; + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing = 1; + dl_carrierBandwidth = 273; + + # initialDownlinkBWP + # genericParameters + initialDLBWPlocationAndBandwidth = 1099; + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 1; + + # pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPsearchSpaceZero = 0; + + # uplinkConfigCommon + # frequencyInfoUL + ul_frequencyBand = 77; + # scs-SpecificCarrierList + ul_offstToCarrier = 0; + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 273; + pMax = 20; + + # initialUplinkBWP + # genericParameters + initialULBWPlocationAndBandwidth = 1099; + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing = 1; + + # rach-ConfigCommon + # rach-ConfigGeneric + prach_ConfigurationIndex = 98; + # prach_msg1_FDM + # 0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM = 0; + prach_msg1_FrequencyStart = 0; + zeroCorrelationZoneConfig = 12; + preambleReceivedTargetPower = -90; + # preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax = 6; + # powerRampingStep + # 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 1; + # ra_ReponseWindow + # 1,2,4,8,10,20,40,80 + ra_ResponseWindow = 4; + # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR + # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; + # oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; + # ra_ContentionResolutionTimer + # (0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer = 7; + rsrp_ThresholdSSB = 19; + # prach-RootSequenceIndex_PR + # 1 = 839, 2 = 139 + prach_RootSequenceIndex_PR = 2; + prach_RootSequenceIndex = 1; + # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex + msg1_SubcarrierSpacing = 1, + # restrictedSetConfig + # 0=unrestricted, 1=restricted type A, 2=restricted type B + restrictedSetConfig = 0, + msg3_DeltaPreamble = 1; + p0_NominalWithGrant =-90; + + # pucch-ConfigCommon + # pucchGroupHopping + # 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping = 0; + hoppingId = 40; + p0_nominal = -70; + + # dmrs_TypeA_position + # 0 = pos2, 1 = pos3 + dmrs_TypeA_Position = 0; + + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + subcarrierSpacing = 1; + + + # ssb_PositionsInBurs_BitmapPR + # 1=short, 2=medium, 3=long + ssb_PositionsInBurst_PR = 2; + ssb_PositionsInBurst_Bitmap = 1; + # ssb_periodicityServingCell + # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 + ssb_periodicityServingCell = 2; + + #tdd-UL-DL-ConfigurationCommon + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + referenceSubcarrierSpacing = 1; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 6; + nrofDownlinkSlots = 7; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; + + ssPBCH_BlockPower = -25; + } + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// AMF parameters: + amf_ip_address = ( + { + ipv4 = "192.168.61.132"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.61.129/24"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.61.129/24"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + } + +} +); + +MACRLCs = ( +{ + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + pusch_TargetSNRx10 = 200; + pucch_TargetSNRx10 = 200; + pusch_FailureThres = 1000; + ulsch_max_frame_inactivity = 0; + ul_max_mcs = 25; +} +); + +L1s = ( +{ + num_cc = 1; + tr_n_preference = "local_mac"; + prach_dtx_threshold = 120; + max_ldpc_iterations = 15; + pucch0_dtx_threshold = 80; +} +); + +RUs = ( +{ + local_rf = "yes" + nb_tx = 2; + nb_rx = 2; + att_tx = 12; + att_rx = 0; + bands = [77]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 72; + eNB_instances = [0]; + ##beamforming 1x2 matrix: 1 layer x 2 antennas + bf_weights = [0x00007fff, 0x0000]; + #clock_src = "internal"; + sdr_addrs = "addr=192.168.80.53,clock_source=internal,time_source=internal" +} +); + +security = { + # preferred ciphering algorithms + # the first one of the list that an UE supports in chosen + # valid values: nea0, nea1, nea2, nea3 + ciphering_algorithms = ( "nea0" ); + + # preferred integrity algorithms + # the first one of the list that an UE supports in chosen + # valid values: nia0, nia1, nia2, nia3 + integrity_algorithms = ( "nia2", "nia0" ); + + # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter + # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' + drb_ciphering = "yes"; + drb_integrity = "no"; +}; + +log_config : +{ + global_log_level ="info"; + hw_log_level ="info"; + phy_log_level ="info"; + mac_log_level ="info"; + rlc_log_level ="info"; + pdcp_log_level ="info"; + rrc_log_level ="info"; + ngap_log_level ="debug"; + f1ap_log_level ="debug"; +}; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.l2sim.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.l2sim.conf index a3a830f8f9..30890bec1d 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.l2sim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.l2sim.conf @@ -158,19 +158,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.128"; - GNB_INTERFACE_NAME_FOR_NGU = "eno1"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.128"; GNB_PORT_FOR_NGU = 2152; # Spec 2152 }; @@ -181,7 +174,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50601; // vnf p5 port diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf index 75d19c2c43..d43d2ed8e9 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf @@ -170,19 +170,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.6.100"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.6.100"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno33np0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.124/22"; - GNB_INTERFACE_NAME_FOR_NGU = "eno33np0"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.124/22"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf index c6899c04c9..5e77c29ce2 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf @@ -161,19 +161,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf index a11f6d5634..48ac666f6a 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf @@ -164,19 +164,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf index e7452878e0..8ae97bcc19 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf @@ -163,19 +163,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf index 3f4a851f2d..82fb9f90e1 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf @@ -156,19 +156,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.16.137"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.16.137"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.194"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.68.194"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf index 9e148178bb..9e38bff23d 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf @@ -176,19 +176,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf index 9e6dba6169..7392a5916d 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf @@ -177,19 +177,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf index 4b891d1789..82bf680019 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf @@ -159,19 +159,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf index f9ddfd8460..34201a96b1 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf @@ -166,19 +166,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.6.100"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.6.100"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno33np0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.124/20"; - GNB_INTERFACE_NAME_FOR_NGU = "eno33np0"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.124/20"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf index a2e314b3b3..d42f6a36ab 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf @@ -156,19 +156,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.16.137"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.16.137"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.194"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.68.194"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/lteue.band7.25prb.l2sim.conf b/ci-scripts/conf_files/lteue.band7.25prb.l2sim.conf index 0d4ceb18b4..691a681a88 100644 --- a/ci-scripts/conf_files/lteue.band7.25prb.l2sim.conf +++ b/ci-scripts/conf_files/lteue.band7.25prb.l2sim.conf @@ -13,7 +13,6 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "eno1"; remote_n_address = "127.0.0.1"; local_n_address = "127.0.0.1"; local_n_portc = 50000; diff --git a/ci-scripts/conf_files/nrue.band78.106prb.l2sim.conf b/ci-scripts/conf_files/nrue.band78.106prb.l2sim.conf index a25a91b502..45d192dc04 100644 --- a/ci-scripts/conf_files/nrue.band78.106prb.l2sim.conf +++ b/ci-scripts/conf_files/nrue.band78.106prb.l2sim.conf @@ -21,7 +21,6 @@ MACRLCs = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "eno1"; remote_n_address = "127.0.0.1"; //Proxy IP local_n_address = "127.0.0.1"; local_n_portc = 50600; diff --git a/ci-scripts/conf_files/nrue.uicc.conf b/ci-scripts/conf_files/nrue.uicc.conf index ce6094c71c..afd2c0142e 100644 --- a/ci-scripts/conf_files/nrue.uicc.conf +++ b/ci-scripts/conf_files/nrue.uicc.conf @@ -5,3 +5,31 @@ uicc0 = { dnn= "oai"; nssai_sst=1; } + +#/* configuration for channel modelisation */ +#/* To be included in main config file when */ +#/* channel modelisation is used (rfsimulator with chanmod options enabled) */ +channelmod = { + max_chan = 10; + modellist = "modellist_rfsimu_1"; + modellist_rfsimu_1 = ( + { # DL, modify on UE side + model_name = "rfsimu_channel_enB0" + type = "AWGN"; + ploss_dB = 20; + noise_power_dB = -4; + forgetfact = 0; + offset = 0; + ds_tdl = 0; + }, + { # UL, modify on gNB side + model_name = "rfsimu_channel_ue0" + type = "AWGN"; + ploss_dB = 20; + noise_power_dB = -2; + forgetfact = 0; + offset = 0; + ds_tdl = 0; + } + ); +}; diff --git a/ci-scripts/conf_files/untested/benetel-4g.conf b/ci-scripts/conf_files/untested/benetel-4g.conf index 0aef179a7d..52f9ed5678 100644 --- a/ci-scripts/conf_files/untested/benetel-4g.conf +++ b/ci-scripts/conf_files/untested/benetel-4g.conf @@ -176,12 +176,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); enable_measurement_reports = "yes"; @@ -194,9 +189,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1"; diff --git a/ci-scripts/conf_files/untested/benetel-5g.conf b/ci-scripts/conf_files/untested/benetel-5g.conf index cae4ec0b25..2e8c6436d2 100644 --- a/ci-scripts/conf_files/untested/benetel-5g.conf +++ b/ci-scripts/conf_files/untested/benetel-5g.conf @@ -166,12 +166,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 "CI_MME_IP_ADDR"; }); ///X2 enable_x2 = "yes"; @@ -179,19 +174,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "127.0.0.1"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "127.0.0.1"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; diff --git a/ci-scripts/conf_files/untested/enb.band13.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band13.tm1.25PRB.usrpb210.conf index 6bd83038c7..0a4da4b1a8 100644 --- a/ci-scripts/conf_files/untested/enb.band13.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band13.tm1.25PRB.usrpb210.conf @@ -173,13 +173,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); ///X2 enable_x2 = "yes"; @@ -190,9 +184,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/ci-scripts/conf_files/untested/enb.band13.tm1.50PRB.emtc.conf b/ci-scripts/conf_files/untested/enb.band13.tm1.50PRB.emtc.conf index ba10f14299..67a1cac977 100644 --- a/ci-scripts/conf_files/untested/enb.band13.tm1.50PRB.emtc.conf +++ b/ci-scripts/conf_files/untested/enb.band13.tm1.50PRB.emtc.conf @@ -354,13 +354,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port 36412; }); enable_measurement_reports = "no"; @@ -373,9 +367,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band17.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band17.tm1.25PRB.usrpb210.conf index b85d2c2989..6d48b2458d 100644 --- a/ci-scripts/conf_files/untested/enb.band17.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band17.tm1.25PRB.usrpb210.conf @@ -175,13 +175,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band17.tm1.mbms.25PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band17.tm1.mbms.25PRB.usrpb210.conf index dffa4010b7..2fa185121f 100644 --- a/ci-scripts/conf_files/untested/enb.band17.tm1.mbms.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band17.tm1.mbms.25PRB.usrpb210.conf @@ -176,13 +176,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -194,12 +188,7 @@ eNBs = t_dc_overall = 2000; /* unit: millisecond */ ///M2 - target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mce_m2_ip_address = ({ ipv4 = "127.0.0.7"; }); enable_enb_m2 = "yes"; @@ -219,9 +208,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; @@ -244,12 +231,7 @@ MCEs = ( //M3 enable_mce_m3 = "yes"; - target_mme_m3_ip_address = ( { ipv4 = "127.0.0.18"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mme_m3_ip_address = ({ ipv4 = "127.0.0.18"; }); NETWORK_INTERFACES : diff --git a/ci-scripts/conf_files/untested/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf index ae9aacf0ca..fcd2d930ae 100644 --- a/ci-scripts/conf_files/untested/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412 ; }); enable_measurement_reports = "no"; @@ -153,9 +147,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf index 736f0e161d..36e482ecac 100644 --- a/ci-scripts/conf_files/untested/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -153,9 +147,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf index bc3179f98d..fe63d49e0a 100644 --- a/ci-scripts/conf_files/untested/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -153,9 +147,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf index 99b2140ffa..3b2603982a 100644 --- a/ci-scripts/conf_files/untested/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -151,9 +145,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band7.tm1.100PRB.usrpb210.conf index 27c52d7408..b323feea28 100644 --- a/ci-scripts/conf_files/untested/enb.band7.tm1.100PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band7.tm1.100PRB.usrpb210.conf @@ -171,13 +171,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -190,9 +184,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.slave.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.slave.usrpb210.conf index d78a559611..23a7837419 100644 --- a/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.slave.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.slave.usrpb210.conf @@ -174,13 +174,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -190,18 +184,11 @@ eNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "CI_RCC_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "CI_RCC_IP_ADDR"; }); NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.usrpb210.conf index 035c7e58a9..8141c3ec41 100644 --- a/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band7.tm1.25PRB.usrpb210.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "no"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); ///X2 enable_x2 = "no"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band7.tm1.fr1.25PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band7.tm1.fr1.25PRB.usrpb210.conf index 12e27c7864..58e98f79e7 100644 --- a/ci-scripts/conf_files/untested/enb.band7.tm1.fr1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band7.tm1.fr1.25PRB.usrpb210.conf @@ -177,13 +177,7 @@ eNBs = enable_measurement_reports = "yes"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); ///X2 enable_x2 = "yes"; @@ -194,9 +188,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.band7.tm2.25PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.band7.tm2.25PRB.usrpb210.conf index dcbe68ff03..9274de85c0 100644 --- a/ci-scripts/conf_files/untested/enb.band7.tm2.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.band7.tm2.25PRB.usrpb210.conf @@ -174,13 +174,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -193,9 +187,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/enb.slave.band13.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/untested/enb.slave.band13.tm1.25PRB.usrpb210.conf index 2a82dee0b9..b92a4d4144 100644 --- a/ci-scripts/conf_files/untested/enb.slave.band13.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/enb.slave.band13.tm1.25PRB.usrpb210.conf @@ -173,31 +173,19 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); + ///X2 enable_x2 = "yes"; t_reloc_prep = 1000; /* unit: millisecond */ tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "CI_RCC_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "CI_RCC_IP_ADDR"; }); NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/ci-scripts/conf_files/untested/episci/episci_nr-ue.nfapi.conf b/ci-scripts/conf_files/untested/episci/episci_nr-ue.nfapi.conf index 58bcca6e3c..fcdce84334 100644 --- a/ci-scripts/conf_files/untested/episci/episci_nr-ue.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/episci_nr-ue.nfapi.conf @@ -21,7 +21,6 @@ MACRLCs = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "ens3"; remote_n_address = "127.0.0.1"; //Proxy IP local_n_address = "127.0.0.1"; local_n_portc = 50600; diff --git a/ci-scripts/conf_files/untested/episci/episci_rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/untested/episci/episci_rcc.band7.tm1.nfapi.conf index 81951e5219..905938d49b 100644 --- a/ci-scripts/conf_files/untested/episci/episci_rcc.band7.tm1.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/episci_rcc.band7.tm1.nfapi.conf @@ -172,13 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.195"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.195"; port = 36412; }); enable_measurement_reports = "yes"; @@ -191,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "ctrl0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.16.0.1"; - ENB_INTERFACE_NAME_FOR_S1U = "ctrl0"; ENB_IPV4_ADDRESS_FOR_S1U = "172.16.0.1"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "172.16.0.1"; @@ -206,7 +198,6 @@ eNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo"; remote_s_address = "127.0.0.1"; local_s_address = "127.0.0.1"; local_s_portc = 50001; diff --git a/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf b/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf index 491201426b..e85d8368bf 100644 --- a/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf @@ -162,32 +162,21 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.195"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.195"; }); + ///X2 enable_x2 = "yes"; t_reloc_prep = 1000; /* unit: millisecond */ tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "172.16.0.1"; # rrc.band7.tm1.nfapi.conf:line 201 - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "172.16.0.1"; }); NETWORK_INTERFACES : { # All of these have to be IP addr of gNB # if in CORE container, make it 172.16.0.X # if not launched in CORE, can set to lo (127.0.0.2) - GNB_INTERFACE_NAME_FOR_S1_MME = "ctrl0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "172.16.0.2"; - GNB_INTERFACE_NAME_FOR_S1U = "ctrl0"; GNB_IPV4_ADDRESS_FOR_S1U = "172.16.0.2"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "172.16.0.2"; @@ -200,7 +189,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50601; // vnf p5 port diff --git a/ci-scripts/conf_files/untested/episci/episci_ue.nfapi.conf b/ci-scripts/conf_files/untested/episci/episci_ue.nfapi.conf index 8f7c8ee68a..53d8edebff 100644 --- a/ci-scripts/conf_files/untested/episci/episci_ue.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/episci_ue.nfapi.conf @@ -13,7 +13,6 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "ens3"; remote_n_address = "127.0.0.1"; //Proxy IP local_n_address = "127.0.0.1"; local_n_portc = 50000; diff --git a/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf b/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf index 38b1cbfa40..8d2d138703 100644 --- a/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf +++ b/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf @@ -161,19 +161,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "ctrl0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.16.0.1"; - GNB_INTERFACE_NAME_FOR_NGU = "ctrl0"; GNB_IPV4_ADDRESS_FOR_NGU = "172.16.0.1"; GNB_PORT_FOR_NGU = 2152; # Spec 2152 }; @@ -184,7 +177,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50601; // vnf p5 port diff --git a/ci-scripts/conf_files/untested/episci/proxy_nr-ue.nfapi.conf b/ci-scripts/conf_files/untested/episci/proxy_nr-ue.nfapi.conf index d3309e1f03..8d6cca014f 100644 --- a/ci-scripts/conf_files/untested/episci/proxy_nr-ue.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/proxy_nr-ue.nfapi.conf @@ -21,7 +21,6 @@ MACRLCs = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "lo:"; remote_n_address = "127.0.0.1"; //Proxy IP local_n_address = "127.0.0.1"; local_n_portc = 50600; diff --git a/ci-scripts/conf_files/untested/episci/proxy_rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/untested/episci/proxy_rcc.band7.tm1.nfapi.conf index 50ece56b23..0f55290a55 100644 --- a/ci-scripts/conf_files/untested/episci/proxy_rcc.band7.tm1.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/proxy_rcc.band7.tm1.nfapi.conf @@ -172,13 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; port = 36412; }); enable_measurement_reports = "no"; @@ -191,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.1"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.1"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1"; @@ -206,7 +198,6 @@ eNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo"; remote_s_address = "127.0.0.1"; local_s_address = "127.0.0.1"; local_s_portc = 50001; diff --git a/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf b/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf index 41be848ef5..3ec768469a 100644 --- a/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf @@ -185,32 +185,21 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.61.3"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.61.3"; }); + ///X2 enable_x2 = "yes"; t_reloc_prep = 1000; /* unit: millisecond */ tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "127.0.0.1"; # rrc.band7.tm1.nfapi.conf:line 201 - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "127.0.0.1"; }); NETWORK_INTERFACES : { # All of these have to be IP addr of gNB # if in CORE container, make it 172.16.0.X # if not launched in CORE, can set to lo (127.0.0.2) - GNB_INTERFACE_NAME_FOR_S1_MME = "lo:"; GNB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2"; - GNB_INTERFACE_NAME_FOR_S1U = "lo:"; GNB_IPV4_ADDRESS_FOR_S1U = "127.0.0.2"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2"; @@ -223,7 +212,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50601; // vnf p5 port diff --git a/ci-scripts/conf_files/untested/episci/proxy_ue.nfapi.conf b/ci-scripts/conf_files/untested/episci/proxy_ue.nfapi.conf index 51c30fb42d..691a681a88 100644 --- a/ci-scripts/conf_files/untested/episci/proxy_ue.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/proxy_ue.nfapi.conf @@ -13,7 +13,6 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "lo"; remote_n_address = "127.0.0.1"; local_n_address = "127.0.0.1"; local_n_portc = 50000; diff --git a/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf index 445ff458c7..f01a93bf4e 100644 --- a/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf @@ -176,19 +176,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.69.131"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.69.131"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.127/24"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.127/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf index ed1294585b..f34ac26a1c 100644 --- a/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf @@ -173,19 +173,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.69.131"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.69.131"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.127/24"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.127/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf index 05b362d2af..58809bbdf9 100644 --- a/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -181,19 +181,11 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); NETWORK_INTERFACES : { - - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index 5ed97c58d5..85f627b37b 100644 --- a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -157,13 +157,7 @@ gNBs = ////////// MME parameters: -# mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; -# ipv6 = "192:168:30::17"; -# port = 36412 ; -# active = "yes"; -# preference = "ipv4"; -# } -# ); +# mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); ///X2 enable_x2 = "yes"; @@ -172,17 +166,11 @@ gNBs = t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf index 361cee72e6..3ec1161d6b 100644 --- a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf @@ -162,13 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); ///X2 enable_x2 = "yes"; @@ -176,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf b/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf index e736a8830f..cbed713ded 100644 --- a/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf @@ -160,19 +160,12 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf b/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf index 319edd2eab..28211685c8 100644 --- a/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf @@ -158,19 +158,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.16.136"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.16.136"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.137/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.137/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/ci-scripts/conf_files/untested/lte-tdd-basic-sim.conf b/ci-scripts/conf_files/untested/lte-tdd-basic-sim.conf index fa017ce63e..86198c06b8 100644 --- a/ci-scripts/conf_files/untested/lte-tdd-basic-sim.conf +++ b/ci-scripts/conf_files/untested/lte-tdd-basic-sim.conf @@ -134,13 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -153,9 +147,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; diff --git a/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf index 669558f69c..7925655519 100644 --- a/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -158,19 +158,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.61.195"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.61.195"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "lo:"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "127.0.0.2"; - GNB_INTERFACE_NAME_FOR_NGU = "lo:"; GNB_IPV4_ADDRESS_FOR_NGU = "127.0.0.2"; GNB_PORT_FOR_NGU = 2152; # Spec 2152 }; @@ -181,7 +174,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50601; // vnf p5 port diff --git a/ci-scripts/conf_files/untested/rcc.band38.tm1.50PRB.multi.rru.conf b/ci-scripts/conf_files/untested/rcc.band38.tm1.50PRB.multi.rru.conf index 6651f380e4..316152527d 100644 --- a/ci-scripts/conf_files/untested/rcc.band38.tm1.50PRB.multi.rru.conf +++ b/ci-scripts/conf_files/untested/rcc.band38.tm1.50PRB.multi.rru.conf @@ -139,19 +139,11 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "enp129s0f0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "enp129s0f0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; #"127.0.0.4/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152\ diff --git a/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf b/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf index 1bcd26b931..2465b96ef1 100644 --- a/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf +++ b/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf @@ -142,13 +142,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.15.130"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.15.130"; port = 36412; }); enable_measurement_reports = "no"; @@ -161,12 +155,7 @@ eNBs = ////////// MCE parameters: - target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mce_m2_ip_address = ({ ipv4 = "127.0.0.7"; }); ///M2 enable_enb_m2 = "yes"; @@ -186,9 +175,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "enp2s0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.10.15/24"; - ENB_INTERFACE_NAME_FOR_S1U = "enp2s0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.10.15/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 @@ -213,12 +200,7 @@ MCEs = ( //M3 enable_mce_m3 = "yes"; - target_mme_m3_ip_address = ( { ipv4 = "127.0.0.18"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mme_m3_ip_address = ({ ipv4 = "127.0.0.18"; }); diff --git a/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf b/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf index e398310a35..ba45e1dec3 100644 --- a/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf +++ b/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf @@ -142,13 +142,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.3"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.3"; port = 36412; }); enable_measurement_reports = "no"; @@ -161,12 +155,7 @@ eNBs = ////////// MCE parameters: - target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mce_m2_ip_address = ({ ipv4 = "127.0.0.7"; }); ///M2 enable_enb_m2 = "yes"; @@ -186,9 +175,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 @@ -213,12 +200,7 @@ MCEs = ( //M3 enable_mce_m3 = "yes"; - target_mme_m3_ip_address = ( { ipv4 = "127.0.0.18"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + target_mme_m3_ip_address = ({ ipv4 = "127.0.0.18"; }); diff --git a/ci-scripts/conf_files/untested/rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/untested/rcc.band7.tm1.nfapi.conf index 6f7a5d2dfd..68ddc4efa4 100644 --- a/ci-scripts/conf_files/untested/rcc.band7.tm1.nfapi.conf +++ b/ci-scripts/conf_files/untested/rcc.band7.tm1.nfapi.conf @@ -172,13 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; port = 36412; }); enable_measurement_reports = "no"; @@ -191,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "ens3"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "ens3"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; @@ -206,7 +198,6 @@ eNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "ens3"; remote_s_address = "CI_UE_IP_ADDR"; local_s_address = "CI_ENB_IP_ADDR"; local_s_portc = 50001; diff --git a/ci-scripts/docker/Dockerfile.cppcheck.xenial b/ci-scripts/docker/Dockerfile.cppcheck.xenial index 0aecc62037..f69d4a8402 100644 --- a/ci-scripts/docker/Dockerfile.cppcheck.xenial +++ b/ci-scripts/docker/Dockerfile.cppcheck.xenial @@ -18,6 +18,7 @@ RUN make WORKDIR /oai-ran RUN mkdir -p cmake_targets/log && \ cppcheck --enable=warning --force --xml --xml-version=2 \ + --inline-suppr \ -i openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c \ --suppressions-list=ci-scripts/cppcheck_suppressions.list \ -I common/utils \ diff --git a/ci-scripts/epc.py b/ci-scripts/epc.py index b2434e196a..c5a35c59a3 100644 --- a/ci-scripts/epc.py +++ b/ci-scripts/epc.py @@ -594,6 +594,8 @@ class EPCManagement(): message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)' else: message = 'No Tracking area update request' + mySSH.run(f'cd {self.SourceCodePath}/logs && zip -r -qq test_logs_CN.zip *.log') + mySSH.copyin(f'{self.SourceCodePath}/logs/test_logs_CN.zip','test_logs_CN.zip') logging.debug(message) elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE): logging.debug('Terminating OAI CN5G on Openshift Cluster') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 2387032e37..03c99d9741 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -376,8 +376,10 @@ def GetParametersFromXML(action): if (string_field is not None): CONTAINERS.ran_checkers['u_retx_th'] = [float(x) for x in string_field.split(',')] - elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest' or action == 'Run_LDPCt1Test': + elif action == 'Run_CUDATest' or action == 'Run_NRulsimTest' or action == 'Run_T2Test': ldpc.runargs = test.findtext('physim_run_args') + ldpc.runsim = test.findtext('physim_run') + ldpc.timethrs = test.findtext('physim_time_threshold') elif action == 'LicenceAndFormattingCheck': pass @@ -579,8 +581,8 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE): if (os.path.isfile(xml_test_file)): try: xmlTree = ET.parse(xml_test_file) - except: - print("Error while parsing file: " + xml_test_file) + except Exception as e: + print(f"Error: {e} while parsing file: {xml_test_file}.") xmlRoot = xmlTree.getroot() HTML.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-' + str(count))) HTML.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='test-tab-' + str(count))) @@ -796,12 +798,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HTML=ldpc.Build_PhySim(HTML,CONST) if ldpc.exitStatus==1: RAN.prematureExit = True - elif action == 'Run_LDPCTest': - HTML=ldpc.Run_LDPCTest(HTML,CONST,id) + elif action == 'Run_CUDATest': + HTML=ldpc.Run_CUDATest(HTML,CONST,id) if ldpc.exitStatus==1: RAN.prematureExit = True - elif action == 'Run_LDPCt1Test': - HTML=ldpc.Run_LDPCt1Test(HTML,CONST,id) + elif action == 'Run_T2Test': + HTML=ldpc.Run_T2Test(HTML,CONST,id) if ldpc.exitStatus==1: RAN.prematureExit = True elif action == 'Run_NRulsimTest': diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index afa6036c7e..031de4b70e 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -264,7 +264,7 @@ class RANManagement(): cmd = cls_cmd.getConnection(self.node) ret = cmd.run(self.command) cmd.close() - logging.debug(f"Custum command : {self.command} on node : {self.node} returnCode : {ret.returncode}") + logging.debug(f"CustomCommand: {self.command} on node: {self.node} - {'OK, command succeeded' if ret.returncode == 0 else f'Error, return code: {ret.returncode}'}") status = 'OK' message = [] if ret.returncode != 0 and not self.command_fail: diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml index 5772cd4eeb..1b6b88147d 100755 --- a/ci-scripts/xml_class_list.yml +++ b/ci-scripts/xml_class_list.yml @@ -2,8 +2,8 @@ - Build_Cluster_Image - Pull_Cluster_Image - Build_PhySim - - Run_LDPCTest - - Run_LDPCt1Test + - Run_CUDATest + - Run_T2Test - Run_NRulsimTest - Build_eNB - WaitEndBuild_eNB diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml index 9f88fb71ef..36b67a70b4 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml @@ -34,7 +34,7 @@ 000013 000001 000014 - 000002 + 000015 020011 020012 030011 @@ -94,6 +94,12 @@ 9 + + Attach_UE + Attach OAI UE (Wait for IP) + rfsim4g_ue + + Ping Ping Traffic-Gen from LTE-UE diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml index 9b6fdabbce..655cbf0d82 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml @@ -28,9 +28,9 @@ 111111 100011 000013 - 000001 - 000014 000002 + 000014 + 000001 020011 020012 030011 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml index d058f9f150..f37812ecb2 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml @@ -34,7 +34,7 @@ 000013 000001 000014 - 000002 + 000015 020011 020012 030011 @@ -94,6 +94,12 @@ 9 + + Attach_UE + Attach OAI UE (Wait for IP) + rfsim4g_ue + + Ping Ping Traffic-Gen from LTE-UE diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml index 280814a888..db157a5138 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml @@ -34,7 +34,7 @@ 000013 000001 000014 - 000002 + 000015 020011 020012 030011 @@ -94,6 +94,12 @@ 9 + + Attach_UE + Attach OAI UE (Wait for IP) + rfsim4g_ue + + Ping Ping Traffic-Gen from LTE-UE diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml index 1a508b772a..941b59a040 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml @@ -30,7 +30,7 @@ 000013 000002 000014 - 000002 + 000001 030011 100011 diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml index 56ab42c323..3dc26454a1 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml @@ -30,7 +30,7 @@ 000013 000002 000014 - 000002 + 000001 030011 100011 diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index fc35442088..6c95796d87 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -31,6 +31,7 @@ 000022 000023 020021 + 030020 030021 030022 100021 @@ -74,10 +75,18 @@ 5 + + Custom_Command + Simulate a DL radio channel with noise (3 dB) + localhost + echo channelmod modify 0 noise_power_dB 3 | nc --send-only 192.168.71.181 8091 + yes + + Iperf - Iperf (DL/20Mbps/UDP)(30 sec) - -u -b 20M -t 30 -R + Iperf (DL/5Mbps/UDP)(30 sec) + -u -b 5M -t 30 -R rfsim5g_ue rfsim5g_ext_dn 5 @@ -86,20 +95,52 @@ Iperf - Iperf (UL/5Mbps/UDP)(30 sec) - -u -b 5M -t 30 + Iperf (UL/3Mbps/UDP)(30 sec) + -u -b 3M -t 30 rfsim5g_ue rfsim5g_ext_dn 5 90 + + Custom_Command + Simulate a disruption of DL radio channel (ploss 55)(5 sec) + localhost + echo channelmod modify 0 ploss 55 | nc -N 192.168.71.181 8091 && sleep 5 + yes + + + + Custom_Command + Get UE sync state (UE ID 0) + localhost + echo ciUE sync_state 0 | nc -N 192.168.71.181 8091 | grep -E UE_NOT_SYNC + yes + + + + Custom_Command + Restoration of the original DL channel conditions (ploss 0)(5 sec) + localhost + echo channelmod modify 0 ploss 0 | nc -N 192.168.71.181 8091 && sleep 5 + yes + + + + Custom_Command + Get UE sync state (UE ID 0) + localhost + echo ciUE sync_state 0 | nc -N 192.168.71.181 8091 | grep -E UE_CONNECTED && sleep 10 + yes + + UndeployGenObject Undeploy all OAI 5G stack yaml_files/5g_f1_rfsimulator - 1,0,0,0 - 1,0,0,0 + 30,30,100,100 + 30,30,100,100 diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_cleanup.xml b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_cleanup.xml new file mode 100644 index 0000000000..eb62cdbdd3 --- /dev/null +++ b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_cleanup.xml @@ -0,0 +1,55 @@ + + + test-cleanup + CleanUp SA 2x2 + trash + + 011111 + 022222 + 033333 + + + + + Detach_UE + Detach UE + up2 + + + + Undeploy_Object + Undeploy gNB + ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz + 0 + 0 + oai-gnb + + + + Clean_Test_Server_Images + Clean Test Images on Test Server + 0 + + + diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml new file mode 100644 index 0000000000..ba6f0dc6fa --- /dev/null +++ b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml @@ -0,0 +1,147 @@ + + + TEST-SA-FR1-N310-2x2-100MHz + 100 MHz TDD SA 2x2 + tasks + 1 + + 100000 + 111111 + 010010 + 040101 + 010001 + 051001 + 071100 + 071101 + 071002 + 010010 + 000001 + 040201 + 200000 + + + + + Pull_Cluster_Image + Pull Images from Cluster + oai-gnb + matix + + + + Custom_Command + Disable Sleep States + matix + sudo cpupower idle-set -D 0 + + + + Custom_Command + Enable Sleep States + matix + sudo cpupower idle-set -E + + + + Attach_UE + Attach UE + up2 + + + + Detach_UE + Detach UE + up2 + + + + Deploy_Object + Deploy gNB (TDD/Band77/100MHz/N310) in a container + ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz + 0 + 0 + + + + IdleSleep + Sleep + 5 + + + + IdleSleep + Sleep + 10 + + + + Ping + Ping: 100pings in 20sec + up2 + -c 100 -i 0.2 %cn_ip% + 1 + 15 + + + + Iperf + iperf (DL/500Mbps/UDP)(30 sec)(single-ue profile) + -u -b 500M -t 30 -R -O 10 -l 9000 + matix-cn5g + up2 + 25 + 50 + + + + Iperf + iperf (UL/40Mbps/UDP)(30 sec)(single-ue profile) + -u -b 40M -t 30 -O 10 + matix-cn5g + up2 + 10 + 80 + + + + Iperf + iperf (BIDIR TCP)(30 sec)(single-ue profile) + -t 30 --bidir + matix-cn5g + up2 + + + + Undeploy_Object + Undeploy gNB + ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz + 0 + 0 + oai-gnb + 10,100,100,100 + 10,100,100,100 + + + + diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_cleanup.xml b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_cleanup.xml new file mode 100644 index 0000000000..3efd2f7be8 --- /dev/null +++ b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_cleanup.xml @@ -0,0 +1,55 @@ + + + test-cleanup + CleanUp SA 2x2 + trash + + 111111 + 222222 + 333333 + + + + + Detach_UE + Detach UE + up2 + + + + Undeploy_Object + Undeploy gNB + ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz + 0 + 0 + oai-gnb + + + + Clean_Test_Server_Images + Clean Test Images on Test Server + 0 + + + diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml new file mode 100644 index 0000000000..8514cea272 --- /dev/null +++ b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml @@ -0,0 +1,147 @@ + + + TEST-SA-FR1-N310-2x2-60MHz + 60 MHz 2x2 TDD SA + tasks + 1 + + 100000 + 111111 + 010010 + 030101 + 010001 + 050001 + 071000 + 071001 + 070002 + 010010 + 000001 + 030201 + 200000 + + + + + Pull_Cluster_Image + Pull Images from Cluster + oai-gnb + matix + + + + Custom_Command + Disable Sleep States + matix + sudo cpupower idle-set -D 0 + + + + Custom_Command + Enable Sleep States + matix + sudo cpupower idle-set -E + + + + Attach_UE + Attach UE + up2 + + + + Detach_UE + Detach UE + up2 + + + + Deploy_Object + Deploy gNB (TDD/Band77/60MHz/N310) in a container + ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz + 0 + 0 + + + + IdleSleep + Sleep + 5 + + + + IdleSleep + Sleep + 10 + + + + Ping + Ping: 100pings in 20sec + up2 + -c 100 -i 0.2 %cn_ip% + 1 + 15 + + + + Iperf + iperf (DL/200Mbps/UDP)(30 sec)(single-ue profile) + -u -b 200M -t 30 -R + matix-cn5g + up2 + 25 + 80 + + + + Iperf + iperf (UL/130Mbps/UDP)(30 sec)(single-ue profile) + -u -b 130M -t 30 + matix-cn5g + up2 + 10 + 70 + + + + Iperf + iperf (BIDIR TCP)(30 sec)(single-ue profile) + -t 30 --bidir + matix-cn5g + up2 + + + + Undeploy_Object + Undeploy gNB + ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz + 0 + 0 + oai-gnb + 10,100,100,100 + 10,100,100,100 + + + + diff --git a/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml b/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml index 592a60c620..190b58ac1b 100644 --- a/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml +++ b/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml @@ -21,8 +21,8 @@ --> - cn5g-start-tab - CN5G-Start + cn5g-stop-tab + CN5G-Stop log-in 000300 diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml index 37cee01994..769128967a 100644 --- a/ci-scripts/xml_files/gnb_usrp_build.xml +++ b/ci-scripts/xml_files/gnb_usrp_build.xml @@ -35,7 +35,7 @@ TesteNB Build_eNB Build gNB (USRP) - --gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda" --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c + --gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda ldpc_t2" --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c True diff --git a/ci-scripts/xml_files/ldpc_gpu_test.xml b/ci-scripts/xml_files/ldpc_gpu_test.xml index 85bdc0bff8..78d147b2fa 100644 --- a/ci-scripts/xml_files/ldpc_gpu_test.xml +++ b/ci-scripts/xml_files/ldpc_gpu_test.xml @@ -30,121 +30,121 @@ - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 3872 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 3872 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 4224 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 4224 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 4576 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 4576 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 4928 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 4928 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 5280 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 5280 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 5632 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 5632 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 6336 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 6336 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 7040 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 7040 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 7744 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 7744 -s10 -n100 -G 1 - Run_LDPCTest + Run_CUDATest Run LDPC Test with CPU -l 8448 -s10 -n100 - Run_LDPCTest + Run_CUDATest Run LDPC Test with GPU -l 8448 -s10 -n100 -G 1 diff --git a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml new file mode 100644 index 0000000000..4c92d9b937 --- /dev/null +++ b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml @@ -0,0 +1,178 @@ + + + + test-t2-offload-dec + Test T2 Offload Decoder + tasks + 1 + + 010111 010112 010121 010122 010131 010132 + 010211 010212 010221 010222 010231 010232 + 010311 010312 010321 010322 010331 010332 + + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer + nr_ulsim + 300 + -n100 -s30 -m5 -r106 -R106 -C10 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer + nr_ulsim + 100 + -n100 -s30 -m5 -r106 -R106 -o -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer + nr_ulsim + 300 + -n100 -s30 -m15 -r106 -R106 -C10 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer + nr_ulsim + 150 + -n100 -s30 -m15 -r106 -R106 -o -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer + nr_ulsim + 250 + -n100 -s30 -m25 -r106 -R106 -C10 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer + nr_ulsim + 250 + -n100 -s30 -m25 -r106 -R106 -o -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer + nr_ulsim + 300 + -n100 -s30 -m5 -r273 -R273 -C10 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer + nr_ulsim + 150 + -n100 -s30 -m5 -r273 -R273 -o -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer + nr_ulsim + 400 + -n100 -s30 -m15 -r273 -R273 -C10 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer + nr_ulsim + 350 + -n100 -s30 -m15 -r273 -R273 -o -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer + nr_ulsim + 400 + -n100 -s30 -m25 -r273 -R273 -C10 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer + nr_ulsim + 550 + -n100 -s30 -m25 -r273 -R273 -o -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers + nr_ulsim + 300 + -n100 -s30 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers + nr_ulsim + 250 + -n100 -s30 -m5 -r273 -R273 -o -W2 -z2 -y2 -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers + nr_ulsim + 600 + -n100 -s30 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers + nr_ulsim + 650 + -n100 -s30 -m15 -r273 -R273 -o -W2 -z2 -y2 -P + + + + Run_T2Test + Run nr_ulsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers + nr_ulsim + 650 + -n100 -s30 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P + + + + Run_T2Test + Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers + nr_ulsim + 1100 + -n100 -s30 -m25 -r273 -R273 -o -W2 -z2 -y2 -P + + + diff --git a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml new file mode 100644 index 0000000000..7f29a7d38a --- /dev/null +++ b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml @@ -0,0 +1,178 @@ + + + + test-t2-offload-enc + Test T2 Offload Encoder + tasks + 1 + + 000111 000112 000121 000122 000131 000132 + 000211 000212 000221 000222 000231 000232 + 000311 000312 000321 000322 000331 000332 + + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer + nr_dlsim + 200 + -n100 -s30 -e5 -b106 -R106 -X8 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer + nr_dlsim + 100 + -n100 -s30 -e5 -b106 -R106 -c -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer + nr_dlsim + 3000 + -n100 -s30 -e15 -b106 -R106 -X8 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer + nr_dlsim + 100 + -n100 -s30 -e15 -b106 -R106 -c -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer + nr_dlsim + 400 + -n100 -s30 -e25 -b106 -R106 -X8 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer + nr_dlsim + 200 + -n100 -s30 -e25 -b106 -R106 -c -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer + nr_dlsim + 300 + -n100 -s30 -e5 -b273 -R273 -X8 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer + nr_dlsim + 150 + -n100 -s30 -e5 -b273 -R273 -c -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer + nr_dlsim + 450 + -n100 -s30 -e15 -b273 -R273 -X8 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer + nr_dlsim + 250 + -n100 -s30 -e15 -b273 -R273 -c -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer + nr_dlsim + 500 + -n100 -s30 -e25 -b273 -R273 -X8 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer + nr_dlsim + 400 + -n100 -s30 -e25 -b273 -R273 -c -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers + nr_dlsim + 350 + -n100 -s30 -e5 -b273 -R273 -X8 -x2 -z2 -y2 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers + nr_dlsim + 200 + -n100 -s30 -e5 -b273 -R273 -c -x2 -z2 -y2 -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers + nr_dlsim + 600 + -n100 -s30 -e15 -b273 -R273 -X8 -x2 -z2 -y2 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers + nr_dlsim + 500 + -n100 -s30 -e15 -b273 -R273 -c -x2 -z2 -y2 -P + + + + Run_T2Test + Run nr_dlsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers + nr_dlsim + 800 + -n100 -s30 -e25 -b273 -R273 -X8 -x2 -z2 -y2 -P + + + + Run_T2Test + Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers + nr_dlsim + 800 + -n100 -s30 -e25 -b273 -R273 -c -x2 -z2 -y2 -P + + + 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 294091c648..70a67346a7 100644 --- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml @@ -108,7 +108,10 @@ services: privileged: true container_name: rfsim5g-oai-du environment: - USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim + --log_config.global_log_options level,nocolor,time + --rfsimulator.options chanmod + --telnetsrv --telnetsrv.listenaddr 192.168.71.171 ASAN_OPTIONS: detect_leaks=0 depends_on: - oai-cu @@ -117,6 +120,7 @@ services: ipv4_address: 192.168.71.171 volumes: - ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf + - ../../conf_files/rfsim_channel_ci.conf:/opt/oai-gnb/etc/rfsim_channel_ci.conf healthcheck: test: /bin/bash -c "pgrep nr-softmodem" interval: 10s @@ -132,6 +136,8 @@ services: -r 106 --numerology 1 -C 3619200000 --uicc0.imsi 208990100001100 --rfsimulator.serveraddr 192.168.71.171 + --rfsimulator.options chanmod + --telnetsrv --telnetsrv.shrmod ciUE --telnetsrv.listenaddr 192.168.71.181 --telnetsrv.listenport 8091 depends_on: - oai-du networks: @@ -139,6 +145,7 @@ services: ipv4_address: 192.168.71.181 volumes: - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf + - ../../conf_files/rfsim_channel_ci.conf:/opt/oai-nr-ue/etc/rfsim_channel_ci.conf healthcheck: test: /bin/bash -c "pgrep nr-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md index 9062044b2c..7fdb1bb8be 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md @@ -56,7 +56,7 @@ file, in the section `oai-nr-ue0`: - ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results ``` -In this section, you need to set the proper values for `local_n_if_name` and `remote_n_address` +In this section, you need to set the proper value `remote_n_address` where the UE configuration (mounted to `/opt/oai-nr-ue/etc/nr-ue.conf`) reads: ```libconfig @@ -64,7 +64,6 @@ MACRLCs = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "eno1"; remote_n_address = "127.0.0.1"; //Proxy IP local_n_address = "127.0.0.1"; ... diff --git a/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml index 3e73e60a27..cc968e8755 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml @@ -187,8 +187,9 @@ services: container_name: rfsim5g-oai-du environment: USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time - --MACRLCs.[0].local_n_address 192.168.73.3 - --MACRLCs.[0].remote_n_address 192.168.72.2 + --MACRLCs.[0].local_n_address 192.168.72.3 + --MACRLCs.[0].remote_n_address oai-cucp + --MACRLCs.[0].local_n_address_f1u 192.168.73.3 ASAN_OPTIONS: detect_leaks=0 depends_on: - oai-cucp @@ -217,8 +218,9 @@ services: --gNBs.[0].gNB_DU_ID 0xe01 --gNBs.[0].nr_cellid 87654321 --gNBs.[0].servingCellConfigCommon.[0].physCellId 1 - --MACRLCs.[0].local_n_address 192.168.74.3 - --MACRLCs.[0].remote_n_address 192.168.72.2 + --MACRLCs.[0].remote_n_address oai-cucp + --MACRLCs.[0].local_n_address 192.168.72.4 + --MACRLCs.[0].local_n_address_f1u 192.168.74.3 ASAN_OPTIONS: detect_leaks=0 depends_on: - oai-cucp @@ -247,8 +249,9 @@ services: --gNBs.[0].gNB_DU_ID 0xe02 --gNBs.[0].nr_cellid 11111111 --gNBs.[0].servingCellConfigCommon.[0].physCellId 2 - --MACRLCs.[0].local_n_address 192.168.76.3 - --MACRLCs.[0].remote_n_address 192.168.72.2 + --MACRLCs.[0].remote_n_address oai-cucp + --MACRLCs.[0].local_n_address 192.168.72.5 + --MACRLCs.[0].local_n_address_f1u 192.168.76.3 ASAN_OPTIONS: detect_leaks=0 depends_on: - oai-cucp diff --git a/ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml b/ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml new file mode 100644 index 0000000000..9be2d550c0 --- /dev/null +++ b/ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml @@ -0,0 +1,16 @@ +services: + oai-gnb: + image: oai-gnb:latest + privileged: true + network_mode: "host" + container_name: oai-gnb + environment: + TZ: Europe/Paris + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time + volumes: + - ../../conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + interval: 10s + timeout: 5s + retries: 5 diff --git a/ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml b/ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml new file mode 100644 index 0000000000..d970d96e33 --- /dev/null +++ b/ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml @@ -0,0 +1,16 @@ +services: + oai-gnb: + image: oai-gnb:latest + privileged: true + network_mode: "host" + container_name: oai-gnb + environment: + TZ: Europe/Paris + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time + volumes: + - ../../conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + interval: 10s + timeout: 5s + retries: 5 diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 81b4f02465..856b39c9fd 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -529,4 +529,16 @@ segmentation fault|assertion|exiting|fatal 3 + + + NR-Sidelink PSBCH test cases. (Test1: SLSS Search), + (Test2: PSBCH TxRx) + nr_psbchsim + -I + -n 10 + test1 test2 + PSBCH test OK + segmentation fault|assertion|exiting|fatal + 3 + diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index c7abef6604..bb61d356f4 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -324,7 +324,7 @@ function main() { -P | --phy_simulators) SIMUS_PHY=1 # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim - TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim" + TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim" echo_info "Will compile dlsim, ulsim, ..." shift;; -s | --check) diff --git a/common/config/config_load_configmodule.c b/common/config/config_load_configmodule.c index dd86aaf42a..76808cf59f 100644 --- a/common/config/config_load_configmodule.c +++ b/common/config/config_load_configmodule.c @@ -395,11 +395,9 @@ void write_parsedcfg(configmodule_interface_t *cfgptr) cfgptr->status->emptyla, cfgptr->status->num_write); } - if (cfgptr != NULL) { - if (cfgptr->write_parsedcfg != NULL) { - printf("[CONFIG] calling config module write_parsedcfg function...\n"); - cfgptr->write_parsedcfg(cfgptr); - } + if (cfgptr->write_parsedcfg != NULL) { + printf("[CONFIG] calling config module write_parsedcfg function...\n"); + cfgptr->write_parsedcfg(cfgptr); } } @@ -407,8 +405,8 @@ void write_parsedcfg(configmodule_interface_t *cfgptr) /* config module could be initialized again after this call */ void end_configmodule(configmodule_interface_t *cfgptr) { - write_parsedcfg(cfgptr); if (cfgptr != NULL) { + write_parsedcfg(cfgptr); if (cfgptr->end != NULL) { printf ("[CONFIG] calling config module end function...\n"); cfgptr->end(cfgptr); @@ -426,13 +424,12 @@ void end_configmodule(configmodule_interface_t *cfgptr) cfgptr->numptrs=0; pthread_mutex_unlock(&cfgptr->memBlocks_mutex); - if ( cfgptr->cfgmode ) + if (cfgptr->cfgmode) free(cfgptr->cfgmode); - if ( cfgptr->argv_info ) - free( cfgptr->argv_info ); + if (cfgptr->argv_info) + free(cfgptr->argv_info); free(cfgptr); - cfgptr=NULL; } } diff --git a/common/utils/T/tracer/textlog.c b/common/utils/T/tracer/textlog.c index 60e5092600..6ead65d87a 100644 --- a/common/utils/T/tracer/textlog.c +++ b/common/utils/T/tracer/textlog.c @@ -122,6 +122,8 @@ int main(int n, char **v) socket = connect_to(ip, port); if (socket == -1) { printf("fatal: connection failed\n"); + free(on_off_name); + free(on_off_action); return 1; } diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index 4ca616537f..9867c879d1 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -934,38 +934,8 @@ void freq2time(uint16_t ofdm_symbol_size, int16_t *freq_signal, int16_t *time_signal) { - switch (ofdm_symbol_size) { - case 128: - idft(IDFT_128, freq_signal, time_signal, 1); - break; - case 256: - idft(IDFT_256, freq_signal, time_signal, 1); - break; - case 512: - idft(IDFT_512, freq_signal, time_signal, 1); - break; - case 1024: - idft(IDFT_1024, freq_signal, time_signal, 1); - break; - case 1536: - idft(IDFT_1536, freq_signal, time_signal, 1); - break; - case 2048: - idft(IDFT_2048, freq_signal, time_signal, 1); - break; - case 4096: - idft(IDFT_4096, freq_signal, time_signal, 1); - break; - case 6144: - idft(IDFT_6144, freq_signal, time_signal, 1); - break; - case 8192: - idft(IDFT_8192, freq_signal, time_signal, 1); - break; - default: - AssertFatal (1 == 0, "Invalid ofdm_symbol_size %i\n", ofdm_symbol_size); - break; - } + const idft_size_idx_t idft_size = get_idft(ofdm_symbol_size); + idft(idft_size, freq_signal, time_signal, 1); } void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates_time, delay_t *delay) diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h index 7b790978a3..fb3abd1247 100644 --- a/common/utils/nr/nr_common.h +++ b/common/utils/nr/nr_common.h @@ -169,12 +169,18 @@ uint32_t nr_timer_elapsed_time(NR_timer_t timer); extern const nr_bandentry_t nr_bandtable[]; -static inline int get_num_dmrs(uint16_t dmrs_mask ) { +static inline int get_num_dmrs(uint16_t dmrs_mask ) +{ int num_dmrs=0; for (int i=0;i<16;i++) num_dmrs+=((dmrs_mask>>i)&1); return(num_dmrs); } +static __attribute__((always_inline)) inline int count_bits_set(uint64_t v) +{ + return __builtin_popcountll(v); +} + uint64_t reverse_bits(uint64_t in, int n_bits); void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out); diff --git a/common/utils/telnetsrv/CMakeLists.txt b/common/utils/telnetsrv/CMakeLists.txt index a7a364d80e..7f2d7a02e5 100644 --- a/common/utils/telnetsrv/CMakeLists.txt +++ b/common/utils/telnetsrv/CMakeLists.txt @@ -59,6 +59,11 @@ add_library(telnetsrv_ci MODULE telnetsrv_ci.c) target_link_libraries(telnetsrv_ci PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_dependencies(telnetsrv telnetsrv_ci) +message(STATUS "Add CI specific telnet functions for nrUE in telnetsrv_ciUE.so") +add_library(telnetsrv_ciUE MODULE telnetsrv_ciUE.c) +target_link_libraries(telnetsrv_ciUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) +add_dependencies(telnetsrv telnetsrv_ciUE) + message(STATUS "Add bearer specific telnet functions in libtelnetsrv_bearer.so") add_library(telnetsrv_bearer MODULE telnetsrv_bearer.c) target_link_libraries(telnetsrv_bearer PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) @@ -70,7 +75,7 @@ target_link_libraries(telnetsrv_rrc PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_dependencies(telnetsrv telnetsrv_rrc) # all libraries should be written to root build dir -set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue telnetsrv_ci telnetsrv_bearer telnetsrv_rrc +set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue telnetsrv_ci telnetsrv_ciUE telnetsrv_bearer telnetsrv_rrc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../../.. ) diff --git a/common/utils/telnetsrv/DOC/telnetusage.md b/common/utils/telnetsrv/DOC/telnetusage.md index 8c69d247a8..b58684aee7 100644 --- a/common/utils/telnetsrv/DOC/telnetusage.md +++ b/common/utils/telnetsrv/DOC/telnetusage.md @@ -8,7 +8,17 @@ By default the embedded telnet server, which is implemented in a shared library, ./build_oai --build-lib telnetsrv ``` -This will create the `libtelnetsrv.so` and `libtelnetsrv_` file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. `` can be "enb", "gnb", "4GUE", "5GUE", or "ci", each library containing functions specific to a given executable. +This will create the `libtelnetsrv.so` and `libtelnetsrv_` file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. `` can be "enb", "gnb", "4GUE", "5GUE", "ci" or "ciUE" each library containing functions specific to a given executable: + +| **Library Name** | **Description** | +|---------------------------|-------------------------------------| +| `libtelnetsrv.so` | General telnet server library | +| `libtelnetsrv_enb` | eNodeB specific functions | +| `libtelnetsrv_gnb` | gNodeB specific functions | +| `libtelnetsrv_4GUE` | 4G NR UE specific functions | +| `libtelnetsrv_5GUE` | 5G NR UE specific functions | +| `libtelnetsrv_ci` | gNB specific CI functions | +| `libtelnetsrv_ciUE` | UE specific CI functions | When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader). diff --git a/common/utils/telnetsrv/telnetsrv_ci.c b/common/utils/telnetsrv/telnetsrv_ci.c index 0f56f72cfd..9f3c03c39a 100644 --- a/common/utils/telnetsrv/telnetsrv_ci.c +++ b/common/utils/telnetsrv/telnetsrv_ci.c @@ -19,6 +19,11 @@ * contact@openairinterface.org */ +/*! \file telnetsrv_ci.c + * \brief Implementation of telnet CI functions for gNB + * \note This file contains telnet-related functions specific to 5G gNB. + */ + #include #include #include diff --git a/common/utils/telnetsrv/telnetsrv_ciUE.c b/common/utils/telnetsrv/telnetsrv_ciUE.c new file mode 100644 index 0000000000..673d904969 --- /dev/null +++ b/common/utils/telnetsrv/telnetsrv_ciUE.c @@ -0,0 +1,91 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +/*! \file telnetsrv_ciUE.c + * \brief Implementation of telnet CI functions for nrUE + * \author Guido Casati + * \date 2024 + * \version 0.1 + * \note This file contains telnet-related functions specific to 5G NR UE (nrUE). + */ + +#include +#include +#include +#include +#include +#include +#include +#include "openair2/LAYER2/NR_MAC_UE/mac_defs.h" +#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h" + +#define TELNETSERVERCODE +#include "telnetsrv.h" + +#define ERROR_MSG_RET(mSG, aRGS...) do { prnt(mSG, ##aRGS); return 1; } while (0) + +/* UE L2 state string */ +const char* NR_UE_L2_STATE_STR[] = { +#define UE_STATE(state) #state, + NR_UE_L2_STATES +#undef UE_STATE +}; + +/** + * Get the synchronization state of a UE. + * + * @param buf User input buffer containing UE ID + * @param debug Debug flag (not used) + * @param prnt Function to print output + * @return 0 on success, error code otherwise + */ +int get_sync_state(char *buf, int debug, telnet_printfunc_t prnt) +{ + int ue_id = -1; + if (!buf) { + ERROR_MSG_RET("no UE ID provided to telnet command\n"); + } else { + ue_id = strtol(buf, NULL, 10); + if (ue_id < 0) + ERROR_MSG_RET("UE ID needs to be positive\n"); + } + /* get sync state */ + int sync_state = nr_ue_get_sync_state(ue_id); + prnt("UE sync state = %s\n", NR_UE_L2_STATE_STR[sync_state]); + return 0; +} + +/* Telnet shell command definitions */ +static telnetshell_cmddef_t cicmds[] = { + {"sync_state", "[UE_ID(int,opt)]", get_sync_state}, + {"", "", NULL}, +}; + +/* Telnet shell variable definitions (if needed) */ +static telnetshell_vardef_t civars[] = { + {"", 0, 0, NULL} +}; + +/* Add CI UE commands */ +void add_ciUE_cmds(void) { + add_telnetcmd("ciUE", civars, cicmds); +} + diff --git a/doc/Aerial_FAPI_Split_Tutorial.md b/doc/Aerial_FAPI_Split_Tutorial.md index 063c733fb7..d04c723ca2 100644 --- a/doc/Aerial_FAPI_Split_Tutorial.md +++ b/doc/Aerial_FAPI_Split_Tutorial.md @@ -228,11 +228,10 @@ Edit the sample OAI gNB configuration file and check following parameters: * `gNBs` section * The PLMN section shall match the one defined in the AMF * `amf_ip_address` shall be the correct AMF IP address in your system - * `GNB_INTERFACE_NAME_FOR_NG_AMF` and `GNB_IPV4_ADDRESS_FOR_NG_AMF` shall match your DU N2 interface name and IP address - * `GNB_INTERFACE_NAME_FOR_NGU` and `GNB_IPV4_ADDRESS_FOR_NGU` shall match your DU N3 interface name and IP address + * `GNB_IPV4_ADDRESS_FOR_NG_AMF` shall match your DU N2 interface IP address + * `GNB_IPV4_ADDRESS_FOR_NGU` shall match your DU N3 interface IP address The default amf_ip_address:ipv4 value is 192.168.70.132, when installing the CN5G following [this tutorial](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/NR_SA_Tutorial_OAI_CN5G.md) -Both 'GNB_INTERFACE_NAME_FOR_NG_AMF' and 'GNB_INTERFACE_NAME_FOR_NGU' need to be set to the network interface name used by the gNB host to connect to the CN5G. Both 'GNB_IPV4_ADDRESS_FOR_NG_AMF' and 'GNB_IPV4_ADDRESS_FOR_NGU' need to be set to the IP address of the NIC referenced previously. diff --git a/doc/F1-design.md b/doc/F1-design.md index 115ad916d2..22781650f1 100644 --- a/doc/F1-design.md +++ b/doc/F1-design.md @@ -124,11 +124,12 @@ gNB, are, in order: (`tr_s_preference`), it is a CU. 3. It is a (monolithic) gNB. -## Local network deployment of F1 +## F1 IP configuration for Local network deployment of F1 -For a local deployment, you should update the following fields. -We assume that the CU will bind on `192.168.70.129` towards the core, -`127.0.0.3` towards the DU, and the DU `127.0.0.4` towards the CU. +The following paragraphs explain the IP configuration for F1 in the OAI config +files on the example of a a local deployment. We assume that the CU will bind +on `192.168.70.129` towards the core, `127.0.0.3` towards the DU, and the DU +`127.0.0.4` towards the CU. In the CU file: - Update the `gNBs.[0].amf_ip_address` and `gNBs.[0].NETWORK_INTERFACES` @@ -138,8 +139,8 @@ In the CU file: - `gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NG_AMF 192.168.70.129` - `gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NGU 192.168.70.132` - Set `gNBs.[0].tr_s_preference` (transport south-bound) to `f1` -- Update the `gNBs.[0].local_s_address` (CU-local south address) for the F1-C - south-bound interface: `127.0.0.3` +- Update the `gNBs.[0].local_s_address` (CU-local south address) for the + F1-C/SCTP and F1-U/GTP/UDP south-bound interfaces: `127.0.0.3` - Note: the `gNBs.[0].remote_s_address` (CU-remote/DU south address) is ignored, but we recommend to put `0.0.0.0` ("any") - Ports should match the ones in the DU config, but for simplicity and @@ -152,13 +153,20 @@ In the CU file: In the DU file: - Set `MACRLCs.[0].tr_n_preference` to `f1` - Update `MACRLCs.[0].local_n_address` (local north-bound address of the DU) to - `127.0.0.4`. This IP address is used to bind the GTP socket (F1-U user plane - traffic). + `127.0.0.4`. This IP address is used to bind the F1-C/SCTP and F1-U/GTP/UDP + socket. +- If you need to bind to different addresses for F1-C and F1-U, there is a + second option `MACRLCs.[0].local_n_address_f1u` which is used to bind + F1-U/GTP/UDP instead; F1-C/SCTP will still bind to the address in + `MACRLCs.[0].local_n_address`. - Update `MACRLCs.[].remote_n_address` (remote north-bound address of the CU) to `127.0.0.3`. This IP address is used as the CU destination IP address for F1AP communication. -Note: all `local_*_if_name` parameters are ignored. +Note: at the DU, you can bind to different interfaces for F1-C and F1-U with +the options `MACRLCs.[0].local_n_address` and +`MACRLCs.[0].local_n_address_f1u`, respectively. Note that this is not foreseen +for the CU; in the case of the CU, please use separate CU-UP and CU-CP. ## Configuration of multiple DUs diff --git a/doc/L2NFAPI_NOS1.md b/doc/L2NFAPI_NOS1.md index b65aaef3ba..1c11dd0d71 100644 --- a/doc/L2NFAPI_NOS1.md +++ b/doc/L2NFAPI_NOS1.md @@ -131,7 +131,6 @@ First verify the nFAPI interface setup on the physical ethernet interface of mac MACRLCs = ( { num_cc = 1; - local_s_if_name = "ens3"; // <-- HERE remote_s_address = "192.168.122.169"; // <-- HERE local_s_address = "192.168.122.31"; // <-- HERE local_s_portc = 50001; @@ -166,18 +165,11 @@ Last, the S1 interface shall be properly set. ``` ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; // replace with 192.168.122.195 - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); // replace with 192.168.122.195 NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "ens3"; // replace with the proper interface name ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31 - ENB_INTERFACE_NAME_FOR_S1U = "ens3"; // replace with the proper interface name ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31 ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31 @@ -201,7 +193,6 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "ens3"; // <- HERE remote_n_address = "192.168.122.31"; // <- HERE local_n_address = "192.168.122.169"; // <- HERE local_n_portc = 50000; diff --git a/doc/L2NFAPI_S1.md b/doc/L2NFAPI_S1.md index a8b287ddf3..ed0ac907db 100644 --- a/doc/L2NFAPI_S1.md +++ b/doc/L2NFAPI_S1.md @@ -136,7 +136,6 @@ First verify the nFAPI interface setup on the physical ethernet interface of mac MACRLCs = ( { num_cc = 1; - local_s_if_name = "ens3"; // <-- HERE remote_s_address = "192.168.122.169"; // <-- HERE local_s_address = "192.168.122.31"; // <-- HERE local_s_portc = 50001; @@ -171,18 +170,11 @@ Last, the S1 interface shall be properly set. ``` ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; // replace with 192.168.122.195 - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); // replace with 192.168.122.195 NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "ens3"; // replace with the proper interface name ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31 - ENB_INTERFACE_NAME_FOR_S1U = "ens3"; // replace with the proper interface name ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31 ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31 @@ -206,7 +198,6 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "ens3"; // <- HERE remote_n_address = "192.168.122.31"; // <- HERE local_n_address = "192.168.122.169"; // <- HERE local_n_portc = 50000; diff --git a/doc/LDPC_T2_OFFLOAD_SETUP.md b/doc/LDPC_T2_OFFLOAD_SETUP.md index d6335ecbaf..10c91fea33 100644 --- a/doc/LDPC_T2_OFFLOAD_SETUP.md +++ b/doc/LDPC_T2_OFFLOAD_SETUP.md @@ -70,13 +70,10 @@ the host machine* # Modifications in the OAI code ## DPDK lib and PMD path specification -Path to the DPDK lib and Accelercomm PMD for operating the card is specified in the `CMakeLists.txt` file, in -*LDPC OFFLOAD library* section. Modify following line based on the location of -`libdpdk.pc` file associated with the target DPDK library on your system. By default, the path is set to `/usr/local/lib/x86_64-linux-gnu/pkgconfig`. +If DPDK library was installed into custom path, you have to point to the right directory with `PKG_CONFIG_PATH`, prior to the OAI build. Sample command to set the DPDK path to `/opt/dpdk-t2/lib64/pkgconfig/`: ``` -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/x86_64-linux-gnu/pkgconfig") +export PKG_CONFIG_PATH=/opt/dpdk-t2/lib64/pkgconfig/:$PKG_CONFIG_PATH ``` - ## T2 card DPDK initialization Following lines in `openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c` file has to be modified based on your system requirements. By default, PCI address of the T2 card is set to 41:00.0 and cores 14 and 15 are assigned to the DPDK. @@ -109,6 +106,7 @@ source oaienv cd cmake_targets ./build_oai -w USRP --ninja --gNB -P --build-lib "ldpc_t2" -C ``` + Shared object file *libldpc_t2.so* is created during the compilation. This object is conditionally compiled. Selection of the library to compile is done using *--build-lib ldpc_t2*. *Required poll mode driver has to be present on the host machine and required DPDK version has to be installed on the host, prior to the build of OAI* diff --git a/doc/ORAN_FHI7.2_Tutorial.md b/doc/ORAN_FHI7.2_Tutorial.md index 1498b07844..cb6657dde7 100644 --- a/doc/ORAN_FHI7.2_Tutorial.md +++ b/doc/ORAN_FHI7.2_Tutorial.md @@ -20,11 +20,11 @@ The hardware on which we have tried this tutorial: -|Hardware (CPU,RAM) |Operating System (kernel) |NIC (Vendor,Driver,Firmware) | -|--------------------------------------------|----------------------------------|-------------------------------------------------| -|Intel(R) Xeon(R) Gold 6354 36-Core, 128GB |RHEL 9.2 (5.14.0-284.18.1.rt14.303.el9_2.x86_64)|Intel X710, i40e, 9.20 0x8000d95e 22.0.9| -|Intel(R) Xeon(R) Gold 6354 36-Core, 128GB |Ubuntu 22.04.3 LTS (5.15.0-1033-realtime)|Intel X710, i40e, 9.00 0x8000cfeb 21.5.9| -|AMD EPYC 9374F 32-Core Processor, 128GB |Ubuntu 22.04.2 LTS (5.15.0-1038-realtime) |Intel E810 ,ice, 4.00 0x8001184e 1.3236.0 | +|Hardware (CPU,RAM) |Operating System (kernel) |NIC (Vendor,Driver,Firmware) | +|-----------------------------------------|------------------------------------------------|-----------------------------------------| +|Intel(R) Xeon(R) Gold 6354 36-Core, 128GB|RHEL 9.2 (5.14.0-284.18.1.rt14.303.el9_2.x86_64)|Intel X710, i40e, 9.20 0x8000d95e 22.0.9 | +|Intel(R) Xeon(R) Gold 6354 36-Core, 128GB|Ubuntu 22.04.3 LTS (5.15.0-1033-realtime) |Intel X710, i40e, 9.00 0x8000cfeb 21.5.9 | +|AMD EPYC 9374F 32-Core Processor, 128GB |Ubuntu 22.04.2 LTS (5.15.0-1038-realtime) |Intel E810 ,ice, 4.00 0x8001184e 1.3236.0| **NOTE**: These are not minimum hardware requirements. This is the configuration of our servers. The NIC card should support hardware PTP time stamping. @@ -37,6 +37,8 @@ NICs we have tested so far: |E810-C |4.20 0x8001784e 22.0.9 | |Intel XXV710 |6.02 0x80003888 | +**Note**: With AMD servers/desktop machines with PCIe 5.0 we have only used E810 cards. + PTP enabled switches and grandmaster clock we have in are lab: |Vendor |Software Version| @@ -45,8 +47,7 @@ PTP enabled switches and grandmaster clock we have in are lab: |Fibrolan Falcon-RX/812/G|8.0.25.4 | |Qulsar Qg2 (Grandmaster)|12.1.27 | -**S-Plane synchronization is mandatory.** S-plane support is done via `ptp4l` -and `phc2sys`. +**S-Plane synchronization is mandatory.** S-plane support is done via `ptp4l` and `phc2sys`. Make sure your version matches. | Software | Software Version | |-----------|------------------| @@ -57,12 +58,12 @@ We have only verified LLS-C3 configuration in our lab, i.e. using an external grandmaster, a switch as a boundary clock, and the gNB/DU and RU. We haven't tested any RU without S-plane. Radio units we are testing/integrating: -|Vendor |Software Version | -|-----------------|-----------------| -|VVDN LPRU |03-v3.0.4 | -|LiteON RU |01.00.08/02.00.03| -|Benetel 650 |v0.8.1 | -|Benetel 550 CAT-A|v0.8.1 | +|Vendor |Software Version | +|-----------------|----------------------| +|VVDN LPRU |03-v3.0.5 | +|LiteON RU |01.00.08/02.00.03 | +|Benetel 650 |RAN650-1v1.0.4-dda1bf5| +|Benetel 550 CAT-A|RAN550-1v1.0.4-605a25a| Tested libxran releases: @@ -70,7 +71,7 @@ Tested libxran releases: |-----------------------------------------| | `oran_e_maintenance_release_v1.0` | -**Note**: the libxran driver of OAI identifies the above version as "5.1.0" (E is fifth letter, then 1.0). +**Note**: The libxran driver of OAI identifies the above version as "5.1.0" (E is fifth letter, then 1.0). ## Configure your server @@ -114,7 +115,7 @@ Modifying the `linux` command line usually requires to edit string `GRUB_CMDLINE * Set parameters `isolcpus`, `nohz_full` and `rcu_nocbs` with the list of CPUs to isolate for XRAN. * Set parameter `kthread_cpus` with the list of CPUs to isolate for kernel. -Set the `tuned` profile to `realtime`. If the `tuned-adm` command is not installed then you have to install it. When choosing this profile you have to mention the isolated cpus in `/etc/tuned/realtime-variables.conf`. By default this profile adds `skew_tick=1 isolcpus=managed_irq,domain, intel_pstate=disable nosoftlockup tsc=nowatchdog` in the boot command. **Make sure you don't add them while changing `/etc/default/grub`**. +Set the `tuned` profile to `realtime`. If the `tuned-adm` command is not installed then you have to install it. When choosing this profile you have to mention the isolated cpus in `/etc/tuned/realtime-variables.conf`. By default this profile adds `skew_tick=1 isolcpus=managed_irq,domain, intel_pstate=disable nosoftlockup` in the boot command. **Make sure you don't add them while changing `/etc/default/grub`**. ```bash tuned-adm profile realtime @@ -133,7 +134,7 @@ NUMA: ``` ```bash -isolcpus=0-15 nohz_full=0-15 rcu_nocbs=0-15 kthread_cpus=16-31 rcu_nocb_poll nosoftlockup default_hugepagesz=1GB hugepagesz=1G hugepages=20 amd_iommu=on iommu=pt mitigations=off skew_tick=1 selinux=0 enforcing=0 tsc=nowatchdog nmi_watchdog=0 softlockup_panic=0 audit=0 vt.handoff=7 +isolcpus=0-15 nohz_full=0-15 rcu_nocbs=0-15 kthread_cpus=16-31 rcu_nocb_poll nosoftlockup default_hugepagesz=1GB hugepagesz=1G hugepages=20 amd_iommu=on iommu=pt mitigations=off skew_tick=1 selinux=0 enforcing=0 tsc=reliable nmi_watchdog=0 softlockup_panic=0 audit=0 vt.handoff=7 ``` Example taken for AMD EPYC 9374F 32-Core Processor @@ -150,7 +151,7 @@ NUMA: ``` ```bash -mitigations=off usbcore.autosuspend=-1 intel_iommu=on intel_iommu=pt selinux=0 enforcing=0 nmi_watchdog=0 softlockup_panic=0 audit=0 skew_tick=1 isolcpus=managed_irq,domain,0,2,4,6,8,10,12,14,16 nohz_full=0,2,4,6,8,10,12,14,16 rcu_nocbs=0,2,4,6,8,10,12,14,16 rcu_nocb_poll intel_pstate=disable nosoftlockup tsc=nowatchdog cgroup_disable=memory mce=off hugepagesz=1G hugepages=40 hugepagesz=2M hugepages=0 default_hugepagesz=1G isolcpus=managed_irq,domain,0,2,4,6,8,10,12,14 kthread_cpus=18-35 intel_pstate=disable nosoftlockup tsc=reliable +mitigations=off usbcore.autosuspend=-1 intel_iommu=on intel_iommu=pt selinux=0 enforcing=0 nmi_watchdog=0 softlockup_panic=0 audit=0 skew_tick=1 isolcpus=managed_irq,domain,0,2,4,6,8,10,12,14,16 nohz_full=0,2,4,6,8,10,12,14,16 rcu_nocbs=0,2,4,6,8,10,12,14,16 rcu_nocb_poll intel_pstate=disable nosoftlockup cgroup_disable=memory mce=off hugepagesz=1G hugepages=40 hugepagesz=2M hugepages=0 default_hugepagesz=1G isolcpus=managed_irq,domain,0,2,4,6,8,10,12,14 kthread_cpus=18-35 intel_pstate=disable nosoftlockup tsc=reliable ``` Example taken for Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz @@ -202,7 +203,8 @@ summary_interval 0 network_transport L2 hybrid_e2e 0 ``` -Probably you need to increase `tx_timestamp_timeout` to 50 or 100 for Intel E-810. You will see that in the logs of ptp. + +You need to increase `tx_timestamp_timeout` to 50 or 100 for Intel E-810. You will see that in the logs of ptp. Create the configuration file for ptp4l (`/etc/sysconfig/ptp4l`) @@ -269,15 +271,15 @@ timedatectl set-ntp false ## DPDK (Data Plane Development Kit) -Download DPDK version 20.11.7. +Download DPDK version 20.11.9. ```bash # on debian -sudo apt install wget xz-utils +sudo apt install wget xz-utils libnuma-dev # on Fedora/RHEL -sudo dnf install wget xz +sudo dnf install wget xz numactl-devel cd -wget http://fast.dpdk.org/rel/dpdk-20.11.7.tar.xz +wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz ``` ### DPDK Compilation and Installation @@ -288,7 +290,7 @@ wget http://fast.dpdk.org/rel/dpdk-20.11.7.tar.xz sudo apt install meson # on Fedora/RHEL sudo dnf install meson -tar xvf dpdk-20.11.7.tar.xz && cd dpdk-stable-20.11.7 +tar xvf dpdk-20.11.9.tar.xz && cd dpdk-stable-20.11.9 meson build ninja -C build @@ -354,7 +356,7 @@ pkg-config --libs libdpdk --static Go back to the version folder you used to build and install ``` -cd ~/dpdk-stable-20.11.7 +cd ~/dpdk-stable-20.11.9 sudo ninja deinstall -C build ``` @@ -392,7 +394,7 @@ environment variables `RTE_SDK` for the path to the source tree of DPDK, and ```bash cd ~/phy/fhi_lib/lib make clean -RTE_SDK=~/dpdk-stable-20.11.7/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 +RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 ... [AR] build/libxran.so ./build/libxran.so @@ -413,11 +415,8 @@ so now, too. ```bash # You should have already cloned above cd ~/openairinterface5g/cmake_targets -# on debian -sudo apt install -y libnuma-dev -# on RHEL -sudo dnf install -y numactl-devel -export PKG_CONFIG_PATH=/opt/dpdk/lib64/pkgconfig/ +# if you installed DPDK in a custom path as described above +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig/ ./build_oai -I # if you never installed OAI, use this command once before the next line ./build_oai --gNB --ninja -t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=$HOME/phy/fhi_lib/lib ``` @@ -462,16 +461,148 @@ ninja nr-softmodem oran_fhlib_5g params_libconfig # Configuration +RU and DU configurations have a circular dependency: you have to configure DU MAC address in the RU configuration and the RU MAC address, VLAN and Timing advance parameters in the DU configuration. + **Note**: You may run OAI with O-RAN 7.2 Fronthaul without a RU attached (e.g. for benchmarking). -In such case, skip RU configuration and go through Network Interfaces, DPDK VFs and OAI configuration by using arbitrary values for RU MAC addresses and VLAN tags. +In such case, skip RU configuration and only configure Network Interfaces, DPDK VFs and OAI configuration by using arbitrary values for RU MAC addresses and VLAN tags. ## Configure the RU -Contact the RU vendor to get the configuration manual, and configure the RU -appropriately. You can orient on the OAI configuration files mentioned further -below. +Contact the RU vendor and get the configuration manual to understand the below commands. The below configuration only corresponds to the RU firmware version indicated at the start of this document. If your firmware version does not correspond to the indicated version, then please don't try these commands. -We are evaluating if we can share RU configuration steps. +**NOTE**: Please understand all the changes you are doing at the RU, especially if you are manipulating anything related to output power. + +### Benetel 650 + +- **Valid only for version RAN650-1v1.0.4-dda1bf5** +- TDD pattern `DDDDDDDSUU`, 5ms +- Bandwidth 100MHz +- MTU 9216 (this is the maximum we can configure on our switch) +- 4TX4R +- The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf) corresponds to below RU configuration. + +After switching on the radio or rebooting, wait for the radio bring up to complete, which you can follow using `tail -f /tmp/logs/radio_status`. Once you will see `[INFO] Radio bringup complete`, you can configure the RU via editing `/etc/ru_config.cfg` + +```bash +cat /etc/ru_config.cfg + +mimo_mode=1_2_3_4_4x4 +downlink_scaling=0 +prach_format=short +compression=static_compressed +lf_prach_compression_enable=true +cplane_per_symbol_workaround=disabled +cuplane_dl_coupling_sectionID=disabled +flexran_prach_workaround=disabled +dl_ul_tuning_special_slot=0xfd00000 +``` + +### Benetel 550 + + +- **Valid only for version RAN550-1v1.0.4-605a25a** +- TDD pattern `DDDDDDDSUU`, 5ms +- Bandwidth 100MHz +- 4TX4R +- The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf) corresponds to below RU configuration. + +After switching on the radio or rebooting, wait for the radio bring up to complete, which you can follow using `tail -f /tmp/logs/radio_status`. Once you will see `[INFO] Radio bringup complete`, you can configure the RU via editing `/etc/ru_config.cfg` + +```bash +cat /etc/ru_config.cfg + +mimo_mode=1_2_3_4_4x4 +downlink_scaling=0 +prach_format=short +compression=static_compressed +lf_prach_compression_enable=true +cplane_per_symbol_workaround=disabled +cuplane_dl_coupling_sectionID=disabled +flexran_prach_workaround=disabled +dl_tuning_special_slot=0x13b6 +``` + +### LiteON + +- TDD pattern `DDDSU`, 2.5ms +- Bandwidth 100MHz +- Default MTU is 1500 + +SSH to the unit as user `user`. Write `enable` in the terminal to enter the configuration console; the password should be in the user guide. Use the command `show oru-status` to check the RU status. The output should be similar to: + +```bash +# show oru-status +Sync State : SYNCHRONIZED +RF State : Ready +DPD : Ready +``` + +Once the RU is PTP synced, and RF state and DPD are `Ready`, write `configure` in the terminal to set: + +- Center frequency +- Bandwidth +- Compression Bitwidth +- TX/RX attenuation + +To configure 4TX and 4RX antennas, you have to repeat the below steps after every reboot, so don't restart the RU after entering below commands: + +```bash +devmem 0x80001014 32 0x00050004 +devmem 0x80001018 32 0x00070006 +devmem 0x8000201C 32 0x00000001 +``` + +If you want to set MTU size to 9000 then use the below command: + +```bash +devmem 0x8000200C 32 0x00000001 +``` + +### VVDN LPRU + +- TDD pattern `DDDSU`, 2.5ms +- Bandwidth 100MHz +- MTU 9216 (this is the maximum we can configure on our switch) +- The OAI configuration file [`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf) corresponds to below RU configuration. + +Check in the RU user manual how to configure the center frequency. There are multiple ways to do it. We set the center frequency by editing `sysrepocfg` database. You can use `sysrepocfg --edit=vi -d running` to do the same. You can edit the `startup` database to make the center frequency change persistent. + +To make any change in the RU, always wait for it to be PTP synced. You can check the sync status via `tail -f /var/log/synctimingptp2.log`. + +To set the RU for 4TX and 4RX antennas with 9 bit compression, you need to create this XML file and apply it. + +Login to the ru and create this file as `4x4-config.xml`. + +```xml + + YOUR-DU-MAC-ADDR + YOUR-RU-VLAN + 1 + 9 + 1 + 9 + 273 + 4 + 5 + 6 + 7 + 0 + 1 + 2 + 3 + +``` +Execute the below commands on every restart + +```bash +xml_parser 4x4-config.xml +## To enable prach compression +mw.l a0010024 1919 +## This will show the current configuration +/etc/scripts/lpru_configuration.sh +## Edit the sysrepo to ACTIVATE the carrier when you want to use the RU +sysrepocfg --edit=vi -d running +``` ## Configure Network Interfaces and DPDK VFs @@ -489,9 +620,11 @@ In the following, we will use these short hands: - `vlan`: VLAN tags as defined in the RU configuration - `mtu`: the MTU as specified by the RU vendor, and supported by the NIC - `du-c-plane-mac-addr`: DU C plane MAC address -- `lspci-address-c-plane-vf`: PCI bus address of the VF for C plane +- `pci-address-c-plane-vf`: PCI bus address of the VF for C plane - `du-u-plane-mac-addr`: DU U plane MAC address -- `lspci-address-u-plane-vf`: PCI bus address of the VF for U plane +- `pci-address-u-plane-vf`: PCI bus address of the VF for U plane + +In the configuration file, in option `fhi_72.dpdk_devices`, the first PCI address is for C-plane and the second for U-plane. For both the MAC addresses, you might use the MAC addresses which are pre-configured in the RUs (typically `00:11:22:33:44:66`, but that is not @@ -570,17 +703,17 @@ Now, unbind any pre-existing DPDK devices, load the "Virtual Function I/O" driver `vfio_pci`, and bind DPDK to these devices: ``` -sudo /usr/local/bin/dpdk-devbind.py --unbind -sudo /usr/local/bin/dpdk-devbind.py --unbind +sudo /usr/local/bin/dpdk-devbind.py --unbind +sudo /usr/local/bin/dpdk-devbind.py --unbind sudo modprobe vfio_pci -sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci -sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci +sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci +sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci ``` We recommand to put the above commands into a script file to quickly repeat them.
-Example script for Benetel 650 with Intel X710 on host +Example script for Benetel 550-A/650 with Intel X710 on host ```console set -x @@ -589,11 +722,12 @@ sudo ethtool -G eno12409 rx 4096 sudo ethtool -G eno12409 tx 4096 sudo ifconfig eno12409 mtu 9216 +sudo modprobe -r iavf sudo modprobe iavf sudo sh -c 'echo 0 > /sys/class/net/eno12409/device/sriov_numvfs' sudo sh -c 'echo 2 > /sys/class/net/eno12409/device/sriov_numvfs' -sudo ip link set eno12409 vf 0 mac 00:11:22:33:44:67 vlan 3 qos 0 spoofchk off mtu 9216 -sudo ip link set eno12409 vf 1 mac 00:11:22:33:44:66 vlan 3 qos 0 spoofchk off mtu 9216 +sudo ip link set eno12409 vf 0 mac 00:11:22:33:44:66 vlan 3 qos 0 spoofchk off mtu 9216 +sudo ip link set eno12409 vf 1 mac 00:11:22:33:44:67 vlan 3 qos 0 spoofchk off mtu 9216 sudo /usr/local/bin/dpdk-devbind.py --unbind 31:06.0 sudo /usr/local/bin/dpdk-devbind.py --unbind 31:06.1 @@ -604,13 +738,14 @@ sudo /usr/local/bin/dpdk-devbind.py --bind vfio-pci 31:06.1
+ ## Configure OAI gNB **Beware in the following section to let in the range of isolated cores the parameters that should be (i.e. `L1s.L1_rx_thread_core`, `L1s.L1_tx_thread_core`, `RUs.ru_thread_core`, `fhi_72.io_core` and `fhi_72.worker_cores`)** Sample configuration files for OAI gNB, specific to the manufacturer of the radio unit, are available at: 1. LITE-ON RU: [`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf) (band n78, 273 PRBs, 3.5GHz center freq, 4x4 antenna configuration with 9 bit I/Q samples (compressed) for PUSCH/PDSCH/PRACH, 2-layer DL MIMO, UL SISO) -2. Benetel 650 RU: [`gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf) (band n78, 273 PRBs, 3.5GHz center freq, 4x2 antenna configuration with 9 bit I/Q samples (compressed) for PUSCH/PDSCH/PRACH, 2-layer DL MIMO, UL SISO) +2. Benetel 650 RU: [`gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf) (band n78, 273 PRBs, 3.5GHz center freq, 4x2 antenna configuration with 9 bit I/Q samples (compressed) for PUSCH/PDSCH/PRACH, 2-layer DL MIMO, UL SISO) 3. VVDN RU: [`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf) (band n77, 273 PRBs, 4.0GHz center freq, 4x4 antenna configuration with 9 bit I/Q samples (compressed) for PUSCH/PDSCH/PRACH, 2-layer DL MIMO, UL SISO) Edit the sample OAI gNB configuration file and check following parameters: @@ -618,8 +753,8 @@ Edit the sample OAI gNB configuration file and check following parameters: * `gNBs` section * The PLMN section shall match the one defined in the AMF * `amf_ip_address` shall be the correct AMF IP address in your system - * `GNB_INTERFACE_NAME_FOR_NG_AMF` and `GNB_IPV4_ADDRESS_FOR_NG_AMF` shall match your DU N2 interface name and IP address - * `GNB_INTERFACE_NAME_FOR_NGU` and `GNB_IPV4_ADDRESS_FOR_NGU` shall match your DU N3 interface name and IP address + * `GNB_IPV4_ADDRESS_FOR_NG_AMF` shall match your gNB N2 interface IP address + * `GNB_IPV4_ADDRESS_FOR_NGU` shall match your gNB N3 interface IP address * `prach_ConfigurationIndex` * `prach_msg1_FrequencyStart` * Adjust the frequency, bandwidth and SSB position @@ -753,3 +888,21 @@ In this case, you should reverify that `ptp4l` and `phc2sys` are working, e.g., do not do any jumps (during the last hour). While an occasional jump is not necessarily problematic for the gNB, many such messages mean that the system is not working, and UEs might not be able to attach or reach good performance. + + +# Contact in case of questions + +You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList). + +Your email should contain below information: + +- A clear subject in your email. +- For all the queries there should be [Query\] in the subject of the email and for problems there should be [Problem\]. +- In case of a problem, add a small description. +- Do not share any photos unless you want to share a diagram. +- OAI gNB/DU/CU/CU-CP/CU-UP configuration file in `.conf` format only. +- Logs of OAI gNB/DU/CU/CU-CP/CU-UP in `.log` or `.txt` format only. +- RU Vendor and Version. +- In case your question is related to performance, include a small description of the machine (CPU, RAM and networking card) and diagram of your testing environment. +- If you have any issues related to PTP or synchronization, then first check the section "Debugging PTP issues". Then share your problem with PTP version you are using, switch details and master clock. +- Known/open issues are present on [GitLab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues), so keep checking. diff --git a/doc/RUNMODEM.md b/doc/RUNMODEM.md index d6f504af1b..a85f0d9b0c 100644 --- a/doc/RUNMODEM.md +++ b/doc/RUNMODEM.md @@ -102,10 +102,10 @@ Command line parameters for UE in `--sa` mode: - `--band` : NR band number (default value 78) - `--ssb` : SSB start subcarrier (default value 516) -To simplify the configuration for the user testing OAI UE with OAI gNB, the latter prints the following LOG that guides the user to correctly set the UE command line parameters. +To simplify the configuration for the user testing OAI UE with OAI gNB, the latter prints the following LOG that guides the user to correctly set some of the UE command line parameters. ``` -[PHY] Command line parameters for the UE: -C 3319680000 -r 106 --numerology 1 --band 78 --ssb 516 +[PHY] Command line parameters for the UE: -C 3319680000 -r 106 --numerology 1 --ssb 516 ``` You can run this, using USRPs, on two separate machines: diff --git a/doc/TESTING_GNB_W_COTS_UE.md b/doc/TESTING_GNB_W_COTS_UE.md index a152d54075..be53cb371c 100644 --- a/doc/TESTING_GNB_W_COTS_UE.md +++ b/doc/TESTING_GNB_W_COTS_UE.md @@ -107,12 +107,7 @@ whether the clock is internal or external is defined in the configuration files - look for MME IP address, and update the **ipv4 field** with the IP address of the **EPC** server ``` ////////// MME parameters: - mme_ip_address = ( { ipv4 = "**YOUR_EPC_IP_ADDR**"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "**YOUR_EPC_IP_ADDR**"; }); ``` @@ -120,9 +115,7 @@ whether the clock is internal or external is defined in the configuration files ``` NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "**YOUR_ENB_IP_ADDR**"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "**YOUR_ENB_IP_ADDR**"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "**YOUR_ENB_IP_ADDR**"; @@ -135,12 +128,7 @@ whether the clock is internal or external is defined in the configuration files - look for MME IP address, and update the **ipv4 field** with the IP address of the **EPC** server ``` ////////// MME parameters: - mme_ip_address = ( { ipv4 = "**YOUR_EPC_IP_ADDR**"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "**YOUR_EPC_IP_ADDR**"; }); ``` - look for X2 IP address, and update the **4 fields** with the IP address of the **eNB** server / **gNB** server as below (notice : even if -in principle- S1 MME is not required for gNB setting) ``` @@ -149,19 +137,12 @@ whether the clock is internal or external is defined in the configuration files enable_x2 = "yes"; t_reloc_prep = 1000; /* unit: millisecond */ tx2_reloc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "**YOUR_ENB_IP_ADDR**"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "**YOUR_ENB_IP_ADDR**"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "**YOUR_GNB_IP_ADDR**"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "**YOUR_GNB_IP_ADDR**"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "**YOUR_GNB_IP_ADDR**"; diff --git a/doc/testing_gnb_w_cots_ue_resources/enb.conf b/doc/testing_gnb_w_cots_ue_resources/enb.conf index 027b6f2499..a2bebf9c33 100755 --- a/doc/testing_gnb_w_cots_ue_resources/enb.conf +++ b/doc/testing_gnb_w_cots_ue_resources/enb.conf @@ -176,12 +176,7 @@ eNBs = enable_measurement_reports = "yes"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -192,10 +187,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.199/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth1"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.199/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/doc/testing_gnb_w_cots_ue_resources/gnb.conf b/doc/testing_gnb_w_cots_ue_resources/gnb.conf index 206e1b4f02..3d2a6ee9f7 100755 --- a/doc/testing_gnb_w_cots_ue_resources/gnb.conf +++ b/doc/testing_gnb_w_cots_ue_resources/gnb.conf @@ -162,12 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -175,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/docker/Dockerfile.nrUE.ubuntu20 b/docker/Dockerfile.nrUE.ubuntu20 index e6f8d45e53..dfbd5f93e6 100644 --- a/docker/Dockerfile.nrUE.ubuntu20 +++ b/docker/Dockerfile.nrUE.ubuntu20 @@ -90,6 +90,7 @@ COPY --from=nr-ue-build \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/libldpc*.so \ /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ + /oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ciUE.so \ /oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \ /usr/local/lib/ diff --git a/docker/Dockerfile.phySim.rhel9 b/docker/Dockerfile.phySim.rhel9 index 9935d61979..a5a4863a64 100644 --- a/docker/Dockerfile.phySim.rhel9 +++ b/docker/Dockerfile.phySim.rhel9 @@ -69,6 +69,7 @@ COPY --from=phy-sim-build \ /oai-ran/cmake_targets/ran_build/build/ldpctest \ /oai-ran/cmake_targets/ran_build/build/nr_dlschsim \ /oai-ran/cmake_targets/ran_build/build/nr_pbchsim \ + /oai-ran/cmake_targets/ran_build/build/nr_psbchsim \ /oai-ran/cmake_targets/ran_build/build/nr_pucchsim \ /oai-ran/cmake_targets/ran_build/build/nr_ulsim \ /oai-ran/cmake_targets/ran_build/build/smallblocktest \ diff --git a/executables/create_tasks_ue.c b/executables/create_tasks_ue.c index 728e4546b5..4cffef909d 100644 --- a/executables/create_tasks_ue.c +++ b/executables/create_tasks_ue.c @@ -34,7 +34,8 @@ #include "RRC/LTE/rrc_defs.h" # include "enb_app.h" -int create_tasks_ue(uint32_t ue_nb) { +int create_tasks_ue(uint32_t ue_nb) +{ LOG_D(ENB_APP, "%s(ue_nb:%d)\n", __FUNCTION__, ue_nb); itti_wait_ready(1); @@ -50,6 +51,7 @@ int create_tasks_ue(uint32_t ue_nb) { ittiTask_parms_t parms = {users, NULL}; if (itti_create_task(TASK_NAS_UE, nas_ue_task, &parms) < 0) { LOG_E(NAS, "Create task for NAS UE failed\n"); + free(users); return -1; } } diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 143f105847..1fa3478d75 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -293,8 +293,7 @@ static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size output += print_meas_log(&gNB->phy_proc_tx, "L1 Tx processing", NULL, NULL, output, end - output); output += print_meas_log(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL, output, end - output); output += print_meas_log(&gNB->dlsch_scrambling_stats, "DLSCH scrambling", NULL, NULL, output, end-output); - output += print_meas_log(&gNB->dlsch_modulation_stats, "DLSCH modulation", NULL, NULL, output, end-output); - output += print_meas_log(&gNB->dlsch_layer_mapping_stats, "DLSCH layer mapping", NULL, NULL, output,end-output); + output += print_meas_log(&gNB->dlsch_modulation_stats, "DLSCH modulation", NULL, NULL, output, end - output); output += print_meas_log(&gNB->dlsch_resource_mapping_stats, "DLSCH resource mapping", NULL, NULL, output,end-output); output += print_meas_log(&gNB->dlsch_precoding_stats, "DLSCH precoding", NULL, NULL, output,end-output); output += print_meas_log(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL, output, end - output); @@ -347,7 +346,6 @@ void *nrL1_stats_thread(void *param) { reset_meas(&gNB->schedule_response_stats); reset_meas(&gNB->dlsch_scrambling_stats); reset_meas(&gNB->dlsch_modulation_stats); - reset_meas(&gNB->dlsch_layer_mapping_stats); reset_meas(&gNB->dlsch_resource_mapping_stats); reset_meas(&gNB->dlsch_precoding_stats); while (!oai_exit) { diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 1a93df1657..a286347e37 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -365,15 +365,6 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf sprintf(aprefix,"%s.[%i].%s",GNB_CONFIG_STRING_GNB_LIST,0,GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); config_get(cfg, NETParams, sizeofArray(NETParams), aprefix); - for(int i = GNB_INTERFACE_NAME_FOR_NG_AMF_IDX; i <= GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX; i++) { - if( NETParams[i].strptr == NULL) { - LOG_E(NGAP, "No AMF configuration in the file.\n"); - exit(1); - } else { - LOG_D(NGAP, "Configuration in the file: %s.\n",*NETParams[i].strptr); - } - } - if (gnb_nb > 0) { if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) { LOG_E(NGAP, "Create task for NGAP failed\n"); @@ -592,7 +583,7 @@ static void initialize_agent(ngran_node_t node_type, e2_agent_args_t oai_args) nb_id = rrc->node_id; } else if (node_type == ngran_gNB_DU) { const gNB_MAC_INST* mac = RC.nrmac[0]; - AssertFatal(mac != NULL, "MAC not initialized\n"); + AssertFatal(mac, "MAC not initialized\n"); cu_du_id = mac->f1_config.gnb_id; nb_id = mac->f1_config.setup_req->gNB_DU_id; } else if (node_type == ngran_gNB_CU || node_type == ngran_gNB_CUCP) { diff --git a/nfapi/oai_integration/aerial/fapi_vnf_p7.c b/nfapi/oai_integration/aerial/fapi_vnf_p7.c index f2046aa456..1d85113956 100644 --- a/nfapi/oai_integration/aerial/fapi_vnf_p7.c +++ b/nfapi/oai_integration/aerial/fapi_vnf_p7.c @@ -423,7 +423,7 @@ int aerial_phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { if (NFAPI_MODE == NFAPI_MODE_AERIAL) { nfapi_nr_uci_indication_t *uci_ind = CALLOC(1, sizeof(*uci_ind)); - AssertFatal(uci_ind != NULL, "Memory not allocated for uci_ind in phy_nr_uci_indication."); + AssertFatal(uci_ind, "Memory not allocated for uci_ind in phy_nr_uci_indication."); *uci_ind = *ind; uci_ind->uci_list = CALLOC(NFAPI_NR_UCI_IND_MAX_PDU, sizeof(nfapi_nr_uci_t)); @@ -997,6 +997,11 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, nfapi_p7_codec_config_t *config, uint32_t *data_len) { + if (pMessageBuf == NULL || pPackedBuf == NULL) { + NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n"); + return -1; + } + nfapi_p7_message_header_t *pMessageHeader = pMessageBuf; uint8_t *end = pPackedBuf + packedBufLen; uint8_t *data_end = pDataBuf + dataBufLen; @@ -1009,11 +1014,6 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, uint8_t *pPackedDataField = &pDataPackedMessage[0]; uint8_t *pPackedDataFieldStart = &pDataPackedMessage[0]; - if (pMessageBuf == NULL || pPackedBuf == NULL) { - NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n"); - return -1; - } - // PHY API message header // Number of messages [0] // Opaque handle [1] @@ -1136,6 +1136,11 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, int fapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen, nfapi_p7_codec_config_t *config) { + if (pMessageBuf == NULL || pPackedBuf == NULL) { + NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n"); + return -1; + } + nfapi_p7_message_header_t *pMessageHeader = pMessageBuf; uint8_t *end = pPackedBuf + packedBufLen; uint8_t *pWritePackedMessage = pPackedBuf; @@ -1144,11 +1149,6 @@ int fapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packed uint8_t *pPacketBodyField = &pWritePackedMessage[8]; uint8_t *pPacketBodyFieldStart = &pWritePackedMessage[8]; - if (pMessageBuf == NULL || pPackedBuf == NULL) { - NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n"); - return -1; - } - // PHY API message header // Number of messages [0] // Opaque handle [1] diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index b3e34ee1b7..a70b52c08c 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -759,7 +759,7 @@ int phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind) if(NFAPI_MODE == NFAPI_MODE_VNF) { nfapi_nr_uci_indication_t *uci_ind = CALLOC(1, sizeof(*uci_ind)); - AssertFatal(uci_ind != NULL, "Memory not allocated for uci_ind in phy_nr_uci_indication."); + AssertFatal(uci_ind, "Memory not allocated for uci_ind in phy_nr_uci_indication."); *uci_ind = *ind; uci_ind->uci_list = CALLOC(NFAPI_NR_UCI_IND_MAX_PDU, sizeof(nfapi_nr_uci_t)); diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c index dafdf28644..6cc500cfa7 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c @@ -344,7 +344,7 @@ static int add_dev(uint8_t dev_id, struct rte_bbdev_info *info) for (queue_id = 0; queue_id < nb_queues; ++queue_id) { ret = rte_bbdev_queue_configure(dev_id, queue_id, &qconf); if (ret == 0) { - printf("Found LDCP encoding queue (id=%u) at prio%u on dev%u\n", queue_id, qconf.priority, dev_id); + printf("Found LDCP encoding queue (id=%d) at prio%u on dev%u\n", queue_id, qconf.priority, dev_id); qconf.priority++; //ret = rte_bbdev_queue_configure(ad->dev_id, queue_id, &qconf); ad->enc_queue = queue_id; @@ -359,7 +359,7 @@ static int add_dev(uint8_t dev_id, struct rte_bbdev_info *info) for (queue_id++; queue_id < nb_queues; ++queue_id) { ret = rte_bbdev_queue_configure(dev_id, queue_id, &qconf); if (ret == 0) { - printf("Found LDCP decoding queue (id=%u) at prio%u on dev%u\n", queue_id, qconf.priority, dev_id); + printf("Found LDCP decoding queue (id=%d) at prio%u on dev%u\n", queue_id, qconf.priority, dev_id); qconf.priority++; //ret = rte_bbdev_queue_configure(ad->dev_id, queue_id, &qconf); ad->dec_queue = queue_id; @@ -941,7 +941,7 @@ int32_t LDPCinit() int dev_id = 0; struct rte_bbdev_info info; struct active_device *ad = active_devs; - char *dpdk_dev = "41:00.0"; //PCI address of the card + char *dpdk_dev = "d8:00.0"; //PCI address of the card char *argv_re[] = {"bbdev", "-a", dpdk_dev, "-l", "14-15", "--file-prefix=b6", "--"}; // EAL initialization, if already initialized (init in xran lib) try to probe DPDK device ret = rte_eal_init(5, argv_re); @@ -957,8 +957,8 @@ int32_t LDPCinit() // Set number of queues based on number of initialized cores (-l option) and driver // capabilities TEST_ASSERT_SUCCESS(add_dev(dev_id, &info), "Failed to setup bbdev"); - TEST_ASSERT_SUCCESS(rte_bbdev_stats_reset(dev_id), "Failed to reset stats of bbdev %u", dev_id); - TEST_ASSERT_SUCCESS(rte_bbdev_start(dev_id), "Failed to start bbdev %u", dev_id); + TEST_ASSERT_SUCCESS(rte_bbdev_stats_reset(dev_id), "Failed to reset stats of bbdev %d", dev_id); + TEST_ASSERT_SUCCESS(rte_bbdev_start(dev_id), "Failed to start bbdev %d", dev_id); //the previous calls have populated this global variable (beurk) // One more global to remove, not thread safe global op_params diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG1_128.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG1_128.c index 5dc665a8b9..abcb30f879 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG1_128.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG1_128.c @@ -80,10 +80,10 @@ void nrLDPC_bnProcPc_BG1_generator_128(const char *dir, int R) fprintf(fd," // Process group with 1 CN\n"); fprintf(fd," uint32_t M = (%d*Z + 15)>>4;\n",lut_numBnInBnGroups[0]); - fprintf(fd," simde__m128i* p_bnProcBuf = (simde__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups [idxBnGroup]); - fprintf(fd," simde__m128i* p_bnProcBufRes = (simde__m128i*) &bnProcBufRes [%d];\n",lut_startAddrBnGroups [idxBnGroup]); - fprintf(fd," simde__m128i* p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); - fprintf(fd," simde__m128i* p_llrRes = (simde__m128i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," simde__m128i* p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]); + fprintf(fd," simde__m128i* p_bnProcBufRes = (simde__m128i*) &bnProcBufRes [%u];\n", lut_startAddrBnGroups[idxBnGroup]); + fprintf(fd," simde__m128i* p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," simde__m128i* p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); fprintf(fd," simde__m128i ymm0, ymm1, ymmRes0, ymmRes1;\n"); @@ -114,9 +114,9 @@ void nrLDPC_bnProcPc_BG1_generator_128(const char *dir, int R) cnOffsetInGroup = (lut_numBnInBnGroups[cnidx]*NR_LDPC_ZMAX)>>4; // Set pointers to start of group 2 - fprintf(fd," p_bnProcBuf = (simde__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]); - fprintf(fd," p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); - fprintf(fd," p_llrRes = (simde__m128i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]); + fprintf(fd," p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); // Loop over BNs fprintf(fd," for (int i=0;i>4;\n",lut_numBnInBnGroups[0]); - fprintf(fd," simde__m128i* p_bnProcBuf = (simde__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups [idxBnGroup]); - fprintf(fd," simde__m128i* p_bnProcBufRes = (simde__m128i*) &bnProcBufRes [%d];\n",lut_startAddrBnGroups [idxBnGroup]); - fprintf(fd," simde__m128i* p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); - fprintf(fd," simde__m128i* p_llrRes = (simde__m128i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," simde__m128i* p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]); + fprintf(fd," simde__m128i* p_bnProcBufRes = (simde__m128i*) &bnProcBufRes [%u];\n", lut_startAddrBnGroups[idxBnGroup]); + fprintf(fd," simde__m128i* p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," simde__m128i* p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); fprintf(fd," simde__m128i ymm0, ymm1, ymmRes0, ymmRes1;\n"); @@ -115,9 +115,9 @@ void nrLDPC_bnProcPc_BG2_generator_128(const char *dir, int R) cnOffsetInGroup = (lut_numBnInBnGroups[cnidx]*NR_LDPC_ZMAX)>>4; // Set pointers to start of group 2 - fprintf(fd," p_bnProcBuf = (simde__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]); - fprintf(fd," p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); - fprintf(fd," p_llrRes = (simde__m128i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]); + fprintf(fd," p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); + fprintf(fd," p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]); // Loop over BNs fprintf(fd," for (int i=0;i #include #include diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h new file mode 100644 index 0000000000..1398c64971 --- /dev/null +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h @@ -0,0 +1,57 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +/*! \file /PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h + \brief Polar definitions required for Sidelink PSBCH + \author + \date + \version + \company: Fraunhofer + \email: + \note + \warning +*/ + +#ifndef __NR_POLAR_PSBCH_DEFS__H__ +#define __NR_POLAR_PSBCH_DEFS__H__ + +// PSBCH related polar parameters. + +// PSBCH symbols sent in 11RBS, 9 symbols. 11*9*(12-3(for DMRS))*2bits = 1782 bits +#define SL_NR_POLAR_PSBCH_E_NORMAL_CP 1782 +// PSBCH symbols sent in 11RBS, 7 symbols. 11*7*(12-3(for DMRS))*2bits = 1386 bits +#define SL_NR_POLAR_PSBCH_E_EXT_CP 1386 +// SL_NR_POLAR_PSBCH_E_NORMAL_CP/32 +#define SL_NR_POLAR_PSBCH_E_DWORD 56 + +#define SL_NR_POLAR_PSBCH_MESSAGE_TYPE (NR_POLAR_UCI_PUCCH_MESSAGE_TYPE + 1) +#define SL_NR_POLAR_PSBCH_PAYLOAD_BITS 32 +#define SL_NR_POLAR_PSBCH_AGGREGATION_LEVEL 0 +#define SL_NR_POLAR_PSBCH_N_MAX 9 +#define SL_NR_POLAR_PSBCH_I_IL 1 +#define SL_NR_POLAR_PSBCH_I_SEG 0 +#define SL_NR_POLAR_PSBCH_N_PC 0 +#define SL_NR_POLAR_PSBCH_N_PC_WM 0 +#define SL_NR_POLAR_PSBCH_I_BIL 0 +#define SL_NR_POLAR_PSBCH_CRC_PARITY_BITS 24 +#define SL_NR_POLAR_PSBCH_CRC_ERROR_CORRECTION_BITS 3 + +#endif diff --git a/openair1/PHY/CODING/nr_polar_init.c b/openair1/PHY/CODING/nr_polar_init.c index 3d6d7848da..68a3c0ffa5 100644 --- a/openair1/PHY/CODING/nr_polar_init.c +++ b/openair1/PHY/CODING/nr_polar_init.c @@ -32,6 +32,7 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" #include "PHY/NR_TRANSPORT/nr_dci.h" +#include "nrPolar_tools/nr_polar_psbch_defs.h" #define PolarKey ((messageType<<24)|(messageLength<<8)|aggregation_level) static t_nrPolar_params * PolarList=NULL; @@ -110,10 +111,9 @@ t_nrPolar_params *nr_polar_params(int8_t messageType, uint16_t messageLength, ui // printf("currentPtr %p (polarParams %p)\n",currentPtr,polarParams); //Else, initialize and add node to the end of the linked list. t_nrPolar_params *newPolarInitNode = calloc(sizeof(t_nrPolar_params),1); - newPolarInitNode->busy=true; + AssertFatal(newPolarInitNode, "[nr_polar_init] New t_nrPolar_params * could not be created"); + newPolarInitNode->busy = true; pthread_mutex_unlock(&PolarListMutex); - - AssertFatal(newPolarInitNode != NULL, "[nr_polar_init] New t_nrPolar_params * could not be created"); // LOG_D(PHY,"Setting new polarParams index %d, messageType %d, messageLength %d, aggregation_prime %d\n",(messageType * messageLength * aggregation_prime),messageType,messageLength,aggregation_prime); newPolarInitNode->idx = PolarKey; @@ -191,7 +191,22 @@ t_nrPolar_params *nr_polar_params(int8_t messageType, uint16_t messageLength, ui newPolarInitNode->payloadBits = messageLength; newPolarInitNode->crcCorrectionBits = NR_POLAR_PUCCH_CRC_ERROR_CORRECTION_BITS; //LOG_D(PHY,"New polar node, encoderLength %d, aggregation_level %d\n",newPolarInitNode->encoderLength,aggregation_level); - + } else if (messageType == SL_NR_POLAR_PSBCH_MESSAGE_TYPE) { // PSBCH + newPolarInitNode->n_max = SL_NR_POLAR_PSBCH_N_MAX; + newPolarInitNode->i_il = SL_NR_POLAR_PSBCH_I_IL; + newPolarInitNode->i_seg = SL_NR_POLAR_PSBCH_I_SEG; + newPolarInitNode->n_pc = SL_NR_POLAR_PSBCH_N_PC; + newPolarInitNode->n_pc_wm = SL_NR_POLAR_PSBCH_N_PC_WM; + newPolarInitNode->i_bil = SL_NR_POLAR_PSBCH_I_BIL; + newPolarInitNode->crcParityBits = SL_NR_POLAR_PSBCH_CRC_PARITY_BITS; + newPolarInitNode->payloadBits = SL_NR_POLAR_PSBCH_PAYLOAD_BITS; + newPolarInitNode->encoderLength = SL_NR_POLAR_PSBCH_E_NORMAL_CP + 2; + newPolarInitNode->crcCorrectionBits = SL_NR_POLAR_PSBCH_CRC_ERROR_CORRECTION_BITS; + newPolarInitNode->crc_generator_matrix = crc24c_generator_matrix(newPolarInitNode->payloadBits); // G_P + LOG_D(PHY, + "SIDELINK: Initializing polar parameters for PSBCH (K %d, E %d)\n", + newPolarInitNode->payloadBits, + newPolarInitNode->encoderLength); } else { AssertFatal(1 == 0, "[nr_polar_init] Incorrect Message Type(%d)", messageType); } diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 641c8a1f67..48152db15b 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -32,7 +32,7 @@ #include "PHY/NR_REFSIG/ul_ref_seq_nr.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h" #include "PHY/NR_REFSIG/nr_refsig.h" -#include "PHY/MODULATION/nr_modulation.h" +#include "PHY/NR_REFSIG/nr_mod_table.h" #include "openair2/COMMON/prs_nr_paramdef.h" #include "SCHED_NR_UE/harq_nr.h" @@ -384,6 +384,15 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) return 0; } +static void sl_ue_free(PHY_VARS_NR_UE *UE) +{ + if (UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation) { + free_and_zero(UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[0]); + free_and_zero(UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[1]); + free_and_zero(UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation); + } +} + void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) { const NR_DL_FRAME_PARMS* fp = &ue->frame_parms; @@ -489,6 +498,8 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) free_and_zero(ue->prs_vars[idx]); } + + sl_ue_free(ue); } void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb) { @@ -702,3 +713,70 @@ void phy_term_nr_top(void) free_ul_reference_signal_sequences(); free_context_synchro_nr(); } + +static void sl_generate_psbch_dmrs_qpsk_sequences(PHY_VARS_NR_UE *UE, struct complex16 *modulated_dmrs_sym, uint16_t slss_id) +{ + uint8_t idx = 0; + uint32_t *sl_dmrs_sequence = UE->SL_UE_PHY_PARAMS.init_params.psbch_dmrs_gold_sequences[slss_id]; + c16_t *mod_table = (c16_t *)nr_qpsk_mod_table; + +#ifdef SL_DEBUG_INIT + printf("SIDELINK INIT: PSBCH DMRS Generation with slss_id:%d\n", slss_id); +#endif + + /// QPSK modulation + for (int m = 0; m < SL_NR_NUM_PSBCH_DMRS_RE; m++) { + idx = (((sl_dmrs_sequence[(m << 1) >> 5]) >> ((m << 1) & 0x1f)) & 3); + modulated_dmrs_sym[m].r = mod_table[idx].r; + modulated_dmrs_sym[m].i = mod_table[idx].i; + +#ifdef SL_DEBUG_INIT_DATA + printf("m:%d gold seq: %d b0-b1: %d-%d DMRS Symbols: %d %d\n", + m, + sl_dmrs_sequence[(m << 1) >> 5], + (((sl_dmrs_sequence[(m << 1) >> 5]) >> ((m << 1) & 0x1f)) & 1), + (((sl_dmrs_sequence[((m << 1) + 1) >> 5]) >> (((m << 1) + 1) & 0x1f)) & 1), + modulated_dmrs_sym[m].r, + modulated_dmrs_sym[m].i); + printf("idx:%d, qpsk_table.r:%d, qpsk_table.i:%d\n", idx, mod_table[idx].r, mod_table[idx].i); +#endif + } + +#ifdef SL_DUMP_INIT_SAMPLES + char filename[40], varname[25]; + sprintf(filename, "sl_psbch_dmrs_slssid_%d.m", slss_id); + sprintf(varname, "sl_dmrs_id_%d.m", slss_id); + LOG_M(filename, varname, (void *)modulated_dmrs_sym, SL_NR_NUM_PSBCH_DMRS_RE, 1, 1); +#endif +} + +void sl_ue_phy_init(PHY_VARS_NR_UE *UE) +{ + uint16_t scaling_value = ONE_OVER_SQRT2_Q15; + + NR_DL_FRAME_PARMS *sl_fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params; + + if (!UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation) { + UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation = malloc16_clear(SL_NR_NUM_IDs_IN_PSS * sizeof(int32_t *)); + UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[0] = malloc16_clear(sizeof(int32_t) * sl_fp->ofdm_symbol_size); + UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[1] = malloc16_clear(sizeof(int32_t) * sl_fp->ofdm_symbol_size); + } + LOG_I(PHY, "SIDELINK INIT: GENERATE PSS, SSS, GOLD SEQUENCES AND PSBCH DMRS SEQUENCES FOR ALL possible SLSS IDs 0- 671\n"); + + // Generate PSS sequences for IDs 0,1 used in PSS + sl_generate_pss(&UE->SL_UE_PHY_PARAMS.init_params, 0, scaling_value); + sl_generate_pss(&UE->SL_UE_PHY_PARAMS.init_params, 1, scaling_value); + + // Generate psbch dmrs Gold Sequences and modulated dmrs symbols + sl_init_psbch_dmrs_gold_sequences(UE); + for (int slss_id = 0; slss_id < SL_NR_NUM_SLSS_IDs; slss_id++) { + sl_generate_psbch_dmrs_qpsk_sequences(UE, UE->SL_UE_PHY_PARAMS.init_params.psbch_dmrs_modsym[slss_id], slss_id); + sl_generate_sss(&UE->SL_UE_PHY_PARAMS.init_params, slss_id, scaling_value); + } + + // Generate PSS time domain samples used for correlation during SLSS reception. + sl_generate_pss_ifft_samples(&UE->SL_UE_PHY_PARAMS, &UE->SL_UE_PHY_PARAMS.init_params); + + init_symbol_rotation(sl_fp); + init_timeshift_rotation(sl_fp); +} diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index 5b45bbc8f9..dc516d7f24 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -425,7 +425,7 @@ void nr_dump_frame_parms(NR_DL_FRAME_PARMS *fp) LOG_I(PHY,"fp->samples_per_frame=%d\n",fp->samples_per_frame); LOG_I(PHY,"fp->dl_CarrierFreq=%lu\n",fp->dl_CarrierFreq); LOG_I(PHY,"fp->ul_CarrierFreq=%lu\n",fp->ul_CarrierFreq); + LOG_I(PHY, "fp->Nid_cell=%d\n", fp->Nid_cell); + LOG_I(PHY, "fp->first_carrier_offset=%d\n", fp->first_carrier_offset); + LOG_I(PHY, "fp->ssb_start_subcarrier=%d\n", fp->ssb_start_subcarrier); } - - - diff --git a/openair1/PHY/INIT/nr_phy_init.h b/openair1/PHY/INIT/nr_phy_init.h index 5e36558e2b..a39f931de1 100644 --- a/openair1/PHY/INIT/nr_phy_init.h +++ b/openair1/PHY/INIT/nr_phy_init.h @@ -61,4 +61,5 @@ void init_delay_table(uint16_t ofdm_symbol_size, int max_ofdm_symbol_size, c16_t delay_table[][max_ofdm_symbol_size]); +void sl_ue_phy_init(PHY_VARS_NR_UE *UE); #endif diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c index 935a6f1f01..855116ca6b 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c @@ -491,6 +491,7 @@ uint32_t get_prb(int N_RB_DL,int odd_slot,int vrb,int Ngap) { break; case 4: // even: 4->1, odd: 4->4 ret= ((3*odd_slot) + 1)%6; + break; case 5: // even: 5->4, odd: 5->1 ret= ((3*odd_slot) + 4)%6; break; diff --git a/openair1/PHY/LTE_TRANSPORT/power_control.c b/openair1/PHY/LTE_TRANSPORT/power_control.c index 5744c6b35b..d2414222b2 100644 --- a/openair1/PHY/LTE_TRANSPORT/power_control.c +++ b/openair1/PHY/LTE_TRANSPORT/power_control.c @@ -41,8 +41,8 @@ double get_pa_dB(uint8_t pa) } -double computeRhoA_eNB(uint8_t pa, - LTE_eNB_DLSCH_t *dlsch_eNB, int dl_power_off, uint8_t n_antenna_port){ +double computeRhoA_eNB(uint8_t pa, LTE_eNB_DLSCH_t *dlsch_eNB, int dl_power_off, uint8_t n_antenna_port) +{ double rho_a_dB; double sqrt_rho_a_lin; @@ -59,10 +59,10 @@ double computeRhoA_eNB(uint8_t pa, if (dlsch_eNB) { dlsch_eNB->sqrt_rho_a= (short) (sqrt_rho_a_lin*pow(2,13)); dlsch_eNB->pa = pa; - } #if DEBUG_PC - printf("eNB: p_a=%d, value=%f, sqrt_rho_a=%d\n",p_a,pa_values[ pdsch_config_dedicated->p_a],dlsch_eNB->sqrt_rho_a); + printf("eNB: p_a=%d, value=%f, sqrt_rho_a=%d\n", p_a, pa_values[pdsch_config_dedicated->p_a], dlsch_eNB->sqrt_rho_a); #endif + } return(rho_a_dB); } @@ -89,12 +89,12 @@ double computeRhoB_eNB(uint8_t pa, sqrt_rho_b_lin= pow(10,(0.05*rho_b_dB)); if (dlsch_eNB) { - dlsch_eNB->sqrt_rho_b= (short) (sqrt_rho_b_lin*pow(2,13)); + dlsch_eNB->sqrt_rho_b = (short) (sqrt_rho_b_lin * pow(2, 13)); dlsch_eNB->pb = pb; - } #ifdef DEBUG_PC - printf("eNB: n_ant=%d, p_b=%d -> rho_b/rho_a=%f -> sqrt_rho_b=%d\n",n_antenna_port,pb,ratioPB[1][pb],dlsch_eNB->sqrt_rho_b); + printf("eNB: n_ant=%d, p_b=%d -> rho_b/rho_a=%f -> sqrt_rho_b=%d\n", n_antenna_port, pb, ratioPB[1][pb], dlsch_eNB->sqrt_rho_b); #endif + } return(rho_b_dB); } diff --git a/openair1/PHY/MODULATION/modulation_UE.h b/openair1/PHY/MODULATION/modulation_UE.h index 07d7625770..03c13db8ae 100644 --- a/openair1/PHY/MODULATION/modulation_UE.h +++ b/openair1/PHY/MODULATION/modulation_UE.h @@ -49,9 +49,17 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, int reset_freq_est); int nr_slot_fep(PHY_VARS_NR_UE *ue, + NR_DL_FRAME_PARMS *frame_parms, const UE_nr_rxtx_proc_t *proc, unsigned char symbol, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]); + c16_t rxdataF[][frame_parms->samples_per_slot_wCP], + uint32_t linktype); +int sl_nr_slot_fep(PHY_VARS_NR_UE *ue, + UE_nr_rxtx_proc_t *proc, + unsigned char symbol, + unsigned char Ns, + uint32_t sample_offset, + c16_t rxdataF[][ue->SL_UE_PHY_PARAMS.sl_frame_params.samples_per_slot_wCP]); int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, diff --git a/openair1/PHY/MODULATION/nr_modulation.c b/openair1/PHY/MODULATION/nr_modulation.c index 666d92a87d..c6f85d0ef3 100644 --- a/openair1/PHY/MODULATION/nr_modulation.c +++ b/openair1/PHY/MODULATION/nr_modulation.c @@ -249,67 +249,65 @@ void nr_layer_mapping(int nbCodes, uint8_t n_layers, int layerSz, uint32_t n_symbs, - c16_t tx_layers[n_layers][layerSz]) + c16_t tx_layer[layerSz], + int layer) { LOG_D(PHY,"Doing layer mapping for %d layers, %d symbols\n",n_layers,n_symbs); switch (n_layers) { case 1: - memcpy(tx_layers[0], mod_symbs[0], n_symbs * sizeof(**mod_symbs)); - break; + memcpy(tx_layer, mod_symbs[0], n_symbs * sizeof(**mod_symbs)); + break; case 2: case 3: case 4: for (int i = 0; i < n_symbs / n_layers; i++) { const c16_t *base = mod_symbs[0] + n_layers * i; - for (int l = 0; l < n_layers; l++) - tx_layers[l][i] = base[l]; + tx_layer[i] = base[layer]; } break; case 5: - for (int i = 0; i < n_symbs; i += 2) { - const int txIdx = i / 2; - for (int l = 0; l < 2; l++) - tx_layers[l][txIdx] = mod_symbs[0][i + l]; - } - for (int i = 0; i < n_symbs; i += 3) { - const int txIdx = i / 3; - for (int l = 2; l < 5; l++) - tx_layers[l][txIdx] = mod_symbs[1][i + l]; - } + if (layer < 2) + for (int i = 0; i < n_symbs; i += 2) { + const int txIdx = i / 2; + tx_layer[txIdx] = mod_symbs[0][i + layer]; + } + else + for (int i = 0; i < n_symbs; i += 3) { + const int txIdx = i / 3; + tx_layer[txIdx] = mod_symbs[1][i + layer]; + } break; case 6: for (int q=0; q<2; q++) - for (int i = 0; i < n_symbs; i += 3) { - const int txIdx = i / 3; - for (int l = 0; l < 3; l++) - tx_layers[l][txIdx] = mod_symbs[q][i + l]; - } + for (int i = 0; i < n_symbs; i += 3) { + const int txIdx = i / 3; + tx_layer[txIdx] = mod_symbs[q][i + layer]; + } break; case 7: - for (int i = 0; i < n_symbs; i += 3) { - const int txIdx = i / 3; - for (int l = 0; l < 3; l++) - tx_layers[l][txIdx] = mod_symbs[1][i + l]; - } - for (int i = 0; i < n_symbs; i += 4) { - const int txIdx = i / 4; - for (int l = 3; l < 7; l++) - tx_layers[l][txIdx] = mod_symbs[0][i + l]; - } + if (layer < 3) + for (int i = 0; i < n_symbs; i += 3) { + const int txIdx = i / 3; + tx_layer[txIdx] = mod_symbs[1][i + layer]; + } + else + for (int i = 0; i < n_symbs; i += 4) { + const int txIdx = i / 4; + tx_layer[txIdx] = mod_symbs[0][i + layer]; + } break; case 8: for (int q=0; q<2; q++) for (int i = 0; i < n_symbs; i += 4) { const int txIdx = i / 4; - for (int l = 0; l < 3; l++) - tx_layers[l][txIdx] = mod_symbs[q][i + l]; + tx_layer[txIdx] = mod_symbs[q][i + layer]; } break; @@ -805,8 +803,28 @@ void nr_layer_precoder_simd(const int n_layers, #ifdef DEBUG_DLSCH_PRECODING_PRINT_WITH_TRIVIAL // Print simd and trivial result, TODO: To be removed c16_t *y_simd = (c16_t*) &y; - printf("debug_to_be_removed re_cnt=%d, sc=%d, y_simd=(%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d)\n", re_cnt, sc, y_simd[0].r, y_simd[0].i, y_simd[1].r, y_simd[1].i, y_simd[2].r, y_simd[2].i, y_simd[3].r, y_simd[3].i); - printf("debug_to_be_removed re_cnt=%d, sc=%d, y_triv=(%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d)\n", re_cnt, sc, y_triv[0].r, y_triv[0].i, y_triv[1].r, y_triv[1].i, y_triv[2].r, y_triv[2].i, y_triv[3].r, y_triv[3].i); + printf("debug_to_be_removed re_cnt=%d, sc=%u, y_simd=(%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d)\n", + re_cnt, + sc, + y_simd[0].r, + y_simd[0].i, + y_simd[1].r, + y_simd[1].i, + y_simd[2].r, + y_simd[2].i, + y_simd[3].r, + y_simd[3].i); + printf("debug_to_be_removed re_cnt=%d, sc=%u, y_triv=(%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d), (%+4d,%+4d)\n", + re_cnt, + sc, + y_triv[0].r, + y_triv[0].i, + y_triv[1].r, + y_triv[1].i, + y_triv[2].r, + y_triv[2].i, + y_triv[3].r, + y_triv[3].i); #endif } } diff --git a/openair1/PHY/MODULATION/nr_modulation.h b/openair1/PHY/MODULATION/nr_modulation.h index fa182b2ef1..2bec9c2aa1 100644 --- a/openair1/PHY/MODULATION/nr_modulation.h +++ b/openair1/PHY/MODULATION/nr_modulation.h @@ -60,7 +60,8 @@ void nr_layer_mapping(int nbCodes, uint8_t n_layers, int layerSz, uint32_t n_symbs, - c16_t tx_layers[n_layers][layerSz]); + c16_t tx_layers[layerSz], + int l); /*! \brief Perform NR layer mapping. TS 38.211 V15.4.0 subclause 7.3.1.3 @param[in] ulsch_ue, double Pointer to NR_UE_ULSCH_t struct diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c index 7bd0c9d839..de19d30819 100644 --- a/openair1/PHY/MODULATION/ofdm_mod.c +++ b/openair1/PHY/MODULATION/ofdm_mod.c @@ -139,61 +139,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input volatile int *output_ptr=(int*)0; int *temp_ptr=(int*)0; - idft_size_idx_t idftsize; - - switch (fftsize) { - case 128: - idftsize = IDFT_128; - break; - - case 256: - idftsize = IDFT_256; - break; - - case 512: - idftsize = IDFT_512; - break; - - case 768: - idftsize = IDFT_768; - break; - - case 1024: - idftsize = IDFT_1024; - break; - - case 1536: - idftsize = IDFT_1536; - break; - - case 2048: - idftsize = IDFT_2048; - break; - - case 3072: - idftsize = IDFT_3072; - break; - - case 4096: - idftsize = IDFT_4096; - break; - - case 6144: - idftsize= IDFT_6144; - break; - - case 12288: - idftsize= IDFT_12288; - break; - - case 24576: - idftsize= IDFT_24576; - break; - - default: - idftsize = IDFT_512; - break; - } + idft_size_idx_t idft_size = get_idft(fftsize); #ifdef DEBUG_OFDM_MOD printf("[PHY] OFDM mod (size %d,prefix %d) Symbols %d, input %p, output %p\n", @@ -209,9 +155,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input #endif // on AVX2 need 256-bit alignment - idft(idftsize,(int16_t *)&input[i*fftsize], - (int16_t *)temp, - 1); + idft(idft_size, (int16_t *)&input[i * fftsize], (int16_t *)temp, 1); // Copy to frame buffer with Cyclic Extension // Note: will have to adjust for synchronization offset! diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index a645d9ded1..4024796bb0 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -34,12 +34,109 @@ #define LOG_I(A,B...) printf(A) #endif*/ +int sl_nr_slot_fep(PHY_VARS_NR_UE *ue, + UE_nr_rxtx_proc_t *proc, + unsigned char symbol, + unsigned char Ns, + uint32_t sample_offset, + c16_t rxdataF[][ue->SL_UE_PHY_PARAMS.sl_frame_params.samples_per_slot_wCP]) +{ + NR_DL_FRAME_PARMS *frame_params = &ue->SL_UE_PHY_PARAMS.sl_frame_params; + NR_UE_COMMON *common_vars = &ue->common_vars; + + AssertFatal(symbol < frame_params->symbols_per_slot, + "slot_fep: symbol must be between 0 and %d\n", + frame_params->symbols_per_slot - 1); + AssertFatal(Ns < frame_params->slots_per_frame, "slot_fep: Ns must be between 0 and %d\n", frame_params->slots_per_frame - 1); + + unsigned int nb_prefix_samples = frame_params->nb_prefix_samples; + unsigned int nb_prefix_samples0 = frame_params->nb_prefix_samples0; + + dft_size_idx_t dftsize = get_dft(frame_params->ofdm_symbol_size); + // This is for misalignment issues + int32_t tmp_dft_in[8192] __attribute__((aligned(32))); + + unsigned int rx_offset = frame_params->get_samples_slot_timestamp(Ns, frame_params, 0); + unsigned int abs_symbol = Ns * frame_params->symbols_per_slot + symbol; + + rx_offset += sample_offset; + + for (int idx_symb = Ns * frame_params->symbols_per_slot; idx_symb <= abs_symbol; idx_symb++) + rx_offset += (idx_symb % (0x7 << frame_params->numerology_index)) ? nb_prefix_samples : nb_prefix_samples0; + rx_offset += frame_params->ofdm_symbol_size * symbol; + + // use OFDM symbol from within 1/8th of the CP to avoid ISI + rx_offset -= (nb_prefix_samples / frame_params->ofdm_offset_divisor); + +#ifdef SL_DEBUG_SLOT_FEP + // if (ue->frame <100) + LOG_I(PHY, + "slot_fep: slot %d, symbol %d, nb_prefix_samples %u, nb_prefix_samples0 %u, rx_offset %u\n", + Ns, + symbol, + nb_prefix_samples, + nb_prefix_samples0, + rx_offset); +#endif + + for (unsigned char aa = 0; aa < frame_params->nb_antennas_rx; aa++) { + memset(&rxdataF[aa][frame_params->ofdm_symbol_size * symbol], 0, frame_params->ofdm_symbol_size * sizeof(int32_t)); + + int16_t *rxdata_ptr = (int16_t *)&common_vars->rxdata[aa][rx_offset]; + + // if input to dft is not 256-bit aligned + if ((rx_offset & 7) != 0) { + memcpy((void *)&tmp_dft_in[0], (void *)&common_vars->rxdata[aa][rx_offset], frame_params->ofdm_symbol_size * sizeof(int32_t)); + + rxdata_ptr = (int16_t *)tmp_dft_in; + } + + dft(dftsize, rxdata_ptr, (int16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size * symbol], 1); + + int symb_offset = (Ns % frame_params->slots_per_subframe) * frame_params->symbols_per_slot; + int32_t rot2 = ((uint32_t *)frame_params->symbol_rotation[1])[symbol + symb_offset]; + ((int16_t *)&rot2)[1] = -((int16_t *)&rot2)[1]; + +#ifdef SL_DEBUG_SLOT_FEP + // if (ue->frame <100) + LOG_I(PHY, + "slot_fep: slot %d, symbol %d rx_offset %u, rotation symbol %d %d.%d\n", + Ns, + symbol, + rx_offset, + symbol + symb_offset, + ((int16_t *)&rot2)[0], + ((int16_t *)&rot2)[1]); +#endif + + rotate_cpx_vector((c16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size * symbol], + (c16_t *)&rot2, + (c16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size * symbol], + frame_params->ofdm_symbol_size, + 15); + + int16_t *shift_rot = (int16_t *)frame_params->timeshift_symbol_rotation; + + multadd_cpx_vector((int16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size * symbol], + shift_rot, + (int16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size * symbol], + 1, + frame_params->ofdm_symbol_size, + 15); + } + + LOG_D(PHY, "SIDELINK RX: Slot FEP: done for symbol:%d\n", symbol); + + return 0; +} + int nr_slot_fep(PHY_VARS_NR_UE *ue, + NR_DL_FRAME_PARMS *frame_parms, const UE_nr_rxtx_proc_t *proc, unsigned char symbol, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) + c16_t rxdataF[][frame_parms->samples_per_slot_wCP], + uint32_t linktype) { - NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; NR_UE_COMMON *common_vars = &ue->common_vars; int Ns = proc->nr_slot_rx; @@ -96,14 +193,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, stop_meas(&ue->rx_dft_stats); - apply_nr_rotation_RX(frame_parms, - rxdataF[aa], - frame_parms->symbol_rotation[0], - Ns, - frame_parms->N_RB_DL, - 0, - symbol, - 1); + apply_nr_rotation_RX(frame_parms, rxdataF[aa], frame_parms->symbol_rotation[linktype], Ns, frame_parms->N_RB_DL, 0, symbol, 1); } #ifdef DEBUG_FEP diff --git a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c index 82c55a1465..70381d0bd8 100644 --- a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c +++ b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c @@ -202,22 +202,27 @@ int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue, return(0); } -void nr_pbch_dmrs_rx(const int symbol, const unsigned int *nr_gold_pbch, c16_t *output) +void nr_pbch_dmrs_rx(int symbol, unsigned int *nr_gold_pbch, c16_t *output, bool sidelink) { int m,m0,m1; uint8_t idx=0; - AssertFatal(symbol>=0 && symbol <3,"illegal symbol %d\n",symbol); - if (symbol == 0) { - m0=0; - m1=60; - } - else if (symbol == 1) { - m0=60; - m1=84; - } - else { - m0=84; - m1=144; + if (sidelink) { + AssertFatal(symbol == 0 || (symbol >= 5 && symbol <= 12), "illegal symbol %d\n", symbol); + m0 = (symbol) ? (symbol - 4) * 33 : 0; + m1 = (symbol) ? (symbol - 3) * 33 : 33; + + } else { + AssertFatal(symbol >= 0 && symbol < 3, "illegal symbol %d\n", symbol); + if (symbol == 0) { + m0 = 0; + m1 = 60; + } else if (symbol == 1) { + m0 = 60; + m1 = 84; + } else { + m0 = 84; + m1 = 144; + } } // printf("Generating pilots symbol %d, m0 %d, m1 %d\n",symbol,m0,m1); /// QPSK modulation @@ -292,8 +297,14 @@ int nr_pusch_lowpaprtype1_dmrs_rx(PHY_VARS_gNB *gNB, nb_pusch_rb, nb_dmrs); printf("NR_DMRS_RX: wf[%d] = %d wt[%d]= %d\n", i & 1, wf1[p - 1000][i & 1], lp, wt1[p - 1000][lp]); - printf("NR_DMRS_RX: i %d dmrs_offset %d k %d pusch dmrsseq[i<<1] %d, dmrsseq[(i<<1)+1] %d pilots[k<<1] %d pilots[(k<<1)+1] %d\n", i, dmrs_offset, k, - dmrs_seq[i].r, dmrs_seq[i].i, output[k].r, output[(k].i); + printf("NR_DMRS_RX: i %d dmrs_offset %d k %d pusch dmrsseq.r %d, dmrsseq.i %d pilots.r %d pilots.i %d\n", + i, + dmrs_offset, + k, + dmrs_seq[i].r, + dmrs_seq[i].i, + output[k].r, + output[k].i); #endif } } else { diff --git a/openair1/PHY/NR_REFSIG/nr_gold_ue.c b/openair1/PHY/NR_REFSIG/nr_gold_ue.c index 122cc11dd3..56dd09c0f0 100644 --- a/openair1/PHY/NR_REFSIG/nr_gold_ue.c +++ b/openair1/PHY/NR_REFSIG/nr_gold_ue.c @@ -148,3 +148,28 @@ void init_nr_gold_prs(PHY_VARS_NR_UE* ue) } // for rsc } // for gnb } + +void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE) +{ + unsigned int x1, x2; + uint16_t slss_id; + uint8_t reset; + + for (slss_id = 0; slss_id < SL_NR_NUM_SLSS_IDs; slss_id++) { + reset = 1; + x2 = slss_id; + +#ifdef SL_DEBUG_INIT + printf("\nPSBCH DMRS GOLD SEQ for SLSSID :%d :\n", slss_id); +#endif + + for (uint8_t n = 0; n < SL_NR_NUM_PSBCH_DMRS_RE_DWORD; n++) { + UE->SL_UE_PHY_PARAMS.init_params.psbch_dmrs_gold_sequences[slss_id][n] = lte_gold_generic(&x1, &x2, reset); + reset = 0; + +#ifdef SL_DEBUG_INIT_DATA + printf("%x\n", SL_UE_INIT_PARAMS.sl_psbch_dmrs_gold_sequences[slss_id][n]); +#endif + } + } +} diff --git a/openair1/PHY/NR_REFSIG/refsig_defs_ue.h b/openair1/PHY/NR_REFSIG/refsig_defs_ue.h index 81c72f59ef..c7919130b5 100644 --- a/openair1/PHY/NR_REFSIG/refsig_defs_ue.h +++ b/openair1/PHY/NR_REFSIG/refsig_defs_ue.h @@ -30,7 +30,7 @@ /*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS. @param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables */ -void nr_pbch_dmrs_rx(const int dmrss, const unsigned int *nr_gold_pbch, c16_t *output); +void nr_pbch_dmrs_rx(int dmrss, unsigned int *nr_gold_pbch, c16_t *output, bool sidelink); /*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS. @param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables @@ -66,5 +66,8 @@ void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, void nr_init_csi_rs(const NR_DL_FRAME_PARMS *fp, uint32_t ***csi_rs, uint32_t Nid); void init_nr_gold_prs(PHY_VARS_NR_UE* ue); - +void sl_generate_pss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint8_t n_sl_id2, uint16_t scaling); +void sl_generate_pss_ifft_samples(sl_nr_ue_phy_params_t *sl_ue_params, SL_NR_UE_INIT_PARAMS_t *sl_init_params); +void sl_generate_sss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint16_t slss_id, uint16_t scaling); +void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE); #endif diff --git a/openair1/PHY/NR_REFSIG/sss_nr.h b/openair1/PHY/NR_REFSIG/sss_nr.h index 129c5a5917..1dff912889 100644 --- a/openair1/PHY/NR_REFSIG/sss_nr.h +++ b/openair1/PHY/NR_REFSIG/sss_nr.h @@ -67,8 +67,28 @@ #define PHASE_HYPOTHESIS_NUMBER (16) #define INDEX_NO_PHASE_DIFFERENCE (3) /* this is for no phase shift case */ + /************** FUNCTION ******************************************/ +static const c16_t phase_nr[PHASE_HYPOTHESIS_NUMBER] = { + // {pi/3 ---- pi/3, -pi/3 ---- pi/3} + {16384, -28377}, + {20173, -25821}, + {23571, -22762}, + {26509, -19260}, + {28932, -15383}, + {30791, -11207}, + {32051, -6813}, + {32687, -2286}, + {32687, 2286}, + {32051, 6813}, + {30791, 11207}, + {28932, 15383}, + {26509, 19260}, + {23571, 22762}, + {20173, 25821}, + {16384, 28377}}; + void init_context_sss_nr(int amp); void free_context_sss_nr(void); diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 514f284e4c..63f1291fee 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -43,12 +43,7 @@ //#define DEBUG_DLSCH //#define DEBUG_DLSCH_MAPPING -void nr_pdsch_codeword_scrambling(uint8_t *in, - uint32_t size, - uint8_t q, - uint32_t Nid, - uint32_t n_RNTI, - uint32_t* out) +static void nr_pdsch_codeword_scrambling(uint8_t *in, uint32_t size, uint8_t q, uint32_t Nid, uint32_t n_RNTI, uint32_t *out) { nr_codeword_scrambling(in, size, q, Nid, n_RNTI, out); } @@ -74,8 +69,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) NR_DL_gNB_HARQ_t *harq = &dlsch->harq_process; nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &harq->pdsch_pdu.pdsch_pdu_rel15; - const int layerSz = frame_parms->N_RB_DL * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8; - c16_t tx_layers[rel15->nrOfLayers][layerSz] __attribute__((aligned(64))); + const int layerSz = frame_parms->N_RB_DL * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB; const int dmrs_Type = rel15->dmrsConfigType; const int nb_re_dmrs = rel15->numDmrsCdmGrpsNoData * (rel15->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4); LOG_D(PHY,"pdsch: BWPStart %d, BWPSize %d, rbStart %d, rbsize %d\n", @@ -175,7 +169,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 0); stop_meas(dlsch_modulation_stats); #ifdef DEBUG_DLSCH - printf("PDSCH Modulation: Qm %d(%u)\n", Qm, nb_re); + printf("PDSCH Modulation: Qm %d(%d)\n", Qm, nb_re); for (int i = 0; i < nb_re; i += 8) { for (int j=0; j<8; j++) { printf("%d %d\t", mod_symbs[codeWord][i + j].r, mod_symbs[codeWord][i + j].i); @@ -184,24 +178,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) } #endif } - - start_meas(&gNB->dlsch_layer_mapping_stats); - /// Layer mapping - nr_layer_mapping(rel15->NrOfCodewords, encoded_length, mod_symbs, rel15->nrOfLayers, layerSz, nb_re, tx_layers); -#ifdef DEBUG_DLSCH - printf("Layer mapping (%d layers):\n", rel15->nrOfLayers); - for (int l=0; lnrOfLayers; l++) - for (int i = 0; i < nb_re / rel15->nrOfLayers; i += 8) { - printf("layer %d, Re %d..%d : ", l, i, i + 7); - for (int j=0; j<8; j++) { - printf("l%d %d\t", tx_layers[l][i + j].r, tx_layers[l][i + j].i); - } - printf("\n"); - } -#endif - - stop_meas(&gNB->dlsch_layer_mapping_stats); - /// Resource mapping // Non interleaved VRB to PRB mapping @@ -213,12 +189,19 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) c16_t txdataF_precoding[rel15->nrOfLayers][NR_NUMBER_OF_SYMBOLS_PER_SLOT][frame_parms->ofdm_symbol_size] __attribute__((aligned(64)));; #ifdef DEBUG_DLSCH_MAPPING - printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\tnb_re %u,nb_layers %d)\n", - start_sc, rel15->StartSymbolIndex, rel15->rbSize, nb_re,rel15->nrOfLayers); + printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\tnb_re %d,nb_layers %d)\n", + start_sc, + rel15->StartSymbolIndex, + rel15->rbSize, + nb_re, + rel15->nrOfLayers); #endif start_meas(&gNB->dlsch_resource_mapping_stats); for (int layer = 0; layer < rel15->nrOfLayers; layer++) { + c16_t tx_layer[layerSz] __attribute__((aligned(64))); + nr_layer_mapping(rel15->NrOfCodewords, encoded_length, mod_symbs, rel15->nrOfLayers, layerSz, nb_re, tx_layer, layer); + int dmrs_port = get_dmrs_port(layer, rel15->dmrsPorts); // DMRS params for this dmrs port @@ -244,7 +227,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) dmrs_symbol); #endif - uint32_t m=0, dmrs_idx=0; + uint32_t cur_re = 0, dmrs_idx = 0; AssertFatal(n_dmrs, "n_dmrs can't be 0\n"); c16_t mod_dmrs[n_dmrs] __attribute__((aligned(64))); @@ -356,7 +339,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) frame_parms->ofdm_symbol_size, rel15->numDmrsCdmGrpsNoData, dmrs_Type)) { - txdataF_precoding[layer][l_symbol][k] = c16mulRealShift(tx_layers[layer][m], amp, 15); + txdataF_precoding[layer][l_symbol][k] = c16mulRealShift(tx_layer[cur_re], amp, 15); #ifdef DEBUG_DLSCH_MAPPING printf("m %u\t l %d \t k %d \t txdataF: %d %d\n", m, @@ -365,7 +348,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) txdataF_precoding[layer][l_symbol][k].r, txdataF_precoding[layer][l_symbol][k].i); #endif - m++; + cur_re++; } /* mute RE */ else { @@ -387,15 +370,15 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) if (0/*(frame_parms->N_RB_DL&1)==0*/) { simde__m128i *txF = (simde__m128i *)&txdataF_precoding[layer][l_symbol][start_sc]; - simde__m128i *txl = (simde__m128i *)&tx_layers[layer][m]; + simde__m128i *txl = (simde__m128i *)&tx_layer[cur_re]; simde__m128i amp128=simde_mm_set1_epi16(amp); for (int i=0; i<(upper_limit>>2); i++) { txF[i] = simde_mm_mulhrs_epi16(amp128,txl[i]); } //RE loop, first part - m+=upper_limit; + cur_re += upper_limit; if (remaining_re > 0) { txF = (simde__m128i *)&txdataF_precoding[layer][l_symbol]; - txl = (simde__m128i *)&tx_layers[layer][m]; + txl = (simde__m128i *)&tx_layer[cur_re]; for (int i = 0; i < (remaining_re >> 2); i++) { txF[i] = simde_mm_mulhrs_epi16(amp128, txl[i]); } @@ -404,7 +387,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) else { simde__m128i *txF = (simde__m128i *)&txdataF_precoding[layer][l_symbol][start_sc]; - simde__m128i *txl = (simde__m128i *)&tx_layers[layer][m]; + simde__m128i *txl = (simde__m128i *)&tx_layer[cur_re]; simde__m128i amp64 = simde_mm_set1_epi16(amp); int i; for (i = 0; i < (upper_limit >> 2); i++) { @@ -427,16 +410,16 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) } if (i * 4 != upper_limit) { c16_t *txFc = &txdataF_precoding[layer][l_symbol][start_sc]; - c16_t *txlc = &tx_layers[layer][m]; + c16_t *txlc = &tx_layer[cur_re]; for (i = (upper_limit >> 2) << 2; i < upper_limit; i++) { txFc[i].r = ((txlc[i].r * amp) >> 14) + 1; txFc[i].i = ((txlc[i].i * amp) >> 14) + 1; } } - m+=upper_limit; + cur_re += upper_limit; if (remaining_re > 0) { txF = (simde__m128i *)&txdataF_precoding[layer][l_symbol]; - txl = (simde__m128i *)&tx_layers[layer][m]; + txl = (simde__m128i *)&tx_layer[cur_re]; int i; for (i = 0; i < (remaining_re >> 2); i++) { const simde__m128i txL = simde_mm_loadu_si128(txl + i); @@ -459,14 +442,14 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) } // RE loop, second part if (i * 4 != remaining_re) { c16_t *txFc = txdataF_precoding[layer][l_symbol]; - c16_t *txlc = &tx_layers[layer][m]; + c16_t *txlc = &tx_layer[cur_re]; for (i = (remaining_re >> 2) << 2; i < remaining_re; i++) { txFc[i].r = ((txlc[i].r * amp) >> 14) + 1; txFc[i].i = ((txlc[i].i * amp) >> 14) + 1; } } } // remaining_re > 0 - m+=remaining_re; + cur_re += remaining_re; } // N_RB_DL even } // no DMRS/PTRS in symbol } // symbol loop diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.h b/openair1/PHY/NR_TRANSPORT/nr_dlsch.h index aa111413e1..17bfe2878a 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.h +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.h @@ -35,13 +35,6 @@ #include "PHY/defs_gNB.h" -void nr_pdsch_codeword_scrambling(uint8_t *in, - uint32_t size, - uint8_t q, - uint32_t Nid, - uint32_t n_RNTI, - uint32_t* out); - void nr_fill_dlsch(processingData_L1tx_t *msgTx, nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu, unsigned char *sdu); @@ -50,12 +43,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot); -void clean_gNB_dlsch(NR_gNB_DLSCH_t *dlsch); - -int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type); - -NR_gNB_SCH_STATS_t *find_nr_dlsch_stats(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type); - int nr_dlsch_encoding(PHY_VARS_gNB *gNB, int frame, uint8_t slot, @@ -70,7 +57,6 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, time_stats_t *dlsch_interleaving_stats, time_stats_t *dlsch_segmentation_stats); -void init_dlsch_tpool(uint8_t nun_dlsch_threads); void nr_emulate_dlsch_payload(uint8_t* payload, uint16_t size); void dump_pdsch_stats(FILE *fd,PHY_VARS_gNB *gNB); diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c index 07dabe07e1..ffea38a6ae 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c @@ -137,11 +137,6 @@ NR_gNB_DLSCH_t new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, uint16_t N_RB) return(dlsch); } -void clean_gNB_dlsch(NR_gNB_DLSCH_t *dlsch) { - AssertFatal(dlsch!=NULL,"dlsch is null\n"); - dlsch->active = 0; -} - void ldpc8blocks(void *p) { encoder_implemparams_t *impp=(encoder_implemparams_t *) p; diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index dd2493984e..8c2ab883c2 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -265,10 +265,10 @@ int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu, pbch->pbch_a |= n_hf<<28; // half frame index bit if (Lmax == 64) - for (int i=0; i<3; i++) - pbch->pbch_a |= ((ssb_index>>(5-i))&1)<<(29+i); // resp. 6th, 5th and 4th bits of ssb_index + for (int i = 0; i < 3; i++) + pbch->pbch_a |= (uint32_t)((ssb_index >> (5 - i)) & 1) << (29 + i); // resp. 6th, 5th and 4th bits of ssb_index else - pbch->pbch_a |= ((ssb_sc_offset>>4)&1)<<29; //MSB of k_SSB (bit index 4) + pbch->pbch_a |= ((ssb_sc_offset >> 4) & 1) << 29; //MSB of k_SSB (bit index 4) LOG_D(PHY,"After extra byte: pbch_a = 0x%08x\n",pbch->pbch_a); diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c index bc3046c578..2d98662813 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c @@ -42,7 +42,7 @@ static NR_gNB_ULSCH_t *find_nr_ulsch(PHY_VARS_gNB *gNB, uint16_t rnti, int pid) for (int i = 0; i < gNB->max_nb_pusch; i++) { ulsch = &gNB->ulsch[i]; - AssertFatal(ulsch != NULL, "gNB->ulsch[%d] is null\n", i); + AssertFatal(ulsch, "gNB->ulsch[%d] is null\n", i); if (!ulsch->active) { if (first_free_index == -1) first_free_index = i; diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 118c828519..64ce300ae4 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -587,7 +587,7 @@ void nr_decode_pucch1(c16_t **rxdataF, printf( "\t [nr_generate_pucch1] mapping %s to RE \t amp=%d " "\tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d " - "\tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n", + "\tz_pucch[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n", l % 2 ? "PUCCH" : "DM-RS", amp, frame_parms->ofdm_symbol_size, 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 7b3f2f3f3d..7e44335225 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -479,86 +479,10 @@ int nr_prs_channel_estimation(uint8_t gNB_id, if(second_half > 0) memcpy((int16_t *)&chF_interpol[rxAnt][0], &ch_tmp[first_half << 1], second_half * sizeof(int32_t)); - // Time domain IMPULSE response - idft_size_idx_t idftsizeidx; - switch (NR_PRS_IDFT_OVERSAMP_FACTOR*frame_params->ofdm_symbol_size) { - case 128: - idftsizeidx = IDFT_128; - break; - - case 256: - idftsizeidx = IDFT_256; - break; - - case 512: - idftsizeidx = IDFT_512; - break; - - case 768: - idftsizeidx = IDFT_768; - break; - - case 1024: - idftsizeidx = IDFT_1024; - break; - - case 1536: - idftsizeidx = IDFT_1536; - break; - - case 2048: - idftsizeidx = IDFT_2048; - break; - - case 3072: - idftsizeidx = IDFT_3072; - break; - - case 4096: - idftsizeidx = IDFT_4096; - break; - - case 6144: - idftsizeidx = IDFT_6144; - break; - - // 16x IDFT oversampling - case 8192: - idftsizeidx = IDFT_8192; - break; - - case 12288: - idftsizeidx = IDFT_12288; - break; - - case 16384: - idftsizeidx = IDFT_16384; - break; - - case 24576: - idftsizeidx = IDFT_24576; - break; - - case 32768: - idftsizeidx = IDFT_32768; - break; - - case 49152: - idftsizeidx = IDFT_49152; - break; - - case 65536: - idftsizeidx = IDFT_65536; - break; - - default: - LOG_I(PHY, "%s: unsupported ofdm symbol size \n", __FUNCTION__); - assert(0); - } - - idft(idftsizeidx, - (int16_t *)&chF_interpol[rxAnt][0], - (int16_t *)&chT_interpol[rxAnt][0],1); + // Convert to time domain + freq2time(NR_PRS_IDFT_OVERSAMP_FACTOR * frame_params->ofdm_symbol_size, + (int16_t *)&chF_interpol[rxAnt][0], + (int16_t *)&chT_interpol[rxAnt][0]); // peak estimator mean_val = squaredMod(((c16_t *)ch_tmp)[(prs_cfg->NumRB * 12) >> 1]); @@ -647,7 +571,7 @@ c32_t nr_pbch_dmrs_correlation(const PHY_VARS_NR_UE *ue, unsigned int k = ue->frame_parms.Nid_cell % 4; - DEBUG_PBCH("PBCH DMRS Correlation : gNB_id %d , OFDM size %d, Ncp=%d, k=%d symbol %d\n", + DEBUG_PBCH("PBCH DMRS Correlation : gNB_id %d , OFDM size %d, Ncp=%d, k=%u symbol %d\n", proc->gNB_id, ue->frame_parms.ofdm_symbol_size, ue->frame_parms.Ncp, @@ -657,7 +581,7 @@ c32_t nr_pbch_dmrs_correlation(const PHY_VARS_NR_UE *ue, // generate pilot // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS c16_t pilot[200] __attribute__((aligned(16))); - nr_pbch_dmrs_rx(dmrss, nr_gold_pbch, pilot); + nr_pbch_dmrs_rx(dmrss, (uint32_t *)nr_gold_pbch, pilot, false); c32_t computed_val = {0}; for (int aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { @@ -666,7 +590,7 @@ c32_t nr_pbch_dmrs_correlation(const PHY_VARS_NR_UE *ue, const c16_t *rxF = &rxdataF[aarx][symbol_offset + k]; DEBUG_PBCH("pbch ch est pilot RB_DL %d\n", ue->frame_parms.N_RB_DL); - DEBUG_PBCH("k %d, first_carrier %d\n", k, ue->frame_parms.first_carrier_offset); + DEBUG_PBCH("k %u, first_carrier %d\n", k, ue->frame_parms.first_carrier_offset); // Treat first 2 pilots specially (left edge) computed_val = c32x16maddShift(*pil, rxF[re_offset], computed_val, 15); @@ -717,43 +641,66 @@ c32_t nr_pbch_dmrs_correlation(const PHY_VARS_NR_UE *ue, } int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, + NR_DL_FRAME_PARMS *fp, int estimateSz, struct complex16 dl_ch_estimates[][estimateSz], - struct complex16 dl_ch_estimates_time[][ue->frame_parms.ofdm_symbol_size], + struct complex16 dl_ch_estimates_time[][fp->ofdm_symbol_size], const UE_nr_rxtx_proc_t *proc, unsigned char symbol, int dmrss, uint8_t ssb_index, uint8_t n_hf, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) + c16_t rxdataF[][fp->samples_per_slot_wCP], + bool sidelink, + uint16_t Nid) { int Ns = proc->nr_slot_rx; c16_t pilot[200] __attribute__((aligned(16))); //int slot_pbch; - const int nushift = ue->frame_parms.Nid_cell % 4; - unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier; - if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size; + uint8_t nushift = 0, lastsymbol = 0, num_rbs = 0; + uint32_t *gold_seq = NULL; - const int ch_offset = ue->frame_parms.ofdm_symbol_size * symbol; + if (sidelink) { + AssertFatal(dmrss == 0 || (dmrss >= 5 && dmrss <= 12), "symbol %d is illegal for PSBCH DM-RS \n", dmrss); - AssertFatal(dmrss >= 0 && dmrss < 3, - "symbol %d is illegal for PBCH DM-RS \n", - dmrss); + sl_nr_ue_phy_params_t *sl_phy_params = &ue->SL_UE_PHY_PARAMS; - const int symbol_offset = ue->frame_parms.ofdm_symbol_size * symbol; + LOG_D(PHY, "PSBCH Channel Estimation SLSSID:%d\n", Nid); + gold_seq = sl_phy_params->init_params.psbch_dmrs_gold_sequences[Nid]; + lastsymbol = 12; + num_rbs = SL_NR_NUM_PSBCH_RBS_IN_ONE_SYMBOL; + + } else { + nushift = fp->Nid_cell % 4; + + AssertFatal(dmrss >= 0 && dmrss < 3, "symbol %d is illegal for PBCH DM-RS \n", dmrss); + + gold_seq = ue->nr_gold_pbch[n_hf][ssb_index]; + lastsymbol = 2; + num_rbs = 20; + } + + unsigned int ssb_offset = fp->first_carrier_offset + fp->ssb_start_subcarrier; + if (ssb_offset >= fp->ofdm_symbol_size) + ssb_offset -= fp->ofdm_symbol_size; + + const int ch_offset = fp->ofdm_symbol_size * symbol; + const int symbol_offset = fp->ofdm_symbol_size * symbol; const int k = nushift; - const c16_t *fl, *fm, *fr; + DEBUG_PBCH("PBCH Channel Estimation : gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n", proc->gNB_id, ch_offset, - ue->frame_parms.ofdm_symbol_size, - ue->frame_parms.Ncp, + fp->ofdm_symbol_size, + fp->Ncp, Ns, k, symbol); + const c16_t *fl, *fm, *fr; + switch (k) { case 0: fl = filt16a_l0; @@ -785,69 +732,20 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, break; } - idft_size_idx_t idftsizeidx; - - switch (ue->frame_parms.ofdm_symbol_size) { - case 128: - idftsizeidx = IDFT_128; - break; - - case 256: - idftsizeidx = IDFT_256; - break; - - case 512: - idftsizeidx = IDFT_512; - break; - - case 768: - idftsizeidx = IDFT_768; - break; - - case 1024: - idftsizeidx = IDFT_1024; - break; - - case 1536: - idftsizeidx = IDFT_1536; - break; - - case 2048: - idftsizeidx = IDFT_2048; - break; - - case 3072: - idftsizeidx = IDFT_3072; - break; - - case 4096: - idftsizeidx = IDFT_4096; - break; - - case 6144: - idftsizeidx = IDFT_6144; - break; - - default: - printf("unsupported ofdm symbol size \n"); - assert(0); - } - // generate pilot // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS - nr_pbch_dmrs_rx(dmrss, ue->nr_gold_pbch[n_hf][ssb_index], pilot); - - for (int aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { + nr_pbch_dmrs_rx(dmrss, gold_seq, &pilot[0], sidelink); + for (int aarx = 0; aarx < fp->nb_antennas_rx; aarx++) { int re_offset = ssb_offset; c16_t *pil = pilot; c16_t *rxF = &rxdataF[aarx][symbol_offset + k]; c16_t *dl_ch = &dl_ch_estimates[aarx][ch_offset]; - memset(dl_ch, 0, sizeof(c16_t) * ue->frame_parms.ofdm_symbol_size); + memset(dl_ch, 0, sizeof(c16_t) * fp->ofdm_symbol_size); - DEBUG_PBCH("pbch ch est pilot RB_DL %d\n", ue->frame_parms.N_RB_DL); - DEBUG_PBCH("k %d, first_carrier %d\n", k, ue->frame_parms.first_carrier_offset); + DEBUG_PBCH("pbch ch est pilot RB_DL %d\n", fp->N_RB_DL); + DEBUG_PBCH("k %d, first_carrier %d\n", k, fp->first_carrier_offset); // Treat first 2 pilots specially (left edge) c16_t ch; @@ -855,31 +753,31 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, DEBUG_PBCH("pilot 0: rxF= (%d,%d), ch= (%d,%d), pil=(%d,%d)\n", rxF[re_offset].r, rxF[re_offset].i, ch.r, ch.i, pil->r, pil->i); multaddRealVectorComplexScalar(fl, ch, dl_ch, 16); pil++; - re_offset = (re_offset + 4) % ue->frame_parms.ofdm_symbol_size; + re_offset = (re_offset + 4) % fp->ofdm_symbol_size; ch = c16mulShift(*pil, rxF[re_offset], 15); DEBUG_PBCH("pilot 1: rxF= (%d,%d), ch= (%d,%d), pil=(%d,%d)\n", rxF[re_offset].r, rxF[re_offset].i, ch.r, ch.i, pil->r, pil->i); multaddRealVectorComplexScalar(fm, ch, dl_ch, 16); pil++; - re_offset = (re_offset + 4) % ue->frame_parms.ofdm_symbol_size; + re_offset = (re_offset + 4) % fp->ofdm_symbol_size; ch = c16mulShift(*pil, rxF[re_offset], 15); DEBUG_PBCH("pilot 2: rxF= (%d,%d), ch= (%d,%d), pil=(%d,%d)\n", rxF[re_offset].r, rxF[re_offset].i, ch.r, ch.i, pil->r, pil->i); multaddRealVectorComplexScalar(fr, ch, dl_ch, 16); pil++; - re_offset = (re_offset + 4) % ue->frame_parms.ofdm_symbol_size; + re_offset = (re_offset + 4) % fp->ofdm_symbol_size; dl_ch += 24; - for (int pilot_cnt = 3; pilot_cnt < (3 * 20); pilot_cnt += 3) { + for (int pilot_cnt = 3; pilot_cnt < (3 * num_rbs); pilot_cnt += 3) { // if (pilot_cnt == 30) // rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k)]; // in 2nd symbol, skip middle REs (48 with DMRS, 144 for SSS, and another 48 with DMRS) if (dmrss == 1 && pilot_cnt == 12) { pilot_cnt=48; - re_offset = (re_offset + 144) % ue->frame_parms.ofdm_symbol_size; + re_offset = (re_offset + 144) % fp->ofdm_symbol_size; dl_ch += 288; } ch = c16mulShift(*pil, rxF[re_offset], 15); @@ -894,7 +792,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, multaddRealVectorComplexScalar(fl, ch, dl_ch, 16); pil++; - re_offset = (re_offset+4) % ue->frame_parms.ofdm_symbol_size; + re_offset = (re_offset + 4) % fp->ofdm_symbol_size; ch = c16mulShift(*pil, rxF[re_offset], 15); DEBUG_PBCH("pilot %u: rxF= (%d,%d), ch= (%d,%d), pil=(%d,%d)\n", pilot_cnt + 1, @@ -906,7 +804,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, pil->i); multaddRealVectorComplexScalar(fm, ch, dl_ch, 16); pil++; - re_offset = (re_offset+4) % ue->frame_parms.ofdm_symbol_size; + re_offset = (re_offset + 4) % fp->ofdm_symbol_size; ch = c16mulShift(*pil, rxF[re_offset], 15); DEBUG_PBCH("pilot %u: rxF= (%d,%d), ch= (%d,%d), pil=(%d,%d)\n", pilot_cnt + 2, @@ -918,29 +816,22 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, pil->i); multaddRealVectorComplexScalar(fr, ch, dl_ch, 16); pil++; - re_offset = (re_offset + 4) % ue->frame_parms.ofdm_symbol_size; + re_offset = (re_offset + 4) % fp->ofdm_symbol_size; dl_ch += 12; } - if( dmrss == 2) // update time statistics for last PBCH symbol + if (dmrss == lastsymbol) // update time statistics for last PBCH symbol { // do ifft of channel estimate LOG_D(PHY,"Channel Impulse Computation Slot %d Symbol %d ch_offset %d\n", Ns, symbol, ch_offset); - idft(idftsizeidx, - (int16_t*) &dl_ch_estimates[aarx][ch_offset], - (int16_t*) dl_ch_estimates_time[aarx], - 1); + freq2time(ue->frame_parms.ofdm_symbol_size, + (int16_t *)&dl_ch_estimates[aarx][ch_offset], + (int16_t *)&dl_ch_estimates_time[aarx]); } } - if (dmrss == 2) - UEscopeCopy(ue, - pbchDlChEstimateTime, - (void *)dl_ch_estimates_time, - sizeof(c16_t), - ue->frame_parms.nb_antennas_rx, - ue->frame_parms.ofdm_symbol_size, - 0); + if (!sidelink && dmrss == lastsymbol) + UEscopeCopy(ue, pbchDlChEstimateTime, (void *)dl_ch_estimates_time, sizeof(c16_t), fp->nb_antennas_rx, fp->ofdm_symbol_size, 0); return(0); } @@ -1336,7 +1227,6 @@ void NFAPI_NR_DMRS_TYPE1_average_prb(NR_DL_FRAME_PARMS *frame_parms, for (int i = 0; i < 2 * P_average; i++) { dl_ch[i] = ch; } - dl_ch += 2 * P_average; #else dl_ch[3].r += (ch.r * 1365) >> 15; // 1/12*16384 dl_ch[3].i += (ch.i * 1365) >> 15; // 1/12*16384 @@ -1488,7 +1378,6 @@ void NFAPI_NR_DMRS_TYPE2_average_prb(NR_DL_FRAME_PARMS *frame_parms, for (int i = 0; i < 3 * P_average; i++) { dl_ch[i] = ch; } - dl_ch += 3 * P_average; #else dl_ch[3].r += (ch.r * 1365) >> 15; // 1/12*16384 dl_ch[3].i += (ch.i * 1365) >> 15; // 1/12*16384 diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index 5b1e43f953..157250a413 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -65,15 +65,18 @@ c32_t nr_pbch_dmrs_correlation(const PHY_VARS_NR_UE *ue, const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]); int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, + NR_DL_FRAME_PARMS *fp, int estimateSz, struct complex16 dl_ch_estimates[][estimateSz], - struct complex16 dl_ch_estimates_time[][ue->frame_parms.ofdm_symbol_size], + struct complex16 dl_ch_estimates_time[][fp->ofdm_symbol_size], const UE_nr_rxtx_proc_t *proc, unsigned char symbol, int dmrss, uint8_t ssb_index, uint8_t n_hf, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]); + c16_t rxdataF[][fp->samples_per_slot_wCP], + bool sidelink, + uint16_t Nid); int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, @@ -137,5 +140,10 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, NR_UE_DLSCH_t dlsch[2]); float_t get_nr_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t gNB_index); + +void nr_sl_psbch_rsrp_measurements(sl_nr_ue_phy_params_t *sl_phy_params, + NR_DL_FRAME_PARMS *fp, + c16_t rxdataF[][fp->samples_per_slot_wCP], + bool use_SSS); /** @}*/ #endif diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c index c21a6a709f..8cd33743dd 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c @@ -309,3 +309,51 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue, ue->measurements.n0_power_tot_dB + 30 - 10 * log10(pow(2, 30)) - dB_fixed(ue->frame_parms.ofdm_symbol_size) - ((int)rx_gain - (int)rx_gain_offset)); } + +// PSBCH RSRP calculations according to 38.215 section 5.1.22 +void nr_sl_psbch_rsrp_measurements(sl_nr_ue_phy_params_t *sl_phy_params, + NR_DL_FRAME_PARMS *fp, + c16_t rxdataF[][fp->samples_per_slot_wCP], + bool use_SSS) +{ + SL_NR_UE_PSBCH_t *psbch_rx = &sl_phy_params->psbch; + uint8_t numsym = (fp->Ncp) ? SL_NR_NUM_SYMBOLS_SSB_EXT_CP : SL_NR_NUM_SYMBOLS_SSB_NORMAL_CP; + uint32_t re_offset = fp->first_carrier_offset + fp->ssb_start_subcarrier; + uint32_t rsrp = 0, num_re = 0; + + LOG_D(PHY, "PSBCH RSRP MEAS: numsym:%d, re_offset:%d\n", numsym, re_offset); + + for (int aarx = 0; aarx < fp->nb_antennas_rx; aarx++) { + // Calculate PSBCH RSRP based from DMRS REs + for (uint8_t symbol = 0; symbol < numsym;) { + struct complex16 *rxF = &rxdataF[aarx][symbol * fp->ofdm_symbol_size]; + + for (int re = 0; re < SL_NR_NUM_PSBCH_RE_IN_ONE_SYMBOL; re++) { + if (re % 4 == 0) { // DMRS RE + uint16_t offset = (re_offset + re) % fp->ofdm_symbol_size; + + rsrp += c16amp2(rxF[offset]); + num_re++; + } + } + symbol = (symbol == 0) ? 5 : symbol + 1; + } + } + + if (use_SSS) { + // TBD... + // UE can decide between using only PSBCH DMRS or PSBCH DMRS and SSS for PSBCH RSRP computation. + // If needed this can be implemented. Reference Spec 38.215 + } + + psbch_rx->rsrp_dB_per_RE = 10 * log10(rsrp / num_re); + psbch_rx->rsrp_dBm_per_RE = psbch_rx->rsrp_dB_per_RE + 30 - 10 * log10(pow(2, 30)) + - ((int)openair0_cfg[0].rx_gain[0] - (int)openair0_cfg[0].rx_gain_offset[0]) + - dB_fixed(fp->ofdm_symbol_size); + + LOG_I(PHY, + "PSBCH RSRP (DMRS REs): numREs:%d RSRP :%d dB/RE ,RSRP:%d dBm/RE\n", + num_re, + psbch_rx->rsrp_dB_per_RE, + psbch_rx->rsrp_dBm_per_RE); +} diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 97c3af3b1e..c8c7f6e73d 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -101,6 +101,7 @@ static bool nr_pbch_detection(const UE_nr_rxtx_proc_t *proc, for(int i=pbch_initial_symbol; iframe_parms, estimateSz, dl_ch_estimates, dl_ch_estimates_time, @@ -109,7 +110,9 @@ static bool nr_pbch_detection(const UE_nr_rxtx_proc_t *proc, i - pbch_initial_symbol, ssb->i_ssb, ssb->n_hf, - rxdataF); + rxdataF, + false, + frame_parms->Nid_cell); stop_meas(&ue->dlsch_channel_estimation_stats); fapiPbch_t result = {0}; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c new file mode 100644 index 0000000000..e18a6a1633 --- /dev/null +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c @@ -0,0 +1,552 @@ +#include "PHY/defs_nr_UE.h" +#include "PHY/TOOLS/tools_defs.h" +#include "PHY/NR_REFSIG/sss_nr.h" +#include "PHY/NR_UE_ESTIMATION/nr_estimation.h" +#include "PHY/MODULATION/modulation_UE.h" +#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" +#include "SCHED_NR_UE/defs.h" + +// Number of symbols carrying SLSS signal - PSS+SSS+PSBCH +#define SL_NR_NUMSYM_SLSS_NORMAL_CP 14 +#define SL_NR_MAX_RX_ANTENNA 1 +#define SL_NR_FIRST_PSS_SYMBOL 1 +#define SL_NR_FIRST_SSS_SYMBOL 3 +#define SL_NR_NUM_PSS_SSS_SYMBOLS 4 + +// #define SL_DEBUG + +static int sl_nr_pss_correlation(PHY_VARS_NR_UE *UE, int frame_index) +{ + sl_nr_ue_phy_params_t *sl_ue = &UE->SL_UE_PHY_PARAMS; + SL_NR_SYNC_PARAMS_t *sync_params = &sl_ue->sync_params; + NR_DL_FRAME_PARMS *sl_fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params; + int16_t **pss_for_correlation = (int16_t **)sl_ue->init_params.sl_pss_for_correlation; + + uint32_t length = (frame_index == 0) ? sl_fp->samples_per_frame + (2 * sl_fp->ofdm_symbol_size) : sl_fp->samples_per_frame; + int32_t **rxdata = (int32_t **)UE->common_vars.rxdata; + +#ifdef SL_DEBUG + char fname[50], sname[25]; + sprintf(fname, "rxdata_frame_%d.m", frame_index); + sprintf(sname, "rxd_frame%d", frame_index); + LOG_M(fname, sname, &rxdata[0][frame_index * sl_fp->samples_per_frame], sl_fp->samples_per_frame, 1, 1); + LOG_M("pss_for_correlation0.m", "pss_id0", pss_for_correlation[0], 2048, 1, 1); + LOG_M("pss_for_correlation1.m", "pss_id1", pss_for_correlation[1], 2048, 1, 1); + + int64_t *pss_corr_debug_values[SL_NR_NUM_IDs_IN_PSS]; +#endif + + int maxval = 0; + for (int i = 0; i < 2 * (sl_fp->ofdm_symbol_size); i++) { + maxval = max(maxval, pss_for_correlation[0][i]); + maxval = max(maxval, -pss_for_correlation[0][i]); + maxval = max(maxval, pss_for_correlation[1][i]); + maxval = max(maxval, -pss_for_correlation[1][i]); + } + + int shift = log2_approx(maxval); //*(sl_fp->ofdm_symbol_size + sl_fp->nb_prefix_samples)*2); + +#ifdef SL_DEBUG + LOG_I(PHY, "SIDELINK SLSS SEARCH: Function:%s\n", __func__); + LOG_I(PHY, "maxval:%d, shift:%d\n", maxval, shift); +#endif + + int64_t avg[SL_NR_NUM_IDs_IN_PSS] = {0}; + int64_t peak_value = 0, psss_corr_value = 0; + unsigned int peak_position = 0, pss_source = 0; + for (int pss_index = 0; pss_index < SL_NR_NUM_IDs_IN_PSS; pss_index++) + avg[pss_index] = 0; + +#ifdef SL_DEBUG + int64_t *pss_corr_debug_values[SL_NR_NUM_IDs_IN_PSS]; + for (int pss_index = 0; pss_index < SL_NR_NUM_IDs_IN_PSS; pss_index++) + pss_corr_debug_values[pss_index] = malloc16_clear(length * sizeof(int64_t)); +#endif + + for (int n = 0; n < length - sl_fp->ofdm_symbol_size; n += 4) { // + + for (int pss_index = 0; pss_index < SL_NR_NUM_IDs_IN_PSS; pss_index++) { + psss_corr_value = 0; + + // calculate dot product of primary_synchro_time_nr and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n]; + for (int ar = 0; ar < sl_fp->nb_antennas_rx; ar++) { + /* perform correlation of rx data and pss sequence ie it is a dot product */ + const c32_t result = dot_product((c16_t *)pss_for_correlation[pss_index], + (c16_t *)&(rxdata[ar][n + frame_index * sl_fp->samples_per_frame]), + sl_fp->ofdm_symbol_size, + shift); + + const c64_t r64 = {.r = result.r, .i = result.i}; + psss_corr_value += squaredMod(r64); + +#ifdef SL_DEBUG + pss_corr_debug_values[pss_index][n] = psss_corr_value; + printf("frame:%d n:%d, pss_index:%d, pss_for_correlation[pss_index][0]:%x, rxdata[n]:%x\n", + frame_index, + n, + pss_index, + pss_for_correlation[pss_index][0], + rxdata[ar][n + frame_index * sl_fp->samples_per_frame]); + printf("result %lld, pss_corr_values[%d][%d]:%ld\n", result, pss_index, n, pss_corr_debug_values[pss_index][n]); + printf("pss_index %d: n %6u peak_value %15llu\n", pss_index, n, (unsigned long long)pss_corr_debug_values[pss_index][n]); + printf("peak_value:%ld, peak_position:%d, pss_source:%d\n", peak_value, peak_position, pss_source); +#endif + } + + // calculate the absolute value of sync_corr[n] + avg[pss_index] += psss_corr_value; + if (psss_corr_value > peak_value) { + peak_value = psss_corr_value; + peak_position = n; + pss_source = pss_index; + +#ifdef SL_DEBUG + printf("pss_index %d: n %6u peak_value %15llu\n", pss_index, n, (unsigned long long)psss_corr_value); +#endif + } + } + } + +#ifdef SL_DEBUG + LOG_M("pss_corr_debug_values_0.m", "pss_corr0", &pss_corr_debug_values[0][0], length, 1, 6); + LOG_M("pss_corr_debug_values_1.m", "pss_corr1", &pss_corr_debug_values[1][0], length, 1, 6); + + for (int pss_index = 0; pss_index < SL_NR_NUM_IDs_IN_PSS; pss_index++) { + free(pss_corr_debug_values[pss_index]); + } +#endif + + double ffo_est = 0; + if (UE->UE_fo_compensation) { // Not tested + + // fractional frequency offset computation according to Cross-correlation Synchronization Algorithm Using PSS + // Shoujun Huang, Yongtao Su, Ying He and Shan Tang, "Joint time and frequency offset estimation in LTE downlink," 7th + // International Conference on Communications and Networking in China, 2012. + + c16_t *pss = (c16_t *)pss_for_correlation[pss_source]; + c16_t *rxd = (c16_t *)&(rxdata[0][peak_position + frame_index * sl_fp->samples_per_frame]); + int half_symbol = sl_fp->ofdm_symbol_size >> 1; + + // Computing cross-correlation at peak on half the symbol size for first half of data + c32_t r1 = dot_product(pss, rxd, half_symbol, shift); + + // Computing cross-correlation at peak on half the symbol size for data shifted by half symbol size + // as it is real and complex it is necessary to shift by a value equal to symbol size to obtain such shift + c32_t r2 = dot_product(pss + half_symbol, rxd + half_symbol, half_symbol, shift); + + cd_t r1d = {r1.r, r1.i}, r2d = {r2.r, r2.i}; + // estimation of fractional frequency offset: angle[(result1)'*(result2)]/pi + ffo_est = atan2(r1d.r * r2d.i - r2d.r * r1d.i, r1d.r * r2d.r + r1d.i * r2d.i) / M_PI; + +#ifdef SL_DEBUG + printf("ffo %lf\n", ffo_est); +#endif + } + + // computing absolute value of frequency offset + sync_params->freq_offset = ffo_est * sl_fp->subcarrier_spacing; + + for (int pss_index = 0; pss_index < SL_NR_NUM_IDs_IN_PSS; pss_index++) + avg[pss_index] /= (length / 4); + + sync_params->N_sl_id2 = pss_source; + + LOG_I(PHY, + "PSS Source = %d, Peak found at pos %d, val = %llu (%d dB) avg %d dB, ffo %lf, freq offset:%d Hz\n", + pss_source, + peak_position, + (unsigned long long)peak_value, + dB_fixed64(peak_value), + dB_fixed64(avg[pss_source]), + ffo_est, + sync_params->freq_offset); + + if (peak_value < 5 * avg[pss_source]) + return (-1); + + return peak_position; +} + +static void sl_nr_extract_sss(PHY_VARS_NR_UE *ue, + UE_nr_rxtx_proc_t *proc, + int32_t *tot_metric, + uint8_t *phase_max, + c16_t rxdataF[][ue->SL_UE_PHY_PARAMS.sl_frame_params.samples_per_slot_wCP]) +{ + c16_t pss_ext[SL_NR_MAX_RX_ANTENNA][SL_NR_NUM_PSS_SYMBOLS][SL_NR_PSS_SEQUENCE_LENGTH]; + c16_t sss_ext[SL_NR_MAX_RX_ANTENNA][SL_NR_NUM_SSS_SYMBOLS][SL_NR_PSS_SEQUENCE_LENGTH]; + uint8_t Nid2 = ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id2; + NR_DL_FRAME_PARMS *sl_fp = &ue->SL_UE_PHY_PARAMS.sl_frame_params; + int16_t *d; + uint16_t Nid1 = 0; + uint8_t phase; + c16_t *rxF_ext; + + for (int aarx = 0; aarx < sl_fp->nb_antennas_rx; aarx++) { + unsigned int ofdm_symbol_size = sl_fp->ofdm_symbol_size; + + // pss, sss extraction + for (int sym = SL_NR_FIRST_PSS_SYMBOL; sym < SL_NR_FIRST_PSS_SYMBOL + SL_NR_NUM_PSS_SSS_SYMBOLS; sym++) { + if (sym < SL_NR_FIRST_PSS_SYMBOL + SL_NR_NUM_PSS_SYMBOLS) { + rxF_ext = &pss_ext[aarx][sym - SL_NR_FIRST_PSS_SYMBOL][0]; + } else { + rxF_ext = &sss_ext[aarx][sym - SL_NR_FIRST_SSS_SYMBOL][0]; + } + + unsigned int k = sl_fp->first_carrier_offset + sl_fp->ssb_start_subcarrier + 2; + if (k >= ofdm_symbol_size) + k -= ofdm_symbol_size; + + LOG_D(PHY, + "firstcarrieroffset:%d, ssb_sc:%d, k:%d, symbol:%d\n", + sl_fp->first_carrier_offset, + sl_fp->ssb_start_subcarrier, + k, + sym); + + for (int i = 0; i < SL_NR_PSS_SEQUENCE_LENGTH; i++) { + rxF_ext[i] = rxdataF[aarx][sym * ofdm_symbol_size + k]; + k++; + if (k == ofdm_symbol_size) + k = 0; + } + } + + LOG_D(PHY, "SIDELINK SLSS SEARCH: EXTRACTION OF PSS, SSS done\n"); + +#ifdef SL_DEBUG + LOG_M("pss_ext_sym1.m", "pss_ext1", &pss_ext[aarx][0][0], SL_NR_PSS_SEQUENCE_LENGTH, 1, 1); + LOG_M("pss_ext_sym2.m", "pss_ext2", &pss_ext[aarx][1][0], SL_NR_PSS_SEQUENCE_LENGTH, 1, 1); + LOG_M("sss_ext_sym3.m", "sss_ext3", &sss_ext[aarx][0][0], SL_NR_PSS_SEQUENCE_LENGTH, 1, 1); + LOG_M("sss_ext_sym4.m", "sss_ext4", &sss_ext[aarx][1][0], SL_NR_PSS_SEQUENCE_LENGTH, 1, 1); +#endif + + // get conjugated channel estimate from PSS, H* = R* \cdot PSS + // and do channel estimation and compensation based on PSS + int16_t *pss = ue->SL_UE_PHY_PARAMS.init_params.sl_pss_for_sync[Nid2]; + c16_t *pss_ext2, *sss_ext2; + + // 2 Symbols each for PSS and SSS + for (int j = 0; j < SL_NR_NUM_PSS_OR_SSS_SYMBOLS; j++) { + sss_ext2 = &sss_ext[aarx][j][0]; + pss_ext2 = &pss_ext[aarx][j][0]; + + for (int i = 0; i < SL_NR_PSS_SEQUENCE_LENGTH; i++) { + // This is H*(PSS) = R* \cdot PSS + c16_t tmp = {.r = (pss_ext2[i].r * pss[i]), .i = (-pss_ext2[i].i * pss[i])}; + + int amp = c16amp2(tmp); + int shift = log2_approx(amp) / 2; + + // This is R(SSS) \cdot H*(PSS) + c16_t tmp2 = c16mulShift(tmp, sss_ext2[i], shift); + + // MRC on RX antennas + // sss_ext now contains the compensated SSS + if (aarx == 0) { + sss_ext2[i].r = tmp2.r; + sss_ext2[i].i = tmp2.i; + } else { + AssertFatal(1 == 0, "SIDELINK MORE THAN 1 RX ANTENNA NOT YET SUPPORTED\n"); + } + } + } + + LOG_D(PHY, "SIDELINK SLSS SEARCH: Ch. estimation SSS done\n"); + } + + /* + + #ifdef SL_DEBUG + + write_output("rxsig0.m","rxs0",&ue->common_vars.rxdata[0][0],ue->frame_parms.samples_per_subframe,1,1); + write_output("rxdataF0_pss.m","rxF0_pss",&ue->common_vars.rxdataF[0][0],frame_parms->ofdm_symbol_size,1,1); + write_output("rxdataF0_sss.m","rxF0_sss",&ue->common_vars.rxdataF[0][(SSS_SYMBOL_NB-PSS_SYMBOL_NB)*frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size,1,1); + write_output("pss_ext.m","pss_ext",pss_ext,LENGTH_PSS_NR,1,1); + + #endif + */ + + /* for phase evaluation, one uses an array of possible phase shifts */ + /* then a correlation is done between received signal with a shift pĥase and the reference signal */ + /* Computation of signal with shift phase is based on below formula */ + /* cosinus cos(x + y) = cos(x)cos(y) - sin(x)sin(y) */ + /* sinus sin(x + y) = sin(x)cos(y) + cos(x)sin(y) */ + + // now do the SSS detection based on the pre computed SSS sequences + *tot_metric = INT_MIN; + c16_t *sss = &sss_ext[0][0][0]; + + for (uint16_t id1 = 0; id1 < SL_NR_NUM_IDs_IN_SSS; id1++) { // all possible SSS Nid1 values + for (phase = 0; phase < PHASE_HYPOTHESIS_NUMBER; phase++) { // phase offset between PSS and SSS + + int32_t metric = 0, metric_re = 0; + + d = (int16_t *)&ue->SL_UE_PHY_PARAMS.init_params.sl_sss_for_sync[Nid2 * SL_NR_NUM_IDs_IN_SSS + id1]; + + // This is the inner product using one particular value of each unknown parameter + for (int i = 0; i < SL_NR_SSS_SEQUENCE_LENGTH; i++) { + metric_re += d[i] * (((int64_t)phase_nr[phase].r * sss[i].r - phase_nr[phase].i * sss[i].i) >> 15); + } + + metric = metric_re; + + // if the current metric is better than the last save it + if (metric > *tot_metric) { + *tot_metric = metric; + Nid1 = id1; + *phase_max = phase; + + LOG_D(PHY, + "(phase,Nid1) (%d,%d), metric_phase %d tot_metric %d, phase_max %d \n", + phase, + Nid1, + metric, + *tot_metric, + *phase_max); + } + } + } + + ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id1 = Nid1; + ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id = + ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id1 + SL_NR_NUM_IDs_IN_SSS * ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id2; + LOG_I(PHY, + "UE[%d]NR-SL SLSS SEARCH: SSS Processing over. id2 from SSS:%d, id1 from PSS:%d, SLSS id:%d\n", + ue->Mod_id, + ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id1, + ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id2, + ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id); + +#ifdef SL_DEBUG +#define SSS_METRIC_FLOOR_NR (30000) + if (*tot_metric > SSS_METRIC_FLOOR_NR) { + Nid2 = ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id2; + Nid1 = ue->SL_UE_PHY_PARAMS.sync_params.N_sl_id1; + printf("Nid2 %d Nid1 %d tot_metric %d, phase_max %d \n", Nid2, Nid1, *tot_metric, *phase_max); + } +#endif + + return; +} + +// Right now 2 frames worth of samples get processed for PSS in OAI. +// For PSS in Sidelink, worst case 1 SSB in 16 frames can be present +// Hence 16 frames worth of samples needs to be correlated to find the PSS. +nr_initial_sync_t sl_nr_slss_search(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc, int num_frames) +{ + sl_nr_ue_phy_params_t *sl_ue = &UE->SL_UE_PHY_PARAMS; + SL_NR_SYNC_PARAMS_t *sync_params = &sl_ue->sync_params; + NR_DL_FRAME_PARMS *sl_fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params; + + int32_t sync_pos = -1; // sync_pos_frame = -1; + int32_t metric_tdd_ncp = 0; + uint8_t phase_tdd_ncp; + double im, re; + int ret = -1; + uint16_t rx_slss_id = 65535; + + nr_initial_sync_t result = {true, 0}; + +#ifdef SL_DEBUG_SEARCH_SLSS + LOG_D(PHY, "SIDELINK SEARCH SLSS: Function:%s\n", __func__); +#endif + + /* Initial synchronisation + * + * 1 radio frame = 10 ms + * <---------------------------------------------------------------------------> + * | Received UE data buffer | + * ---------------------------------------------------------------------------- + * <-------------->|psbch|pss|pss|sss|sss|psbch sym5-sym 12|sym13 - guard| + * sync_pos SS/PSBCH block + */ + + // initial sync performed on 16 successive frames. Worst case - one PSBCH can be sent in 16 frames. + // If psbch passes on first frame, no need to process second frame + // Problem with the frame approach is that + // --------- SSB can be on the boundary between frames. In this case if only 1 SSB is sent we will miss it. + // rxdata will hold 16 frames + slot worth of samples. This needs to be processed to find the best SSB + for (int frame_index = 0; frame_index < num_frames; frame_index++) { + /* process pss search on received buffer */ + sync_pos = sl_nr_pss_correlation(UE, frame_index); + + if (sync_pos == -1) { + LOG_I(PHY, "SIDELINK SEARCH SLSS: No PSSS found in this frame\n"); + continue; + } + + sync_pos += frame_index * sl_fp->samples_per_frame; // position in the num_frames frame samples + + for (int pss_sym = 1; pss_sym < 3; pss_sym++) { + // Now Sync pos can point to PSS 1st symbol or 2nd symbol. + // Right now implemented the strategy to try both locations for FFT + // Think about a better correlation strategy + if (pss_sym == 1) { // Check if sync pos points to SYMBOL1 - first symbol of PSS location + if (sync_pos > sl_fp->nb_prefix_samples0 + sl_fp->ofdm_symbol_size + sl_fp->nb_prefix_samples) + sync_params->ssb_offset = sync_pos - (sl_fp->nb_prefix_samples0 + sl_fp->ofdm_symbol_size + sl_fp->nb_prefix_samples); + else + sync_params->ssb_offset = sync_pos + sl_fp->samples_per_frame + - (sl_fp->nb_prefix_samples0 + sl_fp->ofdm_symbol_size + sl_fp->nb_prefix_samples); + } else { // Check if sync pos points to SYMBOL2 - second symbol of PSS location + if (sync_pos >= sl_fp->nb_prefix_samples0 + 2 * (sl_fp->ofdm_symbol_size + sl_fp->nb_prefix_samples)) + sync_params->ssb_offset = + sync_pos - (sl_fp->nb_prefix_samples0 + 2 * (sl_fp->ofdm_symbol_size + sl_fp->nb_prefix_samples)); + else + sync_params->ssb_offset = sync_pos + sl_fp->samples_per_frame + - (sl_fp->nb_prefix_samples0 + 2 * (sl_fp->ofdm_symbol_size + sl_fp->nb_prefix_samples)); + } + + LOG_I(PHY, + "UE[%d]SIDELINK SEARCH SLSS: PSS Peak at %d, PSS sym:%d, Estimated PSS position %d\n", + UE->Mod_id, + sync_pos, + pss_sym, + sync_params->ssb_offset); + + int slss_block_samples = (SL_NR_NUMSYM_SLSS_NORMAL_CP * sl_fp->ofdm_symbol_size) + + (SL_NR_NUMSYM_SLSS_NORMAL_CP - 1) * sl_fp->nb_prefix_samples + sl_fp->nb_prefix_samples0; + + int ssb_end_position = sync_params->ssb_offset + slss_block_samples; + + LOG_D(PHY, + "ssb_end:%d ssb block samples:%d total samples: %d\n", + ssb_end_position, + slss_block_samples, + num_frames * sl_fp->samples_per_frame); + + /* check that SSS/PBCH block is continuous inside the received buffer */ + if (ssb_end_position < num_frames * sl_fp->samples_per_frame) { + // digital compensation of FFO for SSB symbols + if (UE->UE_fo_compensation) { // This code to be checked. Why do we do this before PSS detection is successful? + double s_time = 1 / (1.0e3 * sl_fp->samples_per_subframe); // sampling time + double off_angle = -2 * M_PI * s_time * (sync_params->freq_offset); // offset rotation angle compensation per sample + + int start = sync_params->ssb_offset; // start for offset correction is at ssb_offset (pss time position) + // Adapt this for other numerologies number of symbols with larger cp increases TBD + int end = ssb_end_position; // loop over samples in all symbols (ssb size), including prefix + + LOG_I(PHY, + "SLSS SEARCH: FREQ comp of SLSS samples. Freq_OFSET:%d, startpos:%d, end_pos:%d\n", + sync_params->freq_offset, + start, + end); + for (int n = start; n < end; n++) { + for (int ar = 0; ar < sl_fp->nb_antennas_rx; ar++) { + re = ((double)(((short *)UE->common_vars.rxdata[ar]))[2 * n]); + im = ((double)(((short *)UE->common_vars.rxdata[ar]))[2 * n + 1]); + ((short *)UE->common_vars.rxdata[ar])[2 * n] = (short)(round(re * cos(n * off_angle) - im * sin(n * off_angle))); + ((short *)UE->common_vars.rxdata[ar])[2 * n + 1] = (short)(round(re * sin(n * off_angle) + im * cos(n * off_angle))); + } + } + } + + NR_DL_FRAME_PARMS *frame_parms = &UE->SL_UE_PHY_PARAMS.sl_frame_params; + const uint32_t rxdataF_sz = frame_parms->samples_per_slot_wCP; + __attribute__((aligned(32))) c16_t rxdataF[frame_parms->nb_antennas_rx][rxdataF_sz]; + + /* In order to achieve correct processing for NR prefix samples is forced to 0 and then restored after function call */ + for (int symbol = 0; symbol < SL_NR_NUMSYM_SLSS_NORMAL_CP; symbol++) { + sl_nr_slot_fep(UE, NULL, symbol, 0, sync_params->ssb_offset, rxdataF); + } + + sl_nr_extract_sss(UE, NULL, &metric_tdd_ncp, &phase_tdd_ncp, rxdataF); + + // save detected cell id to psbch + rx_slss_id = UE->SL_UE_PHY_PARAMS.sync_params.N_sl_id; + + __attribute__((aligned(32))) struct complex16 dl_ch_estimates[frame_parms->nb_antennas_rx][rxdataF_sz]; + __attribute__(( + aligned(32))) struct complex16 dl_ch_estimates_time[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size]; + + uint8_t decoded_output[4]; + + for (int symbol = 0; symbol < SL_NR_NUMSYM_SLSS_NORMAL_CP - 1;) { + nr_pbch_channel_estimation(UE, + frame_parms, + rxdataF_sz, + dl_ch_estimates, + dl_ch_estimates_time, + proc, + symbol, + symbol, + 0, + 0, + rxdataF, + 1, + rx_slss_id); + + symbol = (symbol == 0) ? 5 : symbol + 1; + } + + ret = nr_rx_psbch(UE, proc, rxdataF_sz, dl_ch_estimates, frame_parms, decoded_output, rxdataF, rx_slss_id); + + result.cell_detected = (ret == 0) ? true : false; + + if (result.cell_detected) { // Check this later TBD + // sync at symbol ue->symbol_offset + // computing the offset wrt the beginning of the frame + // SSB located at symbol 0 + sync_params->remaining_frames = + (num_frames * sl_fp->samples_per_frame - sync_params->ssb_offset) / sl_fp->samples_per_frame; + // ssb_offset points to start of sl-ssb + // rx_offset points to remaining samples needed to fill a frame + sync_params->rx_offset = sync_params->ssb_offset % sl_fp->samples_per_frame; + + LOG_I(PHY, + "UE[%d]SIDELINK SLSS SEARCH: PSBCH RX OK. Remainingframes:%d, rx_offset:%d\n", + UE->Mod_id, + sync_params->remaining_frames, + sync_params->rx_offset); + + uint32_t psbch_payload = (*(uint32_t *)decoded_output); + // retrieve DFN and slot number from SL-MIB + sync_params->DFN = (((psbch_payload & 0x0700) >> 1) | ((psbch_payload & 0xFE0000) >> 17)); + sync_params->slot_offset = (((psbch_payload & 0x010000) >> 10) | ((psbch_payload & 0xFC000000) >> 26)); + + LOG_I(PHY, + "UE[%d]SIDELINK SLSS SEARCH: SL-MIB: DFN:%d, slot:%d.\n", + UE->Mod_id, + sync_params->DFN, + sync_params->slot_offset); + + nr_sl_psbch_rsrp_measurements(sl_ue, frame_parms, rxdataF, false); + + UE->init_sync_frame = sync_params->remaining_frames; + result.rx_offset = sync_params->rx_offset; + + nr_sidelink_indication_t sl_indication; + sl_nr_rx_indication_t rx_ind = {0}; + uint16_t number_pdus = 1; + nr_fill_sl_indication(&sl_indication, &rx_ind, NULL, proc, UE, NULL); + nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, UE, number_pdus, proc, (void *)decoded_output, rx_slss_id); + + LOG_D(PHY, "Sidelink SLSS SEARCH PSBCH RX OK. Send SL-SSB TO MAC\n"); + + if (UE->if_inst && UE->if_inst->sl_indication) + UE->if_inst->sl_indication(&sl_indication); + + break; + } + + LOG_I(PHY, + "SIDELINK SLSS SEARCH: SLSS ID: %d metric %d, phase %d, psbch CRC %s\n", + sl_ue->sync_params.N_sl_id, + metric_tdd_ncp, + phase_tdd_ncp, + (ret == 0) ? "OK" : "NOT OK"); + + } else { + LOG_W(PHY, "SIDELINK SLSS SEARCH: Error: Not enough samples to process PSBCH. sync_pos %d\n", sync_pos); + } + } + if (result.cell_detected) + break; + } + + if (!result.cell_detected) { // PSBCH not found so indicate sync to higher layers and configure frame parameters + LOG_E(PHY, "SIDELINK SLSS SEARCH: PSBCH not received. Estimated PSS position:%d\n", sync_pos); + } + + return result; +} diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 52c9ec5394..f60d9c89ea 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -42,10 +42,7 @@ //#define DEBUG_PBCH //#define DEBUG_PBCH_ENCODING -//#include "PHY_INTERFACE/defs.h" - #define PBCH_A 24 -#define PBCH_MAX_RE_PER_SYMBOL (20*12) #define PBCH_MAX_RE (PBCH_MAX_RE_PER_SYMBOL*4) #define print_shorts(s,x) printf("%s : %d,%d,%d,%d,%d,%d,%d,%d\n",s,((int16_t*)x)[0],((int16_t*)x)[1],((int16_t*)x)[2],((int16_t*)x)[3],((int16_t*)x)[4],((int16_t*)x)[5],((int16_t*)x)[6],((int16_t*)x)[7]) @@ -69,15 +66,17 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, for (aarx=0; aarxnb_antennas_rx; aarx++) { unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; rx_offset = (rx_offset)%(frame_parms->ofdm_symbol_size); - struct complex16 *rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size]; - struct complex16 *rxF_ext = rxdataF_ext[aarx]; + struct complex16 *rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size]; + struct complex16 *rxF_ext = rxdataF_ext[aarx]; #ifdef DEBUG_PBCH - printf("extract_rbs (nushift %d): rx_offset=%d, symbol %u\n",frame_parms->nushift, - (rx_offset + ((symbol+s_offset)*(frame_parms->ofdm_symbol_size))),symbol); + printf("extract_rbs (nushift %d): rx_offset=%d, symbol %u\n", + nushiftmod4, + (rx_offset + ((symbol+s_offset) * (frame_parms->ofdm_symbol_size))), + symbol); int16_t *p = (int16_t *)rxF; for (int i =0; i<8; i++) { - printf("rxF [%d]= %d\n",i,rxF[i]); + printf("rxF.r [%d]= %d rxF.i [%d]= %d\n", i, rxF[i].r, i, rxF[i].i); printf("pbch extract rxF %d %d addr %p\n", p[2*i], p[2*i+1], &p[2*i]); } @@ -94,10 +93,12 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, rxF_ext[j]=rxF[rx_offset]; #ifdef DEBUG_PBCH printf("rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n", - (9*rb) + j, - rxF_ext[j].r, rxF_ext[j].i, + (9 * rb) + j, + rxF_ext[j].r, + rxF_ext[j].i, rx_offset, - rxF[rx_offset].r,rxF[rx_offset].j; + rxF[rx_offset].r, + rxF[rx_offset].i); #endif j++; } @@ -115,10 +116,13 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, (i!=(nushiftmod4+8))) { rxF_ext[j]=rxF[rx_offset]; #ifdef DEBUG_PBCH - printf("rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n",(rb<4) ? (9*rb) + j : (9*(rb-12))+j, - rxF_ext[j].r, rxF_ext[j].i, + printf("rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n", + (rb < 4) ? (9 * rb) + j : (9 * (rb - 12)) + j, + rxF_ext[j].r, + rxF_ext[j].i, rx_offset, - rxF[rx_offset].r,rxF[rx_offset].j; + rxF[rx_offset].r, + rxF[rx_offset].i); #endif j++; } @@ -149,11 +153,14 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, (i!=(nushiftmod4+8))) { dl_ch0_ext[j]=dl_ch0[i]; #ifdef DEBUG_PBCH - if ((rb==0) && (i<2)) - printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n",j, - dl_ch0_ext[j].r, dl_ch0_ext[j].i, + if ((rb == 0) && (i < 2)) + printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n", + j, + dl_ch0_ext[j].r, + dl_ch0_ext[j].i, i, - dl_ch0[j].r, dl_ch0[j].i, + dl_ch0[j].r, + dl_ch0[j].i); #endif j++; } @@ -169,10 +176,13 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, (i!=(nushiftmod4+8))) { dl_ch0_ext[j]=dl_ch0[i]; #ifdef DEBUG_PBCH - printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n",j, - dl_ch0_ext[j].r, dl_ch0_ext[j].i, + printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n", + j, + dl_ch0_ext[j].r, + dl_ch0_ext[j].i, i, - dl_ch0[j].r, dl_ch0[j].i, + dl_ch0[j].r, + dl_ch0[j].i); #endif j++; } @@ -230,20 +240,19 @@ int nr_pbch_channel_level(struct complex16 dl_ch_estimates_ext[][PBCH_MAX_RE_PER return(avg2); } -static void nr_pbch_channel_compensation(struct complex16 rxdataF_ext[][PBCH_MAX_RE_PER_SYMBOL], - struct complex16 dl_ch_estimates_ext[][PBCH_MAX_RE_PER_SYMBOL], - int nb_re, - struct complex16 rxdataF_comp[][PBCH_MAX_RE_PER_SYMBOL], - NR_DL_FRAME_PARMS *frame_parms, - uint8_t output_shift) { +void nr_pbch_channel_compensation(struct complex16 rxdataF_ext[][PBCH_MAX_RE_PER_SYMBOL], + struct complex16 dl_ch_estimates_ext[][PBCH_MAX_RE_PER_SYMBOL], + int nb_re, + struct complex16 rxdataF_comp[][PBCH_MAX_RE_PER_SYMBOL], + NR_DL_FRAME_PARMS *frame_parms, + uint8_t output_shift) +{ for (int aarx=0; aarxnb_antennas_rx; aarx++) { simde__m128i *dl_ch128 = (simde__m128i *)dl_ch_estimates_ext[aarx]; simde__m128i *rxdataF128 = (simde__m128i *)rxdataF_ext[aarx]; simde__m128i *rxdataF_comp128 = (simde__m128i *)rxdataF_comp[aarx]; - for (int re=0; re31) pbch_llr8[i]=32; @@ -425,7 +433,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, } #ifdef DEBUG_PBCH - LOG_I(PHY,"[PHY] PBCH log2_maxh = %d (%d)\n", log2_maxh, max_h); + LOG_I(PHY,"[PHY] PBCH log2_maxh = %f (%d)\n", log2_maxh, max_h); #endif __attribute__ ((aligned(32))) struct complex16 rxdataF_comp[frame_parms->nb_antennas_rx][PBCH_MAX_RE_PER_SYMBOL]; nr_pbch_channel_compensation(rxdataF_ext, @@ -452,12 +460,8 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, UEscopeCopy(ue, pbchRxdataF_comp, pbch_unClipped, sizeof(struct complex16), frame_parms->nb_antennas_rx, pbch_e_rx_idx / 2, 0); UEscopeCopy(ue, pbchLlr, pbch_e_rx, sizeof(int16_t), frame_parms->nb_antennas_rx, pbch_e_rx_idx, 0); #ifdef DEBUG_PBCH - write_output("rxdataF_comp.m","rxFcomp",rxdataF_comp[0],240*3,1,1); - short *p = (short *)rxdataF_comp[0]); - for (int cnt = 0; cnt < 864 ; cnt++) - printf("pbch rx llr %d\n",*(pbch_e_rx+cnt)); - + printf("pbch rx llr %d\n", *(pbch_e_rx + cnt)); #endif // un-scrambling uint32_t unscrambling_mask = (Lmax==64)?0x100006D:0x1000041; @@ -527,7 +531,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, ue->symbol_offset += (frame_parms->slots_per_frame>>1)*frame_parms->symbols_per_slot; #ifdef DEBUG_PBCH - printf("xtra_byte %x payload %x\n", xtra_byte, payload); + printf("xtra_byte %x payload %x\n", result->xtra_byte, payload); for (int i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++) { // printf("unscrambling pbch_a[%d] = %x \n", i,pbch_a[i]); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_psbch_rx.c b/openair1/PHY/NR_UE_TRANSPORT/nr_psbch_rx.c new file mode 100644 index 0000000000..cf8ea994f1 --- /dev/null +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_psbch_rx.c @@ -0,0 +1,239 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#include "PHY/defs_nr_UE.h" +#include "PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h" +#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" +#include "common/utils/LOG/log.h" +#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" + +// #define DEBUG_PSBCH + +static void nr_psbch_extract(uint32_t rxdataF_sz, + c16_t rxdataF[][rxdataF_sz], + int estimateSz, + struct complex16 dl_ch_estimates[][estimateSz], + struct complex16 rxdataF_ext[][SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_SYMBOL], + struct complex16 dl_ch_estimates_ext[][SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_SYMBOL], + uint32_t symbol, + NR_DL_FRAME_PARMS *frame_params) +{ + uint16_t rb; + uint8_t i, j, aarx; + struct complex16 *dl_ch0, *dl_ch0_ext, *rxF, *rxF_ext; + const uint8_t nb_rb = SL_NR_NUM_PSBCH_RBS_IN_ONE_SYMBOL; + + AssertFatal((symbol == 0 || symbol >= 5), "SIDELINK: PSBCH DMRS not contained in symbol %d \n", symbol); + + for (aarx = 0; aarx < frame_params->nb_antennas_rx; aarx++) { + unsigned int rx_offset = frame_params->first_carrier_offset + frame_params->ssb_start_subcarrier; + rx_offset = rx_offset % frame_params->ofdm_symbol_size; + + rxF = &rxdataF[aarx][symbol * frame_params->ofdm_symbol_size]; + rxF_ext = &rxdataF_ext[aarx][0]; + + dl_ch0 = &dl_ch_estimates[aarx][symbol * frame_params->ofdm_symbol_size]; + dl_ch0_ext = &dl_ch_estimates_ext[aarx][0]; + +#ifdef DEBUG_PSBCH + LOG_I(PHY, "extract_rbs: rx_offset=%d, symbol %u\n", (rx_offset + (symbol * frame_params->ofdm_symbol_size)), symbol); +#endif + + for (rb = 0; rb < nb_rb; rb++) { + j = 0; + + for (i = 0; i < NR_NB_SC_PER_RB; i++) { + if (i % 4 != 0) { + rxF_ext[j] = rxF[rx_offset]; + dl_ch0_ext[j] = dl_ch0[i]; + +#ifdef DEBUG_PSBCH + + LOG_I(PHY, + "rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n", + (9 * rb) + j, + rxF_ext[j].r, + rxF_ext[j].i, + rx_offset, + rxF[rx_offset].r, + rxF[rx_offset].i); + LOG_I(PHY, + "dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n", + (9 * rb) + j, + dl_ch0_ext[j].r, + dl_ch0_ext[j].i, + i, + dl_ch0[i].r, + dl_ch0[i].i); +#endif + j++; + } + rx_offset = (rx_offset + 1) % (frame_params->ofdm_symbol_size); + } + + rxF_ext += SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_RB; + dl_ch0_ext += SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_RB; + dl_ch0 += NR_NB_SC_PER_RB; + } + +#ifdef DEBUG_PSBCH + char filename[40], varname[25]; + sprintf(filename, "psbch_dlch_sym_%d.m", symbol); + sprintf(varname, "psbch_dlch%d.m", symbol); + LOG_M(filename, varname, (void *)dl_ch0, frame_params->ofdm_symbol_size, 1, 1); + sprintf(filename, "psbch_dlchext_sym_%d.m", symbol); + sprintf(varname, "psbch_dlchext%d.m", symbol); + LOG_M(filename, varname, (void *)&dl_ch_estimates_ext[0][0], SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_SYMBOL, 1, 1); +#endif + } + + return; +} + +int nr_rx_psbch(PHY_VARS_NR_UE *ue, + UE_nr_rxtx_proc_t *proc, + int estimateSz, + struct complex16 dl_ch_estimates[][estimateSz], + NR_DL_FRAME_PARMS *frame_parms, + uint8_t *decoded_output, + c16_t rxdataF[][frame_parms->samples_per_slot_wCP], + uint16_t slss_id) +{ + uint32_t decoderState = 0; + int psbch_e_rx_idx = 0; + // Extra 2 bits needed as polar decoder expects a multiple of 4 as encoder length + // If these 2 bits are not added, runs compiled with --sanitize will fail. + int16_t psbch_e_rx[SL_NR_POLAR_PSBCH_E_NORMAL_CP + 2] = {0}; + +#ifdef DEBUG_PSBCH + write_output("psbch_rxdataF.m", + "psbchrxF", + &rxdataF[0][0], + frame_parms->ofdm_symbol_size * SL_NR_NUM_SYMBOLS_SSB_NORMAL_CP, + 1, + 1); +#endif + // symbol refers to symbol within SSB. symbol_offset is the offset of the SSB wrt start of slot + double log2_maxh = 0; + + // 0 for Normal Cyclic Prefix and 1 for EXT CyclicPrefix + const int numsym = (frame_parms->Ncp) ? SL_NR_NUM_SYMBOLS_SSB_EXT_CP : SL_NR_NUM_SYMBOLS_SSB_NORMAL_CP; + + for (int symbol = 0; symbol < numsym;) { + const uint16_t nb_re = SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_SYMBOL; + __attribute__((aligned(32))) struct complex16 rxdataF_ext[frame_parms->nb_antennas_rx][nb_re + 1]; + __attribute__((aligned(32))) struct complex16 dl_ch_estimates_ext[frame_parms->nb_antennas_rx][nb_re + 1]; + // memset(dl_ch_estimates_ext,0, sizeof dl_ch_estimates_ext); + nr_psbch_extract(frame_parms->samples_per_slot_wCP, + rxdataF, + estimateSz, + dl_ch_estimates, + rxdataF_ext, + dl_ch_estimates_ext, + symbol, + frame_parms); +#ifdef DEBUG_PSBCH + LOG_I(PHY, "PSBCH RX Symbol %d ofdm size %d\n", symbol, frame_parms->ofdm_symbol_size); +#endif + + int max_h = 0; + if (symbol == 0) { + max_h = nr_pbch_channel_level(dl_ch_estimates_ext, frame_parms, nb_re); + // log2_maxh = 3+(log2_approx(max_h)/2); + log2_maxh = 5 + (log2_approx(max_h) / 2); // LLR32 crc error. LLR 16 CRC works + } +#ifdef DEBUG_PSBCH + LOG_I(PHY, "PSBCH RX log2_maxh = %f (%d)\n", log2_maxh, max_h); +#endif + + __attribute__((aligned(32))) struct complex16 rxdataF_comp[frame_parms->nb_antennas_rx][nb_re + 1]; + nr_pbch_channel_compensation(rxdataF_ext, + dl_ch_estimates_ext, + nb_re, + rxdataF_comp, + frame_parms, + log2_maxh); // log2_maxh+I0_shift + + nr_pbch_quantize(psbch_e_rx + psbch_e_rx_idx, (short *)rxdataF_comp[0], SL_NR_NUM_PSBCH_DATA_BITS_IN_ONE_SYMBOL); + + psbch_e_rx_idx += SL_NR_NUM_PSBCH_DATA_BITS_IN_ONE_SYMBOL; + + // SKIP 2 SL-PSS AND 2 SL-SSS symbols + // Symbols carrying PSBCH 0, 5-12 + symbol = (symbol == 0) ? 5 : symbol + 1; + } + +#if 0 // ENABLE SCOPE LATER + UEscopeCopy(ue, psbchRxdataF_comp, psbch_unClipped, sizeof(struct complex16), frame_parms->nb_antennas_rx, psbch_e_rx_idx/2); + UEscopeCopy(ue, psbchLlr, psbch_e_rx, sizeof(int16_t), frame_parms->nb_antennas_rx, psbch_e_rx_idx); +#endif + +#ifdef DEBUG_PSBCH + write_output("psbch_rxdataFcomp.m", "psbch_rxFcomp", psbch_unClipped, SL_NR_NUM_PSBCH_DATA_RE_IN_ALL_SYMBOLS, 1, 1); +#endif + + // un-scrambling + LOG_D(PHY, "PSBCH RX POLAR DECODING: total PSBCH bits:%d, rx_slss_id:%d\n", psbch_e_rx_idx, slss_id); + + nr_pbch_unscrambling(psbch_e_rx, slss_id, 0, 0, psbch_e_rx_idx, 0, 0, 0, NULL); + // polar decoding de-rate matching + uint64_t tmp = 0; + decoderState = polar_decoder_int16(psbch_e_rx, + (uint64_t *)&tmp, + 0, + SL_NR_POLAR_PSBCH_MESSAGE_TYPE, + SL_NR_POLAR_PSBCH_PAYLOAD_BITS, + SL_NR_POLAR_PSBCH_AGGREGATION_LEVEL); + + uint32_t psbch_payload = tmp; + + if (decoderState) { + LOG_D(PHY, "%d:%d PSBCH RX: NOK \n", proc->frame_rx, proc->nr_slot_rx); + return (decoderState); + } + + // Decoder reversal + uint32_t a_reversed = 0; + + for (int i = 0; i < SL_NR_POLAR_PSBCH_PAYLOAD_BITS; i++) + a_reversed |= (((uint64_t)psbch_payload >> i) & 1) << (31 - i); + + psbch_payload = a_reversed; + + *((uint32_t *)decoded_output) = psbch_payload; + +#ifdef DEBUG_PSBCH + for (int i = 0; i < 4; i++) { + LOG_I(PHY, "decoded_output[%d]:%x\n", i, decoded_output[i]); + } +#endif + + ue->symbol_offset = 0; + + // retrieve DFN and slot number from SL-MIB + uint32_t DFN = 0, slot_offset = 0; + DFN = (((psbch_payload & 0x0700) >> 1) | ((psbch_payload & 0xFE0000) >> 17)); + slot_offset = (((psbch_payload & 0x010000) >> 10) | ((psbch_payload & 0xFC000000) >> 26)); + + LOG_D(PHY, "PSBCH RX SL-MIB:%x, decoded DFN:slot %d:%d, %x\n", psbch_payload, DFN, slot_offset, *(uint32_t *)decoded_output); + + return 0; +} diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_psbch_tx.c b/openair1/PHY/NR_UE_TRANSPORT/nr_psbch_tx.c new file mode 100644 index 0000000000..cc8993bc6d --- /dev/null +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_psbch_tx.c @@ -0,0 +1,384 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#include "PHY/defs_nr_UE.h" +#include "PHY/LTE_REFSIG/lte_refsig.h" +#include "PHY/NR_REFSIG/nr_mod_table.h" +#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" +#include "PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h" +#include "PHY/MODULATION/nr_modulation.h" + +// #define SL_DEBUG + +/** + *This function performs PSBCH SCrambling as described in 38.211. + *Input parameter "output" is scrambled and the scrambled output is stored in this parameter. + *id - SLSS ID used for C_INIT + *length is the length of the buffer. + */ +void sl_psbch_scrambling(uint32_t *output, uint32_t id, uint16_t length) +{ + uint32_t x1, x2, s = 0; + // x1 is set in lte_gold_generic + x2 = id; // C_INIT + +#ifdef SL_DEBUG + printf("SIDELINK: Function %s\n", __func__); + printf("Scrambling params: length %d id %d \n", length, id); +#endif + +#ifdef SL_DEBUG + for (int i = 0; i < 56; i++) { + printf("\nBEFORE SCRAMBLING output[%d]:0x%x\n", i, output[i]); + } +#endif + + // get initial 32 scrambing bits + s = lte_gold_generic(&x1, &x2, 1); +#ifdef SL_DEBUG + printf("s: %04x\t", s); +#endif + + // scramble in 32bit chunks + int i = 0; + while (i + 32 <= length) { + output[i >> 5] ^= s; + + i += 32; + s = lte_gold_generic(&x1, &x2, 0); +#ifdef SL_DEBUG + printf("s: %04x\t", s); +#endif + } + + // scramble remaining bits + for (; i < length; ++i) { + output[i >> 5] ^= ((s >> (i & 0x1f) & 1) << (i & 0x1f)); + } + +#ifdef SL_DEBUG + for (int i = 0; i < 56; i++) { + printf("\nAFTER SCRAMBLING output[%d]:0x%x\n", i, output[i]); + } +#endif +} + +/** + *This function RE MAPS PSS, SSS sequences as described in 38.211. + *txF is the data in frequency domain, sync_seq = PSS or SSS seq + *startsym = 1 for PSS, 3 for SSS + *re_offset = sample which points to first RE + SSB start RE + *scaling factor = scaling factor used for PSS, SSS (determined according to PSBCH pwr) + *symbol size = OFDM symbol size used for RE Mapping + */ +void sl_map_pss_or_sss(c16_t *txF, + int16_t *sync_seq, + uint16_t startsym, + uint16_t re_offset, + uint16_t scaling_factor, + uint16_t symbol_size) +{ +#ifdef SL_DEBUG + printf("%s. DEBUG PSBCH TX: RE MAPPING of PSS/SSS \n", __func__); + printf("Input Params - StartSYM:%d, NUMSYM:%d, RE_OFFSET:%d, num_REs:%d, scaling_factor:%d, symbol_size:%d\n", + startsym, + SL_NR_NUM_PSS_OR_SSS_SYMBOLS, + re_offset, + SL_NR_NUM_PSBCH_RE_IN_ONE_SYMBOL, + scaling_factor, + symbol_size); +#endif + + // RE Mapping of SL-PSS, SL-SSS + for (int l = startsym; l < (startsym + SL_NR_NUM_PSS_OR_SSS_SYMBOLS); l++) { + int k = re_offset % symbol_size; + int index = 0, offset = 0; + + for (int m = 0; m < SL_NR_NUM_PSBCH_RE_IN_ONE_SYMBOL; m++) { + offset = l * symbol_size + k; + if ((m < 2) || (m >= (SL_NR_NUM_PSBCH_RE_IN_ONE_SYMBOL - 3))) { + txF[offset].r = 0; // Set REs 0,1,129,130,131 = 0 + +#ifdef SL_DEBUG + printf("sym:%d, RE:%d, txF[%d]:%d.%d \n", l, m, offset, txF[offset].r, txF[offset].i); +#endif + + } else { + txF[offset].r = (sync_seq[index] * scaling_factor) >> 15; + +#ifdef SL_DEBUG + printf("sym:%d, RE:%d, txF[%d]:%d.%d, syncseq[%d]:%d \n", + l, + m, + offset, + txF[offset].r, + txF[offset].i, + index, + sync_seq[index]); +#endif + + index++; + } + txF[offset].i = 0; + k = (k + 1) % symbol_size; + } + } +} + +/** + * This function Generates the PSBCH DATA Modulation symbols and RE MAPS PSBCH Modulated symbols + * and PSBCH DMRS sequences as described in 38.211. + * txF is the data in frequency domain + * payload is the PSBCH payload (SL-MIB given by higher layers) + * id - SLSS ID used for knowing which DMRS sequence to be used. + * Cp - NORMAL of extended Cyclic prefix + * startsym = 0 and then PSBCH is mapped from symbols 5-13 if normal , 5-11 if extended + * re_offset = sample which points to first RE + SSB start RE + * scaling factor = scaling factor used for PSS, SSS (determined according to PSBCH pwr) + * symbol size = OFDM symbol size used for RE Mapping + */ + +void sl_generate_and_map_psbch(c16_t *txF, + uint32_t *payload, + uint16_t id, + uint16_t cp, + uint16_t re_offset, + uint16_t scaling_factor, + uint16_t symbol_size, + c16_t *psbch_dmrs) +{ + uint64_t psbch_a_reversed = 0; + uint16_t num_psbch_modsym = 0, numsym = 0; + const int mod_order = 2; // QPSK + uint32_t encoder_output[SL_NR_POLAR_PSBCH_E_DWORD]; + struct complex16 psbch_modsym[SL_NR_NUM_PSBCH_MODULATED_SYMBOLS]; + + LOG_D(PHY, "PSBCH TX: Generation accg to 38.212, 38.211. SLSS id:%d\n", id); + + // Encoder reversal + for (int i = 0; i < SL_NR_POLAR_PSBCH_PAYLOAD_BITS; i++) + psbch_a_reversed |= (((uint64_t)*payload >> i) & 1) << (31 - i); + +#ifdef SL_DEBUG + printf("DEBUG PSBCH TX: 38.212 PSBCH CRC + Channel coding (POLAR) + Rate Matching:\n"); + printf("PSBCH payload:%x, Reversed Payload:%016lx\n", *payload, psbch_a_reversed); +#endif + + /// CRC, coding and rate matching + polar_encoder_fast(&psbch_a_reversed, + (void *)encoder_output, + 0, + 0, + SL_NR_POLAR_PSBCH_MESSAGE_TYPE, + SL_NR_POLAR_PSBCH_PAYLOAD_BITS, + SL_NR_POLAR_PSBCH_AGGREGATION_LEVEL); + +#ifdef SL_DEBUG + for (int i = 0; i < SL_NR_POLAR_PSBCH_E_DWORD; i++) + printf("encoderoutput[%d]: 0x%08x\t", i, encoder_output[i]); + printf("\n"); +#endif + + /// 38.211 Scrambling + if (cp) { // EXT Cyclic prefix + sl_psbch_scrambling(encoder_output, id, SL_NR_POLAR_PSBCH_E_EXT_CP); // for Extended Cyclic prefix + num_psbch_modsym = SL_NR_POLAR_PSBCH_E_EXT_CP / mod_order; + numsym = SL_NR_NUM_SYMBOLS_SSB_EXT_CP; + AssertFatal(1 == 0, "EXT CP is not yet supported\n"); + } else { // Normal CP + sl_psbch_scrambling(encoder_output, id, SL_NR_POLAR_PSBCH_E_NORMAL_CP); // for Cyclic prefix + num_psbch_modsym = SL_NR_POLAR_PSBCH_E_NORMAL_CP / mod_order; + numsym = SL_NR_NUM_SYMBOLS_SSB_NORMAL_CP; + } + + LOG_D(PHY, "PSBCH TX: 38.211 Scrambling done. Number of bits:%d \n", SL_NR_POLAR_PSBCH_E_NORMAL_CP); + +#ifdef SL_DEBUG + printf("38211 STEP: PSBCH Scrambling \n"); + for (int i = 0; i < SL_NR_POLAR_PSBCH_E_NORMAL_CP / 32; i++) + printf("Scrambleroutput[%d]: 0x%08x\t", i, encoder_output[i]); + printf("\n"); +#endif + +#ifdef SL_DEBUG + printf("SIDELINK PSBCH TX: 38211 STEP: QPSK Modulation of PSBCH symbols:%d, symbols in PSBCH:%d\n", num_psbch_modsym, numsym); +#endif + + /// 38.211 QPSK modulation + nr_modulation(encoder_output, num_psbch_modsym * mod_order, mod_order, (int16_t *)psbch_modsym); + + // RE MApping of PSBCH and PSBCH DMRS + int index = 0, dmrs_index = 0; + const int numre = SL_NR_NUM_PSBCH_RE_IN_ONE_SYMBOL; + +#ifdef SL_DEBUG + LOG_M("sl_psbch_data_symbols.m", "psbch_sym", (void *)psbch_modsym, num_psbch_modsym, 1, 1); + LOG_M("sl_psbch_dmrs_symbols.m", "psbch_dmrs", (void *)psbch_dmrs, SL_NR_NUM_PSBCH_DMRS_RE, 1, 1); +#endif + +#ifdef SL_DEBUG + printf("\nMapping Sidelink PSBCH DMRS, PSBCH modulation symbols to 132 REs\n"); +#endif + +#ifdef SL_DEBUG + printf("%s. DEBUG PSBCH TX: RE MAPPING of PSBCH DATA AND DMRS \n", __func__); + printf("Input Params - StartSYM:%d, NUMSYM:%d, RE_OFFSET:%d, num_REs:%d, scaling_factor:%d, symbol_size:%d\n", + 0, + numsym, + re_offset, + numre, + scaling_factor, + symbol_size); +#endif + + for (int l = 0; l < numsym;) { + int k = re_offset % symbol_size; + int symbol_offset = l * symbol_size; + int offset = 0; + + for (int m = 0; m < numre; m++) { + // Maps PSBCH DMRS in every 4th RE ex:0,4,....128 + // Maps PSBCH in all other REs ex: 1,2,3,5,6,...127,129,130,131 + + offset = symbol_offset + k; + +#ifdef SL_DEBUG + printf("symbol:%d, symbol_offset:%d, k:%d, re:%d, sampleoffset:%d ", l, symbol_offset, k, m, offset); +#endif + + if (m % 4 == 0) { + txF[offset] = c16xmulConstShift(psbch_dmrs[dmrs_index], scaling_factor, 15); + +#ifdef SL_DEBUG + printf("txF[%d]:%d,%d, psbch_dmrs[%d]:%d,%d ", + offset, + txF[offset].r, + txF[offset].i, + dmrs_index, + psbch_dmrs[dmrs_index].r, + psbch_dmrs[dmrs_index].i); +#endif + + dmrs_index++; + + } else { + txF[offset] = c16xmulConstShift(psbch_modsym[index], scaling_factor, 15); + +#ifdef SL_DEBUG + printf("txF[%d]:%d,%d, psbch_modsym[%d]:%d,%d\n", + offset, + txF[offset].r, + txF[offset].i, + index, + psbch_modsym[index].r, + psbch_modsym[index].i); +#endif + + index++; + } + + k = (k + 1) % symbol_size; + } + + LOG_D(PHY, + "PSBCH TX: 38211 STEP: RE MAPPING OF PSBCH, PSBCH DMRS DONE. symbol:%d, first RE offset:%d, Last RE offset:%d, Num PSBCH " + "DATA REs:%d, Num PSBCH DMRS REs:%d\n", + l, + symbol_offset + re_offset, + offset, + index, + dmrs_index); + + l = (l == 0) ? 5 : l + 1; + } +} + +/** + *This function prepares the PSBCH block and RE MAPS PSS, SSS, PSBCH DATA, PSBCH DMRS into buffer txF. + *Called by the L1 Scheduler when MAC triggers PHY to send PSBCH + *UE is the UE context. + *frame, slot points to the TTI in which PSBCH TX will be transmitted + */ +void nr_tx_psbch(PHY_VARS_NR_UE *UE, uint32_t frame_tx, uint32_t slot_tx, sl_nr_tx_config_psbch_pdu_t *psbch_vars, c16_t **txdataF) +{ + sl_nr_ue_phy_params_t *sl_ue_phy_params = &UE->SL_UE_PHY_PARAMS; + uint16_t slss_id = psbch_vars->tx_slss_id; + NR_DL_FRAME_PARMS *sl_fp = &sl_ue_phy_params->sl_frame_params; + uint32_t psbch_payload = *((uint32_t *)psbch_vars->psbch_payload); + + LOG_D(PHY, "PSBCH TX: slss-id %d, psbch payload %x \n", slss_id, psbch_payload); + + // Insert FN and Slot number into SL-MIB + uint32_t mask = ~(0x700 | 0xFE0000 | 0x10000 | 0xFC000000); + psbch_payload &= mask; + psbch_payload |= ((frame_tx % 1024) << 1) & 0x700; + psbch_payload |= ((frame_tx % 1024) << 17) & 0xFE0000; + psbch_payload |= (slot_tx << 10) & 0x10000; + psbch_payload |= (slot_tx << 26) & 0xFC000000; + +#ifdef SL_DEBUG + printf("DEBUG PSBCH TX: DFN, SLOT included. psbch_a :0x%08x, frame:%d, slot:%d\n", psbch_payload, frame_tx, slot_tx); +#endif + + LOG_D(PHY, "PSBCH TX: Frame.Slot %d.%d. Payload::0x%08x, slssid:%d\n", frame_tx, slot_tx, psbch_payload, slss_id); + + // GENERATE Sidelink PSS,SSS Sequences, PSBCH DMRS Symbols, PSBCH Symbols + int16_t *sl_pss = &sl_ue_phy_params->init_params.sl_pss[slss_id / 336][0]; + int16_t *sl_sss = &sl_ue_phy_params->init_params.sl_sss[slss_id][0]; + + uint16_t re_offset = sl_fp->first_carrier_offset + sl_fp->ssb_start_subcarrier; + uint16_t symbol_size = sl_fp->ofdm_symbol_size; + // TBD: Need to be replaced by function which calculates scaling factor based on psbch tx power + uint16_t scaling_factor = AMP; + + struct complex16 *txF = &txdataF[0][0]; + uint16_t startsym = SL_NR_PSS_START_SYMBOL; + +#ifdef SL_DEBUG + printf("DEBUG PSBCH TX: MAP PSS. startsym:%d, PSS RE START:%d, scaling factor:%d\n", startsym, re_offset, scaling_factor); +#endif + sl_map_pss_or_sss(txF, sl_pss, startsym, re_offset, scaling_factor, symbol_size); // PSS + + startsym += SL_NR_NUM_PSS_SYMBOLS; +#ifdef SL_DEBUG + printf("DEBUG PSBCH TX: MAP SSS. startsym:%d, SSS RE START:%d, scaling factor:%d\n", startsym, re_offset, scaling_factor); +#endif + sl_map_pss_or_sss(txF, sl_sss, startsym, re_offset, scaling_factor, symbol_size); // SSS + +#ifdef SL_DEBUG + printf("DEBUG PSBCH TX: MAP PSBCH DATA AND DMRS. cyclicPrefix:%d, PSS RE START:%d, scaling factor:%d\n", + sl_fp->Ncp, + re_offset, + scaling_factor); +#endif + + struct complex16 *psbch_dmrs = &sl_ue_phy_params->init_params.psbch_dmrs_modsym[slss_id][0]; + + sl_generate_and_map_psbch(txF, &psbch_payload, slss_id, sl_fp->Ncp, re_offset, scaling_factor, symbol_size, psbch_dmrs); + +#ifdef SL_DEBUG + printf("DEBUG PSBCH TX: txdataF Prepared\n"); +#endif + +#ifdef SL_DEBUG + LOG_M("sl_psbch_block.m", "sl_txF", (void *)txdataF[0], symbol_size * 14, 1, 1); +#endif +} 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 5a4654f360..deafd7a9ee 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -418,6 +418,40 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid); void nr_a_sum_b(c16_t *input_x, c16_t *input_y, unsigned short nb_rb); + +int nr_rx_psbch(PHY_VARS_NR_UE *ue, + UE_nr_rxtx_proc_t *proc, + int estimateSz, + struct complex16 dl_ch_estimates[][estimateSz], + NR_DL_FRAME_PARMS *frame_parms, + uint8_t *decoded_output, + c16_t rxdataF[][frame_parms->samples_per_slot_wCP], + uint16_t slss_id); + +void nr_tx_psbch(PHY_VARS_NR_UE *UE, uint32_t frame_tx, uint32_t slot_tx, sl_nr_tx_config_psbch_pdu_t *psbch_vars, c16_t **txdataF); + +nr_initial_sync_t sl_nr_slss_search(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc, int num_frames); + +// Reuse already existing PBCH functions +int nr_pbch_channel_level(struct complex16 dl_ch_estimates_ext[][PBCH_MAX_RE_PER_SYMBOL], + NR_DL_FRAME_PARMS *frame_parms, + int nb_re); +void nr_pbch_channel_compensation(struct complex16 rxdataF_ext[][PBCH_MAX_RE_PER_SYMBOL], + struct complex16 dl_ch_estimates_ext[][PBCH_MAX_RE_PER_SYMBOL], + int nb_re, + struct complex16 rxdataF_comp[][PBCH_MAX_RE_PER_SYMBOL], + NR_DL_FRAME_PARMS *frame_parms, + uint8_t output_shift); +void nr_pbch_unscrambling(int16_t *demod_pbch_e, + uint16_t Nid, + uint8_t nushift, + uint16_t M, + uint16_t length, + uint8_t bitwise, + uint32_t unscrambling_mask, + uint32_t pbch_a_prime, + uint32_t *pbch_a_interleaved); +void nr_pbch_quantize(int16_t *pbch_llr8, int16_t *pbch_llr, uint16_t len); /**@}*/ #endif diff --git a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c index b2c0a6242b..721697e248 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c @@ -704,3 +704,93 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i return peak_position; } +void sl_generate_pss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint8_t n_sl_id2, uint16_t scaling) +{ + int i = 0, m = 0; + int16_t x[SL_NR_PSS_SEQUENCE_LENGTH]; + const int x_initial[7] = {0, 1, 1, 0, 1, 1, 1}; + int16_t *sl_pss = sl_init_params->sl_pss[n_sl_id2]; + int16_t *sl_pss_for_sync = sl_init_params->sl_pss_for_sync[n_sl_id2]; + + LOG_D(PHY, "SIDELINK PSBCH INIT: PSS Generation with N_SL_id2:%d\n", n_sl_id2); + +#ifdef SL_DEBUG_INIT + printf("SIDELINK: PSS Generation with N_SL_id2:%d\n", n_sl_id2); +#endif + + /// Sequence generation + for (i = 0; i < 7; i++) + x[i] = x_initial[i]; + + for (i = 0; i < (SL_NR_PSS_SEQUENCE_LENGTH - 7); i++) { + x[i + 7] = (x[i + 4] + x[i]) % 2; + } + + for (i = 0; i < SL_NR_PSS_SEQUENCE_LENGTH; i++) { + m = (i + 22 + 43 * n_sl_id2) % SL_NR_PSS_SEQUENCE_LENGTH; + sl_pss_for_sync[i] = (1 - 2 * x[m]); + sl_pss[i] = sl_pss_for_sync[i] * scaling; + +#ifdef SL_DEBUG_INIT_DATA + printf("m:%d, sl_pss[%d]:%d\n", m, i, sl_pss[i]); +#endif + } + +#ifdef SL_DUMP_INIT_SAMPLES + LOG_M("sl_pss_seq.m", "sl_pss", (void *)sl_pss, SL_NR_PSS_SEQUENCE_LENGTH, 1, 0); +#endif +} + +// This cannot be done at init time as ofdm symbol size, ssb start subcarrier depends on configuration +// done at SLSS read time. +void sl_generate_pss_ifft_samples(sl_nr_ue_phy_params_t *sl_ue_params, SL_NR_UE_INIT_PARAMS_t *sl_init_params) +{ + uint8_t id2 = 0; + int16_t *sl_pss = NULL; + NR_DL_FRAME_PARMS *sl_fp = &sl_ue_params->sl_frame_params; + int16_t scaling_factor = AMP; + + int32_t *pss_T = NULL; + + uint16_t k = 0; + + c16_t pss_F[sl_fp->ofdm_symbol_size]; // IQ samples in freq domain + + LOG_I(PHY, "SIDELINK INIT: Generation of PSS time domain samples. scaling_factor:%d\n", scaling_factor); + + for (id2 = 0; id2 < SL_NR_NUM_IDs_IN_PSS; id2++) { + k = sl_fp->first_carrier_offset + sl_fp->ssb_start_subcarrier + 2; // PSS in from REs 2-129 + if (k >= sl_fp->ofdm_symbol_size) + k -= sl_fp->ofdm_symbol_size; + + pss_T = &sl_init_params->sl_pss_for_correlation[id2][0]; + sl_pss = sl_init_params->sl_pss[id2]; + + memset(pss_T, 0, sl_fp->ofdm_symbol_size * sizeof(pss_T[0])); + memset(pss_F, 0, sl_fp->ofdm_symbol_size * sizeof(c16_t)); + + for (int i = 0; i < SL_NR_PSS_SEQUENCE_LENGTH; i++) { + pss_F[k].r = (sl_pss[i] * scaling_factor) >> 15; + // pss_F[2*k] = (sl_pss[i]/23170) * 4192; + // pss_F[2*k+1] = 0; + +#ifdef SL_DEBUG_INIT_DATA + printf("id:%d, k:%d, pss_F[%d]:%d, sl_pss[%d]:%d\n", id2, k, 2 * k, pss_F[2 * k], i, sl_pss[i]); +#endif + + k++; + if (k == sl_fp->ofdm_symbol_size) + k = 0; + } + + idft((int16_t)get_idft(sl_fp->ofdm_symbol_size), + (int16_t *)&pss_F[0], /* complex input */ + (int16_t *)&pss_T[0], /* complex output */ + 1); /* scaling factor */ + } + +#ifdef SL_DUMP_PSBCH_TX_SAMPLES + LOG_M("sl_pss_TD_id0.m", "pss_TD_0", (void *)sl_init_params->sl_pss_for_correlation[0], sl_fp->ofdm_symbol_size, 1, 1); + LOG_M("sl_pss_TD_id1.m", "pss_TD_1", (void *)sl_init_params->sl_pss_for_correlation[1], sl_fp->ofdm_symbol_size, 1, 1); +#endif +} diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c index 768099ebe5..b89c7cbb95 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c @@ -126,7 +126,7 @@ void nr_generate_pucch0(const PHY_VARS_NR_UE *ue, //txptr = &txdataF[0][re_offset]; #ifdef DEBUG_NR_PUCCH_TX - printf("\t [nr_generate_pucch0] symbol %d PRB %d (%u)\n",l,prb_offset[l],re_offset); + printf("\t [nr_generate_pucch0] symbol %d PRB %d (%d)\n",l,prb_offset[l], re_offset); #endif c16_t *txdataFptr = txdataF[0] + l2 * frame_parms->ofdm_symbol_size; const int32_t amp = amp16; @@ -777,7 +777,7 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, #ifdef DEBUG_NR_PUCCH_TX printf( "\t [nr_generate_pucch2] (n=%d,i=%d) mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d " - "\tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n", + "\tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n", n, i, amp, @@ -801,7 +801,7 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, #ifdef DEBUG_NR_PUCCH_TX printf( "\t [nr_generate_pucch2] (n=%d,i=%d) mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d " - "\tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n", + "\tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n", n, i, amp, diff --git a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c index 0ec5f23b40..09d8ce4f4a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c @@ -63,13 +63,6 @@ #define INITIAL_SSS_NR (7) -static const int16_t phase_re_nr[PHASE_HYPOTHESIS_NUMBER] - // -pi/3 ---- pi/3 - = {16384, 20173, 23571, 26509, 28932, 30791, 32051, 32687, 32687, 32051, 30791, 28932, 26509, 23571, 20173, 16384}; - -static const int16_t phase_im_nr[PHASE_HYPOTHESIS_NUMBER] // -pi/3 ---- pi/3 - = {-28377, -25821, -22762, -19260, -15383, -11207, -6813, -2286, 2286, 6813, 11207, 15383, 19260, 22762, 25821, 28377}; - static int16_t d_sss[N_ID_2_NUMBER][N_ID_1_NUMBER][LENGTH_SSS_NR]; void init_context_sss_nr(int amp) @@ -475,7 +468,7 @@ bool rx_sss_nr(PHY_VARS_NR_UE *ue, // This is the inner product using one particular value of each unknown parameter for (i=0; i < LENGTH_SSS_NR; i++) { - metric_re += d[i] * ((phase_re_nr[phase] * sss[i].r - phase_im_nr[phase] * sss[i].i) >> SCALING_METRIC_SSS_NR); + metric_re += d[i] * ((phase_nr[phase].r * sss[i].r - phase_nr[phase].i * sss[i].i) >> SCALING_METRIC_SSS_NR); } metric = metric_re; @@ -496,14 +489,14 @@ bool rx_sss_nr(PHY_VARS_NR_UE *ue, } //#ifdef DEBUG_SSS_NR - #define SSS_METRIC_FLOOR_NR (30000) if (*tot_metric > SSS_METRIC_FLOOR_NR) { Nid2 = GET_NID2(frame_parms->Nid_cell); Nid1 = GET_NID1(frame_parms->Nid_cell); LOG_D(PHY,"Nid2 %d Nid1 %d tot_metric %d, phase_max %d \n", Nid2, Nid1, *tot_metric, *phase_max); } - // #endif +// #endif + int re = 0; int im = 0; if (Nid1 == N_ID_1_NUMBER) { @@ -537,3 +530,51 @@ bool rx_sss_nr(PHY_VARS_NR_UE *ue, return true; } + +void sl_generate_sss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint16_t slss_id, uint16_t scaling) +{ + int i = 0; + int m0, m1; + int n_sl_id1, n_sl_id2; + int16_t *sl_sss = sl_init_params->sl_sss[slss_id]; + int16_t *sl_sss_for_sync = sl_init_params->sl_sss_for_sync[slss_id]; + + int16_t x0[SL_NR_SSS_SEQUENCE_LENGTH], x1[SL_NR_SSS_SEQUENCE_LENGTH]; + const int x_initial[7] = {1, 0, 0, 0, 0, 0, 0}; + + n_sl_id1 = slss_id % 336; + n_sl_id2 = slss_id / 336; + + LOG_D(PHY, "SIDELINK INIT: SSS Generation with N_SL_id1:%d N_SL_id2:%d\n", n_sl_id1, n_sl_id2); + +#ifdef SL_DEBUG_INIT + printf("SIDELINK: SSS Generation with slss_id:%d, N_SL_id1:%d, N_SL_id2:%d\n", slss_id, n_sl_id1, n_sl_id2); +#endif + + for (i = 0; i < 7; i++) { + x0[i] = x_initial[i]; + x1[i] = x_initial[i]; + } + + for (i = 0; i < SL_NR_SSS_SEQUENCE_LENGTH - 7; i++) { + x0[i + 7] = (x0[i + 4] + x0[i]) % 2; + x1[i + 7] = (x1[i + 1] + x1[i]) % 2; + } + + m0 = 15 * (n_sl_id1 / 112) + (5 * n_sl_id2); + m1 = n_sl_id1 % 112; + + for (i = 0; i < SL_NR_SSS_SEQUENCE_LENGTH; i++) { + sl_sss_for_sync[i] = (1 - 2 * x0[(i + m0) % SL_NR_SSS_SEQUENCE_LENGTH]) * (1 - 2 * x1[(i + m1) % SL_NR_SSS_SEQUENCE_LENGTH]); + sl_sss[i] = sl_sss_for_sync[i] * scaling; + +#ifdef SL_DEBUG_INIT_DATA + printf("m0:%d, m1:%d, sl_sss_for_sync[%d]:%d, sl_sss[%d]:%d\n", m0, m1, i, sl_sss_for_sync[i], i, sl_sss[i]); +#endif + } + +#ifdef SL_DUMP_PSBCH_TX_SAMPLES + LOG_M("sl_sss_seq.m", "sl_sss", (void *)sl_sss, SL_NR_SSS_SEQUENCE_LENGTH, 1, 0); + LOG_M("sl_sss_forsync_seq.m", "sl_sss_for_sync", (void *)sl_sss_for_sync, SL_NR_SSS_SEQUENCE_LENGTH, 1, 0); +#endif +} diff --git a/openair1/PHY/TOOLS/oai_dfts.c b/openair1/PHY/TOOLS/oai_dfts.c index 3b8a6f8a68..233590b51f 100644 --- a/openair1/PHY/TOOLS/oai_dfts.c +++ b/openair1/PHY/TOOLS/oai_dfts.c @@ -1647,7 +1647,7 @@ void dft64(int16_t *x,int16_t *y,unsigned char scale) #ifdef D64STATS stop_meas(&ts_b); - printf("t: %llu cycles, d: %llu cycles, b: %llu cycles\n",ts_t.diff,ts_d.diff,ts_b.diff); + printf("t: %lld cycles, d: %lld cycles, b: %lld cycles\n",ts_t.diff, ts_d.diff, ts_b.diff); #endif @@ -1746,7 +1746,7 @@ void idft64(int16_t *x,int16_t *y,unsigned char scale) #ifdef D64STATS stop_meas(&ts_b); - printf("t: %llu cycles, d: %llu cycles, b: %llu cycles\n",ts_t.diff,ts_d.diff,ts_b.diff); + printf("t: %lld cycles, d: %lld cycles, b: %lld cycles\n", ts_t.diff, ts_d.diff, ts_b.diff); #endif diff --git a/openair1/PHY/TOOLS/oai_dfts_neon.c b/openair1/PHY/TOOLS/oai_dfts_neon.c index 8b2dcd9aa7..058d4601b3 100644 --- a/openair1/PHY/TOOLS/oai_dfts_neon.c +++ b/openair1/PHY/TOOLS/oai_dfts_neon.c @@ -1013,7 +1013,11 @@ void dft64(int16_t *x,int16_t *y,unsigned char scale) #ifdef D64STATS stop_meas(&ts_b); - printf("t: %llu cycles, d: %llu cycles, b: %llu cycles\n",ts_t.diff,ts_d.diff,ts_b.diff); +#if defined(__x86_64__) || defined(__i386__) + printf("t: %lld cycles, d: %lld cycles, b: %lld cycles\n", ts_t.diff, ts_d.diff, ts_b.diff); +#elif defined(__arm__) || defined(__aarch64__) + printf("t: %u cycles, d: %u cycles, b: %u cycles\n", ts_t.diff, ts_d.diff, ts_b.diff); +#endif #endif @@ -1102,7 +1106,11 @@ void idft64(int16_t *x,int16_t *y,unsigned char scale) #ifdef D64STATS stop_meas(&ts_b); - printf("t: %llu cycles, d: %llu cycles, b: %llu cycles\n",ts_t.diff,ts_d.diff,ts_b.diff); +#if defined(__x86_64__) || defined(__i386__) + printf("t: %lld cycles, d: %lld cycles, b: %lld cycles\n", ts_t.diff, ts_d.diff, ts_b.diff); +#elif defined(__arm__) || defined(__aarch64__) + printf("t: %u cycles, d: %u cycles, b: %u cycles\n", ts_t.diff, ts_d.diff, ts_b.diff); +#endif #endif @@ -1433,7 +1441,11 @@ void dft256(int16_t *x,int16_t *y,unsigned char scale) #ifdef D256STATS stop_meas(&ts_b); - printf("t: %llu cycles, d: %llu cycles, b: %llu cycles\n",ts_t.diff,ts_d.diff,ts_b.diff); +#if defined(__x86_64__) || defined(__i386__) + printf("t: %lld cycles, d: %lld cycles, b: %lld cycles\n", ts_t.diff, ts_d.diff, ts_b.diff); +#elif defined(__arm__) || defined(__aarch64__) + printf("t: %u cycles, d: %u cycles, b: %u cycles\n", ts_t.diff, ts_d.diff, ts_b.diff); +#endif #endif if (scale>0) { diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h index 06e31542d5..771f488b54 100644 --- a/openair1/PHY/TOOLS/tools_defs.h +++ b/openair1/PHY/TOOLS/tools_defs.h @@ -242,6 +242,11 @@ extern "C" { }; } + __attribute__((always_inline)) inline c16_t c16xmulConstShift(const c16_t a, const int b, const int Shift) + { + return (c16_t){.r = (int16_t)((a.r * b) >> Shift), .i = (int16_t)((a.i * b) >> Shift)}; + } + __attribute__((always_inline)) inline c32_t c32x16maddShift(const c16_t a, const c16_t b, const c32_t c, const int Shift) { return (c32_t) { .r = ((a.r * b.r - a.i * b.i) >> Shift) + c.r, @@ -679,14 +684,20 @@ idft_size_idx_t get_idft(int ofdm_symbol_size) return IDFT_9216; case 12288: return IDFT_12288; + case 16384: + return IDFT_16384; case 18432: return IDFT_18432; case 24576: return IDFT_24576; + case 32768: + return IDFT_32768; case 36864: return IDFT_36864; case 49152: return IDFT_49152; + case 65536: + return IDFT_65536; case 73728: return IDFT_73728; case 98304: @@ -813,11 +824,6 @@ double interp(double x, double *xs, double *ys, int count); void simde_mm128_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1); void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1); -static __attribute__((always_inline)) inline int count_bits_set(uint64_t v) -{ - return __builtin_popcountll(v); -} - #ifdef __cplusplus } #endif diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 831bbe496a..c31a5e007e 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -673,7 +673,6 @@ typedef struct PHY_VARS_gNB_s { time_stats_t dlsch_modulation_stats; time_stats_t dlsch_scrambling_stats; time_stats_t dlsch_resource_mapping_stats; - time_stats_t dlsch_layer_mapping_stats; time_stats_t dlsch_precoding_stats; time_stats_t tinput; time_stats_t tprep; @@ -690,6 +689,7 @@ typedef struct PHY_VARS_gNB_s { time_stats_t ul_indication_stats; time_stats_t slot_indication_stats; time_stats_t schedule_response_stats; + time_stats_t ulsch_decoding_stats; time_stats_t ulsch_ldpc_decoding_stats; time_stats_t ulsch_deinterleaving_stats; time_stats_t ulsch_channel_estimation_stats; diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 8bbb1f9d84..c746bd69b8 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -39,6 +39,7 @@ #include "defs_nr_common.h" #include "CODING/nrPolar_tools/nr_polar_pbch_defs.h" +#include "PHY/defs_nr_sl_UE.h" #include #include @@ -591,6 +592,10 @@ typedef struct PHY_VARS_NR_UE_s { uint8_t *phy_sim_dlsch_b; notifiedFIFO_t tx_resume_ind_fifo[NR_MAX_SLOTS_PER_FRAME]; + + // Sidelink parameters + sl_nr_sidelink_mode_t sl_mode; + sl_nr_ue_phy_params_t SL_UE_PHY_PARAMS; } PHY_VARS_NR_UE; typedef struct { @@ -612,11 +617,20 @@ typedef struct { typedef struct nr_phy_data_tx_s { NR_UE_ULSCH_t ulsch; NR_UE_PUCCH pucch_vars; + + // Sidelink Rx action decided by MAC + sl_nr_tx_config_type_enum_t sl_tx_action; + sl_nr_tx_config_psbch_pdu_t psbch_vars; + } nr_phy_data_tx_t; typedef struct nr_phy_data_s { NR_UE_PDCCH_CONFIG phy_pdcch_config; NR_UE_DLSCH_t dlsch[2]; + + // Sidelink Rx action decided by MAC + sl_nr_rx_config_type_enum_t sl_rx_action; + } nr_phy_data_t; /* this structure is used to pass both UE phy vars and * proc to the function UE_thread_rxn_txnp4 diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 3a7e2032b9..121ef0d3c1 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -96,6 +96,8 @@ #define MAX_DELAY_COMP 20 +#define PBCH_MAX_RE_PER_SYMBOL (20 * 12) + typedef enum { NR_MU_0=0, NR_MU_1, @@ -168,8 +170,6 @@ struct NR_DL_FRAME_PARMS { /// Frame type (0 FDD, 1 TDD) frame_type_t frame_type; uint8_t tdd_config; - /// Sidelink Cell ID - uint16_t Nid_SL; /// Cell ID uint16_t Nid_cell; /// subcarrier spacing (15,30,60,120) diff --git a/openair1/PHY/defs_nr_sl_UE.h b/openair1/PHY/defs_nr_sl_UE.h new file mode 100644 index 0000000000..29958ac75a --- /dev/null +++ b/openair1/PHY/defs_nr_sl_UE.h @@ -0,0 +1,152 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +/*! \file PHY/defs_nr_sl_UE.h + \brief Top-level defines and structure definitions + \author + \date + \version + \company Fraunhofer + \email: + \note + \warning +*/ + +#ifndef _DEFS_NR_SL_UE_H_ +#define _DEFS_NR_SL_UE_H_ + +#include "PHY/types.h" +#include "PHY/defs_nr_common.h" +#include "nfapi/open-nFAPI/nfapi/public_inc/sidelink_nr_ue_interface.h" +#include "common/utils/time_meas.h" + +// (33*(13-4)) +// Normal CP - NUM_SSB_Symbols = 13. 4 symbols for PSS, SSS +#define SL_NR_NUM_PSBCH_DMRS_RE 297 +// ceil(2(QPSK)*SL_NR_NUM_PSBCH_DMRS_RE/32) +#define SL_NR_NUM_PSBCH_DMRS_RE_DWORD 20 +// 11 RBs for PSBCH in one symbol * 12 REs +#define SL_NR_NUM_PSBCH_RE_IN_ONE_SYMBOL 132 +// 3 DMRS REs per RB * 11 RBS in one symbol +#define SL_NR_NUM_PSBCH_DMRS_RE_IN_ONE_SYMBOL 33 +// 9 PSBCH DATA REs * 11 RBS in one symbol +#define SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_SYMBOL 99 +#define SL_NR_NUM_PSBCH_RBS_IN_ONE_SYMBOL 11 +// SL_NR_POLAR_PSBCH_E_NORMAL_CP/2 bits because QPSK used for PSBCH. +// 11 * (12-3 DMRS REs) * 9 symbols for PSBCH +#define SL_NR_NUM_PSBCH_MODULATED_SYMBOLS 891 +#define SL_NR_NUM_PSBCH_DATA_RE_IN_ONE_RB 9 +#define SL_NR_NUM_PSBCH_DMRS_RE_IN_ONE_RB 3 +// 11 * (12-3 DMRS REs) * 9 symbols for PSBCH +#define SL_NR_NUM_PSBCH_DATA_RE_IN_ALL_SYMBOLS 891 + +#define SL_NR_NUM_SYMBOLS_SSB_NORMAL_CP 13 +#define SL_NR_NUM_SYMBOLS_SSB_EXT_CP 11 +#define SL_NR_NUM_PSS_SYMBOLS 2 +#define SL_NR_NUM_SSS_SYMBOLS 2 +#define SL_NR_PSS_START_SYMBOL 1 +#define SL_NR_SSS_START_SYMBOL 3 +#define SL_NR_NUM_PSS_OR_SSS_SYMBOLS 2 +#define SL_NR_PSS_SEQUENCE_LENGTH 127 +#define SL_NR_SSS_SEQUENCE_LENGTH 127 +#define SL_NR_NUM_IDs_IN_PSS 2 +#define SL_NR_NUM_IDs_IN_SSS 336 +#define SL_NR_NUM_SLSS_IDs 672 + +typedef enum sl_nr_sidelink_mode { SL_NOT_SUPPORTED = 0, SL_MODE1_SUPPORTED, SL_MODE2_SUPPORTED } sl_nr_sidelink_mode_t; + +//(11*(12-3 DMRS REs) * 2 (QPSK used) +#define SL_NR_NUM_PSBCH_DATA_BITS_IN_ONE_SYMBOL 198 + +typedef struct SL_NR_UE_INIT_PARAMS { + // gold sequences for PSBCH DMRS + uint32_t psbch_dmrs_gold_sequences[SL_NR_NUM_SLSS_IDs][SL_NR_NUM_PSBCH_DMRS_RE_DWORD]; // Gold sequences for PSBCH DMRS + + // PSBCH DMRS QPSK modulated symbols for all possible SLSS Ids + struct complex16 psbch_dmrs_modsym[SL_NR_NUM_SLSS_IDs][SL_NR_NUM_PSBCH_DMRS_RE]; + + // Scaled values + int16_t sl_pss[SL_NR_NUM_IDs_IN_PSS][SL_NR_PSS_SEQUENCE_LENGTH]; + int16_t sl_sss[SL_NR_NUM_SLSS_IDs][SL_NR_SSS_SEQUENCE_LENGTH]; + + // Contains Not scaled values just the simple generated sequence + int16_t sl_pss_for_sync[SL_NR_NUM_IDs_IN_PSS][SL_NR_PSS_SEQUENCE_LENGTH]; + int16_t sl_sss_for_sync[SL_NR_NUM_SLSS_IDs][SL_NR_SSS_SEQUENCE_LENGTH]; + + int32_t **sl_pss_for_correlation; // IFFT samples for correlation + +} SL_NR_UE_INIT_PARAMS_t; + +typedef struct SL_NR_SYNC_PARAMS { + // Indicating start of SSB block in the initial set of samples + uint32_t ssb_offset; + // Freq Offset calculated + int32_t freq_offset; + + uint32_t remaining_frames; + uint32_t rx_offset; + uint32_t slot_offset; + uint16_t N_sl_id2; // id2 determined from PSS during sync ref UE selection + uint16_t N_sl_id1; // id2 determined from SSS during sync ref UE selection + uint16_t N_sl_id; // ID calculated from ID1 and ID2 + int32_t psbch_rsrp; // rsrp of the decoded psbch during sync ref ue selection + uint32_t DFN; // DFN calculated after sync ref UE search + +} SL_NR_SYNC_PARAMS_t; + +typedef struct SL_NR_UE_PSBCH { + // AVG POWER OF PSBCH DMRS in dB/RE + int16_t rsrp_dB_per_RE; + // AVG POWER OF PSBCH DMRS in dBm/RE + int16_t rsrp_dBm_per_RE; + + // STATS - CRC Errors observed during PSBCH reception + uint16_t rx_errors; + + // STATS - Receptions with CRC OK + uint16_t rx_ok; + + // STATS - transmissions of PSBCH by the UE + uint16_t num_psbch_tx; + +} SL_NR_UE_PSBCH_t; + +typedef struct sl_nr_ue_phy_params { + SL_NR_UE_INIT_PARAMS_t init_params; + + SL_NR_SYNC_PARAMS_t sync_params; + + // Sidelink PHY PARAMETERS USED FOR PSBCH reception/Txn + SL_NR_UE_PSBCH_t psbch; + + // Configuration parameters from MAC + sl_nr_phy_config_request_t sl_config; + + NR_DL_FRAME_PARMS sl_frame_params; + + time_stats_t phy_proc_sl_tx; + time_stats_t phy_proc_sl_rx; + time_stats_t channel_estimation_stats; + time_stats_t ue_sl_indication_stats; + +} sl_nr_ue_phy_params_t; + +#endif \ No newline at end of file diff --git a/openair1/SCHED/nfapi_lte_dummy.c b/openair1/SCHED/nfapi_lte_dummy.c index 4e82c3ecb3..14b4f514be 100644 --- a/openair1/SCHED/nfapi_lte_dummy.c +++ b/openair1/SCHED/nfapi_lte_dummy.c @@ -12,7 +12,6 @@ void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB, void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot, nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdu){} -int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type){return 0;} void handle_nr_nfapi_pdsch_pdu(processingData_L1tx_t *msgTx, nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu, uint8_t *sdu){ diff --git a/openair1/SCHED/nfapi_nr_dummy.c b/openair1/SCHED/nfapi_nr_dummy.c index 511911723f..ce10797fea 100644 --- a/openair1/SCHED/nfapi_nr_dummy.c +++ b/openair1/SCHED/nfapi_nr_dummy.c @@ -12,7 +12,6 @@ void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB, void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot, nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdu){} -int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type){return 0;} void handle_nr_nfapi_pdsch_pdu(processingData_L1tx_t *msgTx, nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu, uint8_t *sdu){ diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index cdd1837bb4..e109ae8146 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -155,7 +155,7 @@ void common_signal_procedures_fembms (PHY_VARS_eNB *eNB,int frame, int subframe) if((frame&3)!=0 /*&& subframe != 0*/) return; - LOG_I(PHY,"common_signal_procedures: frame %d, subframe %d fdd:%s dir:%s index:%d\n",frame,subframe,fp->frame_type == FDD?"FDD":"TDD", subframe_select(fp,subframe) == SF_DL?"DL":"UL?",(frame&15)/4); + LOG_D(PHY,"common_signal_procedures: frame %d, subframe %d fdd:%s dir:%s index:%d\n",frame,subframe,fp->frame_type == FDD?"FDD":"TDD", subframe_select(fp,subframe) == SF_DL?"DL":"UL?",(frame&15)/4); // generate Cell-Specific Reference Signals for both slots //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,1); diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 0a348e9c03..291e063aa4 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -81,20 +81,18 @@ void nr_common_signal_procedures(PHY_VARS_gNB *gNB,int frame,int slot, nfapi_nr_ fp->print_ue_help_cmdline_log = false; if (fp->dl_CarrierFreq != fp->ul_CarrierFreq) LOG_A(PHY, - "Command line parameters for the UE: -C %lu --CO %lu -r %d --numerology %d --band %d --ssb %d\n", + "Command line parameters for the UE: -C %lu --CO %lu -r %d --numerology %d --ssb %d\n", fp->dl_CarrierFreq, fp->dl_CarrierFreq - fp->ul_CarrierFreq, fp->N_RB_DL, scs, - fp->nr_band, fp->ssb_start_subcarrier); else LOG_A(PHY, - "Command line parameters for the UE: -C %lu -r %d --numerology %d --band %d --ssb %d\n", + "Command line parameters for the UE: -C %lu -r %d --numerology %d --ssb %d\n", fp->dl_CarrierFreq, fp->N_RB_DL, scs, - fp->nr_band, fp->ssb_start_subcarrier); } LOG_D(PHY, @@ -428,7 +426,12 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int //---------------------------------------------------------- //--------------------- ULSCH decoding --------------------- //---------------------------------------------------------- - + /* Do ULSCH decoding time measurement only when number of PUSCH is limited to 1 + * (valid for unitary physical simulators). ULSCH processing lopp is then executed + * only once, which ensures exactly one start and stop of the ULSCH decoding time + * measurement per processed TB.*/ + if (gNB->max_nb_pusch == 1) + start_meas(&gNB->ulsch_decoding_stats); int nbDecode = nr_ulsch_decoding(gNB, ULSCH_id, gNB->pusch_vars[ULSCH_id].llr, frame_parms, pusch_pdu, frame_rx, slot_rx, harq_pid, G); @@ -544,13 +547,14 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { int rb2 = 0; int prbpos = 0; - for (int symbol=0;symbol<14;symbol++) { - for (int m=0;m<9;m++) { + for (int symbol = 0; symbol < 14; symbol++) { + for (int m = 0; m < 9; m++) { gNB->rb_mask_ul[symbol][m] = 0; - for (int i=0;i<32;i++) { - prbpos = (m*32)+i; - if (prbpos>gNB->frame_parms.N_RB_UL) break; - gNB->rb_mask_ul[symbol][m] |= (gNB->ulprbbl[prbpos]>0 ? 1 : 0)<gNB->frame_parms.N_RB_UL) + break; + gNB->rb_mask_ul[symbol][m] |= (gNB->ulprbbl[prbpos] > 0 ? 1U : 0) << i; } } } @@ -916,6 +920,12 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) delNotifiedFIFO_elt(req); totalDecode--; } + /* Do ULSCH decoding time measurement only when number of PUSCH is limited to 1 + * (valid for unitary physical simulators). ULSCH processing loop is then executed + * only once, which ensures exactly one start and stop of the ULSCH decoding time + * measurement per processed TB.*/ + if (gNB->max_nb_pusch == 1) + stop_meas(&gNB->ulsch_decoding_stats); for (int i = 0; i < gNB->max_nb_srs; i++) { NR_gNB_SRS_t *srs = &gNB->srs[i]; if (srs) { diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index f6b33359c8..b34d021390 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -165,5 +165,23 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]); +int psbch_pscch_processing(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, nr_phy_data_t *phy_data); +int phy_procedures_nrUE_SL_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, nr_phy_data_tx_t *phy_data); +/*! \brief This function prepares the sl indication to pass to the MAC + */ +void nr_fill_sl_indication(nr_sidelink_indication_t *sl_ind, + sl_nr_rx_indication_t *rx_ind, + sl_nr_sci_indication_t *sci_ind, + UE_nr_rxtx_proc_t *proc, + PHY_VARS_NR_UE *ue, + void *phy_data); +void nr_fill_sl_rx_indication(sl_nr_rx_indication_t *rx_ind, + uint8_t pdu_type, + PHY_VARS_NR_UE *ue, + uint16_t n_pdus, + UE_nr_rxtx_proc_t *proc, + void *typeSpecific, + uint16_t rx_slss_id); + #endif /** @}*/ diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index fe36aa3425..369c388ad3 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -97,7 +97,6 @@ static void free_uci_inds(nfapi_nr_uci_indication_t *uci_ind) free(uci_ind->uci_list); uci_ind->uci_list = NULL; free(uci_ind); - uci_ind = NULL; } int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response) { diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index ee250f528e..da734cc84d 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -865,22 +865,22 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_ __attribute__ ((aligned(32))) struct complex16 dl_ch_estimates_time[fp->nb_antennas_rx][fp->ofdm_symbol_size]; for (int i=1; i<4; i++) { - nr_slot_fep(ue, - proc, - (ssb_start_symbol+i)%(fp->symbols_per_slot), - rxdataF); + nr_slot_fep(ue, fp, proc, (ssb_start_symbol + i) % (fp->symbols_per_slot), rxdataF, link_type_dl); start_meas(&ue->dlsch_channel_estimation_stats); nr_pbch_channel_estimation(ue, + &ue->frame_parms, estimateSz, dl_ch_estimates, dl_ch_estimates_time, proc, - (ssb_start_symbol+i)%(fp->symbols_per_slot), - i-1, - ssb_index&7, + (ssb_start_symbol + i) % (fp->symbols_per_slot), + i - 1, + ssb_index & 7, ssb_slot_2 == nr_slot_rx, - rxdataF); + rxdataF, + false, + fp->Nid_cell); stop_meas(&ue->dlsch_channel_estimation_stats); } @@ -921,10 +921,7 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_ { for(int j = prs_config->SymbolStart; j < (prs_config->SymbolStart+prs_config->NumPRSSymbols); j++) { - nr_slot_fep(ue, - proc, - (j%fp->symbols_per_slot), - rxdataF); + nr_slot_fep(ue, fp, proc, (j % fp->symbols_per_slot), rxdataF, link_type_dl); } nr_prs_channel_estimation(gNB_id, rsc_id, i, ue, proc, fp, rxdataF); } @@ -955,10 +952,7 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_ for (uint16_t l=0; lofdm_demod_stats); - nr_slot_fep(ue, - proc, - l, - rxdataF); + nr_slot_fep(ue, fp, proc, l, rxdataF, link_type_dl); } // Hold the channel estimates in frequency domain. @@ -1016,9 +1010,11 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ for (uint16_t m=start_symb_sch;m<(nb_symb_sch+start_symb_sch) ; m++){ nr_slot_fep(ue, + &ue->frame_parms, proc, - m, //to be updated from higher layer - rxdataF); + m, // to be updated from higher layer + rxdataF, + link_type_dl); } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDSCH, VCD_FUNCTION_OUT); @@ -1106,7 +1102,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ } l_csiim[symb_idx] = ue->csiim_vars[gNB_id]->csiim_config_pdu.l_csiim[symb_idx]; if(nr_slot_fep_done == false) { - nr_slot_fep(ue, proc, ue->csiim_vars[gNB_id]->csiim_config_pdu.l_csiim[symb_idx], rxdataF); + nr_slot_fep(ue, &ue->frame_parms, proc, ue->csiim_vars[gNB_id]->csiim_config_pdu.l_csiim[symb_idx], rxdataF, link_type_dl); } } nr_ue_csi_im_procedures(ue, proc, rxdataF); @@ -1117,7 +1113,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ if ((ue->csirs_vars[gNB_id]) && (ue->csirs_vars[gNB_id]->active == 1)) { for(int symb = 0; symb < NR_SYMBOLS_PER_SLOT; symb++) { if(is_csi_rs_in_symbol(ue->csirs_vars[gNB_id]->csirs_config_pdu,symb)) { - nr_slot_fep(ue, proc, symb, rxdataF); + nr_slot_fep(ue, &ue->frame_parms, proc, symb, rxdataF, link_type_dl); } } nr_ue_csi_rs_procedures(ue, proc, rxdataF); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c new file mode 100644 index 0000000000..2bf8ee6cb9 --- /dev/null +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c @@ -0,0 +1,305 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#define _GNU_SOURCE + +#include "PHY/defs_nr_UE.h" +#include +#include "common/utils/LOG/log.h" +#include "common/utils/LOG/vcd_signal_dumper.h" +#include "UTIL/OPT/opt.h" +#include "intertask_interface.h" +#include "T.h" +#include "PHY/MODULATION/modulation_UE.h" +#include "PHY/NR_UE_ESTIMATION/nr_estimation.h" +#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" + +void nr_fill_sl_indication(nr_sidelink_indication_t *sl_ind, + sl_nr_rx_indication_t *rx_ind, + sl_nr_sci_indication_t *sci_ind, + UE_nr_rxtx_proc_t *proc, + PHY_VARS_NR_UE *ue, + void *phy_data) +{ + memset((void *)sl_ind, 0, sizeof(nr_sidelink_indication_t)); + + sl_ind->gNB_index = proc->gNB_id; + sl_ind->module_id = ue->Mod_id; + sl_ind->cc_id = ue->CC_id; + sl_ind->frame_rx = proc->frame_rx; + sl_ind->slot_rx = proc->nr_slot_rx; + sl_ind->frame_tx = proc->frame_tx; + sl_ind->slot_tx = proc->nr_slot_tx; + sl_ind->phy_data = phy_data; + + if (rx_ind) { + sl_ind->rx_ind = rx_ind; // hang on rx_ind instance + sl_ind->sci_ind = NULL; + } + if (sci_ind) { + sl_ind->rx_ind = NULL; + sl_ind->sci_ind = sci_ind; + } +} + +void nr_fill_sl_rx_indication(sl_nr_rx_indication_t *rx_ind, + uint8_t pdu_type, + PHY_VARS_NR_UE *ue, + uint16_t n_pdus, + UE_nr_rxtx_proc_t *proc, + void *typeSpecific, + uint16_t rx_slss_id) +{ + if (n_pdus > 1) { + LOG_E(PHY, "In %s: multiple number of SL PDUs not supported yet...\n", __FUNCTION__); + } + + sl_nr_ue_phy_params_t *sl_phy_params = &ue->SL_UE_PHY_PARAMS; + + switch (pdu_type) { + case SL_NR_RX_PDU_TYPE_SLSCH: + break; + case FAPI_NR_RX_PDU_TYPE_SSB: { + sl_nr_ssb_pdu_t *ssb_pdu = &rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu; + if (typeSpecific) { + uint8_t *psbch_decoded_output = (uint8_t *)typeSpecific; + memcpy(ssb_pdu->psbch_payload, psbch_decoded_output, sizeof(4)); // 4 bytes of PSBCH payload bytes + ssb_pdu->rsrp_dbm = sl_phy_params->psbch.rsrp_dBm_per_RE; + ssb_pdu->rx_slss_id = rx_slss_id; + ssb_pdu->decode_status = true; + LOG_D(PHY, + "SL-IND: SSB to MAC. rsrp:%d, slssid:%d, payload:%x\n", + ssb_pdu->rsrp_dbm, + ssb_pdu->rx_slss_id, + *((uint32_t *)(ssb_pdu->psbch_payload))); + } else + ssb_pdu->decode_status = false; + } break; + default: + break; + } + + rx_ind->rx_indication_body[n_pdus - 1].pdu_type = pdu_type; + rx_ind->number_pdus = n_pdus; +} + +static int nr_ue_psbch_procedures(PHY_VARS_NR_UE *ue, + NR_DL_FRAME_PARMS *fp, + UE_nr_rxtx_proc_t *proc, + int estimateSz, + struct complex16 dl_ch_estimates[][estimateSz], + nr_phy_data_t *phy_data, + c16_t rxdataF[][fp->samples_per_slot_wCP]) +{ + int ret = 0; + DevAssert(ue); + + int frame_rx = proc->frame_rx; + int nr_slot_rx = proc->nr_slot_rx; + + sl_nr_ue_phy_params_t *sl_phy_params = &ue->SL_UE_PHY_PARAMS; + uint16_t rx_slss_id = sl_phy_params->sl_config.sl_sync_source.rx_slss_id; + + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PSBCH_PROCEDURES, VCD_FUNCTION_IN); + + LOG_D(PHY, + "[UE %d] Frame %d Slot %d, Trying PSBCH (SLSS ID %d)\n", + ue->Mod_id, + frame_rx, + nr_slot_rx, + sl_phy_params->sl_config.sl_sync_source.rx_slss_id); + + uint8_t decoded_pdu[4] = {0}; + ret = nr_rx_psbch(ue, + proc, + estimateSz, + dl_ch_estimates, + fp, + decoded_pdu, + rxdataF, + sl_phy_params->sl_config.sl_sync_source.rx_slss_id); + + nr_sidelink_indication_t sl_indication; + sl_nr_rx_indication_t rx_ind = {0}; + uint16_t number_pdus = 1; + + uint8_t *result = NULL; + if (ret) { + sl_phy_params->psbch.rx_errors++; + LOG_E(PHY, "%d:%d PSBCH RX: NOK \n", proc->frame_rx, proc->nr_slot_rx); + } else { + result = decoded_pdu; + sl_phy_params->psbch.rx_ok++; + LOG_D(PHY, "%d:%d PSBCH RX: OK \n", proc->frame_rx, proc->nr_slot_rx); + } + + nr_fill_sl_indication(&sl_indication, &rx_ind, NULL, proc, ue, phy_data); + nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, ue, number_pdus, proc, (void *)result, rx_slss_id); + + if (ue->if_inst && ue->if_inst->sl_indication) + ue->if_inst->sl_indication(&sl_indication); + + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PSBCH_PROCEDURES, VCD_FUNCTION_OUT); + return ret; +} + +int psbch_pscch_processing(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, nr_phy_data_t *phy_data) +{ + int frame_rx = proc->frame_rx; + int nr_slot_rx = proc->nr_slot_rx; + sl_nr_ue_phy_params_t *sl_phy_params = &ue->SL_UE_PHY_PARAMS; + NR_DL_FRAME_PARMS *fp = &sl_phy_params->sl_frame_params; + int sampleShift = 0; + + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX_SL, VCD_FUNCTION_IN); + start_meas(&sl_phy_params->phy_proc_sl_rx); + + LOG_D(PHY, " ****** Sidelink RX-Chain for Frame.Slot %d.%d ****** \n", frame_rx % 1024, nr_slot_rx); + + const uint32_t rxdataF_sz = fp->samples_per_slot_wCP; + __attribute__((aligned(32))) c16_t rxdataF[fp->nb_antennas_rx][rxdataF_sz]; + + if (phy_data->sl_rx_action == SL_NR_CONFIG_TYPE_RX_PSBCH) { + const int estimateSz = fp->symbols_per_slot * fp->ofdm_symbol_size; + + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PSBCH, VCD_FUNCTION_IN); + LOG_D(PHY, " ----- PSBCH RX TTI: frame.slot %d.%d ------ \n", frame_rx % 1024, nr_slot_rx); + + __attribute__((aligned(32))) struct complex16 dl_ch_estimates[fp->nb_antennas_rx][estimateSz]; + __attribute__((aligned(32))) struct complex16 dl_ch_estimates_time[fp->nb_antennas_rx][fp->ofdm_symbol_size]; + + // 0 for Normal Cyclic Prefix and 1 for EXT CyclicPrefix + const int numsym = (fp->Ncp) ? SL_NR_NUM_SYMBOLS_SSB_EXT_CP : SL_NR_NUM_SYMBOLS_SSB_NORMAL_CP; + + for (int sym = 0; sym < numsym;) { + nr_slot_fep(ue, fp, proc, sym, rxdataF, link_type_ul); + + start_meas(&sl_phy_params->channel_estimation_stats); + nr_pbch_channel_estimation(ue, + fp, + estimateSz, + dl_ch_estimates, + dl_ch_estimates_time, + proc, + sym, + sym, + 0, + 0, + rxdataF, + true, + sl_phy_params->sl_config.sl_sync_source.rx_slss_id); + stop_meas(&sl_phy_params->channel_estimation_stats); + + // PSBCH present in symbols 0, 5-12 for normal cp + sym = (sym == 0) ? 5 : sym + 1; + } + + nr_sl_psbch_rsrp_measurements(sl_phy_params, fp, rxdataF, false); + + LOG_D(PHY, " ------ Decode SL-MIB: frame.slot %d.%d ------ \n", frame_rx % 1024, nr_slot_rx); + + const int psbchSuccess = nr_ue_psbch_procedures(ue, fp, proc, estimateSz, dl_ch_estimates, phy_data, rxdataF); + + if (ue->no_timing_correction == 0 && psbchSuccess == 0) { + LOG_D(PHY, "start adjust sync slot = %d no timing %d\n", nr_slot_rx, ue->no_timing_correction); + sampleShift = + nr_adjust_synch_ue(fp, ue, proc->gNB_id, fp->ofdm_symbol_size, dl_ch_estimates_time, frame_rx, nr_slot_rx, 16384); + } + + LOG_D(PHY, "Doing N0 measurements in %s\n", __FUNCTION__); + // nr_ue_rrc_measurements(ue, proc, rxdataF); + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PSBCH, VCD_FUNCTION_OUT); + + if (frame_rx % 64 == 0) { + LOG_I(NR_PHY, "============================================\n"); + + LOG_I(NR_PHY, + "[UE%d] %d:%d PSBCH Stats: TX %d, RX ok %d, RX not ok %d\n", + ue->Mod_id, + frame_rx, + nr_slot_rx, + sl_phy_params->psbch.num_psbch_tx, + sl_phy_params->psbch.rx_ok, + sl_phy_params->psbch.rx_errors); + + LOG_I(NR_PHY, "============================================\n"); + } + } + + return sampleShift; +} + +int phy_procedures_nrUE_SL_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, nr_phy_data_tx_t *phy_data) +{ + int slot_tx = proc->nr_slot_tx; + int frame_tx = proc->frame_tx; + int tx_action = 0; + + sl_nr_ue_phy_params_t *sl_phy_params = &ue->SL_UE_PHY_PARAMS; + NR_DL_FRAME_PARMS *fp = &sl_phy_params->sl_frame_params; + + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_SL,VCD_FUNCTION_IN); + + const int samplesF_per_slot = NR_SYMBOLS_PER_SLOT * fp->ofdm_symbol_size; + c16_t txdataF_buf[fp->nb_antennas_tx * samplesF_per_slot] __attribute__((aligned(32))); + memset(txdataF_buf, 0, sizeof(txdataF_buf)); + c16_t *txdataF[fp->nb_antennas_tx]; /* workaround to be compatible with current txdataF usage in all tx procedures. */ + for (int i = 0; i < fp->nb_antennas_tx; ++i) + txdataF[i] = &txdataF_buf[i * samplesF_per_slot]; + + LOG_D(PHY, "****** start Sidelink TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, slot_tx); + + start_meas(&sl_phy_params->phy_proc_sl_tx); + + if (phy_data->sl_tx_action == SL_NR_CONFIG_TYPE_TX_PSBCH) { + sl_nr_tx_config_psbch_pdu_t *psbch_vars = &phy_data->psbch_vars; + nr_tx_psbch(ue, frame_tx, slot_tx, psbch_vars, txdataF); + sl_phy_params->psbch.num_psbch_tx++; + + if (frame_tx % 64 == 0) { + LOG_I(NR_PHY, "============================================\n"); + + LOG_I(NR_PHY, + "[UE%d] %d:%d PSBCH Stats: TX %d, RX ok %d, RX not ok %d\n", + ue->Mod_id, + frame_tx, + slot_tx, + sl_phy_params->psbch.num_psbch_tx, + sl_phy_params->psbch.rx_ok, + sl_phy_params->psbch.rx_errors); + + LOG_I(NR_PHY, "============================================\n"); + } + tx_action = 1; + } + + if (tx_action) { + LOG_D(PHY, "Sending Uplink data \n"); + nr_ue_pusch_common_procedures(ue, proc->nr_slot_tx, fp, fp->nb_antennas_tx, txdataF); + } + + LOG_D(PHY, "****** end Sidelink TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, slot_tx); + + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_SL, VCD_FUNCTION_OUT); + stop_meas(&sl_phy_params->phy_proc_sl_tx); + + return tx_action; +} diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c index 91037410ee..ba21bf8ec1 100644 --- a/openair1/SIMULATION/LTE_PHY/mbmssim.c +++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c @@ -688,9 +688,8 @@ int main(int argc, char **argv) { else { while(fgets(buf, 63, proc_fd)) printf("%s", buf); + fclose(proc_fd); } - - fclose(proc_fd); cpu_freq_GHz = ((double)atof(buf))/1e6; #else cpu_freq_GHz = get_cpu_freq_GHz(); diff --git a/openair1/SIMULATION/LTE_PHY/syncsim.c b/openair1/SIMULATION/LTE_PHY/syncsim.c index 0a041258c2..e8976ea898 100644 --- a/openair1/SIMULATION/LTE_PHY/syncsim.c +++ b/openair1/SIMULATION/LTE_PHY/syncsim.c @@ -312,7 +312,7 @@ int main(int argc, char **argv) { #ifdef IFFT_FPGA int **txdataF2; #endif - int **txdata,**txdata1 = NULL,**txdata2 = NULL; + int **txdata, **txdata1 = NULL, **txdata2 = NULL; double **s_re,**s_im,**s_re1,**s_im1,**s_re2,**s_im2,**r_re,**r_im,**r_re1,**r_im1,**r_re2,**r_im2; double iqim = 0.0; unsigned char pbch_pdu[6]; @@ -1180,12 +1180,12 @@ int main(int argc, char **argv) { s_re[aa][i] = tmp_re; s_im[aa][i] = tmp_im; - if (interf1>-20) { + if (interf1 >- 20 && txdata1) { s_re1[aa][i] = ((double)(((short *)txdata1[aa]))[(i<<1)]); s_im1[aa][i] = ((double)(((short *)txdata1[aa]))[(i<<1)+1]); } - if (interf2>-20) { + if (interf2 >- 20 && txdata2) { s_re2[aa][i] = ((double)(((short *)txdata2[aa]))[(i<<1)]); s_im2[aa][i] = ((double)(((short *)txdata2[aa]))[(i<<1)+1]); } diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index ac2c453fc5..74d4568b70 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -917,6 +917,11 @@ int main(int argc, char **argv) csv_file = fopen(filename_csv, "a"); if (csv_file == NULL) { printf("Can't open file \"%s\", errno %d\n", filename_csv, errno); + free(s_re); + free(s_im); + free(r_re); + free(r_im); + free(txdata); return 1; } // adding name of parameters into file @@ -1218,8 +1223,7 @@ int main(int argc, char **argv) printStatIndent3(&gNB->dlsch_rate_matching_stats,"DLSCH Rate Mataching time"); printStatIndent3(&gNB->dlsch_interleaving_stats, "DLSCH Interleaving time"); printStatIndent2(&gNB->dlsch_modulation_stats,"DLSCH modulation time"); - printStatIndent2(&gNB->dlsch_scrambling_stats, "DLSCH scrambling time"); - printStatIndent2(&gNB->dlsch_layer_mapping_stats, "DLSCH Layer Mapping time"); + printStatIndent2(&gNB->dlsch_scrambling_stats, "DLSCH scrambling time"); printStatIndent2(&gNB->dlsch_resource_mapping_stats, "DLSCH Resource Mapping time"); printStatIndent2(&gNB->dlsch_precoding_stats,"DLSCH Layer Precoding time"); diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 489931adcc..acfa696b24 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -786,36 +786,45 @@ int main(int argc, char **argv) int ssb_slot = (UE->symbol_offset/14)+(n_hf*(frame_parms->slots_per_frame>>1)); proc.nr_slot_rx = ssb_slot; proc.gNB_id = 0; - for (int i=UE->symbol_offset+1; isymbol_offset+4; i++) { - nr_slot_fep(UE, - &proc, - i%frame_parms->symbols_per_slot, - rxdataF); - - nr_pbch_channel_estimation(UE,estimateSz, dl_ch_estimates, dl_ch_estimates_time, &proc, - i%frame_parms->symbols_per_slot,i-(UE->symbol_offset+1),ssb_index%8,n_hf,rxdataF); + for (int i = UE->symbol_offset + 1; i < UE->symbol_offset + 4; i++) { + nr_slot_fep(UE, frame_parms, &proc, i % frame_parms->symbols_per_slot, rxdataF, link_type_dl); + nr_pbch_channel_estimation(UE, + &UE->frame_parms, + estimateSz, + dl_ch_estimates, + dl_ch_estimates_time, + &proc, + i % frame_parms->symbols_per_slot, + i - (UE->symbol_offset + 1), + ssb_index % 8, + n_hf, + rxdataF, + false, + frame_parms->Nid_cell); } - fapiPbch_t result; + fapiPbch_t result; ret = nr_rx_pbch(UE, &proc, estimateSz, dl_ch_estimates, frame_parms, ssb_index % 8, &result, rxdataF); - if (ret==0) { - //UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically - //UE->rx_ind.rx_indication_body->mib_pdu.ssb_length; //Lmax, not yet detected automatically - uint8_t gNB_xtra_byte=0; - for (int i=0; i<8; i++) - gNB_xtra_byte |= ((gNB->pbch.pbch_a>>(31-i))&1)<<(7-i); - - payload_ret = (result.xtra_byte == gNB_xtra_byte); - for (i=0;i<3;i++){ - payload_ret += (result.decoded_output[i] == ((msgDataTx.ssb[ssb_index].ssb_pdu.ssb_pdu_rel15.bchPayload>>(8*i)) & 0xff)); - } - //printf("ret %d\n", payload_ret); - if (payload_ret!=4) - n_errors_payload++; - } + if (ret == 0) { + // UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically + // UE->rx_ind.rx_indication_body->mib_pdu.ssb_length; //Lmax, not yet detected automatically + uint8_t gNB_xtra_byte = 0; + for (int i = 0; i < 8; i++) + gNB_xtra_byte |= ((gNB->pbch.pbch_a >> (31 - i)) & 1) << (7 - i); - if (ret!=0) n_errors++; + payload_ret = (result.xtra_byte == gNB_xtra_byte); + for (i = 0; i < 3; i++) { + payload_ret += + (result.decoded_output[i] == ((msgDataTx.ssb[ssb_index].ssb_pdu.ssb_pdu_rel15.bchPayload >> (8 * i)) & 0xff)); + } + // printf("ret %d\n", payload_ret); + if (payload_ret != 4) + n_errors_payload++; + } + + if (ret != 0) + n_errors++; } } //noise trials printf("SNR %f: trials %d, n_errors_crc = %d, n_errors_payload %d\n", SNR,n_trials,n_errors,n_errors_payload); diff --git a/openair1/SIMULATION/NR_PHY/psbchsim.c b/openair1/SIMULATION/NR_PHY/psbchsim.c new file mode 100644 index 0000000000..b30405bef9 --- /dev/null +++ b/openair1/SIMULATION/NR_PHY/psbchsim.c @@ -0,0 +1,655 @@ + +#include +#include +#include +#include +#include +#include +#include "common/config/config_userapi.h" +#include "common/ran_context.h" +#include "PHY/types.h" +#include "PHY/defs_nr_common.h" +#include "PHY/defs_nr_UE.h" +#include "PHY/defs_gNB.h" +#include "PHY/phy_vars.h" +#include "NR_MasterInformationBlockSidelink.h" +#include "PHY/INIT/phy_init.h" +#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h" +#include "openair1/SIMULATION/TOOLS/sim.h" +#include "common/utils/nr/nr_common.h" +#include "openair2/RRC/NR/nr_rrc_extern.h" +#include "openair2/RRC/LTE/rrc_vars.h" +#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" +#include "PHY/INIT/nr_phy_init.h" +#include "SIMULATION/RF/rf.h" +#include "common/utils/load_module_shlib.h" +#include "PHY/MODULATION/nr_modulation.h" +#include "NR_SL-SSB-TimeAllocation-r16.h" + +void e1_bearer_context_setup(const e1ap_bearer_setup_req_t *req) +{ + abort(); +} +void e1_bearer_context_modif(const e1ap_bearer_setup_req_t *req) +{ + abort(); +} +void e1_bearer_release_cmd(const e1ap_bearer_release_cmd_t *cmd) +{ + abort(); +} +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ + const char *msg = s == NULL ? "no comment" : s; + printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); + exit(-1); +} +int8_t nr_rrc_RA_succeeded(const module_id_t mod_id, const uint8_t gNB_index) +{ + return 1; +} +// to solve link errors +double cpuf; +// void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {} +void get_num_re_dmrs(nfapi_nr_ue_pusch_pdu_t *pusch_pdu, uint8_t *nb_dmrs_re_per_rb, uint16_t *number_dmrs_symbols) +{ +} +uint64_t downlink_frequency[1][1]; +int32_t uplink_frequency_offset[1][1]; +THREAD_STRUCT thread_struct; +instance_t DUuniqInstance = 0; +instance_t CUuniqInstance = 0; +openair0_config_t openair0_cfg[1]; + +RAN_CONTEXT_t RC; +int oai_exit = 0; +char *uecap_file; + +void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index) +{ + return; +} + +int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP, + const int CC_id, + const uint8_t gNB_id, + const frame_t frameP, + const rb_id_t Srb_id, + uint8_t *buffer_pP) +{ + return 0; +} + +nr_bler_struct nr_bler_data[NR_NUM_MCS]; +void get_nrUE_params(void) +{ + return; +} +uint8_t check_if_ue_is_sl_syncsource() +{ + return 0; +} +////////////////////////////////////////////////////////////////////////// +static void prepare_mib_bits(uint8_t *buf, uint32_t frame_tx, uint32_t slot_tx) +{ + NR_MasterInformationBlockSidelink_t *sl_mib; + asn_enc_rval_t enc_rval; + + void *buffer = (void *)buf; + + sl_mib = CALLOC(1, sizeof(NR_MasterInformationBlockSidelink_t)); + + sl_mib->inCoverage_r16 = 0; // TRUE; + + // allocate buffer for 7 bits slotnumber + sl_mib->slotIndex_r16.size = 1; + sl_mib->slotIndex_r16.buf = CALLOC(1, sl_mib->slotIndex_r16.size); + sl_mib->slotIndex_r16.bits_unused = sl_mib->slotIndex_r16.size * 8 - 7; + sl_mib->slotIndex_r16.buf[0] = slot_tx << sl_mib->slotIndex_r16.bits_unused; + + sl_mib->directFrameNumber_r16.size = 2; + sl_mib->directFrameNumber_r16.buf = CALLOC(1, sl_mib->directFrameNumber_r16.size); + sl_mib->directFrameNumber_r16.bits_unused = sl_mib->directFrameNumber_r16.size * 8 - 10; + sl_mib->directFrameNumber_r16.buf[0] = frame_tx >> (8 - sl_mib->directFrameNumber_r16.bits_unused); + sl_mib->directFrameNumber_r16.buf[1] = frame_tx << sl_mib->directFrameNumber_r16.bits_unused; + + enc_rval = uper_encode_to_buffer(&asn_DEF_NR_MasterInformationBlockSidelink, NULL, (void *)sl_mib, buffer, 100); + + AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); + + asn_DEF_NR_MasterInformationBlockSidelink.op->free_struct(&asn_DEF_NR_MasterInformationBlockSidelink, + sl_mib, + ASFM_FREE_EVERYTHING); +} + +static int test_rx_mib(uint8_t *decoded_output, uint16_t frame, uint16_t slot) +{ + uint32_t sl_mib = *(uint32_t *)decoded_output; + + uint32_t fn = 0, sl = 0; + fn = (((sl_mib & 0x0700) >> 1) | ((sl_mib & 0xFE0000) >> 17)); + sl = (((sl_mib & 0x010000) >> 10) | ((sl_mib & 0xFC000000) >> 26)); + + printf("decoded output:%x, TX %d:%d, timing decoded from sl-MIB %d:%d\n", *(uint32_t *)decoded_output, frame, slot, fn, sl); + + if (frame == fn && slot == sl) + return 0; + + return -1; +} + +////////////////////////////////////////////////////////////////////////// + +static void configure_NR_UE(PHY_VARS_NR_UE *UE, int mu, int N_RB) +{ + fapi_nr_config_request_t config; + NR_DL_FRAME_PARMS *fp = &UE->frame_parms; + + config.ssb_config.scs_common = mu; + config.cell_config.frame_duplex_type = TDD; + config.carrier_config.dl_grid_size[mu] = N_RB; + config.carrier_config.ul_grid_size[mu] = N_RB; + config.carrier_config.dl_frequency = 0; + config.carrier_config.uplink_frequency = 0; + + int band; + if (mu == 1) + band = 78; + if (mu == 0) + band = 34; + nr_init_frame_parms_ue(fp, &config, band); + fp->ofdm_offset_divisor = 8; + nr_dump_frame_parms(fp); + + if (init_nr_ue_signal(UE, 1) != 0) { + printf("Error at UE NR initialisation\n"); + exit(-1); + } +} + +static void sl_init_frame_parameters(PHY_VARS_NR_UE *UE) +{ + NR_DL_FRAME_PARMS *nr_fp = &UE->frame_parms; + NR_DL_FRAME_PARMS *sl_fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params; + + memcpy(sl_fp, nr_fp, sizeof(NR_DL_FRAME_PARMS)); + sl_fp->ofdm_offset_divisor = 8; // What is this used for? + + sl_fp->att_tx = 1; + sl_fp->att_rx = 1; + // band47 //UL freq will be set to Sidelink freq + sl_fp->ul_CarrierFreq = 5880000000; + + sl_fp->ssb_start_subcarrier = UE->SL_UE_PHY_PARAMS.sl_config.sl_bwp_config.sl_ssb_offset_point_a; + sl_fp->Nid_cell = UE->SL_UE_PHY_PARAMS.sl_config.sl_sync_source.rx_slss_id; + +#ifdef DEBUG_INIT + LOG_I(PHY, "Dumping Sidelink Frame Parameters\n"); + nr_dump_frame_parms(sl_fp); +#endif +} + +static void configure_SL_UE(PHY_VARS_NR_UE *UE, int mu, int N_RB, int ssb_offset, int slss_id) +{ + sl_nr_phy_config_request_t *config = &UE->SL_UE_PHY_PARAMS.sl_config; + NR_DL_FRAME_PARMS *fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params; + + config->sl_bwp_config.sl_scs = mu; + config->sl_bwp_config.sl_ssb_offset_point_a = ssb_offset; + config->sl_carrier_config.sl_bandwidth = N_RB; + config->sl_carrier_config.sl_grid_size = 106; + config->sl_sync_source.rx_slss_id = slss_id; + + sl_init_frame_parameters(UE); + sl_ue_phy_init(UE); + init_symbol_rotation(fp); + init_timeshift_rotation(fp); + LOG_I(PHY, "Dumping Sidelink Frame Parameters\n"); + nr_dump_frame_parms(fp); +} + +static int freq_domain_loopback(PHY_VARS_NR_UE *UE_tx, PHY_VARS_NR_UE *UE_rx, int frame, int slot, nr_phy_data_tx_t *phy_data) +{ + sl_nr_ue_phy_params_t *sl_ue1 = &UE_tx->SL_UE_PHY_PARAMS; + sl_nr_ue_phy_params_t *sl_ue2 = &UE_rx->SL_UE_PHY_PARAMS; + + printf("\nPSBCH SIM -F: %d:%d slss id TX UE:%d, RX UE:%d\n", + frame, + slot, + phy_data->psbch_vars.tx_slss_id, + sl_ue2->sl_config.sl_sync_source.rx_slss_id); + + NR_DL_FRAME_PARMS *fp = &sl_ue1->sl_frame_params; + const int samplesF_per_slot = NR_SYMBOLS_PER_SLOT * fp->ofdm_symbol_size; + c16_t txdataF_buf[fp->nb_antennas_tx * samplesF_per_slot] __attribute__((aligned(32))); + memset(txdataF_buf, 0, sizeof(txdataF_buf)); + c16_t *txdataF[fp->nb_antennas_tx]; /* workaround to be compatible with current txdataF usage in all tx procedures. */ + for (int i = 0; i < fp->nb_antennas_tx; ++i) + txdataF[i] = &txdataF_buf[i * samplesF_per_slot]; + + nr_tx_psbch(UE_tx, frame, slot, &phy_data->psbch_vars, txdataF); + + int estimateSz = sl_ue2->sl_frame_params.samples_per_slot_wCP; + __attribute__((aligned(32))) struct complex16 rxdataF[1][estimateSz]; + for (int i = 0; i < sl_ue1->sl_frame_params.samples_per_slot_wCP; i++) { + struct complex16 *txdataF_ptr = (struct complex16 *)&txdataF[0][i]; + struct complex16 *rxdataF_ptr = (struct complex16 *)&rxdataF[0][i]; + rxdataF_ptr->r = txdataF_ptr->r; + rxdataF_ptr->i = txdataF_ptr->i; + // printf("r,i TXDATAF[%d]- %d:%d, RXDATAF[%d]- %d:%d\n", + // i, txdataF_ptr->r, txdataF_ptr->i, i, txdataF_ptr->r, txdataF_ptr->i); + } + + uint8_t err_status = 0; + + UE_nr_rxtx_proc_t proc; + proc.frame_rx = frame; + proc.nr_slot_rx = slot; + + struct complex16 dl_ch_estimates[1][estimateSz]; + uint8_t decoded_output[4] = {0}; + + LOG_I(PHY, "DEBUG: HIJACKING DL CHANNEL ESTIMATES.\n"); + for (int s = 0; s < 14; s++) { + for (int j = 0; j < sl_ue2->sl_frame_params.ofdm_symbol_size; j++) { + struct complex16 *dlch = (struct complex16 *)(&dl_ch_estimates[0][s * sl_ue2->sl_frame_params.ofdm_symbol_size]); + dlch[j].r = 128; + dlch[j].i = 0; + } + } + + err_status = nr_rx_psbch(UE_rx, + &proc, + estimateSz, + dl_ch_estimates, + &sl_ue2->sl_frame_params, + decoded_output, + rxdataF, + sl_ue2->sl_config.sl_sync_source.rx_slss_id); + + int error_payload = 0; + error_payload = test_rx_mib(decoded_output, frame, slot); + + if (err_status == 0 || error_payload == 0) { + LOG_I(PHY, "---------PSBCH -F TEST OK.\n"); + return 0; + } + LOG_E(PHY, "--------PSBCH -F TEST NOK. FAIL.\n"); + return -1; +} + +PHY_VARS_NR_UE *UE_TX; // for tx +PHY_VARS_NR_UE *UE_RX; // for rx +double cpuf; + +configmodule_interface_t *uniqCfg = NULL; +int main(int argc, char **argv) +{ + char c; + int test_freqdomain_loopback = 0, test_slss_search = 0; + int frame = 5, slot = 10, frame_tx = 0, slot_tx = 0; + int loglvl = OAILOG_INFO; + uint16_t slss_id = 336, ssb_offset = 0; + double snr1 = 2.0, snr0 = 2.0, SNR; + double sigma2 = 0.0, sigma2_dB = 0.0; + double cfo = 0, ip = 0.0; + + SCM_t channel_model = AWGN; // Rayleigh1_anticorr; + int N_RB_DL = 106, mu = 1; + + uint16_t errors = 0, n_trials = 1; + + int frame_length_complex_samples; + // int frame_length_complex_samples_no_prefix; + NR_DL_FRAME_PARMS *frame_parms; + + int seed = 0; + + cpuf = get_cpu_freq_GHz(); + + if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) { + exit_fun("[NR_PSBCHSIM] Error, configuration module init failed\n"); + } + + randominit(0); + + while ((c = getopt(argc, argv, "c:hn:o:s:FIL:N:R:S:T:")) != -1) { + printf("SIDELINK PSBCH SIM: handling optarg %c\n", c); + switch (c) { + case 'c': + cfo = atof(optarg); + printf("Setting CFO to %f Hz\n", cfo); + break; + + case 'g': + switch ((char)*optarg) { + case 'A': + channel_model = SCM_A; + break; + + case 'B': + channel_model = SCM_B; + break; + + case 'C': + channel_model = SCM_C; + break; + + case 'D': + channel_model = SCM_D; + break; + + case 'E': + channel_model = EPA; + break; + + case 'F': + channel_model = EVA; + break; + + case 'G': + channel_model = ETU; + break; + + default: + printf("Unsupported channel model! Exiting.\n"); + exit(-1); + } + break; + + case 'n': + n_trials = atoi(optarg); + break; + + case 'o': + ssb_offset = atoi(optarg); + printf("SIDELINK PSBCH SIM: ssb offset from pointA:%d\n", ssb_offset); + break; + + case 's': + slss_id = atoi(optarg); + printf("SIDELINK PSBCH SIM: slss_id from arg:%d\n", slss_id); + AssertFatal(slss_id >= 0 && slss_id <= 671, "SLSS ID not within Range 0-671\n"); + break; + + case 'F': + test_freqdomain_loopback = 1; + break; + + case 'I': + test_slss_search = 1; + printf("SIDELINK PSBCH SIM: SLSS search will be tested\n"); + break; + + case 'L': + loglvl = atoi(optarg); + break; + + case 'N': + snr0 = atoi(optarg); + snr1 = snr0; + printf("Setting SNR0 to %f. Test uses this SNR as target SNR\n", snr0); + break; + + case 'R': + N_RB_DL = atoi(optarg); + printf("SIDELINK PSBCH SIM: N_RB_DL:%d\n", N_RB_DL); + break; + + case 'S': + snr1 = atof(optarg); + printf("Setting SNR1 to %f. Test will run until this SNR as target SNR\n", snr1); + AssertFatal(snr1 <= snr0, "Test runs SNR down, set snr1 to a lower value than %f\n", snr0); + break; + + case 'T': + frame = atoi(optarg); + slot = atoi(argv[optind]); + printf("PSBCH SIM: frame timing- %d:%d\n", frame, slot); + break; + + case 'h': + default: + printf("\n\nSIDELINK PSBCH SIM OPTIONS LIST - hus:FL:T:\n"); + printf("-h: HELP\n"); + printf("-c Carrier frequency offset in Hz\n"); + printf("-n Number of trials\n"); + printf("-o ssb offset from PointA - indicates ssb_start subcarrier\n"); + printf("-s: set Sidelink sync id slss_id. ex -s 100\n"); + printf("-F: Run PSBCH frequency domain loopback test of the samples\n"); + printf("-I: Sidelink SLSS search will be tested.\n"); + printf("-L: Set Log Level.\n"); + printf("-N: Test with Noise. target SNR0 eg -N 10\n"); + printf("-R N_RB_DL\n"); + printf("-S Ending SNR, runs from SNR0 to SNR1\n"); + printf("-T: Frame,Slot to be sent in sl-MIB eg -T 4 2\n"); + return 1; + } + } + + randominit(seed); + + logInit(); + set_glog(loglvl); + + double fs = 0, eps; + double scs = 30000; + double bw = 100e6; + + switch (mu) { + case 1: + scs = 30000; + if (N_RB_DL == 217) { + fs = 122.88e6; + bw = 80e6; + } else if (N_RB_DL == 245) { + fs = 122.88e6; + bw = 90e6; + } else if (N_RB_DL == 273) { + fs = 122.88e6; + bw = 100e6; + } else if (N_RB_DL == 106) { + fs = 61.44e6; + bw = 40e6; + } else + AssertFatal(1 == 0, "Unsupported numerology for mu %d, N_RB %d\n", mu, N_RB_DL); + break; + case 3: + scs = 120000; + if (N_RB_DL == 66) { + fs = 122.88e6; + bw = 100e6; + } else + AssertFatal(1 == 0, "Unsupported numerology for mu %d, N_RB %d\n", mu, N_RB_DL); + break; + } + + // cfo with respect to sub-carrier spacing + eps = cfo / scs; + + // computation of integer and fractional FO to compare with estimation results + int IFO; + if (eps != 0.0) { + printf("Introducing a CFO of %lf relative to SCS of %d kHz\n", eps, (int)(scs / 1000)); + if (eps > 0) + IFO = (int)(eps + 0.5); + else + IFO = (int)(eps - 0.5); + printf("FFO = %lf; IFO = %d\n", eps - IFO, IFO); + } + + channel_desc_t *UE2UE; + int n_tx = 1, n_rx = 1; + UE2UE = new_channel_desc_scm(n_tx, n_rx, channel_model, fs, 0, bw, 300e-9, 0.0, CORR_LEVEL_LOW, 0, 0, 0, 0); + + if (UE2UE == NULL) { + printf("Problem generating channel model. Exiting.\n"); + exit(-1); + } + + /*****configure UE *************************/ + UE_TX = calloc(1, sizeof(PHY_VARS_NR_UE)); + UE_RX = calloc(1, sizeof(PHY_VARS_NR_UE)); + LOG_I(PHY, "Configure UE-TX and sidelink UE-TX.\n"); + configure_NR_UE(UE_TX, mu, N_RB_DL); + configure_SL_UE(UE_TX, mu, N_RB_DL, ssb_offset, 0xFFFF); + + LOG_I(PHY, "Configure UE-RX and sidelink UE-RX.\n"); + configure_NR_UE(UE_RX, mu, N_RB_DL); + UE_RX->is_synchronized = (test_slss_search) ? 0 : 1; + configure_SL_UE(UE_RX, mu, N_RB_DL, ssb_offset, slss_id); + /*****************************************/ + sl_nr_ue_phy_params_t *sl_uetx = &UE_TX->SL_UE_PHY_PARAMS; + sl_nr_ue_phy_params_t *sl_uerx = &UE_RX->SL_UE_PHY_PARAMS; + frame_parms = &sl_uetx->sl_frame_params; + frame_tx = frame % 1024; + slot_tx = slot % frame_parms->slots_per_frame; + + frame_length_complex_samples = frame_parms->samples_per_subframe * NR_NUMBER_OF_SUBFRAMES_PER_FRAME; + // frame_length_complex_samples_no_prefix = frame_parms->samples_per_subframe_wCP; + + double **s_re, **s_im, **r_re, **r_im; + s_re = malloc(2 * sizeof(double *)); + s_im = malloc(2 * sizeof(double *)); + r_re = malloc(2 * sizeof(double *)); + r_im = malloc(2 * sizeof(double *)); + + s_re[0] = malloc16_clear(frame_length_complex_samples * sizeof(double)); + s_im[0] = malloc16_clear(frame_length_complex_samples * sizeof(double)); + r_re[0] = malloc16_clear(frame_length_complex_samples * sizeof(double)); + r_im[0] = malloc16_clear(frame_length_complex_samples * sizeof(double)); + + if (eps != 0.0) + UE_RX->UE_fo_compensation = 1; // if a frequency offset is set then perform fo estimation and compensation + + UE_nr_rxtx_proc_t proc; + proc.frame_tx = frame; + proc.nr_slot_tx = slot; + nr_phy_data_tx_t phy_data_tx; + phy_data_tx.psbch_vars.tx_slss_id = slss_id; + + uint8_t sl_mib[4] = {0}; + prepare_mib_bits(sl_mib, frame, slot); + memcpy(phy_data_tx.psbch_vars.psbch_payload, sl_mib, 4); + + phy_data_tx.sl_tx_action = SL_NR_CONFIG_TYPE_TX_PSBCH; + proc.frame_rx = frame; + proc.nr_slot_rx = slot; + nr_phy_data_t phy_data_rx; + phy_data_rx.sl_rx_action = SL_NR_CONFIG_TYPE_RX_PSBCH; + + if (test_freqdomain_loopback) { + errors += freq_domain_loopback(UE_TX, UE_RX, frame_tx, slot_tx, &phy_data_tx); + } + + printf("\nSidelink TX UE - Frame.Slot %d.%d SLSS id:%d\n", frame, slot, phy_data_tx.psbch_vars.tx_slss_id); + printf("Sidelink RX UE - Frame.Slot %d.%d SLSS id:%d\n", + proc.frame_rx, + proc.nr_slot_rx, + sl_uerx->sl_config.sl_sync_source.rx_slss_id); + + phy_procedures_nrUE_SL_TX(UE_TX, &proc, &phy_data_tx); + + for (SNR = snr0; SNR >= snr1; SNR -= 1) { + for (int trial = 0; trial < n_trials; trial++) { + for (int i = 0; i < frame_length_complex_samples; i++) { + for (int aa = 0; aa < frame_parms->nb_antennas_tx; aa++) { + struct complex16 *txdata_ptr = (struct complex16 *)&UE_TX->common_vars.txData[aa][i]; + r_re[aa][i] = (double)txdata_ptr->r; + r_im[aa][i] = (double)txdata_ptr->i; + } + } + + LOG_M("txData0.m", "txd0", UE_TX->common_vars.txData[0], frame_parms->samples_per_frame, 1, 1); + + // AWGN + sigma2_dB = 20 * log10((double)AMP / 4) - SNR; + sigma2 = pow(10, sigma2_dB / 10); + // printf("sigma2 %f (%f dB), tx_lev %f (%f dB)\n",sigma2,sigma2_dB,txlev,10*log10((double)txlev)); + + if (eps != 0.0) { + rf_rx(r_re, // real part of txdata + r_im, // imag part of txdata + NULL, // interference real part + NULL, // interference imag part + 0, // interference power + frame_parms->nb_antennas_rx, // number of rx antennas + frame_length_complex_samples, // number of samples in frame + 1.0e9 / fs, // sampling time (ns) + cfo, // frequency offset in Hz + 0.0, // drift (not implemented) + 0.0, // noise figure (not implemented) + 0.0, // rx gain in dB ? + 200, // 3rd order non-linearity in dB ? + &ip, // initial phase + 30.0e3, // phase noise cutoff in kHz + -500.0, // phase noise amplitude in dBc + 0.0, // IQ imbalance (dB), + 0.0); // IQ phase imbalance (rad) + } + + for (int i = 0; i < frame_length_complex_samples; i++) { + for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) { + UE_RX->common_vars.rxdata[aa][i].r = (short)(r_re[aa][i] + sqrt(sigma2 / 2) * gaussdouble(0.0, 1.0)); + UE_RX->common_vars.rxdata[aa][i].i = (short)(r_im[aa][i] + sqrt(sigma2 / 2) * gaussdouble(0.0, 1.0)); + } + } + + if (UE_RX->is_synchronized == 0) { + nr_initial_sync_t ret = {false, 0}; + UE_nr_rxtx_proc_t proc = {0}; + // Should not have SLSS id configured. Search should find SLSS id from TX UE + UE_RX->SL_UE_PHY_PARAMS.sl_config.sl_sync_source.rx_slss_id = 0xFFFF; + ret = sl_nr_slss_search(UE_RX, &proc, 1); + printf("Sidelink SLSS search returns status:%d, rx_offset:%d\n", ret.cell_detected, ret.rx_offset); + if (!ret.cell_detected) + sl_uerx->psbch.rx_errors = 1; + else { + AssertFatal(UE_RX->SL_UE_PHY_PARAMS.sync_params.N_sl_id == slss_id, + "DETECTED INCORRECT SLSS ID in SEARCH.CHECK id:%d\n", + UE_RX->SL_UE_PHY_PARAMS.sync_params.N_sl_id); + sl_uerx->psbch.rx_ok = 1; + } + } else + psbch_pscch_processing(UE_RX, &proc, &phy_data_rx); + + } // noise trials + + printf("Runs:%d SNR %f: SLSS Search:%d crc ERRORs = %d, OK = %d\n", + n_trials, + SNR, + !UE_RX->is_synchronized, + sl_uerx->psbch.rx_errors, + sl_uerx->psbch.rx_ok); + errors += sl_uerx->psbch.rx_errors; + sl_uerx->psbch.rx_errors = 0; + sl_uerx->psbch.rx_ok = 0; + + } // NSR + + if (errors == 0) + LOG_I(PHY, "PSBCH test OK\n"); + else + LOG_E(PHY, "PSBCH test NOT OK\n"); + + free_channel_desc_scm(UE2UE); + + free(s_re[0]); + free(s_im[0]); + free(r_re[0]); + free(r_im[0]); + free(s_re); + free(s_im); + free(r_re); + free(r_im); + + term_nr_ue_signal(UE_TX, 1); + term_nr_ue_signal(UE_RX, 1); + + free(UE_TX); + free(UE_RX); + logTerm(); + loader_reset(); + + return errors; +} diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 374234e55d..091b1ad4ab 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -902,6 +902,10 @@ int main(int argc, char *argv[]) csv_file = fopen(filename_csv, "a"); if (csv_file == NULL) { printf("Can't open file \"%s\", errno %d\n", filename_csv, errno); + free(s_re); + free(s_im); + free(r_re); + free(r_im); return 1; } // adding name of parameters into file @@ -924,6 +928,7 @@ int main(int argc, char *argv[]) reset_meas(&gNB->rx_pusch_stats); reset_meas(&gNB->rx_pusch_init_stats); reset_meas(&gNB->rx_pusch_symbol_processing_stats); + reset_meas(&gNB->ulsch_decoding_stats); reset_meas(&gNB->ulsch_channel_estimation_stats); reset_meas(&UE->ulsch_ldpc_encoding_stats); reset_meas(&UE->ulsch_rate_matching_stats); @@ -1548,6 +1553,7 @@ int main(int argc, char *argv[]) printStatIndent2(&gNB->ulsch_channel_estimation_stats, "ULSCH channel estimation time"); printStatIndent2(&gNB->rx_pusch_init_stats, "RX PUSCH Initialization time"); printStatIndent2(&gNB->rx_pusch_symbol_processing_stats, "RX PUSCH Symbol Processing time"); + printStatIndent(&gNB->ulsch_decoding_stats,"ULSCH total decoding time"); printf("\nUE TX\n"); printStatIndent(&UE->ulsch_encoding_stats,"ULSCH total encoding time"); diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c index 04445af3dc..cc754942a1 100644 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c +++ b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c @@ -115,7 +115,7 @@ void display_data(int pss_sequence_number, int16_t *rxdata, int position) { int16_t *pss_sequence[pss_sequence] = {primary_synch0_time, primary_synch1_time, primary_synch2_time}; int16_t *pss_sequence_sl[pss_sequence] = {primary_synch0_time, primary_synch1_time}; int16_t *pss_sequence_time = pss_sequence[pss_sequence_number];; - if (get_softmodem_params()->sl_mode != 0) { + if (get_softmodem_params()->sl_mode != 0) pss_sequence_time = pss_sequence_sl[pss_sequence_number]; printf(" pss %6d data \n", pss_sequence_number); for (int i = 0; i < 4; i++) { diff --git a/openair1/SIMULATION/RF/dac.c b/openair1/SIMULATION/RF/dac.c index d5cb985c4f..dc4c09827b 100644 --- a/openair1/SIMULATION/RF/dac.c +++ b/openair1/SIMULATION/RF/dac.c @@ -107,6 +107,7 @@ double dac_fixed_gain(double *s_re[2], *amp1p=sqrt(*amp1p); } + AssertFatal(amp1p != NULL && *amp1p != 0.0, "Precondition to avoid UB\n"); #ifdef DEBUG_DAC LOG_I(OCM,"DAC: amp %f, amp1 %f dB (%d,%d), tx_power target %f (actual %f %f),length %d,pos %d\n", @@ -122,7 +123,6 @@ double dac_fixed_gain(double *s_re[2], #endif - AssertFatal(amp1p != NULL && *amp1p != 0.0, "Precondition to avoid UB\n"); for (i=0; icommon_vars.txdata; - AssertFatal(txdata != NULL,"txdata is null\n"); + AssertFatal(txdata,"txdata is null\n"); sf_offset = subframe*frame_parms->samples_per_tti; if (subframe>0) sf_offset_tdd = sf_offset - PHY_vars_UE_g[UE_id][CC_id]->N_TA_offset; diff --git a/openair1/SIMULATION/TOOLS/gauss.c b/openair1/SIMULATION/TOOLS/gauss.c index cc4b1fb793..fe4c684e66 100644 --- a/openair1/SIMULATION/TOOLS/gauss.c +++ b/openair1/SIMULATION/TOOLS/gauss.c @@ -25,28 +25,24 @@ #include "defs.h" -unsigned int *generate_gauss_LUT(unsigned char Nbits, - unsigned char L - ) { - unsigned int *LUT_ptr,i; - LUT_ptr = (unsigned int *)malloc((1<<(Nbits-1))*sizeof(int)); +unsigned int *generate_gauss_LUT(unsigned char Nbits, unsigned char L) +{ + unsigned int *LUT_ptr = calloc((1U << (Nbits - 1)), sizeof(int)); assert(LUT_ptr); - for (i=0; i<(1<<(Nbits-1)); i++) { - LUT_ptr[i] = (unsigned int)((double)((unsigned int)(1<<31))*erf(i*L/(double)(1<<(Nbits-1)))); + for (int i = 0; i < (1 << (Nbits - 1)); i++) { + LUT_ptr[i] = (unsigned int)((double)((unsigned int)(1U << 31)) * erf(i * L / (double)(1 << (Nbits - 1)))); #ifdef LUTDEBUG - printf("pos %u : LUT_ptr[%u]=%x (%f)\n",i,i,LUT_ptr[i],(double)(erf(i*L/(double)(1<<(Nbits-1))))); + printf("pos %d : LUT_ptr[%d]=%x (%f)\n", i, i, LUT_ptr[i], (double)(erf(i * L / (double)(1 << (Nbits -1 ))))); #endif //LUTDEBUG } - return(LUT_ptr); } -int gauss(unsigned int *gauss_LUT, - unsigned char Nbits - ) { +int gauss(unsigned int *gauss_LUT, unsigned char Nbits) +{ unsigned int search_pos,step_size,u,tmp,tmpm1,tmpp1,s; // Get a 32-bit uniform random-variable u = taus(); @@ -127,8 +123,10 @@ void main(int argc,char **argv) { // printf("%d\n",gauss(gauss_LUT_ptr,Nbits)); } - printf("Tail probability = %e(%x)\n",2*erfc((double)L*gauss_LUT_ptr[(1<<(Nbits-1))-1]/(unsigned int)(1<<31)),gauss_LUT_ptr[(1<<(Nbits-1))-1]); - printf("max %d, min %d, mean %f, stddev %f, Pr(maxnum)=%e(%d)\n",maxg,ming,meang,sqrt(varg),(double)maxnum/Ntrials,maxnum); + printf("Tail probability = %e(%x)\n", + 2 * erfc((double)L * gauss_LUT_ptr[(1U << (Nbits - 1)) - 1] / (unsigned int)(1U << 31)), + gauss_LUT_ptr[(1U << (Nbits - 1)) - 1]); + printf("max %d, min %d, mean %f, stddev %f, Pr(maxnum)=%e(%d)\n", maxg, ming, meang, sqrt(varg), (double)maxnum / Ntrials, maxnum); // for (i=0;i<(1<numlines++; } + return tdata->numlines; } - return tdata->numlines; } /* show */ else if (strstr(buf, "set") == buf) { char cmdbuf[TELNET_MAX_MSGLENGTH]; int sst = sscanf(tdata->tblname, "%*[^=]=%i", &chanidx); @@ -2229,11 +2229,12 @@ int get_modchannel_index(char *buf, int debug, void *vdata, telnet_printfunc_t p if (debug) LOG_I(UTIL, "%s received %s\n", __FUNCTION__, buf); webdatadef_t *tdata = (webdatadef_t *)vdata; - tdata->numlines = 0; if (strncmp(buf, "set", 3) == 0) { return get_channel_params(buf, debug, vdata, prnt); } + int numlines = 0; if (tdata != NULL) { + tdata->numlines = 0; for (int i = 0; i < max_chan; i++) { if (defined_channels[i] != NULL) { tdata->numlines++; @@ -2245,8 +2246,9 @@ int get_modchannel_index(char *buf, int debug, void *vdata, telnet_printfunc_t p else { snprintf(tdata->tblname, sizeof(tdata->tblname) - 1, "No running model in the system"); } + numlines = tdata->numlines; } - return tdata->numlines; + return numlines; } /* get_currentchannel_type */ /*------------------------------------------------------------------------------------------------------------------*/ diff --git a/openair2/COMMON/f1ap_messages_types.h b/openair2/COMMON/f1ap_messages_types.h index c5ffe0f738..f99f4ce250 100644 --- a/openair2/COMMON/f1ap_messages_types.h +++ b/openair2/COMMON/f1ap_messages_types.h @@ -78,7 +78,8 @@ typedef net_ip_address_t f1ap_net_ip_address_t; typedef struct f1ap_net_config_t { f1ap_net_ip_address_t CU_f1_ip_address; - f1ap_net_ip_address_t DU_f1_ip_address; + f1ap_net_ip_address_t DU_f1c_ip_address; + char *DU_f1u_ip_address; uint16_t CUport; uint16_t DUport; } f1ap_net_config_t; diff --git a/openair2/COMMON/sctp_messages_types.h b/openair2/COMMON/sctp_messages_types.h index 88790bdc1f..313cdfa899 100644 --- a/openair2/COMMON/sctp_messages_types.h +++ b/openair2/COMMON/sctp_messages_types.h @@ -128,14 +128,7 @@ typedef struct sctp_data_ind_s { } sctp_data_ind_t; typedef struct sctp_init_s { - /* Request usage of ipv4 */ - unsigned ipv4:1; - /* Request usage of ipv6 */ - unsigned ipv6:1; - uint8_t nb_ipv4_addr; - uint32_t ipv4_address[10]; - uint8_t nb_ipv6_addr; - char *ipv6_address[10]; + char *bind_address; uint16_t port; uint32_t ppid; } sctp_init_t; diff --git a/openair2/E1AP/e1ap.c b/openair2/E1AP/e1ap.c index 1c9ff19bff..07baf5757c 100644 --- a/openair2/E1AP/e1ap.c +++ b/openair2/E1AP/e1ap.c @@ -1873,21 +1873,15 @@ void cuup_init_n3(instance_t instance) void cucp_task_send_sctp_init_req(instance_t instance, char *my_addr) { - LOG_I(E1AP, "E1AP_CUCP_SCTP_REQ(create socket)\n"); - MessageDef *message_p = NULL; - message_p = itti_alloc_new_message (TASK_CUCP_E1, 0, SCTP_INIT_MSG); - message_p->ittiMsg.sctp_init.port = E1AP_PORT_NUMBER; - message_p->ittiMsg.sctp_init.ppid = E1AP_SCTP_PPID; - message_p->ittiMsg.sctp_init.ipv4 = 1; - message_p->ittiMsg.sctp_init.ipv6 = 0; - message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1; - message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(my_addr); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - message_p->ittiMsg.sctp_init.nb_ipv6_addr = 0; - message_p->ittiMsg.sctp_init.ipv6_address[0] = "0:0:0:0:0:0:0:1"; + size_t addr_len = strlen(my_addr) + 1; + LOG_I(E1AP, "E1AP_CUCP_SCTP_REQ(create socket) for %s len %ld\n", my_addr, addr_len); + MessageDef *message_p = itti_alloc_new_message_sized(TASK_CUCP_E1, 0, SCTP_INIT_MSG, sizeof(sctp_init_t) + addr_len); + sctp_init_t *init = &SCTP_INIT_MSG(message_p); + init->port = E1AP_PORT_NUMBER; + init->ppid = E1AP_SCTP_PPID; + char *addr_buf = (char *) (init + 1); // address after sctp_init ITTI message end, allocated above + init->bind_address = addr_buf; + memcpy(addr_buf, my_addr, addr_len); itti_send_msg_to_task(TASK_SCTP, instance, message_p); } @@ -2030,21 +2024,21 @@ void *E1AP_CUUP_task(void *arg) case E1AP_BEARER_CONTEXT_SETUP_RESP: { const e1ap_bearer_setup_resp_t *resp = &E1AP_BEARER_CONTEXT_SETUP_RESP(msg); const e1ap_upcp_inst_t *inst = getCxtE1(myInstance); - AssertFatal(inst != NULL, "no E1 instance found for instance %ld\n", myInstance); + AssertFatal(inst, "no E1 instance found for instance %ld\n", myInstance); e1apCUUP_send_BEARER_CONTEXT_SETUP_RESPONSE(inst->cuup.assoc_id, resp); } break; case E1AP_BEARER_CONTEXT_MODIFICATION_RESP: { const e1ap_bearer_modif_resp_t *resp = &E1AP_BEARER_CONTEXT_MODIFICATION_RESP(msg); const e1ap_upcp_inst_t *inst = getCxtE1(myInstance); - AssertFatal(inst != NULL, "no E1 instance found for instance %ld\n", myInstance); + AssertFatal(inst, "no E1 instance found for instance %ld\n", myInstance); e1apCUUP_send_BEARER_CONTEXT_MODIFICATION_RESPONSE(inst->cuup.assoc_id, resp); } break; case E1AP_BEARER_CONTEXT_RELEASE_CPLT: { const e1ap_bearer_release_cplt_t *cplt = &E1AP_BEARER_CONTEXT_RELEASE_CPLT(msg); const e1ap_upcp_inst_t *inst = getCxtE1(myInstance); - AssertFatal(inst != NULL, "no E1 instance found for instance %ld\n", myInstance); + AssertFatal(inst, "no E1 instance found for instance %ld\n", myInstance); e1apCUUP_send_BEARER_CONTEXT_RELEASE_COMPLETE(inst->cuup.assoc_id, cplt); } break; diff --git a/openair2/E1AP/e1ap_setup.c b/openair2/E1AP/e1ap_setup.c index 31dbf6e407..4ec94bc9b5 100644 --- a/openair2/E1AP/e1ap_setup.c +++ b/openair2/E1AP/e1ap_setup.c @@ -50,7 +50,7 @@ static void get_NGU_S1U_addr(char **addr, uint16_t *port) sprintf(gtpupath, "%s.[%i].%s", GNB_CONFIG_STRING_GNB_LIST, 0, GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); config_get(config_get_if(), NETParams, sizeofArray(NETParams), gtpupath); char *address; - if (NETParams[1].strptr != NULL) { + if (NETParams[GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX].strptr != NULL) { LOG_I(GTPU, "SA mode \n"); AssertFatal(gnb_ipv4_address_for_NGU != NULL, "NG-U IPv4 address is NULL: could not read IPv4 address\n"); address = strdup(gnb_ipv4_address_for_NGU); diff --git a/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c b/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c index dcc6ff13c3..77dc12ba24 100644 --- a/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c +++ b/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c @@ -179,10 +179,10 @@ static void capture_sst_sd(test_cond_value_t* test_cond_value, uint8_t *sst, uin static bool nssai_matches(nssai_t a_nssai, uint8_t b_sst, const uint32_t *b_sd) { - AssertFatal(b_sd == NULL || *b_sd <= 0xffffff, "illegal SD %d\n", *b_sd); if (b_sd == NULL) { return a_nssai.sst == b_sst && a_nssai.sd == 0xffffff; } else { + AssertFatal(*b_sd <= 0xffffff, "illegal SD %d\n", *b_sd); return a_nssai.sst == b_sst && a_nssai.sd == *b_sd; } } diff --git a/openair2/ENB_APP/L1_paramdef.h b/openair2/ENB_APP/L1_paramdef.h index f6d83c33ee..27196bb8ae 100644 --- a/openair2/ENB_APP/L1_paramdef.h +++ b/openair2/ENB_APP/L1_paramdef.h @@ -38,7 +38,6 @@ /* L1 configuration parameters names */ #define CONFIG_STRING_L1_CC "num_cc" -#define CONFIG_STRING_L1_LOCAL_N_IF_NAME "local_n_if_name" #define CONFIG_STRING_L1_LOCAL_N_ADDRESS "local_n_address" #define CONFIG_STRING_L1_REMOTE_N_ADDRESS "remote_n_address" #define CONFIG_STRING_L1_LOCAL_N_PORTC "local_n_portc" @@ -70,7 +69,6 @@ #define L1PARAMS_DESC { \ {CONFIG_STRING_L1_CC, NULL, 0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ - {CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50030, TYPE_UINT, 0}, \ @@ -98,29 +96,28 @@ #define L1_CC_IDX 0 #define L1_TRANSPORT_N_PREFERENCE_IDX 1 -#define L1_LOCAL_N_IF_NAME_IDX 2 -#define L1_LOCAL_N_ADDRESS_IDX 3 -#define L1_REMOTE_N_ADDRESS_IDX 4 -#define L1_LOCAL_N_PORTC_IDX 5 -#define L1_REMOTE_N_PORTC_IDX 6 -#define L1_LOCAL_N_PORTD_IDX 7 -#define L1_REMOTE_N_PORTD_IDX 8 -#define L1_PRACH_DTX_THRESHOLD_IDX 9 -#define L1_PUCCH1_DTX_THRESHOLD_IDX 10 -#define L1_PUCCH1AB_DTX_THRESHOLD_IDX 11 -#define L1_PRACH_DTX_EMTC0_THRESHOLD_IDX 12 -#define L1_PUCCH1_DTX_EMTC0_THRESHOLD_IDX 13 -#define L1_PUCCH1AB_DTX_EMTC0_THRESHOLD_IDX 14 -#define L1_PRACH_DTX_EMTC1_THRESHOLD_IDX 15 -#define L1_PUCCH1_DTX_EMTC1_THRESHOLD_IDX 16 -#define L1_PUCCH1AB_DTX_EMTC1_THRESHOLD_IDX 17 -#define L1_PRACH_DTX_EMTC2_THRESHOLD_IDX 18 -#define L1_PUCCH1_DTX_EMTC2_THRESHOLD_IDX 19 -#define L1_PUCCH1AB_DTX_EMTC2_THRESHOLD_IDX 20 -#define L1_PRACH_DTX_EMTC3_THRESHOLD_IDX 21 -#define L1_PUCCH1_DTX_EMTC3_THRESHOLD_IDX 22 -#define L1_PUCCH1AB_DTX_EMTC3_THRESHOLD_IDX 23 -#define L1_PUSCH_SIGNAL_THRESHOLD_IDX 24 +#define L1_LOCAL_N_ADDRESS_IDX 2 +#define L1_REMOTE_N_ADDRESS_IDX 3 +#define L1_LOCAL_N_PORTC_IDX 4 +#define L1_REMOTE_N_PORTC_IDX 5 +#define L1_LOCAL_N_PORTD_IDX 6 +#define L1_REMOTE_N_PORTD_IDX 7 +#define L1_PRACH_DTX_THRESHOLD_IDX 8 +#define L1_PUCCH1_DTX_THRESHOLD_IDX 9 +#define L1_PUCCH1AB_DTX_THRESHOLD_IDX 10 +#define L1_PRACH_DTX_EMTC0_THRESHOLD_IDX 11 +#define L1_PUCCH1_DTX_EMTC0_THRESHOLD_IDX 12 +#define L1_PUCCH1AB_DTX_EMTC0_THRESHOLD_IDX 13 +#define L1_PRACH_DTX_EMTC1_THRESHOLD_IDX 14 +#define L1_PUCCH1_DTX_EMTC1_THRESHOLD_IDX 15 +#define L1_PUCCH1AB_DTX_EMTC1_THRESHOLD_IDX 16 +#define L1_PRACH_DTX_EMTC2_THRESHOLD_IDX 17 +#define L1_PUCCH1_DTX_EMTC2_THRESHOLD_IDX 18 +#define L1_PUCCH1AB_DTX_EMTC2_THRESHOLD_IDX 19 +#define L1_PRACH_DTX_EMTC3_THRESHOLD_IDX 20 +#define L1_PUCCH1_DTX_EMTC3_THRESHOLD_IDX 21 +#define L1_PUCCH1AB_DTX_EMTC3_THRESHOLD_IDX 22 +#define L1_PUSCH_SIGNAL_THRESHOLD_IDX 23 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ #endif diff --git a/openair2/ENB_APP/MACRLC_paramdef.h b/openair2/ENB_APP/MACRLC_paramdef.h index 3bd215c8df..4bfc5139c2 100644 --- a/openair2/ENB_APP/MACRLC_paramdef.h +++ b/openair2/ENB_APP/MACRLC_paramdef.h @@ -39,7 +39,6 @@ /* MACRLC configuration parameters names */ #define CONFIG_STRING_MACRLC_CC "num_cc" #define CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE "tr_n_preference" -#define CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME "local_n_if_name" #define CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS "local_n_address" #define CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS "remote_n_address" #define CONFIG_STRING_MACRLC_LOCAL_N_PORTC "local_n_portc" @@ -47,7 +46,6 @@ #define CONFIG_STRING_MACRLC_LOCAL_N_PORTD "local_n_portd" #define CONFIG_STRING_MACRLC_REMOTE_N_PORTD "remote_n_portd" #define CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE "tr_s_preference" -#define CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME "local_s_if_name" #define CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS "local_s_address" #define CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS "remote_s_address" #define CONFIG_STRING_MACRLC_LOCAL_S_PORTC "local_s_portc" @@ -71,7 +69,6 @@ #define MACRLCPARAMS_DESC { \ {CONFIG_STRING_MACRLC_CC, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_L1", TYPE_STRING, 0}, \ - {CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50010, TYPE_UINT, 0}, \ @@ -79,7 +76,6 @@ {CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_RRC", TYPE_STRING, 0}, \ - {CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defintval=50020, TYPE_UINT, 0}, \ @@ -100,30 +96,28 @@ #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 -#define MACRLC_LOCAL_N_IF_NAME_IDX 2 -#define MACRLC_LOCAL_N_ADDRESS_IDX 3 -#define MACRLC_REMOTE_N_ADDRESS_IDX 4 -#define MACRLC_LOCAL_N_PORTC_IDX 5 -#define MACRLC_REMOTE_N_PORTC_IDX 6 -#define MACRLC_LOCAL_N_PORTD_IDX 7 -#define MACRLC_REMOTE_N_PORTD_IDX 8 -#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 9 -#define MACRLC_LOCAL_S_IF_NAME_IDX 10 -#define MACRLC_LOCAL_S_ADDRESS_IDX 11 -#define MACRLC_REMOTE_S_ADDRESS_IDX 12 -#define MACRLC_LOCAL_S_PORTC_IDX 13 -#define MACRLC_REMOTE_S_PORTC_IDX 14 -#define MACRLC_LOCAL_S_PORTD_IDX 15 -#define MACRLC_REMOTE_S_PORTD_IDX 16 -#define MACRLC_SCHED_MODE_IDX 17 -#define MACRLC_PUSCH10xSNR_IDX 18 -#define MACRLC_PUCCH10xSNR_IDX 19 -#define MACRLC_DEFAULT_SCHED_DL_ALGO_IDX 20 -#define MACRLC_UE_MULTIPLE_MAX_IDX 21 -#define MACRLC_USE_MCS_OFFSET_IDX 22 -#define MACRLC_BLER_TARGET_LOWER_IDX 23 -#define MACRLC_BLER_TARGET_UPPER_IDX 24 -#define MACRLC_MAX_UL_RB_INDEX_IDX 25 +#define MACRLC_LOCAL_N_ADDRESS_IDX 2 +#define MACRLC_REMOTE_N_ADDRESS_IDX 3 +#define MACRLC_LOCAL_N_PORTC_IDX 4 +#define MACRLC_REMOTE_N_PORTC_IDX 5 +#define MACRLC_LOCAL_N_PORTD_IDX 6 +#define MACRLC_REMOTE_N_PORTD_IDX 7 +#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 8 +#define MACRLC_LOCAL_S_ADDRESS_IDX 9 +#define MACRLC_REMOTE_S_ADDRESS_IDX 10 +#define MACRLC_LOCAL_S_PORTC_IDX 11 +#define MACRLC_REMOTE_S_PORTC_IDX 12 +#define MACRLC_LOCAL_S_PORTD_IDX 13 +#define MACRLC_REMOTE_S_PORTD_IDX 14 +#define MACRLC_SCHED_MODE_IDX 15 +#define MACRLC_PUSCH10xSNR_IDX 16 +#define MACRLC_PUCCH10xSNR_IDX 17 +#define MACRLC_DEFAULT_SCHED_DL_ALGO_IDX 18 +#define MACRLC_UE_MULTIPLE_MAX_IDX 19 +#define MACRLC_USE_MCS_OFFSET_IDX 20 +#define MACRLC_BLER_TARGET_LOWER_IDX 21 +#define MACRLC_BLER_TARGET_UPPER_IDX 22 +#define MACRLC_MAX_UL_RB_INDEX_IDX 23 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ #endif diff --git a/openair2/ENB_APP/NB_IoT_config.c b/openair2/ENB_APP/NB_IoT_config.c index 35e3ade4a4..e6fe6e5d71 100644 --- a/openair2/ENB_APP/NB_IoT_config.c +++ b/openair2/ENB_APP/NB_IoT_config.c @@ -155,11 +155,11 @@ int RCconfig_NbIoTRRC(MessageDef *msg_p, int nbiotrrc_id,eNB_RRC_INST_NB_IoT *nb NBIoTParams[i].chkPptr = &(NBIoTCheckParams[i]); } - for (int i=0; (ieth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); RC.eNB[j][0]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); RC.eNB[j][0]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); RC.eNB[j][0]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); @@ -206,7 +205,6 @@ void RCconfig_macrlc(void) if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_L1") == 0) { } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "nfapi") == 0) { - RC.mac[j]->eth_params_s.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr)); RC.mac[j]->eth_params_s.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr)); RC.mac[j]->eth_params_s.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr)); RC.mac[j]->eth_params_s.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr); @@ -1822,7 +1820,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { int RCconfig_gtpu(void ) { int num_enbs = 0; - char *enb_interface_name_for_S1U = NULL; char *enb_ipv4_address_for_S1U = NULL; uint16_t enb_port_for_S1U = 0; char *address = NULL; @@ -2049,18 +2046,8 @@ int RCconfig_M2(MessageDef *msg_p, uint32_t i) { for (l = 0; l < M2ParamList.numelt; l++) { M2AP_REGISTER_ENB_REQ (msg_p).nb_m2 += 1; strcpy(M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4_address,*(M2ParamList.paramarray[l][ENB_M2_IPV4_ADDRESS_IDX].strptr)); - strcpy(M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6_address,*(M2ParamList.paramarray[l][ENB_M2_IPV6_ADDRESS_IDX].strptr)); - - if (strcmp(*(M2ParamList.paramarray[l][ENB_M2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4 = 1; - M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6 = 0; - } else if (strcmp(*(M2ParamList.paramarray[l][ENB_M2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4 = 0; - M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6 = 1; - } else if (strcmp(*(M2ParamList.paramarray[l][ENB_M2_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4 = 1; - M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6 = 1; - } + M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4 = 1; + M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6 = 0; } // timers //{ @@ -2345,18 +2332,8 @@ int RCconfig_S1( for (int l = 0; l < S1ParamList.numelt; l++) { S1AP_REGISTER_ENB_REQ (msg_p).nb_mme += 1; strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4_address,*(S1ParamList.paramarray[l][ENB_MME_IPV4_ADDRESS_IDX].strptr)); - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6_address,*(S1ParamList.paramarray[l][ENB_MME_IPV6_ADDRESS_IDX].strptr)); - - if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 0; - } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 0; - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; - } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; - } + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 0; if (S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].iptr) { S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].numelt; @@ -2571,19 +2548,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { for (l = 0; l < X2ParamList.numelt; l++) { X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 += 1; strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4_address,*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); - strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6_address,*(X2ParamList.paramarray[l][ENB_X2_IPV6_ADDRESS_IDX].strptr)); - - LOG_I(X2AP,"registering with ip : %s\n",*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); - if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 0; - } else if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 0; - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 1; - } else if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 1; - } + LOG_I(X2AP, "registering with ip : %s\n", *(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 0; } // timers diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index ed3be8c024..ff594608ac 100644 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -262,7 +262,6 @@ typedef enum { #define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD "mobile_country_code" #define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD "mobile_network_code" #define ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE "tr_s_preference" -#define ENB_CONFIG_STRING_LOCAL_S_IF_NAME "local_s_if_name" #define ENB_CONFIG_STRING_LOCAL_S_ADDRESS "local_s_address" #define ENB_CONFIG_STRING_REMOTE_S_ADDRESS "remote_s_address" #define ENB_CONFIG_STRING_LOCAL_S_PORTC "local_s_portc" @@ -293,7 +292,6 @@ typedef enum { {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ @@ -321,24 +319,23 @@ typedef enum { #define ENB_MOBILE_COUNTRY_CODE_IDX_OLD 4 #define ENB_MOBILE_NETWORK_CODE_IDX_OLD 5 #define ENB_TRANSPORT_S_PREFERENCE_IDX 6 -#define ENB_LOCAL_S_IF_NAME_IDX 7 -#define ENB_LOCAL_S_ADDRESS_IDX 8 -#define ENB_REMOTE_S_ADDRESS_IDX 9 -#define ENB_LOCAL_S_PORTC_IDX 10 -#define ENB_REMOTE_S_PORTC_IDX 11 -#define ENB_LOCAL_S_PORTD_IDX 12 -#define ENB_REMOTE_S_PORTD_IDX 13 -#define ENB_NRCELLID_IDX 14 -#define ENB_RRC_INACTIVITY_THRES_IDX 15 -#define ENB_ENABLE_MEASUREMENT_REPORTS 16 -#define ENB_ENABLE_X2 17 -#define ENB_ENABLE_ENB_M2 18 -#define ENB_ENABLE_MCE_M2 19 -#define ENB_S1SETUP_RSP_TIMER_IDX 20 -#define ENB_S1SETUP_REQ_TIMER_IDX 21 -#define ENB_S1SETUP_REQ_COUNT_IDX 22 -#define ENB_SCTP_REQ_TIMER_IDX 23 -#define ENB_SCTP_REQ_COUNT_IDX 24 +#define ENB_LOCAL_S_ADDRESS_IDX 7 +#define ENB_REMOTE_S_ADDRESS_IDX 8 +#define ENB_LOCAL_S_PORTC_IDX 9 +#define ENB_REMOTE_S_PORTC_IDX 10 +#define ENB_LOCAL_S_PORTD_IDX 11 +#define ENB_REMOTE_S_PORTD_IDX 12 +#define ENB_NRCELLID_IDX 13 +#define ENB_RRC_INACTIVITY_THRES_IDX 14 +#define ENB_ENABLE_MEASUREMENT_REPORTS 15 +#define ENB_ENABLE_X2 16 +#define ENB_ENABLE_ENB_M2 17 +#define ENB_ENABLE_MCE_M2 18 +#define ENB_S1SETUP_RSP_TIMER_IDX 19 +#define ENB_S1SETUP_REQ_TIMER_IDX 20 +#define ENB_S1SETUP_REQ_COUNT_IDX 21 +#define ENB_SCTP_REQ_TIMER_IDX 22 +#define ENB_SCTP_REQ_COUNT_IDX 23 #define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD} // clang-format off @@ -999,10 +996,7 @@ typedef struct srb1_params_s { #define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4" -#define ENB_CONFIG_STRING_MME_IPV6_ADDRESS "ipv6" #define ENB_CONFIG_STRING_MME_PORT "port" -#define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE "active" -#define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE "preference" #define ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX "broadcast_plmn_index" @@ -1013,9 +1007,6 @@ typedef struct srb1_params_s { // clang-format off #define S1PARAMS_DESC { \ {ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, .uptr=NULL, .defintarrayval=NULL, TYPE_UINTARRAY, 6}, \ {ENB_CONFIG_STRING_MME_PORT, NULL, 0, .u16ptr=NULL, .defuintval=S1AP_PORT_NUMBER, TYPE_UINT16, 0}, \ } @@ -1025,11 +1016,8 @@ typedef struct srb1_params_s { #define ENB_MME_IPV4_ADDRESS_IDX 0 -#define ENB_MME_IPV6_ADDRESS_IDX 1 -#define ENB_MME_IP_ADDRESS_ACTIVE_IDX 2 -#define ENB_MME_IP_ADDRESS_PREFERENCE_IDX 3 -#define ENB_MME_BROADCAST_PLMN_INDEX 4 -#define ENB_MME_PORT_IDX 5 +#define ENB_MME_BROADCAST_PLMN_INDEX 1 +#define ENB_MME_PORT_IDX 2 /*---------------------------------------------------------------------------------------------------------------------------------------*/ /* X2 configuration parameters section name */ @@ -1039,9 +1027,6 @@ typedef struct srb1_params_s { #define ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS "ipv4" -#define ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS "ipv6" -#define ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE "preference" - /*-------------------------------------------------------------------------------------------------------------------------------------*/ /* X2 configuration parameters */ @@ -1050,14 +1035,10 @@ typedef struct srb1_params_s { // clang-format off #define X2PARAMS_DESC { \ {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } // clang-format on #define ENB_X2_IPV4_ADDRESS_IDX 0 -#define ENB_X2_IPV6_ADDRESS_IDX 1 -#define ENB_X2_IP_ADDRESS_PREFERENCE_IDX 2 /*---------------------------------------------------------------------------------------------------------------------------------------*/ @@ -1069,8 +1050,6 @@ typedef struct srb1_params_s { #define ENB_CONFIG_STRING_TARGET_MCE_M2_IPV4_ADDRESS "ipv4" -#define ENB_CONFIG_STRING_TARGET_MCE_M2_IPV6_ADDRESS "ipv6" -#define ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS_PREFERENCE "preference" /*---------------------------------------------------------------------------------------------------------------------------------------*/ @@ -1083,14 +1062,10 @@ typedef struct srb1_params_s { // clang-format off #define M2PARAMS_DESC { \ {ENB_CONFIG_STRING_TARGET_MCE_M2_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TARGET_MCE_M2_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } // clang-format on #define ENB_M2_IPV4_ADDRESS_IDX 0 -#define ENB_M2_IPV6_ADDRESS_IDX 1 -#define ENB_M2_IP_ADDRESS_PREFERENCE_IDX 2 /*---------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------*/ @@ -1121,22 +1096,18 @@ typedef struct srb1_params_s { /* S1 interface configuration parameters section name */ #define ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES" -#define ENB_INTERFACE_NAME_FOR_S1_MME_IDX 0 -#define ENB_IPV4_ADDRESS_FOR_S1_MME_IDX 1 -#define ENB_INTERFACE_NAME_FOR_S1U_IDX 2 -#define ENB_IPV4_ADDR_FOR_S1U_IDX 3 -#define ENB_PORT_FOR_S1U_IDX 4 -#define ENB_IPV4_ADDR_FOR_X2C_IDX 5 -#define ENB_PORT_FOR_X2C_IDX 6 -#define ENB_IPV4_ADDR_FOR_M2C_IDX 7 -#define ENB_PORT_FOR_M2C_IDX 8 -#define MCE_IPV4_ADDR_FOR_M2C_IDX 9 -#define MCE_PORT_FOR_M2C_IDX 10 +#define ENB_IPV4_ADDRESS_FOR_S1_MME_IDX 0 +#define ENB_IPV4_ADDR_FOR_S1U_IDX 1 +#define ENB_PORT_FOR_S1U_IDX 2 +#define ENB_IPV4_ADDR_FOR_X2C_IDX 3 +#define ENB_PORT_FOR_X2C_IDX 4 +#define ENB_IPV4_ADDR_FOR_M2C_IDX 5 +#define ENB_PORT_FOR_M2C_IDX 6 +#define MCE_IPV4_ADDR_FOR_M2C_IDX 7 +#define MCE_PORT_FOR_M2C_IDX 8 /* S1 interface configuration parameters names */ -#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME" #define ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME "ENB_IPV4_ADDRESS_FOR_S1_MME" -#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U "ENB_INTERFACE_NAME_FOR_S1U" #define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U "ENB_IPV4_ADDRESS_FOR_S1U" #define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U" @@ -1157,9 +1128,7 @@ typedef struct srb1_params_s { /*--------------------------------------------------------------------------------------------------------------------------------------------------*/ // clang-format off #define NETPARAMS_DESC { \ - {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, .u16ptr=NULL, .defuintval=GTPV1_U_PORT_NUMBER, TYPE_UINT16, 0}, \ {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ @@ -1177,7 +1146,6 @@ typedef struct srb1_params_s { /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ // clang-format off #define GTPUPARAMS_DESC { \ - {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, .strptr=&enb_interface_name_for_S1U, .defstrval="lo", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, .strptr=&enb_ipv4_address_for_S1U, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, .u16ptr=&enb_port_for_S1U, .defuintval=GTPV1_U_PORT_NUMBER, TYPE_UINT16, 0}, \ } @@ -1190,64 +1158,6 @@ typedef struct srb1_params_s { #define CONFIG_STRING_L1_LIST "L1s" #define CONFIG_STRING_L1_CONFIG "l1_config" -/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ -/* CU/DU configuration section names*/ -#define CONFIG_STRING_DU_LIST "DU" -#define CONFIG_STRING_CU_LIST "CU" -#define DU_TYPE_LTE 0 -#define DU_TYPE_WIFI 1 -#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES" -#define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U "CU_INTERFACE_NAME_FOR_F1U" -#define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U "CU_IPV4_ADDRESS_FOR_F1U" -#define ENB_CONFIG_STRING_CU_PORT_FOR_F1U "CU_PORT_FOR_F1U" -#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE" -#define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE "F1_U_CU_TRANSPORT_TYPE" -#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES" -#define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U "DU_INTERFACE_NAME_FOR_F1U" -#define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U "DU_IPV4_ADDRESS_FOR_F1U" -#define ENB_CONFIG_STRING_DU_PORT_FOR_F1U "DU_PORT_FOR_F1U" -#define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE "F1_U_DU_TRANSPORT_TYPE" - -#define CONFIG_STRING_CU_BALANCING "CU_BALANCING" - -// clang-format off -#define CUPARAMS_DESC { \ - {ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="eth0", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, .uptr=NULL, .defintval=2210, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, .strptr=NULL, .defstrval="TCP", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DU_TYPE, NULL, 0, .strptr=NULL, .defstrval="LTE", TYPE_STRING, 0}, \ -} -// clang-format on - -// clang-format off -#define DUPARAMS_DESC { \ - {ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="eth0", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, .uptr=NULL, .defintval=2210, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, .strptr=NULL, .defstrval="TCP", TYPE_STRING, 0}, \ -} -// clang-format on - -// clang-format off -#define CU_BAL_DESC { \ - {CONFIG_STRING_CU_BALANCING, NULL, 0, .strptr=NULL, .defstrval="ALL", TYPE_STRING, 0}, \ -} -// clang-format on - -#define CU_INTERFACE_F1U 0 -#define CU_ADDRESS_F1U 1 -#define CU_PORT_F1U 2 -#define CU_TYPE_F1U 3 - -#define DU_INTERFACE_F1U 0 -#define DU_ADDRESS_F1U 1 -#define DU_PORT_F1U 2 -#define DU_TYPE_F1U 3 -#define DU_TECH 4 - -/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /* MACRLC configuration section names */ #define CONFIG_STRING_MACRLC_LIST "MACRLCs" @@ -1257,7 +1167,6 @@ typedef struct srb1_params_s { /* MACRLC configuration parameters names */ #define CONFIG_STRING_MACRLC_CC "num_cc" #define CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE "tr_n_preference" -#define CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME "local_n_if_name" #define CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS "local_n_address" #define CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS "remote_n_address" #define CONFIG_STRING_MACRLC_LOCAL_N_PORTC "local_n_portc" @@ -1265,7 +1174,6 @@ typedef struct srb1_params_s { #define CONFIG_STRING_MACRLC_LOCAL_N_PORTD "local_n_portd" #define CONFIG_STRING_MACRLC_REMOTE_N_PORTD "remote_n_portd" #define CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE "tr_s_preference" -#define CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME "local_s_if_name" #define CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS "local_s_address" #define CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS "remote_s_address" #define CONFIG_STRING_MACRLC_LOCAL_S_PORTC "local_s_portc" @@ -1276,22 +1184,20 @@ typedef struct srb1_params_s { #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 -#define MACRLC_LOCAL_N_IF_NAME_IDX 2 -#define MACRLC_LOCAL_N_ADDRESS_IDX 3 -#define MACRLC_REMOTE_N_ADDRESS_IDX 4 -#define MACRLC_LOCAL_N_PORTC_IDX 5 -#define MACRLC_REMOTE_N_PORTC_IDX 6 -#define MACRLC_LOCAL_N_PORTD_IDX 7 -#define MACRLC_REMOTE_N_PORTD_IDX 8 -#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 9 -#define MACRLC_LOCAL_S_IF_NAME_IDX 10 -#define MACRLC_LOCAL_S_ADDRESS_IDX 11 -#define MACRLC_REMOTE_S_ADDRESS_IDX 12 -#define MACRLC_LOCAL_S_PORTC_IDX 13 -#define MACRLC_REMOTE_S_PORTC_IDX 14 -#define MACRLC_LOCAL_S_PORTD_IDX 15 -#define MACRLC_REMOTE_S_PORTD_IDX 16 -#define MACRLC_SCHED_MODE_IDX 17 +#define MACRLC_LOCAL_N_ADDRESS_IDX 2 +#define MACRLC_REMOTE_N_ADDRESS_IDX 3 +#define MACRLC_LOCAL_N_PORTC_IDX 4 +#define MACRLC_REMOTE_N_PORTC_IDX 5 +#define MACRLC_LOCAL_N_PORTD_IDX 6 +#define MACRLC_REMOTE_N_PORTD_IDX 7 +#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 8 +#define MACRLC_LOCAL_S_ADDRESS_IDX 9 +#define MACRLC_REMOTE_S_ADDRESS_IDX 10 +#define MACRLC_LOCAL_S_PORTC_IDX 11 +#define MACRLC_REMOTE_S_PORTC_IDX 12 +#define MACRLC_LOCAL_S_PORTD_IDX 13 +#define MACRLC_REMOTE_S_PORTD_IDX 14 +#define MACRLC_SCHED_MODE_IDX 15 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* thread configuration parameters section name */ diff --git a/openair2/ENB_APP/enb_paramdef_mce.h b/openair2/ENB_APP/enb_paramdef_mce.h index 16c230d5ee..c93fb4097e 100644 --- a/openair2/ENB_APP/enb_paramdef_mce.h +++ b/openair2/ENB_APP/enb_paramdef_mce.h @@ -67,30 +67,24 @@ #define MCE_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES" -#define MCE2_INTERFACE_NAME_FOR_M2_ENB_IDX 0 -#define MCE2_IPV4_ADDR_FOR_M2C_IDX 1 -#define MCE2_PORT_FOR_M2C_IDX 2 -#define MCE2_INTERFACE_NAME_FOR_M3_MME_IDX 3 -#define MCE2_IPV4_ADDR_FOR_M3C_IDX 4 -#define MCE2_PORT_FOR_M3C_IDX 5 +#define MCE2_IPV4_ADDR_FOR_M2C_IDX 0 +#define MCE2_PORT_FOR_M2C_IDX 1 +#define MCE2_IPV4_ADDR_FOR_M3C_IDX 2 +#define MCE2_PORT_FOR_M3C_IDX 3 /* interface configuration parameters names */ /* M2 interface configuration parameters names */ -#define MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M2_ENB "ENB_INTERFACE_NAME_FOR_M2_ENB" #define MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M2C "MCE_IPV4_ADDRESS_FOR_M2C" #define MCE_CONFIG_STRING_MCE_PORT_FOR_M2C "MCE_PORT_FOR_M2C" /* M3 interface configuration parameters names */ -#define MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M3_MME "MCE_INTERFACE_NAME_FOR_M3_MME" #define MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M3C "MCE_IPV4_ADDRESS_FOR_M3C" #define MCE_CONFIG_STRING_MCE_PORT_FOR_M3C "MCE_PORT_FOR_M3C" #define MCE_NETPARAMS_DESC { \ -{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M2_ENB, NULL, 0, .strptr=&mce_interface_name_for_m2_enb, .defstrval="lo", TYPE_STRING, 0}, \ {MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M2C, NULL, 0, .strptr=&mce_ipv4_address_for_m2c, .defstrval=NULL, TYPE_STRING, 0}, \ {MCE_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, .uptr=&mce_port_for_m2c, .defintval=36443L, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M3_MME, NULL, 0, .strptr=&mce_interface_name_for_m3_mme, .defstrval=NULL, TYPE_STRING, 0}, \ {MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M3C, NULL, 0, .strptr=&mce_ipv4_address_for_m3c, .defstrval=NULL, TYPE_STRING, 0}, \ {MCE_CONFIG_STRING_MCE_PORT_FOR_M3C, NULL, 0, .uptr=&mce_port_for_m3c, .defintval=36444L, TYPE_UINT, 0}, \ } @@ -102,18 +96,12 @@ #define MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS "target_mme_m3_ip_address" /* M3 configuration parameters names */ #define MCE_CONFIG_STRING_TARGET_MME_M3_IPV4_ADDRESS "ipv4" -#define MCE_CONFIG_STRING_TARGET_MME_M3_IPV6_ADDRESS "ipv6" -#define MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS_PREFERENCE "preference" /* optname helpstr paramflags XXXptr defXXXval type numelt */ #define M3PARAMS_DESC { \ -{MCE_CONFIG_STRING_TARGET_MME_M3_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_TARGET_MME_M3_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {MCE_CONFIG_STRING_TARGET_MME_M3_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } #define MCE2_M3_IPV4_ADDRESS_IDX 0 -#define MCE2_M3_IPV6_ADDRESS_IDX 1 -#define MCE2_M3_IP_ADDRESS_PREFERENCE_IDX 2 /*-----------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index f95827ee09..224a98ebde 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -250,7 +250,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id * let's put an assert to check that it is the expected DU UE ID. */ f1_ue_data_t ue_data = cu_get_f1_ue_data(cu_ue_f1ap_id); if (ue_data.secondary_ue != du_ue_f1ap_id) { - LOG_E(F1AP, "unexpected DU UE ID %d received, expected it to be %ld\n", ue_data.secondary_ue, du_ue_f1ap_id); + LOG_E(F1AP, "unexpected DU UE ID %u received, expected it to be %lu\n", ue_data.secondary_ue, du_ue_f1ap_id); return 1; } diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index 8401b44eca..2731fa8e0b 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -96,25 +96,20 @@ static void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *s AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); } -static void cu_task_send_sctp_init_req(instance_t instance, char *my_addr) { +static void cu_task_send_sctp_init_req(instance_t instance, char *my_addr) +{ // 1. get the itti msg, and retrive the nb_id from the message // 2. use RC.rrc[nb_id] to fill the sctp_init_t with the ip, port // 3. creat an itti message to init - LOG_I(F1AP, "F1AP_CU_SCTP_REQ(create socket)\n"); - MessageDef *message_p = NULL; - message_p = itti_alloc_new_message (TASK_CU_F1, 0, SCTP_INIT_MSG); - message_p->ittiMsg.sctp_init.port = F1AP_PORT_NUMBER; - message_p->ittiMsg.sctp_init.ppid = F1AP_SCTP_PPID; - message_p->ittiMsg.sctp_init.ipv4 = 1; - message_p->ittiMsg.sctp_init.ipv6 = 0; - message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1; - message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(my_addr); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - message_p->ittiMsg.sctp_init.nb_ipv6_addr = 0; - message_p->ittiMsg.sctp_init.ipv6_address[0] = "0:0:0:0:0:0:0:1"; + size_t addr_len = strlen(my_addr) + 1; + LOG_I(F1AP, "F1AP_CU_SCTP_REQ(create socket) for %s len %ld\n", my_addr, addr_len); + MessageDef *message_p = itti_alloc_new_message_sized(TASK_CU_F1, 0, SCTP_INIT_MSG, sizeof(sctp_init_t) + addr_len); + sctp_init_t *init = &SCTP_INIT_MSG(message_p); + init->port = F1AP_PORT_NUMBER; + init->ppid = F1AP_SCTP_PPID; + char *addr_buf = (char *) (init + 1); // address after ITTI message end, allocated above + init->bind_address = addr_buf; + memcpy(addr_buf, my_addr, addr_len); itti_send_msg_to_task(TASK_SCTP, instance, message_p); } diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index c2f690107c..1783e9d909 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -43,7 +43,7 @@ instance_t DUuniqInstance=0; static instance_t du_create_gtpu_instance_to_cu(const f1ap_net_config_t *nc) { openAddr_t tmp = {0}; - strncpy(tmp.originHost, nc->DU_f1_ip_address.ipv4_address, sizeof(tmp.originHost) - 1); + strncpy(tmp.originHost, nc->DU_f1u_ip_address, sizeof(tmp.originHost) - 1); strncpy(tmp.destinationHost, nc->CU_f1_ip_address.ipv4_address, sizeof(tmp.destinationHost) - 1); sprintf(tmp.originService, "%d", nc->DUport); sprintf(tmp.destinationService, "%d", nc->CUport); @@ -64,6 +64,8 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_net_config_t *n sctp_new_association_req_p->out_streams = 2; //du_inst->sctp_out_streams; // remote memcpy(&sctp_new_association_req_p->remote_address, &nc->CU_f1_ip_address, sizeof(nc->CU_f1_ip_address)); + // local + memcpy(&sctp_new_association_req_p->local_address, &nc->DU_f1c_ip_address, sizeof(nc->DU_f1c_ip_address)); // du_f1ap_register_to_sctp itti_send_msg_to_task(TASK_SCTP, instance, message_p); } diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 3715c0ae5d..8c32e7bea6 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -1189,7 +1189,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_cont asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, gTPTunnel); /* transportLayerAddress */ struct sockaddr_in addr= {0}; - inet_pton(AF_INET, getCxt(0)->net_config.DU_f1_ip_address.ipv4_address, &addr.sin_addr.s_addr); + inet_pton(AF_INET, getCxt(0)->net_config.DU_f1u_ip_address, &addr.sin_addr.s_addr); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(addr.sin_addr.s_addr, &gTPTunnel->transportLayerAddress); /* gTP_TEID */ INT32_TO_OCTET_STRING(resp->drbs_to_be_modified[i].up_dl_tnl[j].teid, &gTPTunnel->gTP_TEID); @@ -1309,7 +1309,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_cont /* procedureCode */ if (0) { ie11->value.choice.CriticalityDiagnostics.procedureCode = (F1AP_ProcedureCode_t *)calloc(1, sizeof(F1AP_ProcedureCode_t)); - ie11->value.choice.CriticalityDiagnostics.procedureCode = 0L; + *ie11->value.choice.CriticalityDiagnostics.procedureCode = 0L; } /* optional */ @@ -1330,7 +1330,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_cont /* transactionID */ if (0) { ie11->value.choice.CriticalityDiagnostics.transactionID = (F1AP_TransactionID_t *)calloc(1, sizeof(F1AP_TransactionID_t)); - ie11->value.choice.CriticalityDiagnostics.transactionID = 0L; + *ie11->value.choice.CriticalityDiagnostics.transactionID = 0L; } /* optional */ diff --git a/openair2/F1AP/f1ap_ids.c b/openair2/F1AP/f1ap_ids.c index e467e074fd..64d4b0b938 100644 --- a/openair2/F1AP/f1ap_ids.c +++ b/openair2/F1AP/f1ap_ids.c @@ -53,7 +53,7 @@ bool cu_add_f1_ue_data(uint32_t ue_id, const f1_ue_data_t *data) return false; } f1_ue_data_t *idata = malloc(sizeof(*idata)); - AssertFatal(idata != NULL, "cannot allocate memory\n"); + AssertFatal(idata, "cannot allocate memory\n"); *idata = *data; hashtable_rc_t ret = hashtable_insert(cu2du_ue_mapping, key, idata); pthread_mutex_unlock(&cu2du_mutex); @@ -116,7 +116,7 @@ bool du_add_f1_ue_data(uint32_t ue_id, const f1_ue_data_t *data) return false; } f1_ue_data_t *idata = malloc(sizeof(*idata)); - AssertFatal(idata != NULL, "cannot allocate memory\n"); + AssertFatal(idata, "cannot allocate memory\n"); *idata = *data; hashtable_rc_t ret = hashtable_insert(du2cu_ue_mapping, key, idata); pthread_mutex_unlock(&du2cu_mutex); diff --git a/openair2/GNB_APP/L1_nr_paramdef.h b/openair2/GNB_APP/L1_nr_paramdef.h index b503825c8e..1c3d7e98ec 100644 --- a/openair2/GNB_APP/L1_nr_paramdef.h +++ b/openair2/GNB_APP/L1_nr_paramdef.h @@ -38,7 +38,6 @@ /* L1 configuration parameters names */ #define CONFIG_STRING_L1_CC "num_cc" -#define CONFIG_STRING_L1_LOCAL_N_IF_NAME "local_n_if_name" #define CONFIG_STRING_L1_LOCAL_N_ADDRESS "local_n_address" #define CONFIG_STRING_L1_REMOTE_N_ADDRESS "remote_n_address" #define CONFIG_STRING_L1_LOCAL_N_PORTC "local_n_portc" @@ -68,7 +67,6 @@ #define L1PARAMS_DESC { \ {CONFIG_STRING_L1_CC, NULL, 0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ - {CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50030, TYPE_UINT, 0}, \ @@ -90,24 +88,23 @@ // clang-format on #define L1_CC_IDX 0 #define L1_TRANSPORT_N_PREFERENCE_IDX 1 -#define L1_LOCAL_N_IF_NAME_IDX 2 -#define L1_LOCAL_N_ADDRESS_IDX 3 -#define L1_REMOTE_N_ADDRESS_IDX 4 -#define L1_LOCAL_N_PORTC_IDX 5 -#define L1_REMOTE_N_PORTC_IDX 6 -#define L1_LOCAL_N_PORTD_IDX 7 -#define L1_REMOTE_N_PORTD_IDX 8 -#define L1_THREAD_POOL_SIZE 9 -#define L1_OFDM_OFFSET_DIVISOR 10 -#define L1_PUCCH0_DTX_THRESHOLD 11 -#define L1_PRACH_DTX_THRESHOLD 12 -#define L1_PUSCH_DTX_THRESHOLD 13 -#define L1_SRS_DTX_THRESHOLD 14 -#define L1_MAX_LDPC_ITERATIONS 15 -#define L1_RX_THREAD_CORE 16 -#define L1_TX_THREAD_CORE 17 -#define L1_TX_AMP_BACKOFF_dB 18 -#define L1_PHASE_COMP 19 +#define L1_LOCAL_N_ADDRESS_IDX 2 +#define L1_REMOTE_N_ADDRESS_IDX 3 +#define L1_LOCAL_N_PORTC_IDX 4 +#define L1_REMOTE_N_PORTC_IDX 5 +#define L1_LOCAL_N_PORTD_IDX 6 +#define L1_REMOTE_N_PORTD_IDX 7 +#define L1_THREAD_POOL_SIZE 8 +#define L1_OFDM_OFFSET_DIVISOR 9 +#define L1_PUCCH0_DTX_THRESHOLD 10 +#define L1_PRACH_DTX_THRESHOLD 11 +#define L1_PUSCH_DTX_THRESHOLD 12 +#define L1_SRS_DTX_THRESHOLD 13 +#define L1_MAX_LDPC_ITERATIONS 14 +#define L1_RX_THREAD_CORE 15 +#define L1_TX_THREAD_CORE 16 +#define L1_TX_AMP_BACKOFF_dB 17 +#define L1_PHASE_COMP 18 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ #endif diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h index f33cbf5327..e235de858f 100644 --- a/openair2/GNB_APP/MACRLC_nr_paramdef.h +++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h @@ -39,15 +39,14 @@ /* MACRLC configuration parameters names */ #define CONFIG_STRING_MACRLC_CC "num_cc" #define CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE "tr_n_preference" -#define CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME "local_n_if_name" #define CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS "local_n_address" +#define CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS_F1U "local_n_address_f1u" #define CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS "remote_n_address" #define CONFIG_STRING_MACRLC_LOCAL_N_PORTC "local_n_portc" #define CONFIG_STRING_MACRLC_REMOTE_N_PORTC "remote_n_portc" #define CONFIG_STRING_MACRLC_LOCAL_N_PORTD "local_n_portd" #define CONFIG_STRING_MACRLC_REMOTE_N_PORTD "remote_n_portd" #define CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE "tr_s_preference" -#define CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME "local_s_if_name" #define CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS "local_s_address" #define CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS "remote_s_address" #define CONFIG_STRING_MACRLC_LOCAL_S_PORTC "local_s_portc" @@ -93,7 +92,6 @@ #define MACRLCPARAMS_DESC { \ {CONFIG_STRING_MACRLC_CC, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_L1", TYPE_STRING, 0}, \ - {CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50010, TYPE_UINT, 0}, \ @@ -101,7 +99,6 @@ {CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_RRC", TYPE_STRING, 0}, \ - {CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defintval=50020, TYPE_UINT, 0}, \ @@ -125,43 +122,43 @@ {CONFIG_STRING_MACRLC_MIN_GRANT_PRB, HLP_MACRLC_MIN_GRANT_PRB, 0, .u8ptr=NULL, .defintval=5, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_MIN_GRANT_MCS, HLP_MACRLC_MIN_GRANT_MCS, 0, .u8ptr=NULL, .defintval=9, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_IDENTITY_PM, HLP_MACRLC_IDENTITY_PM, PARAMFLAG_BOOL, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS_F1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } // clang-format off #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 -#define MACRLC_LOCAL_N_IF_NAME_IDX 2 -#define MACRLC_LOCAL_N_ADDRESS_IDX 3 -#define MACRLC_REMOTE_N_ADDRESS_IDX 4 -#define MACRLC_LOCAL_N_PORTC_IDX 5 -#define MACRLC_REMOTE_N_PORTC_IDX 6 -#define MACRLC_LOCAL_N_PORTD_IDX 7 -#define MACRLC_REMOTE_N_PORTD_IDX 8 -#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 9 -#define MACRLC_LOCAL_S_IF_NAME_IDX 10 -#define MACRLC_LOCAL_S_ADDRESS_IDX 11 -#define MACRLC_REMOTE_S_ADDRESS_IDX 12 -#define MACRLC_LOCAL_S_PORTC_IDX 13 -#define MACRLC_REMOTE_S_PORTC_IDX 14 -#define MACRLC_LOCAL_S_PORTD_IDX 15 -#define MACRLC_REMOTE_S_PORTD_IDX 16 -#define MACRLC_ULSCH_MAX_FRAME_INACTIVITY 17 -#define MACRLC_PUSCHTARGETSNRX10_IDX 18 -#define MACRLC_PUCCHTARGETSNRX10_IDX 19 -#define MACRLC_UL_PRBBLACK_SNR_THRESHOLD_IDX 20 -#define MACRLC_PUCCHFAILURETHRES_IDX 21 -#define MACRLC_PUSCHFAILURETHRES_IDX 22 -#define MACRLC_DL_BLER_TARGET_UPPER_IDX 23 -#define MACRLC_DL_BLER_TARGET_LOWER_IDX 24 -#define MACRLC_DL_MAX_MCS_IDX 25 -#define MACRLC_UL_BLER_TARGET_UPPER_IDX 26 -#define MACRLC_UL_BLER_TARGET_LOWER_IDX 27 -#define MACRLC_UL_MAX_MCS_IDX 28 -#define MACRLC_DL_HARQ_ROUND_MAX_IDX 29 -#define MACRLC_UL_HARQ_ROUND_MAX_IDX 30 -#define MACRLC_MIN_GRANT_PRB_IDX 31 -#define MACRLC_MIN_GRANT_MCS_IDX 32 -#define MACRLC_IDENTITY_PM_IDX 33 +#define MACRLC_LOCAL_N_ADDRESS_IDX 2 +#define MACRLC_REMOTE_N_ADDRESS_IDX 3 +#define MACRLC_LOCAL_N_PORTC_IDX 4 +#define MACRLC_REMOTE_N_PORTC_IDX 5 +#define MACRLC_LOCAL_N_PORTD_IDX 6 +#define MACRLC_REMOTE_N_PORTD_IDX 7 +#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 8 +#define MACRLC_LOCAL_S_ADDRESS_IDX 9 +#define MACRLC_REMOTE_S_ADDRESS_IDX 10 +#define MACRLC_LOCAL_S_PORTC_IDX 11 +#define MACRLC_REMOTE_S_PORTC_IDX 12 +#define MACRLC_LOCAL_S_PORTD_IDX 13 +#define MACRLC_REMOTE_S_PORTD_IDX 14 +#define MACRLC_ULSCH_MAX_FRAME_INACTIVITY 15 +#define MACRLC_PUSCHTARGETSNRX10_IDX 16 +#define MACRLC_PUCCHTARGETSNRX10_IDX 17 +#define MACRLC_UL_PRBBLACK_SNR_THRESHOLD_IDX 18 +#define MACRLC_PUCCHFAILURETHRES_IDX 19 +#define MACRLC_PUSCHFAILURETHRES_IDX 20 +#define MACRLC_DL_BLER_TARGET_UPPER_IDX 21 +#define MACRLC_DL_BLER_TARGET_LOWER_IDX 22 +#define MACRLC_DL_MAX_MCS_IDX 23 +#define MACRLC_UL_BLER_TARGET_UPPER_IDX 24 +#define MACRLC_UL_BLER_TARGET_LOWER_IDX 25 +#define MACRLC_UL_MAX_MCS_IDX 26 +#define MACRLC_DL_HARQ_ROUND_MAX_IDX 27 +#define MACRLC_UL_HARQ_ROUND_MAX_IDX 28 +#define MACRLC_MIN_GRANT_PRB_IDX 29 +#define MACRLC_MIN_GRANT_MCS_IDX 30 +#define MACRLC_IDENTITY_PM_IDX 31 +#define MACRLC_LOCAL_N_ADDRESS_F1U_IDX 32 #define MACRLCPARAMS_CHECK { \ { .s5 = { NULL } }, \ @@ -191,13 +188,12 @@ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ - { .s5 = { NULL } }, \ - { .s5 = { NULL } }, \ { .s2 = { config_check_intrange, {1, 8} } }, /* DL max HARQ rounds */ \ { .s2 = { config_check_intrange, {1, 8} } }, /* UL max HARQ rounds */ \ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ { .s2 = { NULL } }, \ + { .s5 = { NULL } }, \ } /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index b8a64558d3..7e2d9c5b07 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -892,7 +892,6 @@ void RCconfig_NR_L1(void) if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) { // sf_ahead = 2; // Need 4 subframe gap between RX and TX } else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { - RC.gNB[j]->eth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); RC.gNB[j]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); RC.gNB[j]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); RC.gNB[j]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); @@ -1278,8 +1277,10 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "f1") == 0 || strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "cudu") == 0) { printf("Configuring F1 interfaces for MACRLC\n"); - RC.nrmac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); - RC.nrmac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); + char **f1caddr = MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr; + RC.nrmac[j]->eth_params_n.my_addr = strdup(*f1caddr); + char **f1uaddr = MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_F1U_IDX].strptr; + RC.nrmac[j]->f1u_addr = f1uaddr != NULL ? strdup(*f1uaddr) : strdup(*f1caddr); RC.nrmac[j]->eth_params_n.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr)); RC.nrmac[j]->eth_params_n.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr); RC.nrmac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr); @@ -1292,7 +1293,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_L1") == 0) { } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "nfapi") == 0) { - RC.nrmac[j]->eth_params_s.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr)); RC.nrmac[j]->eth_params_s.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr)); RC.nrmac[j]->eth_params_s.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr)); RC.nrmac[j]->eth_params_s.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr); @@ -1544,7 +1544,7 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc) config_get(config_get_if(), GNBSParams, sizeofArray(GNBSParams), NULL); num_gnbs = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt; - AssertFatal (i 0) { @@ -1566,19 +1566,18 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc) sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0); - printf("NRRRC %u: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr)); + printf("NRRRC %d: Southbound Transport %s\n", i, *(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr)); rrc->node_type = get_node_type(); rrc->node_id = gnb_id; if (NODE_IS_CU(rrc->node_type)) { paramdef_t SCTPParams[] = GNBSCTPPARAMS_DESC; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; - sprintf(aprefix,"%s.[%u].%s",GNB_CONFIG_STRING_GNB_LIST,i,GNB_CONFIG_STRING_SCTP_CONFIG); + sprintf(aprefix,"%s.[%d].%s", GNB_CONFIG_STRING_GNB_LIST, i, GNB_CONFIG_STRING_SCTP_CONFIG); config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix); - LOG_I(GNB_APP,"F1AP: gNB_CU_id[%d] %d\n",k,rrc->node_id); + LOG_I(GNB_APP,"F1AP: gNB_CU_id[%d] %d\n", k, rrc->node_id); rrc->node_name = strdup(*(GNBParamList.paramarray[0][GNB_GNB_NAME_IDX].strptr)); - LOG_I(GNB_APP,"F1AP: gNB_CU_name[%d] %s\n",k,rrc->node_name); - rrc->eth_params_s.local_if_name = strdup(*(GNBParamList.paramarray[i][GNB_LOCAL_S_IF_NAME_IDX].strptr)); + LOG_I(GNB_APP,"F1AP: gNB_CU_name[%d] %s\n", k, rrc->node_name); rrc->eth_params_s.my_addr = strdup(*(GNBParamList.paramarray[i][GNB_LOCAL_S_ADDRESS_IDX].strptr)); rrc->eth_params_s.remote_addr = strdup(*(GNBParamList.paramarray[i][GNB_REMOTE_S_ADDRESS_IDX].strptr)); rrc->eth_params_s.my_portc = *(GNBParamList.paramarray[i][GNB_LOCAL_S_PORTC_IDX].uptr); @@ -1595,7 +1594,6 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc) if (strcmp(*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) { } else if (strcmp(*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) { - rrc->eth_params_s.local_if_name = strdup(*(GNBParamList.paramarray[i][GNB_LOCAL_S_IF_NAME_IDX].strptr)); rrc->eth_params_s.my_addr = strdup(*(GNBParamList.paramarray[i][GNB_LOCAL_S_ADDRESS_IDX].strptr)); rrc->eth_params_s.remote_addr = strdup(*(GNBParamList.paramarray[i][GNB_REMOTE_S_ADDRESS_IDX].strptr)); rrc->eth_params_s.my_portc = *(GNBParamList.paramarray[i][GNB_LOCAL_S_PORTC_IDX].uptr); @@ -1804,27 +1802,15 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) { for (int l = 0; l < NGParamList.numelt; l++) { NGAP_REGISTER_GNB_REQ (msg_p).nb_amf += 1; - strcpy(NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[l].ipv4_address,*(NGParamList.paramarray[l][GNB_AMF_IPV4_ADDRESS_IDX].strptr)); - strcpy(NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[l].ipv6_address,*(NGParamList.paramarray[l][GNB_AMF_IPV6_ADDRESS_IDX].strptr)); - - if (strcmp(*(NGParamList.paramarray[l][GNB_AMF_IP_ADDRESS_ACTIVE_IDX].strptr), "yes") == 0) { - } - if (strcmp(*(NGParamList.paramarray[l][GNB_AMF_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv4 = 1; - } else if (strcmp(*(NGParamList.paramarray[l][GNB_AMF_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv6 = 1; - } else if (strcmp(*(NGParamList.paramarray[l][GNB_AMF_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv4 = 1; - NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv6 = 1; - } + NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv4 = 1; + NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv6 = 0; /* not in configuration yet ... if (NGParamList.paramarray[l][GNB_AMF_BROADCAST_PLMN_INDEX].iptr) NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] = NGParamList.paramarray[l][GNB_AMF_BROADCAST_PLMN_INDEX].numelt; else NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] = 0; - */ AssertFatal(NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] <= NGAP_REGISTER_GNB_REQ(msg_p).num_plmn, "List of broadcast PLMN to be sent to AMF can not be longer than actual " @@ -1833,7 +1819,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) { NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l]); for (int el = 0; el < NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l]; ++el) { - /* UINTARRAY gets mapped to int, see config_libconfig.c:223 */ + // UINTARRAY gets mapped to int, see config_libconfig.c:223 NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_index[l][el] = NGParamList.paramarray[l][GNB_AMF_BROADCAST_PLMN_INDEX].iptr[el]; AssertFatal(NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_index[l][el] >= 0 && NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_index[l][el] < NGAP_REGISTER_GNB_REQ(msg_p).num_plmn, @@ -1841,6 +1827,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) { NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_index[l][el], NGAP_REGISTER_GNB_REQ(msg_p).num_plmn); } + */ /* if no broadcasst_plmn array is defined, fill default values */ if (NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] == 0) { @@ -2080,18 +2067,8 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) { for (l = 0; l < X2ParamList.numelt; l++) { X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 += 1; strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4_address,*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); - strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6_address,*(X2ParamList.paramarray[l][ENB_X2_IPV6_ADDRESS_IDX].strptr)); - - if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 0; - } else if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 0; - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 1; - } else if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; - X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 1; - } + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 0; } // timers diff --git a/openair2/GNB_APP/gnb_paramdef.h b/openair2/GNB_APP/gnb_paramdef.h index e07a89d305..b4ac31e6ed 100644 --- a/openair2/GNB_APP/gnb_paramdef.h +++ b/openair2/GNB_APP/gnb_paramdef.h @@ -107,7 +107,6 @@ typedef enum { #define GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD "mobile_country_code" #define GNB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD "mobile_network_code" #define GNB_CONFIG_STRING_TRANSPORT_S_PREFERENCE "tr_s_preference" -#define GNB_CONFIG_STRING_LOCAL_S_IF_NAME "local_s_if_name" #define GNB_CONFIG_STRING_LOCAL_S_ADDRESS "local_s_address" #define GNB_CONFIG_STRING_REMOTE_S_ADDRESS "remote_s_address" #define GNB_CONFIG_STRING_LOCAL_S_PORTC "local_s_portc" @@ -150,7 +149,6 @@ typedef enum { {GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ @@ -184,29 +182,28 @@ typedef enum { #define GNB_MOBILE_COUNTRY_CODE_IDX_OLD 4 #define GNB_MOBILE_NETWORK_CODE_IDX_OLD 5 #define GNB_TRANSPORT_S_PREFERENCE_IDX 6 -#define GNB_LOCAL_S_IF_NAME_IDX 7 -#define GNB_LOCAL_S_ADDRESS_IDX 8 -#define GNB_REMOTE_S_ADDRESS_IDX 9 -#define GNB_LOCAL_S_PORTC_IDX 10 -#define GNB_REMOTE_S_PORTC_IDX 11 -#define GNB_LOCAL_S_PORTD_IDX 12 -#define GNB_REMOTE_S_PORTD_IDX 13 -#define GNB_PDSCH_ANTENNAPORTS_N1_IDX 14 -#define GNB_PDSCH_ANTENNAPORTS_N2_IDX 15 -#define GNB_PDSCH_ANTENNAPORTS_XP_IDX 16 -#define GNB_PUSCH_ANTENNAPORTS_IDX 17 -#define GNB_SIB1_TDA_IDX 18 -#define GNB_DO_CSIRS_IDX 19 -#define GNB_DO_SRS_IDX 20 -#define GNB_NRCELLID_IDX 21 -#define GNB_MINRXTXTIME_IDX 22 -#define GNB_ULPRBBLACKLIST_IDX 23 -#define GNB_UMONDEFAULTDRB_IDX 24 -#define GNB_FORCE256QAMOFF_IDX 25 -#define GNB_ENABLE_SDAP_IDX 26 -#define GNB_DRBS 27 -#define GNB_GNB_DU_ID_IDX 28 -#define GNB_GNB_CU_UP_ID_IDX 29 +#define GNB_LOCAL_S_ADDRESS_IDX 7 +#define GNB_REMOTE_S_ADDRESS_IDX 8 +#define GNB_LOCAL_S_PORTC_IDX 9 +#define GNB_REMOTE_S_PORTC_IDX 10 +#define GNB_LOCAL_S_PORTD_IDX 11 +#define GNB_REMOTE_S_PORTD_IDX 12 +#define GNB_PDSCH_ANTENNAPORTS_N1_IDX 13 +#define GNB_PDSCH_ANTENNAPORTS_N2_IDX 14 +#define GNB_PDSCH_ANTENNAPORTS_XP_IDX 15 +#define GNB_PUSCH_ANTENNAPORTS_IDX 16 +#define GNB_SIB1_TDA_IDX 17 +#define GNB_DO_CSIRS_IDX 18 +#define GNB_DO_SRS_IDX 19 +#define GNB_NRCELLID_IDX 20 +#define GNB_MINRXTXTIME_IDX 21 +#define GNB_ULPRBBLACKLIST_IDX 22 +#define GNB_UMONDEFAULTDRB_IDX 23 +#define GNB_FORCE256QAMOFF_IDX 24 +#define GNB_ENABLE_SDAP_IDX 25 +#define GNB_DRBS 26 +#define GNB_GNB_DU_ID_IDX 27 +#define GNB_GNB_CU_UP_ID_IDX 28 #define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD} #define GNBPARAMS_CHECK { \ @@ -289,28 +286,17 @@ typedef enum { #define GNB_CONFIG_STRING_AMF_IPV4_ADDRESS "ipv4" -#define GNB_CONFIG_STRING_AMF_IPV6_ADDRESS "ipv6" -#define GNB_CONFIG_STRING_AMF_IP_ADDRESS_ACTIVE "active" -#define GNB_CONFIG_STRING_AMF_IP_ADDRESS_PREFERENCE "preference" -#define GNB_CONFIG_STRING_AMF_BROADCAST_PLMN_INDEX "broadcast_plmn_index" - /*-------------------------------------------------------------------------------------------------------------------------------------*/ /* MME configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBNGPARAMS_DESC { \ -{GNB_CONFIG_STRING_AMF_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_AMF_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_AMF_IP_ADDRESS_ACTIVE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_AMF_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_AMF_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } #define GNB_AMF_IPV4_ADDRESS_IDX 0 -#define GNB_AMF_IPV6_ADDRESS_IDX 1 -#define GNB_AMF_IP_ADDRESS_ACTIVE_IDX 2 -#define GNB_AMF_IP_ADDRESS_PREFERENCE_IDX 3 -#define GNB_AMF_BROADCAST_PLMN_INDEX 4 + /*---------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------*/ /* SCTP configuration parameters section name */ @@ -338,24 +324,18 @@ typedef enum { /* S1 interface configuration parameters section name */ #define GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES" -#define GNB_INTERFACE_NAME_FOR_NG_AMF_IDX 0 -#define GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX 1 -#define GNB_INTERFACE_NAME_FOR_NGU_IDX 2 -#define GNB_IPV4_ADDR_FOR_NGU_IDX 3 -#define GNB_PORT_FOR_NGU_IDX 4 -#define GNB_IPV4_ADDR_FOR_X2C_IDX 5 -#define GNB_PORT_FOR_X2C_IDX 6 +#define GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX 0 +#define GNB_IPV4_ADDR_FOR_NGU_IDX 1 +#define GNB_PORT_FOR_NGU_IDX 2 +#define GNB_IPV4_ADDR_FOR_X2C_IDX 3 +#define GNB_PORT_FOR_X2C_IDX 4 /* S1 interface configuration parameters names */ -#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1_MME "GNB_INTERFACE_NAME_FOR_S1_MME" #define GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1_MME "GNB_IPV4_ADDRESS_FOR_S1_MME" -#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1U "GNB_INTERFACE_NAME_FOR_S1U" #define GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1U "GNB_IPV4_ADDRESS_FOR_S1U" #define GNB_CONFIG_STRING_GNB_PORT_FOR_S1U "GNB_PORT_FOR_S1U" -#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NG_AMF "GNB_INTERFACE_NAME_FOR_NG_AMF" #define GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF "GNB_IPV4_ADDRESS_FOR_NG_AMF" -#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU "GNB_INTERFACE_NAME_FOR_NGU" #define GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU "GNB_IPV4_ADDRESS_FOR_NGU" #define GNB_CONFIG_STRING_GNB_PORT_FOR_NGU "GNB_PORT_FOR_NGU" @@ -368,14 +348,11 @@ typedef enum { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBNETPARAMS_DESC { \ - {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NG_AMF, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU, NULL, 0, .strptr=&gnb_ipv4_address_for_NGU, .defstrval="127.0.0.1",TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_GNB_PORT_FOR_NGU, NULL, 0, .uptr=&gnb_port_for_NGU, .defintval=2152L, TYPE_UINT, 0}, \ {GNB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, .uptr=NULL, .defintval=0L, TYPE_UINT, 0}, \ - {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1U, NULL, 0, .strptr=&gnb_ipv4_address_for_S1U, .defstrval="127.0.0.1",TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_GNB_PORT_FOR_S1U, NULL, 0, .uptr=&gnb_port_for_S1U, .defintval=2152L, TYPE_UINT, 0} \ } @@ -415,7 +392,6 @@ typedef enum { /* MACRLC configuration parameters names */ #define CONFIG_STRING_MACRLC_CC "num_cc" #define CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE "tr_n_preference" -#define CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME "local_n_if_name" #define CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS "local_n_address" #define CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS "remote_n_address" #define CONFIG_STRING_MACRLC_LOCAL_N_PORTC "local_n_portc" @@ -423,7 +399,6 @@ typedef enum { #define CONFIG_STRING_MACRLC_LOCAL_N_PORTD "local_n_portd" #define CONFIG_STRING_MACRLC_REMOTE_N_PORTD "remote_n_portd" #define CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE "tr_s_preference" -#define CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME "local_s_if_name" #define CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS "local_s_address" #define CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS "remote_s_address" #define CONFIG_STRING_MACRLC_LOCAL_S_PORTC "local_s_portc" @@ -434,22 +409,20 @@ typedef enum { #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 -#define MACRLC_LOCAL_N_IF_NAME_IDX 2 -#define MACRLC_LOCAL_N_ADDRESS_IDX 3 -#define MACRLC_REMOTE_N_ADDRESS_IDX 4 -#define MACRLC_LOCAL_N_PORTC_IDX 5 -#define MACRLC_REMOTE_N_PORTC_IDX 6 -#define MACRLC_LOCAL_N_PORTD_IDX 7 -#define MACRLC_REMOTE_N_PORTD_IDX 8 -#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 9 -#define MACRLC_LOCAL_S_IF_NAME_IDX 10 -#define MACRLC_LOCAL_S_ADDRESS_IDX 11 -#define MACRLC_REMOTE_S_ADDRESS_IDX 12 -#define MACRLC_LOCAL_S_PORTC_IDX 13 -#define MACRLC_REMOTE_S_PORTC_IDX 14 -#define MACRLC_LOCAL_S_PORTD_IDX 15 -#define MACRLC_REMOTE_S_PORTD_IDX 16 -#define MACRLC_SCHED_MODE_IDX 17 +#define MACRLC_LOCAL_N_ADDRESS_IDX 2 +#define MACRLC_REMOTE_N_ADDRESS_IDX 3 +#define MACRLC_LOCAL_N_PORTC_IDX 4 +#define MACRLC_REMOTE_N_PORTC_IDX 5 +#define MACRLC_LOCAL_N_PORTD_IDX 6 +#define MACRLC_REMOTE_N_PORTD_IDX 7 +#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 8 +#define MACRLC_LOCAL_S_ADDRESS_IDX 9 +#define MACRLC_REMOTE_S_ADDRESS_IDX 10 +#define MACRLC_LOCAL_S_PORTC_IDX 11 +#define MACRLC_REMOTE_S_PORTC_IDX 12 +#define MACRLC_LOCAL_S_PORTD_IDX 13 +#define MACRLC_REMOTE_S_PORTD_IDX 14 +#define MACRLC_SCHED_MODE_IDX 15 /* thread configuration parameters section name */ diff --git a/openair2/LAYER2/MAC/slicing/slicing.c b/openair2/LAYER2/MAC/slicing/slicing.c index 48dd99afeb..cd31671c02 100644 --- a/openair2/LAYER2/MAC/slicing/slicing.c +++ b/openair2/LAYER2/MAC/slicing/slicing.c @@ -201,7 +201,7 @@ int addmod_static_slice_ul(slice_info_t *si, int index = _exists_slice(si->num, si->s, id); if (index >= 0) { for (int s = 0; s < si->num; ++s) { - static_slice_param_t *su = ul && si->s[s]->id == id && ul ? ul : si->s[s]->algo_data; + static_slice_param_t *su = ul && si->s[s]->id == id? ul : si->s[s]->algo_data; for (int i = su->posLow; i <= su->posHigh; ++i) { if (rbMap[i]) RET_FAIL(-33, "%s(): overlap of slices detected at RBG %d\n", __func__, i); diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 176b5b8e7b..c5f3daf88f 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -1677,28 +1677,24 @@ void set_monitoring_periodicity_offset(NR_SearchSpace_t *ss, int get_nr_prach_occasion_info_from_index(uint8_t index, - uint32_t pointa, - uint8_t mu, - uint8_t unpaired, - uint16_t *format, - uint8_t *start_symbol, - uint8_t *N_t_slot, - uint8_t *N_dur, - uint8_t *N_RA_slot, - uint16_t *N_RA_sfn, - uint8_t *max_association_period) { - + uint32_t pointa, + uint8_t mu, + uint8_t unpaired, + uint16_t *format, + uint8_t *start_symbol, + uint8_t *N_t_slot, + uint8_t *N_dur, + uint8_t *N_RA_slot, + uint16_t *N_RA_sfn, + uint8_t *max_association_period) +{ int x; - int64_t s_map; + uint64_t s_map; uint8_t format2 = 0xff; if (pointa > 2016666) { //FR2 x = table_6_3_3_2_4_prachConfig_Index[index][2]; s_map = table_6_3_3_2_4_prachConfig_Index[index][5]; - for(int i = 0; i < 64 ;i++) { - if ( (s_map >> i) & 0x01) { - (*N_RA_sfn)++; - } - } + *N_RA_sfn += count_bits_set(s_map); *N_RA_slot = table_6_3_3_2_4_prachConfig_Index[index][7]; // Number of RACH slots within a subframe *max_association_period = 160/(x * 10); if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){ @@ -1722,15 +1718,10 @@ int get_nr_prach_occasion_info_from_index(uint8_t index, return 1; } else { - if (unpaired) { x = table_6_3_3_2_3_prachConfig_Index[index][2]; s_map = table_6_3_3_2_3_prachConfig_Index[index][4]; - for(int i = 0; i < 64 ;i++) { - if ( (s_map >> i) & 0x01) { - (*N_RA_sfn)++; - } - } + *N_RA_sfn += count_bits_set(s_map); *N_RA_slot = table_6_3_3_2_3_prachConfig_Index[index][6]; // Number of RACH slots within a subframe *max_association_period = 160/(x * 10); if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){ @@ -1748,18 +1739,14 @@ int get_nr_prach_occasion_info_from_index(uint8_t index, *start_symbol, *N_t_slot, *N_dur, - *N_RA_sfn); + *N_RA_sfn); } - return 1; - } + return 1; + } else { // FDD x = table_6_3_3_2_2_prachConfig_Index[index][2]; s_map = table_6_3_3_2_2_prachConfig_Index[index][4]; - for(int i = 0; i < 64 ; i++) { - if ( (s_map >> i) & 0x01) { - (*N_RA_sfn)++; - } - } + *N_RA_sfn += count_bits_set(s_map); *N_RA_slot = table_6_3_3_2_2_prachConfig_Index[index][6]; if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){ *start_symbol = table_6_3_3_2_2_prachConfig_Index[index][5]; @@ -2656,13 +2643,19 @@ uint16_t get_nr_srs_offset(NR_SRS_PeriodicityAndOffset_t periodicityAndOffset) { // - "UE procedure for applying transform precoding on PUSCH" long get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_t dci_format, uint8_t configuredGrant) { - if (configuredGrant && current_UL_BWP->configuredGrantConfig && current_UL_BWP->configuredGrantConfig->transformPrecoder) + if (configuredGrant + && current_UL_BWP + && current_UL_BWP->configuredGrantConfig + && current_UL_BWP->configuredGrantConfig->transformPrecoder) return *current_UL_BWP->configuredGrantConfig->transformPrecoder; - if (dci_format == NR_UL_DCI_FORMAT_0_1 && current_UL_BWP && current_UL_BWP->pusch_Config && current_UL_BWP->pusch_Config->transformPrecoder) + if (dci_format == NR_UL_DCI_FORMAT_0_1 + && current_UL_BWP + && current_UL_BWP->pusch_Config + && current_UL_BWP->pusch_Config->transformPrecoder) return *current_UL_BWP->pusch_Config->transformPrecoder; - if (current_UL_BWP->rach_ConfigCommon && current_UL_BWP->rach_ConfigCommon->msg3_transformPrecoder) + if (current_UL_BWP && current_UL_BWP->rach_ConfigCommon && current_UL_BWP->rach_ConfigCommon->msg3_transformPrecoder) return NR_PUSCH_Config__transformPrecoder_enabled; return NR_PUSCH_Config__transformPrecoder_disabled; @@ -2670,8 +2663,8 @@ long get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_ uint8_t get_pusch_nb_antenna_ports(NR_PUSCH_Config_t *pusch_Config, NR_SRS_Config_t *srs_config, - dci_field_t srs_resource_indicator) { - + dci_field_t srs_resource_indicator) +{ uint8_t n_antenna_port = 1; if (get_softmodem_params()->phy_test == 1) { // temporary hack to allow UL-MIMO in phy-test mode without SRS @@ -2687,7 +2680,7 @@ uint8_t get_pusch_nb_antenna_ports(NR_PUSCH_Config_t *pusch_Config, // shall be configured with the same value for all these SRS resources. if (srs_resource_set->usage == NR_SRS_ResourceSet__usage_codebook) { NR_SRS_Resource_t *srs_resource = srs_config->srs_ResourceToAddModList->list.array[sri]; - AssertFatal(srs_resource != NULL, "SRS resource indicated by DCI does not exist\n"); + AssertFatal(srs_resource, "SRS resource indicated by DCI does not exist\n"); n_antenna_port = 1 << srs_resource->nrofSRS_Ports; break; } @@ -2819,8 +2812,8 @@ uint8_t compute_precoding_information(NR_PUSCH_Config_t *pusch_Config, dci_field_t srs_resource_indicator, nr_srs_feedback_t *srs_feedback, const uint8_t *nrOfLayers, - uint32_t *val) { - + uint32_t *val) +{ // It is only applicable to codebook based transmission. This field occupies 0 bits for non-codebook based // transmission. It also occupies 0 bits for codebook based transmission using a single antenna port. uint8_t nbits = 0; @@ -2829,8 +2822,9 @@ uint8_t compute_precoding_information(NR_PUSCH_Config_t *pusch_Config, } uint8_t pusch_antenna_ports = get_pusch_nb_antenna_ports(pusch_Config, srs_config, srs_resource_indicator); - if ((pusch_Config && pusch_Config->txConfig != NULL && *pusch_Config->txConfig == NR_PUSCH_Config__txConfig_nonCodebook) || - pusch_antenna_ports == 1) { + if (!pusch_Config + || (pusch_Config->txConfig != NULL && *pusch_Config->txConfig == NR_PUSCH_Config__txConfig_nonCodebook) + || pusch_antenna_ports == 1) { return nbits; } @@ -3054,7 +3048,6 @@ uint8_t compute_precoding_information(NR_PUSCH_Config_t *pusch_Config, } } - return nbits; } @@ -3612,8 +3605,7 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config, AssertFatal(startSymbol <= l0, "Wrong config, Start symbol %d cannot be later than dmrs_TypeA_Position %d \n", startSymbol, l0); // Section 7.4.1.1.2 in Spec 38.211 - AssertFatal(l0 == 2 || (l0 == 3 && (ld != 3 || ld != 4)), "ld 3 or 4 symbols only possible with dmrs_TypeA_Position POS2 \n"); - + AssertFatal(l0 == 2 || (l0 == 3 && (ld != 3 && ld != 4)), "ld 3 or 4 symbols only possible with dmrs_TypeA_Position POS2 \n"); } // number of front loaded symbols @@ -4274,11 +4266,8 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD void fill_coresetZero(NR_ControlResourceSet_t *coreset0, NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config) { - if (coreset0 == NULL) - coreset0 = calloc(1,sizeof(*coreset0)); - - AssertFatal(type0_PDCCH_CSS_config!=NULL,"No type0 CSS configuration\n"); - + AssertFatal(type0_PDCCH_CSS_config, "No type0 CSS configuration\n"); + AssertFatal(coreset0, "Coreset0 should have been allocated outside of this function\n"); coreset0->controlResourceSetId = 0; int duration = type0_PDCCH_CSS_config->num_symbols; @@ -4327,8 +4316,7 @@ void fill_searchSpaceZero(NR_SearchSpace_t *ss0, int slots_per_frame, NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config) { - if(ss0 == NULL) - ss0 = calloc(1, sizeof(*ss0)); + AssertFatal(ss0, "SearchSpace0 should have been allocated outside of this function\n"); if(ss0->controlResourceSetId == NULL) ss0->controlResourceSetId = calloc(1, sizeof(*ss0->controlResourceSetId)); if(ss0->monitoringSymbolsWithinSlot == NULL) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 07d8ed4513..0511573be9 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -755,6 +755,7 @@ static void nr_configure_lc_config(NR_UE_MAC_INST_t *mac, AssertFatal(mac_lc_config->ul_SpecificParameters, "UL parameters shouldn't be NULL for DRBs\n"); struct NR_LogicalChannelConfig__ul_SpecificParameters *ul_parm = mac_lc_config->ul_SpecificParameters; lc_info->priority = ul_parm->priority; + lc_info->sr_id = ul_parm->schedulingRequestID ? *ul_parm->schedulingRequestID : -1; lc_info->sr_DelayTimerApplied = ul_parm->logicalChannelSR_DelayTimerApplied; lc_info->lc_SRMask = ul_parm->logicalChannelSR_Mask; lc_info->pbr = nr_get_pbr(ul_parm->prioritisedBitRate); @@ -1425,7 +1426,7 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id, NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); switch (cause) { case GO_TO_IDLE: - reset_ra(&mac->ra); + reset_ra(mac, cause); release_mac_configuration(mac, cause); nr_ue_init_mac(mac); nr_ue_mac_default_configs(mac); @@ -1433,14 +1434,16 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id, nr_ue_send_synch_request(mac, module_id, 0, -1); break; case DETACH: - reset_ra(&mac->ra); + LOG_A(NR_MAC, "Received detach indication\n"); + reset_ra(mac, cause); reset_mac_inst(mac); nr_ue_reset_sync_state(mac); release_mac_configuration(mac, cause); + mac->state = UE_DETACHING; break; case T300_EXPIRY: + reset_ra(mac, cause); reset_mac_inst(mac); - reset_ra(&mac->ra); mac->state = UE_SYNC; // still in sync but need to restart RA break; case RE_ESTABLISHMENT: @@ -1691,37 +1694,35 @@ static uint32_t nr_get_sf_periodicBSRTimer(long periodicBSR) static void configure_maccellgroup(NR_UE_MAC_INST_t *mac, const NR_MAC_CellGroupConfig_t *mcg) { NR_UE_SCHEDULING_INFO *si = &mac->scheduling_info; + int scs = mac->current_UL_BWP->scs; if (mcg->drx_Config) LOG_E(NR_MAC, "DRX not implemented! Configuration not handled!\n"); if (mcg->schedulingRequestConfig) { const NR_SchedulingRequestConfig_t *src = mcg->schedulingRequestConfig; if (src->schedulingRequestToReleaseList) { for (int i = 0; i < src->schedulingRequestToReleaseList->list.count; i++) { - if (*src->schedulingRequestToReleaseList->list.array[i] == si->sr_id) { - si->SR_COUNTER = 0; - si->sr_ProhibitTimer = 0; - si->sr_ProhibitTimer_Running = 0; - si->sr_id = -1; // invalid init value - } - else - LOG_E(NR_MAC, "Cannot release SchedulingRequestConfig. Not configured.\n"); + NR_SchedulingRequestId_t id = *src->schedulingRequestToReleaseList->list.array[i]; + memset(&si->sr_info[id], 0, sizeof(si->sr_info[id])); } } if (src->schedulingRequestToAddModList) { for (int i = 0; i < src->schedulingRequestToAddModList->list.count; i++) { NR_SchedulingRequestToAddMod_t *sr = src->schedulingRequestToAddModList->list.array[i]; - AssertFatal(si->sr_id == -1 || - si->sr_id == sr->schedulingRequestId, - "Current implementation cannot handle more than 1 SR configuration\n"); - si->sr_id = sr->schedulingRequestId; - si->sr_TransMax = sr->sr_TransMax; + nr_sr_info_t *sr_info = &si->sr_info[sr->schedulingRequestId]; + sr_info->active_SR_ID = true; + // NR_SchedulingRequestToAddMod__sr_TransMax_n4 = 0 and so on + // to obtain the value to configure we need to right shift 4 by the RRC parameter + sr_info->maxTransmissions = 4 << sr->sr_TransMax; + int target_ms = 0; if (sr->sr_ProhibitTimer) - LOG_E(NR_MAC, "SR prohibit timer not properly implemented\n"); + target_ms = 1 << *sr->sr_ProhibitTimer; + // length of slot is (1/2^scs)ms + nr_timer_setup(&sr_info->prohibitTimer, target_ms << scs, 1); // 1 slot update rate } } } if (mcg->bsr_Config) { - int subframes_per_slot = nr_slots_per_frame[mac->current_UL_BWP->scs] / 10; + int subframes_per_slot = nr_slots_per_frame[scs] / 10; uint32_t periodic_sf = nr_get_sf_periodicBSRTimer(mcg->bsr_Config->periodicBSR_Timer); uint32_t target = periodic_sf < UINT_MAX ? periodic_sf * subframes_per_slot : periodic_sf; nr_timer_setup(&si->periodicBSR_Timer, target, 1); // 1 slot update rate diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c b/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c index 0a8a20dd74..73fb6782ae 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c @@ -181,7 +181,7 @@ static void sl_prepare_phy_config(int module_id, phycfg->sl_bwp_config.sl_ssb_offset_point_a = diff/scs_scaling; #ifdef SL_DEBUG - printf("diff:%d, scaling:%d, pointa:%d, ssb:%d\n", diff, scs_scaling, pointA_ARFCN, SSB_ARFCN); + printf("diff:%u, scaling:%d, pointa:%u, ssb:%u\n", diff, scs_scaling, pointA_ARFCN, SSB_ARFCN); #endif phycfg->sl_bwp_config.sl_dc_location = (bwp_generic->sl_TxDirectCurrentLocation_r16) ? diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 4a79b6e38d..fa58cf4676 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -77,6 +77,7 @@ #define MAX_NUM_BWP_UE 5 #define NUM_SLOT_FRAME 10 +#define NR_MAX_SR_ID 8 // SchedulingRequestId ::= INTEGER (0..7) /*!\brief value for indicating BSR Timer is not running */ #define NR_MAC_UE_BSR_TIMER_NOT_RUNNING (0xFFFF) @@ -163,12 +164,19 @@ #define PRACH_MASK_INDEX 54 #define RESERVED_NR_DCI 55 +// Define the UE L2 states with X-Macro +#define NR_UE_L2_STATES \ + UE_STATE(UE_NOT_SYNC) \ + UE_STATE(UE_SYNC) \ + UE_STATE(UE_PERFORMING_RA) \ + UE_STATE(UE_CONNECTED) \ + UE_STATE(UE_DETACHING) + /*!\brief UE layer 2 status */ typedef enum { - UE_NOT_SYNC = 0, - UE_SYNC, - UE_PERFORMING_RA, - UE_CONNECTED +#define UE_STATE(state) state, + NR_UE_L2_STATES +#undef UE_STATE } NR_UE_L2_STATE_t; typedef enum { @@ -202,33 +210,36 @@ typedef struct { int32_t BSR_bytes; } NR_LCG_SCHEDULING_INFO; +typedef struct { + bool active_SR_ID; + /// SR pending as defined in 38.321 + bool pending; + /// SR_COUNTER as defined in 38.321 + uint32_t counter; + /// sr ProhibitTimer + NR_timer_t prohibitTimer; + // Maximum number of SR transmissions + uint32_t maxTransmissions; +} nr_sr_info_t; + // LTE structure, might need to be adapted for NR typedef struct { // lcs scheduling info NR_LC_SCHEDULING_INFO lc_sched_info[NR_MAX_NUM_LCID]; // lcg scheduling info NR_LCG_SCHEDULING_INFO lcg_sched_info[NR_MAX_NUM_LCGID]; + // SR INFO + nr_sr_info_t sr_info[NR_MAX_SR_ID]; /// BSR report flag management uint8_t BSR_reporting_active; // LCID triggering BSR NR_LogicalChannelIdentity_t regularBSR_trigger_lcid; - /// SR pending as defined in 38.321 - uint8_t SR_pending; - /// SR_COUNTER as defined in 38.321 - uint16_t SR_COUNTER; // logicalChannelSR-DelayTimer NR_timer_t sr_DelayTimer; /// retxBSR-Timer NR_timer_t retxBSR_Timer; /// periodicBSR-Timer NR_timer_t periodicBSR_Timer; - /// default value is 0: not configured - uint16_t sr_ProhibitTimer; - /// sr ProhibitTime running - uint8_t sr_ProhibitTimer_Running; - // Maximum number of SR transmissions - uint32_t sr_TransMax; - int sr_id; ///timer before triggering a periodic PHR uint16_t periodicPHR_Timer; ///timer before triggering a prohibit PHR @@ -446,6 +457,7 @@ typedef struct ssb_list_info { typedef struct nr_lcordered_info_s { // logical channels ids ordered as per priority NR_LogicalChannelIdentity_t lcid; + int sr_id; long priority; uint32_t pbr; // in B/s (UINT_MAX = infinite) // Bucket size per lcid diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index 374d9ca3e6..b13c2a9865 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -100,7 +100,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(int nb_inst); NR_UE_MAC_INST_t *get_mac_inst(module_id_t module_id); void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac); -void reset_ra(RA_config_t *ra); +void reset_ra(NR_UE_MAC_INST_t *nr_mac, NR_UE_MAC_reset_cause_t cause); void release_mac_configuration(NR_UE_MAC_INST_t *mac, NR_UE_MAC_reset_cause_t cause); @@ -111,14 +111,11 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac, void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info); void nr_ue_dl_scheduler(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info); -/*! \fn int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, 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. \param[in] mac pointer to MAC instance \param[in] frameP -subframe number \param[in] slotP slot number -*/ -int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slotP); +/*! \fn int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frame, slot_t slot, NR_SchedulingRequestId_t sr_id); + \brief This function schedules a positive or negative SR for schedulingRequestID sr_id + depending on the presence of any active SR and the prohibit timer. + If the max number of retransmissions is reached, it triggers a new RA */ +int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frame, slot_t slot, NR_SchedulingRequestId_t sr_id); nr_dci_format_t nr_ue_process_dci_indication_pdu(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, fapi_nr_dci_indication_pdu_t *dci); @@ -300,6 +297,13 @@ void configure_initial_pucch(PUCCH_sched_t *pucch, int res_ind); void nr_ue_reset_sync_state(NR_UE_MAC_INST_t *mac); void nr_ue_send_synch_request(NR_UE_MAC_INST_t *mac, module_id_t module_id, int cc_id, int cell_id); +/** + * @brief Get UE sync state + * @param mod_id UE ID + * @return UE sync state + */ +NR_UE_L2_STATE_t nr_ue_get_sync_state(module_id_t mod_id); + void init_RA(NR_UE_MAC_INST_t *mac, NR_PRACH_RESOURCES_t *prach_resources, NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon, @@ -307,7 +311,7 @@ void init_RA(NR_UE_MAC_INST_t *mac, NR_RACH_ConfigDedicated_t *rach_ConfigDedicated); int16_t get_prach_tx_power(NR_UE_MAC_INST_t *mac); - +void free_rach_structures(NR_UE_MAC_INST_t *nr_mac, int bwp_id); void nr_Msg1_transmitted(NR_UE_MAC_INST_t *mac); void nr_Msg3_transmitted(NR_UE_MAC_INST_t *mac, uint8_t CC_id, frame_t frameP, slot_t slotP, uint8_t gNB_id); void nr_get_msg3_payload(NR_UE_MAC_INST_t *mac, uint8_t *buf, int TBS_max); diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index a7185ee7d2..8d13ddfb68 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -79,6 +79,9 @@ void nr_ue_init_mac(NR_UE_MAC_INST_t *mac) memset(&mac->ul_time_alignment, 0, sizeof(mac->ul_time_alignment)); memset(mac->ssb_list, 0, sizeof(mac->ssb_list)); memset(mac->prach_assoc_pattern, 0, sizeof(mac->prach_assoc_pattern)); + + for (int i = 0; i < NR_MAX_SR_ID; i++) + memset(&mac->scheduling_info.sr_info[i], 0, sizeof(mac->scheduling_info.sr_info[i])); } void nr_ue_mac_default_configs(NR_UE_MAC_INST_t *mac) @@ -112,6 +115,12 @@ void nr_ue_reset_sync_state(NR_UE_MAC_INST_t *mac) mac->ra.ra_state = nrRA_UE_IDLE; } +NR_UE_L2_STATE_t nr_ue_get_sync_state(module_id_t mod_id) +{ + NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); + return mac->state; +} + NR_UE_MAC_INST_t *nr_l2_init_ue(int nb_inst) { //init mac here @@ -166,6 +175,8 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac) nr_timer_stop(&nr_mac->ra.contention_resolution_timer); nr_timer_stop(&nr_mac->scheduling_info.sr_DelayTimer); nr_timer_stop(&nr_mac->scheduling_info.retxBSR_Timer); + for (int i = 0; i < NR_MAX_SR_ID; i++) + nr_timer_stop(&nr_mac->scheduling_info.sr_info[i].prohibitTimer); // consider all timeAlignmentTimers as expired and perform the corresponding actions in clause 5.2 // TODO @@ -185,11 +196,10 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac) free_and_zero(nr_mac->ra.Msg3_buffer); // cancel any triggered Scheduling Request procedure - nr_mac->scheduling_info.SR_COUNTER = 0; - nr_mac->scheduling_info.SR_pending = 0; - nr_mac->scheduling_info.sr_ProhibitTimer = 0; - nr_mac->scheduling_info.sr_ProhibitTimer_Running = 0; - nr_mac->scheduling_info.sr_id = -1; // invalid init value + for (int i = 0; i < NR_MAX_SR_ID; i++) { + nr_mac->scheduling_info.sr_info[i].pending = false; + nr_mac->scheduling_info.sr_info[i].counter = 0; + } // cancel any triggered Buffer Status Reporting procedure nr_mac->scheduling_info.BSR_reporting_active = NR_BSR_TRIGGER_NONE; @@ -207,14 +217,6 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac) // release, if any, Temporary C-RNTI nr_mac->ra.t_crnti = 0; - // free RACH structs - for (int i = 0; i < MAX_NUM_BWP_UE; i++) { - free(nr_mac->ssb_list[i].tx_ssb); - for (int j = 0; j < MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD; j++) - for (int k = 0; k < MAX_NB_FRAME_IN_PRACH_CONF_PERIOD; k++) - for (int l = 0; l < MAX_NB_SLOT_IN_FRAME; l++) - free(nr_mac->prach_assoc_pattern[i].prach_conf_period_list[j].prach_occasion_slot_map[k][l].prach_occasion); - } // reset BFI_COUNTER // TODO beam failure procedure not implemented @@ -287,9 +289,26 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac, memset(&mac->ul_time_alignment, 0, sizeof(mac->ul_time_alignment)); } -void reset_ra(RA_config_t *ra) +void free_rach_structures(NR_UE_MAC_INST_t *nr_mac, int bwp_id) { + for (int j = 0; j < MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD; j++) + for (int k = 0; k < MAX_NB_FRAME_IN_PRACH_CONF_PERIOD; k++) + for (int l = 0; l < MAX_NB_SLOT_IN_FRAME; l++) + free(nr_mac->prach_assoc_pattern[bwp_id].prach_conf_period_list[j].prach_occasion_slot_map[k][l].prach_occasion); + + free(nr_mac->ssb_list[bwp_id].tx_ssb); +} + +void reset_ra(NR_UE_MAC_INST_t *nr_mac, NR_UE_MAC_reset_cause_t cause) +{ + RA_config_t *ra = &nr_mac->ra; if(ra->rach_ConfigDedicated) asn1cFreeStruc(asn_DEF_NR_RACH_ConfigDedicated, ra->rach_ConfigDedicated); memset(ra, 0, sizeof(RA_config_t)); + + if (cause == T300_EXPIRY) + return; + + for (int i = 0; i < MAX_NUM_BWP_UE; i++) + free_rach_structures(nr_mac, i); } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 526a406d9c..e89e68f317 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -74,6 +74,7 @@ void init_RA(NR_UE_MAC_INST_t *mac, fapi_nr_config_request_t *cfg = &mac->phy_config.config_req; prach_resources->RA_PREAMBLE_BACKOFF = 0; + AssertFatal(nr_rach_ConfigCommon, "Cannot handle scenario without nr_rach_ConfigCommon\n"); NR_SubcarrierSpacing_t prach_scs = *nr_rach_ConfigCommon->msg1_SubcarrierSpacing; int n_prbs = get_N_RA_RB(prach_scs, mac->current_UL_BWP->scs); int start_prb = rach_ConfigGeneric->msg1_FrequencyStart + mac->current_UL_BWP->BWPStart; @@ -100,12 +101,10 @@ void init_RA(NR_UE_MAC_INST_t *mac, } else { LOG_E(NR_MAC, "Config not handled\n"); } - } else if (nr_rach_ConfigCommon){ + } else { LOG_I(NR_MAC, "Initialization of 4-step contention-based random access procedure\n"); prach_resources->RA_TYPE = RA_4STEP; ra->cfra = 0; - } else { - LOG_E(NR_MAC, "Config not handled\n"); } switch (rach_ConfigGeneric->powerRampingStep){ // in dB diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 3f59d64bd1..5f0bc51e9a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2263,7 +2263,10 @@ bool get_downlink_ack(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, PUCCH_sche bool two_transport_blocks = false; int number_of_code_word = 1; - if (current_DL_BWP && current_DL_BWP->pdsch_Config && current_DL_BWP->pdsch_Config->maxNrofCodeWordsScheduledByDCI && current_DL_BWP->pdsch_Config->maxNrofCodeWordsScheduledByDCI[0] == 2) { + if (current_DL_BWP + && current_DL_BWP->pdsch_Config + && current_DL_BWP->pdsch_Config->maxNrofCodeWordsScheduledByDCI + && current_DL_BWP->pdsch_Config->maxNrofCodeWordsScheduledByDCI[0] == 2) { two_transport_blocks = true; number_of_code_word = 2; } @@ -2400,9 +2403,8 @@ bool get_downlink_ack(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, PUCCH_sche return false; } - NR_PUCCH_Config_t *pucch_Config = current_UL_BWP->pucch_Config; - if (!pucch_Config || !pucch_Config->resourceSetToAddModList - || pucch_Config->resourceSetToAddModList->list.array[0] == NULL) + NR_PUCCH_Config_t *pucch_Config = current_UL_BWP ? current_UL_BWP->pucch_Config : NULL; + if (!(pucch_Config && pucch_Config->resourceSetToAddModList && pucch_Config->resourceSetToAddModList->list.array[0])) configure_initial_pucch(pucch, res_ind); else { int resource_set_id = find_pucch_resource_set(pucch_Config, O_ACK); @@ -2436,80 +2438,80 @@ bool trigger_periodic_scheduling_request(NR_UE_MAC_INST_t *mac, PUCCH_sched_t *p return false; // SR not configured int sr_count = 0; - for (int SR_resource_id =0; SR_resource_id < pucch_Config->schedulingRequestResourceToAddModList->list.count;SR_resource_id++) { - NR_SchedulingRequestResourceConfig_t *SchedulingRequestResourceConfig = pucch_Config->schedulingRequestResourceToAddModList->list.array[SR_resource_id]; + for (int id = 0; id < pucch_Config->schedulingRequestResourceToAddModList->list.count; id++) { + NR_SchedulingRequestResourceConfig_t *sr_Config = pucch_Config->schedulingRequestResourceToAddModList->list.array[id]; int SR_period; int SR_offset; - find_period_offset_SR(SchedulingRequestResourceConfig,&SR_period,&SR_offset); + find_period_offset_SR(sr_Config, &SR_period, &SR_offset); const int n_slots_frame = nr_slots_per_frame[current_UL_BWP->scs]; int sfn_sf = frame * n_slots_frame + slot; if ((sfn_sf - SR_offset) % SR_period == 0) { LOG_D(MAC, "Scheduling Request active in frame %d slot %d \n", frame, slot); - if (!SchedulingRequestResourceConfig->resource) { + if (!sr_Config->resource) { LOG_E(MAC, "No resource associated with SR. SR not scheduled\n"); break; } NR_PUCCH_Resource_t *sr_pucch = - find_pucch_resource_from_list(pucch_Config->resourceToAddModList, *SchedulingRequestResourceConfig->resource); + find_pucch_resource_from_list(pucch_Config->resourceToAddModList, *sr_Config->resource); AssertFatal(sr_pucch != NULL, "Couldn't find PUCCH Resource ID for SR in PUCCH resource list\n"); pucch->pucch_resource = sr_pucch; pucch->n_sr = 1; + /* sr_payload = 1 means that this is a positive SR, sr_payload = 0 means that it is a negative SR */ + pucch->sr_payload = nr_ue_get_SR(mac, frame, slot, sr_Config->schedulingRequestID); sr_count++; + AssertFatal(sr_count < 2, "Cannot handle more than 1 SR per slot yet\n"); } } - AssertFatal(sr_count < 2, "Cannot handle more than 1 SR per slot yet\n"); return sr_count > 0 ? true : false; } -int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slot) +int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frame, slot_t slot, NR_SchedulingRequestId_t sr_id) { // no UL-SCH resources available for this tti && UE has a valid PUCCH resources for SR configuration for this tti NR_UE_SCHEDULING_INFO *si = &mac->scheduling_info; - int max_sr_transmissions = (1 << (2 + si->sr_TransMax)); - LOG_D(NR_MAC, "[UE %d] Frame %d slot %d send SR indication (SR_COUNTER/sr_TransMax %d/%d), SR_pending %d\n", - mac->ue_id, - frameP, - slot, - si->SR_COUNTER, - max_sr_transmissions, - si->SR_pending); // todo - - if ((si->SR_pending == 1) && - (si->SR_COUNTER < max_sr_transmissions)) { - LOG_D(NR_MAC, "[UE %d] Frame %d slot %d PHY asks for SR (SR_COUNTER/sr_TransMax %d/%d), SR_pending %d, increment SR_COUNTER\n", - mac->ue_id, - frameP, - slot, - si->SR_COUNTER, - max_sr_transmissions, - si->SR_pending); // todo - si->SR_COUNTER++; - - // start the sr-prohibittimer : rel 9 and above - if (si->sr_ProhibitTimer > 0) { // timer configured - si->sr_ProhibitTimer--; - si->sr_ProhibitTimer_Running = 1; - } else { - si->sr_ProhibitTimer_Running = 0; - } - //mac->ul_active =1; - return (1); //instruct phy to signal SR - } else { - // notify RRC to relase PUCCH/SRS - // clear any configured dl/ul - // initiate RA - if (si->SR_pending) { - // release all pucch resource - //mac->physicalConfigDedicated = NULL; // todo - //mac->ul_active = 0; // todo - si->BSR_reporting_active = NR_BSR_TRIGGER_NONE; - LOG_I(NR_MAC, "[UE %d] Release all SRs \n", mac->ue_id); - } - si->SR_pending = 0; - si->SR_COUNTER = 0; - return (0); + nr_sr_info_t *sr_info = &si->sr_info[sr_id]; + if (!sr_info->active_SR_ID) { + LOG_E(NR_MAC, "SR triggered for an inactive SR with ID %ld\n", sr_id); + return 0; } + + LOG_D(NR_MAC, "[UE %d] Frame %d slot %d SR %s for ID %ld\n", + mac->ue_id, + frame, + slot, + sr_info->pending ? "pending" : "not pending", + sr_id); // todo + + // TODO check if the PUCCH resource for the SR transmission occasion does not overlap with a UL-SCH resource + if (!sr_info->pending || is_nr_timer_active(sr_info->prohibitTimer)) + return 0; + + if (sr_info->counter < sr_info->maxTransmissions) { + sr_info->counter++; + // start the sr-prohibittimer + nr_timer_start(&sr_info->prohibitTimer); + LOG_D(NR_MAC, "[UE %d] Frame %d slot %d instruct the physical layer to signal the SR (counter/sr_TransMax %d/%d)\n", + mac->ue_id, + frame, + slot, + sr_info->counter, + sr_info->maxTransmissions); + return 1; + } + + // TODO + // notify RRC to release PUCCH for all Serving Cells; + // notify RRC to release SRS for all Serving Cells; + // clear any configured downlink assignments and uplink grants; + // clear any PUSCH resources for semi-persistent CSI reporting; + // initiate a Random Access procedure (see clause 5.1) on the SpCell and cancel all pending SRs. + LOG_E(NR_MAC, "[UE %d] SR not served. Triggering of new RA procedure not implemented yet.\n", mac->ue_id); + sr_info->pending = false; + sr_info->counter = 0; + nr_timer_stop(&sr_info->prohibitTimer); + + return 0; } // section 5.2.5 of 38.214 @@ -3731,13 +3733,10 @@ int nr_write_ce_ulsch_pdu(uint8_t *mac_ce, LOG_D(NR_MAC, "[UE] Generating ULSCH PDU : long_bsr size %d Lcgbit 0x%02x Buffer_size %d %d %d %d %d %d %d %d\n", mac_ce_size, *((uint8_t*) mac_ce), ((NR_BSR_LONG *) mac_ce)->Buffer_size0, ((NR_BSR_LONG *) mac_ce)->Buffer_size1, ((NR_BSR_LONG *) mac_ce)->Buffer_size2, ((NR_BSR_LONG *) mac_ce)->Buffer_size3, ((NR_BSR_LONG *) mac_ce)->Buffer_size4, ((NR_BSR_LONG *) mac_ce)->Buffer_size5, ((NR_BSR_LONG *) mac_ce)->Buffer_size6, ((NR_BSR_LONG *) mac_ce)->Buffer_size7); - // update pointer and length - mac_ce = Buffer_size_ptr; mac_ce_len += mac_ce_size + sizeof(NR_MAC_SUBHEADER_SHORT); } return mac_ce_len; - } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures_sl.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures_sl.c index d514558b3e..c485461e56 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures_sl.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures_sl.c @@ -510,13 +510,15 @@ uint8_t sl_determine_sci_1a_len(uint16_t *num_subchannels, ? *pscch_config->sl_NumReservedBits_r16 : 0; } - AssertFatal((num_reservedbits>=2) || (num_reservedbits<=4) , - "Num Reserved bits can only be 2or3or4. Resource Pool Configuration Error.\n"); + AssertFatal((num_reservedbits >= 2) && (num_reservedbits <= 4), + "Num Reserved bits can only be 2 or 3 or 4. Resource Pool Configuration Error.\n"); sci_1a_len += num_reservedbits; sci_1a->reserved_bits.nbits = num_reservedbits; - LOG_D(NR_MAC,"sci 1A - reserved_bits:%d, sci 1a len:%d, sci_1a->reserved_bits.nbits:%d\n", - num_reservedbits, sci_1a_len, sci_1a->reserved_bits.nbits); - + LOG_D(NR_MAC, + "sci 1A - reserved_bits:%d, sci 1a len:%d, sci_1a->reserved_bits.nbits:%d\n", + num_reservedbits, + sci_1a_len, + sci_1a->reserved_bits.nbits); LOG_D(NR_MAC,"sci 1A Length in bits: %d \n",sci_1a_len); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 1e92d08344..8c9062d8ec 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -133,6 +133,8 @@ static void trigger_regular_bsr(NR_UE_MAC_INST_t *mac, NR_LogicalChannelIdentity void update_mac_timers(NR_UE_MAC_INST_t *mac) { nr_timer_tick(&mac->ra.contention_resolution_timer); + for (int j = 0; j < NR_MAX_SR_ID; j++) + nr_timer_tick(&mac->scheduling_info.sr_info[j].prohibitTimer); nr_timer_tick(&mac->scheduling_info.sr_DelayTimer); bool retxBSR_expired = nr_timer_tick(&mac->scheduling_info.retxBSR_Timer); if (retxBSR_expired) { @@ -624,11 +626,11 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, /* Transform precoding */ pusch_config_pdu->transform_precoding = get_transformPrecoding(current_UL_BWP, dci_format, 0); + bool tp_enabled = pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled; /*DCI format-related configuration*/ if (dci_format == NR_UL_DCI_FORMAT_0_0) { - if ((pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_disabled) && - pusch_config_pdu->nr_of_symbols < 3) + if (!tp_enabled && pusch_config_pdu->nr_of_symbols < 3) pusch_config_pdu->num_dmrs_cdm_grps_no_data = 1; else pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2; @@ -651,7 +653,8 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->scid = 0; pusch_config_pdu->data_scrambling_id = mac->physCellId; - if (pusch_Config->dataScramblingIdentityPUSCH + if (pusch_Config + && pusch_Config->dataScramblingIdentityPUSCH && rnti_type == TYPE_C_RNTI_ && !(dci_format == NR_UL_DCI_FORMAT_0_0 && ss_type == NR_SearchSpace__searchSpaceType_PR_common)) pusch_config_pdu->data_scrambling_id = *pusch_Config->dataScramblingIdentityPUSCH; @@ -661,7 +664,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->scid = dci->dmrs_sequence_initialization.val; /* TRANSFORM PRECODING ------------------------------------------------------------------------------------------*/ - if (pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled) { + if (tp_enabled) { uint32_t n_RS_Id = 0; if (NR_DMRS_ulconfig->transformPrecodingEnabled && @@ -710,8 +713,8 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, } /* FREQ_HOPPING_FLAG */ - if ((pusch_Config != NULL) - && (pusch_Config->frequencyHopping != NULL) + if (pusch_Config + && pusch_Config->frequencyHopping && (pusch_Config->resourceAllocation != NR_PUSCH_Config__resourceAllocation_resourceAllocationType0)) { pusch_config_pdu->frequency_hopping = dci->frequency_hopping_flag.val; } @@ -720,8 +723,9 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->mcs_index = dci->mcs; /* MCS TABLE */ - pusch_config_pdu->mcs_table = get_pusch_mcs_table(pusch_Config ? pusch_Config->mcs_TableTransformPrecoder : NULL, - pusch_config_pdu->transform_precoding != NR_PUSCH_Config__transformPrecoder_disabled, + long *mcs_table_config = pusch_Config ? (tp_enabled ? pusch_Config->mcs_TableTransformPrecoder : pusch_Config->mcs_Table) : NULL; + pusch_config_pdu->mcs_table = get_pusch_mcs_table(mcs_table_config, + tp_enabled, dci_format, rnti_type, ss_type, @@ -792,7 +796,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, /* PTRS */ if (pusch_Config && pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB && pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS) { - if (pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_disabled) { + if (!tp_enabled) { nfapi_nr_ue_ptrs_ports_t ptrs_ports_list; pusch_config_pdu->pusch_ptrs.ptrs_ports_list = &ptrs_ports_list; bool valid_ptrs_setup = set_ul_ptrs_values(pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup, @@ -1084,7 +1088,7 @@ void nr_ue_dl_scheduler(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info dl_config->slot = rx_slot; dl_config->number_pdus = 0; - if (mac->state == UE_NOT_SYNC) + if (mac->state == UE_NOT_SYNC || mac->state == UE_DETACHING) return; ue_dci_configuration(mac, dl_config, rx_frame, rx_slot); @@ -1107,9 +1111,31 @@ void nr_ue_dl_scheduler(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info LOG_E(NR_MAC, "Internal error, no scheduled_response function\n"); } -static void nr_trigger_sr(NR_UE_MAC_INST_t *mac) +static void nr_update_sr(NR_UE_MAC_INST_t *mac) { NR_UE_SCHEDULING_INFO *sched_info = &mac->scheduling_info; + + // if no pending data available for transmission + // All pending SR(s) shall be cancelled and each respective sr-ProhibitTimer shall be stopped + bool data_avail = false; + for (int i = 0; i < NR_MAX_NUM_LCID; i++) { + if (sched_info->lc_sched_info[i].LCID_buffer_remain > 0) { + data_avail = true; + break; + } + } + if (!data_avail) { + for (int i = 0; i < NR_MAX_SR_ID; i++) { + nr_sr_info_t *sr = &sched_info->sr_info[i]; + if (sr->active_SR_ID) { + LOG_D(NR_MAC, "No pending data available -> Canceling pending SRs\n"); + sr->pending = false; + sr->counter = 0; + nr_timer_stop(&sr->prohibitTimer); + } + } + } + // if a Regular BSR has been triggered and logicalChannelSR-DelayTimer is not running if (((sched_info->BSR_reporting_active & NR_BSR_TRIGGER_REGULAR) == 0) || is_nr_timer_active(sched_info->sr_DelayTimer)) @@ -1128,7 +1154,18 @@ static void nr_trigger_sr(NR_UE_MAC_INST_t *mac) // TODO not implemented // trigger SR - sched_info->SR_pending = 1; + if (lc_info->sr_id < 0 || lc_info->sr_id >= NR_MAX_SR_ID) + LOG_E(NR_MAC, "No SR corresponding to this LCID\n"); // TODO not sure what to do here + else { + nr_sr_info_t *sr = &sched_info->sr_info[lc_info->sr_id]; + if (!sr->pending) { + LOG_D(NR_MAC, "Triggering SR for ID %d\n", lc_info->sr_id); + sr->pending = true; + sr->counter = 0; + // TODO initiate a Random Access procedure on the SpCell and cancel the pending SR + // if the MAC entity has no valid PUCCH resource configured for the pending SR + } + } } static void nr_update_bsr(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slotP, uint8_t gNB_index) @@ -1206,7 +1243,7 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info) uint32_t gNB_index = ul_info->gNB_index; RA_config_t *ra = &mac->ra; - if(mac->state < UE_CONNECTED) { + if(mac->state > UE_NOT_SYNC && mac->state < UE_CONNECTED) { nr_ue_get_rach(mac, cc_id, frame_tx, gNB_index, slot_tx); nr_ue_prach_scheduler(mac, frame_tx, slot_tx); } @@ -1287,38 +1324,35 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info) } if(mac->state == UE_CONNECTED) - nr_trigger_sr(mac); + nr_update_sr(mac); // update Bj for all active lcids before LCP procedure - LOG_D(NR_MAC, "====================[Frame %d][Slot %d]Logical Channel Prioritization===========\n", frame_tx, slot_tx); - for (int i = 0; i < mac->lc_ordered_list.count; i++) { - nr_lcordered_info_t *lc_info = mac->lc_ordered_list.array[i]; - int lcid = lc_info->lcid; - // max amount of data that can be buffered/accumulated in a logical channel buffer - uint32_t bucketSize_max = lc_info->bucket_size; - - /* - measure Bj - increment the value of Bj by product PBR * T - */ - NR_LC_SCHEDULING_INFO *sched_info = get_scheduling_info_from_lcid(mac, lcid); - int32_t bj = sched_info->Bj; - if (lc_info->pbr < UINT_MAX) { - uint32_t slots_elapsed = nr_timer_elapsed_time(sched_info->Bj_timer); // slots elapsed since Bj was last incremented - // it is safe to divide by 1k since pbr in lc_info is computed multiplying by 1000 the RRC value to convert kB/s to B/s - uint32_t pbr_ms = lc_info->pbr / 1000; - bj += ((pbr_ms * slots_elapsed) >> mac->current_UL_BWP->scs); // each slot length is 1/scs ms + if (mac->current_UL_BWP) { + LOG_D(NR_MAC, "%4d.%2d Logical Channel Prioritization\n", frame_tx, slot_tx); + for (int i = 0; i < mac->lc_ordered_list.count; i++) { + nr_lcordered_info_t *lc_info = mac->lc_ordered_list.array[i]; + int lcid = lc_info->lcid; + // max amount of data that can be buffered/accumulated in a logical channel buffer + uint32_t bucketSize_max = lc_info->bucket_size; + // measure Bj increment the value of Bj by product PBR * T + NR_LC_SCHEDULING_INFO *sched_info = get_scheduling_info_from_lcid(mac, lcid); + int32_t bj = sched_info->Bj; + if (lc_info->pbr < UINT_MAX) { + uint32_t slots_elapsed = nr_timer_elapsed_time(sched_info->Bj_timer); // slots elapsed since Bj was last incremented + // it is safe to divide by 1k since pbr in lc_info is computed multiplying by 1000 the RRC value to convert kB/s to B/s + uint32_t pbr_ms = lc_info->pbr / 1000; + bj += ((pbr_ms * slots_elapsed) >> mac->current_UL_BWP->scs); // each slot length is 1/scs ms + } + else + bj = INT_MAX; + // bj > max bucket size, set bj to max bucket size, as in ts38.321 5.4.3.1 Logical Channel Prioritization + sched_info->Bj = min(bj, bucketSize_max); + // reset bj timer + nr_timer_start(&sched_info->Bj_timer); } - else - bj = INT_MAX; - - // bj > max bucket size, set bj to max bucket size, as in ts38.321 5.4.3.1 Logical Channel Prioritization - sched_info->Bj = min(bj, bucketSize_max); - // reset bj timer - nr_timer_start(&sched_info->Bj_timer); } - if(mac->state >= UE_PERFORMING_RA) + if(mac->state >= UE_PERFORMING_RA && mac->state < UE_DETACHING) nr_ue_pucch_scheduler(mac, frame_tx, slot_tx, ul_info->phy_data); } @@ -1917,6 +1951,7 @@ void build_ssb_to_ro_map(NR_UE_MAC_INST_t *mac) { // Clear all the lists and maps const int bwp_id = mac->current_UL_BWP->bwp_id; + free_rach_structures(mac, bwp_id); memset(&mac->ssb_list[bwp_id], 0, sizeof(ssb_list_info_t)); memset(&mac->prach_assoc_pattern[bwp_id], 0, sizeof(prach_association_pattern_t)); @@ -1946,8 +1981,7 @@ void nr_ue_pucch_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, int slotP, voi // SR if (mac->state == UE_CONNECTED && trigger_periodic_scheduling_request(mac, &pucch[0], frameP, slotP)) { num_res++; - /* sr_payload = 1 means that this is a positive SR, sr_payload = 0 means that it is a negative SR */ - pucch[0].sr_payload = nr_ue_get_SR(mac, frameP, slotP); + // TODO check if the PUCCH resource for the SR transmission occasion overlap with a UL-SCH resource } // CSI @@ -2533,10 +2567,8 @@ static int nr_ue_get_sdu_mac_ce_pre(NR_UE_MAC_INST_t *mac, bsr_t */ static void nr_ue_get_sdu_mac_ce_post(NR_UE_MAC_INST_t *mac, - int CC_id, frame_t frame, slot_t slot, - uint8_t gNB_index, uint8_t *ulsch_buffer, uint16_t buflen, NR_UE_MAC_CE_INFO *mac_ce_p) @@ -2675,18 +2707,15 @@ static void nr_ue_get_sdu_mac_ce_post(NR_UE_MAC_INST_t *mac, } } - LOG_D(NR_MAC, "[UE %d][SR] Gave SDU to PHY, clearing any scheduling request\n", mac->ue_id); - sched_info->SR_pending = 0; - sched_info->SR_COUNTER = 0; - /* Actions when a BSR is sent */ if (mac_ce_p->bsr_ce_len) { LOG_D(NR_MAC, - "[UE %d] MAC BSR Sent !! bsr (ce%d,hdr%d) buff_len %d\n", + "[UE %d] MAC BSR Sent! ce %d, hdr %d buff_len %d triggering LCID %ld\n", mac->ue_id, mac_ce_p->bsr_ce_len, mac_ce_p->bsr_header_len, - buflen); + buflen, + sched_info->regularBSR_trigger_lcid); // Reset ReTx BSR Timer nr_timer_start(&sched_info->retxBSR_Timer); // Reset Periodic Timer except when BSR is truncated @@ -2695,8 +2724,20 @@ static void nr_ue_get_sdu_mac_ce_post(NR_UE_MAC_INST_t *mac, LOG_D(NR_MAC, "[UE %d] MAC Periodic BSR Timer Reset\n", mac->ue_id); } + if (sched_info->regularBSR_trigger_lcid > 0) { + nr_lcordered_info_t *lc_info = get_lc_info_from_lcid(mac, sched_info->regularBSR_trigger_lcid); + AssertFatal(lc_info, "Couldn't find logical channel with LCID %ld\n", sched_info->regularBSR_trigger_lcid); + if (lc_info->sr_id >= 0 && lc_info->sr_id < NR_MAX_SR_ID) { + LOG_D(NR_MAC, "[UE %d][SR] Gave SDU to PHY, clearing scheduling request with ID %d\n", mac->ue_id, lc_info->sr_id); + nr_sr_info_t *sr = &sched_info->sr_info[lc_info->sr_id]; + sr->pending = false; + sr->counter = 0; + nr_timer_stop(&sr->prohibitTimer); + } + } // Reset BSR Trigger flags sched_info->BSR_reporting_active = NR_BSR_TRIGGER_NONE; + sched_info->regularBSR_trigger_lcid = 0; } } @@ -3079,12 +3120,14 @@ uint8_t nr_ue_get_sdu(NR_UE_MAC_INST_t *mac, //nr_ue_get_sdu_mac_ce_post recalculates all mac_ce related header fields since buffer has been changed after mac_rlc_data_req. //Also, BSR padding is handled here after knowing mac_ce_p->sdu_length_total. - nr_ue_get_sdu_mac_ce_post(mac, CC_id, frame, slot, gNB_index, ulsch_buffer, buflen, mac_ce_p); + nr_ue_get_sdu_mac_ce_post(mac, frame, slot, ulsch_buffer, buflen, mac_ce_p); if (mac_ce_p->tot_mac_ce_len > 0) { LOG_D(NR_MAC, "In %s copying %d bytes of MAC CEs to the UL PDU \n", __FUNCTION__, mac_ce_p->tot_mac_ce_len); - nr_write_ce_ulsch_pdu(pdu, mac, 0, NULL, mac_ce_p->bsr_t, mac_ce_p->bsr_s, mac_ce_p->bsr_l); + int size = nr_write_ce_ulsch_pdu(pdu, mac, 0, NULL, mac_ce_p->bsr_t, mac_ce_p->bsr_s, mac_ce_p->bsr_l); + if (size != mac_ce_p->tot_mac_ce_len) + LOG_E(NR_MAC, "MAC CE size computed by nr_write_ce_ulsch_pdu is %d while the one assumed before is %d\n", size, mac_ce_p->tot_mac_ce_len); pdu += (unsigned char) mac_ce_p->tot_mac_ce_len; #ifdef ENABLE_MAC_PAYLOAD_DEBUG diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 4c84d88680..1cca125300 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -652,7 +652,7 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP, // generation of DCI 0_0 to schedule msg3 retransmission NR_SearchSpace_t *ss = ra->ra_ss; NR_ControlResourceSet_t *coreset = ra->coreset; - AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg3 retransmission\n"); + AssertFatal(coreset, "Coreset cannot be null for RA-Msg3 retransmission\n"); const int coresetid = coreset->controlResourceSetId; nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][coresetid]; @@ -1251,7 +1251,7 @@ static void nr_generate_Msg2(module_id_t module_idP, } NR_ControlResourceSet_t *coreset = ra->coreset; - AssertFatal(coreset != NULL, "Coreset cannot be null for RA-Msg2\n"); + AssertFatal(coreset, "Coreset cannot be null for RA-Msg2\n"); const int coresetid = coreset->controlResourceSetId; // Calculate number of symbols int time_domain_assignment = get_dl_tda(nr_mac, scc, slotP); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 20e8a6d624..e617184edd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -1071,9 +1071,8 @@ void nr_schedule_ue_spec(module_id_t module_id, if (nr_get_code_rate_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx) != R) { pdsch_pdu->mcsTable[0] = 0; } - AssertFatal(harq!=NULL,"harq is null\n"); - AssertFatal(harq->rounddl_bler.harq_round_max,"%d",harq->round); - pdsch_pdu->rvIndex[0] = nr_rv_round_map[harq->round%4]; + AssertFatal(harq->round < gNB_mac->dl_bler.harq_round_max,"%d", harq->round); + pdsch_pdu->rvIndex[0] = nr_rv_round_map[harq->round % 4]; pdsch_pdu->TBSize[0] = TBS; pdsch_pdu->dataScramblingId = *scc->physCellId; pdsch_pdu->nrOfLayers = nrOfLayers; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index ada64a4189..fa3e8f9e15 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -954,10 +954,10 @@ static uint8_t get_max_tpmi(const NR_PUSCH_Config_t *pusch_Config, { uint8_t max_tpmi = 0; - if ((pusch_Config && pusch_Config->txConfig != NULL && *pusch_Config->txConfig == NR_PUSCH_Config__txConfig_nonCodebook) || - num_ue_srs_ports == 1) { + if (!pusch_Config + || (pusch_Config->txConfig != NULL && *pusch_Config->txConfig == NR_PUSCH_Config__txConfig_nonCodebook) + || num_ue_srs_ports == 1) return max_tpmi; - } long max_rank = *pusch_Config->maxRank; long *ul_FullPowerTransmission = pusch_Config->ext1 ? pusch_Config->ext1->ul_FullPowerTransmission_r16 : NULL; @@ -1963,7 +1963,7 @@ static bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_ const NR_SIB1_t *sib1 = nr_mac->common_channels[0].sib1 ? nr_mac->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL; NR_ServingCellConfigCommonSIB_t *scc_sib1 = sib1 ? sib1->servingCellConfigCommon : NULL; - AssertFatal(scc!=NULL || scc_sib1!=NULL,"We need one serving cell config common\n"); + AssertFatal(scc || scc_sib1, "We need one serving cell config common\n"); // no UEs if (nr_mac->UE_info.list[0] == NULL) diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index f0d5b7ce18..2f1a05370e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -260,7 +260,7 @@ static int handle_ue_context_drbs_release(int rnti, newGtpuDeleteOneTunnel(f1inst, rnti, drb->rb_id); asn_sequence_del(&cellGroupConfig->rlc_BearerToAddModList->list, idx, 1); long *plcid = malloc(sizeof(*plcid)); - AssertFatal(plcid != NULL, "out of memory\n"); + AssertFatal(plcid, "out of memory\n"); *plcid = lcid; int ret = ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToReleaseList->list, plcid); DevAssert(ret == 0); @@ -392,7 +392,7 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req) NR_SCHED_LOCK(&mac->sched_lock); NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, req->gNB_DU_ue_id); - AssertFatal(UE != NULL, "did not find UE with RNTI %04x, but UE Context Setup Failed not implemented\n", req->gNB_DU_ue_id); + AssertFatal(UE, "did not find UE with RNTI %04x, but UE Context Setup Failed not implemented\n", req->gNB_DU_ue_id); NR_CellGroupConfig_t *new_CellGroup = clone_CellGroupConfig(UE->CellGroup); diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c index bcf7c26ae6..d3320c9ac2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c @@ -45,17 +45,17 @@ static void f1_setup_request_direct(const f1ap_setup_req_t *req) if (req->cell[n].sys_info) { f1ap_gnb_du_system_info_t *orig_sys_info = req->cell[n].sys_info; f1ap_gnb_du_system_info_t *copy_sys_info = calloc(1, sizeof(*copy_sys_info)); - AssertFatal(copy_sys_info != NULL, "out of memory\n"); + AssertFatal(copy_sys_info, "out of memory\n"); f1ap_msg->cell[n].sys_info = copy_sys_info; copy_sys_info->mib = calloc(orig_sys_info->mib_length, sizeof(uint8_t)); - AssertFatal(copy_sys_info->mib != NULL, "out of memory\n"); + AssertFatal(copy_sys_info->mib, "out of memory\n"); memcpy(copy_sys_info->mib, orig_sys_info->mib, orig_sys_info->mib_length); copy_sys_info->mib_length = orig_sys_info->mib_length; if (orig_sys_info->sib1_length > 0) { copy_sys_info->sib1 = calloc(orig_sys_info->sib1_length, sizeof(uint8_t)); - AssertFatal(copy_sys_info->sib1 != NULL, "out of memory\n"); + AssertFatal(copy_sys_info->sib1, "out of memory\n"); memcpy(copy_sys_info->sib1, orig_sys_info->sib1, orig_sys_info->sib1_length); copy_sys_info->sib1_length = orig_sys_info->sib1_length; } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c index fea829f61e..e4fb8b8f0f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c @@ -29,7 +29,7 @@ #include "mac_rrc_ul.h" -static f1ap_net_config_t read_DU_IP_config(const eth_params_t* f1_params) +static f1ap_net_config_t read_DU_IP_config(const eth_params_t* f1_params, const char *f1u_ip_addr) { f1ap_net_config_t nc = {0}; @@ -37,19 +37,17 @@ static f1ap_net_config_t read_DU_IP_config(const eth_params_t* f1_params) nc.CU_f1_ip_address.ipv4 = 1; strcpy(nc.CU_f1_ip_address.ipv4_address, f1_params->remote_addr); nc.CUport = f1_params->remote_portd; - LOG_I(GNB_APP, - "FIAP: CU_ip4_address in DU %p, strlen %d\n", - nc.CU_f1_ip_address.ipv4_address, - (int)strlen(f1_params->remote_addr)); - nc.DU_f1_ip_address.ipv6 = 0; - nc.DU_f1_ip_address.ipv4 = 1; - strcpy(nc.DU_f1_ip_address.ipv4_address, f1_params->my_addr); + nc.DU_f1c_ip_address.ipv6 = 0; + nc.DU_f1c_ip_address.ipv4 = 1; + strcpy(nc.DU_f1c_ip_address.ipv4_address, f1_params->my_addr); + nc.DU_f1u_ip_address = strdup(f1u_ip_addr); nc.DUport = f1_params->my_portd; - LOG_I(GNB_APP, - "FIAP: DU_ip4_address in DU %p, strlen %ld\n", - nc.DU_f1_ip_address.ipv4_address, - strlen(f1_params->my_addr)); + LOG_I(F1AP, + "F1-C DU IPaddr %s, connect to F1-C CU %s, binding GTP to %s\n", + nc.DU_f1c_ip_address.ipv4_address, + nc.CU_f1_ip_address.ipv4_address, + nc.DU_f1u_ip_address); // sctp_in_streams/sctp_out_streams are given by SCTP layer return nc; @@ -77,17 +75,17 @@ static void f1_setup_request_f1ap(const f1ap_setup_req_t *req) if (req->cell[n].sys_info) { f1ap_gnb_du_system_info_t *orig_sys_info = req->cell[n].sys_info; f1ap_gnb_du_system_info_t *copy_sys_info = calloc(1, sizeof(*copy_sys_info)); - AssertFatal(copy_sys_info != NULL, "out of memory\n"); + AssertFatal(copy_sys_info, "out of memory\n"); f1ap_setup->cell[n].sys_info = copy_sys_info; copy_sys_info->mib = calloc(orig_sys_info->mib_length, sizeof(uint8_t)); - AssertFatal(copy_sys_info->mib != NULL, "out of memory\n"); + AssertFatal(copy_sys_info->mib, "out of memory\n"); memcpy(copy_sys_info->mib, orig_sys_info->mib, orig_sys_info->mib_length); copy_sys_info->mib_length = orig_sys_info->mib_length; if (orig_sys_info->sib1_length > 0) { copy_sys_info->sib1 = calloc(orig_sys_info->sib1_length, sizeof(uint8_t)); - AssertFatal(copy_sys_info->sib1 != NULL, "out of memory\n"); + AssertFatal(copy_sys_info->sib1, "out of memory\n"); memcpy(copy_sys_info->sib1, orig_sys_info->sib1, orig_sys_info->sib1_length); copy_sys_info->sib1_length = orig_sys_info->sib1_length; } @@ -95,7 +93,7 @@ static void f1_setup_request_f1ap(const f1ap_setup_req_t *req) } memcpy(f1ap_setup->rrc_ver, req->rrc_ver, sizeof(req->rrc_ver)); - F1AP_DU_REGISTER_REQ(msg).net_config = read_DU_IP_config(&RC.nrmac[0]->eth_params_n); + F1AP_DU_REGISTER_REQ(msg).net_config = read_DU_IP_config(&RC.nrmac[0]->eth_params_n, RC.nrmac[0]->f1u_addr); itti_send_msg_to_task(TASK_DU_F1, 0, msg); } diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index e162ecbff5..398372e85b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -723,6 +723,8 @@ typedef struct f1_config_t { typedef struct gNB_MAC_INST_s { /// Ethernet parameters for northbound midhaul interface eth_params_t eth_params_n; + /// address for F1U to bind, ports in eth_params_n + char *f1u_addr; /// Ethernet parameters for fronthaul interface eth_params_t eth_params_s; /// Module diff --git a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c index e18c8eddfb..cc10a9d7c3 100644 --- a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c +++ b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c @@ -116,7 +116,7 @@ static int drb_gtpu_create(instance_t instance, static instance_t get_n3_gtp_instance(void) { const e1ap_upcp_inst_t *inst = getCxtE1(0); - AssertFatal(inst != NULL, "need to have E1 instance\n"); + AssertFatal(inst, "need to have E1 instance\n"); return inst->gtpInstN3; } diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c index 45133dc2f4..497ed154d5 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c @@ -36,7 +36,7 @@ void *nr_pdcp_integrity_nia2_init(uint8_t integrity_key[16]) // No. The overhead is x8 times more. Don't change before measuring // return integrity_key; cbc_cmac_ctx_t* ctx = calloc(1, sizeof(cbc_cmac_ctx_t)); - AssertFatal(ctx != NULL, "Memory exhausted"); + AssertFatal(ctx, "Memory exhausted"); *ctx = init_aes_128_cbc_cmac(integrity_key); return ctx; diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index b12142a881..55d245dd38 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -962,7 +962,7 @@ void nr_rlc_activate_srb0(int ue_id, void (*send_initial_ul_rrc_message)(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data)) { struct srb0_data *srb0_data = calloc(1, sizeof(struct srb0_data)); - AssertFatal(srb0_data != NULL, "out of memory\n"); + AssertFatal(srb0_data, "out of memory\n"); srb0_data->ue_id = ue_id; srb0_data->data = data; diff --git a/openair2/M2AP/m2ap_MCE.c b/openair2/M2AP/m2ap_MCE.c index 4a69e0c6d3..f3d2fb2e7a 100644 --- a/openair2/M2AP/m2ap_MCE.c +++ b/openair2/M2AP/m2ap_MCE.c @@ -227,29 +227,16 @@ int m2ap_MCE_init_sctp (m2ap_MCE_instance_t *instance_p, net_ip_address_t *local_ip_addr, uint32_t mce_port_for_M2C) { // Create and alloc new message - MessageDef *message; - sctp_init_t *sctp_init = NULL; DevAssert(instance_p != NULL); DevAssert(local_ip_addr != NULL); - message = itti_alloc_new_message (TASK_M2AP_MCE, 0, SCTP_INIT_MSG_MULTI_REQ); - sctp_init = &message->ittiMsg.sctp_init_multi; + size_t addr_len = strlen(local_ip_addr->ipv4_address) + 1; + MessageDef *message = itti_alloc_new_message_sized(TASK_M2AP_MCE, 0, SCTP_INIT_MSG_MULTI_REQ, sizeof(sctp_init_t) + addr_len); + sctp_init_t *sctp_init = &message->ittiMsg.sctp_init_multi; sctp_init->port = mce_port_for_M2C; sctp_init->ppid = M2AP_SCTP_PPID; - sctp_init->ipv4 = 1; - sctp_init->ipv6 = 0; - sctp_init->nb_ipv4_addr = 1; -#if 0 - memcpy(&sctp_init->ipv4_address, - local_ip_addr, - sizeof(*local_ip_addr)); -#endif - sctp_init->ipv4_address[0] = inet_addr(local_ip_addr->ipv4_address); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - sctp_init->nb_ipv6_addr = 0; - sctp_init->ipv6_address[0] = "0:0:0:0:0:0:0:1"; + char *addr_buf = (char *) (sctp_init + 1); + sctp_init->bind_address = addr_buf; + memcpy(addr_buf, local_ip_addr->ipv4_address, addr_len); return itti_send_msg_to_task (TASK_SCTP, instance_p->instance, message); } @@ -502,41 +489,16 @@ void MCE_task_send_sctp_init_req(instance_t enb_id, m2ap_mce_sctp_req_t * m2ap_m // 2. use RC.rrc[enb_id] to fill the sctp_init_t with the ip, port // 3. creat an itti message to init - LOG_I(M2AP, "M2AP_SCTP_REQ(create socket)\n"); - MessageDef *message_p = NULL; - - message_p = itti_alloc_new_message (TASK_M2AP_MCE, 0, SCTP_INIT_MSG); - - // if( m2ap_mce_sctp_req == NULL ){ - // message_p->ittiMsg.sctp_init.port = M2AP_PORT_NUMBER; - // message_p->ittiMsg.sctp_init.ppid = M2AP_SCTP_PPID; - // message_p->ittiMsg.sctp_init.ipv4 = 1; - // message_p->ittiMsg.sctp_init.ipv6 = 0; - // message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1; - // //message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.rrc[enb_id]->eth_params_s.my_addr); - // message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr("127.0.0.7"); - // /* - // * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - // * * * * Disable it for now. - // */ - // message_p->ittiMsg.sctp_init.nb_ipv6_addr = 0; - // message_p->ittiMsg.sctp_init.ipv6_address[0] = "0:0:0:0:0:0:0:1"; - // }else{ - message_p->ittiMsg.sctp_init.port = m2ap_mce_sctp_req->mce_port_for_M2C; - message_p->ittiMsg.sctp_init.ppid = M2AP_SCTP_PPID; - message_p->ittiMsg.sctp_init.ipv4 = 1; - message_p->ittiMsg.sctp_init.ipv6 = 0; - message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1; - //message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.rrc[enb_id]->eth_params_s.my_addr); - message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(m2ap_mce_sctp_req->mce_m2_ip_address.ipv4_address); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - message_p->ittiMsg.sctp_init.nb_ipv6_addr = 0; - message_p->ittiMsg.sctp_init.ipv6_address[0] = "0:0:0:0:0:0:0:1"; - // } + size_t addr_len = strlen(m2ap_mce_sctp_req->mce_m2_ip_address.ipv4_address) + 1; + LOG_I(M2AP, "M2AP_SCTP_REQ(create socket) for %s len %ld\n", m2ap_mce_sctp_req->mce_m2_ip_address.ipv4_address, addr_len); + MessageDef *message_p = itti_alloc_new_message_sized (TASK_M2AP_MCE, 0, SCTP_INIT_MSG, sizeof(sctp_init_t) + addr_len); + sctp_init_t *init = &SCTP_INIT_MSG(message_p); + init->port = m2ap_mce_sctp_req->mce_port_for_M2C; + init->ppid = M2AP_SCTP_PPID; + char *addr_buf = (char *) (init + 1); // address after ITTI message end, allocated above + init->bind_address = addr_buf; + memcpy(addr_buf, m2ap_mce_sctp_req->mce_m2_ip_address.ipv4_address, addr_len); itti_send_msg_to_task(TASK_SCTP, enb_id, message_p); } diff --git a/openair2/M2AP/m2ap_eNB.c b/openair2/M2AP/m2ap_eNB.c index 4f17dbbb5a..c492778603 100644 --- a/openair2/M2AP/m2ap_eNB.c +++ b/openair2/M2AP/m2ap_eNB.c @@ -229,29 +229,16 @@ int m2ap_eNB_init_sctp (m2ap_eNB_instance_t *instance_p, net_ip_address_t *local_ip_addr, uint32_t enb_port_for_M2C) { // Create and alloc new message - MessageDef *message; - sctp_init_t *sctp_init = NULL; DevAssert(instance_p != NULL); DevAssert(local_ip_addr != NULL); - message = itti_alloc_new_message (TASK_M2AP_ENB, 0, SCTP_INIT_MSG_MULTI_REQ); - sctp_init = &message->ittiMsg.sctp_init_multi; + size_t addr_len = strlen(local_ip_addr->ipv4_address) + 1; + MessageDef *message = itti_alloc_new_message_sized(TASK_M2AP_ENB, 0, SCTP_INIT_MSG_MULTI_REQ, sizeof(sctp_init_t) + addr_len); + sctp_init_t *sctp_init = &message->ittiMsg.sctp_init_multi; sctp_init->port = enb_port_for_M2C; sctp_init->ppid = M2AP_SCTP_PPID; - sctp_init->ipv4 = 1; - sctp_init->ipv6 = 0; - sctp_init->nb_ipv4_addr = 1; -#if 0 - memcpy(&sctp_init->ipv4_address, - local_ip_addr, - sizeof(*local_ip_addr)); -#endif - sctp_init->ipv4_address[0] = inet_addr(local_ip_addr->ipv4_address); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - sctp_init->nb_ipv6_addr = 0; - sctp_init->ipv6_address[0] = "0:0:0:0:0:0:0:1"; + char *addr_buf = (char *) (sctp_init + 1); + sctp_init->bind_address = addr_buf; + memcpy(addr_buf, local_ip_addr->ipv4_address, addr_len); return itti_send_msg_to_task (TASK_SCTP, instance_p->instance, message); } diff --git a/openair2/MCE_APP/mce_config.c b/openair2/MCE_APP/mce_config.c index 1afbf2d90a..d958bcea5f 100644 --- a/openair2/MCE_APP/mce_config.c +++ b/openair2/MCE_APP/mce_config.c @@ -60,9 +60,6 @@ int RCconfig_MCE(void ) { //int num_enbs = 0; - //char *enb_interface_name_for_S1U = NULL; - char *mce_interface_name_for_m2_enb = NULL; - char *mce_interface_name_for_m3_mme = NULL; //char *enb_ipv4_address_for_S1U = NULL; char *mce_ipv4_address_for_m2c = NULL; char *mce_ipv4_address_for_m3c = NULL; @@ -93,11 +90,9 @@ int RCconfig_MCE(void ) { //LOG_W(MCE_APP,"cidr %s\n",cidr); //LOG_W(MCE_APP,"address %s\n",address); - //LOG_W(MCE_APP,"mce_interface_name_for_m2_enb %s\n",mce_interface_name_for_m2_enb); //LOG_W(MCE_APP,"mce_ipv4_address_for_m2c %s\n",mce_ipv4_address_for_m2c); //LOG_W(MCE_APP,"mce_ipv4_address_for_m2c %s\n",*(MCEParams[1/*MCE_IPV4_ADDRESS_FOR_M2C_IDX*/].strptr)); //LOG_W(MCE_APP,"mce_port_for_m2c %d\n",mce_port_for_m2c); - //LOG_W(MCE_APP,"mce_interface_name_for_m3_mme %s\n",mce_interface_name_for_m3_mme); //LOG_W(MCE_APP,"mce_ipv4_address_for_m3c %s\n",mce_ipv4_address_for_m3c); //LOG_W(MCE_APP,"mce_port_for_m3c %d\n",mce_port_for_m3c); @@ -124,9 +119,6 @@ int RCconfig_MCE(void ) { int RCconfig_M3(MessageDef *msg_p, uint32_t i) { int l; //int num_enbs = 0; - //char *enb_interface_name_for_S1U = NULL; - char *mce_interface_name_for_m2_enb = NULL; - char *mce_interface_name_for_m3_mme = NULL; //char *enb_ipv4_address_for_S1U = NULL; char *mce_ipv4_address_for_m2c = NULL; char *mce_ipv4_address_for_m3c = NULL; @@ -138,12 +130,13 @@ int RCconfig_M3(MessageDef *msg_p, uint32_t i) { char mcepath[MAX_OPTNAME_SIZE*2 + 8]; - paramdef_t MCEParams[] = MCE_NETPARAMS_DESC; paramdef_t M3Params[] = M3PARAMS_DESC; paramdef_t MCCHParams[] = MCCH_PARAMS_DESC; + paramdef_t MCENameParams[] = MCE_PARAMS_DESC; sprintf(mcepath,"%s.[%i].%s","MCEs",0,MCE_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - config_get(config_get_if(), MCEParams, sizeofArray(MCEParams), mcepath); + config_get(config_get_if(), MCENameParams, sizeofArray(MCENameParams), mcepath); + M3AP_REGISTER_MCE_REQ(msg_p).MCE_name = strdup(*(MCENameParams[MCE_MCE_NAME_IDX].strptr)); paramlist_def_t M3ParamList = {MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS,NULL,0}; paramlist_def_t MCCHParamList = {MCE_CONFIG_STRING_MCCH_CONFIG_PER_MBSFN_AREA,NULL,0}; @@ -158,27 +151,17 @@ int RCconfig_M3(MessageDef *msg_p, uint32_t i) { //printf("M3ParamList.numelt %d\n",M3ParamList.numelt); M3AP_REGISTER_MCE_REQ (msg_p).nb_m3 = 0; for (l = 0; l < M3ParamList.numelt; l++) { - M3AP_REGISTER_MCE_REQ (msg_p).nb_m3 += 1; - M3AP_REGISTER_MCE_REQ (msg_p).MCE_name = strdup(*(M3ParamList.paramarray[l][MCE_MCE_NAME_IDX].strptr)); - - strcpy(M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv4_address,*(M3ParamList.paramarray[l][MCE2_M3_IPV4_ADDRESS_IDX].strptr)); - strcpy(M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv6_address,*(M3ParamList.paramarray[l][MCE2_M3_IPV6_ADDRESS_IDX].strptr)); - - if (strcmp(*(M3ParamList.paramarray[l][MCE2_M3_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv4 = 1; - M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv6 = 0; - } else if (strcmp(*(M3ParamList.paramarray[l][MCE2_M3_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv4 = 0; - M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv6 = 1; - } else if (strcmp(*(M3ParamList.paramarray[l][MCE2_M3_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv4 = 1; - M3AP_REGISTER_MCE_REQ (msg_p).target_mme_m3_ip_address[l].ipv6 = 1; - } - M3AP_REGISTER_MCE_REQ (msg_p).sctp_out_streams = 2; - M3AP_REGISTER_MCE_REQ (msg_p).sctp_in_streams = 2; + M3AP_REGISTER_MCE_REQ(msg_p).nb_m3 += 1; + strcpy(M3AP_REGISTER_MCE_REQ(msg_p).target_mme_m3_ip_address[l].ipv4_address, + *(M3ParamList.paramarray[l][MCE2_M3_IPV4_ADDRESS_IDX].strptr)); + M3AP_REGISTER_MCE_REQ(msg_p).target_mme_m3_ip_address[l].ipv4 = 1; + M3AP_REGISTER_MCE_REQ(msg_p).target_mme_m3_ip_address[l].ipv6 = 0; + M3AP_REGISTER_MCE_REQ(msg_p).sctp_out_streams = 2; + M3AP_REGISTER_MCE_REQ(msg_p).sctp_in_streams = 2; } sprintf(aprefix,"%s.[%i].%s","MCEs",0,MCE_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); + paramdef_t MCEParams[] = MCE_NETPARAMS_DESC; config_get(config_get_if(), MCEParams, sizeofArray(MCEParams), aprefix); M3AP_REGISTER_MCE_REQ (msg_p).mme_port_for_M3C = (uint32_t)*(MCEParams[MCE2_PORT_FOR_M3C_IDX].uptr); diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 92b8bd49aa..38e57eda66 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -1148,10 +1148,11 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info) static uint32_t nr_ue_dl_processing(nr_downlink_indication_t *dl_info) { uint32_t ret_mask = 0x0; + DevAssert(dl_info != NULL); NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id); // DL indication after reception of DCI or DL PDU - if (dl_info && dl_info->dci_ind && dl_info->dci_ind->number_of_dcis) { + if (dl_info->dci_ind && dl_info->dci_ind->number_of_dcis) { LOG_T(MAC, "[L2][IF MODULE][DL INDICATION][DCI_IND]\n"); for (int i = 0; i < dl_info->dci_ind->number_of_dcis; i++) { LOG_T(MAC, ">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n", i, dl_info->dci_ind->number_of_dcis); @@ -1302,8 +1303,6 @@ void RCconfig_nr_ue_macrlc(void) { if (MACRLC_ParamList.numelt > 0) { for (j = 0; j < MACRLC_ParamList.numelt; j++) { if (strcmp(*(MACRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { - stub_eth_params.local_if_name = strdup( - *(MACRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); stub_eth_params.my_addr = strdup( *(MACRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); stub_eth_params.remote_addr = strdup( diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h index 9acb4785fd..5cca5b0f80 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h @@ -98,7 +98,7 @@ typedef struct { uint32_t gNB_index; /// component carrier id int cc_id; - /// frame + /// frame rx frame_t frame_rx; /// slot rx uint32_t slot_rx; diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.c b/openair2/PHY_INTERFACE/phy_stub_UE.c index 9b87f06ba8..af82d6093d 100644 --- a/openair2/PHY_INTERFACE/phy_stub_UE.c +++ b/openair2/PHY_INTERFACE/phy_stub_UE.c @@ -1164,8 +1164,6 @@ void UE_config_stub_pnf(void) { // eth_params in the UE_mac_inst. Later I think we have to change that to // attribute eth_params to a global element for all the UEs. else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { - stub_eth_params.local_if_name = strdup( - *(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); stub_eth_params.my_addr = strdup( *(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); stub_eth_params.remote_addr = strdup( diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index 387c03d4d7..f631563044 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -1351,8 +1351,7 @@ static void config_downlinkBWP(NR_BWP_Downlink_t *bwp, bwp->bwp_Common->pdcch_ConfigCommon=calloc(1,sizeof(*bwp->bwp_Common->pdcch_ConfigCommon)); bwp->bwp_Common->pdcch_ConfigCommon->present = NR_SetupRelease_PDCCH_ConfigCommon_PR_setup; bwp->bwp_Common->pdcch_ConfigCommon->choice.setup = calloc(1,sizeof(*bwp->bwp_Common->pdcch_ConfigCommon->choice.setup)); - bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->controlResourceSetZero=NULL; - bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet=calloc(1,sizeof(*bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet)); + bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->controlResourceSetZero = NULL; int curr_bwp = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); @@ -1400,7 +1399,6 @@ static void config_downlinkBWP(NR_BWP_Downlink_t *bwp, NR_ControlResourceSet_t *coreset2 = get_coreset_config(bwp->bwp_Id, curr_bwp, ssb_bitmap); asn1cSeqAdd(&bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list, coreset2); - bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList = calloc(1,sizeof(*bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList)); NR_SearchSpace_t *ss2 = rrc_searchspace_config(false, 10+bwp->bwp_Id, coreset2->controlResourceSetId); asn1cSeqAdd(&bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list, ss2); @@ -1657,9 +1655,6 @@ static void config_csi_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, int rep_id, int uid) { - NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep)); - csirep->reportConfigId = rep_id; - csirep->carrier = NULL; int resource_id = -1; int im_id = -1; for (int csi_list = 0; csi_list < csi_MeasConfig->csi_ResourceConfigToAddModList->list.count; csi_list++) { @@ -1678,6 +1673,9 @@ static void config_csi_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, // if there are no associated resources, do not configure if (resource_id < 0 || im_id < 0) return; + NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep)); + csirep->reportConfigId = rep_id; + csirep->carrier = NULL; csirep->resourcesForChannelMeasurement = resource_id; csirep->csi_IM_ResourcesForInterference = calloc(1, sizeof(*csirep->csi_IM_ResourcesForInterference)); *csirep->csi_IM_ResourcesForInterference = im_id; @@ -1721,9 +1719,6 @@ static void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, int uid, int num_antenna_ports) { - NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep)); - csirep->reportConfigId = rep_id; - csirep->carrier = NULL; int resource_id = -1; for (int csi_list = 0; csi_list < csi_MeasConfig->csi_ResourceConfigToAddModList->list.count; csi_list++) { NR_CSI_ResourceConfig_t *csires = csi_MeasConfig->csi_ResourceConfigToAddModList->list.array[csi_list]; @@ -1740,6 +1735,9 @@ static void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, // if there are no associated resources, do not configure if (resource_id < 0) return; + NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep)); + csirep->reportConfigId = rep_id; + csirep->carrier = NULL; csirep->resourcesForChannelMeasurement = resource_id; csirep->csi_IM_ResourcesForInterference = NULL; csirep->nzp_CSI_RS_ResourcesForInterference = NULL; @@ -1881,7 +1879,7 @@ int encode_MIB_NR(NR_BCCH_BCH_Message_t *mib, int frame, uint8_t *buf, int buf_s NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, const f1ap_plmn_t *plmn, uint64_t cellID, int tac) { - AssertFatal(cellID < (1l << 36), "cellID must fit within 36 bits, but is %ld\n", cellID); + AssertFatal(cellID < (1l << 36), "cellID must fit within 36 bits, but is %lu\n", cellID); NR_BCCH_DL_SCH_Message_t *sib1_message = CALLOC(1,sizeof(NR_BCCH_DL_SCH_Message_t)); AssertFatal(sib1_message != NULL, "out of memory\n"); @@ -2027,7 +2025,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, c asn1cCalloc(P0->choice.sCS120KHZoneT_SCS60KHZhalfT_SCS30KHZquarterT_SCS15KHZoneEighthT, Z8); asn1cSequenceAdd(Z8->list, long, ZoneEight); - asn1cCallocOne(ZoneEight, 0); + *ZoneEight = 0; asn1cCalloc(ServCellCom->uplinkConfigCommon, UL); asn_set_empty(&UL->frequencyInfoUL.scs_SpecificCarrierList.list); @@ -2289,9 +2287,6 @@ static NR_SpCellConfig_t *get_initial_SpCellConfig(int uid, asn1cSeqAdd(&bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list, coreset); - bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList = - calloc(1, sizeof(*bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList)); - NR_SearchSpace_t *ss2 = rrc_searchspace_config(false, 5, coreset->controlResourceSetId); asn1cSeqAdd(&bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list, ss2); @@ -2585,7 +2580,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, struct NR_ServingCellConfig__downlinkBWP_ToAddModList *DL_BWP_list = SpCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList; - struct NR_UplinkConfig__uplinkBWP_ToAddModList *UL_BWP_list = uplinkConfig->uplinkBWP_ToAddModList; + struct NR_UplinkConfig__uplinkBWP_ToAddModList *UL_BWP_list = uplinkConfig ? uplinkConfig->uplinkBWP_ToAddModList : NULL; if (DL_BWP_list) { for (int i = 0; i < DL_BWP_list->list.count; i++) { NR_BWP_Downlink_t *bwp = DL_BWP_list->list.array[i]; @@ -2680,7 +2675,8 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC const int dl_antenna_ports = pdschap->N1 * pdschap->N2 * pdschap->XP; const int do_csirs = configuration->do_CSIRS; - AssertFatal(servingcellconfigcommon != NULL, "servingcellconfigcommon is null\n"); + AssertFatal(servingcellconfigcommon, "servingcellconfigcommon is null\n"); + AssertFatal(servingcellconfigdedicated, "servingcellconfigdedicated is null\n"); if (uecap == NULL) LOG_E(RRC, "No UE Capabilities available when programming default CellGroup in NSA\n"); @@ -2808,7 +2804,7 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC // Downlink BWPs int n_dl_bwp = 1; - if (servingcellconfigdedicated && servingcellconfigdedicated->downlinkBWP_ToAddModList) { + if (servingcellconfigdedicated->downlinkBWP_ToAddModList) { n_dl_bwp = servingcellconfigdedicated->downlinkBWP_ToAddModList->list.count; } if (n_dl_bwp > 0) { @@ -2838,8 +2834,7 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC // Uplink BWPs int n_ul_bwp = 1; - if (servingcellconfigdedicated && servingcellconfigdedicated->uplinkConfig - && servingcellconfigdedicated->uplinkConfig->uplinkBWP_ToAddModList) { + if (servingcellconfigdedicated->uplinkConfig && servingcellconfigdedicated->uplinkConfig->uplinkBWP_ToAddModList) { n_ul_bwp = servingcellconfigdedicated->uplinkConfig->uplinkBWP_ToAddModList->list.count; } if (n_ul_bwp > 0) { diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index edd3f1d7cb..0d745fb798 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -225,7 +225,7 @@ static int get_ssb_arfcn(const f1ap_served_cell_info_t *cell_info, const NR_MIB_ else if (dl_arfcn >= 2016667 && dl_arfcn < 2795832) freqssb = freqpointa + 60000 * offsetToPointA * 12 + (1 << scs) * 15000 * (kssb + 10ll * 12); else - AssertFatal(false, "Invalid absoluteFrequencyPointA: %d\n", dl_arfcn); + AssertFatal(false, "Invalid absoluteFrequencyPointA: %u\n", dl_arfcn); int bw_index = get_supported_band_index(scs, band > 256 ? FR2 : FR1, get_dl_bw(cell_info)); int band_size_hz = get_supported_bw_mhz(band > 256 ? FR2 : FR1, bw_index) * 1000 * 1000; @@ -253,7 +253,7 @@ static int get_ssb_arfcn(const f1ap_served_cell_info_t *cell_info, const NR_MIB_ const NR_ServingCellConfigCommon_t *scc = RC.nrmac[0]->common_channels[0].ServingCellConfigCommon; uint32_t scc_ssb_arfcn = *scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB; AssertFatal(ssb_arfcn == scc_ssb_arfcn, - "mismatch of SCC SSB ARFCN original %d vs. computed %d! Note: you can remove this Assert, the gNB might run but UE " + "mismatch of SCC SSB ARFCN original %u vs. computed %u! Note: you can remove this Assert, the gNB might run but UE " "connection instable\n", scc_ssb_arfcn, ssb_arfcn); @@ -729,7 +729,6 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList = CALLOC(1, sizeof(*dedicatedNAS_MessageList)); - NR_DRB_ToAddMod_t *DRB_config = NULL; for (int i = 0; i < ue_p->nb_of_pdusessions; i++) { // bypass the new and already configured pdu sessions @@ -784,13 +783,11 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( ue_p->pduSession[i].cause_value = NGAP_CauseRadioNetwork_not_supported_5QI_value; continue; } - LOG_I(NR_RRC, - "PDU SESSION ID %ld, DRB ID %ld (index %d), QOS flow %d, 5QI %ld \n", - DRB_config->cnAssociation->choice.sdap_Config->pdu_Session, - DRB_config->drb_Identity, - i, - qos_flow_index, - ue_p->pduSession[i].param.qos[qos_flow_index].fiveQI); + LOG_I(NR_RRC, + "index %d, QOS flow %d, 5QI %ld \n", + i, + qos_flow_index, + ue_p->pduSession[i].param.qos[qos_flow_index].fiveQI); } ue_p->pduSession[i].status = PDU_SESSION_STATUS_DONE; @@ -954,7 +951,7 @@ static void cuup_notify_reestablishment(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) pdu_session_to_mod_t *pdu_e1 = find_or_next_pdu_session(&req, pdu->param.pdusession_id); AssertError(pdu != NULL, continue, - "UE %d: E1 Bearer Context Modification: PDU session %d to setup is null\n", + "UE %u: E1 Bearer Context Modification: PDU session %d to setup is null\n", ue_p->rrc_ue_id, pdu->param.pdusession_id); /* Prepare PDU for E1 Bearear Context Modification Request */ @@ -2305,7 +2302,7 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc) f1_ue_data_t ue_data = cu_get_f1_ue_data(ue_ctxt->rrc_ue_id); fprintf(f, - "UE %d CU UE ID %d DU UE ID %d RNTI %04x random identity %016lx", + "UE %d CU UE ID %u DU UE ID %d RNTI %04x random identity %016lx", i, ue_ctxt->rrc_ue_id, ue_data.secondary_ue, diff --git a/openair2/RRC/NR/rrc_gNB_du.c b/openair2/RRC/NR/rrc_gNB_du.c index cb2de0bf4c..b83a3f268e 100644 --- a/openair2/RRC/NR/rrc_gNB_du.c +++ b/openair2/RRC/NR/rrc_gNB_du.c @@ -146,14 +146,14 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *req, sctp_assoc_t assoc_id) // we accept the DU nr_rrc_du_container_t *du = calloc(1, sizeof(*du)); - AssertFatal(du != NULL, "out of memory\n"); + AssertFatal(du, "out of memory\n"); du->assoc_id = assoc_id; /* ITTI will free the setup request message via free(). So the memory * "inside" of the message will remain, but the "outside" container no, so * allocate memory and copy it in */ du->setup_req = calloc(1,sizeof(*du->setup_req)); - AssertFatal(du->setup_req != NULL, "out of memory\n"); + AssertFatal(du->setup_req, "out of memory\n"); *du->setup_req = *req; if (mib != NULL && sib1 != NULL) { du->mib = mib->message.choice.mib; diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index f48ad83083..0aad9ea503 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -138,7 +138,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a FILE *f = NULL; if (uecap_file) f = fopen(uecap_file, "r"); - if(f){ + if (f) { size_t size = fread(UE_NR_Capability_xer, 1, sizeof UE_NR_Capability_xer, f); if (size == 0 || size == sizeof UE_NR_Capability_xer) LOG_E(NR_RRC,"UE Capabilities XER file %s is too large (%ld)\n", uecap_file, size); @@ -148,6 +148,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a assert(dec_rval.code == RC_OK); xer_fprint(stdout,&asn_DEF_NR_UE_NR_Capability,(void *)UE_Capability_nr); } + fclose(f); } else LOG_E(NR_RRC,"Could not open UE Capabilities input file. Not handling OAI UE Capabilities.\n"); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 9e09db1a72..6442594eef 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -311,11 +311,12 @@ NR_UE_RRC_INST_t* nr_rrc_init_ue(char* uecap_file, int nb_inst) rrc->dl_bwp_id = 0; rrc->ul_bwp_id = 0; rrc->as_security_activated = false; + rrc->detach_after_release = false; FILE *f = NULL; if (uecap_file) f = fopen(uecap_file, "r"); - if(f) { + if (f) { char UE_NR_Capability_xer[65536]; size_t size = fread(UE_NR_Capability_xer, 1, sizeof UE_NR_Capability_xer, f); if (size == 0 || size == sizeof UE_NR_Capability_xer) { @@ -326,6 +327,7 @@ NR_UE_RRC_INST_t* nr_rrc_init_ue(char* uecap_file, int nb_inst) xer_decode(0, &asn_DEF_NR_UE_NR_Capability, (void *)&rrc->UECap.UE_NR_Capability, UE_NR_Capability_xer, size); assert(dec_rval.code == RC_OK); } + fclose(f); } memset(&rrc->timers_and_constants, 0, sizeof(rrc->timers_and_constants)); @@ -1627,6 +1629,8 @@ static int nr_rrc_ue_decode_dcch(NR_UE_RRC_INST_t *rrc, LOG_I(NR_RRC, "[UE %ld] Received RRC Release (gNB %d)\n", rrc->ue_id, gNB_indexP); // TODO properly implement procedures in 5.3.8.3 of 38.331 NR_Release_Cause_t cause = OTHER; + if (rrc->detach_after_release) + rrc->nrRrcState = RRC_STATE_DETACH_NR; nr_rrc_going_to_IDLE(rrc, cause, dl_dcch_msg->message.choice.c1->choice.rrcRelease); break; @@ -1785,7 +1789,9 @@ void *rrc_nrue(void *notUsed) break; case NAS_DETACH_REQ: - if (!NAS_DETACH_REQ(msg_p).wait_release) { + if (NAS_DETACH_REQ(msg_p).wait_release) + rrc->detach_after_release = true; + else { rrc->nrRrcState = RRC_STATE_DETACH_NR; NR_Release_Cause_t release_cause = OTHER; nr_rrc_going_to_IDLE(rrc, release_cause, NULL); diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index 621eec6443..533b3870f5 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -216,6 +216,7 @@ typedef struct NR_UE_RRC_INST_s { e_NR_IntegrityProtAlgorithm integrityProtAlgorithm; long keyToUse; bool as_security_activated; + bool detach_after_release; long selected_plmn_identity; Rrc_State_NR_t nrRrcState; diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c index 42cd577727..d0d2b03304 100644 --- a/openair2/X2AP/x2ap_eNB.c +++ b/openair2/X2AP/x2ap_eNB.c @@ -217,29 +217,16 @@ int x2ap_eNB_init_sctp (x2ap_eNB_instance_t *instance_p, net_ip_address_t *local_ip_addr, uint32_t enb_port_for_X2C) { // Create and alloc new message - MessageDef *message; - sctp_init_t *sctp_init = NULL; DevAssert(instance_p != NULL); DevAssert(local_ip_addr != NULL); - message = itti_alloc_new_message (TASK_X2AP, 0, SCTP_INIT_MSG_MULTI_REQ); - sctp_init = &message->ittiMsg.sctp_init_multi; + size_t addr_len = strlen(local_ip_addr->ipv4_address) + 1; + MessageDef *message = itti_alloc_new_message_sized(TASK_X2AP, 0, SCTP_INIT_MSG_MULTI_REQ, sizeof(sctp_init_t) + addr_len); + sctp_init_t *sctp_init = &message->ittiMsg.sctp_init_multi; sctp_init->port = enb_port_for_X2C; sctp_init->ppid = X2AP_SCTP_PPID; - sctp_init->ipv4 = 1; - sctp_init->ipv6 = 0; - sctp_init->nb_ipv4_addr = 1; -#if 0 - memcpy(&sctp_init->ipv4_address, - local_ip_addr, - sizeof(*local_ip_addr)); -#endif - sctp_init->ipv4_address[0] = inet_addr(local_ip_addr->ipv4_address); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - sctp_init->nb_ipv6_addr = 0; - sctp_init->ipv6_address[0] = "0:0:0:0:0:0:0:1"; + char *addr_buf = (char *) (sctp_init + 1); + sctp_init->bind_address = addr_buf; + memcpy(addr_buf, local_ip_addr->ipv4_address, addr_len); return itti_send_msg_to_task (TASK_SCTP, instance_p->instance, message); } diff --git a/openair3/M3AP/m3ap_MCE.c b/openair3/M3AP/m3ap_MCE.c index 58f8c969a2..141ee09b4e 100644 --- a/openair3/M3AP/m3ap_MCE.c +++ b/openair3/M3AP/m3ap_MCE.c @@ -225,29 +225,16 @@ int m3ap_MCE_init_sctp (m3ap_MCE_instance_t *instance_p, net_ip_address_t *local_ip_addr, uint32_t mce_port_for_M3C) { // Create and alloc new message - MessageDef *message; - sctp_init_t *sctp_init = NULL; DevAssert(instance_p != NULL); DevAssert(local_ip_addr != NULL); - message = itti_alloc_new_message (TASK_M3AP_MCE, 0, SCTP_INIT_MSG_MULTI_REQ); - sctp_init = &message->ittiMsg.sctp_init_multi; + size_t addr_len = strlen(local_ip_addr->ipv4_address) + 1; + MessageDef *message = itti_alloc_new_message_sized(TASK_M3AP_MCE, 0, SCTP_INIT_MSG_MULTI_REQ, sizeof(sctp_init_t) + addr_len); + sctp_init_t *sctp_init = &message->ittiMsg.sctp_init_multi; sctp_init->port = mce_port_for_M3C; sctp_init->ppid = M3AP_SCTP_PPID; - sctp_init->ipv4 = 1; - sctp_init->ipv6 = 0; - sctp_init->nb_ipv4_addr = 1; -#if 0 - memcpy(&sctp_init->ipv4_address, - local_ip_addr, - sizeof(*local_ip_addr)); -#endif - sctp_init->ipv4_address[0] = inet_addr(local_ip_addr->ipv4_address); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - sctp_init->nb_ipv6_addr = 0; - sctp_init->ipv6_address[0] = "0:0:0:0:0:0:0:1"; + char *addr_buf = (char *) (sctp_init + 1); + sctp_init->bind_address = addr_buf; + memcpy(addr_buf, local_ip_addr->ipv4_address, addr_len); return itti_send_msg_to_task (TASK_SCTP, instance_p->instance, message); } diff --git a/openair3/M3AP/m3ap_MME.c b/openair3/M3AP/m3ap_MME.c index 523737184e..892a210ffd 100644 --- a/openair3/M3AP/m3ap_MME.c +++ b/openair3/M3AP/m3ap_MME.c @@ -227,29 +227,16 @@ int m3ap_MME_init_sctp (m3ap_MME_instance_t *instance_p, net_ip_address_t *local_ip_addr, uint32_t mme_port_for_M3C) { // Create and alloc new message - MessageDef *message; - sctp_init_t *sctp_init = NULL; DevAssert(instance_p != NULL); DevAssert(local_ip_addr != NULL); - message = itti_alloc_new_message (TASK_M3AP_MME, 0, SCTP_INIT_MSG_MULTI_REQ); - sctp_init = &message->ittiMsg.sctp_init_multi; + size_t addr_len = strlen(local_ip_addr->ipv4_address) + 1; + MessageDef *message = itti_alloc_new_message_sized(TASK_M3AP_MME, 0, SCTP_INIT_MSG_MULTI_REQ, sizeof(sctp_init_t) + addr_len); + sctp_init_t *sctp_init = &message->ittiMsg.sctp_init_multi; sctp_init->port = mme_port_for_M3C; sctp_init->ppid = M3AP_SCTP_PPID; - sctp_init->ipv4 = 1; - sctp_init->ipv6 = 0; - sctp_init->nb_ipv4_addr = 1; -#if 0 - memcpy(&sctp_init->ipv4_address, - local_ip_addr, - sizeof(*local_ip_addr)); -#endif - sctp_init->ipv4_address[0] = inet_addr(local_ip_addr->ipv4_address); - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - sctp_init->nb_ipv6_addr = 0; - sctp_init->ipv6_address[0] = "0:0:0:0:0:0:0:1"; + char *addr_buf = (char *) (sctp_init + 1); + sctp_init->bind_address = addr_buf; + memcpy(addr_buf, local_ip_addr->ipv4_address, addr_len); return itti_send_msg_to_task (TASK_SCTP, instance_p->instance, message); } @@ -502,37 +489,22 @@ void MME_task_send_sctp_init_req(instance_t enb_id, m3ap_mme_sctp_req_t * m3ap_m // 2. use RC.rrc[enb_id] to fill the sctp_init_t with the ip, port // 3. creat an itti message to init - MessageDef *message_p = NULL; - - message_p = itti_alloc_new_message (TASK_M3AP_MME, 0, SCTP_INIT_MSG); -if(m3ap_mme_sctp_req==NULL) { - LOG_I(M3AP, "M3AP_SCTP_REQ(create socket)\n"); - message_p->ittiMsg.sctp_init.port = M3AP_PORT_NUMBER; - message_p->ittiMsg.sctp_init.ppid = M3AP_SCTP_PPID; - message_p->ittiMsg.sctp_init.ipv4 = 1; - message_p->ittiMsg.sctp_init.ipv6 = 0; - message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1; - //message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.rrc[enb_id]->eth_params_s.my_addr); - message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr("127.0.0.8"); - -}else{ - - LOG_I(M3AP, "M3AP_SCTP_REQ(create socket) %s\n",m3ap_mme_sctp_req->mme_m3_ip_address.ipv4_address); - message_p->ittiMsg.sctp_init.port = m3ap_mme_sctp_req->mme_port_for_M3C; - message_p->ittiMsg.sctp_init.ppid = M3AP_SCTP_PPID; - message_p->ittiMsg.sctp_init.ipv4 = 1; - message_p->ittiMsg.sctp_init.ipv6 = 0; - message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1; - //message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.rrc[enb_id]->eth_params_s.my_addr); - message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(m3ap_mme_sctp_req->mme_m3_ip_address.ipv4_address); - } - - /* - * SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * * * * Disable it for now. - */ - message_p->ittiMsg.sctp_init.nb_ipv6_addr = 0; - message_p->ittiMsg.sctp_init.ipv6_address[0] = "0:0:0:0:0:0:0:1"; + size_t addr_len = m3ap_mme_sctp_req != NULL ? strlen(m3ap_mme_sctp_req->mme_m3_ip_address.ipv4_address) + 1 : strlen("127.0.0.8") + 1; // the previous code might hardcode, support this + MessageDef *message_p = itti_alloc_new_message_sized(TASK_M3AP_MME, 0, SCTP_INIT_MSG, sizeof(sctp_init_t) + addr_len); + sctp_init_t *init = &SCTP_INIT_MSG(message_p); + char *addr_buf = (char *) (init + 1); // address after ITTI message end, allocated above + init->bind_address = addr_buf; + if (m3ap_mme_sctp_req == NULL) { + LOG_I(M3AP, "M3AP_SCTP_REQ(create socket)\n"); + init->port = M3AP_PORT_NUMBER; + init->ppid = M3AP_SCTP_PPID; + memcpy(addr_buf, "127.0.0.8", addr_len); + } else { + LOG_I(M3AP, "M3AP_SCTP_REQ(create socket) for %s %ld\n", m3ap_mme_sctp_req->mme_m3_ip_address.ipv4_address, addr_len); + init->port = m3ap_mme_sctp_req->mme_port_for_M3C; + init->ppid = M3AP_SCTP_PPID; + memcpy(addr_buf, m3ap_mme_sctp_req->mme_m3_ip_address.ipv4_address, addr_len); + } itti_send_msg_to_task(TASK_SCTP, enb_id, message_p); } diff --git a/openair3/NAS/UE/nas_proc.c b/openair3/NAS/UE/nas_proc.c index 81e11c87ec..65b531342a 100644 --- a/openair3/NAS/UE/nas_proc.c +++ b/openair3/NAS/UE/nas_proc.c @@ -1014,8 +1014,7 @@ int nas_proc_activate_pdn(nas_user_t *user, int cid) ** Others: _nas_proc_data ** ** ** ***************************************************************************/ -int nas_proc_cell_info(nas_user_t *user, int found, tac_t tac, ci_t ci, AcT_t AcT, - uint8_t rsrq, uint8_t rsrp) +int nas_proc_cell_info(nas_user_t *user, int found, tac_t tac, ci_t ci, AcT_t AcT, uint8_t rsrq, uint8_t rsrp) { LOG_FUNC_IN; diff --git a/openair3/NAS/UE/nas_proc.h b/openair3/NAS/UE/nas_proc.h index bd88691de8..1f8a88d46d 100644 --- a/openair3/NAS/UE/nas_proc.h +++ b/openair3/NAS/UE/nas_proc.h @@ -111,9 +111,7 @@ int nas_proc_activate_pdn(nas_user_t *user, int cid); * NAS procedures triggered by the network * -------------------------------------------------------------------------- */ - -int nas_proc_cell_info(nas_user_t *user, int found, tac_t tac, ci_t ci, AcT_t rat, uint8_t rsrp, - uint8_t rsrq); +int nas_proc_cell_info(nas_user_t *user, int found, tac_t tac, ci_t ci, AcT_t AcT, uint8_t rsrq, uint8_t rsrp); int nas_proc_establish_cnf(nas_user_t *user, const Byte_t *data, uint32_t len); int nas_proc_establish_rej(nas_user_t *user); diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index 6701521b8c..ffd4bba3f5 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -354,65 +354,67 @@ sctp_handle_new_association_req_multi( ns, sctp_nb_cnx, assoc_id); } -//------------------------------------------------------------------------------ -static void -sctp_handle_new_association_req( - const instance_t instance, - const task_id_t requestor, - const sctp_new_association_req_t * const sctp_new_association_req_p) +static const char *print_ip(struct addrinfo *p, char *buf, size_t buf_len) { - int sd = 0; - sctp_assoc_t assoc_id = 0; + void *addr; + if (p->ai_family == AF_INET) { + struct sockaddr_in *ipv4 = (struct sockaddr_in *)p->ai_addr; + addr = &ipv4->sin_addr; + } else { + struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)p->ai_addr; + addr = &ipv6->sin6_addr; + } - struct sctp_event_subscribe events={0}; + // convert the IP to a string and print it: + return inet_ntop(p->ai_family, addr, buf, buf_len); +} - struct sctp_cnx_list_elm_s *sctp_cnx = NULL; - enum sctp_connection_type_e connection_type = SCTP_TYPE_CLIENT; +static void sctp_handle_new_association_req(const instance_t instance, + const task_id_t requestor, + const sctp_new_association_req_t *const req) +{ + enum sctp_connection_type_e connection_type = SCTP_TYPE_CLIENT; - struct ifreq ifr; - struct ifaddrs *ifaddr = NULL; - struct ifaddrs *ifa = NULL; - int family = 0; - int s = 0; - struct in_addr in; - struct in6_addr in6; - /* Prepare a new SCTP association as requested by upper layer and try to connect - * to remote host. - */ - DevAssert(sctp_new_association_req_p != NULL); + /* local address: IPv4 has priority, but can also handle IPv6 */ + const char *local = NULL; + if (req->local_address.ipv6) { + local = req->local_address.ipv6_address; + SCTP_WARN("please specify IPv6 addresses in the IPv4 field, IPv4 handles both\n"); + } + if (req->local_address.ipv4) + local = req->local_address.ipv4_address; - /* Create new socket with IPv6 affinity */ -//#warning "SCTP may Force IPv4 only, here" -#ifdef NO_VIRTUAL_MACHINE + /* Prepare a new SCTP association as requested by upper layer and try to connect + * to remote host. + */ + DevAssert(req != NULL); + struct addrinfo hints = {.ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM, .ai_protocol = IPPROTO_SCTP}; + if (local == NULL) + hints.ai_flags = AI_PASSIVE; + struct addrinfo *serv; - // in init chunk appears a list of host addresses, IPv4 and IPv4 in an arbitrary (unsorted) order - // SCTP hearbeats starts with first ipv4 addresses then stop triyng with other ipv4 addresses - // if it encounters an IPv6 address in list, so we can force the building of IPv4 addresses only - // with AF_INET (the working IPv4 address can be the last in the list...) - if ((sd = socket(AF_INET6, SOCK_STREAM, IPPROTO_SCTP)) < 0) { -#else + int status = getaddrinfo(local, NULL, &hints, &serv); + AssertFatal(status == 0, "getaddrinfo() failed: %s\n", gai_strerror(status)); - if ((sd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)) < 0) { -#endif - SCTP_ERROR("Socket creation failed: %s\n", strerror(errno)); - return; + int sd; + struct addrinfo *p = NULL; + for (p = serv; p != NULL; p = p->ai_next) { + char buf[512]; + const char *ip = print_ip(p, buf, sizeof(buf)); + SCTP_DEBUG("Trying %s for client socket creation\n", ip); + + if ((sd = socket(serv->ai_family, serv->ai_socktype, serv->ai_protocol)) == -1) { + SCTP_WARN("Socket creation failed: %s\n", strerror(errno)); + continue; } - /* Add the socket to list of fd monitored by ITTI */ - itti_subscribe_event_fd(TASK_SCTP, sd); - - if (sctp_set_init_opt(sd, - sctp_new_association_req_p->in_streams, - sctp_new_association_req_p->out_streams, - SCTP_MAX_ATTEMPTS, SCTP_TIMEOUT) != 0) { - SCTP_ERROR("Setsockopt IPPROTO_SCTP_INITMSG failed: %s\n", - strerror(errno)); - itti_unsubscribe_event_fd(TASK_SCTP, sd); - close(sd); - return; - } + /* we assume we can set options, or something is likely broken; the + * connection won't operate properly */ + int ret = sctp_set_init_opt(sd, req->in_streams, req->out_streams, SCTP_MAX_ATTEMPTS, SCTP_TIMEOUT); + AssertFatal(ret == 0, "sctp_set_init_opt() failed\n"); /* Subscribe to all events */ + struct sctp_event_subscribe events = {0}; events.sctp_data_io_event = 1; events.sctp_association_event = 1; events.sctp_address_event = 1; @@ -421,199 +423,115 @@ sctp_handle_new_association_req( events.sctp_shutdown_event = 1; events.sctp_partial_delivery_event = 1; - if (setsockopt(sd, IPPROTO_SCTP, SCTP_EVENTS, &events, - 8) < 0) { - SCTP_ERROR("Setsockopt IPPROTO_SCTP_EVENTS failed: %s\n", - strerror(errno)); - close(sd); - return; + /* as above */ + ret = setsockopt(sd, serv->ai_protocol, SCTP_EVENTS, &events, 8); + AssertFatal(ret == 0, "setsockopt() IPPROTO_SCTP_EVENTS failed: %s\n", strerror(errno)); + + /* if that fails, we will try the next address */ + ret = sctp_bindx(sd, p->ai_addr, 1, SCTP_BINDX_ADD_ADDR); + if (ret != 0) { + SCTP_WARN("sctp_bindx() SCTP_BINDX_ADD_ADDR failed: errno %d %s\n", errno, strerror(errno)); + close(sd); + continue; } - // Bind to device ... or we could bind to address also - if (getifaddrs(&ifaddr) == -1) { - SCTP_ERROR("getifaddrs failed: %s\n", strerror(errno)); - close(sd); - } + SCTP_DEBUG("sctp_bindx() SCTP_BINDX_ADD_ADDR: socket bound to %s/%s\n", local, ip); + break; + } - /* Walk through linked list, maintaining head pointer so we - can free list later */ - for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { - if (ifa->ifa_addr == NULL) - continue; + freeaddrinfo(serv); - family = ifa->ifa_addr->sa_family; + if (p == NULL) { + SCTP_ERROR("could not open socket, no SCTP connection established\n"); + return; + } - /* For an AF_INET* interface address, display the address */ - if (sctp_new_association_req_p->local_address.ipv4 && family == AF_INET) { - // compare address - s = inet_aton(sctp_new_association_req_p->local_address.ipv4_address, - &in); + /* SOCK_STREAM socket type requires an explicit connect to the remote host + * address and port. */ + /* remote address: IPv4 has priority, but can also handle IPv6 */ + const char *remote = NULL; + if (req->remote_address.ipv6) { + remote = req->remote_address.ipv6_address; + SCTP_WARN("please specify IPv6 addresses in the IPv4 field, IPv4 handles both\n"); + } + if (req->remote_address.ipv4) + remote = req->remote_address.ipv4_address; + sctp_assoc_t assoc_id = 0; + if (remote != NULL) { + struct addrinfo hints = {.ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM, .ai_protocol = IPPROTO_SCTP}; + struct addrinfo *serv; - if (s > 0 ) { - if (((struct sockaddr_in*)ifa->ifa_addr)->sin_addr.s_addr == in.s_addr) { - struct sockaddr_in locaddr={0}; - locaddr.sin_family = AF_INET; - locaddr.sin_port = 0; - locaddr.sin_addr.s_addr = in.s_addr; + char port[12]; + snprintf(port, sizeof(port), "%d", req->port); + int status = getaddrinfo(remote, port, &hints, &serv); + AssertFatal(status == 0, "getaddrinfo() failed: %s\n", gai_strerror(status)); - if (sctp_bindx(sd, (struct sockaddr*)&locaddr, 1, SCTP_BINDX_ADD_ADDR) < 0) { - SCTP_ERROR("sctp_bindx SCTP_BINDX_ADD_ADDR failed: %s\n", - strerror(errno)); - } else { - SCTP_DEBUG("sctp_bindx SCTP_BINDX_ADD_ADDR socket bound to : %s\n", - inet_ntoa(locaddr.sin_addr)); - } - break; + struct addrinfo *p = NULL; + for (p = serv; p != NULL; p = p->ai_next) { + char buf[512]; + const char *ip = print_ip(p, buf, sizeof(buf)); + SCTP_DEBUG("Trying to connect to %s for remote end %s\n", ip, remote); - } - } - } else if (sctp_new_association_req_p->local_address.ipv6 && family == AF_INET6) { - // compare address - s = inet_pton(AF_INET6, - sctp_new_association_req_p->local_address.ipv6_address, - &in6); - - if (s == 1 ) { - if (memcmp(&((struct sockaddr_in6*)ifa->ifa_addr)->sin6_addr, - &in6, sizeof(in6)) == 0) { - memset(&ifr, 0, sizeof(ifr)); - snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", ifa->ifa_name); - - if (setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr)) < 0) { - SCTP_ERROR("Setsockopt SOL_SOCKET failed: %s\n", - strerror(errno)); - } else { - SCTP_DEBUG("Setsockopt SOL_SOCKET socket bound to : %s\n", - ifa->ifa_name); - } - - break; - } - } - } - } - - freeifaddrs(ifaddr); - - /* Mark the socket as non-blocking */ - if (fcntl(sd, F_SETFL, O_NONBLOCK) < 0) { - SCTP_ERROR("fcntl F_SETFL O_NONBLOCK failed: %s\n", - strerror(errno)); - close(sd); - return; - } - - /* SOCK_STREAM socket type requires an explicit connect to the remote host - * address and port. - * Only use IPv4 for the first connection attempt - */ - if ((sctp_new_association_req_p->remote_address.ipv6 != 0) || - (sctp_new_association_req_p->remote_address.ipv4 != 0)) { - uint8_t address_index = 0; - uint8_t used_address = sctp_new_association_req_p->remote_address.ipv6 + - sctp_new_association_req_p->remote_address.ipv4; - struct sockaddr_in addr[used_address]; - - memset(addr, 0, used_address * sizeof(struct sockaddr_in)); - - if (sctp_new_association_req_p->remote_address.ipv6 == 1) { - if (inet_pton(AF_INET6, sctp_new_association_req_p->remote_address.ipv6_address, - &addr[address_index].sin_addr.s_addr) != 1) { - SCTP_ERROR("Failed to convert ipv6 address %*s to network type\n", - (int)strlen(sctp_new_association_req_p->remote_address.ipv6_address), - sctp_new_association_req_p->remote_address.ipv6_address); - close(sd); - return; - } - - SCTP_DEBUG("Converted ipv6 address %*s to network type\n", - (int)strlen(sctp_new_association_req_p->remote_address.ipv6_address), - sctp_new_association_req_p->remote_address.ipv6_address); - - addr[address_index].sin_family = AF_INET6; - addr[address_index].sin_port = htons(sctp_new_association_req_p->port); - address_index++; - } - - if (sctp_new_association_req_p->remote_address.ipv4 == 1) { - if (inet_pton(AF_INET, sctp_new_association_req_p->remote_address.ipv4_address, - &addr[address_index].sin_addr.s_addr) != 1) { - SCTP_ERROR("Failed to convert ipv4 address %*s to network type\n", - (int)strlen(sctp_new_association_req_p->remote_address.ipv4_address), - sctp_new_association_req_p->remote_address.ipv4_address); - close(sd); - return; - } - - SCTP_DEBUG("Converted ipv4 address %*s to network type\n", - (int)strlen(sctp_new_association_req_p->remote_address.ipv4_address), - sctp_new_association_req_p->remote_address.ipv4_address); - - addr[address_index].sin_family = AF_INET; - addr[address_index].sin_port = htons(sctp_new_association_req_p->port); - address_index++; - } - - /* Connect to remote host and port */ - if (sctp_connectx(sd, (struct sockaddr *)addr, 1, &assoc_id) < 0) { - /* sctp_connectx on non-blocking socket return EINPROGRESS */ - if (errno != EINPROGRESS) { - SCTP_ERROR("Connect failed: %s\n", strerror(errno)); - sctp_itti_send_association_resp( - requestor, instance, -1, sctp_new_association_req_p->ulp_cnx_id, - SCTP_STATE_UNREACHABLE, 0, 0); - /* Add the socket to list of fd monitored by ITTI */ - itti_unsubscribe_event_fd(TASK_SCTP, sd); - close(sd); - return; - } else { - SCTP_DEBUG("connectx assoc_id %d in progress..., used %d addresses\n", - assoc_id, used_address); - } + if (sctp_connectx(sd, p->ai_addr, 1, &assoc_id) < 0) { + /* sctp_connectx on non-blocking socket return EINPROGRESS */ + if (errno != EINPROGRESS) { + SCTP_ERROR("Connect failed: %s\n", strerror(errno)); + sctp_itti_send_association_resp(requestor, instance, -1, req->ulp_cnx_id, SCTP_STATE_UNREACHABLE, 0, 0); + close(sd); + return; } else { - SCTP_DEBUG("sctp_connectx SUCCESS, used %d addresses assoc_id %d\n", - used_address, - assoc_id); - } - } else { - /* No remote address provided -> only bind the socket for now. - * Connection will be accepted in the main event loop - */ - struct sockaddr_in6 addr6; - - connection_type = SCTP_TYPE_SERVER; - - /* For now bind to any interface */ - addr6.sin6_family = AF_INET6; - addr6.sin6_addr = in6addr_any; - addr6.sin6_port = htons(sctp_new_association_req_p->port); - addr6.sin6_flowinfo = 0; - - if (bind(sd, (struct sockaddr*)&addr6, sizeof(addr6)) < 0) { - SCTP_ERROR("Failed to bind the socket to address any (v4/v6): %s\n", - strerror(errno)); - close(sd); - return; + SCTP_DEBUG("sctp_connectx(): assoc_id %d in progress...\n", assoc_id); } + } else { + SCTP_DEBUG("sctp_connectx() SUCCESS: used assoc_id %d\n", assoc_id); + } + break; } - sctp_cnx = calloc(1, sizeof(*sctp_cnx)); + freeaddrinfo(serv); + } else { + /* I am not sure that this is relevant; we already did sctp_bindx() above */ + connection_type = SCTP_TYPE_SERVER; - sctp_cnx->connection_type = connection_type; + /* No remote address provided -> only bind the socket for now. + * Connection will be accepted in the main event loop + */ + /* + struct sockaddr_in6 addr6; - sctp_cnx->sd = sd; - sctp_cnx->task_id = requestor; - sctp_cnx->cnx_id = sctp_new_association_req_p->ulp_cnx_id; - sctp_cnx->ppid = sctp_new_association_req_p->ppid; - sctp_cnx->instance = instance; - sctp_cnx->assoc_id = assoc_id; - /* Insert new element at end of list */ - STAILQ_INSERT_TAIL(&sctp_cnx_list, sctp_cnx, entries); - sctp_nb_cnx++; + addr6.sin6_family = AF_INET6; + addr6.sin6_addr = in6addr_any; + addr6.sin6_port = htons(req->port); + addr6.sin6_flowinfo = 0; - SCTP_DEBUG("Inserted new descriptor for sd %d in list, nb elements %u, assoc_id %d\n", - sd, sctp_nb_cnx, assoc_id); + if (bind(sd, (struct sockaddr *)&addr6, sizeof(addr6)) < 0) { + SCTP_ERROR("Failed to bind the socket to address any (v4/v6): %s\n", strerror(errno)); + close(sd); + return; + } + */ + } + + struct sctp_cnx_list_elm_s *sctp_cnx = calloc(1, sizeof(*sctp_cnx)); + AssertFatal(sctp_cnx != NULL, "out of memory\n"); + sctp_cnx->connection_type = connection_type; + + sctp_cnx->sd = sd; + sctp_cnx->task_id = requestor; + sctp_cnx->cnx_id = req->ulp_cnx_id; + sctp_cnx->ppid = req->ppid; + sctp_cnx->instance = instance; + sctp_cnx->assoc_id = assoc_id; + + /* Insert new element at end of list */ + STAILQ_INSERT_TAIL(&sctp_cnx_list, sctp_cnx, entries); + sctp_nb_cnx++; + + /* Add the socket to list of fd monitored by ITTI */ + itti_subscribe_event_fd(TASK_SCTP, sd); + + SCTP_DEBUG("Inserted new descriptor for sd %d in list, nb elements %u, assoc_id %d\n", sd, sctp_nb_cnx, assoc_id); } //------------------------------------------------------------------------------ @@ -680,85 +598,44 @@ static int sctp_close_association(sctp_close_association_t *close_association_p) return 0; } -//------------------------------------------------------------------------------ -static int sctp_create_new_listener( - const instance_t instance, - const task_id_t requestor, - sctp_init_t *init_p, - int server_type) +static int sctp_create_new_listener(const instance_t instance, const task_id_t requestor, sctp_init_t *init_p, int server_type) { - struct sctp_event_subscribe event={0}; - struct sockaddr *addr = NULL; - struct sctp_cnx_list_elm_s *sctp_cnx = NULL; - uint16_t i = 0, j = 0; - int sd = 0; - int used_addresses = 0; + DevAssert(init_p != NULL); + DevAssert(init_p->bind_address != NULL); + int in_streams = 1; + int out_streams = 1; - DevAssert(init_p != NULL); + /* local address: IPv4 has priority, but can also handle IPv6 */ + const char *local = init_p->bind_address; - if (init_p->ipv4 == 0 && init_p->ipv6 == 0) { - SCTP_ERROR("Illegal IP configuration upper layer should request at" - "least ipv4 and/or ipv6 config\n"); - return -1; + struct addrinfo hints = {.ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM, .ai_protocol = IPPROTO_SCTP}; + struct addrinfo *serv; + + char port[12]; + snprintf(port, sizeof(port), "%d", init_p->port); + int status = getaddrinfo(local, port, &hints, &serv); + AssertFatal(status == 0, "getaddrinfo() failed: %s\n", gai_strerror(status)); + + int sd; + struct addrinfo *p = NULL; + for (p = serv; p != NULL; p = p->ai_next) { + char buf[512]; + const char *ip = print_ip(p, buf, sizeof(buf)); + SCTP_DEBUG("Trying %s for server socket creation\n", ip); + + /* SOCK_SEQPACKET to be able to reuse(?) socket through SCTP_INIT_MSG_MULTI_REQ */ + int socktype = server_type ? SOCK_SEQPACKET : SOCK_STREAM; + if ((sd = socket(serv->ai_family, socktype, serv->ai_protocol)) == -1) { + SCTP_WARN("Socket creation failed: %s\n", strerror(errno)); + continue; } - if ((used_addresses = init_p->nb_ipv4_addr + init_p->nb_ipv6_addr) == 0) { - SCTP_WARN("No address provided...\n"); - return -1; - } - - addr = calloc(used_addresses, sizeof(struct sockaddr)); - - SCTP_DEBUG("Creating new listen socket on port %u with\n", init_p->port); - - if (init_p->ipv4 == 1) { - struct sockaddr_in *ip4_addr; - - SCTP_DEBUG("ipv4 addresses:\n"); - - for (i = 0; i < init_p->nb_ipv4_addr; i++) { - SCTP_DEBUG("\t- "IPV4_ADDR"\n", IPV4_ADDR_FORMAT(init_p->ipv4_address[i])); - ip4_addr = (struct sockaddr_in *)&addr[i]; - ip4_addr->sin_family = AF_INET; - ip4_addr->sin_port = htons(init_p->port); - ip4_addr->sin_addr.s_addr = init_p->ipv4_address[i]; - } - } - - if (init_p->ipv6 == 1) { - struct sockaddr_in6 *ip6_addr; - - SCTP_DEBUG("ipv6 addresses:\n"); - - for (j = 0; j < init_p->nb_ipv6_addr; j++) { - SCTP_DEBUG("\t- %s\n", init_p->ipv6_address[j]); - ip6_addr = (struct sockaddr_in6 *)&addr[i + j]; - ip6_addr->sin6_family = AF_INET6; - ip6_addr->sin6_port = htons(init_p->port); - - if (inet_pton(AF_INET6, init_p->ipv6_address[j], - ip6_addr->sin6_addr.s6_addr) <= 0) { - SCTP_WARN("Provided ipv6 address %s is not valid\n", - init_p->ipv6_address[j]); - } - } - } - - if (server_type) { - if ((sd = socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP)) < 0) { - SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno); - free(addr); - return -1; - } - } - else { - if ((sd = socket(AF_INET6, SOCK_STREAM, IPPROTO_SCTP)) < 0) { - SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno); - free(addr); - return -1; - } - } + /* we assume we can set options, or something is likely broken; the + * connection won't operate properly */ + int ret = sctp_set_init_opt(sd, in_streams, out_streams, 0, 0); + AssertFatal(ret == 0, "sctp_set_init_opt() failed\n"); + struct sctp_event_subscribe event = {0}; event.sctp_data_io_event = 1; event.sctp_association_event = 1; event.sctp_address_event = 1; @@ -767,83 +644,55 @@ static int sctp_create_new_listener( event.sctp_shutdown_event = 1; event.sctp_partial_delivery_event = 1; - if (setsockopt(sd, IPPROTO_SCTP, SCTP_EVENTS, &event, - 8) < 0) { - SCTP_ERROR("setsockopt: %s:%d\n", strerror(errno), errno); - if (sd != -1) { - close(sd); - sd = -1; - } - free(addr); - return -1; - } + /* as above */ + ret = setsockopt(sd, serv->ai_protocol, SCTP_EVENTS, &event, 8); + AssertFatal(ret == 0, "setsockopt() IPPROTO_SCTP_EVENTS failed: %s\n", strerror(errno)); - sctp_cnx = calloc(1, sizeof(*sctp_cnx)); - - if (server_type) { - sctp_cnx->connection_type = SCTP_TYPE_MULTI_SERVER; - } - else { - sctp_cnx->connection_type = SCTP_TYPE_SERVER; - } - - sctp_cnx->sd = sd; - sctp_cnx->local_port = init_p->port; - sctp_cnx->in_streams = 32; - sctp_cnx->out_streams = 32; - sctp_cnx->ppid = init_p->ppid; - sctp_cnx->task_id = requestor; - sctp_cnx->instance = instance; - - /* Some pre-bind socket configuration */ - if (sctp_set_init_opt(sd, - sctp_cnx->in_streams, - sctp_cnx->out_streams, - 0, - 0) < 0) { - goto err; - } - - if (sctp_bindx(sd, addr, used_addresses, SCTP_BINDX_ADD_ADDR) != 0) { - SCTP_ERROR("sctp_bindx: %s:%d\n", strerror(errno), errno); - free(sctp_cnx); - sctp_cnx = NULL; - return -1; + /* if that fails, we will try the next address */ + ret = sctp_bindx(sd, p->ai_addr, 1, SCTP_BINDX_ADD_ADDR); + if (ret != 0) { + SCTP_WARN("sctp_bindx() SCTP_BINDX_ADD_ADDR failed: errno %d %s\n", errno, strerror(errno)); + close(sd); + continue; } if (listen(sd, 5) < 0) { - SCTP_ERROR("listen: %s:%d\n", strerror(errno), errno); - free(sctp_cnx); - sctp_cnx = NULL; - return -1; - } - SCTP_DEBUG("Created listen socket: %d\n", sd); - /* Insert new element at end of list */ - STAILQ_INSERT_TAIL(&sctp_cnx_list, sctp_cnx, entries); - sctp_nb_cnx++; - - /* Add the socket to list of fd monitored by ITTI */ - itti_subscribe_event_fd(TASK_SCTP, sd); - - return sd; -err: - - if (sd != -1) { - close(sd); - sd = -1; + SCTP_WARN("listen() failed: %s:%d\n", strerror(errno), errno); + close(sd); + return -1; } - if (sctp_cnx != NULL) { - free(sctp_cnx); - sctp_cnx = NULL; - } + SCTP_DEBUG("Created listen socket %d on %s:%s local %s\n", sd, ip, port, local); - if (addr != NULL) { - free(addr); - addr = NULL; - } + break; + } + freeaddrinfo(serv); + + if (p == NULL) { + SCTP_ERROR("could not open server socket, no SCTP listener active\n"); return -1; + } + + struct sctp_cnx_list_elm_s *sctp_cnx = calloc(1, sizeof(*sctp_cnx)); + AssertFatal(sctp_cnx != NULL, "out of memory\n"); + + sctp_cnx->connection_type = server_type ? SCTP_TYPE_MULTI_SERVER : SCTP_TYPE_SERVER; + sctp_cnx->sd = sd; + sctp_cnx->local_port = init_p->port; + sctp_cnx->in_streams = in_streams; + sctp_cnx->out_streams = out_streams; + sctp_cnx->ppid = init_p->ppid; + sctp_cnx->task_id = requestor; + sctp_cnx->instance = instance; + /* Insert new element at end of list */ + STAILQ_INSERT_TAIL(&sctp_cnx_list, sctp_cnx, entries); + sctp_nb_cnx++; + + /* Add the socket to list of fd monitored by ITTI */ + itti_subscribe_event_fd(TASK_SCTP, sd); + + return sd; } //------------------------------------------------------------------------------ diff --git a/radio/IRIS/iris_lib.cpp b/radio/IRIS/iris_lib.cpp index 44cea81b4e..927c63d72d 100644 --- a/radio/IRIS/iris_lib.cpp +++ b/radio/IRIS/iris_lib.cpp @@ -133,7 +133,8 @@ static void trx_iris_end(openair0_device *device) { static int -trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) { +trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) +{ using namespace std::chrono; int flag = 0; @@ -158,7 +159,7 @@ trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buf return nsamps; } - if (flags == TX_BURST_START || flags == TX_BURST_MIDDLE) + if (flags == TX_BURST_START || flags == TX_BURST_MIDDLE) { } else if (flags == TX_BURST_END || flags == TX_BURST_START_AND_END) { flag |= SOAPY_SDR_END_BURST; diff --git a/radio/fhi_72/oran-config.c b/radio/fhi_72/oran-config.c index ec7eabc459..853d2cefc4 100644 --- a/radio/fhi_72/oran-config.c +++ b/radio/fhi_72/oran-config.c @@ -34,7 +34,7 @@ static void print_fh_eowd_cmn(unsigned index, const struct xran_ecpri_del_meas_cmn *eowd_cmn) { printf("\ - eowd_cmn[%d]:\n\ + eowd_cmn[%u]:\n\ initiator_en %d\n\ numberOfSamples %d\n\ filterType %d\n\ @@ -61,7 +61,7 @@ static void print_fh_eowd_cmn(unsigned index, const struct xran_ecpri_del_meas_c static void print_fh_eowd_port(unsigned index, unsigned vf, const struct xran_ecpri_del_meas_port *eowd_port) { printf("\ - eowd_port[%d][%d]:\n\ + eowd_port[%u][%u]:\n\ t1 %ld\n\ t2 %ld\n\ tr %ld\n\ diff --git a/radio/fhi_72/oran-init.c b/radio/fhi_72/oran-init.c index f05ae260c5..2fbca36d56 100644 --- a/radio/fhi_72/oran-init.c +++ b/radio/fhi_72/oran-init.c @@ -135,7 +135,7 @@ static uint32_t oran_allocate_uplane_buffers( uint32_t numBufs = XRAN_N_FE_BUF_LEN * ant * XRAN_NUM_OF_SYMBOL_PER_SLOT; status = xran_bm_init(instHandle, &pool, numBufs, bufSize); AssertFatal(XRAN_STATUS_SUCCESS == status, "Failed at xran_bm_init(), status %d\n", status); - printf("xran_bm_init() hInstance %p poolIdx %d elements %d size %d\n", instHandle, pool, numBufs, bufSize); + printf("xran_bm_init() hInstance %p poolIdx %u elements %u size %u\n", instHandle, pool, numBufs, bufSize); int count = 0; for (uint32_t a = 0; a < ant; ++a) { for (uint32_t j = 0; j < XRAN_N_FE_BUF_LEN; ++j) { @@ -158,7 +158,7 @@ static uint32_t oran_allocate_uplane_buffers( } } } - printf("xran_bm_allocate_buffer() hInstance %p poolIdx %d count %d\n", instHandle, pool, count); + printf("xran_bm_allocate_buffer() hInstance %p poolIdx %u count %d\n", instHandle, pool, count); return pool; } @@ -215,14 +215,14 @@ static void oran_allocate_cplane_buffers(void *instHandle, uint32_t bufSizeSec = sizeof(struct xran_section_desc); status = xran_bm_init(instHandle, &poolSec, numBufsSec, bufSizeSec); AssertFatal(XRAN_STATUS_SUCCESS == status, "Failed at xran_bm_init(), status %d\n", status); - printf("xran_bm_init() hInstance %p poolIdx %d elements %d size %d\n", instHandle, poolSec, numBufsSec, bufSizeSec); + printf("xran_bm_init() hInstance %p poolIdx %u elements %u size %u\n", instHandle, poolSec, numBufsSec, bufSizeSec); uint32_t poolPrb; uint32_t numBufsPrb = XRAN_N_FE_BUF_LEN * ant * XRAN_NUM_OF_SYMBOL_PER_SLOT; uint32_t bufSizePrb = size_of_prb_map; status = xran_bm_init(instHandle, &poolPrb, numBufsPrb, bufSizePrb); AssertFatal(XRAN_STATUS_SUCCESS == status, "Failed at xran_bm_init(), status %d\n", status); - printf("xran_bm_init() hInstance %p poolIdx %d elements %d size %d\n", instHandle, poolPrb, numBufsPrb, bufSizePrb); + printf("xran_bm_init() hInstance %p poolIdx %u elements %u size %u\n", instHandle, poolPrb, numBufsPrb, bufSizePrb); uint32_t count1 = 0; uint32_t count2 = 0; @@ -273,8 +273,8 @@ static void oran_allocate_cplane_buffers(void *instHandle, } } } - printf("xran_bm_allocate_buffer() hInstance %p poolIdx %d count %d\n", instHandle, poolPrb, count1); - printf("xran_bm_allocate_buffer() hInstance %p poolIdx %d count %d\n", instHandle, poolSec, count2); + printf("xran_bm_allocate_buffer() hInstance %p poolIdx %u count %u\n", instHandle, poolPrb, count1); + printf("xran_bm_allocate_buffer() hInstance %p poolIdx %u count %u\n", instHandle, poolSec, count2); } /* callback not actively used */ diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf index e1360c1f45..896a03af9f 100644 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf @@ -30,12 +30,7 @@ eNBs = uplink_frequency_offset = -120000000; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.13.11"; }); enable_measurement_reports = "no"; @@ -48,10 +43,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24"; diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf index 0e88f49021..0580d74ce5 100644 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf @@ -42,12 +42,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.13.11"; }); enable_measurement_reports = "no"; @@ -60,10 +55,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24"; diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf index bc41de1874..2785f4a698 100644 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf @@ -29,12 +29,7 @@ eNBs = uplink_frequency_offset = -120000000; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.13.11"; }); enable_measurement_reports = "no"; @@ -47,10 +42,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth1"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf index d52aa0ba0b..e32db67009 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf @@ -176,12 +176,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); enable_measurement_reports = "yes"; @@ -194,9 +189,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.196"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.196"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf index cbad6fe187..8b237d1513 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf @@ -168,12 +168,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.150"; #"192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.150"; }); ///X2 enable_x2 = "yes"; @@ -181,19 +176,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "127.0.0.1"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "127.0.0.1"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.187/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.187/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf index 45f157e0f5..e486be3605 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf @@ -19,7 +19,6 @@ eNBs = ( tr_s_preference = "f1" - local_s_if_name = "lo"; remote_s_address = "192.168.12.4"; local_s_address = "192.168.12.45"; local_s_portc = 501; @@ -177,19 +176,10 @@ eNBs = ( ////////// MME parameters: - mme_ip_address = ( - { - ipv4 = "127.0.1.10"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.1.10"; }); NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.1.30/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.1.30/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "127.0.1.30/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf index 17202fde04..f66bc1b29e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf @@ -63,7 +63,6 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "f1"; - local_n_if_name = "lo"; remote_n_address = "127.0.0.4"; local_n_address = "127.0.0.3"; local_n_portc = 500; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf index cc8df8185a..051c0845b4 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf @@ -354,12 +354,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.3"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.3"; }); enable_measurement_reports = "no"; @@ -373,9 +368,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf index 4723fd3cba..2882356c65 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf @@ -135,12 +135,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); enable_measurement_reports = "no"; @@ -153,10 +148,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf index b8ca6c1365..2e80aaba8c 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf @@ -171,12 +171,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.20"; - ipv6 = "fe80::d65d:dfff:fe1d:f4d4"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.20"; }); enable_measurement_reports = "no"; @@ -189,9 +184,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eno1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.10/8"; - ENB_INTERFACE_NAME_FOR_S1U = "enp5s0"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.10/8"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf index 6669cef9a6..ad1888a8b6 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf @@ -135,12 +135,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); enable_measurement_reports = "no"; @@ -153,10 +148,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf index 4e59f48ca5..99903672cb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf @@ -171,12 +171,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.20"; - ipv6 = "fe80::d65d:dfff:fe1d:f4d4"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.20"; }); enable_measurement_reports = "no"; @@ -189,9 +184,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eno1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.10/8"; - ENB_INTERFACE_NAME_FOR_S1U = "enp5s0"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.10/8"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.25prb.bladerf.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.25prb.bladerf.conf index 985f4eb378..982156d6e0 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.25prb.bladerf.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.25prb.bladerf.conf @@ -174,12 +174,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.148"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.148"; }); enable_measurement_reports = "no"; @@ -192,10 +187,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.196/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth1"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.196/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf index 1770e77199..80db17c5a8 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); ///X2 enable_x2 = "yes"; @@ -188,9 +183,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "enp0s31f6"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.188/23"; - ENB_INTERFACE_NAME_FOR_S1U = "enp0s31f6"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.188/23"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 @@ -201,34 +194,6 @@ eNBs = } ); -DU = ( - { - DU_INTERFACE_NAME_FOR_F1U = "lo"; - DU_IPV4_ADDRESS_FOR_F1U = "127.0.0.1/16"; - DU_PORT_FOR_F1U = 22100; - F1_U_DU_TRANSPORT_TYPE = "TCP"; - } - ); - -CU = ( - { - CU_INTERFACE_NAME_FOR_F1U = "lo"; - CU_IPV4_ADDRESS_FOR_F1U = "127.0.0.1"; //Address to search the DU - CU_PORT_FOR_F1U = 22100; - F1_U_CU_TRANSPORT_TYPE = "TCP"; // One of TCP/UDP/SCTP - DU_TYPE = "LTE"; - }//, -// { -// CU_INTERFACE_NAME_FOR_F1U = "eth0"; -// CU_IPV4_ADDRESS_FOR_F1U = "10.64.93.142"; //Address to search the DU -// CU_PORT_FOR_F1U = 2211; -// F1_U_CU_TRANSPORT_TYPE = "TCP"; // One of TCP/UDP/SCTP -// DU_TYPE = "WiFi"; -// } - ); - - CU_BALANCING = "ALL"; - MACRLCs = ( { num_cc = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf index 8c0f57c65d..ed9c803150 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf @@ -138,12 +138,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.148"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.148"; }); enable_measurement_reports = "no"; @@ -156,9 +151,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth6"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf index 0a1c494f0a..3e006e9bdd 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf @@ -171,12 +171,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.20"; - ipv6 = "fe80::d65d:dfff:fe1d:f4d4"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.20"; }); enable_measurement_reports = "no"; @@ -189,9 +184,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.10/8"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.10/8"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf index 8a91db7e02..2012800542 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.13.11"; }); enable_measurement_reports = "no"; @@ -190,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf index aac2ec5f5e..32ee9b9ff1 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.3"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.3"; }); enable_measurement_reports = "no"; @@ -190,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf index ebeeb25572..2cfada3141 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "10.64.93.19"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "10.64.93.19"; }); enable_measurement_reports = "no"; @@ -190,9 +185,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eno1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "10.64.45.62/23"; - ENB_INTERFACE_NAME_FOR_S1U = "eno1"; ENB_IPV4_ADDRESS_FOR_S1U = "10.64.45.62/23"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 @@ -203,34 +196,6 @@ eNBs = } ); -DU = ( - { - DU_INTERFACE_NAME_FOR_F1U = "lo"; - DU_IPV4_ADDRESS_FOR_F1U = "127.0.0.1/16"; - DU_PORT_FOR_F1U = 22100; - F1_U_DU_TRANSPORT_TYPE = "TCP"; - } - ); - -CU = ( - { - CU_INTERFACE_NAME_FOR_F1U = "lo"; - CU_IPV4_ADDRESS_FOR_F1U = "127.0.0.1"; //Address to search the DU - CU_PORT_FOR_F1U = 22100; - F1_U_CU_TRANSPORT_TYPE = "TCP"; // One of TCP/UDP/SCTP - DU_TYPE = "LTE"; - }//, -// { -// CU_INTERFACE_NAME_FOR_F1U = "eth0"; -// CU_IPV4_ADDRESS_FOR_F1U = "10.64.93.142"; //Address to search the DU -// CU_PORT_FOR_F1U = 2211; -// F1_U_CU_TRANSPORT_TYPE = "TCP"; // One of TCP/UDP/SCTP -// DU_TYPE = "WiFi"; -// } - ); - - CU_BALANCING = "ALL"; - MACRLCs = ( { num_cc = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf index 222b203f71..d74e0afe57 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf @@ -139,12 +139,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); enable_measurement_reports = "no"; @@ -157,9 +152,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf index c09f10ea0b..a14a72b0db 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf @@ -162,12 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -175,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf index 44a17612a9..dd1b4c6478 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf @@ -162,19 +162,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf index 716e222d60..0f81c797f3 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf @@ -161,19 +161,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf index 78bc1220e8..f0be508668 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf @@ -162,12 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "no"; @@ -175,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf index ab78dfb950..7ecc44f395 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf @@ -163,19 +163,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf index 8dd080e1c8..69e664dabc 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf @@ -150,19 +150,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf index b640e2de55..3c8055dc02 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf @@ -150,19 +150,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf index f852550bbe..415727fa09 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf @@ -148,19 +148,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf index 3337f67ac8..a73a099411 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf @@ -148,19 +148,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf index 5c636af06c..2b09a173d4 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf @@ -162,12 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); ///X2 enable_x2 = "yes"; @@ -175,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.12.196"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.12.196"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf index 6666d75de5..8cb63f7768 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf @@ -162,12 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); ///X2 enable_x2 = "yes"; @@ -175,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.12.188"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.12.188"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "enp0s31f6"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.75/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.75/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf index 781384a789..d8649d9211 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf @@ -161,12 +161,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); ///X2 enable_x2 = "yes"; @@ -174,19 +169,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.12.188"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.12.188"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "enp0s31f6"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.75/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.75/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf index 807c7cd28b..b08b98044f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf @@ -210,19 +210,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf index a818071029..097eb6db97 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf @@ -161,19 +161,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index 41403e00b1..dcb5c81dbb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -160,19 +160,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf index 8193e55979..d607700f03 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf @@ -160,19 +160,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf index eaad417c9b..d5c9ab09a9 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf @@ -161,12 +161,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); ///X2 enable_x2 = "no"; @@ -174,19 +169,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.12.108"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.12.108"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.188/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.188/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf index 80d369beff..9e8bc1e771 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf @@ -162,19 +162,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf index f4791448fa..9a86f088c5 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf @@ -161,19 +161,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf index 34a6f35f11..10841c62ef 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf @@ -161,19 +161,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf index c9180420fc..cc49737c1a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf @@ -161,19 +161,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf index 6aaba26991..83663e52ef 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf @@ -162,19 +162,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf index a52841158c..b83075840c 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf @@ -13,7 +13,6 @@ log_config = { # { # num_cc = 1; # tr_n_preference = "nfapi"; -# local_n_if_name = "eno1"; # remote_n_address = "192.168.1.28"; # local_n_address = "192.168.1.74"; # local_n_portc = 50000; @@ -28,10 +27,8 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - #local_n_if_name = "enp0s31f6"; #remote_n_address = "10.0.0.2"; #local_n_address = "10.0.0.1"; - local_n_if_name = "lo"; remote_n_address = "127.0.0.2"; local_n_address = "127.0.0.1"; local_n_portc = 50000; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf index 818cd3a0be..5aa6a207f4 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf @@ -14,7 +14,6 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "lo"; remote_n_address = "127.0.0.2"; // vnf addr local_n_address = "127.0.0.1"; // pnf addr local_n_portc = 50000; // pnf p5 port [!] diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf index 4554a32a18..7c49f8519b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf @@ -141,12 +141,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.3"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.3"; }); enable_measurement_reports = "no"; @@ -159,9 +154,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf index c8bca91ccd..c6b09a0618 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf @@ -141,12 +141,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.56.102"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.56.102"; }); enable_measurement_reports = "no"; @@ -159,9 +154,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "vboxnet0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.56.1/24"; - ENB_INTERFACE_NAME_FOR_S1U = "vboxnet0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.56.1/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 @@ -175,7 +168,6 @@ eNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "eno1"; remote_s_address = "10.0.0.2"; #local_s_address = "192.168.1.78"; local_s_address = "10.0.0.1"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf index 1f72077ba3..04f2bc5d2f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf @@ -172,12 +172,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); enable_measurement_reports = "no"; @@ -190,18 +185,14 @@ eNBs = NETWORK_INTERFACES : { - #ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; #ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; - #ENB_INTERFACE_NAME_FOR_S1U = "lo"; #ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; #ENB_PORT_FOR_S1U = 2152; # Spec 2152 #ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; #ENB_PORT_FOR_X2C = 36422; # Spec 36422 - ENB_INTERFACE_NAME_FOR_S1_MME = "enp0s31f6"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.188/24"; - ENB_INTERFACE_NAME_FOR_S1U = "enp0s31f6"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.188/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 @@ -215,7 +206,6 @@ eNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; local_s_address = "127.0.0.2"; local_s_portc = 50001; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf index 401c42e503..517e8a8892 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf @@ -141,12 +141,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); enable_measurement_reports = "no"; @@ -159,9 +154,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf index 22da6735a2..f74bb99b17 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf @@ -142,12 +142,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.3"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "127.0.0.3"; }); enable_measurement_reports = "no"; @@ -160,9 +155,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf index 1dcef89736..e2706004ea 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf @@ -184,19 +184,12 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.12.26"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; @@ -207,7 +200,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50001; // vnf p5 port diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf index 8bfa97e11b..276cf72f11 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf @@ -138,12 +138,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.150"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.150"; }); enable_measurement_reports = "no"; @@ -156,9 +151,7 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "bond0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.203/24"; - ENB_INTERFACE_NAME_FOR_S1U = "bond0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.203/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.18.203/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf index d2ef01392b..22d05b6419 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf @@ -178,12 +178,7 @@ eNBs = enable_measurement_reports = "yes"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -194,10 +189,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.199/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth1"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.199/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf index d493f29906..b1d4006849 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf @@ -179,12 +179,7 @@ eNBs = enable_measurement_reports = "yes"; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -195,10 +190,8 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.199/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth1"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.199/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf index bbc12027d2..5a60f7e8df 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf @@ -161,12 +161,7 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.69.131"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.69.131"; }); ///X2 enable_x2 = "yes"; @@ -174,19 +169,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf index 6604568be1..8af8d83f2a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf @@ -162,12 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -175,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf index 9ec28b93e7..9c0601b202 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf @@ -161,12 +161,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -174,19 +169,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.196/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.196/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.196/24"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf index ed3a3ce385..299747cd06 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf @@ -164,12 +164,7 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "yes"; @@ -177,19 +172,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf index 493680900c..6730f22b41 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf @@ -21,7 +21,6 @@ gNBs = tr_s_preference = "f1"; - local_s_if_name = "lo"; local_s_address = "127.0.0.4"; remote_s_address = "127.0.0.3"; local_s_portc = 501; @@ -39,19 +38,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.69.131"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.69.131"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.207"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.207"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf index f3c95f1bc7..b8447ca40f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf @@ -168,7 +168,6 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "f1"; - local_n_if_name = "lo"; local_n_address = "127.0.0.3"; remote_n_address = "127.0.0.4"; local_n_portc = 500; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf index 926d8f64d7..b6b17da2a6 100755 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf @@ -208,19 +208,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.69.131"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.69.131"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.196/24"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.196/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf index 149aaedb4c..b3d7171784 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf @@ -190,19 +190,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; @@ -213,7 +206,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50001; // vnf p5 port diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf index eebea7448d..668d4d1a61 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf @@ -192,19 +192,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf index 2f1218eb2b..dea0ae4c43 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf @@ -196,19 +196,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf index 66051ef9bc..e1e12ec2f3 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf @@ -162,21 +162,14 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.199.223"; - ipv6 = "192:168:199::223"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.199.223"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.199.222/24"; - GNB_INTERFACE_NAME_FOR_NGU = "enx000ec6c0a3ac"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.10.100/24"; GNB_PORT_FOR_NGU = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.20.20/24"; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf index bf3aa8185c..d75d39c452 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf @@ -157,19 +157,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf index f8ae069f61..27b3b4b16f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf @@ -164,19 +164,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 4598a8cf90..0b85cdc994 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -158,19 +158,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "internet"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "internet"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf index f1f88890fe..93659bb317 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf @@ -164,19 +164,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf index 21d9a1233f..2b274462bb 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf @@ -159,19 +159,12 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf index 6a460e039a..3f055dd36f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf @@ -175,18 +175,11 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.129/26"; - GNB_INTERFACE_NAME_FOR_NGU = "eno1"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.129/26"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf index 8b82cfb39c..5dc2ba2f80 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf @@ -176,18 +176,11 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.129/26"; - GNB_INTERFACE_NAME_FOR_NGU = "eno1"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.129/26"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf index 2a0fec9ce8..cb68e65d0c 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf @@ -176,18 +176,11 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.129/26"; - GNB_INTERFACE_NAME_FOR_NGU = "eno1"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.129/26"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf index 51b58b7bf7..ba442af9d7 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf @@ -26,7 +26,7 @@ gNBs = pdcch_ConfigSIB1 = ( { - controlResourceSetZero = 11; #10; #thamizh change + controlResourceSetZero = 11; searchSpaceZero = 0; } ); @@ -171,18 +171,11 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.6.5"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.6.5"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno8303"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.108/22"; - GNB_INTERFACE_NAME_FOR_NGU = "eno8303"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.108/22"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf index 42168839c9..186344d81f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf @@ -161,20 +161,11 @@ gNBs = ( ////////// AMF parameters: - amf_ip_address = ( - { - ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 } diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf index 9619ddbcdb..327a109e53 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf @@ -161,20 +161,11 @@ gNBs = ( ////////// AMF parameters: - amf_ip_address = ( - { - ipv4 = "192.168.80.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.80.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.80.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.80.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 } diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf new file mode 100644 index 0000000000..7ad71606fa --- /dev/null +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf @@ -0,0 +1,295 @@ +Active_gNBs = ( "gNB-OAI"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +gNBs = +( + { + ////////// Identification parameters: + gNB_ID = 0xe00; + gNB_name = "gNB-OAI"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ( { sst = 1; }); }); + + nr_cellid = 1; + + ////////// Physical parameters: + + pdsch_AntennaPorts_XP = 2; + pusch_AntennaPorts = 4; + do_CSIRS = 1; + do_SRS = 0 ; + sib1_tda = 15; +# force_UL256qam_off = 1; + + pdcch_ConfigSIB1 = ( + { + controlResourceSetZero = 11; + searchSpaceZero = 0; + } + ); + + servingCellConfigCommon = ( + { + #spCellConfigCommon + + physCellId = 0; + # n_TimingAdvanceOffset = 0; +# downlinkConfigCommon + #frequencyInfoDL + # this is 3450.72 MHz (center frequency) + absoluteFrequencySSB = 623328; + dl_frequencyBand = 78; + # this is 3401.58 MHz + dl_absoluteFrequencyPointA = 620052; + #scs-SpecificCarrierList + dl_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing = 1; + dl_carrierBandwidth = 273; + #initialDownlinkBWP + #genericParameters + initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1 + # +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 1; + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 11; + initialDLBWPsearchSpaceZero = 0; + + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 78; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 273; + pMax = 23; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 1099; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing = 1; + #rach-ConfigCommon + #rach-ConfigGeneric + prach_ConfigurationIndex = 151; +#prach_msg1_FDM +#0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM = 0; + prach_msg1_FrequencyStart = 0; + zeroCorrelationZoneConfig = 0; + preambleReceivedTargetPower = -100; +#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax = 8; +#powerRampingStep +# 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 3; +#ra_ReponseWindow +#1,2,4,8,10,20,40,80 + ra_ResponseWindow = 5; +#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; +#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; +#ra_ContentionResolutionTimer +#(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer = 7; + rsrp_ThresholdSSB = 19; +#prach-RootSequenceIndex_PR +#1 = 839, 2 = 139 + prach_RootSequenceIndex_PR = 2; + prach_RootSequenceIndex = 1; + # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex + # + msg1_SubcarrierSpacing = 1, +# restrictedSetConfig +# 0=unrestricted, 1=restricted type A, 2=restricted type B + restrictedSetConfig = 0, + +# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB + msg3_DeltaPreamble = 2; + p0_NominalWithGrant = -96; + +# pucch-ConfigCommon setup : +# pucchGroupHopping +# 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping = 0; + hoppingId = 0; + p0_nominal = -96; +# ssb_PositionsInBurs_BitmapPR +# 1=short, 2=medium, 3=long + ssb_PositionsInBurst_PR = 2; + ssb_PositionsInBurst_Bitmap = 0x1; + +# ssb_periodicityServingCell +# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 + ssb_periodicityServingCell = 2; + +# dmrs_TypeA_position +# 0 = pos2, 1 = pos3 + dmrs_TypeA_Position = 0; + +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + subcarrierSpacing = 1; + + + #tdd-UL-DL-ConfigurationCommon +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + referenceSubcarrierSpacing = 1; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 6; + nrofDownlinkSlots = 7; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; + + ssPBCH_BlockPower = 0; + } + + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// AMF parameters: + amf_ip_address = ({ ipv4 = "172.21.6.5"; }); + + NETWORK_INTERFACES : + { + GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.51"; + GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.51"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + } +); + +MACRLCs = ( +{ + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + pusch_TargetSNRx10 = 230; + pucch_TargetSNRx10 = 250; + dl_bler_target_upper=.35; + dl_bler_target_lower=.15; + ul_bler_target_upper=.35; + ul_bler_target_lower=.15; + pusch_FailureThres = 1000; + ul_max_mcs = 28; +} +); + +L1s = ( +{ + num_cc = 1; + tr_n_preference = "local_mac"; + prach_dtx_threshold = 100; + pucch0_dtx_threshold = 80; + pusch_dtx_threshold = 10; + max_ldpc_iterations = 15; + tx_amp_backoff_dB = 12; # needs to match O-RU configuration + L1_rx_thread_core = 8; + L1_tx_thread_core = 10; + phase_compensation = 0; # needs to match O-RU configuration +} +); + +RUs = ( +{ + local_rf = "no"; + nb_tx = 4; + nb_rx = 4; + att_tx = 0 + att_rx = 0; + bands = [78]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 75; + sf_extension = 0; + eNB_instances = [0]; + ru_thread_core = 9; + sl_ahead = 10; + ##beamforming 1x2 matrix: 1 layer x 2 antennas + bf_weights = [0x00007fff, 0x0000,0x00007fff, 0x0000]; + tr_preference = "raw_if4p5"; # important: activate FHI7.2 + do_precoding = 0; # needs to match O-RU configuration +} +); + +security = { + # preferred ciphering algorithms + # the first one of the list that an UE supports in chosen + # valid values: nea0, nea1, nea2, nea3 + ciphering_algorithms = ( "nea0" ); + + # preferred integrity algorithms + # the first one of the list that an UE supports in chosen + # valid values: nia0, nia1, nia2, nia3 + integrity_algorithms = ( "nia2", "nia0" ); + + # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter + # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' + drb_ciphering = "yes"; + drb_integrity = "no"; +}; + +log_config : +{ + global_log_level ="info"; + hw_log_level ="info"; + phy_log_level ="info"; + mac_log_level ="info"; + rlc_log_level ="info"; + pdcp_log_level ="info"; + rrc_log_level ="info"; + ngap_log_level ="info"; + f1ap_log_level ="info"; +}; + +fhi_72 = { + dpdk_devices = ("0000:c1:11.0", "0000:c1:11.1"); + system_core = 0; + io_core = 1; + worker_cores = (2); + du_addr = ("00:11:22:33:44:66", "00:11:22:33:44:67"); + ru_addr = ("70:b3:d5:e1:5b:81", "70:b3:d5:e1:5b:81"); + mtu = 9216; + file_prefix = "fhi_72"; + fh_config = ({ + Tadv_cp_dl = 125; + T2a_cp_dl = (259, 500); + T2a_cp_ul = (25, 500); + T2a_up = (134, 375); + Ta3 = (152, 160); + T1a_cp_dl = (419, 470); + T1a_cp_ul = (285, 336); + T1a_up = (294, 345); + Ta4 = (0, 200); + ru_config = { + iq_width = 9; + iq_width_prach = 9; + fft_size = 12; + }; + prach_config = { + eAxC_offset = 4; + }; + }); +}; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf similarity index 89% rename from targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf rename to targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf index 30bd438e4b..919bb45b4c 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel650.conf @@ -11,17 +11,18 @@ gNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ( { sst = 1; }); }); + plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ( { sst = 1;}); }); nr_cellid = 1; ////////// Physical parameters: pdsch_AntennaPorts_XP = 2; - pusch_AntennaPorts = 2; + pusch_AntennaPorts = 4; do_CSIRS = 1; do_SRS = 0 ; sib1_tda = 15; + #force_UL256qam_off = 1; pdcch_ConfigSIB1 = ( { @@ -39,10 +40,10 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL # this is 3450.72 MHz (center frequency) - absoluteFrequencySSB = 630048; + absoluteFrequencySSB = 623328; dl_frequencyBand = 78; # this is 3401.58 MHz - dl_absoluteFrequencyPointA = 626772; + dl_absoluteFrequencyPointA = 620052; #scs-SpecificCarrierList dl_offstToCarrier = 0; # subcarrierSpacing @@ -86,7 +87,7 @@ gNBs = zeroCorrelationZoneConfig = 0; preambleReceivedTargetPower = -100; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 7; + preambleTransMax = 8; #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 3; @@ -159,7 +160,6 @@ gNBs = ); - # ------- SCTP definitions SCTP : { @@ -170,30 +170,24 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.6.5"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.6.5"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno8303"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.108/22"; - GNB_INTERFACE_NAME_FOR_NGU = "eno8303"; - GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.108/22"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.51"; + GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.51"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; } ); + MACRLCs = ( { num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "local_RRC"; - pusch_TargetSNRx10 = 300; + pusch_TargetSNRx10 = 230; pucch_TargetSNRx10 = 230; dl_bler_target_upper=.35; dl_bler_target_lower=.15; @@ -203,6 +197,7 @@ MACRLCs = ( } ); + L1s = ( { num_cc = 1; @@ -210,9 +205,10 @@ L1s = ( prach_dtx_threshold = 100; pucch0_dtx_threshold = 80; pusch_dtx_threshold = 10; - tx_amp_backoff_dB = 20; # needs to match O-RU configuration + max_ldpc_iterations = 10; + tx_amp_backoff_dB = 12; # needs to match O-RU configuration L1_rx_thread_core = 8; - L1_tx_thread_core = 10; + L1_tx_thread_core = 10; # relevant after merge of l1_tx_thread phase_compensation = 0; # needs to match O-RU configuration } ); @@ -221,7 +217,7 @@ RUs = ( { local_rf = "no"; nb_tx = 4; - nb_rx = 2; + nb_rx = 4; att_tx = 0 att_rx = 0; bands = [78]; @@ -229,7 +225,7 @@ RUs = ( max_rxgain = 75; sf_extension = 0; eNB_instances = [0]; - ru_thread_core = 6; + ru_thread_core = 9; sl_ahead = 10; ##beamforming 1x2 matrix: 1 layer x 2 antennas bf_weights = [0x00007fff, 0x0000,0x00007fff, 0x0000]; @@ -269,23 +265,23 @@ log_config : }; fhi_72 = { - dpdk_devices = ("0000:31:06.0", "0000:31:06.1"); + dpdk_devices = ("0000:c1:11.0", "0000:c1:11.1"); system_core = 0; - io_core = 4; + io_core = 1; worker_cores = (2); du_addr = ("00:11:22:33:44:66", "00:11:22:33:44:67"); ru_addr = ("70:b3:d5:e1:5b:ff", "70:b3:d5:e1:5b:ff"); mtu = 9216; file_prefix = "fhi_72"; fh_config = ({ - Tadv_cp_dl = 25; - T2a_cp_dl = (285, 429); - T2a_cp_ul = (285, 429); - T2a_up = (134, 1087); + Tadv_cp_dl = 125; + T2a_cp_dl = (259, 500); + T2a_cp_ul = (25, 500); + T2a_up = (134, 375); Ta3 = (152, 160); - T1a_cp_dl = (258, 392); - T1a_cp_ul = (285, 300); - T1a_up = (155, 300); + T1a_cp_dl = (419, 470); + T1a_cp_ul = (285, 336); + T1a_up = (294, 345); Ta4 = (0, 200); ru_config = { iq_width = 9; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf index 44295c0551..0df4af5faa 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf @@ -170,18 +170,11 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "172.21.6.5"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "172.21.6.5"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eno8303"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.108/22"; - GNB_INTERFACE_NAME_FOR_NGU = "eno8303"; GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.108/22"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf index b883acbd7e..d9b4bbc495 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf @@ -160,19 +160,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf index 6958213f05..a04679eac8 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf @@ -160,19 +160,12 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 4f2843c131..43cafc0931 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -159,19 +159,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf index b40df581d4..aa6b255973 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf @@ -159,12 +159,7 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.5.233"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.5.233"; }); ///X2 enable_x2 = "no"; @@ -172,18 +167,11 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.5.200/24"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.5.200/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.5.200/24"; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf index 6df7390468..29f501295c 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf @@ -172,9 +172,7 @@ gNBs = NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf index fcd7bff5ce..5ec42222de 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf @@ -161,19 +161,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf index 87db51d66c..32725071ce 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf @@ -159,19 +159,12 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "192.168.70.132"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf index 4303f56270..d965d289d1 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf @@ -162,12 +162,7 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.18.99"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ({ ipv4 = "192.168.18.99"; }); ///X2 enable_x2 = "no"; @@ -175,19 +170,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf index 5489822423..86065d2dd9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf @@ -196,19 +196,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf index e76367686b..732c35da31 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf @@ -175,19 +175,12 @@ gNBs = tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "192.168.18.199"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); + target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf index 9d09ed3936..60cab9432c 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf @@ -195,19 +195,12 @@ gNBs = }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; }); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "em1"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "em1"; GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/pnf.sa.band78.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/pnf.sa.band78.rfsim.conf index 1e729f7d02..6c3626ac81 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/pnf.sa.band78.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/pnf.sa.band78.rfsim.conf @@ -3,7 +3,6 @@ L1s = ( { num_cc = 1; tr_n_preference = "nfapi"; - local_n_if_name = "lo"; remote_n_address = "127.0.0.2"; // vnf addr local_n_address = "127.0.0.1"; // pnf addr local_n_portc = 50000; // pnf p5 port [!] diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf index 3d3698b1dc..c048760001 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf @@ -187,9 +187,7 @@ gNBs = NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; @@ -200,7 +198,6 @@ gNBs = MACRLCs = ( { num_cc = 1; - local_s_if_name = "lo:"; remote_s_address = "127.0.0.1"; // pnf addr [!] local_s_address = "127.0.0.2"; // vnf addr local_s_portc = 50001; // vnf p5 port