diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 4e13cdf7b3..8a9919c700 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -397,9 +397,9 @@ class Cluster: # Analyze the logs collectInfo = {} for image, lf in log_files: - ret = cls_containerize.AnalyzeBuildLogs(image, lf) - imgStatus = ret['status'] - msg = f"size {imageSize[image]}, analysis of {os.path.basename(lf)}: {ret['errors']} errors, {ret['warnings']} warnings" + imgStatus, errors = cls_containerize.AnalyzeBuildLogs(image, lf) + info = f"Analysis of {os.path.basename(lf)}: {imgStatus=}, size {imageSize[image]}, {len(errors)} errors" + msg = "\n".join([info] + errors) HTML.CreateHtmlTestRowQueue(image, 'OK' if imgStatus else 'KO', [msg]) status = status and imgStatus diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index cd07851319..71e437676c 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -86,9 +86,9 @@ def CreateTag(ranCommitID, ranBranch, ranAllowMerge): return tagToUse def AnalyzeBuildLogs(image, lf): - errorandwarnings = {} committed = False tagged = False + errors = [] with open(lf, mode='r') as inputfile: for line in inputfile: lineHasTag = re.search(f'Successfully tagged {image}:', str(line)) is not None @@ -97,11 +97,13 @@ def AnalyzeBuildLogs(image, lf): # the OpenShift Cluster builder prepends image registry URL lineHasCommit = re.search(r'COMMIT [a-zA-Z0-9\.:/\-]*' + image, str(line)) is not None committed = committed or lineHasCommit - errorandwarnings['errors'] = 0 if committed or tagged else 1 - errorandwarnings['warnings'] = 0 - errorandwarnings['status'] = committed or tagged - logging.info(f"Analyzing {image}, file {lf}: {errorandwarnings}") - return errorandwarnings + if re.search(r'error:|Errors|ERROR', line): + errors.append(f"=> {line.strip()}") + status = (committed or tagged) and len(errors) == 0 + logging.info(f"Analyzing {image}, file {lf}: {status=}, {len(errors)} errors") + for e in errors: + logging.info(e) + return status, errors def GetImageName(ssh, svcName, file): ret = ssh.run(f"docker compose -f {file} config --format json {svcName} | jq -r '.services.\"{svcName}\".image'", silent=True) @@ -460,9 +462,9 @@ class Containerize(): # Analyze the logs for name, lf in log_files: - ret = AnalyzeBuildLogs(name, lf) - imgStatus = ret['status'] - msg = f"size {allImagesSize[name]}, analysis of {os.path.basename(lf)}: {ret['errors']} errors, {ret['warnings']} warnings" + imgStatus, errors = AnalyzeBuildLogs(name, lf) + info = f"Analysis of {os.path.basename(lf)}: {imgStatus=}, size {allImagesSize[name]}, {len(errors)} errors" + msg = "\n".join([info] + errors) HTML.CreateHtmlTestRowQueue(name, 'OK' if imgStatus else 'KO', [msg]) status = status and imgStatus diff --git a/ci-scripts/cls_module.py b/ci-scripts/cls_module.py index cfdd96477f..17d45828c8 100644 --- a/ci-scripts/cls_module.py +++ b/ci-scripts/cls_module.py @@ -111,10 +111,11 @@ class Module_UE: return self._collectTrace(ctx) return None - def attach(self, attach_tries = 4, attach_timeout = 60): + def attach(self, attach_tries = 3, attach_timeout = 0): ip = None while attach_tries > 0: self._command(self.cmd_dict["attach"]) + attach_timeout += 20 timeout = attach_timeout logging.debug("Waiting for IP address to be assigned") ip = self.getIP(silent=False, reportNonZero=True) diff --git a/ci-scripts/conf_files/gnb-cu.sa.f1.ho.conf b/ci-scripts/conf_files/gnb-cu.sa.f1.ho.conf index f16a94b472..ca1d9de0d7 100644 --- a/ci-scripts/conf_files/gnb-cu.sa.f1.ho.conf +++ b/ci-scripts/conf_files/gnb-cu.sa.f1.ho.conf @@ -53,7 +53,7 @@ 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" ); + ciphering_algorithms = ( "nea2", "nea0" ); # preferred integrity algorithms # the first one of the list that an UE supports in chosen @@ -63,7 +63,7 @@ security = { # 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"; + drb_integrity = "yes"; }; log_config : 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 eb7c1e01e2..737ef0aadf 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 @@ -195,6 +195,7 @@ RUs = ( max_pdschReferenceSignalPower = -27; max_rxgain = 50; eNB_instances = [0]; + sl_ahead = 3; sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2"; } ); diff --git a/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf b/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf index dc24284c18..577e23a87d 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf @@ -209,7 +209,7 @@ 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" ); + ciphering_algorithms = ( "nea2", "nea0" ); # preferred integrity algorithms # the first one of the list that an UE supports in chosen @@ -219,7 +219,7 @@ security = { # 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"; + drb_integrity = "yes"; }; log_config : diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index 336211e558..c73c6dadca 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -247,6 +247,7 @@ UndeployCoreNetwork Terminate EPC + true ltebox-nepes diff --git a/cmake_targets/tools/install_wls_lib.patch b/cmake_targets/tools/install_wls_lib.patch index 5050b79a4e..c551f842b5 100644 --- a/cmake_targets/tools/install_wls_lib.patch +++ b/cmake_targets/tools/install_wls_lib.patch @@ -1,5 +1,5 @@ diff --git a/wls_lib/Makefile b/wls_lib/Makefile -index 2f8e4b2..e657488 100644 +index 2f8e4b2..7b99a26 100644 --- a/wls_lib/Makefile +++ b/wls_lib/Makefile @@ -1,20 +1,6 @@ @@ -23,7 +23,7 @@ index 2f8e4b2..e657488 100644 +################################################################ +# +################################################################ - + MYCUSTOMTAB=' ' MYCUSTOMSPACE='============================================================================================' @@ -24,11 +10,17 @@ MYCUSTOMSPACE1='------------------------------------------------------------' @@ -48,9 +48,12 @@ index 2f8e4b2..e657488 100644 else ifeq ($(WIRELESS_SDK_TOOLCHAIN),icx) CC := icx CPP := icx -@@ -44,9 +36,9 @@ ifeq ($(WIRELESS_SDK_TARGET_ISA),sse) +@@ -42,11 +34,11 @@ endif + ifeq ($(WIRELESS_SDK_TARGET_ISA),sse) + TARGET_PROCESSOR := -xSSE4.2 else ifeq ($(WIRELESS_SDK_TARGET_ISA),avx2) - TARGET_PROCESSOR := -xCORE-AVX2 +- TARGET_PROCESSOR := -xCORE-AVX2 ++ TARGET_PROCESSOR := -march=core-avx2 else ifeq ($(WIRELESS_SDK_TARGET_ISA),avx512) - TARGET_PROCESSOR := -xCORE-AVX512 + TARGET_PROCESSOR := -march=skylake-avx512 @@ -63,7 +66,7 @@ index 2f8e4b2..e657488 100644 @@ -66,15 +58,38 @@ PROJECT_DIR := ./ BUILDDIR := make PROJECT_BINARY := $(PROJECT_NAME).so - + +PKGCONF ?= pkg-config +LIBDPDK_VERSION=20.11.3 + @@ -79,7 +82,7 @@ index 2f8e4b2..e657488 100644 +$(error "Please define RTE_SDK environment variable OR install DPDK version $(LIBDPDK_VERSION)") +endif endif - + -RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk) +# At least one of the options is defined + @@ -88,10 +91,10 @@ index 2f8e4b2..e657488 100644 +else ifeq ($(DPDK_INSTALLED),1) + RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig $(PKGCONF) --cflags-only-I libdpdk) +endif - + CC_SRC = wls_lib_dpdk.c \ syslib.c - + +CC_HDR = syslib.h \ + ttypes.h \ + wls.h \ @@ -104,74 +107,74 @@ index 2f8e4b2..e657488 100644 @@ -84,18 +99,19 @@ CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \ -Wimplicit-function-declaration \ -g -O3 -mcmodel=large $(TARGET_PROCESSOR) - + -INC := -I$(RTE_INC) +INC := -I$(RTE_INC) -I../intel_fapi/ DEF := - + AS_FLAGS := AR_FLAGS := rc - + PROJECT_OBJ_DIR := $(BUILDDIR)/obj +PROJECT_DEP_DIR := $(PROJECT_OBJ_DIR)/$(PROJECT_NAME).dep.d - + CC_OBJS := $(patsubst %.c,%.o,$(CC_SRC)) AS_OBJS := $(patsubst %.s,%.o,$(AS_SRC)) OBJS := $(CC_OBJS) $(AS_OBJS) $(LIBS) -DIRLIST := $(addprefix $(PROJECT_OBJ_DIR)/,$(sort $(dir $(OBJS)))) +DIRLIST := $(addprefix $(PROJECT_OBJ_DIR)/,$(sort $(dir $(OBJS)))) $(PROJECT_DEP_DIR) - + CC_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(CC_OBJS)) - + @@ -104,9 +120,7 @@ CC_FLAGS_FULL := $(CC_FLAGS) $(INC) $(DEF) - + AS_FLAGS := $(AS_FLAGS) $(INC) - + -PROJECT_DEP_FILE := $(PROJECT_OBJ_DIR)/$(PROJECT_NAME).dep - -ifeq ($(wildcard $(PROJECT_DEP_FILE)),$(PROJECT_DEP_FILE)) +ifeq ($(wildcard $(PROJECT_DEP_DIR)),$(PROJECT_DEP_DIR)) GENERATE_DEPS := else - + @@ -119,11 +133,11 @@ all : welcome_line $(PROJECT_BINARY) - + .PHONY : clear_dep clear_dep: - @$(RM) $(PROJECT_DEP_FILE) - @echo [DEP] $(subst $(PROJECT_OBJ_DIR)/,,$(PROJECT_DEP_FILE)) + @echo [DEP] rm $(PROJECT_DEP_DIR)/$(@F).dep + @$(RM) $(PROJECT_DEP_DIR)/$(@F).dep - + -$(CC_DEPS) : - @$(CC) -MM $(subst __up__,../,$(subst __dep__,,$@)) -MT $(PROJECT_OBJ_DIR)/$(patsubst %.c,%.o,$(subst __up__,../,$(subst __dep__,,$@))) $(CC_FLAGS_FULL) >> $(PROJECT_DEP_FILE) +$(CC_DEPS) : $(PROJECT_DEP_DIR) + @$(CC) $(CC_FLAGS_FULL) -MM $(subst __up__,../,$(subst __dep__,,$@)) -MT $(PROJECT_OBJ_DIR)/$(patsubst %.c,%.o,$(subst __up__,../,$(subst __dep__,,$@))) >> $(PROJECT_DEP_DIR)/$(@F).dep - + .PHONY : generate_deps generate_deps : clear_dep $(CC_DEPS) @@ -136,17 +150,17 @@ echo_start_build : $(DIRLIST) : -@$(MD) $@ - + -$(CC_OBJTARGETS) : +$(CC_OBJTARGETS) : $(GENERATE_DEPS) @echo [CC] $(subst $(PROJECT_OBJ_DIR)/,,$@) @$(CC) -c $(CC_FLAGS_FULL) -o"$@" $(patsubst %.o,%.c,$(subst $(PROJECT_OBJ_DIR)/,,$@)) - + -$(AS_OBJTARGETS) : +$(AS_OBJTARGETS) : $(CC_OBJTARGETS) $(CPP_OBJTARGETS) @echo [AS] $(subst $(PROJECT_OBJ_DIR)/,,$@) @$(AS) $(AS_FLAGS) -o"$@" $(patsubst %.o,%.s,$(subst $(PROJECT_OBJ_DIR)/,,$@)) - + -ifeq ($(wildcard $(PROJECT_DEP_FILE)),$(PROJECT_DEP_FILE)) +ifeq ($(wildcard $(PROJECT_DEP_DIR)),$(PROJECT_DEP_DIR)) - + -include $(PROJECT_DEP_FILE) +include $(PROJECT_DEP_DIR)/* - + endif - + @@ -156,7 +170,7 @@ clean: @$(RM) $(CC_OBJTARGETS) $(AS_OBJTARGETS) ifneq ($(wildcard $(PROJECT_DIR)/$(PROJECT_MAKE)),) @@ -179,17 +182,17 @@ index 2f8e4b2..e657488 100644 - @$(RM) $(PROJECT_BINARY) $(PROJECT_BINARY_LIB) $(PROJECT_DEP_FILE) + @$(RM) -rf $(PROJECT_BINARY) $(PROJECT_BINARY_LIB) $(PROJECT_DEP_DIR) endif - + xclean: clean @@ -172,7 +186,24 @@ welcome_line : debug : all release : all - + -$(PROJECT_BINARY) : $(DIRLIST) echo_start_build $(GENERATE_DEPS) $(PRE_BUILD) $(CC_OBJTARGETS) $(AS_OBJTARGETS) +$(PROJECT_BINARY) : $(DIRLIST) echo_start_build $(GENERATE_DEPS) $(CC_OBJTARGETS) $(AS_OBJTARGETS) @echo [AR] $(subst $(BUILDDIR)/,,$@) @$(CC) $(CC_OBJTARGETS) $(AS_OBJTARGETS) -shared -fPIC -o $@ - + +############################################################## +# Install configuration +############################################################## diff --git a/common/utils/LOG/DOC/rtusage.md b/common/utils/LOG/DOC/rtusage.md index c1cd959137..cf2c78da5b 100644 --- a/common/utils/LOG/DOC/rtusage.md +++ b/common/utils/LOG/DOC/rtusage.md @@ -21,7 +21,7 @@ The following options can be specified to trigger the information added in the h - `line_num`: adds the (source code) line number - `time`: add the time since the system started in format `ss.ssssss` (seconds and microseconds sourced from `CLOCK_MONOTONIC`) - `wall_clock`: add the system-wide clock time that measures real (i.e., wall-clock) time in format `ss.ssssss` (seconds and microseconds since 1970-01-01 00:00:00 Coordinated Universal Time (UTC)) -- `utc_time`: add the UTC (Coordinated Universal Time) time in format `YYYY-MM-DD hh:mm:ss.ssssss UTC`. Note that this time is independent of the current time zone (it shows GMT). Also, printing this time has additional overhead compared to other time methods (due to time conversion and formatting). +- `utc_time`: add the UTC (Coordinated Universal Time) time in format `[hh:mm:ss.ssssss]`. Note that this time is independent of the current time zone (it shows GMT). Also, printing this time has additional overhead compared to other time methods (due to time conversion and formatting). Note: `time`, `utc_time` and `wall_clock` are mutually exclusive and cannot be used together. diff --git a/doc/ORAN_FHI7.2_Tutorial.md b/doc/ORAN_FHI7.2_Tutorial.md index 1d7169f29f..5f95921a64 100644 --- a/doc/ORAN_FHI7.2_Tutorial.md +++ b/doc/ORAN_FHI7.2_Tutorial.md @@ -1243,8 +1243,8 @@ In OAI gNB, we support: ``` The reference specifications: -* `O-RAN.WG4.MP.0-v05.00` -* `O-RAN.WG4.MP-YANGs-v04.00` +* `O-RAN.WG4.MP.0-R004-v16.01` +* `O-RAN.WG4.MP-YANGs-R004-v16.01` ## M-plane prerequisites Before proceeding, please make sure you have a support for 7.2 interface, as described in [Prerequisites](#prerequisites). @@ -1366,7 +1366,7 @@ sudo ldconfig If you would like to install these libraries in the custom path, please replace `/usr/local` default path to e.g. `/opt/mplane-v2`. ## Benetel O-RU -Note: Only v1.2.2 RAN550 and RAN650 have been successfully tested. +Note: RAN550/650 v1.2.2 and v1.4.1 have been successfully tested. ### One time steps Connect to the RU as user `root`, enable the mplane service, and reboot: @@ -1400,6 +1400,8 @@ The reference DU configuration file for two Benetel RAN650: [gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf) In order to run gNB/DU with M-plane, we need to modify Tx gain `att_tx` in RU section, as well as the `fhi_72` section in the configuration file. + +**Important note: Benetel v1.4.1 requires only one VF if the same VLAN tag is used for both C-/U-planes. Otherwise, C-plane will not be properly configured. Benetel v1.2.2 will receive the C-plane packets no matter the DU MAC address value.** Example for one RU: ```bash fhi_72 = { @@ -1573,14 +1575,14 @@ sequenceDiagram
-4x4 MIMO and 100MHz BW with Benetel 550 RU example run +4x4 MIMO and 100MHz BW with Benetel 550 RU v1.2.2 example run ``` [HW] [MPLANE] RPC request to RU "192.168.80.9" = with username "oranbenetel" and port ID "830". [HW] [MPLANE] Successfuly connected to RU "192.168.80.9" with username "oranbenetel" and port ID "830". [HW] [MPLANE] RPC request to RU "192.168.80.9" = operational datastore. [HW] [MPLANE] Successfully retrieved operational datastore from RU "192.168.80.9". -[HW] [MPLANE] RU is already PTP synchronized. +[HW] [MPLANE] RU is in "LOCKED" sync state. [HW] [MPLANE] RPC request to RU "192.168.80.9" = with stream "NETCONF" and filter "(null)". [HW] [MPLANE] RPC reply = OK. [HW] [MPLANE] Successfully subscribed to all notifications from RU "192.168.80.9". @@ -2223,6 +2225,861 @@ sequenceDiagram ```
+
+4x4 MIMO and 100MHz BW with Benetel 550 RU v1.4.1 example run + +``` +[HW] [MPLANE] RPC request to RU "192.168.81.4" = with username "oranbenetel" and port ID "830". +[HW] [MPLANE] Successfuly connected to RU "192.168.81.4" with username "oranbenetel" and port ID "830". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = operational datastore. +[HW] [MPLANE] Successfully retrieved operational datastore from RU "192.168.81.4". +[HW] [MPLANE] RU is already PTP synchronized. +[HW] [MPLANE] RPC request to RU "192.168.81.4" = with stream "NETCONF" and filter "(null)". +[HW] [MPLANE] RPC reply = OK. +[HW] [MPLANE] Successfully subscribed to all notifications from RU "192.168.81.4". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = " +65535 +65535 +". +[HW] [MPLANE] Successfully updated supervision timer to (65535+65535)[s] for RU "192.168.81.4". +[HW] [MPLANE] Watchdog timer answer: + 2025-08-29T06:49:32+02:00 + +[HW] [MPLANE] Interface MTU 1500 unreliable/not correctly reported by Benetel O-RU, hardcoding to 9600. +[HW] [MPLANE] IQ bitwidth 16 unreliable/not correctly reported by Benetel O-RU, hardcoding to 9. +[HW] [MPLANE] Storing the following information to forward to xran: + RU MAC address 70:b3:d5:e1:5b:81 + MTU 9600 + IQ bitwidth 9 + PRACH offset 4 + DU port bitmask 61440 + Band sector bitmask 3840 + CC ID bitmask 240 + RU port ID bitmask 15 + DU port ID 0 + Band sector ID 0 + CC ID 0 + RU port ID 0 + max Tx gain 24.0 +[HW] [MPLANE] Successfully retrieved all the U-plane info - interface name, TX/RX carrier names, and TX/RX endpoint names. +[HW] [MPLANE] Successfully retreived all performance measurement names. +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-yang-metadata". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "yang". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-inet-types". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-yang-types". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-yang-schema-mount". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-yang-structure-ext". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-datastores". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "sysrepo". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-netconf-acm". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-factory-default". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "sysrepo-factory-default". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-yang-library". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "sysrepo-monitoring". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "sysrepo-plugind". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-netconf". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-netconf-with-defaults". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-netconf-notifications". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-origin". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-netconf-monitoring". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "ietf-netconf-nmda". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = for module "nc-notifications". +[HW] [MPLANE] [LIBYANG] ERROR: Data model "notifications" not found in local searchdirs. (path: (null)). +[HW] [MPLANE] [LIBYANG] ERROR: Loading "notifications" module failed. (path: (null)). +[HW] [MPLANE] [LIBYANG] ERROR: Parsing module "nc-notifications" failed. (path: (null)). +[HW] [MPLANE] Unable to load module "nc-notifications" from RU "192.168.81.4". +[HW] [MPLANE] Unable to load all yang modules from operational datastore for RU "192.168.81.4". Using yang models present in "models" subfolder. +[HW] [MPLANE] Successfully loaded all yang modules for RU "192.168.81.4". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = : + + + INTERFACE_0 + ianaift:l2vlan + true + 70:b3:d5:e1:5b:81 + eth0 + 3 + + + + 10 + 10 + 10 + + RX_ON_TIME + false + RU + COUNT + + + RX_EARLY + false + RU + COUNT + + + RX_LATE + false + RU + COUNT + + + RX_TOTAL + false + RU + COUNT + + + RX_ON_TIME_C + false + RU + COUNT + + + RX_EARLY_C + false + RU + COUNT + + + RX_LATE_C + false + RU + COUNT + + + TX_TOTAL + false + RU + COUNT + + + + ETH-INTERFACE + + PLANE_0 + + INTERFACE_0 + + 70:b3:d5:e1:5b:81 + 3 + 00:11:22:33:44:66 + + + + + + + PdschLink0 + PLANE_0 + TxArray0 + LowLevelTxEndpoint0 + + + PdschLink1 + PLANE_0 + TxArray1 + LowLevelTxEndpoint1 + + + PdschLink2 + PLANE_0 + TxArray2 + LowLevelTxEndpoint2 + + + PdschLink3 + PLANE_0 + TxArray3 + LowLevelTxEndpoint3 + + + PuschLink0 + PLANE_0 + RxArray0 + LowLevelRxEndpoint0 + + + PrachLink0 + PLANE_0 + RxArray0 + LowLevelRxPrachEndpoint0 + + + PuschLink1 + PLANE_0 + RxArray1 + LowLevelRxEndpoint1 + + + PrachLink1 + PLANE_0 + RxArray1 + LowLevelRxPrachEndpoint1 + + + PuschLink2 + PLANE_0 + RxArray2 + LowLevelRxEndpoint2 + + + PrachLink2 + PLANE_0 + RxArray2 + LowLevelRxPrachEndpoint2 + + + PuschLink3 + PLANE_0 + RxArray3 + LowLevelRxEndpoint3 + + + PrachLink3 + PLANE_0 + RxArray3 + LowLevelRxPrachEndpoint3 + + + LowLevelTxEndpoint0 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + 61440 + 3840 + 240 + 15 + 0 + + + + LowLevelTxEndpoint1 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + 61440 + 3840 + 240 + 15 + 1 + + + + LowLevelTxEndpoint2 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + 61440 + 3840 + 240 + 15 + 2 + + + + LowLevelTxEndpoint3 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + 61440 + 3840 + 240 + 15 + 3 + + + + LowLevelRxEndpoint0 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 0 + + true + + + LowLevelRxPrachEndpoint0 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 4 + + true + + + LowLevelRxEndpoint1 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 1 + + true + + + LowLevelRxPrachEndpoint1 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 5 + + true + + + LowLevelRxEndpoint2 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 2 + + true + + + LowLevelRxPrachEndpoint2 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 6 + + true + + + LowLevelRxEndpoint3 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 3 + + true + + + LowLevelRxPrachEndpoint3 + + 9 + STATIC + + 193 + NORMAL + 352 + 288 + 0 + + KHZ_30 + 0 + + + 61440 + 3840 + 240 + 15 + 7 + + true + + + TxArray0 + 623334 + 3350010000 + 100000000 + ACTIVE + 24.0 + 0 + 0 + + + TxArray1 + 623334 + 3350010000 + 100000000 + ACTIVE + 24.0 + 0 + 0 + + + TxArray2 + 623334 + 3350010000 + 100000000 + ACTIVE + 24.0 + 0 + 0 + + + TxArray3 + 623334 + 3350010000 + 100000000 + ACTIVE + 24.0 + 0 + 0 + + + RxArray0 + 623334 + 3350010000 + 100000000 + ACTIVE + 0 + 0 + 0.0 + 0 + + + RxArray1 + 623334 + 3350010000 + 100000000 + ACTIVE + 0 + 0 + 0.0 + 0 + + + RxArray2 + 623334 + 3350010000 + 100000000 + ACTIVE + 0 + 0 + 0.0 + 0 + + + RxArray3 + 623334 + 3350010000 + 100000000 + ACTIVE + 0 + 0 + 0.0 + 0 + + + +[HW] [MPLANE] RPC reply = OK. +[HW] [MPLANE] Successfully edited the candidate datastore for RU "192.168.81.4". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = candidate datastore. +[HW] [MPLANE] RPC reply = OK. +[HW] [MPLANE] Successfully validated candidate datastore for RU "192.168.81.4". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = candidate datastore. +[HW] [MPLANE] RPC reply = OK. +[HW] [MPLANE] Successfully commited configuration into running datastore for RU "192.168.81.4". +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.335228846+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray0", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.368360865+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray1", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.414703766+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray2", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.452921618+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray3", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.471419021+00:00) +{ + "ietf-netconf-notifications:netconf-config-change": { + "changed-by": { + "username": "root", + "session-id": 0 + }, + "datastore": "running", + "edit": [ + { + "target": "/ietf-interfaces:interfaces/interface[name='INTERFACE_0']", + "operation": "create" + }, + { + "target": "/ietf-interfaces:interfaces/interface[name='INTERFACE_0']/name", + "operation": "create" + }, +... +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.678251110+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray0", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.715498360+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray1", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.830268973+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray2", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:19.853387657+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray3", + "state": "BUSY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.515262267+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray0", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.535692962+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray1", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.557423764+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray2", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.579066867+00:00) +{ + "o-ran-uplane-conf:rx-array-carriers-state-change": { + "rx-array-carriers": [ + { + "name": "RxArray3", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.604192995+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray0", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.629830498+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray1", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.651062685+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray2", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] Received notification from RU "192.168.81.4" at (2025-08-28T10:37:24.672865767+00:00) +{ + "o-ran-uplane-conf:tx-array-carriers-state-change": { + "tx-array-carriers": [ + { + "name": "TxArray3", + "state": "READY" + } + ] + } +} + +[HW] [MPLANE] RU "192.168.81.4" is now ready. +[HW] [MPLANE] RPC request to RU "192.168.81.4" = : + + 10 + 10 + 10 + + RX_ON_TIME + true + RU + COUNT + + + RX_EARLY + true + RU + COUNT + + + RX_LATE + true + RU + COUNT + + + RX_TOTAL + true + RU + COUNT + + + RX_ON_TIME_C + true + RU + COUNT + + + RX_EARLY_C + true + RU + COUNT + + + RX_LATE_C + true + RU + COUNT + + + TX_TOTAL + true + RU + COUNT + + + +[HW] [MPLANE] RPC reply = OK. +[HW] [MPLANE] Successfully edited the candidate datastore for RU "192.168.81.4". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = candidate datastore. +[HW] [MPLANE] RPC reply = OK. +[HW] [MPLANE] Successfully validated candidate datastore for RU "192.168.81.4". +[HW] [MPLANE] RPC request to RU "192.168.81.4" = candidate datastore. +[HW] [MPLANE] RPC reply = OK. +[HW] [MPLANE] Successfully commited configuration into running datastore for RU "192.168.81.4". +[HW] [MPLANE] Sucessfully activated PM after start-up procedure for RU "192.168.81.4". +``` +
Note: If you wish to run the fronthaul without M-plane, no need for recompilation, as the library `oran_fhlib_5g` already exists. The only mandatory step is to link `oran_fhlib_5g` to `oai_transpro` library. diff --git a/doc/nfapi.md b/doc/nfapi.md index 8b9197b056..b901b15269 100644 --- a/doc/nfapi.md +++ b/doc/nfapi.md @@ -194,14 +194,19 @@ Clone the Radisys repository (We're currently using the `oai_integration` branch git clone https://gerrit.o-ran-sc.org/r/o-du/l2 -b oai-integration -Build the O-DU +Build the O-DU (More details can be found in O-RAN's documentation page [here](https://docs.o-ran-sc.org/projects/o-ran-sc-o-du-l2/en/latest/user-guide.html#i-execution-on-locally-compiling-o-du-high-source-code)) cd ~/l2/build/odu make clean_all;make odu PHY=INTEL_L1 MACHINE=BIT64 MODE=TDD;make cu_stub NODE=TEST_STUB MACHINE=BIT64 MODE=TDD;make ric_stub NODE=TEST_STUB MACHINE=BIT64 MODE=TDD +The O-DU requires some virtual interfaces to be setup in order to enable communication between the O-DU, CU_stub and RIC_stub Setup local interfaces for the cu_stub, ric_stub and o_du +The IP addresses shown match the ones specified in OSC ODU configuration file, found in /build/config/tdd_odu_config.xml +The parameters referenced are , and - sudo ifconfig enp7s0:ODU "192.168.130.81" && sudo ifconfig enp7s0:CU_STUB "192.168.130.82" && sudo ifconfig enp7s0:RIC_STUB "192.168.130.80" + sudo ifconfig :ODU "192.168.130.81" + sudo ifconfig :CU_STUB "192.168.130.82" + sudo ifconfig :RIC_STUB "192.168.130.80" Run cu_stu and ric_stub in separate terminals diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 125bfbd898..3e22659400 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -720,6 +720,8 @@ int main( int argc, char **argv ) { itti_wait_tasks_end(NULL); printf("Returned from ITTI signal handler\n"); + nfapi_stop_l1(); + if (RC.nb_nr_L1_inst > 0 || RC.nb_RU > 0) stop_L1(0); diff --git a/nfapi/oai_integration/aerial/fapi_nvIPC.c b/nfapi/oai_integration/aerial/fapi_nvIPC.c index b1bfae5415..05c08d391d 100644 --- a/nfapi/oai_integration/aerial/fapi_nvIPC.c +++ b/nfapi/oai_integration/aerial/fapi_nvIPC.c @@ -63,12 +63,20 @@ char cpu_buf_recv[RECV_BUF_LEN]; uint16_t sfn = 0, slot = 0; nv_ipc_t *ipc; -nfapi_vnf_config_t *vnf_config = 0; - -void set_config(nfapi_vnf_config_t *conf) +void nvIPC_Stop() { - vnf_config = conf; + LOG_I(NR_MAC, "Received STOP.indication\n"); + ((vnf_t *)get_config())->terminate = true; } + +void nvIPC_send_stop_request() +{ + nfapi_nr_stop_request_scf_t req = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST, .header.phy_id = 0}; + LOG_I(NR_MAC, "Sending NFAPI STOP.request\n"); + nfapi_nr_vnf_stop_req(get_config(), get_config()->pnf_list->p5_idx, &req); +} + + static uint16_t old_sfn = 0; static uint16_t old_slot = 0; //////////////////////////////////////////////////////////////////////// @@ -84,6 +92,7 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg) uint8_t *end = msg->msg_buf + msg->msg_len; // unpack FAPI messages and handle them + nfapi_vnf_config_t * vnf_config = get_config(); if (vnf_config != 0) { // first, unpack the header fapi_phy_api_msg fapi_msg; @@ -479,7 +488,6 @@ static int aerial_recv_msg(nv_ipc_t *ipc, nv_ipc_msg_t *recv_msg) return 0; } -bool recv_task_running = false; void *epoll_recv_task(void *arg) { struct epoll_event ev, events[MAX_EVENTS]; @@ -497,11 +505,12 @@ void *epoll_recv_task(void *arg) if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, ev.data.fd, &ev) == -1) { LOG_E(NFAPI_VNF, "%s epoll_ctl failed\n", __func__); } - - while (1) { - if (!recv_task_running) { - recv_task_running = true; - } + // From here on out the thread is ready to receive data, simulate the reception + // of a PARAM.response to get the VNF to send a CONFIG.request + nfapi_nr_param_response_scf_t resp_msg = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_PARAM_RESPONSE}; + nfapi_vnf_config_t * vnf_config = get_config(); + vnf_config->nr_param_resp(vnf_config, 1, &resp_msg); + while (((vnf_t *)vnf_config)->terminate == false) { LOG_D(NFAPI_VNF, "%s: epoll_wait fd_rx=%d ...\n", __func__, ipc_rx_event_fd); int nfds; @@ -524,6 +533,7 @@ void *epoll_recv_task(void *arg) } } close(epoll_fd); + ipc->ipc_destroy(ipc); return NULL; } @@ -568,21 +578,18 @@ int nvIPC_Init(nvipc_params_t nvipc_params_s) LOG_I(NFAPI_VNF, "%s: create IPC interface successful\n", __func__); sleep(1); create_recv_thread(nvipc_params_s.nvipc_poll_core); - while(!recv_task_running){usleep(100000);} - nfapi_nr_param_response_scf_t resp_msg; - vnf_config->nr_param_resp(vnf_config, 1, &resp_msg); return 0; } int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) { - nfapi_vnf_p7_config_t *p7_config = (((vnf_info *)vnf_config->user_data)->p7_vnfs[0].config); + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); ul_tti_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! ul_tti_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST; // int retval = nfapi_vnf_p7_ul_tti_req(p7_config, ul_tti_req); - int retval = p7_config->send_p7_msg((vnf_p7_t *)p7_config, &ul_tti_req->header); + int retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_tti_req->header); if (retval != 0) { LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); @@ -598,11 +605,11 @@ int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) int oai_fapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) { - nfapi_vnf_p7_config_t *p7_config = (((vnf_info *)vnf_config->user_data)->p7_vnfs[0].config); + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); ul_dci_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! ul_dci_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST; // int retval = nfapi_vnf_p7_ul_dci_req(p7_config, ul_dci_req); - int retval = p7_config->send_p7_msg((vnf_p7_t *)p7_config, &ul_dci_req->header); + int retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_dci_req->header); if (retval != 0) { LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); } else { @@ -613,12 +620,12 @@ int oai_fapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) int oai_fapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) { - nfapi_vnf_p7_config_t *p7_config = (((vnf_info *)vnf_config->user_data)->p7_vnfs[0].config); + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); tx_data_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! tx_data_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST; // LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_data_req->SFN), // tx_data_req->Number_of_PDUs); int retval = nfapi_vnf_p7_tx_data_req(p7_config, tx_data_req); - int retval = p7_config->send_p7_msg((vnf_p7_t *)p7_config, &tx_data_req->header); + int retval = p7_config->send_p7_msg(get_p7_vnf(), &tx_data_req->header); if (retval != 0) { LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); } else { @@ -630,10 +637,10 @@ int oai_fapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { - nfapi_vnf_p7_config_t *p7_config = (((vnf_info *)vnf_config->user_data)->p7_vnfs[0].config); + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); dl_config_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST; dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! - int retval = p7_config->send_p7_msg((vnf_p7_t *)p7_config, &dl_config_req->header); + int retval = p7_config->send_p7_msg(get_p7_vnf(), &dl_config_req->header); dl_config_req->dl_tti_request_body.nPDUs = 0; dl_config_req->dl_tti_request_body.nGroup = 0; @@ -644,9 +651,9 @@ int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) } int oai_fapi_send_end_request(int cell, uint32_t frame, uint32_t slot){ - nfapi_vnf_p7_config_t *p7_config = (((vnf_info *)vnf_config->user_data)->p7_vnfs[0].config); + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); nfapi_nr_slot_indication_scf_t nr_slot_resp = {.header.message_id = 0x8F, .sfn = frame, .slot = slot}; - int retval = p7_config->send_p7_msg((vnf_p7_t *)p7_config, &nr_slot_resp.header); + int retval = p7_config->send_p7_msg(get_p7_vnf(), &nr_slot_resp.header); if (retval != 0) { LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); } diff --git a/nfapi/oai_integration/aerial/fapi_nvIPC.h b/nfapi/oai_integration/aerial/fapi_nvIPC.h index 482d8103f0..8740c1ecd3 100644 --- a/nfapi/oai_integration/aerial/fapi_nvIPC.h +++ b/nfapi/oai_integration/aerial/fapi_nvIPC.h @@ -56,11 +56,13 @@ bool aerial_send_P7_msg_with_data(void *packedBuf, void *dataBuf, uint32_t dataLength, nfapi_nr_p7_message_header_t *header); -void set_config(nfapi_vnf_config_t *conf); + int nvIPC_Init(nvipc_params_t nvipc_params_s); int oai_fapi_send_end_request(int cell_id, uint32_t frame, uint32_t slot); int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req); int oai_fapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req); int oai_fapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req); int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req); +void nvIPC_Stop(); +void nvIPC_send_stop_request(); #endif // OPENAIRINTERFACE_FAPI_NVIPC_H diff --git a/nfapi/oai_integration/nfapi_pnf.c b/nfapi/oai_integration/nfapi_pnf.c index bb3ac8555b..7a6e4f7657 100644 --- a/nfapi/oai_integration/nfapi_pnf.c +++ b/nfapi/oai_integration/nfapi_pnf.c @@ -1780,6 +1780,35 @@ int nr_start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nf return 0; } +void stop_nr_nfapi_pnf() +{ +#ifdef ENABLE_WLS + wls_fapi_nr_pnf_stop(); +#endif +#ifdef ENABLE_SOCKET + socket_nfapi_nr_pnf_stop(); +#endif +} +static bool has_sent_stop_ind = false; +int nr_stop_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi_nr_stop_request_scf_t *req) +{ + if (has_sent_stop_ind) { + // STOP.indication already sent, nothing to do + return 0; + } + NFAPI_TRACE(NFAPI_TRACE_INFO, "Send STOP.indication\n"); + nfapi_nr_stop_indication_scf_t resp = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION, + .header.phy_id = req->header.phy_id}; + nfapi_nr_stop_indication(config, &resp); + has_sent_stop_ind = true; +#ifdef ENABLE_WLS + wls_pnf_close(pnf_p5_init_and_receive_pthread); +#endif + // raise the SIGTERM to simulate CTRL+C + raise(SIGTERM); + return 0; +} + int measurement_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi_measurement_request_t *req) { nfapi_measurement_response_t resp; memset(&resp, 0, sizeof(resp)); @@ -2135,6 +2164,7 @@ void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_add config->nr_param_req = &nr_param_request; config->nr_config_req = &nr_config_request; config->nr_start_req = &nr_start_request; + config->nr_stop_req = &nr_stop_request; config->rssi_req = &rssi_request; config->broadcast_detect_req = &broadcast_detect_request; config->system_information_schedule_req = &system_information_schedule_request; diff --git a/nfapi/oai_integration/nfapi_pnf.h b/nfapi/oai_integration/nfapi_pnf.h index ad2df72ad3..f632eaabcd 100644 --- a/nfapi/oai_integration/nfapi_pnf.h +++ b/nfapi/oai_integration/nfapi_pnf.h @@ -38,5 +38,5 @@ int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind); int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind); int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind); int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind); - +void stop_nr_nfapi_pnf(); #endif /* NFAPI_PNF_H_ */ diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index b251d9d762..777da7c319 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -70,10 +70,25 @@ #endif #define TEST - +static nfapi_vnf_config_t *config; extern RAN_CONTEXT_t RC; extern UL_RCC_IND_t UL_RCC_INFO; +nfapi_vnf_config_t * get_config() +{ + return config; +} +vnf_p7_t *get_p7_vnf() +{ + vnf_info *vnf = config->user_data; + return (vnf_p7_t *)vnf->p7_vnfs->config; +} + +nfapi_vnf_p7_config_t *get_p7_vnf_config() +{ + return &get_p7_vnf()->_public; +} + int vnf_pack_vendor_extension_tlv(void *ve, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *codec) { //NFAPI_TRACE(NFAPI_TRACE_INFO, "vnf_pack_vendor_extension_tlv\n"); nfapi_tl_t *tlv = (nfapi_tl_t *)ve; @@ -1251,7 +1266,6 @@ void *configure_nr_p7_vnf(void *ptr) p7_vnf->config->hdr_unpack_func = &fapi_nr_p7_message_header_unpack; p7_vnf->config->pack_func = &fapi_nr_p7_message_pack; p7_vnf->config->send_p7_msg = &wls_vnf_nr_send_p7_message; - wls_vnf_set_p7_config(p7_vnf->config); #endif #ifdef ENABLE_SOCKET @@ -1645,32 +1659,86 @@ void vnf_start_thread(void *ptr) { nfapi_vnf_start((nfapi_vnf_config_t *)ptr); } -static vnf_info vnf; +static bool has_stop_ind = false; +static bool waiting_stop_ind = false; +int nr_stop_ind_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_stop_indication_scf_t *resp) +{ + NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Received NFAPI_STOP_IND idx:%d phy_id:%d\n", p5_idx, resp->header.phy_id); + has_stop_ind = true; +#ifdef ENABLE_AERIAL + nvIPC_Stop(); +#endif +#ifdef ENABLE_SOCKET + nfapi_vnf_p7_stop(get_p7_vnf_config()); +#endif +#ifdef ENABLE_WLS + wls_vnf_stop(); +#endif + if (!waiting_stop_ind) { + // hasn't been initialized yet, means the PNF stopped before the VNF did + // raise a SIGINT to stop the VNF + raise(SIGINT); + } + return 0; +} + +void stop_nr_nfapi_vnf() +{ + if (has_stop_ind) { + // If it got here with the STOP.indication flag already set, it means it was triggered by the PNF, + // no need to send a STOP.request + return; + } +#ifdef ENABLE_WLS + wls_vnf_send_stop_request(); +#endif +#ifdef ENABLE_AERIAL + nvIPC_send_stop_request(); +#endif +#ifdef ENABLE_SOCKET + socket_nfapi_send_stop_request((vnf_t *)config); +#endif + waiting_stop_ind = true; + uint64_t counter = 0; + vnf_p7_t *p7_vnf = get_p7_vnf(); + while (p7_vnf->terminate == 0 && counter < 50) { + NFAPI_TRACE(NFAPI_TRACE_DEBUG, "Not terminated yet, counter %ld\n", counter); + usleep(1000); + counter++; + } + if (p7_vnf->terminate == 0) { + NFAPI_TRACE(NFAPI_TRACE_ERROR, "STOP.indication timed out, exiting\n"); + nfapi_nr_stop_indication_scf_t msg = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION, .header.phy_id = 0}; + config->nr_stop_ind(config, 0, &msg); + } else { + NFAPI_TRACE(NFAPI_TRACE_DEBUG, "Terminated, exiting\n"); + } +} void configure_nr_nfapi_vnf(eth_params_t params) { #ifndef ENABLE_AERIAL nfapi_setmode(NFAPI_MODE_VNF); #endif - memset(&vnf, 0, sizeof(vnf)); - memset(vnf.p7_vnfs, 0, sizeof(vnf.p7_vnfs)); - vnf.p7_vnfs[0].timing_window = 30; - vnf.p7_vnfs[0].periodic_timing_enabled = 0; - vnf.p7_vnfs[0].aperiodic_timing_enabled = 0; - vnf.p7_vnfs[0].periodic_timing_period = 1; - vnf.p7_vnfs[0].config = nfapi_vnf_p7_config_create(); + vnf_info *vnf = calloc(1, sizeof(vnf_info)); + memset(vnf->p7_vnfs, 0, sizeof(vnf->p7_vnfs)); + vnf->p7_vnfs[0].timing_window = 30; + vnf->p7_vnfs[0].periodic_timing_enabled = 0; + vnf->p7_vnfs[0].aperiodic_timing_enabled = 0; + vnf->p7_vnfs[0].periodic_timing_period = 1; + vnf->p7_vnfs[0].config = nfapi_vnf_p7_config_create(); #ifndef ENABLE_AERIAL NFAPI_TRACE(NFAPI_TRACE_INFO, - "[VNF] %s() vnf.p7_vnfs[0].config:%p VNF ADDRESS:%s:%d\n", + "[VNF] %s() vnf->p7_vnfs[0].config:%p VNF ADDRESS:%s:%d\n", __FUNCTION__, - vnf.p7_vnfs[0].config, + vnf->p7_vnfs[0].config, params.my_addr, params.my_portc); - strcpy(vnf.p7_vnfs[0].local_addr, params.my_addr); - vnf.p7_vnfs[0].local_port = params.my_portd; + strcpy(vnf->p7_vnfs[0].local_addr, params.my_addr); + vnf->p7_vnfs[0].local_port = params.my_portd; #endif - vnf.p7_vnfs[0].mac = (mac_t *)malloc(sizeof(mac_t)); - nfapi_vnf_config_t *config = nfapi_vnf_config_create(); + vnf->p7_vnfs[0].mac = malloc(sizeof(mac_t)); + config = nfapi_vnf_config_create(); config->malloc = malloc; config->free = free; config->vnf_p5_port = params.my_portc; @@ -1688,9 +1756,10 @@ void configure_nr_nfapi_vnf(eth_params_t params) config->nr_param_resp = &nr_param_resp_cb; config->nr_config_resp = &nr_config_resp_cb; config->nr_start_resp = &nr_start_resp_cb; + config->nr_stop_ind = &nr_stop_ind_cb; config->nr_error_ind = &nr_error_ind_cb; config->vendor_ext = &vendor_nr_ext_cb; - config->user_data = &vnf; + config->user_data = vnf; // To allow custom vendor extentions to be added to nfapi config->codec_config.unpack_vendor_extension_tlv = &vnf_nr_unpack_vendor_extension_tlv; config->codec_config.pack_vendor_extension_tlv = &vnf_nr_pack_vendor_extension_tlv; @@ -1727,7 +1796,6 @@ void configure_nr_nfapi_vnf(eth_params_t params) config->hdr_unpack_func = &fapi_nr_message_header_unpack; config->pack_func = &fapi_nr_p5_message_pack; config->send_p5_msg = &aerial_nr_send_p5_message; - set_config(config); NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Created VNF NFAPI start thread %s\n", __FUNCTION__); nfapi_vnf_pnf_info_t *pnf = (nfapi_vnf_pnf_info_t *)malloc(sizeof(nfapi_vnf_pnf_info_t)); NFAPI_TRACE(NFAPI_TRACE_INFO, "MALLOC nfapi_vnf_pnf_info_t for pnf_list pnf:%p\n", pnf); @@ -1736,7 +1804,6 @@ void configure_nr_nfapi_vnf(eth_params_t params) pnf->connected = 1; // Add needed parameters - vnf_info *vnf = (vnf_info *)(config->user_data); pnf_info *pnf_info = vnf->pnfs; for (int i = 0; i < 1; ++i) { @@ -1773,18 +1840,23 @@ void configure_nr_nfapi_vnf(eth_params_t params) void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { nfapi_setmode(NFAPI_MODE_VNF); - memset(&vnf, 0, sizeof(vnf)); - memset(vnf.p7_vnfs, 0, sizeof(vnf.p7_vnfs)); - vnf.p7_vnfs[0].timing_window = 32; - vnf.p7_vnfs[0].periodic_timing_enabled = 1; - vnf.p7_vnfs[0].aperiodic_timing_enabled = 0; - vnf.p7_vnfs[0].periodic_timing_period = 10; - vnf.p7_vnfs[0].config = nfapi_vnf_p7_config_create(); - NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() vnf.p7_vnfs[0].config:%p VNF ADDRESS:%s:%d\n", __FUNCTION__, vnf.p7_vnfs[0].config, vnf_addr, vnf_p5_port); - strcpy(vnf.p7_vnfs[0].local_addr, vnf_addr); - vnf.p7_vnfs[0].local_port = vnf_p7_port; - vnf.p7_vnfs[0].mac = (mac_t *)malloc(sizeof(mac_t)); - nfapi_vnf_config_t *config = nfapi_vnf_config_create(); + vnf_info *vnf = calloc(1, sizeof(vnf_info)); + memset(vnf->p7_vnfs, 0, sizeof(vnf->p7_vnfs)); + vnf->p7_vnfs[0].timing_window = 32; + vnf->p7_vnfs[0].periodic_timing_enabled = 1; + vnf->p7_vnfs[0].aperiodic_timing_enabled = 0; + vnf->p7_vnfs[0].periodic_timing_period = 10; + vnf->p7_vnfs[0].config = nfapi_vnf_p7_config_create(); + NFAPI_TRACE(NFAPI_TRACE_INFO, + "[VNF] %s() vnf.p7_vnfs[0].config:%p VNF ADDRESS:%s:%d\n", + __FUNCTION__, + vnf->p7_vnfs[0].config, + vnf_addr, + vnf_p5_port); + strcpy(vnf->p7_vnfs[0].local_addr, vnf_addr); + vnf->p7_vnfs[0].local_port = vnf_p7_port; + vnf->p7_vnfs[0].mac = malloc(sizeof(mac_t)); + config = nfapi_vnf_config_create(); config->malloc = malloc; config->free = free; config->vnf_p5_port = vnf_p5_port; @@ -1803,7 +1875,7 @@ void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int config->config_resp = &config_resp_cb; config->start_resp = &start_resp_cb; config->vendor_ext = &vendor_ext_cb; - config->user_data = &vnf; + config->user_data = vnf; // To allow custom vendor extentions to be added to nfapi config->codec_config.unpack_vendor_extension_tlv = &vnf_unpack_vendor_extension_tlv; config->codec_config.pack_vendor_extension_tlv = &vnf_pack_vendor_extension_tlv; @@ -1820,7 +1892,7 @@ void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int } int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); dl_config_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! dl_config_req->header.message_id = NFAPI_DL_CONFIG_REQUEST; LOG_D(PHY, "[VNF] %s() DL_CONFIG_REQ sfn_sf:%d_%d number_of_pdus:%d\n", __FUNCTION__, @@ -1856,7 +1928,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { LOG_D(NR_PHY, "Entering oai_nfapi_nr_dl_config_req sfn:%d,slot:%d\n", dl_config_req->SFN, dl_config_req->Slot); - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); dl_config_req->header.message_id= NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST; dl_config_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! @@ -1875,7 +1947,7 @@ int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) { LOG_D(NR_PHY, "Entering oai_nfapi_nr_tx_data_req sfn:%d,slot:%d\n", tx_data_req->SFN, tx_data_req->Slot); - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); tx_data_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! tx_data_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST; //LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus); @@ -1892,7 +1964,7 @@ int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); tx_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! tx_req->header.message_id = NFAPI_TX_REQUEST; //LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus); @@ -1908,7 +1980,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) } int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) { - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); ul_dci_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! ul_dci_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST; //LOG_D(PHY, "[VNF] %s() HI_DCI0_REQ sfn_sf:%d dci:%d hi:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(hi_dci0_req->sfn_sf), hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_hi); @@ -1924,7 +1996,7 @@ int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) { } int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); hi_dci0_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST; //LOG_D(PHY, "[VNF] %s() HI_DCI0_REQ sfn_sf:%d dci:%d hi:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(hi_dci0_req->sfn_sf), hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_hi); @@ -1960,7 +2032,7 @@ static void remove_ul_config_req_pdu(int index, nfapi_ul_config_request_t *ul_co } int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) { - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); ul_tti_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! ul_tti_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST; @@ -1980,7 +2052,7 @@ int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) { } int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); ul_config_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! ul_config_req->header.message_id = NFAPI_UL_CONFIG_REQUEST; //LOG_D(PHY, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, ul_config_req->header.message_id); @@ -2040,7 +2112,7 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { int oai_nfapi_ue_release_req(nfapi_ue_release_request_t *release_req){ if(release_req->ue_release_request_body.number_of_TLVs <= 0) return 0; - nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; + nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); release_req->header.phy_id = 1; // HACK TODO FIXME - need to pass this around!!!! release_req->header.message_id = NFAPI_UE_RELEASE_REQUEST; diff --git a/nfapi/oai_integration/nfapi_vnf.h b/nfapi/oai_integration/nfapi_vnf.h index 104cff44f4..d71f9a2926 100644 --- a/nfapi/oai_integration/nfapi_vnf.h +++ b/nfapi/oai_integration/nfapi_vnf.h @@ -148,5 +148,8 @@ typedef struct { void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port); void configure_nr_nfapi_vnf(eth_params_t params); - +void stop_nr_nfapi_vnf(); +nfapi_vnf_config_t *get_config(); +vnf_p7_t *get_p7_vnf(); +nfapi_vnf_p7_config_t *get_p7_vnf_config(); #endif /* NFAPI_VNF_H_ */ diff --git a/nfapi/oai_integration/socket/include/socket_pnf.h b/nfapi/oai_integration/socket/include/socket_pnf.h index ccb3eaea3a..cf5258eabb 100644 --- a/nfapi/oai_integration/socket/include/socket_pnf.h +++ b/nfapi/oai_integration/socket/include/socket_pnf.h @@ -36,4 +36,5 @@ bool pnf_nr_send_p5_message(pnf_t *pnf, nfapi_nr_p4_p5_message_header_t *msg, ui bool pnf_nr_send_p7_message(pnf_p7_t* pnf_p7, nfapi_nr_p7_message_header_t* header, uint32_t msg_len); void *pnf_start_p5_thread(void *ptr); void *pnf_nr_p7_thread_start(void *ptr); +void socket_nfapi_nr_pnf_stop(); #endif // SOCKET_PNF_H diff --git a/nfapi/oai_integration/socket/include/socket_vnf.h b/nfapi/oai_integration/socket/include/socket_vnf.h index c11e009153..65c36d034f 100644 --- a/nfapi/oai_integration/socket/include/socket_vnf.h +++ b/nfapi/oai_integration/socket/include/socket_vnf.h @@ -31,4 +31,5 @@ bool vnf_nr_send_p5_msg(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_head bool vnf_nr_send_p7_msg(vnf_p7_t *vnf_p7, nfapi_nr_p7_message_header_t* header); void vnf_start_p5_thread(void* ptr); void* vnf_nr_start_p7_thread(void* ptr); +void socket_nfapi_send_stop_request(vnf_t *vnf); #endif // SOCKET_VNF_H diff --git a/nfapi/oai_integration/socket/socket_pnf.c b/nfapi/oai_integration/socket/socket_pnf.c index fe4999c998..6a96247b74 100644 --- a/nfapi/oai_integration/socket/socket_pnf.c +++ b/nfapi/oai_integration/socket/socket_pnf.c @@ -20,6 +20,15 @@ */ #include "socket_pnf.h" #include "nfapi.h" +static nfapi_pnf_config_t *config; +void socket_nfapi_nr_pnf_stop() +{ + AssertFatal(config->nr_stop_req, "STOP.request Handler should be set!"); + nfapi_nr_stop_request_scf_t req = {0}; + req.header.phy_id = 0; + req.header.message_id = NFAPI_NR_PHY_MSG_TYPE_PNF_STOP_REQUEST; + config->nr_stop_req(config, 0, &req); +} bool pnf_nr_send_p5_message(pnf_t *pnf, nfapi_nr_p4_p5_message_header_t *msg, uint32_t msg_len) { @@ -148,7 +157,7 @@ bool pnf_nr_send_p7_message(pnf_p7_t *pnf_p7, nfapi_nr_p7_message_header_t *head void *pnf_start_p5_thread(void *ptr) { NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] IN PNF NFAPI start thread %s\n", __FUNCTION__); - nfapi_pnf_config_t *config = (nfapi_pnf_config_t *)ptr; + config = (nfapi_pnf_config_t *)ptr; struct sched_param sp; sp.sched_priority = 20; pthread_setschedparam(pthread_self(), SCHED_FIFO, &sp); diff --git a/nfapi/oai_integration/socket/socket_vnf.c b/nfapi/oai_integration/socket/socket_vnf.c index 6440109ed6..75d4a37026 100644 --- a/nfapi/oai_integration/socket/socket_vnf.c +++ b/nfapi/oai_integration/socket/socket_vnf.c @@ -20,9 +20,26 @@ */ #include "socket_vnf.h" +#include "common/utils/LOG/log.h" #include "nfapi.h" +#include "nfapi_vnf.h" +#include #include "nfapi/oai_integration/vendor_ext.h" //TODO: Remove this include when removing the Aerial transport stuff + +void socket_stop_nfapi_p5_p7() +{ + get_p7_vnf()->terminate = 1; + get_config()->pnf_disconnect_indication = NULL; +} + +void socket_nfapi_send_stop_request(vnf_t *vnf) +{ + nfapi_nr_stop_request_scf_t req = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST, .header.phy_id = 0}; + nfapi_nr_vnf_stop_req(&vnf->_public, 0, &req); + NFAPI_TRACE(NFAPI_TRACE_INFO, "Sent NFAPI STOP.request\n"); +} + static bool send_p5_msg(vnf_t *vnf, nfapi_vnf_pnf_info_t *pnf, const void *msg, int len, uint8_t stream) { int result = socket_send_p5_msg(vnf->sctp, pnf->p5_sock, &pnf->p5_pnf_sockaddr, msg, len, stream); @@ -279,7 +296,6 @@ static int nfapi_nr_vnf_p5_start(nfapi_vnf_config_t *config) // Verify that config is not null if (config == 0) return -1; - NFAPI_TRACE(NFAPI_TRACE_INFO, "%s()\n", __FUNCTION__); int p5ListenSock, p5Sock; @@ -293,7 +309,7 @@ static int nfapi_nr_vnf_p5_start(nfapi_vnf_config_t *config) struct sctp_initmsg initMsg = {0}; int noDelay; - vnf_t *vnf = (vnf_t *)(config); + vnf_t *vnf = (vnf_t *)(get_config()); NFAPI_TRACE(NFAPI_TRACE_INFO, "Starting P5 VNF connection on port %u\n", config->vnf_p5_port); @@ -747,8 +763,8 @@ static int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t *config) return -1; NFAPI_TRACE(NFAPI_TRACE_INFO, "%s()\n", __FUNCTION__); - - vnf_p7_t *vnf_p7 = (vnf_p7_t *)config; + vnf_p7_t *vnf_p7 = get_p7_vnf(); + vnf_p7 = (vnf_p7_t *)config; // Create p7 receive udp port // todo : this needs updating for Ipv6 diff --git a/nfapi/oai_integration/wls_integration/include/wls_common.h b/nfapi/oai_integration/wls_integration/include/wls_common.h index 1b6a8e4cdf..e823e93380 100644 --- a/nfapi/oai_integration/wls_integration/include/wls_common.h +++ b/nfapi/oai_integration/wls_integration/include/wls_common.h @@ -25,7 +25,6 @@ #include #include #include -#include "wls_lib.h" #include "nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h" #include "nfapi/open-nFAPI/fapi/inc/nr_fapi_p7_utils.h" diff --git a/nfapi/oai_integration/wls_integration/include/wls_pnf.h b/nfapi/oai_integration/wls_integration/include/wls_pnf.h index c678345967..ca89761b27 100644 --- a/nfapi/oai_integration/wls_integration/include/wls_pnf.h +++ b/nfapi/oai_integration/wls_integration/include/wls_pnf.h @@ -30,4 +30,6 @@ bool wls_pnf_nr_send_p7_message(pnf_p7_t* pnf_p7,nfapi_nr_p7_message_header_t *m void *wls_fapi_pnf_nr_start_thread(void *ptr); int wls_fapi_nr_pnf_start(); void wls_pnf_set_p7_config(void *p7_config); +void wls_fapi_nr_pnf_stop(); +void wls_pnf_close(pthread_t p5_thread); #endif // OPENAIRINTERFACE_WLS_PNF_H diff --git a/nfapi/oai_integration/wls_integration/include/wls_vnf.h b/nfapi/oai_integration/wls_integration/include/wls_vnf.h index 645b24d056..9206a03d62 100644 --- a/nfapi/oai_integration/wls_integration/include/wls_vnf.h +++ b/nfapi/oai_integration/wls_integration/include/wls_vnf.h @@ -27,7 +27,8 @@ void *wls_fapi_vnf_nr_start_thread(void *ptr); int wls_fapi_nr_vnf_start(); -void wls_vnf_set_p7_config(void *p7_config); bool wls_vnf_nr_send_p5_message(vnf_t *vnf,uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t* msg, uint32_t msg_len); bool wls_vnf_nr_send_p7_message(vnf_p7_t* vnf_p7,nfapi_nr_p7_message_header_t* msg); +void wls_vnf_send_stop_request(); +void wls_vnf_stop(); #endif //OPENAIRINTERFACE_WLS_VNF_H diff --git a/nfapi/oai_integration/wls_integration/wls_common.c b/nfapi/oai_integration/wls_integration/wls_common.c index fe4112eba8..6b471e0e96 100644 --- a/nfapi/oai_integration/wls_integration/wls_common.c +++ b/nfapi/oai_integration/wls_integration/wls_common.c @@ -20,7 +20,7 @@ */ #include "wls_common.h" - +#include "wls_lib.h" void fill_fapi_list_elem(p_fapi_api_queue_elem_t currElem, p_fapi_api_queue_elem_t nextElem, const uint8_t msgType, const uint8_t numMsgInBlock, const uint32_t alignOffset) { currElem->msg_type = msgType; @@ -90,9 +90,19 @@ uint8_t wls_send_fapi_msg(PWLS_MAC_CTX pWls, const uint16_t message_id, const in { int num_avail_blocks = WLS_NumBlocks(pWls->hWls); NFAPI_TRACE(NFAPI_TRACE_DEBUG,"num_avail_blocks is %d\n", num_avail_blocks); + int counter = 0; while (num_avail_blocks < 2) { num_avail_blocks = WLS_NumBlocks(pWls->hWls); NFAPI_TRACE(NFAPI_TRACE_DEBUG,"num_avail_blocks is %d\n", num_avail_blocks); + if (message_id == NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION) { + // In the case of the STOP.indication, it can happen that this is called after the VNF stopped + // For example, if it crashed for some reason, in that case, implement a timeout and return + usleep(10 * 1000); + counter++; + if (counter == 10) { + return true; + } + } } /* get PA blocks for header and msg */ uint64_t pa_hdr = dequeueBlock(pWls); diff --git a/nfapi/oai_integration/wls_integration/wls_pnf.c b/nfapi/oai_integration/wls_integration/wls_pnf.c index bed517ad01..e6fd609346 100644 --- a/nfapi/oai_integration/wls_integration/wls_pnf.c +++ b/nfapi/oai_integration/wls_integration/wls_pnf.c @@ -29,9 +29,10 @@ #include #include +#include "wls_lib.h" #include "pnf.h" #include "nr_nfapi_p7.h" -#include "nr_fapi_p5.h" +#include "nfapi/open-nFAPI/fapi/inc/nr_fapi_p7_utils.h" // A copy of the PNF P7 config is needed for the message processing thread, in other transport mechanisms where P7 is handled in a // different thread, the config is passed to it upon the thread creation @@ -65,6 +66,28 @@ void *wls_fapi_pnf_nr_start_thread(void *ptr) return (void *)0; } +void wls_pnf_close(pthread_t p5_thread) +{ + _this->terminate = 1; + WLS_WakeUp(wls_mac_get_ctx()->hWls); + pthread_join(p5_thread, NULL); + if (WLS_Close(wls_mac_get_ctx()->hWls) != 0) { + NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] WLS_CLose call failed...\n"); + } else { + NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] WLS_CLose called successfully...\n"); + } + rte_eal_cleanup(); +} + +void wls_fapi_nr_pnf_stop() +{ + AssertFatal(cfg->nr_stop_req, "STOP.request Handler should be set!"); + nfapi_nr_stop_request_scf_t req = {0}; + req.header.phy_id = 0; + req.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST; + cfg->nr_stop_req(cfg, 0, &req); +} + int wls_fapi_nr_pnf_start() { int64_t ret; @@ -194,6 +217,9 @@ bool wls_pnf_nr_send_p7_message(pnf_p7_t *pnf_p7, nfapi_nr_p7_message_header_t * NFAPI_TRACE(NFAPI_TRACE_DEBUG, "num_avail_blocks is %d\n", num_avail_blocks); while (num_avail_blocks < 2) { num_avail_blocks = WLS_NumBlocks(pWls->hWls); + if (_this->terminate) { + return false; + } NFAPI_TRACE(NFAPI_TRACE_DEBUG, "num_avail_blocks is %d\n", num_avail_blocks); } /* get PA blocks for header and msg */ @@ -254,7 +280,7 @@ void phy_mac_recv() bool to_return = false; while (_this->terminate == 0) { int numMsgToGet = WLS_Wait(pWls->hWls); - if (numMsgToGet == 0) { + if (numMsgToGet == 0 || _this->terminate) { continue; } uint64_t PAs[numMsgToGet]; @@ -279,6 +305,11 @@ void phy_mac_recv() } } } + // A STOP.indication might have been processed, which set's terminate to 1 + // don't return pages in that case + if (_this->terminate) { + break; + } if (to_return) { // We only return the pages to be enqueued in case we're using the OAI VNF, // The Radisys O-DU handles enqueueing the blocks differently, and also doesn't handle receiving a single block diff --git a/nfapi/oai_integration/wls_integration/wls_vnf.c b/nfapi/oai_integration/wls_integration/wls_vnf.c index ccc68b4905..c72e17a2b6 100644 --- a/nfapi/oai_integration/wls_integration/wls_vnf.c +++ b/nfapi/oai_integration/wls_integration/wls_vnf.c @@ -21,26 +21,23 @@ #include "wls_vnf.h" #include "vnf_p7.h" - +#include "common/utils/LOG/log.h" +#include "wls_lib.h" #include #include #include #include -#include #include +#include "common/utils/LOG/log.h" +#include +#include #include +#include +#include "nfapi_vnf.h" -static nfapi_vnf_config_t *config; static WLS_MAC_CTX wls_mac_iface; vnf_t *_vnf = NULL; -// A copy of the VNF P7 config is needed for the message processing thread, in other transport mechanisms where P7 is handled in a -// different thread, the config is passed to it upon the thread creation -nfapi_vnf_p7_config_t *wls_vnf_p7_config = NULL; -void wls_vnf_set_p7_config(void *p7_config) -{ - wls_vnf_p7_config = (nfapi_vnf_p7_config_t *)p7_config; -} static PWLS_MAC_CTX wls_mac_get_ctx(void) { @@ -99,17 +96,54 @@ static bool wls_mac_create_mem_array(PWLS_MAC_MEM_SRUCT pMemArray, void *pMemArr return true; } -void mac_dpdk_init() +bool primary_process_running(int argc, char *argv[]) { - char *my_argv[] = {"OAI_VNF", "-c3", "--proc-type=auto", "--file-prefix", WLS_DEV_NAME, "--iova-mode=pa"}; - printf("\nCalling rte_eal_init: "); - for (unsigned long i = 0; i < RTE_DIM(my_argv); i++) { - printf("%s ", my_argv[i]); - } - printf("\n"); + // If the PNF was stopped normally, this is enough, as the mp_socket file does not exist + if (access("/var/run/dpdk/" WLS_DEV_NAME "/mp_socket", W_OK | R_OK) != 0) + return false; - if (rte_eal_init(RTE_DIM(my_argv), my_argv) < 0) - rte_panic("\nCannot init EAL\n"); + // If we run rte_eal_init before the primary process is running, it will result in a 'Connection Refused' error in the logs, but + // the call itself will succeed ( retval not -1 ) + // + // We can use rte_eal_primary_proc_alive to determine if the primary process is running, the issue is that since the init had a + // refused connection, if we try to open WLS after rte_eal_primary_proc_alive reports that the primary is running, it will fail, + // since rte_eal_init failed to connect to the primary process, and we can't call rte_eal_init in the same process more than once, + // or it will result in an EALREADY error + // + // Given this, a new process is created that calls rte_eal_init and checks whether the primary process is running, exiting + // right after and reporting to our VNF the primary status + // + // When the VNF receives the status from the forked process that the + // primary process is running, it then calls rte_eal_init, which at this point we know will be successful, and continue to open + // the WLS instance + pid_t pid = fork(); + if (pid == 0) { + // We set the log level to emergency , effectively disabling logs in the child process + // This prevents too many logs being printed out to the terminal while we wait for the primary process to be available + rte_log_set_global_level(RTE_LOG_EMERG); + AssertFatal(rte_eal_init(argc, argv) != -1, "rte_eal_init() failed\n"); + int status = rte_eal_primary_proc_alive(NULL) == 0; + rte_eal_cleanup(); + _exit(status); + } + int status; + waitpid(pid, &status, 0); + return WIFEXITED(status) && WEXITSTATUS(status) == 0; +} + +bool mac_dpdk_init() +{ + char *my_argv[] = {"OAI_VNF", "-c3", "--proc-type=secondary", "--file-prefix", WLS_DEV_NAME, "--iova-mode=pa"}; + NFAPI_TRACE(NFAPI_TRACE_DEBUG, "\nCalling rte_eal_init: "); + for (int i = 0; i < RTE_DIM(my_argv); i++) { + NFAPI_TRACE(NFAPI_TRACE_DEBUG, "%s ", my_argv[i]); + } + NFAPI_TRACE(NFAPI_TRACE_DEBUG, "\n"); + while (!primary_process_running(RTE_DIM(my_argv), my_argv)) { + NFAPI_TRACE(NFAPI_TRACE_INFO, "DPDK primary process not available yet, retrying in 1 second...\n"); + sleep(1); + } + return rte_eal_init(RTE_DIM(my_argv), my_argv) >= 0; } static uint32_t wls_mac_alloc_mem_array(PWLS_MAC_MEM_SRUCT pMemArray, void **ppBlock) @@ -258,7 +292,7 @@ for(int i = 0 ; i< pWls->nTotalBlocks; i++){ void* pMsg = wls_mac_alloc_buffer(pWls, 0, i); /* Enqueue all blocks */ nBlocks += WLS_EnqueueBlock(pWls->hWls, WLS_VA2PA(pWls->hWls, pMsg)); -} +} NFAPI_TRACE(NFAPI_TRACE_INFO, "\nAllocated %d Blocks \n", nBlocks); return true; } @@ -274,6 +308,33 @@ static int vnf_wls_init() return 1; } +void wls_vnf_stop() +{ + vnf_p7_t *p7_vnf = get_p7_vnf(); + _vnf->terminate = 1; + p7_vnf->terminate = 1; + rte_eal_cleanup(); +} + +void wls_vnf_send_stop_request() +{ + PWLS_MAC_CTX pWls = wls_mac_get_ctx(); + nfapi_nr_stop_request_scf_t req = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST, .header.phy_id = 0}; + vnf_p7_t *p7_vnf = get_p7_vnf(); + nfapi_vnf_config_t * config = get_config(); + if (p7_vnf == NULL || pWls->hWls == NULL) { + nfapi_nr_stop_indication_scf_t msg; + msg.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION; + msg.header.phy_id = 0; + config->nr_stop_ind(config, 0, &msg); + return; + } + + if (pWls->hWls != NULL) { + nfapi_nr_vnf_stop_req(config, 0, &req); + } +} + void *wls_fapi_vnf_nr_start_thread(void *ptr) { NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] IN WLS PNF NFAPI start thread %s\n", __FUNCTION__); @@ -294,11 +355,11 @@ static void procPhyMessages(uint32_t msg_size, void *msg_buf, uint16_t msg_id) case NFAPI_NR_PHY_MSG_TYPE_CONFIG_RESPONSE: case NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE: case NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION: - vnf_nr_handle_p4_p5_message(msg_buf, msg_size, 0, config); + vnf_nr_handle_p4_p5_message(msg_buf, msg_size, 0, get_config()); break; case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST ... NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION: { - vnf_nr_handle_p7_message(msg_buf, msg_size + NFAPI_NR_P7_HEADER_LENGTH, (vnf_p7_t *)wls_vnf_p7_config); + vnf_nr_handle_p7_message(msg_buf, msg_size + NFAPI_NR_P7_HEADER_LENGTH, get_p7_vnf()); break; } default: @@ -308,6 +369,7 @@ static void procPhyMessages(uint32_t msg_size, void *msg_buf, uint16_t msg_id) int wls_fapi_nr_vnf_start(nfapi_vnf_config_t *cfg) { + nfapi_vnf_config_t * config = get_config(); config = cfg; if (config == 0) { @@ -333,7 +395,7 @@ int wls_fapi_nr_vnf_start(nfapi_vnf_config_t *cfg) PWLS_MAC_CTX pWls = wls_mac_get_ctx(); while (_vnf->terminate == 0) { int numMsgToGet = WLS_Wait(pWls->hWls); - if (numMsgToGet == 0) { + if (numMsgToGet == 0 || _vnf->terminate) { continue; } @@ -351,6 +413,9 @@ int wls_fapi_nr_vnf_start(nfapi_vnf_config_t *cfg) procPhyMessages(len, (void *)(msg + 1), msg->msg_type); } } + if (_vnf->terminate) { + break; + } for (int i = 0; i < pa_idx; i++) { if (WLS_EnqueueBlock(pWls->hWls, PAs[i]) == -1) { NFAPI_TRACE(NFAPI_TRACE_DEBUG, "Error in WLS_EnqueueBlock for block %lu\n", PAs[i]); @@ -403,7 +468,7 @@ bool wls_vnf_nr_send_p7_message(vnf_p7_t *vnf_p7, nfapi_nr_p7_message_header_t * AssertFatal(fapiMsgElem, "WLS_PA2VA failed for fapiMsgElem\n"); //memcpy((uint8_t *)(fapiMsgElem + 1), message, packed_len + NFAPI_HEADER_LENGTH); const uint8_t wls_header[] = {1, 0}; // num_messages , opaque_handle - + fill_fapi_list_elem(headerElem, fapiMsgElem, FAPI_VENDOR_MSG_HEADER_IND, 1, 2); memcpy((uint8_t *)(headerElem + 1), wls_header, 2); int packed_len = ((nfapi_vnf_p7_config_t *)vnf_p7)->pack_func(msg, (fapiMsgElem + 1), NFAPI_MAX_PACKED_MESSAGE_SIZE, NULL); diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c index 4516302e48..7d7388bad5 100644 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c @@ -1254,6 +1254,10 @@ uint8_t pack_nr_p5_message_body(nfapi_nr_p4_p5_message_header_t *header, result = pack_stop_request(header, ppWritePackedMsg, end, config); break; + case NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION: + result = pack_nr_stop_indication(header, ppWritePackedMsg, end, config); + break; + case NFAPI_NR_PHY_MSG_TYPE_STOP_RESPONSE: result = pack_stop_response(header, ppWritePackedMsg, end, config); break; @@ -2447,6 +2451,10 @@ bool nfapi_nr_p5_message_unpack(void *pMessageBuf, result = unpack_stop_request(&pReadPackedMessage, end, pMessageHeader, config); break; + case NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION: + result = unpack_nr_stop_indication(&pReadPackedMessage, end, pMessageHeader, config); + break; + case NFAPI_NR_PHY_MSG_TYPE_STOP_RESPONSE: result = unpack_stop_response(&pReadPackedMessage, end, pMessageHeader, config); break; diff --git a/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h b/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h index 6576f6406e..306216a1d5 100644 --- a/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h +++ b/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h @@ -497,6 +497,14 @@ int nfapi_nr_pnf_start_resp(nfapi_pnf_config_t* config, nfapi_nr_start_response_ */ int nfapi_pnf_stop_resp(nfapi_pnf_config_t* config, nfapi_stop_response_t* resp); +/*! Send the STOP.indication + * \param config A pointer to a pnf configuration + * \param resp A pointer to the message structure + * \return 0 for success, -1 for failure + * + */ +int nfapi_nr_stop_indication(nfapi_pnf_config_t* config, nfapi_nr_stop_indication_scf_t* resp); + /*! Send the MEASUREMENT.response * \param config A pointer to a pnf configuraiton * \param resp A pointer to the message structure diff --git a/nfapi/open-nFAPI/pnf/src/pnf_interface.c b/nfapi/open-nFAPI/pnf/src/pnf_interface.c index d80ab168fa..76db8ac2d5 100644 --- a/nfapi/open-nFAPI/pnf/src/pnf_interface.c +++ b/nfapi/open-nFAPI/pnf/src/pnf_interface.c @@ -387,6 +387,18 @@ int nfapi_pnf_stop_resp(nfapi_pnf_config_t* config, nfapi_stop_response_t* resp) return pnf_pack_and_send_p5_message(_this, &(resp->header), sizeof(nfapi_stop_response_t)); } +int nfapi_nr_stop_indication(nfapi_pnf_config_t* config, nfapi_nr_stop_indication_scf_t* resp) +{ + if (config == NULL || resp == NULL) { + NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: NULL parameters\n", __FUNCTION__); + return -1; + } + + pnf_t* _this = (pnf_t*)(config); + AssertFatal(config->send_p5_msg, "Function pointer must be configured|"); + return config->send_p5_msg(_this, &(resp->header), sizeof(nfapi_nr_stop_indication_scf_t)); +} + int nfapi_pnf_measurement_resp(nfapi_pnf_config_t* config, nfapi_measurement_response_t* resp) { if (config == NULL || resp == NULL) diff --git a/nfapi/open-nFAPI/pnf/src/pnf_p7.c b/nfapi/open-nFAPI/pnf/src/pnf_p7.c index 197bac22b7..8b684261a7 100644 --- a/nfapi/open-nFAPI/pnf/src/pnf_p7.c +++ b/nfapi/open-nFAPI/pnf/src/pnf_p7.c @@ -728,34 +728,19 @@ int nr_pnf_p7_get_msgs(pnf_p7_t* pnf_p7, ret_dl_tti->SFN = sfn; ret_dl_tti->Slot = slot; ret_dl_tti->dl_tti_request_body.nPDUs = 0; + nfapi_nr_dl_tti_request_t* dl_tti_req = &tx_slot_buffer->dl_tti_req; + if (dl_tti_req->SFN == sfn && dl_tti_req->Slot == slot) { + copy_dl_tti_request(dl_tti_req, ret_dl_tti); + tx_slot_buffer->dl_tti_req.SFN = -1; + tx_slot_buffer->dl_tti_req.Slot = -1; + } + ret_tx_data->SFN = sfn; ret_tx_data->Slot = slot; ret_tx_data->Number_of_PDUs = 0; - nfapi_nr_dl_tti_request_t* dl_tti_req = &tx_slot_buffer->dl_tti_req; nfapi_nr_tx_data_request_t* txd = &tx_slot_buffer->tx_data_req; - if (dl_tti_req->SFN == sfn && dl_tti_req->Slot == slot && txd->SFN == sfn && txd->Slot == slot) { - nfapi_nr_dl_tti_request_body_t* p_tti = &dl_tti_req->dl_tti_request_body; - int ret_idx = 0; - for (int i = 0; i < p_tti->nPDUs; ++i) { - int tx_index = p_tti->dl_tti_pdu_list[i].pdsch_pdu.pdsch_pdu_rel15.pduIndex - 1; - if (tx_index >= txd->Number_of_PDUs) { - NFAPI_TRACE(NFAPI_TRACE_ERROR, - "%4d.%2d no corresponding tx_data.request for dl_tti.request index %d, dropping\n", - sfn, - slot, - tx_index); - continue; - } - ret_dl_tti->dl_tti_request_body.dl_tti_pdu_list[ret_idx] = p_tti->dl_tti_pdu_list[i]; - // TODO avoid huge copy - ret_tx_data->pdu_list[ret_idx] = txd->pdu_list[i]; - ret_idx++; - } - ret_dl_tti->dl_tti_request_body.nPDUs = ret_idx; - ret_tx_data->Number_of_PDUs = ret_idx; - - tx_slot_buffer->dl_tti_req.SFN = -1; - tx_slot_buffer->dl_tti_req.Slot = -1; + if (txd->SFN == sfn && txd->Slot == slot) { + copy_tx_data_request(txd, ret_tx_data); tx_slot_buffer->tx_data_req.SFN = -1; tx_slot_buffer->tx_data_req.Slot = -1; } @@ -764,10 +749,7 @@ int nr_pnf_p7_get_msgs(pnf_p7_t* pnf_p7, ret_ul_tti->Slot = slot; ret_ul_tti->n_pdus = 0; if (tx_slot_buffer->ul_tti_req.SFN == sfn && tx_slot_buffer->ul_tti_req.Slot == slot) { - nfapi_nr_ul_tti_request_t* p = &tx_slot_buffer->ul_tti_req; - ret_ul_tti->n_pdus = p->n_pdus; - for (int i = 0; i < p->n_pdus; ++i) - ret_ul_tti->pdus_list[i] = p->pdus_list[i]; + copy_ul_tti_request(&tx_slot_buffer->ul_tti_req, ret_ul_tti); tx_slot_buffer->ul_tti_req.SFN = -1; tx_slot_buffer->ul_tti_req.Slot = -1; } @@ -776,10 +758,7 @@ int nr_pnf_p7_get_msgs(pnf_p7_t* pnf_p7, ret_ul_dci->Slot = slot; ret_ul_dci->numPdus = 0; if (tx_slot_buffer->ul_dci_req.SFN == sfn && tx_slot_buffer->ul_dci_req.Slot == slot) { - nfapi_nr_ul_dci_request_t* p = &tx_slot_buffer->ul_dci_req; - ret_ul_dci->numPdus = p->numPdus; - for (int i = 0; i < p->numPdus; ++i) - ret_ul_dci->ul_dci_pdu_list[i] = p->ul_dci_pdu_list[i]; + copy_ul_dci_request(&tx_slot_buffer->ul_dci_req, ret_ul_dci); tx_slot_buffer->ul_dci_req.SFN = -1; tx_slot_buffer->ul_dci_req.Slot = -1; } diff --git a/nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h b/nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h index db303b8b4a..3f326e841c 100644 --- a/nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h +++ b/nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h @@ -210,6 +210,24 @@ typedef struct nfapi_vnf_config int (*pnf_start_resp)(nfapi_vnf_config_t* config, int p5_idx, nfapi_pnf_start_response_t* resp); int (*pnf_nr_start_resp)(nfapi_vnf_config_t* config, int p5_idx, nfapi_nr_pnf_start_response_t* resp); + /*! A callback for the STOP.indication + * \param config A pointer to the vnf configuration + * \param p5_idx The p5 index used to indicate a particular pnf p5 connection + * \param ind A data structure for the decoded STOP.indication This will + * have been allocated on the stack. + * \return not currently used. + * + * The STOP.indication contains the result of the STOP.request + * + * + * ind may contain pointers to dynamically allocated sub structures + * such as the vendor_extention. The dynamically allocated structure will + * be deallocated on return. If the client wishes to 'keep' the structures + * then the substructure pointers should be set to 0 and then the client should + * use the codec_config.deallocate function to release it at a future point + */ + int (*nr_stop_ind)(nfapi_vnf_config_t* config, int p5_idx, nfapi_nr_stop_indication_scf_t* ind); + /*! A callback for the PNF_STOP.resp * \param config A pointer to the vnf configuration * \param p5_idx The p5 index used to indicate a particular pnf p5 connection @@ -640,6 +658,7 @@ int nfapi_nr_vnf_start_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_nr_star * \return 0 means success, -1 failure */ int nfapi_vnf_stop_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_stop_request_t* req); +int nfapi_nr_vnf_stop_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_nr_stop_request_scf_t* req); /*! Send the MEASUREMENT.request * \param config A pointer to a vnf config diff --git a/nfapi/open-nFAPI/vnf/src/vnf.c b/nfapi/open-nFAPI/vnf/src/vnf.c index b61d5f26ae..84d4026188 100644 --- a/nfapi/open-nFAPI/vnf/src/vnf.c +++ b/nfapi/open-nFAPI/vnf/src/vnf.c @@ -665,6 +665,30 @@ void vnf_nr_handle_error_indication(void *pRecvMsg, int recvMsgLen, nfapi_vnf_co } } +void vnf_nr_handle_stop_indication(void* pRecvMsg, int recvMsgLen, nfapi_vnf_config_t* config, int p5_idx) +{ + // ensure it's valid + if (pRecvMsg == NULL || config == NULL) { + NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: NULL parameters\n", __FUNCTION__); + } else { + NFAPI_TRACE(NFAPI_TRACE_INFO, "Received STOP.indication\n"); + + nfapi_nr_stop_indication_scf_t msg; + + // unpack the message + if (config->unpack_func(pRecvMsg, recvMsgLen, &msg, sizeof(msg), &config->codec_config)) { + if (config->nr_stop_ind) { + (config->nr_stop_ind)(config, p5_idx, &msg); + } + } else { + NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: Unpack message failed, ignoring\n", __FUNCTION__); + } + + // make sure to release any dynamic part of the message + if (msg.vendor_extension) + config->codec_config.deallocate(msg.vendor_extension); + } +} void vnf_handle_stop_response(void *pRecvMsg, int recvMsgLen, nfapi_vnf_config_t* config, int p5_idx) { @@ -1172,6 +1196,10 @@ void vnf_nr_handle_p4_p5_message(void *pRecvMsg, int recvMsgLen, int p5_idx, nfa vnf_handle_stop_response(pRecvMsg, recvMsgLen, config, p5_idx); break; + case NFAPI_NR_PHY_MSG_TYPE_STOP_INDICATION: + vnf_nr_handle_stop_indication(pRecvMsg, recvMsgLen, config, p5_idx); + break; + default: { if(messageHeader.message_id >= NFAPI_VENDOR_EXT_MSG_MIN && diff --git a/nfapi/open-nFAPI/vnf/src/vnf_interface.c b/nfapi/open-nFAPI/vnf/src/vnf_interface.c index 111d88e8dc..d421976cf1 100644 --- a/nfapi/open-nFAPI/vnf/src/vnf_interface.c +++ b/nfapi/open-nFAPI/vnf/src/vnf_interface.c @@ -665,6 +665,18 @@ int nfapi_vnf_stop_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_stop_reques return vnf_pack_and_send_p5_message(_this, p5_idx, &req->header, sizeof(nfapi_stop_request_t)); } + +int nfapi_nr_vnf_stop_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_nr_stop_request_scf_t* req) +{ + if (config == 0 || req == 0) + return -1; + + vnf_t* _this = (vnf_t*)(config); + AssertFatal(config->send_p5_msg, "Function pointer must be configured\n"); + NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Sending NFAPI STOP.request\n"); + return config->send_p5_msg(_this, p5_idx, &req->header, sizeof(nfapi_nr_stop_request_scf_t)); +} + int nfapi_vnf_measurement_req(nfapi_vnf_config_t* config, int p5_idx, nfapi_measurement_request_t* req) { if(config == 0 || req == 0) diff --git a/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c b/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c index ad21978e06..9d91986b50 100644 --- a/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c +++ b/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c @@ -293,7 +293,7 @@ bool generate_srs_nr(const NR_DL_FRAME_PARMS *frame_parms, } uint8_t k_l_offset = 0; // If the SRS is configured by the IE SRS-PosResource-r16, the quantity k_l_offset is // given by TS 38.211 - Table 6.4.1.4.3-2, otherwise k_l_offset = 0. - uint8_t k_0_overbar_p = (nr_srs_info->n_shift * NR_NB_SC_PER_RB + (K_TC_p + k_l_offset)) % K_TC; + uint8_t k_0_overbar_p = nr_srs_info->n_shift * NR_NB_SC_PER_RB + (K_TC_p + k_l_offset) % K_TC; uint8_t k_0_p = k_0_overbar_p + K_TC * M_sc_b_SRS * sum_n_b; nr_srs_info->k_0_p[p_index][l_line] = k_0_p; diff --git a/openair1/SCHED/nfapi_lte_dummy.c b/openair1/SCHED/nfapi_lte_dummy.c index fa59cbdb71..5ddf2d3485 100644 --- a/openair1/SCHED/nfapi_lte_dummy.c +++ b/openair1/SCHED/nfapi_lte_dummy.c @@ -75,9 +75,6 @@ bool wls_vnf_nr_send_p7_message(vnf_p7_t *vnf_p7, nfapi_nr_p7_message_header_t * return false; } -void wls_vnf_set_p7_config(void *p7_config) -{ -} bool wls_vnf_nr_send_p5_message(vnf_t *vnf,uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t* msg, uint32_t msg_len) { @@ -108,3 +105,27 @@ void wls_pnf_set_p7_config(void *p7_config) { } + +void wls_fapi_nr_pnf_stop() +{ +} + +void wls_pnf_close(pthread_t p5_thread) +{ +} + +void wls_vnf_send_stop_request() +{ +} + +void wls_vnf_stop() +{ +} + +void socket_nfapi_nr_pnf_stop() +{ +} + +void socket_nfapi_send_stop_request(vnf_t *vnf) +{ +} diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index e9ff83cf40..6ea1a197e2 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -308,13 +308,21 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, break; case NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE: { int tx_data_idx = dl_tti_pdu->pdsch_pdu.pdsch_pdu_rel15.pduIndex; - DevAssert(tx_data_idx < TX_req->Number_of_PDUs); - // reuse dlsch variables, as there are multiple very large memory - // buffers - gNB->dlsch[num_pdsch].pdsch_pdu = &dl_tti_pdu->pdsch_pdu; - gNB->dlsch[num_pdsch].pdu = (uint8_t *)TX_req->pdu_list[tx_data_idx].TLVs[0].value.direct; - DevAssert(num_pdsch < gNB->max_nb_pdsch); - num_pdsch++; + if (tx_data_idx < TX_req->Number_of_PDUs && TX_req->pdu_list[tx_data_idx].PDU_index == tx_data_idx) { + // reuse dlsch variables, as there are multiple very large memory + // buffers + gNB->dlsch[num_pdsch].pdsch_pdu = &dl_tti_pdu->pdsch_pdu; + gNB->dlsch[num_pdsch].pdu = (uint8_t *)TX_req->pdu_list[tx_data_idx].TLVs[0].value.direct; + DevAssert(num_pdsch < gNB->max_nb_pdsch); + num_pdsch++; + } else { + LOG_E(NR_PHY, + "%4d.%2d no corresponding tx_data.request for dl_tti.request index %d (out of %d)\n", + frame, + slot, + tx_data_idx, + TX_req->Number_of_PDUs); + } } break; } } diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 51c7bf2c55..43fef06ef7 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -278,8 +278,8 @@ static void configure_srs_info(fapi_nr_ul_config_srs_pdu *srs_config_pdu, nr_srs nr_srs_info->n_SRS_cs = srs_config_pdu->cyclic_shift; nr_srs_info->n_ID_SRS = srs_config_pdu->sequence_id; // It adjusts the SRS allocation to align with the common resource block grid in multiples of four - nr_srs_info->n_shift = srs_config_pdu->frequency_position; - nr_srs_info->n_RRC = srs_config_pdu->frequency_shift; + nr_srs_info->n_shift = srs_config_pdu->frequency_shift; + nr_srs_info->n_RRC = srs_config_pdu->frequency_position; nr_srs_info->groupOrSequenceHopping = srs_config_pdu->group_or_sequence_hopping; nr_srs_info->l_offset = srs_config_pdu->time_start_position; nr_srs_info->T_SRS = srs_config_pdu->t_srs; diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h index 74fbf1051b..a84e57aa7f 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h @@ -79,6 +79,16 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) return (0); } +void stop_nr_nfapi_vnf() +{ + abort(); +} + +void stop_nr_nfapi_pnf() +{ + abort(); +} + void fill_scc_sim(NR_ServingCellConfigCommon_t *scc, uint64_t *ssb_bitmap, int N_RB_DL, int N_RB_UL, int mu_dl, int mu_ul); void fix_scc(NR_ServingCellConfigCommon_t *scc, uint64_t ssbmap); void prepare_scc(NR_ServingCellConfigCommon_t *scc); diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 5238df77fa..081ce8607f 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1127,7 +1127,7 @@ f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCC sys_info->mib = calloc_or_fail(buf_len, sizeof(*sys_info->mib)); DevAssert(mib != NULL); - sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len); + sys_info->mib_length = encode_MIB_NR_setup(mib->message.choice.mib, 0, sys_info->mib, buf_len); DevAssert(sys_info->mib_length == buf_len); DevAssert(sib1 != NULL); @@ -1356,6 +1356,18 @@ static void config_pdcp(configmodule_interface_t *cfg, nr_pdcp_configuration_t * pdcp_config->drb.discard_timer = config_get_processedint(cfg, &pdcp_params[CONFIG_NR_PDCP_DRB_DISCARD_TIMER_IDX]); } +void nfapi_stop_l1() +{ + if (NFAPI_MODE && (NFAPI_MODE == NFAPI_MODE_AERIAL || NFAPI_MODE == NFAPI_MODE_VNF)) { + stop_nr_nfapi_vnf(); + } else if (NFAPI_MODE && NFAPI_MODE == NFAPI_MODE_PNF) { + // PNF should just wait for the STOP.request to come from the L2 + // If instead it was stopped first, in some cases it makes sense for it to terminate itself (WLS) + // Sends a STOP.indication to the VNF + stop_nr_nfapi_pnf(); + } +} + static void get_bwp_config(nr_mac_config_t *configuration) { char path[MAX_OPTNAME_SIZE * 2 + 8]; diff --git a/openair2/GNB_APP/gnb_config.h b/openair2/GNB_APP/gnb_config.h index 200400144b..96cf898ba0 100644 --- a/openair2/GNB_APP/gnb_config.h +++ b/openair2/GNB_APP/gnb_config.h @@ -64,7 +64,7 @@ f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCC int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update); MessageDef *RCconfig_NR_CU_E1(const E1_t *entity); ngran_node_t get_node_type(void); - +void nfapi_stop_l1(); #ifdef E2_AGENT #include "openair2/E2AP/e2_agent_arg.h" e2_agent_args_t RCconfig_NR_E2agent(void); diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index a0637ac107..893a94147e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -1099,6 +1099,13 @@ void nr_mac_configure_sib1(gNB_MAC_INST *nrmac, const plmn_id_t *plmn, uint64_t AssertFatal(cc->sib1_bcch_length > 0, "could not encode SIB1\n"); } +static bool process_addmod_bearers_cellGroupConfig(NR_UE_sched_ctrl_t *sched_ctrl, const NR_RLC_BearerConfig_t *conf) +{ + int priority = conf->mac_LogicalChannelConfig->ul_SpecificParameters->priority; + nr_lc_config_t c = {.lcid = conf->logicalChannelIdentity, .priority = priority}; + return nr_mac_add_lcid(sched_ctrl, &c); +} + bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup) { /* ideally, instead of this function, "users" of this function should call @@ -1120,7 +1127,9 @@ bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t } int ss_type = NR_SearchSpace__searchSpaceType_PR_ue_Specific; configure_UE_BWP(nrmac, nrmac->common_channels[0].ServingCellConfigCommon, UE, false, ss_type, -1, -1); - process_addmod_bearers_cellGroupConfig(&UE->UE_sched_ctrl, CellGroup->rlc_BearerToAddModList); + const struct NR_CellGroupConfig__rlc_BearerToAddModList *l = CellGroup->rlc_BearerToAddModList; + for (int i = 0; l != NULL && i < l->list.count; ++i) + process_addmod_bearers_cellGroupConfig(&UE->UE_sched_ctrl, CellGroup->rlc_BearerToAddModList->list.array[i]); AssertFatal(CellGroup->rlc_BearerToReleaseList == NULL, "cannot release bearers while adding new UEs\n"); NR_SCHED_UNLOCK(&nrmac->sched_lock); LOG_I(NR_MAC, "Added new UE %x with initial CellGroup\n", rnti); @@ -1139,14 +1148,23 @@ void nr_mac_prepare_ra_ue(gNB_MAC_INST *nrmac, NR_UE_info_t *UE) uint8_t num_preamble = cfra->resources.choice.ssb->ssb_ResourceList.list.count; ra->preambles.num_preambles = num_preamble; NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; + char buf[200]; + int idx = 0; for (int i = 0; i < cc->num_active_ssb; i++) { for (int j = 0; j < num_preamble; j++) { if (cc->ssb_index[i] == cfra->resources.choice.ssb->ssb_ResourceList.list.array[j]->ssb) { // one dedicated preamble for each beam ra->preambles.preamble_list[i] = cfra->resources.choice.ssb->ssb_ResourceList.list.array[j]->ra_PreambleIndex; + if (idx < sizeof(buf) - 1) + idx += snprintf(buf + idx, sizeof(buf) - idx, " %d", ra->preambles.preamble_list[i]); break; } } } - LOG_I(NR_MAC, "Added new %s process for UE RNTI %04x with initial CellGroup\n", ra->cfra ? "CFRA" : "CBRA", UE->rnti); + LOG_I(NR_MAC, + "Added new %s process for UE RNTI %04x with initial CellGroup and %d preamble(s): %s\n", + ra->cfra ? "CFRA" : "CBRA", + UE->rnti, + num_preamble, + buf); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 8478df8916..f8df95f679 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -785,6 +785,7 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP, { gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; NR_RA_t *ra = UE->ra; + DevAssert(!ra->cfra); NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; @@ -1451,6 +1452,11 @@ static void nr_generate_Msg2(module_id_t module_idP, return; const NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; + // check the feasibility of Msg3, the actual Msg3 allocation + // is further below. In the case of CFRA, we don't need Msg3, but 38.321 + // §5.1.4 does not clearly exclude Msg3, and UL TA might still be useful. + // Before the change in this commit, we used CFRA but required Msg3, which + // COTS UE would often (but not always) send. bool ret = get_feasible_msg3_tda(scc, get_delta_for_k2(ul_bwp->scs), ul_bwp->tdaList_Common, @@ -1523,6 +1529,7 @@ static void nr_generate_Msg2(module_id_t module_idP, return; } + // get an actual Msg3 allocation in CBRA bool msg3_ret = nr_get_Msg3alloc(nr_mac, CC_id, slotP, frameP, UE); if (!msg3_ret) { reset_beam_status(&nr_mac->beam_info, ra->Msg3_frame, ra->Msg3_slot, UE->UE_beam_index, n_slots_frame, ra->Msg3_beam.new_beam); @@ -1609,27 +1616,31 @@ static void nr_generate_Msg2(module_id_t module_idP, // DL TX request nfapi_nr_pdu_t *tx_req = &TX_req->pdu_list[TX_req->Number_of_PDUs]; - // Program UL processing for Msg3 + // If CFRA: 38.321 §5.1.4 does not clearly say (to me) if UL grant should be + // dropped or not, and COTS UE would often send Msg3 if we configured CFRA + // but required Msg3. Also, "if RAR includes a MAC subPDU with RAPID: [...] + // indicate the reception of an acknowledgement for SI request to upper + // layers." which is not the case here. nr_add_msg3(module_idP, CC_id, frameP, slotP, UE, (uint8_t *)&tx_req->TLVs[0].value.direct[0]); - // Start RA contention resolution timer in Msg3 transmission slot (current slot + K2) - // 3GPP TS 38.321 Section 5.1.5 Contention Resolution - start_ra_contention_resolution_timer( - ra, - scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ra_ContentionResolutionTimer, - *ul_bwp->tdaList_Common->list.array[ra->Msg3_tda_id]->k2 + get_NTN_Koffset(scc), - ul_bwp->scs); + if (!ra->cfra) { + LOG_D(NR_MAC, + "UE %04x: %d.%d: Setting RA-Msg3 reception for SFN.Slot %d.%d\n", + UE->rnti, + frameP, + slotP, + ra->Msg3_frame, + ra->Msg3_slot); - LOG_D(NR_MAC, - "UE %04x: %d.%d: Setting RA-Msg3 reception (%s) for SFN.Slot %d.%d\n", - UE->rnti, - frameP, - slotP, - ra->cfra ? "CFRA" : "CBRA", - ra->Msg3_frame, - ra->Msg3_slot); + // Start RA contention resolution timer in Msg3 transmission slot (current slot + K2) + // 3GPP TS 38.321 Section 5.1.5 Contention Resolution + start_ra_contention_resolution_timer( + ra, + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ra_ContentionResolutionTimer, + *ul_bwp->tdaList_Common->list.array[ra->Msg3_tda_id]->k2 + get_NTN_Koffset(scc), + ul_bwp->scs); - LOG_A(NR_MAC, "%d.%d Send RAR to RA-RNTI %04x\n", frameP, slotP, ra->RA_rnti); + } tx_req->PDU_index = pduindex; tx_req->num_TLV = 1; @@ -1654,6 +1665,7 @@ static void nr_generate_Msg2(module_id_t module_idP, vrb_map[bwp_info.bwpStart + rb + rbStart] |= SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols); } + // In CFRA: in Msg3 handling, will unconditionally mark succeeded ra->ra_state = nrRA_WAIT_Msg3; } @@ -1675,6 +1687,7 @@ static void nr_generate_Msg4_MsgB(module_id_t module_idP, NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_SearchSpace_t *ss = sched_ctrl->search_space; NR_RA_t *ra = UE->ra; + DevAssert(!ra->cfra); const char *ra_type_str = ra->ra_type == RA_2_STEP ? "MsgB" : "Msg4"; NR_ControlResourceSet_t *coreset = sched_ctrl->coreset; AssertFatal(coreset != NULL, "Coreset cannot be null for RA %s\n", ra_type_str); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index fd1cf7f9f3..86eed9d575 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -1113,7 +1113,12 @@ void post_process_dlsch(gNB_MAC_INST *nr_mac, post_process_pdsch_t *pdsch, NR_UE // TODO: verify the case where maxMIMO_Layers is NULL, in which case // in principle maxMIMO_layers should be given by the maximum number of layers // for PDSCH supported by the UE for the serving cell (5.4.2.1 of 38.212) - long maxMIMO_Layers = UE->sc_info.maxMIMO_Layers_PDSCH ? *UE->sc_info.maxMIMO_Layers_PDSCH : 1; + long ue_supp_nl = ue_supported_dl_layers(scc, UE->capability); + long maxMIMO_Layers = UE->sc_info.maxMIMO_Layers_PDSCH ? *UE->sc_info.maxMIMO_Layers_PDSCH : ue_supp_nl; + if (maxMIMO_Layers < 1) { + LOG_D(NR_MAC, "Both maxMIMO_Layers_PDSCH and UE supported layers are not present, defaulting to 1\n"); + maxMIMO_Layers = 1; + } const int nl_tbslbrm = min(maxMIMO_Layers, 4); nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu = prepare_pdsch_pdu(dl_tti_pdsch_pdu, nr_mac, @@ -1395,5 +1400,4 @@ void nr_schedule_ue_spec(module_id_t module_id, /* PREPROCESSOR */ gNB_mac->pre_processor_dl(gNB_mac, &pdsch); - } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 128f2db336..a68c12092b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -3963,23 +3963,6 @@ void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_ free_cellGroupConfig(cellGroup_for_UE); } -/* \brief add bearers from CellGroupConfig. - * - * This is a kind of hack, as this should be processed through a F1 UE Context - * setup request, but some modes do not use that (NSA/do-ra/phy_test). */ -void process_addmod_bearers_cellGroupConfig(NR_UE_sched_ctrl_t *sched_ctrl, const struct NR_CellGroupConfig__rlc_BearerToAddModList *addmod) -{ - if (addmod == NULL) - return; /* nothing to do */ - - for (int i = 0; i < addmod->list.count; ++i) { - const NR_RLC_BearerConfig_t *conf = addmod->list.array[i]; - int lcid = conf->logicalChannelIdentity; - nr_lc_config_t c = {.lcid = lcid}; - nr_mac_add_lcid(sched_ctrl, &c); - } -} - long get_lcid_from_drbid(int drb_id) { return drb_id + 3; /* LCID is DRB + 3 */ diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 3f546d41b4..9904067aa5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -725,13 +725,6 @@ static void handle_nr_ul_harq(gNB_MAC_INST *nrmac, static void handle_msg3_failed_rx(gNB_MAC_INST *mac, NR_RA_t *ra, rnti_t rnti, int harq_round_max) { - // for CFRA (NSA) do not schedule retransmission of msg3 - if (ra->cfra) { - LOG_W(NR_MAC, "UE %04x RA failed at state %s (NSA msg3 reception failed)\n", rnti, nrra_text[ra->ra_state]); - nr_release_ra_UE(mac, rnti); - return; - } - if (ra->msg3_round >= harq_round_max - 1) { LOG_W(NR_MAC, "UE %04x RA failed at state %s (Reached msg3 max harq rounds)\n", rnti, nrra_text[ra->ra_state]); nr_release_ra_UE(mac, rnti); @@ -756,6 +749,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, const uint16_t rssi) { gNB_MAC_INST *mac = RC.nrmac[mod_id]; + NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon; NR_UE_info_t *UE = find_ra_UE(&mac->UE_info, rnti); if (!UE) { LOG_E(NR_MAC, "UL SDU discarded. Couldn't finde UE with RNTI %04x \n", rnti); @@ -768,8 +762,36 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, return; } + // CFRA: we scheduled Msg3 (which does not exist in CFRA, see also + // nr_generate_Msg2()). We did not mark RA as complete right away, as the + // DLSCH scheduler might schedule in the same slot as Msg2 if RLC has data + // (which can only happen in do-ra), so we mark it as complete now. + bool cfra = ra->cfra; + if (ra->cfra) { + NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; + nr_mac_reset_ul_failure(sched_ctrl); + reset_dl_harq_list(sched_ctrl); + reset_ul_harq_list(sched_ctrl); + // we configure the UE using common search space with DCIX0 while waiting for a reconfiguration in SA + // in NSA (or do-ra) there is no reconfiguration in NR + int ss_type = IS_SA_MODE(get_softmodem_params()) ? NR_SearchSpace__searchSpaceType_PR_common + : NR_SearchSpace__searchSpaceType_PR_ue_Specific; + configure_UE_BWP(mac, scc, UE, false, ss_type, -1, -1); + // initialize ta_frame in case there is no Msg3 received + UE->UE_sched_ctrl.ta_frame = (frame + 100) % MAX_FRAME_NUMBER; + if (!transition_ra_connected_nr_ue(mac, UE)) { + LOG_E(NR_MAC, "cannot add UE %04x: list is full\n", UE->rnti); + delete_nr_ue_data(UE, NULL, &mac->UE_info.uid_allocator); + } else { + LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", UE->rnti); + } + } + const int target_snrx10 = mac->pusch_target_snrx10; if (!sdu) { // NACK + if (cfra) // no Msg3 on CFRA, no problem + return; + if (ra->ra_state != nrRA_WAIT_Msg3) return; @@ -799,10 +821,11 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, if (no_sig) { LOG_W(NR_MAC, "MSG3 ULSCH with no signal\n"); - handle_msg3_failed_rx(mac, ra, rnti, mac->ul_bler.harq_round_max); + if (!cfra) + handle_msg3_failed_rx(mac, ra, rnti, mac->ul_bler.harq_round_max); return; } - if (ra->ra_type == RA_2_STEP) { + if (!cfra && ra->ra_type == RA_2_STEP) { // random access pusch with RA-RNTI if (ra->RA_rnti != rnti) { LOG_E(NR_MAC, "expected TC_RNTI %04x to match current RNTI %04x\n", ra->RA_rnti, rnti); @@ -826,94 +849,76 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, UE_scheduling_control->ta_update = timing_advance; UE_scheduling_control->raw_rssi = rssi; LOG_D(NR_MAC, "[UE %04x] PUSCH TPC %d and TA %d\n", UE->rnti, UE_scheduling_control->tpc0, UE_scheduling_control->ta_update); - NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon; - if (ra->cfra) { - LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", UE->rnti); - nr_mac_reset_ul_failure(UE_scheduling_control); - reset_dl_harq_list(UE_scheduling_control); - reset_ul_harq_list(UE_scheduling_control); - process_addmod_bearers_cellGroupConfig(&UE->UE_sched_ctrl, UE->CellGroup->rlc_BearerToAddModList); - int ss_type; - // we configure the UE using common search space with DCIX0 while waiting for a reconfiguration in SA - // in NSA (or do-ra) there is no reconfiguration in NR - if (IS_SA_MODE(get_softmodem_params())) - ss_type = NR_SearchSpace__searchSpaceType_PR_common; - else - ss_type = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - configure_UE_BWP(mac, scc, UE, false, ss_type, -1, -1); - if (!transition_ra_connected_nr_ue(mac, UE)) { - LOG_E(NR_MAC, "cannot add UE %04x: list is full\n", UE->rnti); - delete_nr_ue_data(UE, NULL, &mac->UE_info.uid_allocator); - return; - } - } else { - LOG_D(NR_MAC, "[RAPROC] Received %s:\n", ra->ra_type == RA_2_STEP ? "MsgA-PUSCH" : "Msg3"); - for (uint32_t k = 0; k < sdu_len; k++) { - LOG_D(NR_MAC, "(%i): 0x%x\n", k, sdu[k]); - } - // 3GPP TS 38.321 Section 5.4.3 Multiplexing and assembly - // Logical channels shall be prioritised in accordance with the following order (highest priority listed first): - // - MAC CE for C-RNTI, or data from UL-CCCH; - // This way, we need to process MAC CE for C-RNTI if RA is active and it is present in the MAC PDU - // Search for MAC CE for C-RNTI - rnti_t crnti = lcid_crnti_lookahead(sdu, sdu_len); - if (crnti != 0) { // 3GPP TS 38.321 Table 7.1-1: RNTI values, RNTI 0x0000: N/A - // Replace the current UE by the UE identified by C-RNTI - NR_UE_info_t *old_UE = find_nr_UE(&mac->UE_info, crnti); - if (!old_UE) { - // The UE identified by C-RNTI no longer exists at the gNB - // Let's abort the current RA, so the UE will trigger a new RA later but using RRCSetupRequest instead. A better - // solution may be implemented - LOG_W(NR_MAC, "No UE found with C-RNTI %04x, ignoring Msg3 to have UE come back with new RA attempt\n", UE->rnti); - nr_release_ra_UE(mac, rnti); - return; - } - // in case UE beam has changed - old_UE->UE_beam_index = UE->UE_beam_index; - // Reset UL failure for old UE - nr_mac_reset_ul_failure(&old_UE->UE_sched_ctrl); - // Reset HARQ processes - reset_dl_harq_list(&old_UE->UE_sched_ctrl); - reset_ul_harq_list(&old_UE->UE_sched_ctrl); + LOG_D(NR_MAC, "[RAPROC] Received %s:\n", ra->ra_type == RA_2_STEP ? "MsgA-PUSCH" : "Msg3"); + for (uint32_t k = 0; k < sdu_len; k++) { + LOG_D(NR_MAC, "(%i): 0x%x\n", k, sdu[k]); + } - // Only trigger RRCReconfiguration if UE is not performing RRCReestablishment - // The RRCReconfiguration will be triggered by the RRCReestablishmentComplete - if (!old_UE->reconfigSpCellConfig) { - LOG_I(NR_MAC, "Received UL_SCH_LCID_C_RNTI with C-RNTI 0x%04x, triggering RRC Reconfiguration\n", crnti); - // Trigger RRCReconfiguration - nr_mac_trigger_reconfiguration(mac, old_UE, -1); - // we configure the UE using common search space with DCIX0 while waiting for a reconfiguration - configure_UE_BWP(mac, scc, old_UE, false, NR_SearchSpace__searchSpaceType_PR_common, -1, -1); - } + // 3GPP TS 38.321 Section 5.4.3 Multiplexing and assembly + // Logical channels shall be prioritised in accordance with the following order (highest priority listed first): + // - MAC CE for C-RNTI, or data from UL-CCCH; + // This way, we need to process MAC CE for C-RNTI if RA is active and it is present in the MAC PDU + // Search for MAC CE for C-RNTI + rnti_t crnti = lcid_crnti_lookahead(sdu, sdu_len); + if (crnti != 0) { // 3GPP TS 38.321 Table 7.1-1: RNTI values, RNTI 0x0000: N/A + // Replace the current UE by the UE identified by C-RNTI + NR_UE_info_t *old_UE = find_nr_UE(&mac->UE_info, crnti); + if (!old_UE) { + // The UE identified by C-RNTI no longer exists at the gNB + // Let's abort the current RA, so the UE will trigger a new RA later but using RRCSetupRequest instead. A better + // solution may be implemented + LOG_W(NR_MAC, "No UE found with C-RNTI %04x, ignoring Msg3 to have UE come back with new RA attempt\n", UE->rnti); nr_release_ra_UE(mac, rnti); - LOG_A(NR_MAC, "%4d.%2d RA with C-RNTI %04x complete\n", frame, slot, crnti); - - // Decode the entire MAC PDU - // It may have multiple MAC subPDUs, for example, a MAC subPDU with LCID 1 caring a RRCReestablishmentComplete - nr_process_mac_pdu(mod_id, old_UE, CC_id, frame, slot, sdu, sdu_len, -1); return; } + // in case UE beam has changed + old_UE->UE_beam_index = UE->UE_beam_index; + // Reset UL failure for old UE + nr_mac_reset_ul_failure(&old_UE->UE_sched_ctrl); + // Reset HARQ processes + reset_dl_harq_list(&old_UE->UE_sched_ctrl); + reset_ul_harq_list(&old_UE->UE_sched_ctrl); - // UE Contention Resolution Identity - // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 - // First byte corresponds to R/LCID MAC sub-header - memcpy(ra->cont_res_id, &sdu[1], sizeof(uint8_t) * 6); + // Only trigger RRCReconfiguration if UE is not performing RRCReestablishment + // The RRCReconfiguration will be triggered by the RRCReestablishmentComplete + if (!old_UE->reconfigSpCellConfig) { + LOG_I(NR_MAC, "Received UL_SCH_LCID_C_RNTI with C-RNTI 0x%04x, triggering RRC Reconfiguration\n", crnti); + // Trigger RRCReconfiguration + nr_mac_trigger_reconfiguration(mac, old_UE, -1); + // we configure the UE using common search space with DCIX0 while waiting for a reconfiguration + configure_UE_BWP(mac, scc, old_UE, false, NR_SearchSpace__searchSpaceType_PR_common, -1, -1); + } + nr_release_ra_UE(mac, rnti); + LOG_A(NR_MAC, "%4d.%2d RA with C-RNTI %04x complete\n", frame, slot, crnti); - // Decode MAC PDU - // the function is only called to decode the contention resolution sub-header - // harq_pid set a non-valid value because it is not used in this call - nr_process_mac_pdu(mod_id, UE, CC_id, frame, slot, sdu, sdu_len, -1); - - LOG_I(NR_MAC, - "Activating scheduling %s for TC_RNTI 0x%04x (state %s)\n", - ra->ra_type == RA_2_STEP ? "MsgB" : "Msg4", - UE->rnti, - nrra_text[ra->ra_state]); - ra->ra_state = ra->ra_type == RA_2_STEP ? nrRA_MsgB : nrRA_Msg4; - LOG_D(NR_MAC, "TC_RNTI 0x%04x next RA state %s\n", UE->rnti, nrra_text[ra->ra_state]); + // Decode the entire MAC PDU + // It may have multiple MAC subPDUs, for example, a MAC subPDU with LCID 1 caring a RRCReestablishmentComplete + nr_process_mac_pdu(mod_id, old_UE, CC_id, frame, slot, sdu, sdu_len, -1); return; } + + if (cfra) + return; // rest not relevant for CFRA + + // UE Contention Resolution Identity + // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 + // First byte corresponds to R/LCID MAC sub-header + memcpy(ra->cont_res_id, &sdu[1], sizeof(uint8_t) * 6); + + // Decode MAC PDU + // the function is only called to decode the contention resolution sub-header + // harq_pid set a non-valid value because it is not used in this call + nr_process_mac_pdu(mod_id, UE, CC_id, frame, slot, sdu, sdu_len, -1); + + LOG_I(NR_MAC, + "Activating scheduling %s for TC_RNTI 0x%04x (state %s)\n", + ra->ra_type == RA_2_STEP ? "MsgB" : "Msg4", + UE->rnti, + nrra_text[ra->ra_state]); + ra->ra_state = ra->ra_type == RA_2_STEP ? nrRA_MsgB : nrRA_Msg4; + LOG_D(NR_MAC, "TC_RNTI 0x%04x next RA state %s\n", UE->rnti, nrra_text[ra->ra_state]); + return; } static void _nr_rx_sdu(const module_id_t gnb_mod_idP, @@ -2081,8 +2086,8 @@ static int pf_ul(gNB_MAC_INST *nrmac, /* Create UE_sched for UEs eligibale for new data transmission*/ /* Calculate coefficient*/ - const uint8_t Qm = nr_get_Qm_dl(selected_mcs, current_BWP->mcs_table); - const uint16_t R = nr_get_code_rate_dl(selected_mcs, current_BWP->mcs_table); + const uint8_t Qm = nr_get_Qm_ul(selected_mcs, current_BWP->mcs_table); + const uint16_t R = nr_get_code_rate_ul(selected_mcs, current_BWP->mcs_table); const uint32_t tbs = nr_compute_tbs(Qm, R, 1, /* rbSize */ @@ -2375,10 +2380,9 @@ nfapi_nr_pusch_pdu_t *prepare_pusch_pdu(nfapi_nr_ul_tti_request_t *future_ul_tti long *maxMIMO_Layers = UE->sc_info.maxMIMO_Layers_PUSCH; if (!maxMIMO_Layers && ul_bwp && ul_bwp->pusch_Config) maxMIMO_Layers = ul_bwp->pusch_Config->maxRank; + long lbrm_layers = maxMIMO_Layers ? *maxMIMO_Layers : ue_supported_ul_layers(UE->capability); AssertFatal (maxMIMO_Layers != NULL,"Option with max MIMO layers not configured is not supported\n"); - pusch_pdu->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(ul_bwp->mcs_table, - UE->sc_info.ul_bw_tbslbrm, - *maxMIMO_Layers); + pusch_pdu->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(ul_bwp->mcs_table, UE->sc_info.ul_bw_tbslbrm, lbrm_layers); } /* PUSCH PTRS */ if (sched_pusch->dmrs_info.ptrsConfig) { diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 29398c9edf..e280a8cbe2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -480,9 +480,6 @@ bool nr_mac_check_ul_failure(gNB_MAC_INST *nrmac, int rnti, NR_UE_sched_ctrl_t * void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_t *UE, int new_bwp_id); -void process_addmod_bearers_cellGroupConfig(NR_UE_sched_ctrl_t *sched_ctrl, - const struct NR_CellGroupConfig__rlc_BearerToAddModList *addmod); - bool nr_mac_add_lcid(NR_UE_sched_ctrl_t *sched_ctrl, const nr_lc_config_t *c); nr_lc_config_t *nr_mac_get_lc_config(NR_UE_sched_ctrl_t* sched_ctrl, int lcid); bool nr_mac_remove_lcid(NR_UE_sched_ctrl_t *sched_ctrl, long lcid); 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 cf0f2286bc..8f98aabbee 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -681,11 +681,9 @@ void ue_context_setup_request(const f1ap_ue_context_setup_req_t *req) /* new UE: tell the UE to reestablish RLC */ struct NR_CellGroupConfig__rlc_BearerToAddModList *addmod = new_CellGroup->rlc_BearerToAddModList; for (int i = 0; i < addmod->list.count; ++i) { - asn1cCallocOne(addmod->list.array[i]->reestablishRLC, NR_RLC_BearerConfig__reestablishRLC_true); - for (int i = 1; i < seq_arr_size(&UE->UE_sched_ctrl.lc_config); ++i) { - nr_lc_config_t *lc_config = seq_arr_at(&UE->UE_sched_ctrl.lc_config, i); - nr_rlc_reestablish_entity(UE->rnti, lc_config->lcid); - } + NR_RLC_BearerConfig_t *bc = addmod->list.array[i]; + asn1cCallocOne(bc->reestablishRLC, NR_RLC_BearerConfig__reestablishRLC_true); + nr_rlc_reestablish_entity(UE->rnti, bc->logicalChannelIdentity); } } diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index dff2f2b663..3d0e3ed246 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -585,22 +585,13 @@ static void config_csiim(int do_csirs, } -void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcellconfig, - const NR_ServingCellConfigCommon_t *scc, - const NR_UE_NR_Capability_t *uecap, - int maxMIMO_layers) +long ue_supported_dl_layers(const NR_ServingCellConfigCommon_t *scc, const NR_UE_NR_Capability_t *uecap) { - if(!pdsch_servingcellconfig->ext1) - pdsch_servingcellconfig->ext1=calloc(1,sizeof(*pdsch_servingcellconfig->ext1)); - if(!pdsch_servingcellconfig->ext1->maxMIMO_Layers) - pdsch_servingcellconfig->ext1->maxMIMO_Layers = calloc(1,sizeof(*pdsch_servingcellconfig->ext1->maxMIMO_Layers)); - NR_SCS_SpecificCarrier_t *scs_carrier = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]; int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]; const frequency_range_t freq_range = get_freq_range_from_band(band); const int scs = scs_carrier->subcarrierSpacing; const int bw_size = scs_carrier->carrierBandwidth; - NR_FeatureSets_t *fs = uecap ? uecap->featureSets : NULL; if (fs) { const int bw_mhz = get_supported_bw_mhz(freq_range, get_supported_band_index(scs, freq_range, bw_size)); @@ -610,16 +601,29 @@ void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcellconfig, if (scs == dl_fs->supportedSubcarrierSpacingDL && supported_bw_comparison(bw_mhz, &dl_fs->supportedBandwidthDL, dl_fs->channelBW_90mhz) && dl_fs->maxNumberMIMO_LayersPDSCH) { - long ue_supported_layers = (2 << *dl_fs->maxNumberMIMO_LayersPDSCH); - if (maxMIMO_layers == -1) - *pdsch_servingcellconfig->ext1->maxMIMO_Layers = NR_MAX_SUPPORTED_DL_LAYERS < ue_supported_layers ? NR_MAX_SUPPORTED_DL_LAYERS : ue_supported_layers; - else - *pdsch_servingcellconfig->ext1->maxMIMO_Layers = maxMIMO_layers < ue_supported_layers ? maxMIMO_layers : ue_supported_layers; - return; + return (2 << *dl_fs->maxNumberMIMO_LayersPDSCH); } } } - *pdsch_servingcellconfig->ext1->maxMIMO_Layers = 2; + return -1; +} + +static void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcellconfig, + const NR_ServingCellConfigCommon_t *scc, + const NR_UE_NR_Capability_t *uecap, + int maxMIMO_layers) +{ + if(!pdsch_servingcellconfig->ext1) + pdsch_servingcellconfig->ext1 = calloc(1, sizeof(*pdsch_servingcellconfig->ext1)); + if(!pdsch_servingcellconfig->ext1->maxMIMO_Layers) + pdsch_servingcellconfig->ext1->maxMIMO_Layers = calloc(1, sizeof(*pdsch_servingcellconfig->ext1->maxMIMO_Layers)); + + long l = ue_supported_dl_layers(scc, uecap); + long ue_supported_layers = l > 1 ? l : 2; // min UE supported layers = 2 + if (maxMIMO_layers == -1) + *pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(NR_MAX_SUPPORTED_DL_LAYERS, ue_supported_layers); + else + *pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(maxMIMO_layers, ue_supported_layers); } // TODO: Implement to b_SRS = 1 and b_SRS = 2 @@ -3735,10 +3739,11 @@ NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid, return cellGroupConfig; } -static long set_ul_max_layers(const nr_mac_config_t *configuration, const NR_UE_NR_Capability_t *uecap) +long ue_supported_ul_layers(const NR_UE_NR_Capability_t *uecap) { long ul_max_layers = 1; - if (uecap && uecap->featureSets + if (uecap + && uecap->featureSets && uecap->featureSets->featureSetsUplinkPerCC && uecap->featureSets->featureSetsUplinkPerCC->list.count > 0) { NR_FeatureSetUplinkPerCC_t *ul_feature_setup_per_cc = uecap->featureSets->featureSetsUplinkPerCC->list.array[0]; @@ -3754,11 +3759,15 @@ static long set_ul_max_layers(const nr_mac_config_t *configuration, const NR_UE_ ul_max_layers = 1; } } - ul_max_layers = min(ul_max_layers, configuration->pusch_AntennaPorts); } return ul_max_layers; } +static long set_ul_max_layers(const nr_mac_config_t *configuration, const NR_UE_NR_Capability_t *uecap) +{ + return min(ue_supported_ul_layers(uecap), configuration->pusch_AntennaPorts); +} + NR_CellGroupConfig_t * update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_t *cellGroupConfig, const nr_mac_config_t *configuration, const NR_UE_NR_Capability_t *uecap, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h index 466f18c0de..270aed4b71 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h @@ -134,5 +134,6 @@ NR_CellGroupConfig_t * update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_ NR_MeasurementTimingConfiguration_t *get_nr_mtc(uint8_t *buf, uint32_t len); measgap_config_t create_measgap_config(const NR_MeasurementTimingConfiguration_t *mtc, int scs, int min_rxtxtime); int encode_measgap_config(const measgap_config_t *c, uint8_t *buf); - +long ue_supported_ul_layers(const NR_UE_NR_Capability_t *uecap); +long ue_supported_dl_layers(const NR_ServingCellConfigCommon_t *scc, const NR_UE_NR_Capability_t *uecap); #endif diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index b18e820e91..e1d2dbe841 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1063,15 +1063,10 @@ static void cuup_notify_reestablishment(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) } } -#if 0 - /* According to current understanding of E1 specifications, it is not needed - * to send security information because this does not change. - * But let's keep the code here in case it's needed. - */ - // Always send security information + /* During reestablishment, for DRB integrity protection security keys change (KgNB* is derived), + * so security information MUST be sent to CU-UP to update DRB security keys. */ req.secInfo = malloc_or_fail(sizeof(*req.secInfo)); fill_security_info(rrc, ue_p, req.secInfo); -#endif /* Send E1 Bearer Context Modification Request (3GPP TS 38.463) */ sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, ue_p); @@ -3407,26 +3402,7 @@ void rrc_gNB_generate_UeContextSetupRequest(const gNB_RRC_INST *rrc, } nr_rrc_du_container_t *du = get_du_for_ue((gNB_RRC_INST *)rrc, ue_p->rrc_ue_id); - byte_array_t *meas_timing_config = NULL; - if (du->mtc && ue_p->measConfig && ue_p->measConfig->measObjectToAddModList) { - NR_MeasObjectToAddModList_t *mo_list = ue_p->measConfig->measObjectToAddModList; - NR_ARFCN_ValueNR_t ssbFrequency0; - for (int i = 0; i < mo_list->list.count; i++) { - NR_MeasObjectToAddMod_t *mo = mo_list->list.array[i]; - if (mo->measObject.present == NR_MeasObjectToAddMod__measObject_PR_measObjectNR) { - NR_MeasObjectNR_t *monr = mo->measObject.choice.measObjectNR; - if (i == 0) { - ssbFrequency0 = *monr->ssbFrequency; - } else if (ssbFrequency0 != *monr->ssbFrequency) { - meas_timing_config = calloc_or_fail(1, sizeof(*meas_timing_config)); - meas_timing_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE); - meas_timing_config->len = do_NR_MeasurementTimingConfiguration(du->mtc, meas_timing_config->buf, NR_RRC_BUF_SIZE); - cu2du.meas_timing_config = meas_timing_config; - break; - } - } - } - } + cu2du.meas_timing_config = get_meas_timing_config(du->mtc, ue_p->measConfig); int nb_srb = 1; f1ap_srb_to_setup_t *srbs = calloc_or_fail(nb_srb, sizeof(*srbs)); diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 8ba7b3e950..979fe0ac5e 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -1192,7 +1192,11 @@ int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, instance_t instance, nga // Activate SRBs activate_srb(UE, SRB1); activate_srb(UE, SRB2); - nr_rrc_pdcp_config_security(UE, false); + // During N2 handover, the UE continues using the old security context from the source gNB + // until it receives and processes the RRC Reconfiguration with masterKeyUpdate. The first + // PDUs sent after CFRA are still ciphered with the old keys. The target gNB must enable + // ciphering during handover setup to correctly decipher and verify integrity of these PDUs. + nr_rrc_pdcp_config_security(UE, true); // Process all PDU Session Resource Setup items from handover request DevAssert(msg->nb_of_pdusessions <= NGAP_MAX_PDU_SESSION); diff --git a/openair2/RRC/NR/rrc_gNB_mobility.c b/openair2/RRC/NR/rrc_gNB_mobility.c index bfe5dece8c..e570682ce8 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.c +++ b/openair2/RRC/NR/rrc_gNB_mobility.c @@ -192,12 +192,7 @@ static void nr_initiate_handover(const gNB_RRC_INST *rrc, meas_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE); meas_config->len = do_NR_MeasConfig(ue->measConfig, meas_config->buf, NR_RRC_BUF_SIZE); - byte_array_t *meas_timing_config = NULL; - if (target_du->mtc) { - meas_timing_config = calloc_or_fail(1, sizeof(*meas_timing_config)); - meas_timing_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE); - meas_timing_config->len = do_NR_MeasurementTimingConfiguration(target_du->mtc, meas_timing_config->buf, NR_RRC_BUF_SIZE); - } + byte_array_t *meas_timing_config = get_meas_timing_config(target_du->mtc, ue->measConfig); byte_array_t *hpi = malloc_or_fail(sizeof(*hpi)); *hpi = copy_byte_array(*ho_prep_info); @@ -618,3 +613,31 @@ void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, uint32_t nr_rrc_trigger_n2_ho(rrc, UE, scell_du->nr_pci, neighbour); } + +// This function detects if there are at least two different ssbFrequency values, and if so, returns meas_timing_config; +// otherwise, it returns NULL. When you return NULL, the measurement gaps will not be configured. +byte_array_t *get_meas_timing_config(const NR_MeasurementTimingConfiguration_t *mtc, const NR_MeasConfig_t *measConfig) +{ + if (!mtc || !measConfig || !measConfig->measObjectToAddModList) + return NULL; + + byte_array_t *meas_timing_config = NULL; + NR_MeasObjectToAddModList_t *mo_list = measConfig->measObjectToAddModList; + NR_ARFCN_ValueNR_t ssbFrequency0 = 0; + for (int i = 0; i < mo_list->list.count; i++) { + NR_MeasObjectToAddMod_t *mo = mo_list->list.array[i]; + if (mo->measObject.present != NR_MeasObjectToAddMod__measObject_PR_measObjectNR) + continue; + NR_MeasObjectNR_t *monr = mo->measObject.choice.measObjectNR; + if (i == 0) { + ssbFrequency0 = *monr->ssbFrequency; + } else if (ssbFrequency0 != *monr->ssbFrequency) { + meas_timing_config = calloc_or_fail(1, sizeof(*meas_timing_config)); + meas_timing_config->buf = calloc_or_fail(1, NR_RRC_BUF_SIZE); + meas_timing_config->len = do_NR_MeasurementTimingConfiguration(mtc, meas_timing_config->buf, NR_RRC_BUF_SIZE); + break; + } + } + + return meas_timing_config; +} diff --git a/openair2/RRC/NR/rrc_gNB_mobility.h b/openair2/RRC/NR/rrc_gNB_mobility.h index bd0fd8e22c..88e3548220 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.h +++ b/openair2/RRC/NR/rrc_gNB_mobility.h @@ -108,4 +108,6 @@ void rrc_gNB_trigger_reconfiguration_for_handover(gNB_RRC_INST *rrc, gNB_RRC_UE_ void nr_rrc_trigger_n2_ho_target(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue); +byte_array_t *get_meas_timing_config(const NR_MeasurementTimingConfiguration_t *mtc, const NR_MeasConfig_t *measConfig); + #endif /* RRC_GNB_MOBILITY_H_ */ diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 24088749a5..27e1dc0bb1 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -210,7 +210,7 @@ static void get_epochtime_from_sib19scheduling(NR_UE_RRC_SI_INFO *SI_info, int * slot); } -static int eval_epoch_time(NR_UE_RRC_SI_INFO *SI_info, NR_NTN_Config_r17_t *ntncfg, int frame) +static int eval_epoch_time(NR_UE_RRC_SI_INFO *SI_info, NR_NTN_Config_r17_t *ntncfg, int frame, bool is_targetcell) { int epoch_frame = 0, epoch_subframe = 0; int diff_frames = 0; @@ -229,11 +229,19 @@ static int eval_epoch_time(NR_UE_RRC_SI_INFO *SI_info, NR_NTN_Config_r17_t *ntnc ntncfg->epochTime_r17->sfn_r17 = epoch_frame; ntncfg->epochTime_r17->subFrameNR_r17 = epoch_subframe; } - // For serving cell, the field sfn indicates the current SFN or the next upcoming SFN - // after the frame where the message indicating the epochTime is received - // i.e. Epochframe can be present or future SFN - diff_frames = (epoch_frame - frame + 1024) % 1024; // According to 38.331 Epochtime is defined for serving cell like this - LOG_I(NR_RRC, "Epoch frame %d, ahead by %d frames\n", epoch_frame, diff_frames); + if (is_targetcell) { + // For Target cell,the SFN nearest to the frame needs to be considered + // i.e. Epochframe can be in the past or future + int diff1 = (frame - epoch_frame + 1024) % 1024; + int diff2 = (epoch_frame - frame + 1024) % 1024; + diff_frames = (diff1 < diff2) ? -diff1 : diff2; + } else { + // For serving cell, the field sfn indicates the current SFN or the next upcoming SFN + // after the frame where the message indicating the epochTime is received + // i.e. Epochframe can be present or future SFN + diff_frames = (epoch_frame - frame + 1024) % 1024; // According to 38.331 Epochtime is defined for serving cell like this + } + LOG_I(NR_RRC, "Epoch frame %d ahead by %d frames\n", epoch_frame, diff_frames); return diff_frames; } @@ -257,11 +265,11 @@ static int get_ntn_timervalues(NR_UE_RRC_SI_INFO *SI_info, NR_NTN_Config_r17_t * return sib19_timer_ms; } -static void nr_rrc_process_ntnconfig(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_info, NR_NTN_Config_r17_t *ntncfg, int frame) +static void nr_rrc_process_ntnconfig(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_info, NR_NTN_Config_r17_t *ntncfg, int frame, bool is_targetcell) { SI_info->SInfo_r17.sib19_validity = true; // Check if Epochtime is sent or not - int diff_frames = eval_epoch_time(SI_info, ntncfg, frame); + int diff_frames = eval_epoch_time(SI_info, ntncfg, frame, is_targetcell); if (ntncfg->ntn_UlSyncValidityDuration_r17) { // ulsyncvalidity duration configured int val430_ms = 0, sib19_timer_ms = 0; @@ -361,7 +369,7 @@ static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, sib19 = typeandinfo->choice.sib19_v1700; if (g_log->log_component[NR_RRC].level >= OAILOG_DEBUG) xer_fprint(stdout, &asn_DEF_NR_SIB19_r17, (const void *)sib19); - nr_rrc_process_ntnconfig(rrc, SI_info, sib19->ntn_Config_r17, frame); + nr_rrc_process_ntnconfig(rrc, SI_info, sib19->ntn_Config_r17, frame, false); break; default: break; @@ -1454,6 +1462,11 @@ static void nr_rrc_ue_decode_NR_BCCH_BCH_Message(NR_UE_RRC_INST_t *rrc, uint8_t *const bufferP, const uint8_t buffer_len) { + // MIB received on the target cell. Now process target ntncfg once new timing is received. + if (phycellid == rrc->phyCellID && rrc->target_ntncfg) { + rrc->process_target_ntncfg = true; + } + NR_BCCH_BCH_Message_t *bcch_message = NULL; rrc->phyCellID = phycellid; rrc->arfcn_ssb = ssb_arfcn; @@ -1754,13 +1767,20 @@ static void nr_rrc_process_reconfigurationWithSync(NR_UE_RRC_INST_t *rrc, // 3GPP TS38.331 section 5.3.5.5.2 nr_timer_stop(&tac->T430); + + if (rrc->target_ntncfg) { + ASN_STRUCT_FREE(asn_DEF_NR_NTN_Config_r17, rrc->target_ntncfg); + rrc->target_ntncfg = NULL; + rrc->process_target_ntncfg = false; + } if (reconfigurationWithSync->spCellConfigCommon && reconfigurationWithSync->spCellConfigCommon->ext2 && reconfigurationWithSync->spCellConfigCommon->ext2->ntn_Config_r17) { NR_NTN_Config_r17_t *ntncfg = reconfigurationWithSync->spCellConfigCommon->ext2->ntn_Config_r17; // EPOCH time is always sent if NTN config is sent through DCCH AssertFatal(ntncfg->epochTime_r17, "NTN-CONFIG sent in dedicated mode should have EPOCHTIME\n"); - nr_rrc_process_ntnconfig(rrc, &rrc->perNB[gNB_index].SInfo, ntncfg, rrc->current_frame); + const int copy_result = asn_copy(&asn_DEF_NR_NTN_Config_r17, (void **)&rrc->target_ntncfg, ntncfg); + AssertFatal(copy_result == 0, "unable to copy NR_NTN_Config_r17_t\n"); } } @@ -2626,6 +2646,13 @@ void *rrc_nrue(void *notUsed) nr_rrc_handle_timers(rrc); NR_UE_RRC_SI_INFO *SInfo = &rrc->perNB[NRRRC_FRAME_PROCESS(msg_p).gnb_id].SInfo; nr_rrc_SI_timers(SInfo); + if (rrc->process_target_ntncfg) { + // Process target NTNCFG as the target cells timing is acquired + nr_rrc_process_ntnconfig(rrc, &rrc->perNB[NRRRC_FRAME_PROCESS(msg_p).gnb_id].SInfo, rrc->target_ntncfg, rrc->current_frame, true); + ASN_STRUCT_FREE(asn_DEF_NR_NTN_Config_r17, rrc->target_ntncfg); + rrc->target_ntncfg = NULL; + rrc->process_target_ntncfg = false; + } break; case NR_RRC_MAC_INAC_IND: @@ -2806,6 +2833,14 @@ static void nr_rrc_initiate_rrcReestablishment(NR_UE_RRC_INST_t *rrc, NR_Reestab set_DRB_status(rrc, i, RB_SUSPENDED); } } + + // Free Target NTNcfg is stored + if (rrc->target_ntncfg) { + ASN_STRUCT_FREE(asn_DEF_NR_NTN_Config_r17, rrc->target_ntncfg); + rrc->target_ntncfg = NULL; + rrc->process_target_ntncfg = false; + } + // release the MCG SCell(s), if configured // no SCell configured in our implementation @@ -2996,6 +3031,13 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc, asn1cFreeStruc(asn_DEF_NR_UE_TimersAndConstants, tac->sib1_TimersAndConstants); } + // Free Target NTNcfg is stored + if (rrc->target_ntncfg) { + ASN_STRUCT_FREE(asn_DEF_NR_NTN_Config_r17, rrc->target_ntncfg); + rrc->target_ntncfg = NULL; + rrc->process_target_ntncfg = false; + } + // reset MAC NR_UE_MAC_reset_cause_t cause = (rrc->nrRrcState == RRC_STATE_DETACH_NR) ? DETACH : GO_TO_IDLE; nr_mac_rrc_message_t rrc_msg = {0}; diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index ae8837bff2..0672af7741 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -268,6 +268,8 @@ typedef struct NR_UE_RRC_INST_s { NR_SL_PreconfigurationNR_r16_t *sl_preconfig; // NTN params bool is_NTN_UE; + NR_NTN_Config_r17_t *target_ntncfg; + bool process_target_ntncfg; notifiedFIFO_t *mac_input_nf; } NR_UE_RRC_INST_t; diff --git a/radio/fhi_72/mplane/connect-mplane.c b/radio/fhi_72/mplane/connect-mplane.c index 9744ce01e8..9d00d26bdf 100644 --- a/radio/fhi_72/mplane/connect-mplane.c +++ b/radio/fhi_72/mplane/connect-mplane.c @@ -59,24 +59,7 @@ bool connect_mplane(ru_session_t *ru_session) void disconnect_mplane(void *rus_disconnect) { ru_session_list_t *ru_session_list = (ru_session_list_t *)rus_disconnect; - - for (size_t i = 0; i num_rus; i++) { - ru_session_t *ru_session = &ru_session_list->ru_session[i]; - if (ru_session->session == NULL) - continue; - MP_LOG_I("Sending PM de-activation request for RU \"%s\".\n", ru_session->ru_ip_add); - bool success = pm_conf(ru_session, "false"); - if (success) - MP_LOG_I("Successfully de-activated PM for RU \"%s\".\n", ru_session->ru_ip_add); - MP_LOG_I("Disconnecting from RU \"%s\".\n", ru_session->ru_ip_add); - nc_session_free(ru_session->session, NULL); - ru_session->session = NULL; -#ifdef MPLANE_V1 - ly_ctx_destroy((struct ly_ctx *)ru_session->ctx, NULL); -#elif defined MPLANE_V2 - ly_ctx_destroy((struct ly_ctx *)ru_session->ctx); -#endif - } + free_ru_session_list(ru_session_list); nc_client_destroy(); } diff --git a/radio/fhi_72/mplane/init-mplane.c b/radio/fhi_72/mplane/init-mplane.c index fc20ba5af4..fcd908562a 100644 --- a/radio/fhi_72/mplane/init-mplane.c +++ b/radio/fhi_72/mplane/init-mplane.c @@ -141,6 +141,43 @@ bool init_mplane(ru_session_list_t *ru_session_list) return true; } +static void init_ru_notif(ru_session_t *ru_session, const char* buffer) +{ + char* usage_state = get_ru_xml_node(buffer, "usage-state"); + if (usage_state != NULL && strcmp(usage_state, "busy") == 0) { + ru_session->ru_notif.rx_carrier_state = BUSY_CARRIER; + ru_session->ru_notif.tx_carrier_state = BUSY_CARRIER; + ru_session->ru_notif.config_change = true; + } else if (usage_state != NULL && strcmp(usage_state, "active") == 0) { + ru_session->ru_notif.rx_carrier_state = READY_CARRIER; + ru_session->ru_notif.tx_carrier_state = READY_CARRIER; + ru_session->ru_notif.config_change = true; + } else { // "idle" or NULL + ru_session->ru_notif.rx_carrier_state = DISABLED_CARRIER; + ru_session->ru_notif.tx_carrier_state = DISABLED_CARRIER; + ru_session->ru_notif.config_change = false; + } + + char *oper_state = get_ru_xml_node(buffer, "oper-state"); + ru_session->ru_notif.hardware.oper_state = (str_to_enum_oper(oper_state) != OPER_COUNT) ? str_to_enum_oper(oper_state) : ENABLED_OPER; + + char *admin_state = get_ru_xml_node(buffer, "admin-state"); + ru_session->ru_notif.hardware.admin_state = (str_to_enum_admin(admin_state) != ADMIN_COUNT) ? str_to_enum_admin(admin_state) : UNLOCKED_ADMIN; + + char *avail_state = get_ru_xml_node(buffer, "availability-state"); + ru_session->ru_notif.hardware.avail_state = (str_to_enum_avail(avail_state) != AVAIL_COUNT) ? str_to_enum_avail(avail_state) : NORMAL_AVAIL; + + char *ptp_state = get_ru_xml_node(buffer, "sync-state"); + ru_session->ru_notif.ptp_state = str_to_enum_ptp(ptp_state); + MP_LOG_I("RU is in \"%s\" sync state.\n", ptp_state); + + free(usage_state); + free(oper_state); + free(admin_state); + free(avail_state); + free(ptp_state); +} + bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const size_t num_rus) { bool success = false; @@ -149,12 +186,8 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz success = get_mplane(ru_session, &operational_ds); AssertError(success, return false, "[MPLANE] Unable to continue: could not get RU answer via get_mplane().\n"); - bool ptp_state = false; - const char *sync_state = get_ru_xml_node(operational_ds, "sync-state"); - if (strcmp(sync_state, "LOCKED") == 0) { - MP_LOG_I("RU is already PTP synchronized.\n"); - ptp_state = true; - } + // init RU notifications + init_ru_notif(ru_session, operational_ds); /* 1) as per M-plane spec, RU must be in supervised mode, where stream = NULL && filter = "/o-ran-supervision:supervision-notification"; @@ -163,7 +196,6 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz => since more than one subscription at the time within one session is not possible, we will subscribe to all notifications */ const char *stream = "NETCONF"; const char *filter = NULL; - ru_session->ru_notif.ptp_state = ptp_state; success = subscribe_mplane(ru_session, stream, filter, (void *)&ru_session->ru_notif); AssertError(success, return false, "[MPLANE] Unable to continue: could not get RU answer via subscribe_mplane().\n"); @@ -189,26 +221,18 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz success = load_yang_models(ru_session, operational_ds); AssertError(success, return false, "[MPLANE] Unable to load yang models.\n"); - if (ru_session->ru_notif.ptp_state) { - char *content = NULL; - success = configure_ru_from_yang(ru_session, oai, num_rus, &content); - AssertError(success, return false, "[MPLANE] Unable to create content for RPC for start-up procedure.\n"); + while (1) { + sleep(5); + if (!ru_session->ru_notif.ptp_state && !ru_session->ru_notif.hardware.oper_state && !ru_session->ru_notif.hardware.admin_state && !ru_session->ru_notif.hardware.avail_state) { + char *content = NULL; + success = configure_ru_from_yang(ru_session, oai, num_rus, &content); + AssertError(success, return false, "[MPLANE] Unable to create content for RPC for start-up procedure.\n"); - success = edit_val_commmit_rpc(ru_session, content); - AssertError(success, return false, "[MPLANE] Unable to continue.\n"); - free(content); - } - - const char *usage_state = get_ru_xml_node(operational_ds, "usage-state"); - MP_LOG_I("Usage state = \"%s\" for RU \"%s\".\n", usage_state, ru_session->ru_ip_add); - if (strcmp(usage_state, "busy") == 0) { // carriers are already activated - ru_session->ru_notif.rx_carrier_state = true; - ru_session->ru_notif.tx_carrier_state = true; - ru_session->ru_notif.config_change = true; - } else { - ru_session->ru_notif.rx_carrier_state = false; - ru_session->ru_notif.tx_carrier_state = false; - ru_session->ru_notif.config_change = false; + success = edit_val_commmit_rpc(ru_session, content); + AssertError(success, return false, "[MPLANE] Unable to continue.\n"); + free(content); + break; + } } free(operational_ds); diff --git a/radio/fhi_72/mplane/ru-mplane-api.c b/radio/fhi_72/mplane/ru-mplane-api.c index df4bf3b8ba..f04e294dfc 100644 --- a/radio/fhi_72/mplane/ru-mplane-api.c +++ b/radio/fhi_72/mplane/ru-mplane-api.c @@ -20,11 +20,145 @@ */ #include "ru-mplane-api.h" +#include "init-mplane.h" #include "xml/get-xml.h" #include "common/utils/assertions.h" #include +#include +#include + +static void free_pm_stats(pm_stats_t *src) +{ + // free Rx window measurements + for (size_t i = 0; i < src->rx_num; i++) { + free(src->rx_window_meas[i]); + } + free(src->rx_window_meas); + + // free Tx measurements + for (size_t i = 0; i < src->tx_num; i++) { + free(src->tx_meas[i]); + } + free(src->tx_meas); +} + +static void free_uplane_info(uplane_info_t *src) +{ + for (size_t i = 0; i < src->num; i++) { + free(src->name[i]); + } + free(src->name); +} + +static void free_ru_mplane_config(ru_mplane_config_t *src) +{ + // free DU MAC address(es) and VLAN tag(s) + for (size_t i = 0; i < src->num_cu_planes; i++) { + free(src->du_mac_addr[i]); + } + free(src->du_mac_addr); + free(src->vlan_tag); + + // free interface name + free(src->interface_name); + + // free endpoints and carriers + free_uplane_info(&src->tx_endpoints); + free_uplane_info(&src->rx_endpoints); + free_uplane_info(&src->tx_carriers); + free_uplane_info(&src->rx_carriers); +} + +static void free_ru_session(ru_session_t *src) +{ + // username + free(src->username); + + // if no RU connected to, free only the initialized RU IP address + if (src->session == NULL) { + free(src->ru_ip_add); + return; + } + + // disconnect from the RU + MP_LOG_I("Sending PM de-activation request for RU \"%s\".\n", src->ru_ip_add); + bool success = pm_conf(src, "false"); + if (success) + MP_LOG_I("Successfully de-activated PM for RU \"%s\".\n", src->ru_ip_add); + MP_LOG_I("Disconnecting from RU \"%s\".\n", src->ru_ip_add); + + // free RU IP address + free(src->ru_ip_add); + // free RU M-plane config + free_ru_mplane_config(&src->ru_mplane_config); + // free NETCONF session + nc_session_free(src->session, NULL); + src->session = NULL; + // free libyang context +#ifdef MPLANE_V1 + ly_ctx_destroy((struct ly_ctx *)src->ctx, NULL); +#elif defined MPLANE_V2 + ly_ctx_destroy((struct ly_ctx *)src->ctx); +#endif + // free only the RU MAC addressin xran M-plane info + free(src->xran_mplane.ru_mac_addr); + // nothing to free in ru_notif + // free PM stats + free_pm_stats(&src->pm_stats); +} + +void free_ru_session_list(ru_session_list_t *src) +{ + // DU key pair + for (size_t i = 0; i < 2; i++) { + free(src->du_key_pair[i]); + } + free(src->du_key_pair); + + // RU session + for (size_t i = 0; i < src->num_rus; i++) { + free_ru_session(&src->ru_session[i]); + } + free(src->ru_session); +} + +oper_state_e str_to_enum_oper(const char* value) { +#define X(name, str) if (value != NULL && strcmp(value, str) == 0) return name; + OPER_STATE +#undef X + return OPER_COUNT; +}; + +admin_state_e str_to_enum_admin(const char* value) { +#define X(name, str) if (value != NULL && strcmp(value, str) == 0) return name; + ADMIN_STATE +#undef X + return ADMIN_COUNT; +}; + +avail_state_e str_to_enum_avail(const char* value) { +#define X(name, str) if (value != NULL && strcmp(value, str) == 0) return name; + AVAIL_STATE +#undef X + return AVAIL_COUNT; +}; + +ptp_state_e str_to_enum_ptp(const char* value) { +#define X(name, str) if (value != NULL && strcmp(value, str) == 0) return name; + PTP_STATE +#undef X + return PTP_COUNT; +}; + +carrier_state_e str_to_enum_carrier(const char* value) { +#define X(name, str) if (value != NULL && strcmp(value, str) == 0) return name; + CARRIER_STATE +#undef X + return CARRIER_COUNT; +}; + static void free_match_list(char **match_list, size_t count) { for (size_t i = 0; i < count; i++) { @@ -63,13 +197,15 @@ static void fix_benetel_setting(xran_mplane_t *xran_mplane, const uint32_t inter bool get_config_for_xran(const char *buffer, const int max_num_ant, xran_mplane_t *xran_mplane) { /* some O-RU vendors are not fully compliant as per M-plane specifications */ - const char *ru_vendor = get_ru_xml_node(buffer, "mfg-name"); + char *ru_vendor = get_ru_xml_node(buffer, "mfg-name"); // RU MAC xran_mplane->ru_mac_addr = get_ru_xml_node(buffer, "mac-address"); // TODO: support for VVDN, as it defines multiple MAC addresses // MTU - const uint32_t interface_mtu = (uint32_t)atoi(get_ru_xml_node(buffer, "l2-mtu")); + char *int_mtu_str = get_ru_xml_node(buffer, "l2-mtu"); + const uint32_t interface_mtu = (uint32_t)atoi(int_mtu_str); + free(int_mtu_str); // IQ bitwidth char **match_list = NULL; @@ -107,14 +243,17 @@ bool get_config_for_xran(const char *buffer, const int max_num_ant, xran_mplane_ free_match_list(match_list, count); // Managed delay support - const char *managed_delay = get_ru_xml_node(buffer, "managed-delay-support"); + char *managed_delay = get_ru_xml_node(buffer, "managed-delay-support"); xran_mplane->managed_delay = (strcasecmp(managed_delay, "NON_MANAGED") == 0) ? false : true; + free(managed_delay); // Store the max gain - xran_mplane->max_tx_gain = (double)atof(get_ru_xml_node(buffer, "max-gain")); + char *max_tx_gain_str = get_ru_xml_node(buffer, "max-gain"); + xran_mplane->max_tx_gain = (double)atof(max_tx_gain_str); + free(max_tx_gain_str); // Model name - const char *model_name = get_ru_xml_node(buffer, "model-name"); + char *model_name = get_ru_xml_node(buffer, "model-name"); if (strcasecmp(ru_vendor, "BENETEL") == 0 /* || strcmp(ru_vendor, "VVDN-LPRU") == 0 || strcmp(ru_vendor, "Metanoia") == 0 */) { fix_benetel_setting(xran_mplane, interface_mtu, first_iq_width, max_num_ant, model_name); @@ -150,6 +289,9 @@ bool get_config_for_xran(const char *buffer, const int max_num_ant, xran_mplane_ xran_mplane->ru_port, xran_mplane->max_tx_gain); + free(ru_vendor); + free(model_name); + return true; } @@ -185,7 +327,7 @@ bool get_uplane_info(const char *buffer, ru_mplane_config_t *ru_mplane_config) bool get_pm_object_list(const char *buffer, pm_stats_t *pm_stats) { - const char *ru_vendor = get_ru_xml_node(buffer, "mfg-name"); + char *ru_vendor = get_ru_xml_node(buffer, "mfg-name"); if (strcasecmp(ru_vendor, "BENETEL") == 0) { pm_stats->start_up_timing = false; } else { @@ -200,5 +342,7 @@ bool get_pm_object_list(const char *buffer, pm_stats_t *pm_stats) MP_LOG_I("Successfully retreived all performance measurement names.\n"); + free(ru_vendor); + return true; } diff --git a/radio/fhi_72/mplane/ru-mplane-api.h b/radio/fhi_72/mplane/ru-mplane-api.h index 85fac5515c..f568bbaf3e 100644 --- a/radio/fhi_72/mplane/ru-mplane-api.h +++ b/radio/fhi_72/mplane/ru-mplane-api.h @@ -31,10 +31,86 @@ #define MP_LOG_I(x, args...) LOG_I(HW, "[MPLANE] " x, ##args) #define MP_LOG_W(x, args...) LOG_W(HW, "[MPLANE] " x, ##args) +#define OPER_STATE \ + X(ENABLED_OPER, "enabled") \ + X(DISABLED_OPER, "disabled") + +typedef enum { +#define X(name, str) name, + OPER_STATE +#undef X + OPER_COUNT +} oper_state_e; + +oper_state_e str_to_enum_oper(const char* value); + +#define ADMIN_STATE \ + X(UNLOCKED_ADMIN, "unlocked") \ + X(SHUTTING_DOWN_ADMIN, "shutting-down") \ + X(LOCKED_ADMIN, "locked") + +typedef enum { +#define X(name, str) name, + ADMIN_STATE +#undef X + ADMIN_COUNT +} admin_state_e; + +admin_state_e str_to_enum_admin(const char* value); + +#define AVAIL_STATE \ + X(NORMAL_AVAIL, "NORMAL") \ + X(DEGRADED_AVAIL, "DEGRADED") \ + X(FAULTY_AVAIL, "FAULTY") + +typedef enum { +#define X(name, str) name, + AVAIL_STATE +#undef X + AVAIL_COUNT +} avail_state_e; + +avail_state_e str_to_enum_avail(const char* value); + typedef struct { - bool ptp_state; - bool rx_carrier_state; - bool tx_carrier_state; + oper_state_e oper_state; // "enabled", "disabled" + admin_state_e admin_state; // "unlocked", "shutting-down", "locked" + avail_state_e avail_state; // "NORMAL", "DEGRADED", "FAULTY" +} hardware_notif_t; + +#define PTP_STATE \ + X(LOCKED_PTP, "LOCKED") \ + X(FREERUN_PTP, "FREERUN") \ + X(HOLDOVER_PTP, "HOLDOVER") + +typedef enum { +#define X(name, str) name, + PTP_STATE +#undef X + PTP_COUNT +} ptp_state_e; + +ptp_state_e str_to_enum_ptp(const char* value); + +#define CARRIER_STATE \ + X(READY_CARRIER, "READY") \ + X(DISABLED_CARRIER, "DISABLED") \ + X(BUSY_CARRIER, "BUSY") + +typedef enum { +#define X(name, str) name, + CARRIER_STATE +#undef X + CARRIER_COUNT +} carrier_state_e; + +carrier_state_e str_to_enum_carrier(const char* value); + +typedef struct { + hardware_notif_t hardware; + ptp_state_e ptp_state; // "LOCKED", "FREERUN", "HOLDOVER" + carrier_state_e rx_carrier_state; // "READY", "DISABLED", "BUSY" + carrier_state_e tx_carrier_state; // "READY", "DISABLED", "BUSY" bool config_change; // to be extended with any notification callback @@ -112,6 +188,8 @@ typedef struct { } ru_session_list_t; +void free_ru_session_list(ru_session_list_t *src); + bool get_config_for_xran(const char *buffer, const int max_num_ant, xran_mplane_t *xran_mplane); bool get_uplane_info(const char *buffer, ru_mplane_config_t *ru_mplane_config); diff --git a/radio/fhi_72/mplane/subscribe-mplane.c b/radio/fhi_72/mplane/subscribe-mplane.c index bec7e28a68..38c770848d 100644 --- a/radio/fhi_72/mplane/subscribe-mplane.c +++ b/radio/fhi_72/mplane/subscribe-mplane.c @@ -30,13 +30,8 @@ static void recv_notif_v1(const struct nc_notif *notif, ru_notif_t *answer) { const char *node_name = notif->tree->child->attr->name; - const char *value = notif->tree->child->attr->value_str; if (strcmp(node_name, "sync-state")) { - if (strcmp(value, "LOCKED") == 0) { - answer->ptp_state = true; - } else { - answer->ptp_state = false; - } + answer->ptp_state = str_to_enum_ptp(notif->tree->child->attr->value_str); } // carriers state - to be filled @@ -52,6 +47,8 @@ static void notif_clb_v1(struct nc_session *session, const struct nc_notif *noti MP_LOG_I("\nReceived notification at (%s)\n%s\n", notif->datetime, subs_reply); recv_notif_v1(notif, answer); + + free(subs_reply); } #elif MPLANE_V2 static void log_v2_pm_info(const char *ru_ip_add, struct lyd_node_inner *stats) @@ -85,33 +82,36 @@ static void log_v2_pm_info(const char *ru_ip_add, struct lyd_node_inner *stats) meas_list[7], count_list[7]); } +static void get_hardware_states(struct lyd_node_inner *op, ru_notif_t *answer) +{ + struct lyd_node *child = NULL; + LY_LIST_FOR(op->child, child) { + if (strcmp(child->schema->name, "admin-state") == 0) { + answer->hardware.admin_state = str_to_enum_admin(lyd_get_value(child)); + } else if (strcmp(child->schema->name, "availability-state") == 0) { + answer->hardware.avail_state = str_to_enum_avail(lyd_get_value(child)); + } + } +} + static void recv_notif_v2(struct lyd_node_inner *op, ru_notif_t *answer) { const char *notif = op->schema->name; if (strcmp(notif, "synchronization-state-change") == 0) { - const char *value = lyd_get_value(op->child); - if (strcmp(value, "LOCKED") == 0) { - answer->ptp_state = true; - } else { // "FREERUN" or "HOLDOVER" - answer->ptp_state = false; - } + answer->ptp_state = str_to_enum_ptp(lyd_get_value(op->child)); } else if (strcmp(notif, "rx-array-carriers-state-change") == 0) { - const char *value = lyd_get_value(lyd_child(op->child)->next); - if (strcmp(value, "READY") == 0) { - answer->rx_carrier_state = true; - } else { // "DISABLED" or "BUSY" - answer->rx_carrier_state = false; - } + answer->rx_carrier_state = str_to_enum_carrier(lyd_get_value(lyd_child(op->child)->next)); } else if (strcmp(notif, "tx-array-carriers-state-change") == 0) { - const char *value = lyd_get_value(lyd_child(op->child)->next); - if (strcmp(value, "READY") == 0) { - answer->tx_carrier_state = true; - } else { // "DISABLED" or "BUSY" - answer->tx_carrier_state = false; - } + answer->tx_carrier_state = str_to_enum_carrier(lyd_get_value(lyd_child(op->child)->next)); } else if (strcmp(notif, "netconf-config-change") == 0) { answer->config_change = true; + } else if (strcmp(notif, "hardware-state-oper-enabled") == 0) { + answer->hardware.oper_state = ENABLED_OPER; + get_hardware_states(op, answer); + } else if (strcmp(notif, "hardware-state-oper-disabled") == 0) { + answer->hardware.oper_state = DISABLED_OPER; + get_hardware_states(op, answer); } } @@ -126,11 +126,14 @@ static void notif_clb_v2(struct nc_session *session, const struct lyd_node *envp struct lyd_node_inner *op_inner = (struct lyd_node_inner *)op; if (strcmp(op_inner->schema->name, "measurement-result-stats") == 0) { log_v2_pm_info(ru_ip_add, op_inner); + free(subs_reply); return; } MP_LOG_I("Received notification from RU \"%s\" at (%s)\n%s\n", ru_ip_add, ((struct lyd_node_opaq *)lyd_child(envp))->value, subs_reply); recv_notif_v2(op_inner, answer); + + free(subs_reply); } #endif diff --git a/radio/fhi_72/mplane/xml/get-xml.c b/radio/fhi_72/mplane/xml/get-xml.c index 6456219293..138896103f 100644 --- a/radio/fhi_72/mplane/xml/get-xml.c +++ b/radio/fhi_72/mplane/xml/get-xml.c @@ -23,8 +23,9 @@ #include #include +#include -static char *find_ru_xml_node(xmlNode *node, const char *filter) +static xmlChar *find_ru_xml_node(xmlNode *node, const char *filter) { for (xmlNode *cur_node = node; cur_node; cur_node = cur_node->next) { if (cur_node->type != XML_ELEMENT_NODE) @@ -39,9 +40,9 @@ static char *find_ru_xml_node(xmlNode *node, const char *filter) break; } } - return (char *)xmlNodeGetContent(target_node); + return xmlNodeGetContent(target_node); } - char *answer = find_ru_xml_node(cur_node->children, filter); + xmlChar *answer = find_ru_xml_node(cur_node->children, filter); if (answer != NULL) { return answer; } @@ -56,7 +57,13 @@ char *get_ru_xml_node(const char *buffer, const char *filter) xmlDoc *doc = xmlReadMemory(buffer, len, NULL, NULL, 0); xmlNode *root_element = xmlDocGetRootElement(doc); - return find_ru_xml_node(root_element->children, filter); + xmlChar *content = find_ru_xml_node(root_element->children, filter); + + char *value = strdup((char *)content); + xmlFree(content); + xmlFreeDoc(doc); + + return value; } static void find_ru_xml_list(xmlNode *node, const char *filter, char ***match_list, size_t *count) @@ -74,11 +81,12 @@ static void find_ru_xml_list(xmlNode *node, const char *filter, char ***match_li break; } } - const char *content = (const char *)xmlNodeGetContent(name_node ? name_node : cur_node); + xmlChar *content = xmlNodeGetContent(name_node ? name_node : cur_node); if (content) { *match_list = realloc(*match_list, (*count + 1) * sizeof(char *)); - (*match_list)[*count] = strdup(content); + (*match_list)[*count] = strdup((char *)content); (*count)++; + xmlFree(content); } } find_ru_xml_list(cur_node->children, filter, match_list, count); @@ -93,4 +101,6 @@ void get_ru_xml_list(const char *buffer, const char *filter, char ***match_list, xmlNode *root_element = xmlDocGetRootElement(doc); find_ru_xml_list(root_element->children, filter, match_list, count); + + xmlFreeDoc(doc); } diff --git a/radio/fhi_72/mplane/yang/create-yang-config.c b/radio/fhi_72/mplane/yang/create-yang-config.c index 187fe5b7c1..8f35888797 100644 --- a/radio/fhi_72/mplane/yang/create-yang-config.c +++ b/radio/fhi_72/mplane/yang/create-yang-config.c @@ -233,85 +233,91 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0 ret = lyd_new_path(NULL, (struct ly_ctx *)ru_session->ctx, "/o-ran-uplane-conf:user-plane-configuration", NULL, 0, root); VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create root \"user-plane-configuration\" node.\n"); - if (ru_session->ru_mplane_config.rx_carriers.num != 1 || ru_session->ru_mplane_config.tx_carriers.num !=1) - MP_LOG_I("Only one carrier supported at the moment.\n"); - + const size_t num_rx_ch = oai->rx_num_channels / num_rus; + // RX carriers - struct lyd_node *rx_carrier_node = NULL; - ret = lyd_new_list(*root, NULL, "rx-array-carriers", 0, &rx_carrier_node, ru_session->ru_mplane_config.rx_carriers.name[0]); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"rx-array-carriers\" node.\n"); + const size_t num_rx_carriers = (ru_session->ru_mplane_config.rx_carriers.num == 1) ? 1 : num_rx_ch; + for (size_t i = 0; i < num_rx_carriers; i++) { + struct lyd_node *rx_carrier_node = NULL; + ret = lyd_new_list(*root, NULL, "rx-array-carriers", 0, &rx_carrier_node, ru_session->ru_mplane_config.rx_carriers.name[i]); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"rx-array-carriers\" node.\n"); - char rx_freq[16]; - snprintf(rx_freq, sizeof(rx_freq), "%.0f", oai->rx_freq[0]); - ret = lyd_new_term(rx_carrier_node, NULL, "center-of-channel-bandwidth", rx_freq, 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"center-of-channel-bandwidth\" node.\n"); + char rx_freq[16]; + snprintf(rx_freq, sizeof(rx_freq), "%.0f", oai->rx_freq[0]); + ret = lyd_new_term(rx_carrier_node, NULL, "center-of-channel-bandwidth", rx_freq, 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"center-of-channel-bandwidth\" node.\n"); - char rx_arfcn[16]; - snprintf(rx_arfcn, sizeof(rx_arfcn), "%d", to_nrarfcn(oai->nr_band, oai->rx_freq[0], oai->nr_scs_for_raster, oai->rx_bw)); - ret = lyd_new_term(rx_carrier_node, NULL, "absolute-frequency-center", rx_arfcn, 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"absolute-frequency-center\" node.\n"); + char rx_arfcn[16]; + snprintf(rx_arfcn, sizeof(rx_arfcn), "%d", to_nrarfcn(oai->nr_band, oai->rx_freq[0], oai->nr_scs_for_raster, oai->rx_bw)); + ret = lyd_new_term(rx_carrier_node, NULL, "absolute-frequency-center", rx_arfcn, 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"absolute-frequency-center\" node.\n"); - char rx_bw[16]; - snprintf(rx_bw, sizeof(rx_bw), "%.0f", oai->rx_bw); - ret = lyd_new_term(rx_carrier_node, NULL, "channel-bandwidth", rx_bw, 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"channel-bandwidth\" node.\n"); + char rx_bw[16]; + snprintf(rx_bw, sizeof(rx_bw), "%.0f", oai->rx_bw); + ret = lyd_new_term(rx_carrier_node, NULL, "channel-bandwidth", rx_bw, 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"channel-bandwidth\" node.\n"); - ret = lyd_new_term(rx_carrier_node, NULL, "downlink-radio-frame-offset", "0", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-radio-frame-offset\" node.\n"); + ret = lyd_new_term(rx_carrier_node, NULL, "downlink-radio-frame-offset", "0", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-radio-frame-offset\" node.\n"); - ret = lyd_new_term(rx_carrier_node, NULL, "downlink-sfn-offset", "0", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-sfn-offset\" node.\n"); + ret = lyd_new_term(rx_carrier_node, NULL, "downlink-sfn-offset", "0", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-sfn-offset\" node.\n"); - // gain offset applied uniformly across all array elements or layers - // needs to be within - ret = lyd_new_term(rx_carrier_node, NULL, "gain-correction", "0", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"gain-correction\" node.\n"); + // gain offset applied uniformly across all array elements or layers + // needs to be within + ret = lyd_new_term(rx_carrier_node, NULL, "gain-correction", "0", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"gain-correction\" node.\n"); - ret = lyd_new_term(rx_carrier_node, NULL, "n-ta-offset", "0", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"n-ta-offset\" node.\n"); + ret = lyd_new_term(rx_carrier_node, NULL, "n-ta-offset", "0", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"n-ta-offset\" node.\n"); - ret = lyd_new_term(rx_carrier_node, NULL, "active", "ACTIVE", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"active\" node.\n"); + ret = lyd_new_term(rx_carrier_node, NULL, "active", "ACTIVE", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"active\" node.\n"); + } + + const size_t num_tx_ch = oai->tx_num_channels / num_rus; // TX carriers - struct lyd_node *tx_carrier_node = NULL; - ret = lyd_new_list(*root, NULL, "tx-array-carriers", 0, &tx_carrier_node, ru_session->ru_mplane_config.tx_carriers.name[0]); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"tx-array-carriers\" node.\n"); + const size_t num_tx_carriers = (ru_session->ru_mplane_config.tx_carriers.num == 1) ? 1 : num_tx_ch; + for (size_t i = 0; i < num_tx_carriers; i++) { + struct lyd_node *tx_carrier_node = NULL; + ret = lyd_new_list(*root, NULL, "tx-array-carriers", 0, &tx_carrier_node, ru_session->ru_mplane_config.tx_carriers.name[i]); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"tx-array-carriers\" node.\n"); - char tx_freq[16]; - snprintf(tx_freq, sizeof(tx_freq), "%.0f", oai->tx_freq[0]); - ret = lyd_new_term(tx_carrier_node, NULL, "center-of-channel-bandwidth", tx_freq, 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"center-of-channel-bandwidth\" node.\n"); + char tx_freq[16]; + snprintf(tx_freq, sizeof(tx_freq), "%.0f", oai->tx_freq[0]); + ret = lyd_new_term(tx_carrier_node, NULL, "center-of-channel-bandwidth", tx_freq, 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"center-of-channel-bandwidth\" node.\n"); - char tx_arfcn[16]; - snprintf(tx_arfcn, sizeof(tx_arfcn), "%d", to_nrarfcn(oai->nr_band, oai->tx_freq[0], oai->nr_scs_for_raster, oai->tx_bw)); - ret = lyd_new_term(tx_carrier_node, NULL, "absolute-frequency-center", tx_arfcn, 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"absolute-frequency-center\" node.\n"); + char tx_arfcn[16]; + snprintf(tx_arfcn, sizeof(tx_arfcn), "%d", to_nrarfcn(oai->nr_band, oai->tx_freq[0], oai->nr_scs_for_raster, oai->tx_bw)); + ret = lyd_new_term(tx_carrier_node, NULL, "absolute-frequency-center", tx_arfcn, 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"absolute-frequency-center\" node.\n"); - char tx_bw[16]; - snprintf(tx_bw, sizeof(tx_bw), "%.0f", oai->tx_bw); - ret = lyd_new_term(tx_carrier_node, NULL, "channel-bandwidth", tx_bw, 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"channel-bandwidth\" node.\n"); + char tx_bw[16]; + snprintf(tx_bw, sizeof(tx_bw), "%.0f", oai->tx_bw); + ret = lyd_new_term(tx_carrier_node, NULL, "channel-bandwidth", tx_bw, 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"channel-bandwidth\" node.\n"); - // oai->tx_gain takes the value of att_tx from the RU section of gNB config file - // we assume the same gain is applied to all channels; same as above for the frequency - const double tx_gain_value = ((oai->tx_gain[0] * 10000) < ru_session->xran_mplane.max_tx_gain) ? (oai->tx_gain[0] * 10000) : ru_session->xran_mplane.max_tx_gain; - char tx_gain_str[8]; - snprintf(tx_gain_str, sizeof(tx_gain_str), "%.f", tx_gain_value); - ret = lyd_new_term(tx_carrier_node, NULL, "gain", tx_gain_str, 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"gain\" node.\n"); + // oai->tx_gain takes the value of att_tx from the RU section of gNB config file + // we assume the same gain is applied to all channels; same as above for the frequency + const double tx_gain_value = ((oai->tx_gain[0] * 10000) < ru_session->xran_mplane.max_tx_gain) ? (oai->tx_gain[0] * 10000) : ru_session->xran_mplane.max_tx_gain; + char tx_gain_str[8]; + snprintf(tx_gain_str, sizeof(tx_gain_str), "%.f", tx_gain_value); + ret = lyd_new_term(tx_carrier_node, NULL, "gain", tx_gain_str, 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"gain\" node.\n"); - ret = lyd_new_term(tx_carrier_node, NULL, "downlink-radio-frame-offset", "0", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-radio-frame-offset\" node.\n"); + ret = lyd_new_term(tx_carrier_node, NULL, "downlink-radio-frame-offset", "0", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-radio-frame-offset\" node.\n"); - ret = lyd_new_term(tx_carrier_node, NULL, "downlink-sfn-offset", "0", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-sfn-offset\" node.\n"); + ret = lyd_new_term(tx_carrier_node, NULL, "downlink-sfn-offset", "0", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"downlink-sfn-offset\" node.\n"); - ret = lyd_new_term(tx_carrier_node, NULL, "active", "ACTIVE", 0, NULL); - VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"active\" node.\n"); + ret = lyd_new_term(tx_carrier_node, NULL, "active", "ACTIVE", 0, NULL); + VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"active\" node.\n"); + } // PUSCH & PRACH endpoints - const size_t num_rx_ch = oai->rx_num_channels / num_rus; for (size_t i = 0; i < num_rx_ch; i++) { struct lyd_node *pusch_node = NULL; ret = lyd_new_list(*root, NULL, "low-level-rx-endpoints", 0, &pusch_node, ru_session->ru_mplane_config.rx_endpoints.name[i]); @@ -330,7 +336,6 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0 } // PDSCH endpoints - const size_t num_tx_ch = oai->tx_num_channels / num_rus; for (size_t i = 0; i < num_tx_ch; i++) { struct lyd_node *pdsch_node = NULL; ret = lyd_new_list(*root, NULL, "low-level-tx-endpoints", 0, &pdsch_node, ru_session->ru_mplane_config.tx_endpoints.name[i]); @@ -342,6 +347,7 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0 // PUSCH and PRACH links for (size_t i = 0; i < num_rx_ch; i++) { + const size_t rx_carrier_id = (num_rx_carriers == 1) ? 0 : i; // PUSCH struct lyd_node *pusch_link_node = NULL; char pusch_link[16]; @@ -352,7 +358,7 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0 ret = lyd_new_term(pusch_link_node, NULL, "processing-element", u_proc_elem, 0, NULL); VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"processing-element\" node.\n"); - ret = lyd_new_term(pusch_link_node, NULL, "rx-array-carrier", ru_session->ru_mplane_config.rx_carriers.name[0], 0, NULL); + ret = lyd_new_term(pusch_link_node, NULL, "rx-array-carrier", ru_session->ru_mplane_config.rx_carriers.name[rx_carrier_id], 0, NULL); VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"rx-array-carrier\" node.\n"); ret = lyd_new_term(pusch_link_node, NULL, "low-level-rx-endpoint", ru_session->ru_mplane_config.rx_endpoints.name[i], 0, NULL); @@ -368,7 +374,7 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0 ret = lyd_new_term(prach_link_node, NULL, "processing-element", u_proc_elem, 0, NULL); VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"processing-element\" node.\n"); - ret = lyd_new_term(prach_link_node, NULL, "rx-array-carrier", ru_session->ru_mplane_config.rx_carriers.name[0], 0, NULL); + ret = lyd_new_term(prach_link_node, NULL, "rx-array-carrier", ru_session->ru_mplane_config.rx_carriers.name[rx_carrier_id], 0, NULL); VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"rx-array-carrier\" node.\n"); const size_t prach_endpoint_name_offset = i + (ru_session->ru_mplane_config.rx_endpoints.num / 2); @@ -378,6 +384,7 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0 // PDSCH links for (size_t i = 0; i < num_tx_ch; i++) { + const size_t tx_carrier_id = (num_tx_carriers == 1) ? 0 : i; struct lyd_node *pdsch_link_node = NULL; char pdsch_link[16]; snprintf(pdsch_link, sizeof(pdsch_link), "%s%ld", "PdschLink", i); @@ -387,7 +394,7 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0 ret = lyd_new_term(pdsch_link_node, NULL, "processing-element", u_proc_elem, 0, NULL); VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"processing-element\" node.\n"); - ret = lyd_new_term(pdsch_link_node, NULL, "tx-array-carrier", ru_session->ru_mplane_config.tx_carriers.name[0], 0, NULL); + ret = lyd_new_term(pdsch_link_node, NULL, "tx-array-carrier", ru_session->ru_mplane_config.tx_carriers.name[tx_carrier_id], 0, NULL); VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"tx-array-carrier\" node.\n"); ret = lyd_new_term(pdsch_link_node, NULL, "low-level-tx-endpoint", ru_session->ru_mplane_config.tx_endpoints.name[i], 0, NULL); diff --git a/radio/fhi_72/mplane/yang/get-yang.c b/radio/fhi_72/mplane/yang/get-yang.c index 60131b34cf..2eb39aa1d6 100644 --- a/radio/fhi_72/mplane/yang/get-yang.c +++ b/radio/fhi_72/mplane/yang/get-yang.c @@ -42,20 +42,30 @@ static bool store_schemas(xmlNode *node, ru_session_t *ru_session, struct ly_ctx if (strcmp((const char *)cur_node->name, "schema") == 0) { xmlNode *name_node = xmlFirstElementChild(cur_node); - char *module_name = (char *)xmlNodeGetContent(name_node); + xmlChar *module_name = xmlNodeGetContent(name_node); xmlNode *revision_node = xmlNextElementSibling(name_node); - char *module_revision = (char *)xmlNodeGetContent(revision_node); + xmlChar *module_revision = xmlNodeGetContent(revision_node); xmlNode *format_node = xmlNextElementSibling(revision_node); - char *module_format = (char *)xmlNodeGetContent(format_node); + xmlChar *module_format = xmlNodeGetContent(format_node); - if (strcmp(module_format, "yang") != 0) + if (strcmp((char*)module_format, "yang") != 0) { + xmlFree(module_name); + xmlFree(module_revision); + xmlFree(module_format); continue; + } MP_LOG_I("RPC request to RU \"%s\" = for module \"%s\".\n", ru_session->ru_ip_add, module_name); - struct nc_rpc *get_schema_rpc = nc_rpc_getschema(module_name, module_revision, "yang", param); + struct nc_rpc *get_schema_rpc = nc_rpc_getschema((char*)module_name, (char*)module_revision, "yang", param); char *schema_data = NULL; bool success = rpc_send_recv((struct nc_session *)ru_session->session, get_schema_rpc, wd, timeout, &schema_data); - AssertError(success, return false, "[MPLANE] Unable to get schema for module \"%s\" from RU \"%s\".\n", module_name, ru_session->ru_ip_add); + if (!success) { + MP_LOG_W("[MPLANE] Unable to get schema for module \"%s\" from RU \"%s\".\n", module_name, ru_session->ru_ip_add); + xmlFree(module_name); + xmlFree(module_revision); + xmlFree(module_format); + return false; + } if (schema_data) { #ifdef MPLANE_V1 @@ -68,11 +78,21 @@ static bool store_schemas(xmlNode *node, ru_session_t *ru_session, struct ly_ctx if (!mod) { MP_LOG_W("Unable to load module \"%s\" from RU \"%s\".\n", module_name, ru_session->ru_ip_add); nc_rpc_free(get_schema_rpc); +#ifdef MPLANE_V1 + ly_ctx_destroy(*ctx, NULL); +#elif defined MPLANE_V2 ly_ctx_destroy(*ctx); - return false; - } +#endif + xmlFree(module_name); + xmlFree(module_revision); + xmlFree(module_format); + return false; + } } nc_rpc_free(get_schema_rpc); + xmlFree(module_name); + xmlFree(module_revision); + xmlFree(module_format); } } @@ -105,6 +125,7 @@ bool load_yang_models(ru_session_t *ru_session, const char *buffer) xmlNode *root_element = xmlDocGetRootElement(doc); bool success = load_from_operational_ds(root_element->children, ru_session, ctx); + xmlFreeDoc(doc); if (success) { MP_LOG_I("Successfully loaded all yang modules from operational datastore for RU \"%s\".\n", ru_session->ru_ip_add); return true; @@ -116,7 +137,7 @@ bool load_yang_models(ru_session_t *ru_session, const char *buffer) 1) the yang models order is not good - the dependancy models have to be loaded first 2) earlier O-RAN yang versions (e.g. v4) is not properly defined (i.e. optional parameters should not be included by default) */ const char *yang_dir = YANG_MODELS; - const char *yang_models[] = {"ietf-interfaces", "iana-if-type", "ietf-ip", "iana-hardware", "ietf-hardware", "o-ran-interfaces", "o-ran-module-cap", "o-ran-compression-factors", "o-ran-processing-element", "o-ran-uplane-conf", "ietf-netconf-acm", "ietf-crypto-types", "o-ran-file-management", "o-ran-performance-management"}; + const char *yang_models[] = {"ietf-interfaces", "iana-if-type", "ietf-ip", "iana-hardware", "ietf-hardware", "o-ran-wg4-features", "o-ran-interfaces", "o-ran-module-cap", "o-ran-compression-factors", "ietf-crypto-types", "o-ran-usermgmt", "o-ran-processing-element", "o-ran-hardware", "o-ran-common-yang-types", "o-ran-delay-management", "o-ran-uplane-conf", "ietf-netconf-acm", "o-ran-file-management", "o-ran-performance-management"}; #ifdef MPLANE_V1 *ctx = ly_ctx_new(yang_dir, 0); diff --git a/radio/fhi_72/mplane/yang/models/ietf-crypto-types.yang b/radio/fhi_72/mplane/yang/models/ietf-crypto-types.yang index 1b94b03176..342dde899c 100644 --- a/radio/fhi_72/mplane/yang/models/ietf-crypto-types.yang +++ b/radio/fhi_72/mplane/yang/models/ietf-crypto-types.yang @@ -19,28 +19,27 @@ module ietf-crypto-types { "IETF NETCONF (Network Configuration) Working Group"; contact - "WG Web: - WG List: - Author: Kent Watsen - Author: Wang Haiguang "; + "WG Web: https://datatracker.ietf.org/wg/netconf + WG List: NETCONF WG list + Author: Kent Watsen "; description "This module defines common YANG types for cryptographic applications. - Copyright (c) 2019 IETF Trust and the persons identified + Copyright (c) 2022 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and - subject to the license terms contained in, the Simplified + subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). - This version of this YANG module is part of RFC XXXX - (https://www.rfc-editor.org/info/rfcXXXX); see the RFC - itself for full legal notices.; + This version of this YANG module is part of RFC AAAA + (https://www.rfc-editor.org/info/rfcAAAA); see the RFC + itself for full legal notices. The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', @@ -49,1066 +48,361 @@ module ietf-crypto-types { (RFC 8174) when, and only when, they appear in all capitals, as shown here."; - revision 2019-04-29 { + revision 2022-12-12 { description "Initial version"; reference - "RFC XXXX: Common YANG Data Types for Cryptography"; + "RFC AAAA: YANG Data Types and Groupings for Cryptography"; } - /**************************************/ - /* Identities for Hash Algorithms */ - /**************************************/ + /****************/ + /* Features */ + /****************/ - identity hash-algorithm { + feature one-symmetric-key-format { description - "A base identity for hash algorithm verification."; + "Indicates that the server supports the + 'one-symmetric-key-format' identity."; } - identity sha-224 { - base hash-algorithm; + feature one-asymmetric-key-format { description - "The SHA-224 algorithm."; + "Indicates that the server supports the + 'one-asymmetric-key-format' identity."; + } + + feature symmetrically-encrypted-value-format { + description + "Indicates that the server supports the + 'symmetrically-encrypted-value-format' identity."; + } + + feature asymmetrically-encrypted-value-format { + description + "Indicates that the server supports the + 'asymmetrically-encrypted-value-format' identity."; + } + + feature cms-enveloped-data-format { + description + "Indicates that the server supports the + 'cms-enveloped-data-format' identity."; + } + + feature cms-encrypted-data-format { + description + "Indicates that the server supports the + 'cms-encrypted-data-format' identity."; + } + + feature csr-generation { + description + "Indicates that the server implements the + 'generate-csr' action."; + } + + feature p10-based-csrs { + description + "Indicates that the erver implements support + for generating P10-based CSRs, as defined + in RFC 2986."; reference - "RFC 6234: US Secure Hash Algorithms."; - } - identity sha-256 { - base hash-algorithm; - description - "The SHA-256 algorithm."; - reference - "RFC 6234: US Secure Hash Algorithms."; + "RFC 2986: PKCS #10: Certification Request Syntax + Specification Version 1.7"; } - identity sha-384 { - base hash-algorithm; + feature certificate-expiration-notification { description - "The SHA-384 algorithm."; - reference - "RFC 6234: US Secure Hash Algorithms."; + "Indicates that the server implements the + 'certificate-expiration' notification."; } - identity sha-512 { - base hash-algorithm; + feature hidden-keys { description - "The SHA-512 algorithm."; - reference - "RFC 6234: US Secure Hash Algorithms."; + "Indicates that the server supports hidden keys."; } - /***********************************************/ - /* Identities for Asymmetric Key Algorithms */ - /***********************************************/ - - identity asymmetric-key-algorithm { + feature password-encryption { description - "Base identity from which all asymmetric key - encryption Algorithm."; + "Indicates that the server supports password + encryption."; } - identity rsa1024 { - base asymmetric-key-algorithm; + feature symmetric-key-encryption { description - "The RSA algorithm using a 1024-bit key."; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; + "Indicates that the server supports encryption + of symmetric keys."; } - identity rsa2048 { - base asymmetric-key-algorithm; + feature private-key-encryption { description - "The RSA algorithm using a 2048-bit key."; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; + "Indicates that the server supports encryption + of private keys."; } - identity rsa3072 { - base asymmetric-key-algorithm; + /*************************************************/ + /* Base Identities for Key Format Structures */ + /*************************************************/ + + identity symmetric-key-format { description - "The RSA algorithm using a 3072-bit key."; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; + "Base key-format identity for symmetric keys."; } - identity rsa4096 { - base asymmetric-key-algorithm; + identity public-key-format { description - "The RSA algorithm using a 4096-bit key."; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; + "Base key-format identity for public keys."; } - identity rsa7680 { - base asymmetric-key-algorithm; + identity private-key-format { description - "The RSA algorithm using a 7680-bit key."; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; - } - - identity rsa15360 { - base asymmetric-key-algorithm; - description - "The RSA algorithm using a 15360-bit key."; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; - } - - identity secp192r1 { - base asymmetric-key-algorithm; - description - "The ECDSA algorithm using a NIST P256 Curve."; - reference - "RFC 6090: - Fundamental Elliptic Curve Cryptography Algorithms."; - } - identity secp224r1 { - base asymmetric-key-algorithm; - description - "The ECDSA algorithm using a NIST P256 Curve."; - reference - "RFC 6090: - Fundamental Elliptic Curve Cryptography Algorithms."; - } - - identity secp256r1 { - base asymmetric-key-algorithm; - description - "The ECDSA algorithm using a NIST P256 Curve."; - reference - "RFC 6090: - Fundamental Elliptic Curve Cryptography Algorithms."; - } - - identity secp384r1 { - base asymmetric-key-algorithm; - description - "The ECDSA algorithm using a NIST P256 Curve."; - reference - "RFC 6090: - Fundamental Elliptic Curve Cryptography Algorithms."; - } - - identity secp521r1 { - base asymmetric-key-algorithm; - description - "The ECDSA algorithm using a NIST P256 Curve."; - reference - "RFC 6090: - Fundamental Elliptic Curve Cryptography Algorithms."; - } - - /*************************************/ - /* Identities for MAC Algorithms */ - /*************************************/ - - identity mac-algorithm { - description - "A base identity for mac generation."; - } - - identity hmac-sha1 { - base mac-algorithm; - description - "Generating MAC using SHA1 hash function"; - reference - "RFC 3174: US Secure Hash Algorithm 1 (SHA1)"; - } - - identity hmac-sha1-96 { - base mac-algorithm; - description - "Generating MAC using SHA1 hash function"; - reference - "RFC 2404: The Use of HMAC-SHA-1-96 within ESP and AH"; - } - - identity hmac-sha2-224 { - base mac-algorithm; - description - "Generating MAC using SHA2 hash function"; - reference - "RFC 6234: - US Secure Hash Algorithms (SHA and SHA-based HMAC and - HKDF)"; - } - - identity hmac-sha2-256 { - base mac-algorithm; - description - "Generating MAC using SHA2 hash function"; - reference - "RFC 6234: - US Secure Hash Algorithms (SHA and SHA-based HMAC and - HKDF)"; - } - - identity hmac-sha2-256-128 { - base mac-algorithm; - description - "Generating a 256 bits MAC using SHA2 hash function and - truncate it to 128 bits"; - reference - "RFC 4868: - Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 - with IPsec"; - } - - identity hmac-sha2-384 { - base mac-algorithm; - description - "Generating MAC using SHA2 hash function"; - reference - "RFC 6234: - US Secure Hash Algorithms (SHA and SHA-based HMAC and - HKDF)"; - } - - identity hmac-sha2-384-192 { - base mac-algorithm; - description - "Generating a 384 bits MAC using SHA2 hash function and - truncate it to 192 bits"; - reference - "RFC 4868: - Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with - IPsec"; - } - - identity hmac-sha2-512 { - base mac-algorithm; - description - "Generating MAC using SHA2 hash function"; - reference - "RFC 6234: - US Secure Hash Algorithms (SHA and SHA-based HMAC and - HKDF)"; - } - - identity hmac-sha2-512-256 { - base mac-algorithm; - description - "Generating a 512 bits MAC using SHA2 hash function and - truncating it to 256 bits"; - reference - "RFC 4868: - Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with - IPsec"; - } - - identity aes-128-gmac { - base mac-algorithm; - description - "Generating MAC using the Advanced Encryption Standard (AES) - Galois Message Authentication Code (GMAC) as a mechanism to - provide data origin authentication"; - reference - "RFC 4543: - The Use of Galois Message Authentication Code (GMAC) in - IPsec ESP and AH"; - } - - identity aes-192-gmac { - base mac-algorithm; - description - "Generating MAC using the Advanced Encryption Standard (AES) - Galois Message Authentication Code (GMAC) as a mechanism to - provide data origin authentication"; - reference - "RFC 4543: - The Use of Galois Message Authentication Code (GMAC) in - IPsec ESP and AH"; - } - - identity aes-256-gmac { - base mac-algorithm; - description - "Generating MAC using the Advanced Encryption Standard (AES) - Galois Message Authentication Code (GMAC) as a mechanism to - provide data origin authentication"; - reference - "RFC 4543: - The Use of Galois Message Authentication Code (GMAC) in - IPsec ESP and AH"; - } - - identity aes-cmac-96 { - base mac-algorithm; - description - "Generating MAC using Advanced Encryption Standard (AES) - Cipher-based Message Authentication Code (CMAC)"; - reference - "RFC 4494: The AES-CMAC-96 Algorithm and its Use with IPsec"; - } - - identity aes-cmac-128 { - base mac-algorithm; - description - "Generating MAC using Advanced Encryption Standard (AES) - Cipher-based Message Authentication Code (CMAC)"; - reference - "RFC 4493: The AES-CMAC Algorithm"; - } - - /********************************************/ - /* Identities for Encryption Algorithms */ - /********************************************/ - - identity encryption-algorithm { - description - "A base identity for encryption algorithm."; - } - - identity aes-128-cbc { - base encryption-algorithm; - description - "Encrypt message with AES algorithm in CBC mode with a key - length of 128 bits"; - reference - "RFC 3565: - Use of the Advanced Encryption Standard (AES) Encryption - Algorithm in Cryptographic Message Syntax (CMS)"; - } - - identity aes-192-cbc { - base encryption-algorithm; - description - "Encrypt message with AES algorithm in CBC mode with a key - length of 192 bits"; - reference - "RFC 3565: - Use of the Advanced Encryption Standard (AES) Encryption - Algorithm in Cryptographic Message Syntax (CMS)"; - } - - identity aes-256-cbc { - base encryption-algorithm; - description - "Encrypt message with AES algorithm in CBC mode with a key - length of 256 bits"; - reference - "RFC 3565: - Use of the Advanced Encryption Standard (AES) Encryption - Algorithm in Cryptographic Message Syntax (CMS)"; - } - - identity aes-128-ctr { - base encryption-algorithm; - description - "Encrypt message with AES algorithm in CTR mode with a key - length of 128 bits"; - reference - "RFC 3686: - Using Advanced Encryption Standard (AES) Counter Mode with - IPsec Encapsulating Security Payload (ESP)"; - } - identity aes-192-ctr { - base encryption-algorithm; - description - "Encrypt message with AES algorithm in CTR mode with a key - length of 192 bits"; - reference - "RFC 3686: - Using Advanced Encryption Standard (AES) Counter Mode with - IPsec Encapsulating Security Payload (ESP)"; - } - - identity aes-256-ctr { - base encryption-algorithm; - description - "Encrypt message with AES algorithm in CTR mode with a key - length of 256 bits"; - reference - "RFC 3686: - Using Advanced Encryption Standard (AES) Counter Mode with - IPsec Encapsulating Security Payload (ESP)"; + "Base key-format identity for private keys."; } /****************************************************/ - /* Identities for Encryption and MAC Algorithms */ + /* Identities for Private Key Format Structures */ /****************************************************/ - identity encryption-and-mac-algorithm { + identity rsa-private-key-format { + base private-key-format; description - "A base identity for encryption and MAC algorithm."; - } - - identity aes-128-ccm { - base encryption-and-mac-algorithm; - description - "Encrypt message with AES algorithm in CCM mode with a key - length of 128 bits; it can also be used for generating MAC"; + "Indicates that the private key value is encoded + as an RSAPrivateKey (from RFC 3447)."; reference - "RFC 4309: - Using Advanced Encryption Standard (AES) CCM Mode with - IPsec Encapsulating Security Payload (ESP)"; + "RFC 3447: PKCS #1: RSA Cryptography + Specifications Version 2.2"; } - identity aes-192-ccm { - base encryption-and-mac-algorithm; + identity ec-private-key-format { + base private-key-format; description - "Encrypt message with AES algorithm in CCM mode with a key - length of 192 bits; it can also be used for generating MAC"; + "Indicates that the private key value is encoded + as an ECPrivateKey (from RFC 5915)"; reference - "RFC 4309: - Using Advanced Encryption Standard (AES) CCM Mode with - IPsec Encapsulating Security Payload (ESP)"; + "RFC 5915: Elliptic Curve Private Key Structure"; } - identity aes-256-ccm { - base encryption-and-mac-algorithm; + identity one-asymmetric-key-format { + if-feature "one-asymmetric-key-format"; + base private-key-format; description - "Encrypt message with AES algorithm in CCM mode with a key - length of 256 bits; it can also be used for generating MAC"; + "Indicates that the private key value is a CMS + OneAsymmetricKey structure, as defined in RFC 5958, + encoded using ASN.1 distinguished encoding rules + (DER), as specified in ITU-T X.690."; reference - "RFC 4309: - Using Advanced Encryption Standard (AES) CCM Mode with - IPsec Encapsulating Security Payload (ESP)"; + "RFC 5958: Asymmetric Key Packages + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; } - identity aes-128-gcm { - base encryption-and-mac-algorithm; - description - "Encrypt message with AES algorithm in GCM mode with a key - length of 128 bits; it can also be used for generating MAC"; - reference - "RFC 4106: - The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating - Security Payload (ESP)"; - } + /***************************************************/ + /* Identities for Public Key Format Structures */ + /***************************************************/ - identity aes-192-gcm { - base encryption-and-mac-algorithm; + identity ssh-public-key-format { + base public-key-format; description - "Encrypt message with AES algorithm in GCM mode with a key - length of 192 bits; it can also be used for generating MAC"; - reference - "RFC 4106: - The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating - Security Payload (ESP)"; - } + "Indicates that the public key value is an SSH public key, + as specified by RFC 4253, Section 6.6, i.e.: - identity mac-aes-256-gcm { - base encryption-and-mac-algorithm; - description - "Encrypt message with AES algorithm in GCM mode with a key - length of 128 bits; it can also be used for generating MAC"; - reference - "RFC 4106: - The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating - Security Payload (ESP)"; - } - identity chacha20-poly1305 { - base encryption-and-mac-algorithm; - description - "Encrypt message with chacha20 algorithm and generate MAC with - POLY1305; it can also be used for generating MAC"; - reference - "RFC 8439: ChaCha20 and Poly1305 for IETF Protocols"; - } - - /******************************************/ - /* Identities for signature algorithm */ - /******************************************/ - - identity signature-algorithm { - description - "A base identity for asymmetric key encryption algorithm."; - } - - identity dsa-sha1 { - base signature-algorithm; - description - "The signature algorithm using DSA algorithm with SHA1 hash - algorithm"; + string certificate or public key format + identifier + byte[n] key/certificate data."; reference "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; } - identity rsassa-pkcs1-sha1 { - base signature-algorithm; + identity subject-public-key-info-format { + base public-key-format; description - "The signature algorithm using RSASSA-PKCS1-v1_5 with the SHA1 - hash algorithm."; + "Indicates that the public key value is a SubjectPublicKeyInfo + structure, as described in RFC 5280 encoded using ASN.1 + distinguished encoding rules (DER), as specified in + ITU-T X.690."; reference - "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; + "RFC 5280: + Internet X.509 Public Key Infrastructure Certificate + and Certificate Revocation List (CRL) Profile + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; } - identity rsassa-pkcs1-sha256 { - base signature-algorithm; + /******************************************************/ + /* Identities for Symmetric Key Format Structures */ + /******************************************************/ + + identity octet-string-key-format { + base symmetric-key-format; description - "The signature algorithm using RSASSA-PKCS1-v1_5 with the - SHA256 hash algorithm."; + "Indicates that the key is encoded as a raw octet string. + The length of the octet string MUST be appropriate for + the associated algorithm's block size. + + How the associated algorithm is known is outside the + scope of this module. This statement also applies when + the octet string has been encrypted."; + } + + identity one-symmetric-key-format { + if-feature "one-symmetric-key-format"; + base symmetric-key-format; + description + "Indicates that the private key value is a CMS + OneSymmetricKey structure, as defined in RFC 6031, + encoded using ASN.1 distinguished encoding rules + (DER), as specified in ITU-T X.690."; reference - "RFC 8332: - Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell - (SSH) Protocol - RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; + "RFC 6031: Cryptographic Message Syntax (CMS) + Symmetric Key Package Content Type + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; } - identity rsassa-pkcs1-sha384 { - base signature-algorithm; + + /*************************************************/ + /* Identities for Encrypted Value Structures */ + /*************************************************/ + + identity encrypted-value-format { description - "The signature algorithm using RSASSA-PKCS1-v1_5 with the - SHA384 hash algorithm."; + "Base format identity for encrypted values."; + } + + identity symmetrically-encrypted-value-format { + if-feature "symmetrically-encrypted-value-format"; + base encrypted-value-format; + description + "Base format identity for symmetrically encrypted + values."; + } + + identity asymmetrically-encrypted-value-format { + if-feature "asymmetrically-encrypted-value-format"; + base encrypted-value-format; + description + "Base format identity for asymmetrically encrypted + values."; + } + + identity cms-encrypted-data-format { + if-feature "cms-encrypted-data-format"; + base symmetrically-encrypted-value-format; + description + "Indicates that the encrypted value conforms to + the 'encrypted-data-cms' type with the constraint + that the 'unprotectedAttrs' value is not set."; reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; + "RFC 5652: Cryptographic Message Syntax (CMS) + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; } - identity rsassa-pkcs1-sha512 { - base signature-algorithm; + identity cms-enveloped-data-format { + if-feature "cms-enveloped-data-format"; + base asymmetrically-encrypted-value-format; description - "The signature algorithm using RSASSA-PKCS1-v1_5 with the - SHA512 hash algorithm."; + "Indicates that the encrypted value conforms to the + 'enveloped-data-cms' type with the following constraints: + + The EnvelopedData structure MUST have exactly one + 'RecipientInfo'. + + If the asymmetric key supports public key cryptography + (e.g., RSA), then the 'RecipientInfo' must be a + 'KeyTransRecipientInfo' with the 'RecipientIdentifier' + using a 'subjectKeyIdentifier' with the value set using + 'method 1' in RFC 7093 over the recipient's public key. + + Otherwise, if the asymmetric key supports key agreement + (e.g., ECC), then the 'RecipientInfo' must be a + 'KeyAgreeRecipientInfo'. The 'OriginatorIdentifierOrKey' + value must use the 'OriginatorPublicKey' alternative. + The 'UserKeyingMaterial' value must not be present. + There must be exactly one 'RecipientEncryptedKeys' value + having the 'KeyAgreeRecipientIdentifier' set to 'rKeyId' + with the value set using 'method 1' in RFC 7093 over the + recipient's public key."; reference - "RFC 8332: - Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell - (SSH) Protocol - RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; + "RFC 5652: Cryptographic Message Syntax (CMS) + RFC 7093: + Additional Methods for Generating Key + Identifiers Values + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; } - identity rsassa-pss-rsae-sha256 { - base signature-algorithm; + /*********************************************************/ + /* Identities for Certificate Signing Request Formats */ + /*********************************************************/ + + identity csr-format { description - "The signature algorithm using RSASSA-PSS with mask generation - function 1 and SHA256 hash algorithm. If the public key is - carried in an X.509 certificate, it MUST use the rsaEncryption - OID"; + "A base identity for the certificate signing request + formats. Additional derived identities MAY be defined + by future efforts."; + } + + identity p10-csr { + if-feature "p10-based-csrs"; + base csr-format; + description + "Indicates the 'CertificationRequest' structure + defined in RFC 2986."; reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; + "RFC 2986: PKCS #10: Certification Request Syntax + Specification Version 1.7"; } - identity rsassa-pss-rsae-sha384 { - base signature-algorithm; + /***************************************************/ + /* Typedefs for ASN.1 structures from RFC 2986 */ + /***************************************************/ + + typedef csr-info { + type binary; description - "The signature algorithm using RSASSA-PSS with mask generation - function 1 and SHA384 hash algorithm. If the public key is - carried in an X.509 certificate, it MUST use the rsaEncryption - OID"; + "A CertificationRequestInfo structure, as defined in + RFC 2986, encoded using ASN.1 distinguished encoding + rules (DER), as specified in ITU-T X.690."; reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; + "RFC 2986: PKCS #10: Certification Request Syntax + Specification Version 1.7 + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; } - identity rsassa-pss-rsae-sha512 { - base signature-algorithm; + typedef p10-csr { + type binary; description - "The signature algorithm using RSASSA-PSS with mask generation - function 1 and SHA512 hash algorithm. If the public key is - carried in an X.509 certificate, it MUST use the rsaEncryption - OID"; + "A CertificationRequest structure, as specified in + RFC 2986, encoded using ASN.1 distinguished encoding + rules (DER), as specified in ITU-T X.690."; reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity rsassa-pss-pss-sha256 { - base signature-algorithm; - description - "The signature algorithm using RSASSA-PSS with mask generation - function 1 and SHA256 hash algorithm. If the public key is - carried in an X.509 certificate, it MUST use the RSASSA-PSS - OID"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity rsassa-pss-pss-sha384 { - base signature-algorithm; - description - "The signature algorithm using RSASSA-PSS with mask generation - function 1 and SHA256 hash algorithm. If the public key is - carried in an X.509 certificate, it MUST use the RSASSA-PSS - OID"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity rsassa-pss-pss-sha512 { - base signature-algorithm; - description - "The signature algorithm using RSASSA-PSS with mask generation - function 1 and SHA256 hash algorithm. If the public key is - carried in an X.509 certificate, it MUST use the RSASSA-PSS - OID"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity ecdsa-secp256r1-sha256 { - base signature-algorithm; - description - "The signature algorithm using ECDSA with curve name secp256r1 - and SHA256 hash algorithm."; - reference - "RFC 5656: Elliptic Curve Algorithm Integration in the - Secure Shell Transport Layer - RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity ecdsa-secp384r1-sha384 { - base signature-algorithm; - description - "The signature algorithm using ECDSA with curve name secp384r1 - and SHA384 hash algorithm."; - reference - "RFC 5656: Elliptic Curve Algorithm Integration in the - Secure Shell Transport Layer - RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity ecdsa-secp521r1-sha512 { - base signature-algorithm; - description - "The signature algorithm using ECDSA with curve name secp521r1 - and SHA512 hash algorithm."; - reference - "RFC 5656: Elliptic Curve Algorithm Integration in the - Secure Shell Transport Layer - RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity ed25519 { - base signature-algorithm; - description - "The signature algorithm using EdDSA as defined in RFC 8032 or - its successors."; - reference - "RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA)"; - } - - identity ed448 { - base signature-algorithm; - description - "The signature algorithm using EdDSA as defined in RFC 8032 or - its successors."; - reference - "RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA)"; - } - - identity eccsi { - base signature-algorithm; - description - "The signature algorithm using ECCSI signature as defined in - RFC 6507."; - reference - "RFC 6507: - Elliptic Curve-Based Certificateless Signatures for - Identity-based Encryption (ECCSI)"; - } - - /**********************************************/ - /* Identities for key exchange algorithms */ - /**********************************************/ - - identity key-exchange-algorithm { - description - "A base identity for Diffie-Hellman based key exchange - algorithm."; - } - - identity psk-only { - base key-exchange-algorithm; - description - "Using Pre-shared key for authentication and key exchange"; - reference - "RFC 4279: - Pre-Shared Key cipher suites for Transport Layer Security - (TLS)"; - } - - identity dhe-ffdhe2048 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with 2048 bit - finite field"; - reference - "RFC 7919: - Negotiated Finite Field Diffie-Hellman Ephemeral Parameters - for Transport Layer Security (TLS)"; - } - - identity dhe-ffdhe3072 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with 3072 bit finite - field"; - reference - "RFC 7919: - Negotiated Finite Field Diffie-Hellman Ephemeral Parameters - for Transport Layer Security (TLS)"; - } - - identity dhe-ffdhe4096 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with 4096 bit - finite field"; - reference - "RFC 7919: - Negotiated Finite Field Diffie-Hellman Ephemeral Parameters - for Transport Layer Security (TLS)"; - } - - identity dhe-ffdhe6144 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with 6144 bit - finite field"; - reference - "RFC 7919: - Negotiated Finite Field Diffie-Hellman Ephemeral Parameters - for Transport Layer Security (TLS)"; - } - - identity dhe-ffdhe8192 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with 8192 bit - finite field"; - reference - "RFC 7919: - Negotiated Finite Field Diffie-Hellman Ephemeral Parameters - for Transport Layer Security (TLS)"; - } - - identity psk-dhe-ffdhe2048 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with Diffie-Hellman key - generation mechanism, where the DH group is FFDHE2048"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-dhe-ffdhe3072 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with Diffie-Hellman key - generation mechanism, where the DH group is FFDHE3072"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-dhe-ffdhe4096 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with Diffie-Hellman key - generation mechanism, where the DH group is FFDHE4096"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-dhe-ffdhe6144 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with Diffie-Hellman key - generation mechanism, where the DH group is FFDHE6144"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-dhe-ffdhe8192 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with Diffie-Hellman key - generation mechanism, where the DH group is FFDHE8192"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity ecdhe-secp256r1 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with elliptic group - over curve secp256r1"; - reference - "RFC 8422: - Elliptic Curve Cryptography (ECC) Cipher Suites for - Transport Layer Security (TLS) Versions 1.2 and Earlier"; - } - - identity ecdhe-secp384r1 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with elliptic group - over curve secp384r1"; - reference - "RFC 8422: - Elliptic Curve Cryptography (ECC) Cipher Suites for - Transport Layer Security (TLS) Versions 1.2 and Earlier"; - } - - identity ecdhe-secp521r1 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with elliptic group - over curve secp521r1"; - reference - "RFC 8422: - Elliptic Curve Cryptography (ECC) Cipher Suites for - Transport Layer Security (TLS) Versions 1.2 and Earlier"; - } - - identity ecdhe-x25519 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with elliptic group - over curve x25519"; - reference - "RFC 8422: - Elliptic Curve Cryptography (ECC) Cipher Suites for - Transport Layer Security (TLS) Versions 1.2 and Earlier"; - } - - identity ecdhe-x448 { - base key-exchange-algorithm; - description - "Ephemeral Diffie Hellman key exchange with elliptic group - over curve x448"; - reference - "RFC 8422: - Elliptic Curve Cryptography (ECC) Cipher Suites for - Transport Layer Security (TLS) Versions 1.2 and Earlier"; - } - - identity psk-ecdhe-secp256r1 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with elliptic group-based - Ephemeral Diffie Hellman key exchange over curve secp256r1"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-ecdhe-secp384r1 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with elliptic group-based - Ephemeral Diffie Hellman key exchange over curve secp384r1"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-ecdhe-secp521r1 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with elliptic group-based - Ephemeral Diffie Hellman key exchange over curve secp521r1"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-ecdhe-x25519 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with elliptic group-based - Ephemeral Diffie Hellman key exchange over curve x25519"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity psk-ecdhe-x448 { - base key-exchange-algorithm; - description - "Key exchange using pre-shared key with elliptic group-based - Ephemeral Diffie Hellman key exchange over curve x448"; - reference - "RFC 8446: - The Transport Layer Security (TLS) Protocol Version 1.3"; - } - - identity diffie-hellman-group14-sha1 { - base key-exchange-algorithm; - description - "Using DH group14 and SHA1 for key exchange"; - reference - "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; - } - - identity diffie-hellman-group14-sha256 { - base key-exchange-algorithm; - description - "Using DH group14 and SHA256 for key exchange"; - reference - "RFC 8268: - More Modular Exponentiation (MODP) Diffie-Hellman (DH) - Key Exchange (KEX) Groups for Secure Shell (SSH)"; - } - - identity diffie-hellman-group15-sha512 { - base key-exchange-algorithm; - description - "Using DH group15 and SHA512 for key exchange"; - reference - "RFC 8268: - More Modular Exponentiation (MODP) Diffie-Hellman (DH) - Key Exchange (KEX) Groups for Secure Shell (SSH)"; - } - - identity diffie-hellman-group16-sha512 { - base key-exchange-algorithm; - description - "Using DH group16 and SHA512 for key exchange"; - reference - "RFC 8268: - More Modular Exponentiation (MODP) Diffie-Hellman (DH) - Key Exchange (KEX) Groups for Secure Shell (SSH)"; - } - - identity diffie-hellman-group17-sha512 { - base key-exchange-algorithm; - description - "Using DH group17 and SHA512 for key exchange"; - - reference - "RFC 8268: - More Modular Exponentiation (MODP) Diffie-Hellman (DH) - Key Exchange (KEX) Groups for Secure Shell (SSH)"; - } - - identity diffie-hellman-group18-sha512 { - base key-exchange-algorithm; - description - "Using DH group18 and SHA512 for key exchange"; - reference - "RFC 8268: - More Modular Exponentiation (MODP) Diffie-Hellman (DH) - Key Exchange (KEX) Groups for Secure Shell (SSH)"; - } - - identity ecdh-sha2-secp256r1 { - base key-exchange-algorithm; - description - "Elliptic curve-based Diffie Hellman key exchange over curve - secp256r1 and using SHA2 for MAC generation"; - reference - "RFC 6239: Suite B Cryptographic Suites for Secure Shell - (SSH)"; - } - - identity ecdh-sha2-secp384r1 { - base key-exchange-algorithm; - description - "Elliptic curve-based Diffie Hellman key exchange over curve - secp384r1 and using SHA2 for MAC generation"; - reference - "RFC 6239: Suite B Cryptographic Suites for Secure Shell - (SSH)"; - } - - identity rsaes-oaep { - base key-exchange-algorithm; - description - "RSAES-OAEP combines the RSAEP and RSADP primitives with the - EME-OAEP encoding method"; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; - } - - identity rsaes-pkcs1-v1_5 { - base key-exchange-algorithm; - description - " RSAES-PKCS1-v1_5 combines the RSAEP and RSADP primitives - with the EME-PKCS1-v1_5 encoding method"; - reference - "RFC 8017: - PKCS #1: RSA Cryptography Specifications Version 2.2."; - } - - /**********************************************************/ - /* Typedefs for identityrefs to above base identities */ - /**********************************************************/ - - typedef hash-algorithm-ref { - type identityref { - base hash-algorithm; - } - description - "This typedef enables importing modules to easily define an - identityref to the 'hash-algorithm' base identity."; - } - - typedef signature-algorithm-ref { - type identityref { - base signature-algorithm; - } - description - "This typedef enables importing modules to easily define an - identityref to the 'signature-algorithm' base identity."; - } - - typedef mac-algorithm-ref { - type identityref { - base mac-algorithm; - } - description - "This typedef enables importing modules to easily define an - identityref to the 'mac-algorithm' base identity."; - } - - typedef encryption-algorithm-ref { - type identityref { - base encryption-algorithm; - } - description - "This typedef enables importing modules to easily define an - identityref to the 'encryption-algorithm' - base identity."; - } - - typedef encryption-and-mac-algorithm-ref { - type identityref { - base encryption-and-mac-algorithm; - } - description - "This typedef enables importing modules to easily define an - identityref to the 'encryption-and-mac-algorithm' - base identity."; - } - - typedef asymmetric-key-algorithm-ref { - type identityref { - base asymmetric-key-algorithm; - } - description - "This typedef enables importing modules to easily define an - identityref to the 'asymmetric-key-algorithm' - base identity."; - } - - typedef key-exchange-algorithm-ref { - type identityref { - base key-exchange-algorithm; - } - description - "This typedef enables importing modules to easily define an - identityref to the 'key-exchange-algorithm' base identity."; + "RFC 2986: + PKCS #10: Certification Request Syntax Specification + Version 1.7 + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; } /***************************************************/ @@ -1149,6 +443,43 @@ module ietf-crypto-types { Encoding Rules (DER)."; } + /***************************************************/ + /* Typedefs for ASN.1 structures from RFC 6960 */ + /***************************************************/ + typedef oscp-request { + type binary; + description + "A OCSPRequest structure, as specified in RFC 6960, + encoded using ASN.1 distinguished encoding rules + (DER), as specified in ITU-T X.690."; + reference + "RFC 6960: + X.509 Internet Public Key Infrastructure Online + Certificate Status Protocol - OCSP + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + + typedef oscp-response { + type binary; + description + "A OCSPResponse structure, as specified in RFC 6960, + encoded using ASN.1 distinguished encoding rules + (DER), as specified in ITU-T X.690."; + reference + "RFC 6960: + X.509 Internet Public Key Infrastructure Online + Certificate Status Protocol - OCSP + ITU-T X.690: + Information technology - ASN.1 encoding rules: + Specification of Basic Encoding Rules (BER), + Canonical Encoding Rules (CER) and Distinguished + Encoding Rules (DER)."; + } + /***********************************************/ /* Typedefs for ASN.1 structures from 5652 */ /***********************************************/ @@ -1228,24 +559,6 @@ module ietf-crypto-types { "RFC 5652: Cryptographic Message Syntax (CMS)"; } - /***************************************************/ - /* Typedefs for structures related to RFC 4253 */ - /***************************************************/ - - typedef ssh-host-key { - type binary; - description - "The binary public key data for this SSH key, as - specified by RFC 4253, Section 6.6, i.e.: - - string certificate or public key format - identifier - byte[n] key/certificate data."; - reference - "RFC 4253: The Secure Shell (SSH) Transport Layer - Protocol"; - } - /*********************************************************/ /* Typedefs for ASN.1 structures related to RFC 5280 */ /*********************************************************/ @@ -1325,376 +638,368 @@ module ietf-crypto-types { and Certificate Revocation List (CRL) Profile."; } - /**********************************************/ - /* Groupings for keys and/or certificates */ - /**********************************************/ + /*****************/ + /* Groupings */ + /*****************/ + + grouping encrypted-value-grouping { + description + "A reusable grouping for a value that has been encrypted by + a referenced symmetric or asymmetric key."; + container encrypted-by { + nacm:default-deny-write; + description + "An empty container enabling a reference to the key that + encrypted the value to be augmented in. The referenced + key MUST be a symmetric key or an asymmetric key. + + A symmetric key MUST be referenced via a leaf node called + 'symmetric-key-ref'. An asymmetric key MUST be referenced + via a leaf node called 'asymmetric-key-ref'. + + The leaf nodes MUST be direct descendants in the data tree, + and MAY be direct descendants in the schema tree."; + } + leaf encrypted-value-format { + type identityref { + base encrypted-value-format; + } + mandatory true; + description + "Identifies the format of the 'encrypted-value' leaf. + + If 'encrypted-by' points to a symmetric key, then a + 'symmetrically-encrypted-value-format' based identity + MUST by set (e.g., cms-encrypted-data-format). + + If 'encrypted-by' points to an asymmetric key, then an + 'asymmetrically-encrypted-value-format' based identity + MUST by set (e.g., cms-enveloped-data-format)."; + } + leaf encrypted-value { + nacm:default-deny-write; + type binary; + must '../encrypted-by'; + mandatory true; + description + "The value, encrypted using the referenced symmetric + or asymmetric key. The value MUST be encoded using + the format associated with the 'encrypted-value-format' + leaf."; + } + } + + grouping password-grouping { + description + "A password that MAY be encrypted."; + choice password-type { + nacm:default-deny-write; + mandatory true; + description + "Choice between password types."; + case cleartext-password { + leaf cleartext-password { + nacm:default-deny-all; + type string; + description + "The cleartext value of the password."; + } + } + case encrypted-password { + if-feature "password-encryption"; + container encrypted-password { + description + "A container for the encrypted password value."; + uses encrypted-value-grouping; + } + } + } + } + + grouping symmetric-key-grouping { + description + "A symmetric key."; + leaf key-format { + nacm:default-deny-write; + type identityref { + base symmetric-key-format; + } + description + "Identifies the symmetric key's format. Implementations + SHOULD ensure that the incoming symmetric key value is + encoded in the specified format. + + For encrypted keys, the value is the same as it would + have been if the key were not encrypted."; + } + choice key-type { + nacm:default-deny-write; + mandatory true; + description + "Choice between key types."; + case cleartext-key { + leaf cleartext-key { + nacm:default-deny-all; + type binary; + must '../key-format'; + description + "The binary value of the key. The interpretation of + the value is defined by the 'key-format' field."; + } + } + case hidden-key { + if-feature "hidden-keys"; + leaf hidden-key { + type empty; + must 'not(../key-format)'; + description + "A hidden key. How such keys are created is outside + the scope of this module."; + } + } + case encrypted-key { + if-feature "symmetric-key-encryption"; + container encrypted-key { + must '../key-format'; + description + "A container for the encrypted symmetric key value. + The interpretation of the 'encrypted-value' node + is via the 'key-format' node"; + uses encrypted-value-grouping; + } + } + } + } grouping public-key-grouping { description - "A public key. - - The 'algorithm' and 'public-key' nodes are not - mandatory because they MAY be defined in . - Implementations SHOULD assert that these values are - either configured or that they exist in ."; - leaf algorithm { + "A public key."; + leaf public-key-format { nacm:default-deny-write; - type asymmetric-key-algorithm-ref; - must '../public-key'; + type identityref { + base public-key-format; + } + mandatory true; description - "Identifies the key's algorithm. More specifically, - this leaf specifies how the 'public-key' binary leaf - is encoded."; - reference - "RFC CCCC: Common YANG Data Types for Cryptography"; + "Identifies the public key's format. Implementations SHOULD + ensure that the incoming public key value is encoded in the + specified format."; } leaf public-key { nacm:default-deny-write; type binary; - must '../algorithm'; + mandatory true; description - "A binary that contains the value of the public key. The - interpretation of the content is defined by the key - algorithm. For example, a DSA key is an integer, an RSA - key is represented as RSAPublicKey as defined in - RFC 8017, and an Elliptic Curve Cryptography (ECC) key - is represented using the 'publicKey' described in - RFC 5915."; - reference - "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: - RSA Cryptography Specifications Version 2.2. - RFC 5915: Elliptic Curve Private Key Structure."; + "The binary value of the public key. The interpretation + of the value is defined by 'public-key-format' field."; } } grouping asymmetric-key-pair-grouping { description - "A private/public key pair. - The 'algorithm', 'public-key', and 'private-key' nodes are - not mandatory because they MAY be defined in . - Implementations SHOULD assert that these values are either - configured or that they exist in ."; + "A private key and its associated public key. Implementations + SHOULD ensure that the two keys are a matching pair."; uses public-key-grouping; - leaf private-key { - nacm:default-deny-all; - type union { - type binary; - type enumeration { - enum permanently-hidden { - description - "The private key is inaccessible due to being - protected by the system (e.g., a cryptographic - hardware module). - - How such keys are backed-up and restored, if - at all, is implementation specific. - - Servers MUST fail any attempt by a client to - configure this value directly. This value is - not set by clients, but rather is set by the - 'generate-hidden-key' and 'install-hidden-key' - actions."; - } - } + leaf private-key-format { + nacm:default-deny-write; + type identityref { + base private-key-format; } - must '../public-key'; description - "A binary that contains the value of the private key. The - interpretation of the content is defined by the key - algorithm. For example, a DSA key is an integer, an RSA - key is represented as RSAPrivateKey as defined in - RFC 8017, and an Elliptic Curve Cryptography (ECC) key - is represented as ECPrivateKey as defined in RFC 5915."; - reference - "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: - RSA Cryptography Specifications Version 2.2. - RFC 5915: Elliptic Curve Private Key Structure."; - } // private-key + "Identifies the private key's format. Implementations SHOULD + ensure that the incoming private key value is encoded in the + specified format. - action generate-hidden-key { - nacm:default-deny-all; + For encrypted keys, the value is the same as it would have + been if the key were not encrypted."; + } + choice private-key-type { + nacm:default-deny-write; + mandatory true; description - "Requests the device to generate a hidden key using the - specified asymmetric key algorithm. This action is - used to request the system to generate a key that is - 'permanently-hidden', perhaps protected by a cryptographic - hardware module. The resulting asymmetric key values are - considered operational state and hence present only in - and bound to the lifetime of the parent - 'config true' node. Subsequent invocations of this or - the 'install-hidden-key' action are denied with error-tag - 'data-exists'."; - input { - leaf algorithm { - type asymmetric-key-algorithm-ref; - mandatory true; - description - "The algorithm to be used when generating the - asymmetric key."; - reference - "RFC CCCC: Common YANG Data Types for Cryptography"; - } - } - } // generate-hidden-key - - action install-hidden-key { - nacm:default-deny-all; - description - "Requests the device to load the specified values into - a hidden key. The resulting asymmetric key values are - considered operational state and hence present only in - and bound to the lifetime of the parent - 'config true' node. Subsequent invocations of this - or the 'generate-hidden-key' action are denied with - error-tag 'data-exists'."; - input { - leaf algorithm { - type asymmetric-key-algorithm-ref; - mandatory true; - description - "The algorithm to be used when generating the - asymmetric key."; - reference - "RFC CCCC: Common YANG Data Types for Cryptography"; - } - leaf public-key { + "Choice between key types."; + case cleartext-private-key { + leaf cleartext-private-key { + nacm:default-deny-all; type binary; + must '../private-key-format'; description - "A binary that contains the value of the public key. - The interpretation of the content is defined by the key - algorithm. For example, a DSA key is an integer, an - RSA key is represented as RSAPublicKey as defined in - RFC 8017, and an Elliptic Curve Cryptography (ECC) key - is represented using the 'publicKey' described in - RFC 5915."; - reference - "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: - RSA Cryptography Specifications Version 2.2. - RFC 5915: Elliptic Curve Private Key Structure."; - } - leaf private-key { - type binary; - description - "A binary that contains the value of the private key. - The interpretation of the content is defined by the key - algorithm. For example, a DSA key is an integer, an RSA - key is represented as RSAPrivateKey as defined in - RFC 8017, and an Elliptic Curve Cryptography (ECC) key - is represented as ECPrivateKey as defined in RFC 5915."; - reference - "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: - RSA Cryptography Specifications Version 2.2. - RFC 5915: Elliptic Curve Private Key Structure."; + "The value of the binary key The key's value is + interpreted by the 'private-key-format' field."; } } - } // install-hidden-key - } // asymmetric-key-pair-grouping + case hidden-private-key { + if-feature "hidden-keys"; + leaf hidden-private-key { + type empty; + must 'not(../private-key-format)'; + description + "A hidden key. How such keys are created is + outside the scope of this module."; + } + } + case encrypted-private-key { + if-feature "private-key-encryption"; + container encrypted-private-key { + must '../private-key-format'; + description + "A container for the encrypted asymmetric private key + value. The interpretation of the 'encrypted-value' + node is via the 'private-key-format' node"; + uses encrypted-value-grouping; + } + } + } + } + grouping certificate-expiration-grouping { + description + "A notification for when a certificate is about to, or + already has, expired."; + notification certificate-expiration { + if-feature "certificate-expiration-notification"; + description + "A notification indicating that the configured certificate + is either about to expire or has already expired. When to + send notifications is an implementation specific decision, + but it is RECOMMENDED that a notification be sent once a + month for 3 months, then once a week for four weeks, and + then once a day thereafter until the issue is resolved."; + leaf expiration-date { + type yang:date-and-time; + mandatory true; + description + "Identifies the expiration date on the certificate."; + } + } + } grouping trust-anchor-cert-grouping { description "A trust anchor certificate, and a notification for when it is about to (or already has) expire."; - leaf cert { + leaf cert-data { nacm:default-deny-write; type trust-anchor-cert-cms; description "The binary certificate data for this certificate."; - reference - "RFC YYYY: Common YANG Data Types for Cryptography"; - } - notification certificate-expiration { - description - "A notification indicating that the configured certificate - is either about to expire or has already expired. When to - send notifications is an implementation specific decision, - but it is RECOMMENDED that a notification be sent once a - month for 3 months, then once a week for four weeks, and - then once a day thereafter until the issue is resolved."; - leaf expiration-date { - type yang:date-and-time; - mandatory true; - description - "Identifies the expiration date on the certificate."; - } - } - } - - grouping trust-anchor-certs-grouping { - description - "A list of trust anchor certificates, and a notification - for when one is about to (or already has) expire."; - leaf-list cert { - nacm:default-deny-write; - type trust-anchor-cert-cms; - description - "The binary certificate data for this certificate."; - reference - "RFC YYYY: Common YANG Data Types for Cryptography"; - } - notification certificate-expiration { - description - "A notification indicating that the configured certificate - is either about to expire or has already expired. When to - send notifications is an implementation specific decision, - but it is RECOMMENDED that a notification be sent once a - month for 3 months, then once a week for four weeks, and - then once a day thereafter until the issue is resolved."; - leaf expiration-date { - type yang:date-and-time; - mandatory true; - description - "Identifies the expiration date on the certificate."; - } } + uses certificate-expiration-grouping; } grouping end-entity-cert-grouping { description "An end entity certificate, and a notification for when - it is about to (or already has) expire."; - leaf cert { + it is about to (or already has) expire. Implementations + SHOULD assert that, where used, the end entity certificate + contains the expected public key."; + leaf cert-data { nacm:default-deny-write; type end-entity-cert-cms; description "The binary certificate data for this certificate."; - reference - "RFC YYYY: Common YANG Data Types for Cryptography"; - } - notification certificate-expiration { - description - "A notification indicating that the configured certificate - is either about to expire or has already expired. When to - send notifications is an implementation specific decision, - but it is RECOMMENDED that a notification be sent once a - month for 3 months, then once a week for four weeks, and - then once a day thereafter until the issue is resolved."; - leaf expiration-date { - type yang:date-and-time; - mandatory true; - description - "Identifies the expiration date on the certificate."; - } } + uses certificate-expiration-grouping; } - grouping end-entity-certs-grouping { + grouping generate-csr-grouping { description - "A list of end entity certificates, and a notification for - when one is about to (or already has) expire."; - leaf-list cert { - nacm:default-deny-write; - type end-entity-cert-cms; - description - "The binary certificate data for this certificate."; - reference - "RFC YYYY: Common YANG Data Types for Cryptography"; - } - notification certificate-expiration { - description - "A notification indicating that the configured certificate - is either about to expire or has already expired. When to - send notifications is an implementation specific decision, - but it is RECOMMENDED that a notification be sent once a - month for 3 months, then once a week for four weeks, and - then once a day thereafter until the issue is resolved."; - leaf expiration-date { - type yang:date-and-time; - mandatory true; - description - "Identifies the expiration date on the certificate."; - } - } - } - - grouping asymmetric-key-pair-with-cert-grouping { - description - "A private/public key pair and an associated certificate."; - uses asymmetric-key-pair-grouping; - uses end-entity-cert-grouping; - - action generate-certificate-signing-request { + "Defines the 'generate-csr' action."; + action generate-csr { + if-feature "csr-generation"; nacm:default-deny-all; description "Generates a certificate signing request structure for the associated asymmetric key using the passed subject - and attribute values. The specified assertions need - to be appropriate for the certificate's use. For - example, an entity certificate for a TLS server - SHOULD have values that enable clients to satisfy - RFC 6125 processing."; + and attribute values. + + This action statement is only available when the + associated 'public-key-format' node's value is + 'subject-public-key-info-format'."; + reference + "RFC 6125: + Representation and Verification of Domain-Based + Application Service Identity within Internet Public Key + Infrastructure Using X.509 (PKIX) Certificates in the + Context of Transport Layer Security (TLS)"; input { - leaf subject { - type binary; + leaf csr-format { + type identityref { + base csr-format; + } mandatory true; description - "The 'subject' field per the CertificationRequestInfo - structure as specified by RFC 2986, Section 4.1 - encoded using the ASN.1 distinguished encoding - rules (DER), as specified in ITU-T X.690."; - reference - "RFC 2986: - PKCS #10: Certification Request Syntax - Specification Version 1.7. - ITU-T X.690: - Information technology - ASN.1 encoding rules: - Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER)."; + "Specifies the format for the returned certifiacte."; } - leaf attributes { - type binary; + leaf csr-info { + type csr-info; + mandatory true; description - "The 'attributes' field from the structure - CertificationRequestInfo as specified by RFC 2986, - Section 4.1 encoded using the ASN.1 distinguished - encoding rules (DER), as specified in ITU-T X.690."; + "A CertificationRequestInfo structure, as defined in + RFC 2986. + + Enables the client to provide a fully-populated + CertificationRequestInfo structure that the server + only needs to sign in order to generate the complete + 'CertificationRequest' structure to return in the + 'output'. + + The 'AlgorithmIdentifier' field contained inside + the 'SubjectPublicKeyInfo' field MUST be one known + to be supported by the device."; reference "RFC 2986: - PKCS #10: Certification Request Syntax - Specification Version 1.7. - ITU-T X.690: - Information technology - ASN.1 encoding rules: - Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER)."; + PKCS #10: Certification Request Syntax Specification + RFC AAAA: + YANG Data Types and Groupings for Cryptography"; } } output { - leaf certificate-signing-request { - type binary; + choice csr-type { mandatory true; description - "A CertificationRequest structure as specified by - RFC 2986, Section 4.2 encoded using the ASN.1 - distinguished encoding rules (DER), as specified - in ITU-T X.690."; - reference - "RFC 2986: - PKCS #10: Certification Request Syntax - Specification Version 1.7. - ITU-T X.690: - Information technology - ASN.1 encoding rules: - Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER)."; + "A choice amongst certificate signing request formats. + Additional formats MAY be augmented into this 'choice' + statement by future efforts."; + case p10-csr { + leaf p10-csr { + type p10-csr; + description + "A CertificationRequest, as defined in RFC 2986."; + } + description + "A CertificationRequest, as defined in RFC 2986."; + reference + "RFC 2986: + PKCS #10: Certification Request Syntax Specification + RFC AAAA: + YANG Data Types and Groupings for Cryptography"; + } } } - } // generate-certificate-signing-request - } // asymmetric-key-pair-with-cert-grouping + } + } // generate-csr-grouping + grouping asymmetric-key-pair-with-cert-grouping { + description + "A private/public key pair and an associated certificate. + Implementations SHOULD assert that certificates contain + the matching public key."; + uses asymmetric-key-pair-grouping; + uses end-entity-cert-grouping; + uses generate-csr-grouping; + } // asymmetric-key-pair-with-cert-grouping grouping asymmetric-key-pair-with-certs-grouping { description - "A private/public key pair and associated certificates."; + "A private/public key pair and associated certificates. + Implementations SHOULD assert that certificates contain + the matching public key."; uses asymmetric-key-pair-grouping; container certificates { nacm:default-deny-write; description - "Certificates associated with this asymmetric key. - More than one certificate supports, for instance, - a TPM-protected asymmetric key that has both IDevID - and LDevID certificates associated."; + "Certificates associated with this asymmetric key."; list certificate { key "name"; description @@ -1702,82 +1007,16 @@ module ietf-crypto-types { leaf name { type string; description - "An arbitrary name for the certificate. If the name - matches the name of a certificate that exists - independently in (i.e., an IDevID), - then the 'cert' node MUST NOT be configured."; + "An arbitrary name for the certificate."; } - uses end-entity-cert-grouping; - } - } // certificates - - action generate-certificate-signing-request { - nacm:default-deny-all; - description - "Generates a certificate signing request structure for - the associated asymmetric key using the passed subject - and attribute values. The specified assertions need - to be appropriate for the certificate's use. For - example, an entity certificate for a TLS server - SHOULD have values that enable clients to satisfy - RFC 6125 processing."; - input { - leaf subject { - type binary; - mandatory true; - description - "The 'subject' field per the CertificationRequestInfo - structure as specified by RFC 2986, Section 4.1 - encoded using the ASN.1 distinguished encoding - rules (DER), as specified in ITU-T X.690."; - reference - "RFC 2986: - PKCS #10: Certification Request Syntax - Specification Version 1.7. - ITU-T X.690: - Information technology - ASN.1 encoding rules: - Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER)."; - } - leaf attributes { - type binary; - description - "The 'attributes' field from the structure - CertificationRequestInfo as specified by RFC 2986, - Section 4.1 encoded using the ASN.1 distinguished - encoding rules (DER), as specified in ITU-T X.690."; - reference - "RFC 2986: - PKCS #10: Certification Request Syntax - Specification Version 1.7. - ITU-T X.690: - Information technology - ASN.1 encoding rules: - Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER)."; + uses end-entity-cert-grouping { + refine "cert-data" { + mandatory true; + } } } - output { - leaf certificate-signing-request { - type binary; - mandatory true; - description - "A CertificationRequest structure as specified by - RFC 2986, Section 4.2 encoded using the ASN.1 - distinguished encoding rules (DER), as specified - in ITU-T X.690."; - reference - "RFC 2986: - PKCS #10: Certification Request Syntax - Specification Version 1.7. - ITU-T X.690: - Information technology - ASN.1 encoding rules: - Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER)."; - } - } - } // generate-certificate-signing-request + } + uses generate-csr-grouping; } // asymmetric-key-pair-with-certs-grouping + } diff --git a/radio/fhi_72/mplane/yang/models/o-ran-common-yang-types.yang b/radio/fhi_72/mplane/yang/models/o-ran-common-yang-types.yang new file mode 100644 index 0000000000..4fa9d7f542 --- /dev/null +++ b/radio/fhi_72/mplane/yang/models/o-ran-common-yang-types.yang @@ -0,0 +1,449 @@ +module o-ran-common-yang-types { + yang-version 1.1; + namespace "urn:o-ran:common-yang-types:1.0"; + prefix "o-ran-types"; + + import ietf-inet-types { + prefix inet; + } + + organization "O-RAN Alliance"; + + + + contact + "www.o-ran.org"; + + description + "This module defines ORAN common YANG types. + + Copyright 2023 the O-RAN Alliance. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the above disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the above disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the Members of the O-RAN Alliance nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission."; + + revision "2023-08-14" { + description + "version 2.0.0 + + 1) New availability status typedef"; + + reference "ORAN-WG1.IM.0-v01.00"; + } + + revision "2022-08-15" { + description + "version 1.1.0 + + 1) style guide corrections"; + + reference "ORAN-WG1.IM.0-v01.00"; + } + + revision "2020-10-10" { + description + "version 1.0.0 + + 1) Initial creation"; + + reference "ORAN-WG1.IM.0-v01.00"; + } + + typedef version { + type string { + pattern '[0-9]+(\.[0-9]+){1,2}'; + } + description + "Definition used to represent a version of an interface."; + } + + typedef timezone-name { + type string; + description + "A time zone name as used by the Time Zone Database, + sometimes referred to as the 'Olson Database'. + + The complete set of valid values is defined in + https://www.iana.org/time-zones. + + The exact set of supported values is an + implementation-specific matter."; + + reference + "RFC 6557: Procedures for Maintaining the Time Zone Database + IANA Time Zone Database https://www.iana.org/time-zones "; + } + + typedef protocol { + type enumeration { + enum ECPRI { + description + "Indicates that an O-RU supports the ecpri header format + for the C/U plane"; + } + enum IEEE-1914-3 { + description + "Indicates that an O-RU supports the 1914.3 header format + for the C/U plane"; + } + } + description "the type of C/U plane protocol"; + } + + typedef duplex-scheme { + type enumeration { + enum TDD { + description + "TDD scheme"; + } + enum FDD { + description + "FDD scheme"; + } + } + description + "Type of duplex scheme O-RU supports."; + } + + typedef active { + type enumeration { + enum INACTIVE { + description + "Carrier does not provide signal - transmission is disabled"; + } + enum SLEEP{ + description + "Carrier is fully configured and was active but is energy saving mode"; + } + enum ACTIVE{ + description + "Carrier is fully configured and properly providing the signal"; + } + } + description "the active status of a carrier"; + } + + typedef state { + type enumeration { + enum DISABLED { + description + "Array carrier is not active - transmission of signal is disabled."; + } + enum BUSY { + description + "Array carrier is processing an operation requested by change of active parameter. + When array carriers is BUSY the transmission of signal is not guaranteed."; + } + enum READY { + description + "Array carrier had completed activation operation - is active and transmission of signal is ongoing."; + } + } + description "the state on an array carrier"; + } + + typedef transport-session { + type enumeration { + enum ETHERNET { + description "VLAN based CUS Transport "; + } + enum UDP_IP { +// if-feature o-ran-int:UDPIP-BASED-CU-PLANE; How to handle enum value constrained by feature defined in o-ran-interface.yang? + description "UDP/IP based CUS Transport "; + } + enum ALIAS_MAC{ +// if-feature o-ran-int:ALIASMAC-BASED-CU-PLANE; How to handle enum value constrained by feature defined in o-ran-interface.yang? + description "Alias MAC address based CUS Transport "; + } + enum SHARED_CELL { +// if-feature o-ran-elements:SHARED_CELL; How to handle enum value constrained by feature defined in o-ran-processing-element.yang? + description "VLAN based CUS Transport used for Shared Cell scenario"; + } + } + description "the transport session type"; + } + + typedef netconf-client-id { + type union { + type inet:ip-address; + type inet:uri; + } + description "A NETCONF client identifier"; + } + + typedef ca-ra-server-id { + type union { + type inet:ip-address; + type inet:uri; + } + description "A CA/RA Server identifier"; + } + + typedef segw-id { + type union { + type inet:ip-address; + type inet:uri; + } + description "A SeGW identifier"; + } + + typedef pcp { + type uint8 { + range "0..7"; + } + description + "Priority Code Point. PCP is a 3-bit field that refers to the + class of service applied to a VLAN tagged frame. The + field specifies a priority value between 0 and 7, these values + can be used by quality of service (QoS) to prioritize + different classes of traffic."; + reference + "IEEE 802.1Q-2014: Virtual Bridged Local Area Networks"; + } + + typedef vlan-id { + type uint16 { + range "1..4094"; + } + description + "The VLAN-ID that uniquely identifies a VLAN. This is the 12-bit VLAN-ID + used in the VLAN Tag header."; + reference "[802.1q] 9.6"; + } + + typedef geographic-coordinate-degree { + type decimal64 { + fraction-digits 8; + } + description + "Decimal degree (DD) used to express latitude and longitude + geographic coordinates."; + } + + typedef prach-preamble-format { + type enumeration { + enum LTE-0 { + description + "LTE PRACH Preamble format 0"; + } + enum LTE-1 { + description + "LTE PRACH Preamble format 1"; + } + enum LTE-2 { + description + "LTE PRACH Preamble format 2"; + } + enum LTE-3 { + description + "LTE PRACH Preamble format 3"; + } + enum LTE-4 { + description + "LTE PRACH Preamble format 4"; + } + enum LTE-NB0 { + description + "LTE Narrowband PRACH format 0"; + } + enum LTE-NB1 { + description + "LTE Narrowband PRACH format 1"; + } + enum NR-0 { + description + "5GNR PRACH Preamble format 0"; + } + enum NR-1 { + description + "5GNR PRACH Preamble format 1"; + } + enum NR-2 { + description + "5GNR PRACH Preamble format 2"; + } + enum NR-3 { + description + "5GNR PRACH Preamble format 3"; + } + enum NR-A1 { + description + "5GNR PRACH Preamble format A1"; + } + enum NR-A2 { + description + "5GNR PRACH Preamble format A2"; + } + enum NR-A3 { + description + "5GNR PRACH Preamble format A3"; + } + enum NR-B1 { + description + "5GNR PRACH Preamble format B1"; + } + enum NR-B2 { + description + "5GNR PRACH Preamble format B2"; + } + enum NR-B3 { + description + "5GNR PRACH Preamble format B3"; + } + enum NR-B4 { + description + "5GNR PRACH Preamble format B4"; + } + enum NR-C0 { + description + "5GNR PRACH Preamble format C0"; + } + enum NR-C2 { + description + "5GNR PRACH Preamble format C2"; + } + enum LTE-NB0-a { + description + "LTE Narrowband PRACH format 0-a"; + } + enum LTE-NB1-a { + description + "LTE Narrowband PRACH format 1-a"; + } + enum LTE-NB2 { + description + "LTE Narrowband PRACH format 2"; + } + } + + description + "PRACH preamble format definition"; + } + + typedef polarisation_type { + type enumeration { + enum MINUS_45 { + description "MINUS_45"; + } + enum ZERO { + description "ZERO"; + } + enum PLUS_45 { + description "PLUS_45"; + } + enum PLUS_90 { + description "PLUS_90"; + } + } + description "Type definition for polarisations"; + } + + typedef bandwidth { + type uint32 { + range "200 | 1400 | 3000 | 5000 | 10000 | 15000 | 20000 | 25000 | + 30000 | 40000 | 50000 | 60000 | 70000 | 80000 | 90000 | 100000 + | 200000 | 400000" ; + } + units kilohertz; + description + "transmission bandwidth configuration in units of kHz - + covering NBIoT through to New Radio - see 38.104"; + } + + typedef scs-config-type { + type enumeration { + enum KHZ_15 { + value 0; + description + "15kHz sub carrier spacing"; + } + enum KHZ_30 { + value 1; + description + "30kHz sub carrier spacing"; + } + enum KHZ_60 { + value 2; + description + "60kHz sub carrier spacing"; + } + enum KHZ_120 { + value 3; + description + "120kHz sub carrier spacing"; + } + enum KHZ_240 { + value 4; + description + "240kHz sub carrier spacing"; + } + enum KHZ_1_25 { + value 12; + description + "1,25kHz sub carrier spacing"; + } + enum KHZ_3_75 { + value 13; + description + "3.75kHz sub carrier spacing"; + } + enum KHZ_5 { + value 14; + description + "5kHz sub carrier spacing"; + } + enum KHZ_7_5 { + value 15; + description + "7.5kHz sub carrier spacing"; + } + } + + description + "Scs configuration type definition"; + } + + typedef availability-status { + type union { + type empty; + type enumeration { + enum FAILED { + description + "The resource has an internal fault that prevents it from operating. + The operational state is disabled."; + } + enum DEPENDENCY { + description + "The resource cannot operate because some other resource on which it + depends is unavailable. The operational state is disabled."; + } + } + } + description + "When the value of this attribute is empty set, this implies that none of + the status conditions described in the enumerations are present. Only current relevant status for M-plane defined are listed here"; + reference "CCITT Rec. X.731 (1992 E) 8.1.2.3"; + } + +} diff --git a/radio/fhi_72/mplane/yang/models/o-ran-compression-factors.yang b/radio/fhi_72/mplane/yang/models/o-ran-compression-factors.yang index 5816b5ed63..ffccbcd126 100644 --- a/radio/fhi_72/mplane/yang/models/o-ran-compression-factors.yang +++ b/radio/fhi_72/mplane/yang/models/o-ran-compression-factors.yang @@ -13,7 +13,7 @@ module o-ran-compression-factors { "This module defines the module capabilities for the O-RAN Radio Unit U-Plane configuration. - Copyright 2020 the O-RAN Alliance. + Copyright 2024 the O-RAN Alliance. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -39,6 +39,46 @@ module o-ran-compression-factors { contributors may be used to endorse or promote products derived from this software without specific prior written permission."; + revision "2024-08-12" { + description + "version 16.0.0 + + 1) Clarify handling of deprecated leaf compression-format. + 2) Add in SINR compression details"; + + reference "ORAN-WG4.M.0-v16.00"; + } + + revision "2023-08-14" { + description + "version 13.0.0 + + 1) New compression methods BFP-SRES-MASK-IN-SEC-HEADER and MOD-SRES-MASK-IN-SEC-HEADER."; + + reference "ORAN-WG4.M.0-v13.00"; + } + + revision "2021-12-01" { + description + "version 8.0.0 + + 1) typographical corrections in descriptions. + 2) Configuration for Beamforming weights were added together with changes + and updates to compressions. + 3) add new beamspace compression enumeration for BEAMSPACE_TYPEII."; + + reference "ORAN-WG4.M.0-v08.00"; + } + + revision "2021-03-22" { + description + "version 4.1.0 + + 1) typographical corrections in descriptions."; + + reference "ORAN-WG4.M.0-v04.00"; + } + revision "2020-08-10" { description "version 4.0.0 @@ -62,7 +102,7 @@ module o-ran-compression-factors { description "version 1.1.0 - 1) changes related to compression bitwidth presentation"; + 1) changes related to compression bit-width presentation"; reference "ORAN-WG4.M.0-v01.00"; } @@ -82,6 +122,171 @@ module o-ran-compression-factors { "Presence of this feature means that O-RU supports configurable fs-offset for compression."; } + typedef ci-compression-method-def { + type enumeration { + enum NO_COMPRESSION { + description + "No compression will be used"; + } + + enum BLOCK_FLOATING_POINT { + description + "Block floating point compression and decompression will be used"; + } + + enum BLOCK_SCALING { + description + "Block scaling compression and decompresion will be used"; + } + + enum U_LAW { + description + "u-Law compression and decompresion method will be used"; + } + } + description + "Available compression methods for channel information (e.g., ST6)."; + } + + typedef compression-type-def { + type enumeration { + enum STATIC { + description + "Indicates that static compression method will be used (both compression and IQ bitwidth)"; + } + enum DYNAMIC { + description + "Indicates that dynamic compression method will be used"; + } + } + description + "Compression type that O-DU wants to be supported"; + } + + typedef bf-compression-method-def { + type enumeration { + enum NO_COMPRESSION { + description + "No compression will be used"; + } + enum BLOCK_FLOATING_POINT { + description + "Block floating point compression and decompression will be used"; + } + + enum BLOCK_SCALING { + description + "Block scaling compression and decompresion will be used"; + } + + enum U_LAW { + description + "u-Law compression and decompresion method will be used"; + } + + enum BEAMSPACE { + description + "Beamspace compression and decompression will be used"; + } + + enum VOID_1 { + description + "Leftover of modulation, not to be used for beamforming weights"; + } + + enum VOID_2 { + description + "Leftover of block-floating-point-selective-re-sending, not to be used for beamforming weights"; + } + + enum VOID_3 { + description + "Leftover of modulation-compression-selective-re-sending, not to be used for beamforming weights"; + } + + enum BEAMSPACE_TYPEII { + description + "Beamspace compression typeII and decompression will be used "; + } + } + description + "Available compression methods for beamforming weights."; + } + + typedef compression-method-def { + type enumeration { + enum NO_COMPRESSION { + description + "No compression"; + } + enum BLOCK_FLOATING_POINT { + description + "Block floating point compression and decompression method"; + } + + enum BLOCK_SCALING { + description + "Block scaling compression and decompresion method"; + } + + enum U_LAW { + description + "u-Law compression and decompresion method"; + } + + enum VOID_1 { + description + "Leftover of beamspace, not to be used for IQ data."; + } + + enum MODULATION { + description + "Modulation compression and decompression method"; + } + + enum BLOCK-FLOATING-POINT-SELECTIVE-RE-SENDING { + description + "block floating point with selective re sending + compression and decompression method"; + } + + enum MODULATION-COMPRESSION-SELECTIVE-RE-SENDING { + description + "modulation compression with selective re sending + compression and decompression method"; + } + enum BFP-SRES-MASK-IN-SEC-HEADER { + description + "block floating point with selective re sending + compression and decompression method with selective re sending mask in the section header "; + } + + enum MOD-SRES-MASK-IN-SEC-HEADER { + description + "modulation compression with selective re sending + compression and decompression method with selective re sending mask in the section header"; + } + } + description + "Available compression methods for the data."; + } + + typedef sinr-compression-method-def { + type enumeration { + enum BLOCK_FLOATING_POINT { + description + "Block floating point compression and decompression will be used"; + } + + enum NO_COMPRESSION { + description + "No compression will be used"; + } + } + description + "Available compression methods for the SINR."; + } + grouping compression-method-grouping { description "Grouping for compression method."; @@ -89,68 +294,148 @@ module o-ran-compression-factors { leaf iq-bitwidth { type uint8; description - "Bitwidth to be used in compression"; + "Bit-width to be used in compression"; } leaf compression-method { - type enumeration { - enum NO_COMPRESSION { - description - "No compression will be used"; - } - enum BLOCK_FLOATING_POINT { - description - "Block floating point compression and decompression will be used"; - } - - enum BLOCK_SCALING { - description - "Block scaling compression and decompresion will be used"; - } - - enum U_LAW { - description - "u-Law compression and decompresion method will be used"; - } - - enum BEAMSPACE { - description - "Beamspace compression and decompression will be used"; - } - - enum MODULATION { - description - "Modulation compression and decompression will be used"; - } - enum BLOCK-FLOATING-POINT-SELECTIVE-RE-SENDING { - description - "block floating point with selective re sending - compression and decompression will be used"; - } - enum MODULATION-COMPRESSION-SELECTIVE-RE-SENDING { - description - "modulation compression with selective re sending - compression and decompression will be used"; - } - } + type compression-method-def; description - "Compresion method which can be supported by the O-RU"; + "Compression method which can be supported by the O-RU"; } } + grouping compression-details { + description ""; + + leaf iq-bitwidth { + type uint8; + description + "Bitwidth to be used in compression"; + } + + leaf compression-type { + type compression-type-def; + mandatory true; + description + "Compression type that O-DU wants to be supported"; + } + + leaf bitwidth { + when "../compression-type = 'STATIC'"; + type uint8; + status deprecated; + description + "Bitwidth to be used in compression. + This has since been replaced in M-Plane version + 2.0.0 with the iq-bitwidth schema node"; + } + + leaf compression-method { + type compression-method-def; + description + "Compression method which can be supported by the O-RU"; + } + + uses compresion-format-grp { + status deprecated; + } + } + + grouping bf-compression-details { + description "Compression formats defined for beamforming"; + + leaf iq-bitwidth { + type uint8; + description + "Bitwidth to be used in compression"; + } + + leaf compression-type { + type compression-type-def; + mandatory true; + description + "Compression type that O-DU wants to be supported"; + } + + leaf bitwidth { + when "../compression-type = 'STATIC'"; + type uint8; + status deprecated; + description + "Bitwidth to be used in compression. + This has since been replaced in M-Plane version + 2.0.0 with the iq-bitwidth schema node"; + } + + leaf compression-method { + type bf-compression-method-def; + description + "Compression method which can be supported by the beamforming"; + } + + uses compresion-format-grp { + status deprecated; + } + } + + grouping sinr-compression-details { + description "Compression formats defined for SINR"; + + leaf sinr-bitwidth { + type uint8; + description + "Bitwidth to be used in compression"; + } + + leaf sinr-compression-method { + type sinr-compression-method-def; + description + "Compression method which can be supported by the SINR."; + } + + leaf sinr-block-size { + type uint8; + description + "Block size used for reporting SINR. + If the parameter is absent, then the SINR values are sent without zero-padding + i.e., the block size is equal to the number of SINR values + + Please refer to CUS specification clause 7.2.10 for more details."; + } + } + +// *********** Deprecated *********** + grouping compression-formats { + status deprecated; description - "Grouping deicated to list compression formats as choice"; + "Grouping deicated to list compression formats as choice."; + + uses compresion-format-grp { + status deprecated; + } + } + + grouping compresion-format-grp { + status deprecated; + description + "Grouping to for compression format choice"; choice compression-format { + status deprecated; description - "Choice of compression format for particular element"; + "Choice of compression format for particular element. + Note: This method is deprecated. All should be done as emumeration as details are configured + by udCompHdr in CU-Plane messaging. + NOTE: Changing the configuration from any compression format to no compression would require + a delete-config followed by an edit-config"; case no-compresison { description "Compression for beam weights is not supported."; } + case block-floating-point { - description "Block floating point compression and decompression is supported."; + description "Block floating-point compression and decompression is supported."; leaf exponent { type uint8 { @@ -162,7 +447,7 @@ module o-ran-compression-factors { case block-floating-point-selective-re-sending { description - "Block floating point with selective re sending compression and decompression is supported."; + "Block floating-point with selective re sending compression and decompression is supported."; leaf sres-exponent { type uint8 { @@ -173,7 +458,7 @@ module o-ran-compression-factors { } case block-scaling { - description "Block scaling compression and decompresion is supported."; + description "Block scaling compression and decompression is supported."; leaf block-scalar { type uint8; description @@ -182,7 +467,7 @@ module o-ran-compression-factors { } case u-law { - description "u-Law compression and decompresion method is supported."; + description "u-Law compression and decompression method is supported."; leaf comp-bit-width { type uint8 { range "0..15"; @@ -218,7 +503,7 @@ module o-ran-compression-factors { type uint8 { range "0..1"; } - description "Constallation shift flag"; + description "Constellation shift flag"; } leaf mod-comp-scaler { @@ -235,7 +520,7 @@ module o-ran-compression-factors { type uint8 { range "0..1"; } - description "Constallation shift flag"; + description "Constellation shift flag"; } leaf sres-mod-comp-scaler { @@ -250,54 +535,50 @@ module o-ran-compression-factors { } grouping compression-params { + status deprecated; description "Parameters to define compression"; leaf compression-type { - type enumeration { - enum STATIC { - description - "Indicates that static compression method will be used (both compression and IQ bitwidth)"; - } - enum DYNAMIC { - description - "Indicates that dynamic compression method will be used"; - } - } + type compression-type-def; mandatory true; description "Compression type that O-DU wants to be supported"; } -// *********** TO BE REMOVED *********** leaf bitwidth { when "../compression-type = 'STATIC'"; type uint8; status deprecated; description - "Bitwidth to be used in compression. + "Bit-width to be used in compression. This has since been replaced in M-Plane version 2.0.0 with the iq-bitwidth schema node"; } -// ************************************* - uses compression-formats; + uses compression-formats { + status deprecated; + } } grouping compression-parameters { + status deprecated; description "Parameters used to define description type"; leaf iq-bitwidth { type uint8; description - "Bitwidth to be used in compression"; + "Bit-width to be used in compression"; } - uses compression-formats; + uses compression-formats { + status deprecated; + } } grouping format-of-iq-sample { + status deprecated; description "Indicates module capabilities about IQ samples"; @@ -312,17 +593,20 @@ module o-ran-compression-factors { type boolean; description - "Informs if O-RU supports realtime variable bit with"; + "Informs if O-RU supports real-time variable bit with"; } list compression-method-supported { - uses compression-parameters; + status deprecated; + uses compression-parameters { + status deprecated; + } description "List of supported compression methods by O-RU Note: if O-RU supports different compression methods per endpoint then please refer do endpoints to have information what - exactly is supported on a paticular endpoint"; + exactly is supported on a particular endpoint"; } leaf syminc-supported { @@ -353,16 +637,6 @@ module o-ran-compression-factors { } } +// *********** Deprecated End *********** - grouping compression-details { - description ""; - - leaf iq-bitwidth { - type uint8; - description - "Bitwidth to be used in compression"; - } - - uses compression-params; - } } diff --git a/radio/fhi_72/mplane/yang/models/o-ran-delay-management.yang b/radio/fhi_72/mplane/yang/models/o-ran-delay-management.yang new file mode 100644 index 0000000000..339398c2e1 --- /dev/null +++ b/radio/fhi_72/mplane/yang/models/o-ran-delay-management.yang @@ -0,0 +1,591 @@ +module o-ran-delay-management { + yang-version 1.1; + namespace "urn:o-ran:delay:1.0"; + prefix "o-ran-delay"; + + import o-ran-wg4-features { + prefix "feat"; + } + + organization "O-RAN Alliance"; + + contact + "www.o-ran.org"; + + description + "This module covers off aspects of O-DU to O-RU delay management, + including configuration data related to O-RU transmission and reception + windows. + + Copyright 2024 the O-RAN Alliance. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the above disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the above disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the Members of the O-RAN Alliance nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission."; + + revision "2024-08-12" { + description + "version 16.0.0 + + 1) Removing the range to align bandwidth type to same bandwidth type as + in uplane-config module and module-cap modules. + 2) Add in Ta3-2g data processing delay"; + + reference "ORAN-WG4.M.0-v16.00"; + } + + revision "2024-04-15" { + description + "version 15.0.0 + + 1) add support for for beamforming list and delay profiles(s) per endpoint."; + + reference "ORAN-WG4.M.0-v15.00"; + } + + revision "2022-08-15" { + description + "version 10.0.0 + + 1) introducing new feature for ACK NACK feedback."; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2021-12-01" { + description + "version 8.0.0 + + 1) typographical corrections in descriptions. + 2) add new schema node beam-context-gap-period."; + + reference "ORAN-WG4.M.0-v08.00"; + } + + revision "2020-08-10" { + description + "version 4.0.0 + + 1) introduction of new t1a-max-cp-dl leaf to enable decoupled timing between C- and U-Plane"; + + reference "ORAN-WG4.M.0-v04.00"; + } + + revision "2019-07-03" { + description + "version 1.1.0 + + 1) fixing descriptions of ta3-min and ta3-max. + 2) introducing grouping/uses to enable model re-use by WG5"; + + reference "ORAN-WG4.M.0-v01.00"; + } + + revision "2019-02-04" { + description + "version 1.0.0 + + 1) imported model from xRAN + 2) changed namespace and reference from xran to o-ran"; + + reference "ORAN-WG4.M.0-v01.00"; + } + + + feature ADAPTIVE-RU-PROFILE { + description + "This feature indicates that the O-RU supports adaptive O-RU delay profile + based on information provided by the NETCONF client."; + } + + typedef bandwidth { + type uint32; + units kilohertz; + description + "transmission bandwidth configuration in units of kHz - + covering NB-IoT through to New Radio. + Value shall correspond to a value defined in 38.104."; + } + + grouping bandwidth-configuration { + description + "Grouping for bandwidth and SCS configuration"; + + leaf bandwidth { + type bandwidth; + description + "transmission bandwidth configuration in units of kHz - + covering NBIoT through to New Radio - see 38.104"; + } + leaf subcarrier-spacing { + type uint32 { + range "0 .. 240000 "; + } + units Hertz; + description "sub-carrier spacing in Hz"; + } + } + + grouping t2a-up { + description + "configuration of t2a for uplink"; + + leaf t2a-min-up { + type uint32; + units nanoseconds; + mandatory true; + description + "the minimum O-RU data processing delay between receiving IQ data + message over the fronthaul interface and transmitting + the corresponding first IQ sample at the antenna"; + } + leaf t2a-max-up { + type uint32; + units nanoseconds; + mandatory true; + description + "the earliest allowable time when a data packet is received before + the corresponding first IQ sample is transmitted at the antenna"; + } + } + + grouping t2a-cp-dl { + description + "Grouping for t2a CP for downlink"; + + leaf t2a-min-cp-dl { + type uint32; + units nanoseconds; + mandatory true; + description + "the minimum O-RU data processing delay between receiving downlink + real time control plane message over the fronthaul interface and + transmitting the corresponding first IQ sample at the antenna"; + } + leaf t2a-max-cp-dl { + type uint32; + units nanoseconds; + mandatory true; + description + "the earliest allowable time when a downlink real time control message + is received before the corresponding first IQ sample is transmitted at + the antenna"; + } + } + + grouping ta3 { + description + "Grouping for ta3 configuration"; + + leaf ta3-min { + type uint32; + units nanoseconds; + mandatory true; + description + "the minimum O-RU data processing delay between receiving an IQ sample + at the antenna and transmitting the first data sample over the + fronthaul interface"; + } + leaf ta3-max { + type uint32; + units nanoseconds; + mandatory true; + description + "the maximum O-RU data processing delay between receiving an IQ sample + at the antenna and transmitting the last data sample over the + fronthaul interface"; + } + } + + grouping t2a-cp-ul { + description + "Grouping for t2a CP uplink"; + + leaf t2a-min-cp-ul { + type uint32; + units nanoseconds; + mandatory true; + description + "the minimum O-RU data processing delay between receiving real time + up-link control plane message over the fronthaul interface and + receiving the first IQ sample at the antenna"; + } + leaf t2a-max-cp-ul { + type uint32; + units nanoseconds; + mandatory true; + description + "the earliest allowable time when a real time up-link control message + is received before the corresponding first IQ sample is received at + the antenna"; + } + } + + grouping ta3-ack { + description + "Grouping for ta3-ack configuration"; + leaf ta3-min-ack { + type int32; + units nanoseconds; + description + "the minimum delay between the DL/UL air reference point (tDL=0 or tUL=0) of symbol M + and the time O-RU sends section type 8 (ACK/NACK feedback) to O-DU. + This value can be negative, which indicates it is in advance of the air reference point. + This leaf only exists if section extension 22 (ACK/NACK request) and section type 8 (ACK/NACK feedback) + are supported by at least one endpoint."; + } + + leaf ta3-max-ack { + type int32; + units nanoseconds; + description + "the maximum delay between the DL/UL air reference point (tDL=0 or tUL=0) of symbol M + and the time O-RU sends section type 8 (ACK/NACK feedback) to O-DU. + This value can be negative, which indicates it is in advance of the air reference point. + This leaf only exists if section extension 22 (ACK/NACK request) and section type 8 (ACK/NACK feedback) + are supported by at least one endpoint."; + } + } + + grouping ta3-2g { + description + "Grouping for ta3-2g configuration"; + + leaf ta3-min-2g { + if-feature feat:RRM-MEAS-REPORTING; + type uint32; + units nanoseconds; + description + "The minimum O-RU data processing delay between receiving an IQ sample + at the antenna and transmitting a C-Plane message carrying RRM measurements + over the fronthaul interface. + + Please refer to CUS specification clause 4.4.3 for more details."; + } + leaf ta3-max-2g { + if-feature feat:RRM-MEAS-REPORTING; + type uint32; + units nanoseconds; + description + "The maximum O-RU data processing delay between receiving an IQ sample + at the antenna and transmitting a C-Plane message carrying RRM measurements + over the fronthaul interface. + + Please refer to CUS specification clause 4.4.3 for more details."; + } + } + + grouping ru-delay-profile { + description + "Grouping for RU delay profile"; + + uses t2a-up; + uses t2a-cp-dl; + + leaf tcp-adv-dl { + type uint32; + units nanoseconds; + mandatory true; + description + "the time difference (advance) between the reception window for + downlink real time Control messages and reception window for the + corresponding IQ data messages."; + } + + uses ta3; + uses t2a-cp-ul; + uses ta3-ack; + uses ta3-2g; + } + + grouping o-du-delay-profile { + description + "Grouping for O-DU delay profile"; + + leaf t1a-max-up { + type uint32; + units nanoseconds; + description + "the earliest possible time which the O-DU can support transmitting + an IQ data message prior to transmission of the corresponding IQ + samples at the antenna"; + } + leaf tx-max { + type uint32; + units nanoseconds; + description + "The maximum amount of time which the O-DU requires to transmit + all downlink user plane IQ data message for a symbol"; + } + leaf ta4-max { + type uint32; + units nanoseconds; + description + "the latest possible time which the O-DU can support receiving the + last uplink user plane IQ data message for a symbol."; + } + leaf rx-max { + type uint32; + units nanoseconds; + description + "The maximum time difference the O-DU can support between + receiving the first user plane IQ data message for a symbol and + receiving the last user plane IQ data message for the same symbol"; + } + leaf t1a-max-cp-dl { + type uint32; + units nanoseconds; + description + "The earliest possible time which the O-DU can support transmitting the + downlink real time control message prior to transmission of the + corresponding IQ samples at the antenna."; + } + } + + grouping t12 { + description + "Grouping for t12"; + + leaf t12-min { + type uint32; + units nanoseconds; + description + "the minimum measured delay between DU port-ID and O-RU port-ID"; + } +// additional leaf added by Samsung + leaf t12-max { + type uint32; + units nanoseconds; + description + "the maximum measured delay between CU port-ID and O-RU port-ID"; + } + } + + grouping t34 { + description + "Grouping for t34"; + + leaf t34-min { + type uint32; + units nanoseconds; + description + "the minimum measured delay between O-RU port-ID and CU port-ID"; + } +// additional leaf added by Samsung + leaf t34-max { + type uint32; + units nanoseconds; + description + "the maximum measured delay between O-RU port-ID and CU port-ID"; + } + } + + grouping non-default-ru-delay-profile { + description + "Grouping for O-RU delay profile different from the default value in ru-delay-profile."; + leaf t2a-min-up { + type uint32; + units nanoseconds; + description + "the minimum O-RU data processing delay between receiving IQ data + message over the fronthaul interface and transmitting + the corresponding first IQ sample at the antenna"; + } + leaf t2a-max-up { + type uint32; + units nanoseconds; + description + "the earliest allowable time when a data packet is received before + the corresponding first IQ sample is transmitted at the antenna"; + } + leaf t2a-min-cp-dl { + type uint32; + units nanoseconds; + description + "the minimum O-RU data processing delay between receiving downlink + real time control plane message over the fronthaul interface and + transmitting the corresponding first IQ sample at the antenna"; + } + leaf t2a-max-cp-dl { + type uint32; + units nanoseconds; + description + "the earliest allowable time when a downlink real time control message + is received before the corresponding first IQ sample is transmitted at + the antenna"; + } + leaf tcp-adv-dl { + type uint32; + units nanoseconds; + description + "the time difference (advance) between the reception window for + downlink real time Control messages and reception window for the + corresponding IQ data messages."; + } + leaf ta3-min { + type uint32; + units nanoseconds; + description + "the minimum O-RU data processing delay between receiving an IQ sample + at the antenna and transmitting the first data sample over the + fronthaul interface"; + } + leaf ta3-max { + type uint32; + units nanoseconds; + description + "the maximum O-RU data processing delay between receiving an IQ sample + at the antenna and transmitting the last data sample over the + fronthaul interface"; + } + leaf t2a-min-cp-ul { + type uint32; + units nanoseconds; + description + "the minimum O-RU data processing delay between receiving real time + up-link control plane message over the fronthaul interface and + receiving the first IQ sample at the antenna"; + } + leaf t2a-max-cp-ul { + type uint32; + units nanoseconds; + description + "the earliest allowable time when a real time up-link control message + is received before the corresponding first IQ sample is received at + the antenna"; + } + leaf ta3-min-ack { + type int32; + units nanoseconds; + description + "the minimum delay between the DL/UL air reference point (tDL=0 or tUL=0) of symbol M + and the time O-RU sends section type 8 (ACK/NACK feedback) to O-DU. + This value can be negative, which indicates it is in advance of the air reference point. + This leaf only exists if section extension 22 (ACK/NACK request) and section type 8 (ACK/NACK feedback) + are supported by at least one endpoint."; + } + leaf ta3-max-ack { + type int32; + units nanoseconds; + description + "the maximum delay between the DL/UL air reference point (tDL=0 or tUL=0) of symbol M + and the time O-RU sends section type 8 (ACK/NACK feedback) to O-DU. + This value can be negative, which indicates it is in advance of the air reference point. + This leaf only exists if section extension 22 (ACK/NACK request) and section type 8 (ACK/NACK feedback) + are supported by at least one endpoint."; + } + + uses ta3-2g; + } + + grouping delay-management-group { + description "a delay management grouping"; + list bandwidth-scs-delay-state { + key "bandwidth subcarrier-spacing"; + description + "Array of structures containing sets of parameters for delay management."; + + uses bandwidth-configuration; + + container ru-delay-profile { + config false; + description "container for O-RU delay parameters"; + + uses ru-delay-profile; + } + } + + list non-default-ru-delay-profile { + if-feature feat:BF-DELAY-PROFILE; + key "delay-profile-id"; + description + "Sets of parameters defined when o-ru supported multiple delay profiles, + only the parameters that are different from the default delay profile are defined."; + leaf delay-profile-id { + type uint16 { + range "1..max"; + } + description + "Used to identify the set of delay profile that are different from the default delay profile. + Value '0' is reserved to refer to default value"; + } + list non-default-bandwidth-scs-delay-state { + key "bandwidth subcarrier-spacing"; + description + "Array of structures containing sets of parameters for delay management."; + uses bandwidth-configuration; + container non-default-ru-delay-profile { + config false; + description + "O-RU delay parameters that are different from the default delay profile. + If a parameter doesn't exist, this parameter will use the defalt value determined in ru-delay-profile."; + uses non-default-ru-delay-profile; + } + } + } + + container adaptive-delay-configuration { + if-feature ADAPTIVE-RU-PROFILE; + description "container for adaptive delay parameters"; + list bandwidth-scs-delay-state { + key "bandwidth subcarrier-spacing"; + description + "Array of structures containing sets of parameters for delay management."; + + uses bandwidth-configuration; + + container o-du-delay-profile { + description + "O-DU provided delay profile for adaptive delay configuration"; + + uses o-du-delay-profile; + } + } + + container transport-delay { + description + "O-DU provided transport-delay parameters"; + uses t12; + uses t34; + } + } + + leaf beam-context-gap-period { + type uint16; + units microseconds; + description + "Time gap between the end of reception window of the C-Plane message(Msg-A) with new beam weights for a given beamId and end of the reception window + of the C-Plane message(Msg-B) that cites the same beamId without weights in the new context. + Note: Value of '0' indicates that the end of the Msg-A and Msg-B reception windows are perfectly aligned, which should allow Msg-B to use the new + beamforming weights with a '0' microsecond beam-context-gap-period. Value of '65535' implies infinite gap, which means a beamId may not be reused + at all in a different context (applicable only to weight-based dynamic beamforming). If O-DU chooses not to interpret/honor this value, behaviour + of O-RU is unpredictable if a beamId has new weights loaded in one context and is reused in a different context. Please refer the CUS-Plane spec + Section 'Weight-based dynamic beamforming' for detailed description"; + } + } + container delay-management { + description "top-level tree covering off O-DU to O-RU delay management"; + + uses delay-management-group; + } +} diff --git a/radio/fhi_72/mplane/yang/models/o-ran-file-management.yang b/radio/fhi_72/mplane/yang/models/o-ran-file-management.yang index ee07645a44..ee0a553ff0 100644 --- a/radio/fhi_72/mplane/yang/models/o-ran-file-management.yang +++ b/radio/fhi_72/mplane/yang/models/o-ran-file-management.yang @@ -3,10 +3,12 @@ module o-ran-file-management { namespace "urn:o-ran:file-management:1.0"; prefix "o-ran-file-mgmt"; - import ietf-crypto-types { - prefix "ct"; - } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } organization "O-RAN Alliance"; @@ -16,7 +18,7 @@ module o-ran-file-management { description "This module defines the configuration and operations for handling upload. - Copyright 2019 the O-RAN Alliance. + Copyright 2024 the O-RAN Alliance. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -42,6 +44,52 @@ module o-ran-file-management { contributors may be used to endorse or promote products derived from this software without specific prior written permission."; + revision "2024-08-12" { + description + "version 10.2.0 + + 1) Improve YANG description enforce typing of IPv6 addresses"; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2023-04-10" { + description + "version 10.1.0 + + 1) Remove crypto-types dependency"; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2022-08-15" { + description + "version 10.0.0 + + 1) added password for FTPES + 2) clarified path/folder description "; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2021-12-01" { + description + "version 7.1.0 + + 1) typographical corrections"; + + reference "ORAN-WG4.M.0-v07.00"; + } + + revision "2021-07-26" { + description + "version 7.0.0 + + 1) added FTPES support"; + + reference "ORAN-WG4.M.0-v07.00"; + } + revision "2019-07-03" { description "version 1.1.0 @@ -63,21 +111,157 @@ module o-ran-file-management { reference "ORAN-WG4.M.0-v01.00"; } + /***********************************************/ + /* Identities for Asymmetric Key Algorithms */ + /***********************************************/ + + identity asymmetric-key-algorithm { + description + "Base identity from which all asymmetric key + encryption Algorithm."; + } + + identity rsa1024 { + base asymmetric-key-algorithm; + description + "The RSA algorithm using a 1024-bit key."; + reference + "RFC 8017: + PKCS #1: RSA Cryptography Specifications Version 2.2."; + } + + identity rsa2048 { + base asymmetric-key-algorithm; + description + "The RSA algorithm using a 2048-bit key."; + reference + "RFC 8017: + PKCS #1: RSA Cryptography Specifications Version 2.2."; + } + + identity rsa3072 { + base asymmetric-key-algorithm; + description + "The RSA algorithm using a 3072-bit key."; + reference + "RFC 8017: + PKCS #1: RSA Cryptography Specifications Version 2.2."; + } + + identity rsa4096 { + base asymmetric-key-algorithm; + description + "The RSA algorithm using a 4096-bit key."; + reference + "RFC 8017: + PKCS #1: RSA Cryptography Specifications Version 2.2."; + } + + identity rsa7680 { + base asymmetric-key-algorithm; + description + "The RSA algorithm using a 7680-bit key."; + reference + "RFC 8017: + PKCS #1: RSA Cryptography Specifications Version 2.2."; + } + + identity rsa15360 { + base asymmetric-key-algorithm; + description + "The RSA algorithm using a 15360-bit key."; + reference + "RFC 8017: + PKCS #1: RSA Cryptography Specifications Version 2.2."; + } + + identity secp192r1 { + base asymmetric-key-algorithm; + description + "The ECDSA algorithm using a NIST P256 Curve."; + reference + "RFC 6090: + Fundamental Elliptic Curve Cryptography Algorithms."; + } + identity secp224r1 { + base asymmetric-key-algorithm; + description + "The ECDSA algorithm using a NIST P256 Curve."; + reference + "RFC 6090: + Fundamental Elliptic Curve Cryptography Algorithms."; + } + + identity secp256r1 { + base asymmetric-key-algorithm; + description + "The ECDSA algorithm using a NIST P256 Curve."; + reference + "RFC 6090: + Fundamental Elliptic Curve Cryptography Algorithms."; + } + + identity secp384r1 { + base asymmetric-key-algorithm; + description + "The ECDSA algorithm using a NIST P256 Curve."; + reference + "RFC 6090: + Fundamental Elliptic Curve Cryptography Algorithms."; + } + + identity secp521r1 { + base asymmetric-key-algorithm; + description + "The ECDSA algorithm using a NIST P256 Curve."; + reference + "RFC 6090: + Fundamental Elliptic Curve Cryptography Algorithms."; + } + + /**********************************************************/ + /* Typedefs for identityrefs to above base identities */ + /**********************************************************/ + + typedef asymmetric-key-algorithm-ref { + type identityref { + base asymmetric-key-algorithm; + } + description + "This typedef enables importing modules to easily define an + identityref to the 'asymmetric-key-algorithm' + base identity."; + } + grouping file-path-grouping { - description "Complete logical path of the file to upload/download - (no wildcard is allowed) ex : /o-RAN/log/syslog.1"; + description "Grouping, that provides local path and remote path for the + purpose of File Management scenarios."; + leaf local-logical-file-path { type string; mandatory true; - description "Local logical file path"; + description "URI specifying the complete logical path relative to the root of the logical file system + structure (the common root for o-ran/log, o-ran/pm, o-ran/transceiver or o-ran/beamforming) of the file + to upload/download (no wildcard is allowed), including a file name and its extension. + Example: 'o-ran/log/file_1.abc', where 'o-ran/log/' represents relative path to folder containing log files + as specified by O-RAN, 'file_1' represents desired filename and 'abc' represents desired filename's extension. + The content shall conform to RFC3986 'Uniform Resource Identifier (URI): Generic Syntax'"; } leaf remote-file-path { type string; mandatory true; - description "URI specifying the remote-file-path on O-DU/NMS. - Format:sftp://@[:port]/path"; + description "URI specifying the remote-file-path on O-DU/SMO or on stand-alone file server. + The content shall conform to RFC3986 'Uniform Resource Identifier (URI): Generic Syntax'. + When upload/download is via sftp, the format shall be of the form + sftp://@[:port]/path + When upload/download is via ftpes, the format shall be of the form + ftpes://@[:port]/path + IPv6 addresses are distinguished by enclosing the IP literal within square brackets ('[' and ']') as defined by RFC3986 e.g., sftp://user@[2001:0:130F::9C0:876A:130B]:22/path. + + Note, ftpes is not an IANA registered URI scheme, but used here to signal + that a file transfer should be performed over FTPES"; } } @@ -102,7 +286,7 @@ module o-ran-file-management { } grouping credential-information { - description "Type of authentication to use for SFTP upload or download."; + description "Type of authentication to use for file upload or download."; choice credentials { case password { container password { @@ -111,21 +295,22 @@ module o-ran-file-management { type string; mandatory true; description - "password needed for O-RU authentication."; + "password used for O-RU authentication to sFTP server for the associated username defined in the remote-file-path."; } description - "password for O-RU authentication method in use"; + "password for O-RU authentication method in use. This information + shall be ignored by an O-RU that is using FTPES based file transfer"; } container server { list keys { key algorithm; ordered-by user; - uses ct:public-key-grouping; + uses public-key-grouping; description "List of allowed algorithms with its keys"; } description - "Key for sFTP server authentication"; + "SSH Key for file server authentication"; } } case certificate { @@ -134,9 +319,22 @@ module o-ran-file-management { description "certificate authentication method in use"; } + } description ""; } + container application-layer-credential{ + + leaf appl-password { + type string; + description + "The parameter represents the password which may be needed for O-RU application level authentication. + For example, to perform authenticatation towards an FTPes server which does not allow anonymous account, + in addition to X.509v3 certificate for TLS authentication, password configured here need to be used together with username defined in the remote-file-path "; + } + description + "Application layer credential information"; + } } grouping retrieve-input { @@ -144,12 +342,13 @@ module o-ran-file-management { leaf logical-path { type string; mandatory true; - description "O-RAN unit of which the files are to be listed. - ex : O-RAN/log, o-RAN/PM, O-RAN/transceiver"; + description "URL specifying the logical path relative to the root of the logical file system + structure (the common root for o-ran/log, o-ran/pm, o-ran/transceiver or o-ran/beamforming) + of the files to be listed."; } leaf file-name-filter { type string; - description "Filter which are to be applied on the result list of file names (* is allowed as wild-card)."; + description "Filter which needs to be applied on the result list of file names (* is allowed as wild-card)."; } } @@ -163,10 +362,48 @@ module o-ran-file-management { } } + grouping public-key-grouping { + description + "A public key. + + The 'algorithm' and 'public-key' nodes are not + mandatory because they MAY be defined in . + Implementations SHOULD assert that these values are + either configured or that they exist in ."; + leaf algorithm { + nacm:default-deny-write; + type asymmetric-key-algorithm-ref; + must '../public-key'; + description + "Identifies the key's algorithm. More specifically, + this leaf specifies how the 'public-key' binary leaf + is encoded."; + reference + "RFC CCCC: Common YANG Data Types for Cryptography"; + } + leaf public-key { + nacm:default-deny-write; + type binary; + must '../algorithm'; + description + "A binary that contains the value of the public key. The + interpretation of the content is defined by the key + algorithm. For example, a DSA key is an integer, an RSA + key is represented as RSAPublicKey as defined in + RFC 8017, and an Elliptic Curve Cryptography (ECC) key + is represented using the 'publicKey' described in + RFC 5915."; + reference + "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: + RSA Cryptography Specifications Version 2.2. + RFC 5915: Elliptic Curve Private Key Structure."; + } + } + // RPCs rpc file-upload { - description "File upload over SFTP from equipment to NETCONF client"; + description "Management plane trigger to upload file from O-RU to file-server"; input { uses file-path-grouping; uses credential-information; @@ -187,15 +424,9 @@ module o-ran-file-management { } } - notification file-upload-notification { - uses file-path-grouping; - uses output-status-grouping; - description ""; - } - rpc file-download { description - "Management plane triggered to generate the download file of O-RU."; + "Management plane trigger to download file from file-server to O-RU."; input { uses file-path-grouping; uses credential-information; @@ -205,6 +436,12 @@ module o-ran-file-management { } } + notification file-upload-notification { + uses file-path-grouping; + uses output-status-grouping; + description ""; + } + notification file-download-event { uses file-path-grouping; uses output-status-grouping; diff --git a/radio/fhi_72/mplane/yang/models/o-ran-hardware.yang b/radio/fhi_72/mplane/yang/models/o-ran-hardware.yang new file mode 100644 index 0000000000..4e00d034d5 --- /dev/null +++ b/radio/fhi_72/mplane/yang/models/o-ran-hardware.yang @@ -0,0 +1,461 @@ +module o-ran-hardware { + yang-version 1.1; + namespace "urn:o-ran:hardware:1.0"; + prefix "o-ran-hw"; + + import ietf-hardware { + prefix hw; + } + import iana-hardware { + prefix ianahw; + } + import ietf-yang-types { + prefix yang; + } + import o-ran-wg4-features { + prefix or-feat; + } + + organization "O-RAN Alliance"; + + contact + "www.o-ran.org"; + + description + "This module defines the YANG definitions for managing the O-RAN hardware. + + Copyright 2024 the O-RAN Alliance. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the above disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the above disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the Members of the O-RAN Alliance nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission."; + + revision "2024-04-15" { + description + "version 15.0.0 + + 1) Added support for new fan tray component."; + + reference "ORAN-WG4.M.0-v15.00"; + } + + revision "2023-08-14" { + description + "version 13.0.0 + + 1) New connector types for RS485 and external IO"; + + reference "ORAN-WG4.M.0-v13.00"; + } + + revision "2022-12-05" { + description + "version 10.1.0 + + 1) Clarifications for Network Energy Saving"; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2022-08-15" { + description + "version 10.0.0 + + 1) introduction of O-RU connector functionality. + 2) fixing constraints"; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2021-12-01" { + description + "version 5.2.0 + + 1) typographical corrections in descriptions."; + + reference "ORAN-WG4.M.0-v05.00"; + } + + revision "2021-03-22" { + description + "version 5.1.0 + + 1) typographical corrections in descriptions."; + + reference "ORAN-WG4.M.0-v05.00"; + } + + revision "2020-12-10" { + description + "version 5.0.0 + + 1) added date-last-service leaf used in pnfRegistration"; + + reference "ORAN-WG4.M.0-v05.00"; + } + + revision "2020-04-17" { + description + "version 3.0.0 + + 1) added new leaf to indicate whether O-RU supports dying gasp + 2) added new identities for PA and FPGA"; + + reference "ORAN-WG4.M.0-v03.00"; + } + + revision "2019-07-03" { + description + "version 1.1.0 + + 1) added new identities to accommodate cross working group use of + o-ran-hardware and associated set of augmentations that are backwards + compatible to version 1.0.0"; + + reference "ORAN-WG4.M.0-v01.00"; + } + + revision "2019-02-04" { + description + "version 1.0.0 + + 1) imported model from xRAN + 2) changed namespace and reference from xran to o-ran"; + + reference "ORAN-WG4.M.0-v01.00"; + } + + feature ENERGYSAVING { + description + "Indicates that the Radio Unit supports energy saving state."; + } + + // identity statements + identity O-RAN-RADIO { + base ianahw:module; + description + "Module used as it represents a self-contained sub-system + used in /hw:/hardware/hw:component/hw:class to represent + an O-RAN RU"; + } + + identity O-RAN-HW-COMPONENT { + base ianahw:module; + description + "Module used as it represents a self-contained sub-system + used in /hw:/hardware/hw:component/hw:class to represent + any O-RAN hardware component"; + } + + identity O-DU-COMPONENT { + base O-RAN-HW-COMPONENT; + description + "Used in /hw:/hardware/hw:component/hw:class to represent + any O-RAN defined O-DU hardware component"; + } + + identity O-RAN-FAN-TRAY { + base O-RAN-HW-COMPONENT; + description + "Used in /hw:/hardware/hw:component/hw:class to represent + any O-RAN defined fan tray hardware component."; + } + + identity O-RU-COMPONENT { + base O-RAN-HW-COMPONENT; + description + "Used in /hw:/hardware/hw:component/hw:class to represent + any O-RAN defined O-RU hardware component, including a stand-alone + O-RU or an O-RU component integrated into a multi-module system."; + } + + identity O-RU-POWER-AMPLIFIER { + base O-RU-COMPONENT; + description + "Used in /hw:/hardware/hw:component/hw:class to represent + an O-RU's power amplifier, and may be used for reporting + measurements on a per class basis"; + } + + identity O-RU-FPGA { + base O-RU-COMPONENT; + description + "Used in /hw:/hardware/hw:component/hw:class to represent + an FPGA in an O-RU, and may be used for reporting + measurements on a per class basis"; + } + + identity O-RU-CONNECTOR { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of O-RU connector."; + } + + identity O-RU-ANTENNA-CONNECTOR { + base O-RU-CONNECTOR; + description + "This identity is applicable if the hardware class is some sort + of connector capable of interfacing between an O-RU and some + antenna function."; + } + + identity O-RU-FEEDER { + base O-RU-ANTENNA-CONNECTOR; + description + "This identity is applicable if the hardware class is an + antenna feeder."; + } + + identity O-RU-BF-CAL { + base O-RU-ANTENNA-CONNECTOR; + description + "This identity is applicable if the hardware class is for + beamforming calibration."; + } + + identity O-RU-RS485 { + base O-RU-CONNECTOR; + description + "This identity is applicable if the hardware class is some sort + of connector capable of interfacing between an O-RU and Antenna + Line Devices using RS-485 electrical standard."; + } + + identity O-RU-EXTIO { + base O-RU-CONNECTOR; + description + "This identity is applicable if the hardware class is some sort + of connector capable of interfacing between an O-RU external I/O lines."; + } + + // typedef statements + typedef energysaving-state { + type enumeration { + enum UNKNOWN { + description + "The O-RU is unable to report its energy saving state."; + } + enum SLEEPING { + description + "The O-RU is in energy saving state. In this mode M-Plane connection is active. Depending + on the O-RU's design - other planes, functions and hardware components which are not needed + by the O-RU in energy saving state can be disabled or switched off by the O-RU autonomously."; + } + enum AWAKE { + description + "The O-RU is not in an energy saving state."; + } + } + description + "New typedef since ietf-hardware only covers power-state + for redundancy purposes, not to indicate energy saving operations. + For details please see O-RAN WG4 M-Plane specification, clause 9.1.3 'Modify state'"; + } + + typedef availability-type { + type enumeration { + enum UNKNOWN { + description "The Radio Unit is unable to report its availability state."; + } + enum NORMAL { + description + "The equipment is functioning correctly."; + } + enum DEGRADED { + description + "The equipment may be reporting a major alarm or may be reporting a critical + alarm that is only impacting one or more subcomponent, but where the + equipment's implementation permit it to continue operation (server traffic) + in a degraded state. + + Used for example, when the equipment has M identical sub-components and + when a critical alarm is impacting only N subcomponents, where N@[:]/path"; } - uses o-ran-fm:credential-information; + uses o-ran-file-mgmt:credential-information; + } + + list remote-file-uploads { + key remote-file-upload-path; + description + "file upload can be done to one or more than one file servers + + An O-RU receiving this list should ignore the deprecated + remote-SFTP-uploads list, if received"; + + leaf remote-file-upload-path { + type inet:uri; + description + "URI specifying the remote location where the files are to be uploaded. + + When upload is via SFTP, the format shall be of the form + sftp://@[:port]/path + When upload is via FTPES, the format shall be of the form + ftpes://@[:port]/path + + Note, ftpes is not an IANA registered URI scheme, but used here to signal + that a file transfer should be performed over FTPES"; + } + + uses o-ran-file-mgmt:credential-information; } // transceiver measurements applicable to all O-RAN HW functions @@ -567,6 +1691,42 @@ module o-ran-performance-management { window measurement objects periodically."; } + leaf shared-cell-measurement-interval { + if-feature feat:SHARED-CELL-STATS; + type uint16; + units seconds; + description + "measurement interval to measure the shared-cell measurement objects periodically."; + } + + leaf symbol-rssi-measurement-interval { + type uint16; + units seconds; + description + "measurement interval to measure the symbol-wise TD-RSSI measurement objects periodically."; + } + + leaf tssi-measurement-interval { + type uint16; + units seconds; + description + "Measurement interval to measure the tx TSSI measurement objects periodically."; + } + + leaf rssi-measurement-interval { + type uint16; + units seconds; + description + "Measurement interval to measure the RSSI measurement objects periodically."; + } + + leaf tx-antenna-measurement-interval { + type uint16; + units seconds; + description + "Measurement interval to measure the tx antenna measurement objects periodically."; + } + leaf notification-interval { type uint16; units seconds; @@ -586,11 +1746,14 @@ module o-ran-performance-management { leaf max-bin-count{ type uint16; config false; - mandatory true; + status deprecated; description "indicates the maximum value of configurable bin-count for frequency table in transceiver-measurement-objects as one of module - capabilities."; + capabilities. + + This leaf is deprecated and replaced with the max-bin-count in the + transceiver-objects list."; } list transceiver-measurement-objects { @@ -673,33 +1836,7 @@ module o-ran-performance-management { } leaf-list report-info { - type enumeration { - enum MAXIMUM { - description - "to report maximum value and its recorded time within the - measurement-interval for the measurement-object."; - } - enum MINIMUM { - description - "to report minimum value and its recorded time within the - measurement-interval for the measurement-object."; - } - enum FIRST { - description - "to report first value and its recorded time within the - measurement-interval for the measurement-object."; - } - enum LATEST { - description - "to report latest value and its recorded time within the - measurement-interval for the measurement-object."; - } - enum FREQUENCY_TABLE { - description - "to report frequency bin table within the - measurement-interval for the measurement-object."; - } - } + type transceiver-report-info; description "The reporting info to the measurement object."; } @@ -715,16 +1852,7 @@ module o-ran-performance-management { } leaf function { - type enumeration { - enum RAW { - description - "the value is expressed by real value."; - } - enum LOG_10 { - description - "the value is expressed by logarithm with base 10."; - } - } + type transceiver-function; description "the value to be recorded for transceiver-measurement @@ -851,7 +1979,7 @@ module o-ran-performance-management { description "the reception window stats are counted per transport flow. When there are multiple transport flows between O-DU and O-RU, - e.g. multiple sets of o-du mac address, ru mac address and + e.g. multiple sets of o-du-mac-address, ru-mac-address and vlan-id, the reception window stats per transport flow are counted in this case. This configuration is allowed only when O-RU supports @@ -862,7 +1990,7 @@ module o-ran-performance-management { description "the reception window stats are counted per eAxC ID, which is - used in the header of receivd data packet. + used in the header of received data packet. This configuration is allowed only when O-RU supports a feature GRANULARITY-EAXC-ID-MEASUREMENT."; } @@ -931,7 +2059,7 @@ module o-ran-performance-management { description "the transmission stats are counted per transport flow. When there are multiple transport flows between O-DU and O-RU, - e.g. multiple sets of o-du mac address, ru mac address and + e.g. multiple sets of o-du-mac-address, ru-mac-address and vlan-id, the transmission stats per transport flow are counted in this case. This configuration is allowed only when O-RU supports @@ -942,7 +2070,7 @@ module o-ran-performance-management { description "the transmission stats are counted per eAxC ID, which is - used in the header of receivd data packet. + used in the header of received data packet. This configuration is allowed only when O-RU supports a feature GRANULARITY-EAXC-ID-MEASUREMENT."; } @@ -968,6 +2096,58 @@ module o-ran-performance-management { } + list shared-cell-measurement-objects { + if-feature feat:SHARED-CELL-STATS; + key "measurement-object"; + description + "optional list used to report shared-cell measurements."; + leaf measurement-object { + type enumeration { + enum RX_UP_UL { + description + "the number of received U-Plane data packets in UL direction, corresponds to shared-cell-combine-entity. + Refer to WG4 CUS secification clause 9.1."; + } + enum RX_UP_UL_COMBINED { + description + "the number of U-Plane data packets, which is processed by combine functional block. + Refer to WG4 CUS secification clause 9.1."; + } + } + description + "target metric to measure shared-cell operation."; + } + leaf active { + type boolean; + default false; + description + "Enable/disable the performance measurement per port + measurement object."; + } + leaf object-unit { + type enumeration { + enum TRANSPORT { + description + "unit to measure the performance per object-id, + the shared-cell stats are counted per TRANSPORT."; + } + } + description "unit to measure the performance per object-id."; + } + leaf report-info { + type enumeration { + enum COUNT { + description + "the number of data packet are counted for shared-cell stats."; + } + } + description + "The reporting info to the measurement object."; + } + uses shared-cell-measurement-result-grouping; +// configuration and measurement result for the shared-cell stats + } + list epe-measurement-objects { key "measurement-object"; description @@ -977,12 +2157,20 @@ module o-ran-performance-management { type enumeration { enum TEMPERATURE { description - "Measured temperature in degrees celcius"; + "Measured temperature in degrees Celsius"; } enum POWER { description "Measured power consumed, in watts (W)"; } + enum VOLTAGE { + description + "Measured voltage, in volts (V)"; + } + enum CURRENT { + description + "Measured current consumption, in amperes (A)"; + } } description "Target metric to measure the performance"; } @@ -994,63 +2182,369 @@ module o-ran-performance-management { "Enable/disable the performance measurement per Object"; } - leaf-list report-info { - type enumeration { - enum MAXIMUM { - description - "to report maximum value and its recorded time within the - measurement-interval for the measurement-object."; - } - enum MINIMUM { - description - "to report minimum value and its recorded time within the - measurement-interval for the measurement-object."; - } - enum AVERAGE { - description - "to report average value within the - measurement-interval for the measurement-object."; - } + leaf object-unit { + type leafref { + path "/hw:hardware/hw:component/hw:class"; } + description + "the hardware component type is used for the object-unit for the + EPE measurements. For example, the object-unit will be set to + or-hw:O-RU-POWER-AMPLIFIER if the measurement relates to + O-RU power amplifiers. + + Other hardware-classes include: + ianahw:power-supply, ianahw:fan, ianahw:cpu"; + } + + leaf-list report-info { + type epe-report-info; description "The reporting info to the measurement object."; } - + leaf bin-count { + type uint16; + description + "the number of bin for the frequency table. + This value shall be less than max-bin-count"; + } + leaf lower-bound { + type decimal64 { + fraction-digits 4; + } + description + "the lower value of the first bin of frequency table."; + } + leaf upper-bound { + type decimal64 { + fraction-digits 4; + } + description + "the upper value of the last bin of frequency table."; + } uses epe-measurement-result-grouping; // configuration and measurement result for the epe-measurement } + list symbol-rssi-measurement-objects { + key "measurement-object"; + description + "optional list used to measure and report symbol-wise time domain RSSI for all UL symbols or configured symbols"; + + leaf measurement-object { + type enumeration { + enum ALL-UL-SYMBOLS { + description + "Measure and report symbol-rssi separately for all UL symbols in every configured number of slots (as defined by 'period' in 'symbol-rssi-measurement-objects'. + And the UL symbols are decided by 'configurable-tdd-pattern', 'static-srs-configuration', 'static-prach-configuration', + and 'dataDirection' in the C-plane messages. + This option is recommended for static TDD case. If this option is used in dynamic TDD case, then O-RU measures + only the allocates UL symbols because O-RU may not know 'candidate UL symbols' which are not allocated. "; + } + + enum CONFIGURED-SYMBOLS { + description + "Measure and report symbol-rssi separately for all configured symbols as defined by the leaf-list 'symbol-index', + This can be used for non-dynamic TDD as well as dynamic TDD cases, + the O-RU should measure all configured symbols, irrespective of whether the UL symbol is allocated or not, + If a c-plane message indicates a symbol within this 'symbol-index' list to be a DL symbol, + O-RU shall not measure RSSI on this symbol."; + } + } + description "Target metric to measure the symbol-rssi"; + } + + leaf object-unit { + type enumeration { + enum RX-ARRAY-CARRIER { + description + "unit to measure the performance per object-id, + only the rx-array-carriers which are not configured with mixed numerology will be measured"; + } + } + mandatory true; + description "unit to measure the performance per object-id."; + } + + list per-rx-array-carrier-configuration { + key "rx-array-carrier"; + description + "measurement configuration per rx-array-carrier to accommodate different Subcarrier Spacing + and TDD pattern per rx-array-carrier, and only the symbol-wise TD-RSSI of the rx-array-carriers + included in per-rx-array-carrier-configuration will be measured and reported"; + + leaf rx-array-carrier { + type leafref { + path "/up:user-plane-configuration/up:rx-array-carriers/up:name"; + } + description "reference to the name of rx-array-carriers"; + } + + leaf period { + type uint16; + + description + "the number of slots that correspond to the period of a TDD-Configuration, + and the start point of the 1st period is subframe#0, slot#0 of the 1st even number radio frame after this configuration is received, + here even number radio frame is used because according to 3GPP TS 38.213, A UE expects that P1 + P2 divides 20 msec"; + } + + leaf-list symbol-index { + type uint16; + + description + "the index of the symbols within 'period'. The first symbol within the 'period is symbol-index=0, next symbol is symbol-index =1 etc. + This symbol-index is different from how symbolId is defined in CUS plane spec. + These symbols are configured for O-RU to measure and report symbol-wise rssi, + used only when 'measurement-object' = 'CONFIGURED-SYMBOLS'. + If a c-plane message indicates a symbol within this 'symbol-index' list to be a DL symbol, + O-RU shall not measure rssi on this symbol"; + } + + leaf active { + type boolean; + default false; + description + "Enable/disable the symbol-rssi measurement per Object"; + } + + leaf-list report-info { + type symbol-rssi-report-info; + description "The reporting info to the measurement object."; + } + + leaf bin-count { + type uint16; + + description + "the number of bin for the frequency table. + This value shall be less than max-bin-count"; + } + + leaf lower-bound { + type int16; + units dBm; + description + "the lower value of the first bin of frequency table."; + } + + leaf upper-bound { + type int16; + units dBm; + description + "the upper value of the last bin of frequency table."; + } + } + + uses symbol-rssi-measurement-result-grouping; + // configuration and measurement result for the symbol-rssi-measurement + } + + list tssi-measurement-objects { + key "measurement-object"; + description + "optional list used to measure and report time domain TSSI for per tx-array-carrier on specific tx-array-element."; + leaf measurement-object { + type enumeration { + enum TSSI-IQ-POWER-LEVEL { + description + "Measured TSSI (Transmit Signal Strength Indicator) digital IQ Power level for each Tx array carrier on the specific array element"; + } + } + description "Target metric to measure the tssi"; + } + + leaf active { + type boolean; + default false; + description + "Enable/disable the TSSI measurement per object"; + } + + leaf object-unit { + type enumeration { + enum CARRIER_ARRAY_ELEMENT { + description + "Unit to measure the performance per object-id."; + } + } + mandatory true; + description "unit to measure the performance per object-id."; + } + + leaf-list report-info { + type tssi-report-info; + description "The reporting info to the measurement object."; + } + uses tssi-measurement-result-grouping; + // configuration and measurement result for the tssi-measurement + } + + list rssi-measurement-objects { + key "measurement-object"; + description + "optional list used to measure and report time domain RSSI for per rx-array-carrier on specific rx-array-element."; + leaf measurement-object { + type enumeration { + enum RSSI { + description + "Measured RSSI (Received Signal Strength Indicator) for each Rx array carrier on the specific array element in dbm"; + } + } + description "Target metric to measure the rssi"; + } + leaf active { + type boolean; + default false; + description + "Enable/disable the RSSI measurement per object"; + } + leaf object-unit { + type enumeration { + enum CARRIER_ARRAY_ELEMENT { + description + "Unit to measure the performance per object-id."; + } + } + mandatory true; + description "unit to measure the performance per object-id."; + } + leaf-list report-info { + type rssi-report-info; + description "The reporting info to the measurement object."; + } + uses rssi-measurement-result-grouping; + // configuration and measurement result for the rssi-measurement + } + + list tx-antenna-measurement-objects { + key "measurement-object"; + description + "Optional list used to report tx-antenna measurements."; + leaf measurement-object { + type enumeration { + enum VSWR { + description + "Measure and report values of VSWR."; + } + } + description "Target metric to measure the tx-antenna measurements."; + } + + leaf active { + type boolean; + default false; + description + "Enable/disable the performance measurement per Object"; + } + + leaf-list report-info { + type tx-antenna-report-info; + description "The reporting info to the measurement object."; + } + + leaf object-unit { + type tx-antenna-object-unit; + mandatory true; + description "Unit to measure the performance per object-id."; + } + + leaf bin-count { + type uint16; + + description + "The number of bin for the frequency table. + This value shall be less than max-bin-count"; + } + + leaf lower-bound { + type decimal64 { + fraction-digits 4; + } + + description + "The lower value of the first bin of frequency table."; + } + + leaf upper-bound { + type decimal64 { + fraction-digits 4; + } + + description + "The upper value of the last bin of frequency table."; + } + uses tx-antenna-measurement-result-grouping; +// configuration and measurement result for the tx-antenna-measurement + + } } grouping measurement-capabilities { + description "a measurement capabilities grouping"; container measurement-capabilitites { config false; description "the type of measurement objects supported by the O-RU"; list transceiver-objects { key measurement-object; + description "list of transceiver objects"; leaf measurement-object { type leafref { path "/performance-measurement-objects/transceiver-measurement-objects/measurement-object"; + require-instance false; } + description "a measurement object"; + } + leaf-list report-info { + type transceiver-report-info; + description "The reporting info supported by this measurement object."; + } + leaf-list function { + type transceiver-function; + description "The function supported by this measurement object."; + } + leaf max-bin-count{ + type uint16; + config false; + description + "when O-RU supports FREQUENCY_TABLE, indicates the maximum value of + configurable bin-count for frequency table in transceiver-measurement-objects."; } } list rx-window-objects { key measurement-object; + description "list of rx window objects"; leaf measurement-object { type leafref { path "/performance-measurement-objects/rx-window-measurement-objects/measurement-object"; + require-instance false; } + description "a measurement object"; } } list tx-stats-objects { key measurement-object; + description "list of tx stats objects"; leaf measurement-object { type leafref { path "/performance-measurement-objects/tx-measurement-objects/measurement-object"; + require-instance false; } + description "a measurement object"; + } + } + list shared-cell-stats-objects { + if-feature feat:SHARED-CELL-STATS; + key measurement-object; + description "list of shared-cell stats objects"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/shared-cell-measurement-objects/measurement-object"; + require-instance false; + } + description "a measurement object"; } } list epe-stats-objects { @@ -1061,7 +2555,9 @@ module o-ran-performance-management { leaf measurement-object { type leafref { path "/performance-measurement-objects/epe-measurement-objects/measurement-object"; + require-instance false; } + description "a measurement object"; } leaf-list component-class { type identityref { @@ -1072,13 +2568,114 @@ module o-ran-performance-management { component for which EPE measurements are supported."; } + leaf-list report-info { + type epe-report-info; + description "The reporting info supported of this measurement object."; + } + leaf max-bin-count{ + type uint16; + config false; + description + "when O-RU supports FREQUENCY_TABLE, indicates the maximum value of + configurable bin-count for frequency table in epe-measurement-objects."; + } + } + + list symbol-rssi-stats-objects { + key measurement-object; + description "list of symbol-wise TD-RSSI stats objects"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/symbol-rssi-measurement-objects/measurement-object"; + require-instance false; + } + description "a measurement object"; + } + leaf-list report-info { + type symbol-rssi-report-info; + description "The reporting info supported for thise measurement object."; + } + leaf max-bin-count{ + type uint16; + config false; + description + "when O-RU supports FREQUENCY_TABLE, indicates the maximum value of + configurable bin-count for frequency table in symbol-rssi-stats-objects."; + } + } + + list tssi-stats-objects { + key measurement-object; + description "list of TSSI stats objects"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/tssi-measurement-objects/measurement-object"; + } + description "a measurement object"; + } + leaf-list report-info { + type tssi-report-info; + description "The reporting info supported for thise measurement object."; + } + } + + list rssi-stats-objects { + key measurement-object; + description "list of RSSI stats objects"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/rssi-measurement-objects/measurement-object"; + } + description "a measurement object"; + } + leaf-list report-info { + type rssi-report-info; + description "The reporting info supported for thise measurement object."; + } + } + + list tx-antenna-stats-objects { + key measurement-object; + description "list of tx antenna objects"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/tx-antenna-measurement-objects/measurement-object"; + require-instance false; + } + description "a measurement object"; + } + + leaf-list object-unit { + type tx-antenna-object-unit; + description "The object units supported for this measurement object."; + } + + leaf-list report-info { + type tx-antenna-report-info; + description "The reporting info supported for this measurement object."; + } + + leaf max-bin-count{ + type uint16; + config false; + description + "when O-RU supports FREQUENCY_TABLE, indicates the maximum value of + configurable bin-count for frequency table in tx-antenna-stats-objects."; + } } } } grouping measurement-notification { + + description + "notification may contain measurement result for transceiver-stats + and/or rx-window-stats and/or tx-stats and/or epe-stats"; list transceiver-stats { key "measurement-object"; + + description + "measurement result of transceiver-measurement per measurement-object"; leaf measurement-object { type leafref { path "/performance-measurement-objects/transceiver-measurement-objects/measurement-object"; @@ -1091,12 +2688,33 @@ module o-ran-performance-management { uses start-and-end-time; uses transceiver-measurement-result-grouping; - description - "measurement result of transceiver-measurement per measurement-object"; + list multiple-transceiver-measurement-result { + config false; + description + "Multiple measurement results of transceiver-measurement. + + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification. + + In addition, the O-RU shall always use the + + measurement-result-stats/transceiver-stats[measurement-object]/transceiver-measurement-result + + schema-node to report a single transceiver measurement-object. The O-RU should report its latest + transceiver measurements available. This ensures O-DUs supporting earlier versions + of this specification can recover the measurement."; + + uses start-and-end-time; + uses transceiver-measurement-result-grouping; + } + } list rx-window-stats { key "measurement-object"; + + description + "measurement result for the reception window measurement per + measurement-object"; leaf measurement-object { type leafref { path "/performance-measurement-objects/rx-window-measurement-objects/measurement-object"; @@ -1108,14 +2726,35 @@ module o-ran-performance-management { uses start-and-end-time; uses rx-window-measurement-result-grouping; - description - "measurement result for the reception window measurement per - measurement-object"; + list multiple-rx-window-measurement-result { + config false; + description + "Multiple measurement results of rx-window-measurement. + + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification. + + In addition, the O-RU shall always use one of the + + measurement-result-stats/rx-window-stats[measurement-object]/count or + measurement-result-stats/rx-window-stats[measurement-object]/tr-measured-result/count or + measurement-result-stats/rx-window-stats[measurement-object]/eaxc-measured-result/count + + schema-nodes to report a single rx-window measurement-object. The O-RU should report its latest + rx-window measurement available. This ensures O-DUs supporting earlier versions + of this specification can recover the measurement."; + + uses start-and-end-time; + uses rx-window-measurement-result-grouping; + } } list tx-stats { key "measurement-object"; + + description + "measurement result for the tx stats measurement per + measurement-object"; leaf measurement-object { type leafref { path "/performance-measurement-objects/tx-measurement-objects/measurement-object"; @@ -1127,15 +2766,59 @@ module o-ran-performance-management { uses start-and-end-time; uses tx-measurement-result-grouping; - description - "measurement result for the tx stats measurement per - measurement-object"; + list multiple-tx-measurement-result { + config false; + description + "Multiple measurement results of tx-measurement. + + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification. + + In addition, the O-RU shall always use one of the + + measurement-result-stats/tx-stats[measurement-object]/count or + measurement-result-stats/tx-stats[measurement-object]/tr-measured-result/count or + measurement-result-stats/tx-stats[measurement-object]/eaxc-measured-result/count + + schema-nodes to report a single tx-measurement. The O-RU should report its latest + tx-measurement available. This ensures O-DUs supporting earlier versions + of this specification can recover the measurement."; + + uses start-and-end-time; + uses tx-measurement-result-grouping; + } } + list shared-cell-stats { + if-feature feat:SHARED-CELL-STATS; + key "measurement-object"; + + description + "measurement result for the shared-cell measurement per measurement-object"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/shared-cell-measurement-objects/measurement-object"; + } + description + "measurement-object for the shared-cell measurement"; + } + + list multiple-shared-cell-measurement-result { + config false; + description + "Multiple measurement results of shared-cell-measurement."; + + uses start-and-end-time; + uses shared-cell-measurement-result-grouping; + + } + } + container epe-stats { + status deprecated; description - "container for the epe stats measurement"; + "container for the EPE stats measurement - deprecated because measurement object + isn't included"; uses start-and-end-time; uses epe-measurement-result-grouping; @@ -1143,9 +2826,150 @@ module o-ran-performance-management { } - description - "notification may contain measurement result for transceiver-stats - and/or rx-window-stats"; + list epe-statistics { + key "measurement-object"; + + description + "measurement result for the EPE stats measurement per + measurement-object"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/epe-measurement-objects/measurement-object"; + } + + description + "measurement-object for the EPE stats measurement"; + } + uses start-and-end-time; + uses epe-measurement-result-grouping; + + list multiple-epe-measurement-result { + config false; + description + "Multiple measurement results of epe-measurement. + + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification. + + In addition, the O-RU shall use the + + measurement-result-stats/epe-statistics[measurement-object]/epe-measurement-resultv2/ + + schema-nodes to report a single epe-measurement for a measurement-object. The O-RU + should report its latest epe-measurement available. This ensures O-DUs supporting earlier + versions of this specification can recover the measurement."; + + uses start-and-end-time; + uses epe-measurement-result-grouping; + } + + } + + list symbol-rssi-stats { + key "measurement-object"; + + description + "measurement result of symbol-rssi-measurement per measurement-object"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/symbol-rssi-measurement-objects/measurement-object"; + } + + description + "measurement-object for the symbol-rssi-measurement"; + } + + uses start-and-end-time; + uses symbol-rssi-measurement-result-grouping; + + list multiple-symbol-rssi-measurement-result { + config false; + description + "Multiple measurement results of symbol-rssi-measurement. + + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification. + + In addition, the O-RU shall always use one of the + + measurement-result-stats/symbol-rssi-stats[measurement-object]/ + + schema-nodes to report a single symbol-rssi measurement for a measurement-object. + The O-RU should report its latest symbol-rssi measurement available."; + + uses start-and-end-time; + uses symbol-rssi-measurement-result-grouping; + } + } + + list tssi-stats { + key "measurement-object"; + description + "Measurement result of tssi per measurement-object"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/tssi-measurement-objects/measurement-object"; + } + description + "measurement-object for the tx-array-carriers"; + } + + list tssi-measurement-result { + config false; + description + "Multiple measurement results of tssi-measurement. + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification."; + uses start-and-end-time; + uses tssi-measurement-result-grouping; + } + } + + list rssi-stats { + key "measurement-object"; + description + "Measurement result of rssi per measurement-object"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/rssi-measurement-objects/measurement-object"; + } + description + "measurement-object for the rx-array-carrier"; + } + list rssi-measurement-result { + config false; + description + "Multiple measurement results of rssi-measurement. + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification."; + uses start-and-end-time; + uses rssi-measurement-result-grouping; + } + } + + list tx-antenna-stats { + key "measurement-object"; + + description + "Measurement result of tx-antenna-measurement per measurement-object"; + leaf measurement-object { + type leafref { + path "/performance-measurement-objects/tx-antenna-measurement-objects/measurement-object"; + } + + description + "measurement-object for the tx-antenna-measurement"; + } + + list tx-antenna-measurement-result { + config false; + description + "Multiple measurement results of tx-antenna-measurement. + + The O-RU shall use this list to report one or more measurements per measurement-object in a single notification."; + + uses start-and-end-time; + uses tx-antenna-measurement-result-grouping; + } + + } + } // Top level container diff --git a/radio/fhi_72/mplane/yang/models/o-ran-processing-element.yang b/radio/fhi_72/mplane/yang/models/o-ran-processing-element.yang index fc930a0a81..015d14f2e2 100644 --- a/radio/fhi_72/mplane/yang/models/o-ran-processing-element.yang +++ b/radio/fhi_72/mplane/yang/models/o-ran-processing-element.yang @@ -23,6 +23,14 @@ module o-ran-processing-element { prefix "o-ran-int"; } + import o-ran-wg4-features { + prefix "feat"; + } + + import o-ran-usermgmt { + prefix "or-user"; + } + organization "O-RAN Alliance"; contact @@ -32,7 +40,7 @@ module o-ran-processing-element { "This module defines the YANG definitions for mapping of transport flows to processing elements. Three options are supported: i) virtual MAC based mapping - ii) MAC addrress + VLAN-ID based mapping + ii) MAC address + VLAN-ID based mapping iii) UDP/IP based mapping Copyright 2020 the O-RAN Alliance. @@ -61,16 +69,37 @@ module o-ran-processing-element { contributors may be used to endorse or promote products derived from this software without specific prior written permission."; - revision "2020-04-17" { - description - "version 3.0.0 + revision "2022-08-15" { + description + "version 10.0.0 - 1) added new enum SHARED-CELL-ETH-INTERFACE in - transport-session-type and new containers north-eth-flow and - south-eth-flow to enable Shared cell scenario."; + 1) introducing SHARED-ORU-MULTI-OPERATOR feature + 2) fixing constraints"; - reference "ORAN-WG4.M.0-v03.00"; - } + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2021-12-01" { + description + "version 8.0.0 + + 1) typographical corrections in descriptions. + 2) Add support for multiple transport-session-type per O-RU"; + + reference "ORAN-WG4.M.0-v08.00"; + } + + + revision "2020-04-17" { + description + "version 3.0.0 + + 1) added new enum SHARED-CELL-ETH-INTERFACE in + transport-session-type and new containers north-eth-flow and + south-eth-flow to enable Shared cell scenario."; + + reference "ORAN-WG4.M.0-v03.00"; + } revision "2019-07-03" { description @@ -78,7 +107,7 @@ module o-ran-processing-element { 1) added new leaf to enable O-RU to report the maximum number of transport flows it can support, e.g., due to restrictions on number - of VLAN-IDs when ethernet type transport is used."; + of VLAN-IDs when Ethernet type transport is used."; reference "ORAN-WG4.M.0-v01.00"; } @@ -99,16 +128,162 @@ module o-ran-processing-element { } // groupings - grouping pe-group { - leaf maximum-number-of-transport-flows { - type uint16 { - range "1..4094"; + grouping non-shared-cell-flow-group { + description "a grouping for non-shared cell O-RU flows"; + + container aliasmac-flow { + when "../../../transport-session-type = 'ALIASMAC-INTERFACE'"; + if-feature o-ran-int:ALIASMAC-BASED-CU-PLANE; + description "leafs for virtual mac type data flows"; + leaf ru-aliasmac-address { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:alias-macs"; + } + mandatory true; + description + "O-RU's alias MAC address used for alias MAC based flow"; + } + leaf vlan-id { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; + } + description + "O-RU's VLAN-ID used for alias MAC based flow"; + } + leaf o-du-mac-address { + type yang:mac-address; + mandatory true; + description + "O-DU's MAC address used for alias MAC based flow"; } - config false; - default 4094; - description - "The maximum number of transport flows that can be supported by an O-RU"; } + container eth-flow { + when "../../../transport-session-type = 'ETH-INTERFACE'"; + description "leafs for mac + vlan-id type data flows"; + leaf ru-mac-address { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address"; + } + mandatory true; + description + "O-RU's MAC address used for Ethernet based flow"; + } + leaf vlan-id { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; + } + mandatory true; + description + "O-RU's VLAN-ID used for Ethernet based flow"; + } + leaf o-du-mac-address { + type yang:mac-address; + mandatory true; + description + "O-DU's MAC address used for Ethernet based flow"; + } + } + container udpip-flow { + when "../../../transport-session-type = 'UDPIP-INTERFACE'"; + description "leafs for UDP/IP type data flows"; + choice address { + leaf ru-ipv4-address { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv4/ip:address/ip:ip"; + } + description "O-RU's IPv4 address"; + } + leaf ru-ipv6-address { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv6/ip:address/ip:ip"; + } + description "O-RU's IPv6 address"; + } + mandatory true; + description "choice of O-RU IPv4 or IPv6 address"; + } + leaf o-du-ip-address { + type inet:ip-address; + mandatory true; + description "O-DU's IP address"; + } + leaf ru-ephemeral-udp-port { + type inet:port-number; + mandatory true; + description + "ephemeral port used by O-RU"; + } + leaf o-du-ephemeral-udp-port { + type inet:port-number; + mandatory true; + description + "ephemeral port used by O-DU"; + } + leaf ecpri-destination-udp { + type inet:port-number; + mandatory true; + description "the well-known UDP port number used by eCPRI"; + // fixme - add in a default when allocated by IANA + } + } + } + + grouping shared-cell-flow-group { + description "a grouping for shared cell O-RU flows"; + + container north-eth-flow { + when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'"; + if-feature "SHARED_CELL"; + description "leafs for mac + vlan-id type data flows"; + leaf ru-mac-address { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address"; + } + description + "O-RU's MAC address used for Ethernet based flow"; + } + leaf vlan-id { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; + } + description + "O-RU's VLAN-ID used for Ethernet based flow"; + } + leaf north-node-mac-address { + type yang:mac-address; + description + "North-node's MAC address used for Ethernet based flow"; + } + } + container south-eth-flow { + when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'"; + if-feature "SHARED_CELL"; + description "leafs for mac + vlan-id type data flows"; + leaf ru-mac-address { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address"; + } + description + "O-RU's MAC address used for Ethernet based flow"; + } + leaf vlan-id { + type leafref { + path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; + } + description + "O-RU's VLAN-ID used for Ethernet based flow"; + } + leaf south-node-mac-address { + type yang:mac-address; + description + "south-node's MAC address used for Ethernet based flow"; + } + } + } + + grouping session-and-markings-group { + description "a grouping with transport session type and enhanced uplane markings"; + leaf transport-session-type { type enumeration { enum ETH-INTERFACE { @@ -158,7 +333,7 @@ module o-ran-processing-element { case ipv4 { when "(../../transport-session-type = 'UDPIP-INTERFACE')"; leaf upv4-dscp-name { - if-feature o-ran-int:UDPIP-BASED-CU-PLANE; + if-feature o-ran-int:UDPIP-BASED-CU-PLANE; type leafref { path "/if:interfaces/if:interface/ip:ipv4/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name"; } @@ -168,7 +343,7 @@ module o-ran-processing-element { case ipv6 { when "(../../transport-session-type = 'UDPIP-INTERFACE')"; leaf upv6-dscp-name { - if-feature o-ran-int:UDPIP-BASED-CU-PLANE; + if-feature o-ran-int:UDPIP-BASED-CU-PLANE; type leafref { path "/if:interfaces/if:interface/ip:ipv6/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name"; } @@ -178,6 +353,21 @@ module o-ran-processing-element { } } } + } + + grouping pe-group { + description "a grouping of processing elements"; + leaf maximum-number-of-transport-flows { + type uint16 { + range "1..4094"; + } + default 4094; + config false; + description + "The maximum number of transport flows that can be supported by an O-RU"; + } + uses session-and-markings-group; + list ru-elements { key "name"; description @@ -193,6 +383,17 @@ module o-ran-processing-element { This name may be used in fault management to refer to a fault source or affected object"; } + leaf sro-id { + if-feature feat:SHARED-ORU-MULTI-OPERATOR; + type leafref { + path "/or-user:users/or-user:user/or-user:sro-id"; + } + description + "The identity of a shared resource operator. When present, + indicates that the list entry corresponds to a processing element + associated with a shared resource operator where the sro-id identifies + the specific shared resource operator"; + } container transport-flow { description "container for the transport-flow used for CU plane"; @@ -202,154 +403,66 @@ module o-ran-processing-element { } description "the interface name "; } - container aliasmac-flow { - when "../../../transport-session-type = 'ALIASMAC-INTERFACE'"; - if-feature o-ran-int:ALIASMAC-BASED-CU-PLANE; - description "leafs for virtual mac type data flows"; - leaf ru-aliasmac-address { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:alias-macs"; - } - mandatory true; - description - "O-RU's alias MAC address used for alias MAC based flow"; - } - leaf vlan-id { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; - } - description - "O-RU's VLAN-ID used for alias MAC based flow"; - } - leaf o-du-mac-address { - type yang:mac-address; - mandatory true; - description - "O-DU's MAC address used for alias MAC based flow"; + uses non-shared-cell-flow-group; + uses shared-cell-flow-group; + + } + } + list additional-transport-session-type-elements { + if-feature "feat:MULTIPLE-TRANSPORT-SESSION-TYPE"; + key transport-session-type; + + description + "Added to support multiple transport-session-type per O-RU, + it is always assumed that /processing-elements/ru-elements/ is configured with the first type of transport, + and /processing-element/additional-transport-session-elements/ru-elements/ is configured with the other types of transport. + If the O-RU is configured for shared-cell, this list will not be used. An O-RU shall reject any configuration + with a list entry with transport-session-type set to SHARED-CELL-ETH-INTERFACE"; + + uses session-and-markings-group; + + list ru-elements { + key "name"; + description + "the list of transport definitions for each processing element"; + leaf name { + type string { + length "1..255"; } + description + "A name that is unique across the O-RU that identifies a processing + element instance. + + This name may be used in fault management to refer to a fault source + or affected object"; } - container eth-flow { - when "../../../transport-session-type = 'ETH-INTERFACE'"; - description "leafs for mac + vlan-id type data flows"; - leaf ru-mac-address { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address"; - } - mandatory true; - description - "O-RU's MAC address used for Ethernet based flow"; - } - leaf vlan-id { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; - } - mandatory true; - description - "O-RU's VLAN-ID used for Ethernet based flow"; - } - leaf o-du-mac-address { - type yang:mac-address; - mandatory true; - description - "O-DU's MAC address used for Ethernet based flow"; + leaf sro-id { + if-feature feat:SHARED-ORU-MULTI-OPERATOR; + type leafref { + path "/or-user:users/or-user:user/or-user:sro-id"; } + description + "The identity of a shared resource operator. When present, + indicates that the list entry corresponds to a processing element + associated with a shared resource operator where the sro-id identifies + the specific shared resource operator"; } - container udpip-flow { - when "../../../transport-session-type = 'UDPIP-INTERFACE'"; - description "leafs for UDP/IP type data flows"; - choice address { - leaf ru-ipv4-address { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv4/ip:address/ip:ip"; - } - description "O-RU's IPv4 address"; - } - leaf ru-ipv6-address { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv6/ip:address/ip:ip"; - } - description "O-RU's IPv6 address"; - } - mandatory true; - description "choice of O-RU IPv4 or IPv6 address"; - } - leaf o-du-ip-address { - type inet:ip-address; - mandatory true; - description "O-DU's IPv address"; - } - leaf ru-ephemeral-udp-port { - type inet:port-number; - mandatory true; - description - "ephemeral port used by O-RU"; - } - leaf o-du-ephemeral-udp-port { - type inet:port-number; - mandatory true; - description - "ephemeral port used by O-DU"; - } - leaf ecpri-destination-udp { - type inet:port-number; - mandatory true; - description "the well known UDP port number used by eCPRI"; - // fixme - add in a default when allocated by IANA - } - } - container north-eth-flow { - when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'"; - if-feature "SHARED_CELL"; - description "leafs for mac + vlan-id type data flows"; - leaf ru-mac-address { + container transport-flow { + description + "container for the transport-flow used for CU plane"; + leaf interface-name { type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address"; + path "/if:interfaces/if:interface/if:name"; } - description - "O-RU's MAC address used for Ethernet based flow"; - } - leaf vlan-id { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; - } - description - "O-RU's VLAN-ID used for Ethernet based flow"; - } - leaf north-node-mac-address { - type yang:mac-address; - description - "North-node's MAC address used for Ethernet based flow"; - } - } - container south-eth-flow { - when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'"; - if-feature "SHARED_CELL"; - description "leafs for mac + vlan-id type data flows"; - leaf ru-mac-address { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address"; - } - description - "O-RU's MAC address used for Ethernet based flow"; - } - leaf vlan-id { - type leafref { - path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id"; - } - description - "O-RU's VLAN-ID used for Ethernet based flow"; - } - leaf south-node-mac-address { - type yang:mac-address; - description - "south-node's MAC address used for Ethernet based flow"; + description "the interface name "; } + uses non-shared-cell-flow-group; } } } } -// top level container +// top-level container container processing-elements { description diff --git a/radio/fhi_72/mplane/yang/models/o-ran-uplane-conf.yang b/radio/fhi_72/mplane/yang/models/o-ran-uplane-conf.yang index 16fbaf3335..c473e0e14c 100644 --- a/radio/fhi_72/mplane/yang/models/o-ran-uplane-conf.yang +++ b/radio/fhi_72/mplane/yang/models/o-ran-uplane-conf.yang @@ -13,12 +13,34 @@ module o-ran-uplane-conf { import o-ran-module-cap { prefix "mcap"; - revision-date 2020-08-10; } import o-ran-compression-factors { prefix "cf"; - revision-date 2020-08-10; + } + + import o-ran-wg4-features { + prefix "feat"; + } + + import ietf-hardware { + prefix "hw"; + } + + import o-ran-hardware { + prefix "or-hw"; + } + + import o-ran-usermgmt { + prefix "or-user"; + } + + import o-ran-common-yang-types { + prefix "o-ran-cmn"; + } + + import o-ran-delay-management { + prefix "or-dm"; } organization "O-RAN Alliance"; @@ -30,7 +52,7 @@ module o-ran-uplane-conf { "This module defines the module capabilities for the O-RAN Radio Unit U-Plane configuration. - Copyright 2020 the O-RAN Alliance. + Copyright 2024 the O-RAN Alliance. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -56,6 +78,198 @@ module o-ran-uplane-conf { contributors may be used to endorse or promote products derived from this software without specific prior written permission."; + revision "2024-08-12" { + description + "version 16.0.0 + + 1) add up-link performance improvement functionality, including DMRX-BF-EQ and DMS-BF-NEQ features + 2) Introduction of capabilities and configuration for SE27 O-DU controlled dimensionality reduction + 3) add support for se-20-multi-sd-punc-pattern + 4) add support for VSWR thresholds"; + + reference "ORAN-WG4.M.0-v16.00"; + } + + revision "2024-04-15" { + description + "version 15.0.0 + + 1) add support for sending prgSize in SE-21 with ST 5 and ST6. + 2) add support for for beamforming list and delay profiles(s) per endpoint. + 3) add support for user-group optimization. + 4) add support for multiple beamid tables. + 5) support pass band for filterindex09 per scs. + 6) support for M-plane based TRX control for Network Energy Saving. + 7) clarified cp-type is not applicable for ST3 or ST0 + 8) Changed description of max-beams-per-symbol/slot, so they refer to + 'different beamId values' instead of 'beams' + 9) added new leafs called max-beams-per-symbol-multiple-beamid-tables + and max-beams-per-slot-multiple-beamid-tables"; + + reference "ORAN-WG4.M.0-v15.00"; + } + + revision "2023-12-11" { + description + "version 14.0.0 + + 1) Corrected the configurable-tdd-pattern-supported leafref to point + to static-low-level-tx-endpoints + 2) Clarify reference for supported-frame-structures + 3) introduce max-prb-blks-per-sec-ext-23 and se-23-prb-block-mode-supported + 4) Introduction of new energy saving sub-use case - Data Layer control"; + + reference "ORAN-WG4.M.0-v14.00"; + } + + revision "2023-08-14" { + description + "version 13.0.0 + + 1) clarification for I/Q bitwidth parameter + 2) clarification of ul-fft-sampling-offset parameter + 3) adding availability status to carrier operational data and notifications + 4) ability to disable sequence number checking + 5) Introduction of TRX-Control and Advanced Sleep Mode for network energy savings"; + + reference "ORAN-WG4.M.0-v13.00"; + } + + revision "2023-04-10" { + description + "version 12.0.0 + + 1) Typographical corrections + 2) NB-IoT introduction + 3) clarify PRACH repetitions + 4) support for non-scheduled-ueid + 5) continuity bit information in Section Extension 11 + 6) U-Plane Processing Limits"; + + reference "ORAN-WG4.M.0-v12.00"; + } + + revision "2022-12-05" { + description + "version 11.0.0 + + 1) PRB range limit for SE 12 and HP section + 2) Introduction of PRB ranges + 3) uplane-only-dl-mode-enable + 4) Deprecation of power-related capabilities and addition of min-gain + 5) se 23 max mplane limits + 6) support Section Type 4 and associated commands"; + + reference "ORAN-WG4.M.0-v11.00"; + } + + revision "2022-08-15" { + description + "version 10.0.0 + + 1) clarified description statements for representative-t/rx-eaxc-id + 2) clarified description statements for max-num-t/rx-eaxc-ids-per-group + 4) clarified description statements for component carrier + 5) style guide corrections + 6) introduction of O-RU connector functionality + 7) fixing constraints + 8) introducing new feature for ACK NACK feedback + 9) added SHARED-ORU-MULTI-OPERATOR anf SHARED-ORU-MULTI-ODU features"; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2022-04-18" { + description + "version 9.0.0 + + 1) Descriptions fixed for max-beam-updates-per-slot / max-beam-updates-per-slot + 2) Added references to CUS-Plane spec for parameters 'frame-structure' and + 'supported-frame-structures' + 3) clarified max-beams-per-symbol, max-beams-per-slot, max-beam-updates-per-slot, + max-beam-updates-per-symbol parameters + 4) Clarification of cp-length and cp-length-other + 5) deprecation of rw-type and rw-duplex-scheme"; + + reference "ORAN-WG4.M.0-v09.00"; + } + + revision "2021-12-01" { + description + "version 8.0.0 + + 1) Various descriptions corrected and/or clarified + 2) Configuration for Beamforming weights were added together with changes and updates to compressions + 3) Added new leaf node 'beam-update-contention-control-limits-required' to 'endpoint-types' + to indicate endpoint capability to support beam update contention control processing limits. + 4) Added instance of 'beam-update-contention-control-limits' to 'endpoint-types'. + 5) Added new leaf node boolean flag 'beam-update-contention-control-enabled' for O-DU to indicate + support of feature BEAM-UPDATE-CONTENTION-CONTROL feature. + 6) deprecate 'channel-information-iq-bitwidth' , and define a new parameter + 'channel-information-bitwidth' under the container 'compression' + 7) add capability and configuration for channel information PRB granularity. + 8) Add support for multiple transport-session-type per O-RU. + 9) add capability and configuration for channel information compression. + 10) deprecate 'channel-information-iq-bitwidth' , and define a new parameter + 'channel-information-bitwidth' under the container 'compression'"; + + reference "ORAN-WG4.M.0-v08.00"; + } + + revision "2021-07-26" { + description + "version 7.0.0 + + 1) Added new grouping 'per-cplane-message-limits' containing params to limit + per C-Plane packet processing when CPLANE-MESSAGE-PROCESSING-LIMITS feature is + supported by O-RU and used by O-DU. + 2) Added new leaf node 'cplane-message-processing-limits-required' to 'endpoint-types' + to indicate endpoint capability to support C-Plane message processing limits. + 3) Added instances of 'per-cplane-message-limits' to 'endpoint-types' and + 'endpoint-capacity-sharing-groups'. + 4) Added new leaf node to low-level-tx/rx-endpoint 'cplane-message-processing-limits-enabled' + for O-DU to configure support for C-Plane limits + 5) Added t-da-offset and t-au-offset for external antenna support + 6) Added Channel IQ bitwidth for ST6 + 7) Added ordered-by user to leaf-list member-tx-eaxc-id and leaf-list member-rx-eaxc-id + 8) Added new PRACH formats + 9) Ensuring beam-ids can only be 15 bits + 10) Clarify mixed numerology restrictions"; + + reference "ORAN-WG4.M.0-v07.00"; + } + + + revision "2021-03-22" { + description + "version 6.0.0 + + 1) typographical corrections in descriptions. + 2) Updates to transmission window control. + 3) Introduces to existing grouping 'endpoint-section-capacity' two new leaf nodes 'max-uplane-section-header-per-symbol' and + 'max-uplane-section-header-per-slot' to limit U-Plane data section header addition/parsing. + 4) deprecated parameter 'max-remasks-per-section-id' since it is duplicate of leaf node 'max-control-sections-per-data-section'. + 5) introduces new leaf nodes 'max-beams-updates-per-slot' and ''max-beams-updates-per-symbol' + to grouping 'endpoint-beam-capacity' + 6) added new SRS features: + STATIC-TRANSMISSION-WINDOW-CONTROL + DYNAMIC-TRANSMISSION-WINDOW-CONTROL + UNIFORMLY-DISTRIBUTED-TRANSMISSION + ORDERED-TRANSMISSION + INDEPENDENT-TRANSMISSION-WINDOW-CONTROL"; + + reference "ORAN-WG4.M.0-v06.00"; + } + + revision "2020-12-10" { + description + "version 5.0.0 + + 1) introduces new coupling method coupling-via-frequency-and-time-with-priorities-optimized + 2) introduces new max-highest-priority-sections-per-slot parameter"; + + reference "ORAN-WG4.M.0-v05.00"; + } revision "2020-08-10" { description @@ -209,6 +423,18 @@ module o-ran-uplane-conf { description "5GNR PRACH Preamble format C2"; } + enum LTE-NB0-a { + description + "LTE Narrowband PRACH format 0-a"; + } + enum LTE-NB1-a { + description + "LTE Narrowband PRACH format 1-a"; + } + enum LTE-NB2 { + description + "LTE Narrowband PRACH format 2"; + } } description @@ -233,6 +459,270 @@ module o-ran-uplane-conf { description "Type definition for polarisations"; } + typedef beamforming-method-type { + type enumeration { + enum NOBF { + description + "No beamforming."; + } + enum PDBF { + description + "Predefined-beam beamforming."; + } + enum WDBF { + description + "Weight-based dynamic beamforming (based on real-time-updated weights)."; + } + enum ABBF { + description + "Attribute-based dynamic beamforming (based on real-time-updated beam attributes)."; + } + enum CIBF { + description + "Channel-information-based beamforming."; + } + enum DMRS_BF_EQ { + description + "DMRS-based beamforming with equalization."; + } + enum DMRS_BF_NEQ { + description + "DMRS-based beamforming without equalization."; + } + } + description + "Type definition for beamforming method."; + } + + typedef symb-reorder-capability { + type enumeration { + enum PER-TX-WIN-SYMB-REORDER-WITH-DMRS-SENDING { + description + "per-window symbol reordering when sending of port-reduced DMRS data is enabled, + please refer to clause 7.7.25.2 of the CUS-Plane Specification."; + } + enum PER-TX-WIN-SYMB-REORDER-WITHOUT-DMRS-SENDING { + description + "per-window symbol reordering when sending of port-reduced DMRS data is not enabled, + please refer to clause 7.7.25.2 of the CUS-Plane Specification."; + } + enum PER-SECTION-TX-WINDOW-REASSIGNMENT { + description + "per-section tx-window reassignment, please refer to clause 7.7.25.3 of the CUS-Plane + Specification."; + } + } + description + "Type definition for symbol reordering method supported."; + } + typedef symb-reorder-method { + type enumeration { + enum PER-TX-WIN-SYMB-REORDERG { + description + "per-window symbol reordering, + please refer to clause 7.7.25.2 of the CUS-Plane Specification."; + } + enum PER-SECTION-TX-WINDOW-REASSIGNMENT { + description + "per-section tx-window reassignment, please refer to clause 7.7.25.3 of the CUS-Plane + Specification."; + } + } + description + "Type definition for symbol reordering method configured."; + } + typedef up-SymbolId-type { + type enumeration { + enum OVER-AIR-SYMBOL-NUMBER { + description + "U-plane symbol Id interpretation as on-air symbol number for symbol reordering."; + } + enum TRANSMISSION-WINDOW-NUMBER { + description + "U-plane symbol Id interpretation as transmission window number for symbol reordering."; + } + } + description + "Type definition for symbol reordering symbol Id interpretation capability."; + } + + typedef user-group-self-assembly-mode { + type enumeration { + enum SELF-ASSEMBLY-WITH-GROUP-ID { + description + "The mode in which the O-RU is capable of assembling user groups using 'usrGroupId' and + 'usrGroupSize' fields in SE-24."; + } + enum SELF-ASSEMBLY-WITHOUT-GROUP-ID { + description + "The mode in which O-RU is capable of assembling user groups without using 'usrGroupId' and 'usrGroupSize' + fields in SE-24, but instead relying on PRB ranges of all UE layers overall all section for assembling + user groups."; + } + } + description + "Possible values for user group self assembly modes that the O-RU can support."; + } + + typedef rrm-meas-types { + type enumeration { + enum MEAS-UE-TAE { + value 0; + description + "UE timing advance error per UE, per slot"; + } + enum MEAS-UE-LAYER-POWER { + value 1; + description + "UE layer signal power per layer,per slot"; + } + enum MEAS-UE-FREQ-OFFSET { + value 2; + description + "UE frequency offset per UE, per slot"; + } + enum MEAS-IPN-ALLOC { + value 3; + description + "Interference plus Noise for allocated PRBs,per slot or per DMRS symbol group"; + } + enum MEAS-IPN-UNALLOC { + value 4; + description + "Interference plus Noise for unallocated PRBs, per slot or per set of symbols in a slot"; + } + enum MEAS-ANT-DMRS-SNR { + value 5; + description + "DMRS Signal to Noise Ratio per antenna, per layer. "; + } + } + description + "RRM measurement types, refer to CUS spec table 9.2.1-1 for details"; + } + + grouping transmission-buffering-capacity { + description + "UL U-plane buffering capacity available for scheduled transmission of UL U-plane messages"; + + list transmission-buffering-capacity { + description + "Buffering capacity for specific IQ format. + If the list does not contain an entry for particular IQ format than endpoint + or group of endpoints then buffering capacity for this IQ format is + max-buffered-prbs = 0 and max-buffered-symbols = 0."; + + uses cf:compression-details; + + leaf max-buffered-prbs { + type uint32; + description + "Max number of PRBs (for IQ format given in compression-details) that can be buffered by an endpoint + or buffered collectively by group of endpoints sharing capacity. This is divided between symbols buffered"; + } + + leaf max-buffered-symbols { + type uint32; + description + "Max number of symbols (for IQ format given in compression-details) that can be buffered by an endpoint + or buffered collectively by group of endpoints sharing capacity"; + } + } + } + + grouping mplane-trx-control-supp-antenna-masks { + description + "A grouping containing list of antenna masks supported by the O-RU"; + + list mplane-supported-trx-control-masks { + key "index"; + description + "List of supported M-Plane controlled TRX control masks."; + + leaf index { + type uint8; + description + "Index to the list of antenna masks"; + } + + leaf antenna-mask { + type binary; + description + "M-Plane controlled O-RU supported antenna mask value."; + } + } + } + grouping array-config-group { + description + "This group represents configuration for supported arrays, + e.g. mplane trx control mask for supported arrayes"; + + list tx-array-antenna-mask-config { + if-feature feat:MPLANE-TRX-CONTROL; + key array-name; + description + "List of mplane configured trx antenna mask for supported arrays"; + + leaf array-name { + type leafref { + path "/user-plane-configuration/tx-arrays/name"; + require-instance false; + } + description + "Unique name of tx-array. "; + } + leaf antenna-bitmask { + type binary; + description + "If mplane-supported-trx-control-masks list is not advertised as part of capability for the referred [tr]x-array,parameter antenna-bitmask may be used for configuration. + The parameter antenna-bitmask-index shall not be used for configuration. + The antenna mask contains as many binary values as number of array elements associated + with respective tx or rx-array. Value of '1' indicates antenna element shall be + kept active and value of '0' indicates antenna element should be turned inactive. + Refer clause 20.3.2 of M-Plane specification."; + } + leaf antenna-bitmask-index { + type uint8; + description + "If mplane-supported-trx-control-masks list is advertised as part of capability for the referred [tr]x-array, + the parameter antenna-bitmask-index may be used for configuration to refer to the index of advertised mplane-supported-trx-control-masks. + The parameter antenna-bitmask shall not be used for configuration."; + } + } + list rx-array-antenna-mask-config { + if-feature feat:MPLANE-TRX-CONTROL; + key array-name; + description + "List of mplane configured trx antenna mask for supported arrays"; + leaf array-name { + type leafref { + path "/user-plane-configuration/rx-arrays/name"; + require-instance false; + } + description + "Unique name of rx-array. "; + } + + leaf antenna-bitmask { + type binary; + description + "If mplane-supported-trx-control-masks list is not advertised as part of capability for the referred [tr]x-array,parameter antenna-bitmask may be used for configuration. + The parameter antenna-bitmask-index shall not be used for configuration. + The antenna mask contains as many binary values as number of array elements associated + with respective tx or rx-array. Value of '1' indicates antenna element shall be + kept active and value of '0' indicates antenna element should be turned inactive. + Refer clause 20.3.2 of M-Plane specification."; + } + leaf antenna-bitmask-index { + type uint8; + description + "If mplane-supported-trx-control-masks list is advertised as part of capability for the referred [tr]x-array, + the parameter antenna-bitmask-index may be used for configuration to refer to the index of advertised mplane-supported-trx-control-masks. + The parameter antenna-bitmask shall not be used for configuration."; + } + } + } + grouping general-config { description "a group for general configuration"; @@ -243,8 +733,8 @@ module o-ran-uplane-conf { type boolean; default false; description - "Informs if regularizationfactor in section extension is configured(true) or not(false), this - leaf indicates whether the O-DU will send the regularizationfactor in section extension. + "Informs if regularization factor in section extension is configured(true) or not(false), this + leaf indicates whether the O-DU will send the regularization factor in section extension. If the O-RU does not support regularization-factor-se-supported in o-ran-module-cap.yang, this leaf is ignored."; @@ -260,7 +750,204 @@ module o-ran-uplane-conf { for all UL and DL C/U plane data flows. If little endian byte order is NOT supported, this node is ignored - (and the default bigendian byte order used)"; + (and the default big endian byte order used)"; + } + + leaf uplane-only-dl-mode-enable { + if-feature feat:UPLANE-ONLY-DL-MODE; + type boolean; + default false; + description + "If set to true, enable IQ data transfer without C-Plane in DL for all + endpoints as specified in the CUS specification clause 8.2.2."; + } + + leaf st4-for-time-domain-beamforming-weights-enabled { + if-feature feat:ST4-SLOT-CONFIG-MSG-SUPPORT; + type boolean; + default false; + description + "If O-RU indicates support for Section Type 4 command 'TIME_DOMAIN_BEAM_CONFIG' , O-DU may + configure the O-RU to use Section Type 4 TIME_DOMAIN_BEAM_CONFIG command by setting this + flag to 'true'. In which case, O-DU shall use only Section Type 4 TIME_DOMAIN_BEAM_CONFIG + for specifying time-domain beam information. refer to clause 12.4.3.4.4 of CUS-Plane spec."; + } + + leaf seq-id-checking-disabled { + if-feature feat:SEQ-ID-CHECKING-CONFIGURABLE; + type boolean; + default false; + description + "When the parameter has value true, sequence number checking is disabled."; + } + + leaf multiple-beamId-tables-support-enabled { + if-feature feat:MULTIPLE-BEAMID-TABLES-SUPPORTED; + type boolean; + default false; + description + "When the parameter has value true, O-DU will be able to use multiple beamId table capability of O-RU. + O-DU shall be able to associate specific [tr]x-array-carrier with specific beamId table indexes advertised + which are advertised in 'tx-array-beamId-table-indexes/rx-array-beamId-table-indexes' as part of tx-array + and rx-array capabilities."; + } + + leaf-list energy-sharing-groups-disabled { + if-feature feat:MPLANE-DATA-LAYER-CONTROL; + type uint8; + description + "A list that indicates which energy sharing groups are currently switched off due to data layer control energy saving. + By default this list is empty and means that no data layer control energy saving is currently ongoing. + This value shall be specific values from the list of 'energy-sharing-group-id' advertised by O-RU + inside respective static-low-level-[tr]x-endpoints."; + } + + leaf config-symb-reorder-method { + if-feature "feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ"; + type symb-reorder-method; + description + "Indicated which symbol reordering method is used. If it's not configured, O-RU shall + operate with natural order."; + } + leaf config-symb-reorder-upSymbId-type { + when "../config-symb-reorder-method = 'PER-TX-WIN-SYMB-REORDERG'"; + if-feature "feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ"; + type leafref { + path "../../endpoint-types/supported-symb-reorder-capabilities/up-symbolId-type-supported"; + require-instance false; + } + description + "Indicated which config-symb-reorder-upSymbId-type intended to be used for symbol reordering, + i.e. either 'on-air symbol number' or 'transmission window number' to the O-RU. + When 'per-section tx-window reassignment' method is used, + the U-Plane symbolId interpretation shall be configured as 'on-air symbol number' + Please refer to clause 7.7.25 in CUS plane for details."; + } + + leaf ueid-persistence-enabled { + if-feature feat:UEID-PERSISTENCE; + type boolean; + description + "Indicates if ueId persistance over multiple slots is enabled. + See CUS-Plane clause 7.7.24.10."; + } + + leaf ueid-layer-bits-configured { + if-feature "feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ"; + type uint8; + description + "This parameter specified the number of bits configured by the O-DU for specifying ueid layers."; + } + + container vswr-thresholds{ + if-feature feat:CONFIGURABLE-VSWR-THRESHOLDS; + description "VSWR thresholds parameters."; + container default-vswr-thresholds { + config false; + leaf default-vswr-minor-threshold { + type decimal64 { + fraction-digits 1; + } + description + "Default VSWR minor threshold."; + } + leaf default-vswr-major-threshold { + type decimal64 { + fraction-digits 1; + } + description + "Default VSWR major threshold."; + } + description + "Default VSWR thresholds used by this O-RU"; + } + container vswr-thresholds-range { + config false; + leaf min { + type decimal64 { + fraction-digits 1; + } + description + "The lowest allowed VSWR threshold"; + } + leaf max { + type decimal64 { + fraction-digits 1; + } + description + "The highest allowed VSWR threshold"; + } + description + "VSWR thresholds shall be configured within this range"; + } + container configurable-vswr-thresholds{ + description "vswr monitoring parameters to be configured by O-RU Controller"; + leaf global-vswr-monitoring-trigger-power { + type decimal64 { + fraction-digits 1; + } + units dBm; + description + "Power threshold for enabling VSWR monitoring."; + } + leaf global-vswr-minor-threshold { + type decimal64 { + fraction-digits 1; + } + description + "configured VSWR minor threshold which will be used to trigger an alarm."; + } + leaf global-vswr-major-threshold { + type decimal64 { + fraction-digits 1; + } + description + "configured VSWR major threshold which will be used to trigger an alarm."; + } + list vswr-threshold-per-tx-array-element { + key "tx-array-name array-element"; + description + "individual vswr-thresholds configuration which will be applied to each tx array element"; + leaf tx-array-name { + type leafref { + path "/o-ran-uplane-conf:user-plane-configuration/o-ran-uplane-conf:tx-arrays/o-ran-uplane-conf:name"; + require-instance false; + } + description + "tx-array where the configured vswr thresholds will be applied"; + } + leaf array-element { + type uint16; + description + "the array-element number of the tx-array if there are multiple array-elements of the tx-array."; + } + leaf vswr-minor-threshold { + type decimal64 { + fraction-digits 1; + } + description + "configured VSWR minor threshold of the tx-array-element which will be used to trigger an alarm. + It shall override the configured global-vswr-minor-tresholds."; + } + leaf vswr-major-threshold { + type decimal64 { + fraction-digits 1; + } + description + "configured VSWR major threshold of the tx-array-element which will be used to trigger an alarm. + It shall override the configured global-vswr-major-tresholds."; + } + leaf vswr-monitoring-trigger-power { + type decimal64 { + fraction-digits 1; + } + units dBm; + description + "Power threshold for enabling VSWR monitoring. + it shall override the configured global-vswr-monitoring-trigger-power."; + } + } + } } } } @@ -389,15 +1076,21 @@ module o-ran-uplane-conf { description "Coupling via frequency and time with priorities. Can be used when coupling-via-frequency-and-time-with-priorities = true in o-ran-module-cap.yang"; } + enum FREQUENCY_AND_TIME_WITH_PRIORITIES_OPTIMIZED { + description "Coupling via frequency and time with priorities optimized. Can be used when + coupling-via-frequency-and-time-with-priorities-optimized = true in o-ran-module-cap.yang"; + } } default NORMAL; description "Method of coupling between C-Plane and U-Plane messages; see methods of coupling - of C-Plane and U-Plane in CUS-Plane specification"; + of C-Plane and U-Plane in CUS-Plane specification. If an O-RU doesn't support the + necessary capability as defined in o-ran-module-cap.yang, the O-RU shall respond + with rpc-error including an error-message describing the error condition"; } } - grouping eaxc { + grouping eaxc { description "One eAxC identifier (eAxC ID) comprises a band and sector identifier (BandSector_ID), a component-carrier identifier (CC_ID) and a @@ -409,11 +1102,11 @@ module o-ran-uplane-conf { Bit allocation is subdivided as follows: * O_DU_Port_ID: Used to differentiate processing units at O-DU * BandSector_ID: Aggregated cell identifier - * CC_ID: distinguishes Carrier Components + * CC_ID: distinguishes Component Carriers * RU_Port_ID: Used to differentiate spatial streams or beams on the O-RU The bitwidth of each of the above fields is variable this model is supposed to check - if we are occpying bits continuously but we do not have to occupy all 16 bits"; + if we are occupying bits continuously, but we do not have to occupy all 16 bits"; leaf o-du-port-bitmask { @@ -486,7 +1179,7 @@ module o-ran-uplane-conf { } units Meter; - description "Average distance between centers of nearby AE in horizontal direction (in array coordinates system)"; + description "Average distance between centres of nearby AE in horizontal direction (in array coordinates system)"; } leaf vertical-spacing{ @@ -495,7 +1188,7 @@ module o-ran-uplane-conf { } units Meter; - description "Average distance between centers of nearby AE in vertical direction (in array coordinates system)"; + description "Average distance between centres of nearby AE in vertical direction (in array coordinates system)"; } container normal-vector-direction { @@ -580,6 +1273,26 @@ module o-ran-uplane-conf { array is serving for. Intended use is to deal with multiband solutions."; } + + list related-o-ru-connectors { + key name; + + leaf name { + type leafref { + path '/hw:hardware/hw:component/hw:name'; + } + must "derived-from-or-self(deref(current())/../hw:class, 'or-hw:O-RU-ANTENNA-CONNECTOR')"; + description + "Referenced name of O-RU connector used by the antenna array."; + } + leaf-list array-element-id { + type uint16; + description + "Identifiers of array element(s) related to specific O-RU connector. Allowed values and semantic - as per CUS-Plane spec, clause 'Identification and Ordering of Array Elements'"; + } + description + "List of unique names that identify instances of O-RU's connectors the external [tr]x-array is reachable through."; + } } grouping array-choice { @@ -591,7 +1304,7 @@ module o-ran-uplane-conf { } description - "Leafref to tx array if such is choosen"; + "Leafref to tx array if such is chosen"; } } case rx { @@ -601,7 +1314,7 @@ module o-ran-uplane-conf { } description - "Leafref to rx array if such is choosen"; + "Leafref to rx array if such is chosen"; } } description @@ -619,10 +1332,7 @@ module o-ran-uplane-conf { type uint8; description - "This parameter defines the frame structure. The first 4 bits define the FFT/iFFT size - being used for all IQ data processing related to this message. - The second 4 bits define the sub carrier spacing as well as the number of slots per 1ms sub-frame - according to 3GPP TS 38.211, taking for completeness also 3GPP TS 36.211 into account"; + "This parameter provides value of frame structure. For semantics and allowed values see CUS-Plane Specification, clause 'frameStructure (frame structure)'"; } leaf cp-type { @@ -639,7 +1349,10 @@ module o-ran-uplane-conf { } description - "Provides type of CP (cyclic prefix) if section type 3 is not used or type of CP cannot be determined from cpLength."; + "Provides type of CP (cyclic prefix). + + For section type 3 or section type 0, element and the value of this leaf shall be ignored by the O-RU. In such circumstances, + please refer to clause 7.5.2.14 cpLength (cyclic prefix length) of the CUS-Plane Specification."; } leaf cp-length { @@ -647,8 +1360,15 @@ module o-ran-uplane-conf { units Ts; mandatory true; description - "Used for symbol 0 for NR & LTE, and symbol 7*2u for NR. - See CUS-plane"; + "Provides length of CP used for the first symbol after subframe boundary or half-subframe boundary. + See CUS-plane + + If a section type 3 is used in C-plane messages addressed to the endpoint, then O-RU takes length of CP from + C-Plane cpLength Information Element and the value of this leaf shall be ignored by the O-RU. See cpLength (cyclic prefix length) + in CUS-Plane for details. + + If a static configuration (see static-prach-configurations) is applicable to the endpoint, then O-RU takes + length of CP from M-Plane cp-length leaf in static-prach-configurations and the value of this leaf shall be ignored by the O-RU."; } leaf cp-length-other { @@ -656,14 +1376,26 @@ module o-ran-uplane-conf { units Ts; mandatory true; description - "Used for other symbols than by cp-length above"; + "Provides length of CP used for symbols other than provided by cp-length. + + If a section type 3 is used in C-plane messages addressed to the endpoint, then O-RU takes length of CP from + C-Plane cpLength Information Element and the value of this leaf shall be ignored by the O-RU. See cpLength (cyclic prefix length) + in CUS-Plane for details. + + If a static configuration (see static-prach-configurations) is applicable to the endpoint, then O-RU takes + length of CP from M-Plane cp-length leaf in static-prach-configurations and the value of this leaf shall be ignored by the O-RU."; } leaf offset-to-absolute-frequency-center { type int32; mandatory true; description - "This provides value of freqOffset to be used if section type 3 is not used. See freqOffset in CUS-plane."; + "This provides value of freqOffset to be used if section type 3 is not used. See freqOffset in CUS-plane. + offset-to-absolute-frequency-center defines the relative spacing between the centre of RE#0 of RB#0 to the center-of-channel-bandwidth. + If offset-to-absolute-frequency-center for NR with SCS=15kHz is odd, + it implies that 7.5kHz shift as indicated by the 3GPP parameter frequencyShift7p5khz for UL is applied, + which means enable the NR UL transmission with a 7.5 kHz shift to the LTE raster, as defined in 3GPP TS 38.331. + When type (in tx/rx-array-carrier) is DSS, 'offset-to-absolute-frequency-center' indicates the 1st RE of 1st RB of NR."; } list number-of-prb-per-scs { @@ -684,23 +1416,53 @@ module o-ran-uplane-conf { description "Determines max number of PRBs that will be used in all sections per one symbol. This is affecting allocation of resources to endpoint. Value shall not exceed constrains - defined by max-prb-per-symbol of endpoint type. In addition sum (over all used epoints - within a group of endpoints sharing resources) of number-of-prb rounded up to + defined by max-prb-per-symbol of endpoint type. In addition, sum (over all used endpoints + within a group of endpoints sharing resources) of number-of-prb rounded up to the nearest value from prb-capacity-allocation-granularity shall not exceed max-prb-per-symbol of the group."; } } } + grouping occupied-bandwidth { + description + "Grouping describing occupied bandwidth of a carrier."; + + container occupied-bandwidth { + description + "Container describing occupied bandwidth of a carrier. + + Information conveyed in this container can be used to determine minimum filter bandwidth in case + it cannot be fully determined basing on the carrier bandwidth itself e.g., when NB-IoT carriers + are allocated in the carrier's guard band."; + + leaf lower-bound { + type uint64; + units Hz; + + description + "Lower bound of the filter pass bandwidth of a carrier."; + } + + leaf upper-bound { + type uint64; + units Hz; + + description + "Upper bound of the filter pass bandwidth of a carrier."; + } + } + } + grouping tx-common-array-carrier-elements { description - "This grouping containes all common parameters for tx-array-carriers and rx-array-carriers"; + "This grouping contains all common parameters for tx-array-carriers and rx-array-carriers"; leaf absolute-frequency-center { type uint32; - mandatory true; + status deprecated; description - "Absolute Radio Frequency Channel Number - indirectly indicates RF center carrier frequency of signal. - Reflected in arfcn."; + "deprecated in version 5.0.0 and replaced with offset-to-absolute-frequency-center + and common FREF translated from absolute-frequency-center (NREF) as defined in 38.104"; } leaf center-of-channel-bandwidth { @@ -708,7 +1470,10 @@ module o-ran-uplane-conf { units Hz; mandatory true; description - "Center frequency of channel bandwidth in Hz. Common for all numerologies."; + "Centre frequency of channel bandwidth in Hz. Common for all numerologies. + center-of-channel-bandwidth is the FREF translated from absolute-frequency-center (NREF) as per 3GPP TS 38.104. + Refer to Table 5: Centre Bandwidth Calculation in M-plane spec for calculation of this parameter + for even and odd number of PRBs in LTE, NR and DSS carrier configuration."; } leaf channel-bandwidth { @@ -738,9 +1503,9 @@ module o-ran-uplane-conf { default INACTIVE; description - "Indicates if transmission is enabled for this array carriers. Note that Netconf server uses state parameter + "Indicates if transmission is enabled for this array carriers. Note that NETCONF server uses state parameter to indicate actual state of array carriers operation. When array carriers is in sleep status, - Netconf server rejects all other operation request to tx-array-carriers object except either request to change from sleep + NETCONF server rejects all other operation request to tx-array-carriers object except either request to change from sleep to active status or delete MO operation (see 4.8) to the object."; } @@ -766,6 +1531,13 @@ module o-ran-uplane-conf { "Indicates state of array carriers activation operation"; } + leaf-list availability-status { + type o-ran-cmn:availability-status; + config false; + description + "indicates availability-status of array carrier"; + } + leaf type { type enumeration { enum NR { @@ -807,29 +1579,43 @@ module o-ran-uplane-conf { path "/user-plane-configuration/tx-array-carriers[name=current()/../name]" + "/duplex-scheme"; require-instance false; } + status deprecated; description - "Config true type of duplex scheme."; + "Config true type of duplex scheme. + Status is deprecated because 'lte-tdd-frame' container, where it was used, is also deprecated. + Additionally duplex-scheme is derived from the band-number."; } leaf rw-type { type leafref { path "/user-plane-configuration/tx-array-carriers[name=current()/../name]" + "/type"; require-instance false; } + status deprecated; description - "Config true type of carrier."; + "Config true type of carrier. + Status is deprecated because leafref is to a 'config true' schema-node"; + } + uses occupied-bandwidth; + + leaf configured-tx-beamId-table-index { + if-feature feat:MULTIPLE-BEAMID-TABLES-SUPPORTED; + type uint8; + description + "The value of beamId table index configured to be used by the O-DU for a given tx-array-carrier. + The value shall be chosen from the list 'tx-array-beamId-table-indexes' advertised by the O-RU."; } } grouping rx-common-array-carrier-elements { description - "This grouping containes all common parameters for tx-array-carriers and rx-array-carriers"; + "This grouping contains all common parameters for tx-array-carriers and rx-array-carriers"; leaf absolute-frequency-center { type uint32; - mandatory true; + status deprecated; description - "Absolute Radio Frequency Channel Number - indirectly indicates RF center carrier frequency of signal. - Reflected in arfcn."; + "deprecated in version 5.0.0 and replaced with offset-to-absolute-frequency-center + and common FREF translated from absolute-frequency-center (NREF) as defined in 38.104"; } leaf center-of-channel-bandwidth { @@ -837,7 +1623,10 @@ module o-ran-uplane-conf { units Hz; mandatory true; description - "Center frequency of channel bandwidth in Hz. Common for all numerologies."; + "Centre frequency of channel bandwidth in Hz. Common for all numerologies. + center-of-channel-bandwidth is the FREF translated from absolute-frequency-center (NREF) as per 3GPP TS 38.104. + Refer to Table 15.2.4-1: Centre Bandwidth Calculation in M-plane spec for calculation of this parameter + for even and odd number of PRBs in LTE, NR and DSS carrier configuration."; } leaf channel-bandwidth { @@ -867,9 +1656,9 @@ module o-ran-uplane-conf { default INACTIVE; description - "Indicates if transmission is enabled for this array carriers. Note that Netconf server uses state parameter + "Indicates if transmission is enabled for this array carriers. Note that NETCONF server uses state parameter to indicate actual state of array carriers operation. When array carriers is in sleep status, - Netconf server rejects all other operation request to tx-array-carriers object except either request to change from sleep + NETCONF server rejects all other operation request to tx-array-carriers object except either request to change from sleep to active status or delete MO operation (see 4.8) to the object."; } @@ -895,6 +1684,13 @@ module o-ran-uplane-conf { "Indicates state of array carriers activation operation"; } + leaf-list availability-status { + type o-ran-cmn:availability-status; + config false; + description + "indicates availability-status of array carrier"; + } + leaf type { type enumeration { enum NR { @@ -931,6 +1727,15 @@ module o-ran-uplane-conf { description "Type of duplex scheme O-RU supports."; } + uses occupied-bandwidth; + + leaf configured-rx-beamId-table-index { + if-feature feat:MULTIPLE-BEAMID-TABLES-SUPPORTED; + type uint8; + description + "The value of beamId table index configured to be used by the O-DU for a given rx-array-carrier. + The value shall be chosen from list 'rx-array-beamId-table-indexes' advertised by the O-RU."; + } } grouping endpoint-section-capacity { @@ -956,38 +1761,196 @@ module o-ran-uplane-conf { "Max number of sections within one slot that can be processed by endpoint or processed collectively by group of endpoints sharing capacity."; } + leaf max-highest-priority-sections-per-slot { + type uint16; + must "current() < ../max-sections-per-slot" { + error-message "the sectionID for the highest priority needs to be less than the max sectionIds per slot"; + } + description + "Max number of highest priority sections within one slot that can be processed by endpoint or processed collectively by + group of endpoints sharing capacity. This leaf applies only when coupling-via-frequency-and-time-with-priorities-optimized + is true, in other instances this leaf is ignored by the O-RU. The sectionId for highest priority section descriptions shall + start from 0 to specified max value and is a subset of max-sections-per-slot and must be less than max-sections-per-slot."; + } leaf max-remasks-per-section-id { type uint8 { range "1..12"; } default 12; + status deprecated; description "maximum number of different reMask values that is applied to a PRB within one section id. This value can be processed by endpoint - or processed collectively by group of endpoints sharing capacity"; + or processed collectively by group of endpoints sharing capacity. + This parameter is duplicated max-control-sections-per-data-section, hence being deprecated."; + } + leaf max-uplane-section-header-per-symbol { + type uint16; + description + "Maximum number of U-Plane data section header within one symbol that can be processed by an endpoint or processed collectively by group of + endpoints sharing capacity. Clarification for multiple U-Plane data section headers per C-Plane section description is specified in sectionId IE + description in CUS-Plane specification. For the cases where this optional parameter is not populated by O-RU or an older version O-DU does not + interpret this parameter, O-DU may optionally use max-sections-per-symbol as the default value to limit of U-Plane data section messages which + can be processed by the O-RU. If none of the above limitations are supported, O-RU and O-DU may rely on offline negotiation. + As an example, this parameter can be used to limit O-RU processing while using Section extension type#6 and #12, which are used for non-contiguous + PRB allocation, and hence results in multiple U-Plane data section headers for a given C-Plane section description."; + } + leaf max-uplane-section-header-per-slot { + type uint16; + description + "Maximum number of U-Plane data section headers within one slot that can be processed by an endpoint or processed collectively by group of + endpoints sharing capacity. Clarification for multiple U-Plane data section headers per C-Plane section description is specified in sectionId IE + description in CUS-Plane specification. For the cases where this optional parameter is not populated by O-RU or an older version O-DU does not + interpret this parameter, O-DU may optionally use max-sections-per-slot as the default value to limit of U-Plane data section messages which can + be processed by the O-RU. If none of the above limitations are supported, O-RU and O-DU may rely on offline negotiation. + As an example, this parameter can be used to limit O-RU processing while using Section extension type#6 and #12, which are used for non-contiguous + PRB allocation, and hence results in multiple U-Plane data section headers for a given C-Plane section description."; } description - "Parameters describing section capacity where section is undestood as number of different sectionId values"; + "Parameters describing section capacity where section is understood as number of different sectionId values. Additionally, max limits for U-Plane data sections + refer to U-Plane data section headers"; + } + + grouping endpoint-section-extension-limits { + leaf max-mcscaleremask-per-prb { + type uint16; + description + "This parameter limits the number of sets of {mcScaleReMask, csf, mcScaleOffset} values per symPrbPattern the O-RU can support when SE 23 is used in a + data section description. Refer to clause 7.7.23.1 of the CUS-Plane specification."; + } + leaf max-prb-ranges-per-sec-ext-12 { + type uint16; + description + "Optional parameter reported by O-RU which applies to Section Extension 12 and specifies + the maximum number of frequency ranges R per section description supported by O-RU. + If this limit is exceeded by the O-DU, the O-RU may send alarm notification with + 'fault-id = 31' to subscribers following the procedures defined in Clause 11 and + Table A.1-1 of O-RAN.WG4.MP.0. + As an example, the O-RU can include the following in the corresponding active-alarm list + entry and alarm-notification message: + Error C-Plane message + Maximum number of frequency ranges in SE-12 per section description exceeded + Reduce frequency ranges per section description used in SE-12"; + } + leaf max-freq-hops-per-sec-ext-13 { + type uint16; + description + "Optional parameter reported by O-RU which applies to Section Extension 13 and specifies + the maximum number of frequency hops R per section description supported by O-RU. + If this limit is exceeded by the O-DU, the O-RU may send alarm notification with + 'fault-id = 31' to subscribers following the procedures defined in Clause 11 and + Table A.1-1 of O-RAN.WG4.MP.0. + As an example, the O-RU can include the following in the corresponding active-alarm list + entry and alarm-notification message: + Error C-Plane message + Maximum number of frequency hops in SE 13 per section description exceeded + Reduce frequency hops per section description used in SE-13"; + } + + leaf max-prb-blks-per-sec-ext-23 { + if-feature feat:SE23-PRB-BLOCK-MODE-SUPPORT; + type uint16; + description + "Optional parameter reported by O-RU which applies to Section Extension 23 and specifies + the maximum number of prb blocks (Refer Clause 7.7.23.1 of CUS-Plane spec prb block) per + section description supported by O-RU. + If this limit is exceeded by the O-DU, the O-RU may send alarm notification with 'fault-id = 31' + to subscribers following the procedures defined in Clause 11 and + Table A.1-1 of O-RAN.WG4.MP.0. + As an example, the O-RU can include the following in the corresponding active-alarm list + entry and alarm-notification message: + Error C-Plane message + Maximum number of prb blocks in SE-23 per section description exceeded + Reduce prb blocks per section description used in SE-23"; + } + + description + "Parameters describing C-Plane section extension limits/capacities."; } grouping endpoint-beam-capacity { leaf max-beams-per-symbol { - type uint16; + type uint16 { + range "min .. 32767"; + } description - "Max number of beams within one symbol that can be processed by endpoint - or processed collectively by group of endpoints sharing capacity"; + "Max number of different beamId values within one symbol that can be processed by endpoint + or processed collectively by group of endpoints sharing capacity + + If the parameter is absent or if value 0 is reported for the parameter, + then the endpoint does not support beamforming operation. + + The parameter doesn't apply if multiple-beamId-tables-support-enabled is set to true. + In such a case, max-beams-per-symbol-multiple-beamid-tables applies."; } leaf max-beams-per-slot { - type uint16; + type uint16 { + range "min .. 32767"; + } description - "Max number of beams within one slot that can be processed by endpoint - or processed collectively by group of endpoints sharing capacity"; + "Max number of different beamId values within one slot that can be processed by endpoint + or processed collectively by group of endpoints sharing capacity + + If the parameter is absent or if value 0 is reported for the parameter, + then the endpoint does not support beamforming operation. + + The parameter doesn't apply if multiple-beamId-tables-support-enabled is set to true. + In such a case, max-beams-per-slot-multiple-beamid-tables applies."; + } + leaf max-beams-per-symbol-multiple-beamid-tables { + if-feature feat:MULTIPLE-BEAMID-TABLES-SUPPORTED; + type uint32; + description + "Max number of different beamId values within one symbol that can be processed by endpoint + or processed collectively by group of endpoints sharing capacity. + beamId values associated with different beamId tables are always considered different. + + This parameter only applies if multiple-beamId-tables-support-enabled is set to true. + If multiple-beamId-tables-support-enabled is set to false, then max-beams-per-symbol applies."; + } + leaf max-beams-per-slot-multiple-beamid-tables { + if-feature feat:MULTIPLE-BEAMID-TABLES-SUPPORTED; + type uint32; + description + "Max number of different beamId values within one slot that can be processed by endpoint + or processed collectively by group of endpoints sharing capacity. + beamId values associated with different beamId tables are always considered different. + + This parameter only applies if multiple-beamId-tables-support-enabled is set to true. + If multiple-beamId-tables-support-enabled is set to false, then max-beams-per-slot applies."; + } + leaf max-beam-updates-per-slot { + type uint16 { + range "min .. 32767"; + } + description + "Max number of beams within one slot that can be updated by endpoint + or processed collectively by group of endpoints sharing capacity + + If the parameter is absent or if value 0 is reported for the parameter, + then the endpoint does not support beamforming operation."; + } + leaf max-beam-updates-per-symbol { + type uint16 { + range "min .. 32767"; + } + description + "Max number of beams within one symbol that can be updated by endpoint + or processed collectively by group of endpoints sharing capacity + + If the parameter is absent or if value 0 is reported for the parameter, + then the endpoint does not support beamforming operation."; } description - "Parameters describing beam capacity where number of beams is understood as number of different beamId values"; + "Parameters describing beam capacity where number of beams is understood as number of different beamId values. + Parameters defined for beam updates shall be used to put a maximum limit on number of beam/beamIds which can be updated + every slot/symbol. Note: This parameter does not put any restriction on which beams/beamIds can be updated. + + If the parameters defining beam capacity and beam updates are absent or if value 0 is reported for the parameters + defining beam capacity and beam updates, then the endpoint does not support beamforming operation."; } grouping endpoint-prb-capacity { @@ -998,6 +1961,25 @@ module o-ran-uplane-conf { or processed collectively by group of endpoints sharing capacity"; } + leaf max-prb-ranges-per-symbol { + type uint32; + description + "Optional parameter reported by O-RU which indicates the maximum number of PRB ranges + that can be processed by single endpoint or processed collectively by group of endpoints + sharing capacity within one symbol. For details please see O-RAN WG4 CUS-Plane specification, + Clause 7.8.2.1.2 'Limits of number of PRB ranges'. + + In case CU-Plane traffic generated by the O-DU exceeds the limit, an O-RU is responsible + for sending alarm notification with 'fault-id = 31' to subscribers following the procedures + defined in Clause 11 and Table A.1-1 of O-RAN.WG4.MP.0. + + As an example, the O-RU can include the following in the corresponding active-alarm list + entry and alarm-notif message: + Error C-Plane message + max-prb-ranges-per-symbol exceeded + Reduce value of number of PRB ranges used per symbol"; + } + description "Attributes presenting processing capacity related to PRB."; } @@ -1017,6 +1999,111 @@ module o-ran-uplane-conf { is set to true."; } + grouping per-cplane-message-limits { + leaf max-beams-per-cplane-message { + type uint16; + description + "Maximum number of beams which can be received in one single C-Plane message. Number of beams, + may include only beamIds, only beam weights or mix of beamIds and beamweights being received by + an O-RU in a single C-Plane message. + To avoid application layer fragmentation of C-Plane message across the fronthaul, O-RU should + avoid setting this to a very low value. + As a usage scenario, an O-RU may choose to define only a few quantized values e.g. (128, 256). + If the value is set to 0 by O-RU, the O-DU need not restrict the number of beams it can send + in single C-Plane message (except limited by MTU size)."; + } + + leaf max-highest-priority-sec-per-cplane-message { + type uint16; + description + "Maximum number of highest priority sections which can be received in one single C-Plane message. + This leaf applies only when 'coupling-via-frequency-and-time-with-priorities' is true"; + } + + leaf max-beams-per-slot-with-cplane-limits { + type uint16; + description + "Maximum number of beams that are required to be processed by endpoint or processed collectively + by group of endpoints sharing capacity when O-DU enables C-Plane limits. This value should replace + 'max-beams-per-slot' defined in 'endpoint-beam-capacity'"; + } + + leaf max-highest-priority-sections-per-slot-with-cplane-limits { + type uint16; + description + "Maximum number of highest priority sections that are required to be processed by endpoint or processed + collectively by group of endpoints sharing capacity when O-DU supports C-Plane limits. This value should + replace 'max-highest-priority-sections-per-slot' defined in 'endpoint-section-capacity'"; + } + + leaf max-num-se22-per-cplane-message { + type uint16; + description + "This value limits the max number of section extension 22 (ACK/NACK request) included in a C-Plane message as supported + by the endpoint or collectively by group of endpoints sharing capacity when O-DU enables C-Plane limits + and when section extension 22 (ACK/NACK request) and section type 8 (ACK/NACK feedback) are supported by the endpoint or endpoint sharing group."; + } + + leaf max-prb-ranges-per-hp-section-sec-ext-12 { + type uint16; + description + "Optional parameter reported by O-RU which applies to Section Extension 12 and specifies the + maximum number of frequency ranges R per highest priority section description supported by O-RU. + If this limit is exceeded by the O-DU, the O-RU is responsible for sending alarm notification + with 'fault-id = 31' to subscribers following the procedures defined in Clause 11 and + Table A.1-1 of O-RAN.WG4.MP.0. + As an example, the O-RU can include the following in the corresponding active-alarm list + entry and alarm-notification message: + Error C-Plane message + Maximum number of frequency hops per highest priority section description exceeded + Reduce frequency range per highest section description"; + } + + description + "Attributes limit maximum instances of certain parameters contained in a C-Plane message e.g. beams, + highest priority sections. This limitation is useful for O-RUs which are packet processing based and are + dimensioned to handle fixed number of parameters contained in a C-Plane message. In addition, if O-DU supports + cplane limits, O-RU can operate more efficiently and endpoint capacity for applicable parameters are enhanced. + as specified by 'max-beams-per-slot-with-cplane-limits' and 'max-highest-priority-sections-per-slot-with-cplane-limits'"; + } + + + grouping per-uplane-message-limits { + leaf max-section-headers-per-uplane-message { + if-feature feat:UPLANE-MESSAGE-PROCESSING-LIMITS; + type uint16; + description + "Maximum number of section headers which can be received in one single U-Plane message."; + } + + description + "Attributes describe maximum instances of certian parameters contained in a U-Plane mesaage e.g. + number of section headers. Those limitations are required for O-RUs which are packet processing based and are + dimensioned to handle limited number of parameters contained in a U-Plane message. "; + } + + grouping beam-update-contention-control-limits { + leaf max-beams-per-symbol-with-beam-contention-control { + type uint16; + description + "Maximum number of beams within one symbol that can be processed by an endpoint or processed collectively + by group of endpoints sharing capacity when O-DU enables the O-RU feature BEAM-UPDATE-CONTENTION-CONTROL. + This value should replace 'max-beams-per-symbol' defined in 'endpoint-beam-capacity'"; + } + + leaf max-beams-updates-per-symbol-with-beam-contention-control { + type uint16; + description + "Maximum number of beams within one symbol that can be updated by an endpoint or processed collectively + by group of endpoints sharing capacity when O-DU enables the O-RU feature BEAM-UPDATE-CONTENTION-CONTROL. + This value should replace 'max-beam-updates-per-symbol' defined in 'endpoint-beam-capacity'"; + } + + description + "If O-DU supports BEAM-UPDATE-CONTENTION-CONTROL, O-RU can operate more efficiently and endpoint capacity for applicable + parameters are enhanced."; + } + grouping endpoint-static-config-support { leaf static-config-supported { type enumeration { @@ -1047,7 +2134,16 @@ module o-ran-uplane-conf { when "(/user-plane-configuration/static-low-level-rx-endpoints[name=current()/../name]/static-config-supported = 'PRACH')"; type uint8; description - "Maximum number of PRACH patterns the endpoint can handle in PRACH configuration"; + "Maximum number of PRACH patterns the endpoint can handle in PRACH configuration. + Due to limited range of the parameter, an O-DU should use extended-max-prach-patterns parameter."; + } + + leaf extended-max-prach-patterns { + when "(/user-plane-configuration/static-low-level-rx-endpoints[name=current()/../name]/static-config-supported = 'PRACH')"; + if-feature feat:EXTENDED-PRACH-CONFIGURATION; + type uint32; + description + "Maximum number of PRACH patterns the endpoint can handle in PRACH configuration if EXTENDED-STATIC-PRACH is supported."; } leaf max-srs-patterns { @@ -1063,6 +2159,7 @@ module o-ran-uplane-conf { grouping endpoint-tdd-pattern-support { leaf configurable-tdd-pattern-supported { + if-feature mcap:CONFIGURABLE-TDD-PATTERN-SUPPORTED; type boolean; default false; @@ -1085,6 +2182,482 @@ module o-ran-uplane-conf { TDD patterns and limitations regarding common TDD switching per groups of endpoints."; } + grouping u-plane-transmission-control { + description + "Configuration for UL U-plane transmission control"; + + leaf transmission-window-control { + if-feature "feat:STATIC-TRANSMISSION-WINDOW-CONTROL or feat:DYNAMIC-TRANSMISSION-WINDOW-CONTROL"; + type enumeration { + enum NONE { + description + "O-RU will use normal transmission type with normal transmission window"; + } + enum STATIC { + if-feature feat:STATIC-TRANSMISSION-WINDOW-CONTROL; + description + "O-RU will use transmission window offset and size and transmission type as configured over M-plane"; + } + enum DYNAMIC { + if-feature feat:DYNAMIC-TRANSMISSION-WINDOW-CONTROL; + description + "O-RU will use transmission window offset and size and transmission type as requested over C-plane"; + } + } + default NONE; + + description + "Selects type of UL U-plane transmission window control for the endpoint"; + } + + leaf transmission-window-schedule { + when "(../transmission-window-control = 'STATIC')"; + if-feature feat:STATIC-TRANSMISSION-WINDOW-CONTROL; + type union { + type empty; + type leafref { + path "/user-plane-configuration/transmission-window-schedules/id"; + } + } + description + "Identifies U-plane transmission window schedule (which provides a list of symbol-specific offsets) + to be used by the endpoint. + Symbol-specific offset values from the schedule are added to endpoint specific offset value + from transmission-window-offset. + If this element is not present, the O-RU assumes as all symbol specific offsets are zero. + For restrictions on values of symbol-specific offsets see description of transmission-window-offset. + This parameter shall not be set to value other than empty if transmission control is not enabled + by transmission-window-control."; + } + + leaf transmission-window-offset { + when "(../transmission-window-control = 'STATIC')"; + if-feature feat:STATIC-TRANSMISSION-WINDOW-CONTROL; + type uint16; + units "number of symbols"; + default 0; + description + "Transmission window offset. + The effective symbol-specific offset is sum of endpoint-specific offset value from transmission-window-offset + and symbol-specific offset from transmission-window-schedules referenced by transmission-window-schedule. + + If this element is not present then O-RU assumes transmission-window-offset is zero. + This parameter shall not be set to value other than 0 if transmission control is not enabled + by transmission-window-control. + + There is no direct upper bound for this parameter (except value range defined by leaf type) but there are + restrictions on combination of values of transmission-window-offset, transmission-window-offset, + symbol-specific offset from transmission-window-schedules and transmission-window-size. + + Specifically, if endpoint is set for delay managed operation (non-time-managed-delay-enabled = FALSE) + then O-RU handles U-Plane transmission as delay managed traffic and combination of values of + transmission-window-offset, symbol-specific offset from transmission-window-schedules and + transmission-window-size must not exceed O-RU buffering capacity (transmission-buffering-capacity) + for the requested reception schedule. + + If endpoint is set for non-delay managed operation (non-time-managed-delay-enabled = TRUE) + then O-RU handles U-Plane transmission on best effort basis. In this case any combination of values + of transmission-window-offset, symbol-specific offset from transmission-window-schedules and + transmission-window-size is permitted. This does not remove restrictions on parameters due to restrictions + defined for value type or restrictions that depend on INDEPENDENT-TRANSMISSION-WINDOW-CONTROL feature + + Additional restrictions on values (and presence) of transmission-window-schedule, transmission-window-offset + and transmission-window-size depend on presence of INDEPENDENT-TRANSMISSION-WINDOW-CONTROL feature. + + If INDEPENDENT-TRANSMISSION-WINDOW-CONTROL feature is not supported then all endpoints with + transmission control enabled that handle the same carrier type and SCS must be configured + (via M-plane or C-plane) with parameter values resulting in transmission windows that coincide + between the endpoints. That is, for every symbol N, the effective transmission window for symbol N + must be shared (start at the same time and end at the same time) by all the endpoints handling + same carrier type and SCS. This restriction applies only to endpoints that have transmission + control enabled. + + If INDEPENDENT-TRANSMISSION-WINDOW-CONTROL feature is supported then restriction described + above does not apply and a different transmission window (window offset and window size) + can be used for every endpoint capable of transmission window control."; + } + + leaf transmission-window-size { + when "(../transmission-window-control = 'STATIC')"; + if-feature feat:STATIC-TRANSMISSION-WINDOW-CONTROL; + type uint16 { + range "0..10000"; + } + units "microsecond"; + default 0; + description + "Transmission window size to be used; only values that are compatible with SCS used + for the endpoint are allowed. + Minimum supported value is determined by SCS specific transmission window size + reported by O-RU in ru-delay-profile. + + Client can use special value 0 (zero) instead of the SCS specific transmission window + size reported by O-RU in ru-delay-profile with the same effect. + This parameter shall not be set to value other than 0 if transmission control is not enabled + (transmission-window-control = NONE) or the endpoint is set for non-delay managed operation + (non-time-managed-delay-enabled = TRUE). + + There is no direct upper bound for this parameter (except value range defined by leaf type) but there are + restrictions on combination of values of transmission-window-offset, transmission-window-offset, + symbol-specific offset from transmission-window-schedules and transmission-window-size. + See description of transmission-window-offset for more details."; + } + + leaf transmission-type { + when "(../transmission-window-control = 'STATIC')"; + if-feature "feat:STATIC-TRANSMISSION-WINDOW-CONTROL and feat:UNIFORMLY-DISTRIBUTED-TRANSMISSION"; + type enumeration { + enum NORMAL { + description + "Normal transmission (unspecified within transmission window)"; + } + enum UNIFORMLY-DISTRIBUTED { + if-feature feat:UNIFORMLY-DISTRIBUTED-TRANSMISSION; + description + "Uniformly distributed over transmission window: each of N messages in the window + transmitted at random time in a separate subwindow; subwindow size is window size / N "; + } + } + + description "Type of delay supported by the endpoint"; + } + } + + grouping tx-endpoint-compression-grouping { + description + "Grouping for endpoint compression"; + + container compression { + presence + "This container shall exists to avoid misaligned compression + methods between devices"; + + description + "Container which consists of global configurable parameters for compression"; + + uses cf:compression-details; + + leaf fs-offset { + if-feature cf:CONFIGURABLE-FS-OFFSET; + type uint8; + default 0; + description + "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. + Please refer to CU-Plane specification for details"; + } + + list dynamic-compression-configuration { + when "../compression-type = 'DYNAMIC'"; + key "id"; + unique "compression-method iq-bitwidth fs-offset"; + description + "List of possible configuration in case dynamic configuration is used + Note: In case of empty list all available compressions can be chosen dynamically + and default fs-offset is taken (0). + If the feature CONFIGURABLE-FS-OFFSET is not supported, + fs-offset will not be considered as one of the criteria for unique statement. + Refer to RFC7950 clause 7.8.3 for details of unique statement"; + + leaf id { + type uint16; + description + "Identification number for particular compression"; + } + + uses cf:compression-method-grouping; + + leaf fs-offset { + if-feature cf:CONFIGURABLE-FS-OFFSET; + type uint8; + default 0; + description + "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. + Please refer to CU-Plane specification for details"; + } + + leaf channel-information-iq-bitwidth { + type uint8{ + range "1..16"; + } + status deprecated; + description + "I/Q bitwidth for channel information in Section Type6. + Leaf is deprecated as it should be independent of dynamic compression, + NETCONF client instead uses channel-information-bitwidth schema node"; + } + } + + leaf channel-information-bitwidth { + type uint8{ + range "1..16"; + } + description + "I/Q bitwidth for channel information in Section Type6. + Maximum value is limited to 16. + Value 1,2,..16 indicates I and Q are each 1,2..16 bits wide respectively. + Note: This parameter shall be used when the NETCONF client does not make use of + the CHANNEL-INFORMATION-COMPRESSION feature."; + } + + list channel-information-compressions { + if-feature "feat:CHANNEL-INFORMATION-COMPRESSION"; + key id; + + leaf id { + type uint16; + description + "Identification number for particular channel information compression"; + } + + leaf channel-information-compression-method { + type cf:ci-compression-method-def; + description + "Channel information compression method"; + } + + leaf iq-bitwidth { + type uint8{ + range "1..16"; + } + description + "Bitwidth to be used in compression, maximum value is limited to 16. + Value 1,2,..16 indicates I and Q are each 1,2..16 bits wide respectively. + + When this schema node is used in the configuration, the O-RU shall ignore the configuration of the + /low-level-tx-endpoints/compression/channel-information-bitwidth schema node"; + } + + description + "List of available compressions, that can be dynamically chosen, for channel information (e.g. ST6) for this endpoint. + Note1: When only one compression is listed here, it implies that channel information compression + is static and mentioned compression is taken into use. + Note2: O-RU Shall reject configuration with compressions that are not supported"; + } + + list bf-weights-compressions { + key id; + + leaf id { + type uint16; + description + "Identification number for particular beamforming compression"; + } + + leaf bf-weights-compression { + type cf:bf-compression-method-def; + description + "Beamforming weight compression method"; + } + + leaf iq-bitwidth { + type uint8 { + range "1..16"; + } + description + "Bitwidth to be used in compression, maximum value is limited to 16. + Value 1,2,..16 indicates I and Q are each 1,2..16 bits wide respectively"; + } + description + "List of available compressions, that can be dynamically chosen, for beamforming weights for this endpoint. + Note1: When only one compression is listed here, it implies that beamforming weights compression + is static and mentioned compression is taken into use. + Note2: O-RU Shall reject configuration with compressions that are not supported"; + } + } + } + + grouping rx-endpoint-compression-grouping { + description + "Grouping for endpoint compression"; + + container compression { + presence + "This container shall exists to avoid misaligned compression + methods between devices"; + + description + "Container which consists of global configurable parameters for compression"; + + uses cf:compression-details; + + leaf fs-offset { + if-feature cf:CONFIGURABLE-FS-OFFSET; + type uint8; + default 0; + description + "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. + Please refer to CU-Plane specification for details"; + } + + list dynamic-compression-configuration { + when "../compression-type = 'DYNAMIC'"; + key "id"; + unique "compression-method iq-bitwidth fs-offset"; + description + "List of possible configuration in case dynamic configuration is used + Note: In case of empty list all available compressions can be chosen dynamically + and default fs-offset is taken (0). + If the feature CONFIGURABLE-FS-OFFSET is not supported, + fs-offset will not be considered as one of the criteria for unique statement. + Refer to RFC7950 clause 7.8.3 for details of unique statement"; + + leaf id { + type uint16; + description + "Identification number for particular compression"; + } + + uses cf:compression-method-grouping; + + leaf fs-offset { + if-feature cf:CONFIGURABLE-FS-OFFSET; + type uint8; + default 0; + description + "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. + Please refer to CU-Plane specification for details"; + } + } + + list bf-weights-compressions { + key id; + + leaf id { + type uint16; + description + "Identification number for particular beamforming compression"; + } + + leaf bf-weights-compression { + type cf:bf-compression-method-def; + description + "Beamforming weight compression method"; + } + + leaf iq-bitwidth { + type uint8; + description + "Bitwidth to be used in compression"; + } + + description + "List of available compressions, that can be dynamically chosen, for beamforming weights for this endpoint. + Note1: When only one compression is listed here, it implies that beamforming weights compression + is static and mentioned compression is taken into use. + Note2: O-RU Shall reject configuration with compressions that are not supported"; + } + } + } + + grouping supported-section-type4-config { + description + "Set of parameters required for section type 4 slot configuration message."; + list st4-supported-commands { + key "st4-command-type"; + + description + "This parameter specifies the list of Section Type 4 command types supported by O-RU."; + leaf st4-command-type { + type enumeration { + enum TIME_DOMAIN_BEAM_CONFIG { + description "O-RU support for receiving time domain beamforming command."; + } + enum TDD_CONFIG_PATTERN { + description "O-RU support for receiving TDD symbol pattern for a given slot."; + } + enum TRX_CONTROL { + if-feature feat:TRX-CONTROL; + description "O-RU support for receiving TRX CONTROL command in a given slot."; + } + enum ASM { + if-feature feat:ADVANCED-SLEEP-MODE; + description "O-RU support for receiving ASM command in a given slot."; + } + } + description + "Section Type 4 command types supported by O-RU."; + } + + list st4-command-scope-params { + key "cmd-scope"; + + description + "This list contains parameters which are specific to a given command scope associated with a particular section type 4 command type."; + + leaf cmd-scope { + type enumeration { + enum ARRAY-COMMAND { + description + "Command applies to all endpoints assigned to the tx-array(s) and/or rx-array(s).If the O-RU + is operating with multiple O-DUs, the scope of an individual O-DU is limited, to the + endpoints assigned to the O-DU which was the originator of the command."; + } + enum CARRIER-COMMAND { + description + "Command applies to all endpoints assigned to the tx-array-carrier and/or rx-array-carrier."; + } + enum O-RU-COMMAND { + description + "O-RU level command, i.e., one that applies to all arrays and carriers. If the O-RU + is operating with multiple O-DUs, the scope of an individual O-DU is limited, as + specified in CUS-Plane specification, clause 7.5.2.17."; + } + } + description "Command scope for section type 4 commands"; + } + + leaf st4-reception-bitmask { + type uint16; + description + "This parameter specifies the O-RU capability to receive Section Type 4 message with associated commands with a particular command scope + for the symbols for which the corresponding bit is set to '1' in the bitmask. If the O-RU receives a Section Type 4 message with + associated command for a symbol whose bit value is set to '0' in this bitmask, the O-RU shall reject the Section Type 4 message"; + } + } + } + + list st4-reception-mask { + key "cmd-scope"; + status deprecated; + + description + "List of symbol mask per command scope, specifying the O-RU capability to receive Section Type 4 message for a + given command scope only for symbols for which the corresponding bit is set to '1' in the bitmask. If the O-RU + receives a Section Type 4 message with associated command for a symbol whose bit value is set to '0' in this + bitmask, the O-RU shall reject the Section Type 4 message"; + + leaf cmd-scope { + type enumeration { + enum ARRAY-COMMAND { + description + "Command applies to all endpoints assigned to the tx-array(s) and/or rx-array(s).If the O-RU + is operating with multiple O-DUs, the scope of an individual O-DU is limited, to the + endpoints assigned to the O-DU which was the originator of the command."; + } + enum CARRIER-COMMAND { + description + "Command applies to all endpoints assigned to the tx-array-carrier and/or rx-array-carrier."; + } + enum O-RU-COMMAND { + description + "O-RU level command, i.e., one that applies to all arrays and carriers. If the O-RU + is operating with multiple O-DUs, the scope of an individual O-DU is limited, as + specified in CUS-Plane specification, clause 7.5.2.17."; + } + } + description "Command scope for section type 4 commands"; + } + + leaf st4-reception-bitmask { + type uint16; + description + "This parameter specifies the O-RU capability to receive Section Type 4 message with associated commands for the symbols + for which the corresponding bit is set to '1' in the bitmask. If the O-RU receives a Section Type 4 message with + associated command for a symbol whose bit value is set to '0' in this bitmask, the O-RU shall reject the Section Type 4 message"; + } + } + } + grouping uplane-conf-group { description "Grouping for uplane configuration related parameters"; @@ -1100,13 +2673,60 @@ module o-ran-uplane-conf { "Unique name of low-level-tx-link object."; } + leaf sro-id { + if-feature feat:SHARED-ORU-MULTI-OPERATOR; + type leafref { + path "/or-user:users/or-user:user/or-user:sro-id"; + } + description + "An optional shared resource operator associated with this list entry. + When present, indicates that the list entry corresponds to a low-level-tx-link + associated with a shared resource operator where the sro-id identifies + a specific shared resource operator. + This schema-node is used to refine NACM privileges for shared + resource operators"; + } + leaf processing-element { type leafref { path "/o-ran-pe:processing-elements/o-ran-pe:ru-elements/o-ran-pe:name"; } mandatory true; description - "Contains name of processing-element to be used as transport by low-level-tx-link"; + "Contains name of processing-element to be used as transport by low-level-tx-link, + if 'transport-qualified-processing-element' is included in the configuration, + the O-RU shall use 'transport-qualified-processing-element' instead of this schema node, + an O-RU Controller shall still configure this schema node with a leafref to a valid ru-element, + but this shall not be used by the O-RU."; + } + + leaf transport-session-type { + if-feature "feat:MULTIPLE-TRANSPORT-SESSION-TYPE"; + type enumeration { + enum ETH-INTERFACE { + description "VLAN based CUS Transport "; + } + enum UDPIP-INTERFACE { + description "UDP/IP based CUS Transport "; + } + enum ALIASMAC-INTERFACE{ + description "Alias MAC address based CUS Transport "; + } + } + description + "transport session type used when an O-RU is configured with multiple processing elements of different transport session types, + in which case it is used for referencing a processing element in 'transport-qualified-processing-element'"; + } + + leaf transport-qualified-processing-element { + if-feature "feat:MULTIPLE-TRANSPORT-SESSION-TYPE"; + type leafref { + path "/o-ran-pe:processing-elements/o-ran-pe:additional-transport-session-type-elements[o-ran-pe:transport-session-type = current()/../transport-session-type]/o-ran-pe:ru-elements/o-ran-pe:name"; + } + description + "Contains name of processing-element to be used as transport by low-level-tx-link. + Used when the processing element is configured + by the list 'additional-transport-session-type-elements'"; } leaf tx-array-carrier { @@ -1140,13 +2760,60 @@ module o-ran-uplane-conf { "Unique name of low-level-rx-links object."; } + leaf sro-id { + if-feature feat:SHARED-ORU-MULTI-OPERATOR; + type leafref { + path "/or-user:users/or-user:user/or-user:sro-id"; + } + description + "An optional shared resource operator associated with this list entry. + When present, indicates that the list entry corresponds to a low-level-rx-link + associated with a shared resource operator where the sro-id identifies + a specific shared resource operator. + This schema-node is used to refine NACM privileges for shared + resource operators"; + } + leaf processing-element { type leafref { path "/o-ran-pe:processing-elements/o-ran-pe:ru-elements/o-ran-pe:name"; } mandatory true; description - "Contains name of processing-element to be used as transport by LowLevelTxLink"; + "Contains name of processing-element to be used as transport by low-level-rx-link, + if 'transport-qualified-processing-element' is included in the configuration, + the O-RU shall use 'transport-qualified-processing-element' instead of this schema node, + an O-RU Controller shall still configure this schema node with a leafref to a valid ru-element, + but this shall not be used by the O-RU."; + } + + leaf transport-session-type { + if-feature "feat:MULTIPLE-TRANSPORT-SESSION-TYPE"; + type enumeration { + enum ETH-INTERFACE { + description "VLAN based CUS Transport "; + } + enum UDPIP-INTERFACE { + description "UDP/IP based CUS Transport "; + } + enum ALIASMAC-INTERFACE{ + description "Alias MAC address based CUS Transport "; + } + } + description + "transport session type used when an O-RU is configured with multiple processing elements of different transport session types, + in which case it is used for referencing a processing element in 'transport-qualified-processing-element'"; + } + + leaf transport-qualified-processing-element { + if-feature "feat:MULTIPLE-TRANSPORT-SESSION-TYPE"; + type leafref { + path "/o-ran-pe:processing-elements/o-ran-pe:additional-transport-session-type-elements[o-ran-pe:transport-session-type = current()/../transport-session-type]/o-ran-pe:ru-elements/o-ran-pe:name"; + } + description + "Contains name of processing-element to be used as transport by low-level-rx-link. + Used when the processing element is configured + by the list 'additional-transport-session-type-elements'"; } leaf rx-array-carrier { @@ -1176,13 +2843,49 @@ module o-ran-uplane-conf { description "Parameter to set the non-default marking for user-plane"; } + + leaf enhanced-user-plane-uplink-marking { + if-feature "feat:MULTIPLE-TRANSPORT-SESSION-TYPE"; + type leafref { + path "/o-ran-pe:processing-elements/o-ran-pe:additional-transport-session-type-elements[o-ran-pe:transport-session-type = current()/../transport-session-type]/o-ran-pe:enhanced-uplane-mapping/o-ran-pe:uplane-mapping/o-ran-pe:up-marking-name"; + } + description + "Parameter to set the non-default marking for user-plane. + Used when the enhanced-uplane-mapping is configured + by the list 'additional-transport-session-type-elements'"; + } + } + + grouping common-se24-dmrs-capabilities-grp { + description + "Grouping of common SE23 DMRS BF capabilities. + Please refer to CUS specification clause 7.7.24 for more details."; + + leaf max-user-groups-per-slot { + type uint32; + description + "Maximum number user groups per slot."; + } + + leaf max-entries-per-slot { + type uint32; + description + "Maximum number of entries in the table of DMRS configurations per slot."; + } } list endpoint-types { key "id"; config false; description - "Properties of endpoint that are common to multiple endpoints if such are identified"; + "Properties of endpoint that are common to multiple endpoints if such are identified + Note: For any endpoint supporting mixed numerology within slot/symbol (multiple-numerology-supported=TRUE) + * Interval specific (per-slot and per-symbol) capacity constraints instantaneous capacity usage + (i.e. capacity is shared/distributed between all numerologies used at an instant of time). + * Instantaneous capacity usage is the sum of capacity usages of all intervals of a specific type (slot/symbol) + that share the instant of time at which instantaneous capacity usage is evaluated regardless of numerology. + * Capacity used in an interval is allocated at the start of the interval and is released at the end of the interval + (e.g. capacity used for symbol #N of numerology #M is unavailable during symbol #N and available for reuse after symbol #N ends)."; leaf id { type uint16; @@ -1211,11 +2914,15 @@ module o-ran-uplane-conf { } } + uses supported-section-type4-config { + if-feature feat:ST4-SLOT-CONFIG-MSG-SUPPORT; + } + leaf-list supported-frame-structures { type uint8; description - "List of supported values of frame structure"; + "List of supported values of frame structure. For semantic and allowed values see CUS-Plane Specification, clause '7.5.2.13 frameStructure (frame structure)'"; } leaf managed-delay-support { @@ -1266,6 +2973,7 @@ module o-ran-uplane-conf { uses endpoint-section-capacity; uses endpoint-beam-capacity; uses endpoint-prb-capacity; + uses endpoint-section-extension-limits; leaf-list prb-capacity-allocation-granularity { type uint16; @@ -1277,6 +2985,608 @@ module o-ran-uplane-conf { } uses endpoint-numerology-capacity; + + leaf static-transmission-window-control-supported { + if-feature feat:STATIC-TRANSMISSION-WINDOW-CONTROL; + type boolean; + description + "Endpoint supports transmission-window-control = STATIC"; + } + + leaf uniformly-distributed-transmission-supported { + if-feature "feat:STATIC-TRANSMISSION-WINDOW-CONTROL and feat:UNIFORMLY-DISTRIBUTED-TRANSMISSION"; + type boolean; + description + "Endpoint supports transmission-type = UNIFORMLY-DISTRIBUTED"; + } + + leaf ordered-transmission-supported { + if-feature feat:ORDERED-TRANSMISSION; + type boolean; + description + "Endpoint supports ordered transmission of U-plane messages + and can be configured with ordered-transmission = TRUE"; + } + + leaf dynamic-transmission-window-control-supported { + if-feature feat:DYNAMIC-TRANSMISSION-WINDOW-CONTROL; + type boolean; + description + "Endpoint supports U-plane transmission window control via C-plane + (supports transmission-window-control = DYNAMIC) with independent window offset and size per symbol"; + } + + leaf dynamic-transmission-window-control-per-section-supported { + when "../dynamic-transmission-window-control-supported = 'true'"; + if-feature feat:DYNAMIC-TRANSMISSION-WINDOW-CONTROL; + type boolean; + description + "Endpoint supports U-plane transmission window control via C-plane + (supports transmission-window-control = DYNAMIC) with independent window offset and size per section"; + } + + leaf dynamic-uniformly-distributed-transmission-supported { + if-feature "feat:DYNAMIC-TRANSMISSION-WINDOW-CONTROL and feat:UNIFORMLY-DISTRIBUTED-TRANSMISSION"; + type boolean; + description + "Endpoint supports U-plane transmission window control via C-plane + (supports transmission-window-control = DYNAMIC) with independent transmission type per symbol"; + } + + leaf dynamic-uniformly-distributed-transmission-per-section-supported { + when "../dynamic-uniformly-distributed-transmission-supported = 'true'"; + type boolean; + description + "Endpoint supports U-plane transmission window control via C-plane + (supports transmission-window-control = DYNAMIC) with independent transmission type per section"; + } + + uses transmission-buffering-capacity { + when "static-transmission-window-control-supported = 'true' or dynamic-transmission-window-control-supported = 'true'"; + if-feature "feat:STATIC-TRANSMISSION-WINDOW-CONTROL or feat:DYNAMIC-TRANSMISSION-WINDOW-CONTROL"; + } + + leaf cplane-message-processing-limits-required { + if-feature feat:CPLANE-MESSAGE-PROCESSING-LIMITS; + type boolean; + config false; + description + "Endpoint requires applying C-Plane message processing limits defined in 'per-cplane-message-limits'. + and can be configured with cplane-message-processing-limits-enabled = TRUE"; + } + + uses per-cplane-message-limits { + when "cplane-message-processing-limits-required = 'true'"; + if-feature feat:CPLANE-MESSAGE-PROCESSING-LIMITS; + } + + leaf uplane-message-processing-limits-required { + if-feature feat:UPLANE-MESSAGE-PROCESSING-LIMITS; + type boolean; + config false; + description + "Endpoint has processing limits regarding U-Plane message. Detailed types of limits are defined in 'per-uplane-message-limits'."; + } + + uses per-uplane-message-limits { + when "uplane-message-processing-limits-required = 'true'"; + if-feature feat:UPLANE-MESSAGE-PROCESSING-LIMITS; + } + + leaf beam-update-contention-control-limits-required { + if-feature feat:BEAM-UPDATE-CONTENTION-CONTROL; + type boolean; + config false; + description + "Endpoint requires applying beam update contention control limits defined in 'beam-update-contention-control-limits'. + and can be configured with beam-update-contention-control-enabled = TRUE"; + } + + uses beam-update-contention-control-limits { + when "beam-update-contention-control-limits-required = 'true'"; + if-feature feat:BEAM-UPDATE-CONTENTION-CONTROL; + } + + leaf max-ack-nack-per-symbol { + type uint16; + description + "This value indicates the max number of ACK/NACK feedbacks supported by the endpoint in a symbol when + section extension 22 (ACK/NACK request) and section type 8 (ACK/NACK feedback) are supported by the endpoint. + The number of ACK/NACK feedbacks in a symbol is defined as the sum of 'numberofACKs' + 'numberofNACKs' in all C-Plane + messages sent by the endpoints in a symbol"; + } + + leaf non-scheduled-ueid-supported { + if-feature feat:NON-SCHEDULED-UEID; + type boolean; + default false; + description + "The parameter informs that the endpoint supports the capability of interpreting that those PRBs in the specified port are not allocated. + Please refer to CUS specification clause 7.9.13 for more details."; + } + + leaf se-11-continuity-flag-supported { + if-feature feat:SE11-WITH-CONTINUITY-BIT-SUPPORT; + type boolean; + config false; + description + "This flag is applicable for 'static-low-level-tx-endpoints' which support Section Extension 11 (SE 11). The + O-RU may choose to indicate its support for handling continuity flag as defined in CUS-Plane Clause 7.7.11.9 + by advertising this flag to TRUE/FALSE. + - Value of the flag advertised as 'TRUE' implies O-RU supports handling of 'continuity' flag in SE 11; + - Value of the flag advertised to 'FALSE' implies the O-RU does not support handling of 'continuity' flag in SE 11."; + } + + leaf se-23-prb-block-mode-supported { + if-feature feat:SE23-PRB-BLOCK-MODE-SUPPORT; + type boolean; + config false; + description + "This flag is applicable for 'static-low-level-tx-endpoints' which support Section Extension 23 (SE 23). The + O-RU may choose to indicate its support for prbMode = PRB-BLOCK mode flag as defined in CUS-Plane Clause 7.7.23.1 + by advertising this flag as TRUE/FALSE. + - Value of the flag advertised as 'TRUE' implies O-RU supports both prbMode = PRB-BLOCK mode of SE 23 + and prbMode = PRB-MASK which is the default mode when SE-23 is used. + - Value of the flag advertised as 'FALSE' implies O-RU supports prbMode = PRB-MASK which is the + default mode when SE-23 is used and the O-RU does not support prbMode = PRB-BLOCK mode."; + } + + leaf user-group-optimization-supported { + if-feature feat:USER-GROUP-OPTIMIZATION; + type boolean; + default false; + description + "The parameter indicates that if O-RU sets this feature flag to 'TRUE' for a given endpoint, and the O-DU chooses to + support this feature by setting 'user-group-optimization-enabled-tx' to 'TRUE' for static-low-level-tx-endpoints, + 'user-group-optimization-enabled-rx' to 'TRUE' for static-low-level-rx-endpoints,then the O-DU shall be required + to send all layers for a given user group UEs i.e., UEs with same time-frequency allocation using single C-Plane + section description. refer to CUS-Plane specification clause 7.9.14."; + } + + leaf se-20-multi-sd-punc-pattern-suported { + if-feature feat:SE20-MULTI-SD-PUNC-PATTERN-SUPPORT; + type boolean; + config false; + description + "This flag is applicable for 'static-low-level-[tr]x-endpoints' which support Section Estension 20 (SE-20). + The flag associated with each puncturing pattern in SE-20. The details of are defined in CUS-Plane Clause + 7.7.20.1. The O-RU indicates support for this feature by advertising this flag as TRUE/FALSE. + - Value of the flag advertised as 'TRUE' indicates O-RU supports handling of 'multiSDScope' field in SE-20. + - Value of the flag advertised as 'FALSE' indicates O-RU does not supports handling of 'multiSDScope' field in SE-20."; + } + + uses supported-configuration-combinations-grp; + + leaf-list supported-filter-indices { + type uint32; + description + "The list of supported values of filterIndex. + An empty list means that the set of supported values of filterIndex is not constrained."; + } + + leaf-list bf-profile-group { + if-feature feat:BF-DELAY-PROFILE; + type leafref { + path "/user-plane-configuration/endpoint-bf-profile-group/bf-profile-id"; + require-instance false; + } + description + "List of beamforming method groups supported by the endpoint, and the related delay profile values."; + } + + list supported-pass-band-for-filterindex09-per-scs { + key "scs"; + config false; + + description + "When filterIndex 0x9 is used, O-RU shall use minimum pass band filter among the reported passband filter sizes + that can accommodate the numPrbc and startPrbc of all the section descriptions associated with same frameStructure. + Please refer to CUS specification clause 7.5.2.3 for more details."; + + leaf scs { + type mcap:scs-config-type; + description + "Value corresponds to SCS values defined for frameStructure in C-plane."; + } + + leaf supported-max-num-msg-for-filterindex0x9-per-scs { + type uint16; + description + "Max number of filters can be actived at a time, + and this parameter limits the maximum number of ST3 mesaages with filterIndex set to 9 that O-DU can send so that the total number of filters active is below the maximum limit"; + } + + leaf-list filter-bandwidth { + type uint64; + units Hz; + description + "Bandwidth of a filter given in Hz. + If the list for the given SCS indicated via frameStructure is not empty, + O-DU should set filterIndex as 1001b for mixed numerology and other channels except PRACH and NB-IoT as specified in Table 7.5.2.3-1 when ST 3 C-plane message is used."; + + } + } + + container se24-dmrs-capabilities { + if-feature "feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ"; + description + "Container collecting SE24 DMRS BF capabilties. + Please refer to CUS specification clause 7.7.24 for more details."; + + leaf-list supported-entry-types { + type uint8; + description + "Supported values of entryType."; + } + leaf ue-time-partial-overlap-supported { + type boolean; + description + "Indicates if UE time partial overlap is supported. + See CUS-plane clause 12.6.1.2.1."; + } + leaf ue-freq-partial-overlap-supported { + type boolean; + description + "Indicates if UE frequency partial overlap is supported. + See CUS-plane clause 12.6.1.2.1."; + } + leaf max-user-groups-per-ue-in-time { + type uint16; + description + "The maximum supported number of user groups in time-domain per UE. + See CUS-plane clause 12.6.1.2.1"; + } + leaf different-transform-precoding-in-user-group-supported { + type boolean; + description + "Indicates if different transform precoding in user group is supported."; + } + leaf different-cdm-without-data-in-user-group-supported { + type boolean; + description + "Indicates if different cdm without data in user group is supported."; + } + leaf max-dmrs-configs-per-user-group-incl-first-last-prb { + type uint32; + description + "Maximum number of different DMRS configurations (excluding differences in dmrsPortNumber) per user group, + including first and last PRB."; + } + + leaf max-dmrs-configs-per-user-group-excl-first-last-prb { + type uint32; + description + "Maximum number of different DMRS configurations (excluding differences in dmrsPortNumber) per user group, + excluding first and last PRB."; + } + uses common-se24-dmrs-capabilities-grp; + grouping dmr-mask-capability-grp { + description + "Grouping of transform-precoding capabilities"; + + list dmrs-mask-capability { + key id; + description + "Parameters for DMRS mask capabilities"; + leaf id { + type uint16; + description + "An identifier of an entry in the list."; + } + leaf-list dmrs-symbol-mask { + type uint16; + description + "Supported DMRS symbol mask. + Empty list means all the possible symbol masks are supported."; + } + leaf max-dmrs-ant-port-number { + type uint32; + description + "Maximum DMRS antenna port number."; + } + leaf max-user-data-layers { + type uint32; + description + "Maximum number of user data layers"; + } + } + } + container transform-precoding-enabled { + description + "Parameters for SE24 DMRS BF capabilities with transform precoding enabled"; + uses dmr-mask-capability-grp; + list low-papr-config { + key id; + description + "Supported Low-PAPR configs"; + leaf id { + type uint16; + description + "An identifier of an entry in the list."; + } + leaf low-papr-type { + type uint16 { + range "0 .. 3"; + } + description + "Supported values of lowPaprType"; + } + leaf hopping-mode { + type uint16 { + range "0 .. 3"; + } + description + "Supported values of hoppingMode"; + } + } + } + container transform-precoding-disabled { + description + "Parameters for SE24 DMRS BF capabilities with transform precoding disabled"; + uses dmr-mask-capability-grp; + list dmrs-config { + key id; + description + "Supported DMRS configs"; + leaf id { + type uint16; + description + "An identifier of an entry in the list."; + } + leaf d-type { + type uint16 { + range "0 .. 1"; + } + description + "Supported values of dType."; + } + leaf pusch-dmrs-muxing-supported { + type boolean; + description + "Indicates if PUSCH DMRS muxing is supported."; + } + } + } + } + + leaf sinr-reporting-supported { + if-feature feat:DMRS-BF-EQ; + type boolean; + default false; + description + "Indicates if SINR reporting is supported."; + } + container sinr-reporting-capabilities { + when "../sinr-reporting-supported = 'true'"; + if-feature feat:DMRS-BF-EQ; + description + "Container collecting parameters related to capabilities of SINR reporting"; + leaf simultaneous-sinr-and-dmrs-sending-supported { + type boolean; + description + "Indicates if simultaneous SINR and DMRS sending is supported."; + } + list supported-sinr-resolutions { + key "id"; + description + "The list of supported SINR reporting resolutions. + This entry is applicable if maximum number of data layers in any user group in any slot does not exceed value of max-data-layers. + + Please refer to CUS specification clause 7.2.10 for more details."; + leaf id { + type uint16; + description + "Identifies a supported SINR reporting resolution."; + } + leaf sinr-max-data-layers { + type uint8; + description + "The maximum number of data layers scheduled in any user group in a slot."; + } + leaf-list sinr-per-prb { + type uint8; + description + "List of supported values. Indicates number of SINR values per PRB."; + } + leaf-list sinr-slot-mask { + type uint16; + description + "List of bitmasks representing supported patterns of SINR reporting in time domain. An emplty list means that the set of supported SINR reporting is unrestricted."; + } + } + container supported-sinr-reference-level { + description + "Supported range of SINR reference levels values. + + See CUS specification clause 7.2.10 for more details"; + leaf sinr-reference-level-min { + type decimal64 { + fraction-digits 4; + } + units dB; + description + "Minimum supported SINR reference level."; + } + leaf sinr-reference-level-max { + type decimal64 { + fraction-digits 4; + } + units dB; + description + "Maximum supported SINR reference level."; + } + } + list supported-sinr-compression-methods { + key "id"; + description + "The list of supported SINR compression methods."; + leaf id { + type uint16; + description + "Identifies a supported SINR compression method."; + } + uses cf:sinr-compression-details; + } + } + container supported-symb-reorder-capabilities { + if-feature "feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ"; + description + "List of capabilities related to symbol reordering."; + uses supported-symb-reorder-capability; + } + leaf-list supported-user-group-self-assembly-modes { + if-feature feat:USER-GROUP-SELF-ASSEMBLY; + type user-group-self-assembly-mode ; + description + "List of user group self assembly mode(s) supported by an endpoint. The O-RU may support SELF-ASSEMBLY-WITH-GROUP-ID and/or SELF-ASSEMBLY-WITHOUT-GROUP-ID."; + } + leaf-list continuity-block-sizes-supported { + if-feature "(feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ) and feat:CONTINUITY-BLOCK-SIZE"; + type uint16; + description + "List of continuity bock sizes supported by the O-RU."; + } + leaf eq-scale-offset-min { + if-feature feat:DMRS-BF-EQ; + type decimal64 { + fraction-digits 4; + } + units dB; + description + "Refer to cus specification 8.3.1.4, max value 0 dB"; + } + leaf eq-scale-offset-max { + if-feature feat:DMRS-BF-EQ; + type decimal64 { + fraction-digits 4; + } + units dB; + description + "Refer to cus specification 8.3.1.4, max value 0 dB"; + } + leaf-list rrm-meas-supported { + if-feature feat:RRM-MEAS-REPORTING; + type rrm-meas-types; + description + "List of rrm types supported by the endpoint type"; + } + leaf max-ipn-unalloc-reports-supported { + when "../rrm-meas-supported = 'MEAS-IPN-UNALLOC'"; + if-feature feat:RRM-MEAS-REPORTING; + type uint16; + description + "This value indicates the maximum number of ipn unallocated measurement reports per PRB (PRB range) and slot"; + } + leaf max-ipn-unalloc-symbols-supported { + when "../rrm-meas-supported = 'MEAS-IPN-UNALLOC'"; + if-feature feat:RRM-MEAS-REPORTING; + type uint16; + description + "This parameter indicates maximum number of measured symbols of all measurement reports for a PRB (PRB range) in the slot "; + } + leaf max-ipn-alloc-reports-supported { + when "../rrm-meas-supported = 'MEAS-IPN-ALLOC'"; + if-feature feat:RRM-MEAS-REPORTING; + type uint16; + description + "This value indicates the maximum number of ipn alloc measurement reports per PRB per slot. Relationship between this value and alloc-ipn-per-sym-supported can be found in CUS plan specification clause 9.2.2.4"; + } + leaf-list alloc-ipn-per-dmrs-sym-grp-supported { + when "../rrm-meas-supported = 'MEAS-IPN-ALLOC'"; + if-feature feat:RRM-MEAS-REPORTING; + type uint8 { + range "0 .. 1"; + } + description + "This parameter indicates alloc-ipn measurement type(s) supported by the O-RU. + Refer to CUS specification clause 9.2.2.4 for details"; + } + leaf se-10-bgt-11b-supported { + type boolean; + default false; + description + "The parameter is applicable for static-low-level-[tr]x-endpoints supporting Section Extension 10. This flag + if set to TRUE indicates that the O-RU advertised endpoint, supporting Section Extension 10 supports beamGroupType = 11b. + It is mandatory for endpoints supporting DMRS-BF-EQ/DMRS-BF-NEQ beamforming methods to support beamGroupType = 11b. + refer to CUS-Plane specification clause 7.7.10.1"; + } + + leaf-list se-27-odu-controlled-dimensionality-reduction-supported { + if-feature feat:SE27-ODU-CONTROLLED-DIMENSIONALITY-REDUCTION; + type enumeration { + enum STATIC { + description + "Static O-DU controlled dimnesionality reduction enabled."; + } + enum DYNAMIC { + description + "Dynamic O-DU controlled dimnesionality reduction enabled."; + } + } + description + "Supported type O-DU controlled dimensionality reduction using SE27. + Please refer to CUS specification clause 7.7.27 for more details."; + } + leaf se-27-omission-when-enabled-supported { + when "(../se-27-odu-controlled-dimensionality-reduction-supported = 'STATIC') + or (../se-27-odu-controlled-dimensionality-reduction-supported = 'DYNAMIC')"; + if-feature feat:SE27-ODU-CONTROLLED-DIMENSIONALITY-REDUCTION; + type boolean; + description + "Indicates if O-RU supports omission of SE27 when O-DU controlled dimensionality reduction using SE27 is enabled. + Please refer to CUS specification clause 7.7.27 for more details."; + } + list supported-se-27-configurations { + when "(../se-27-odu-controlled-dimensionality-reduction-supported = 'STATIC') + or (../se-27-odu-controlled-dimensionality-reduction-supported = 'DYNAMIC')"; + if-feature feat:SE27-ODU-CONTROLLED-DIMENSIONALITY-REDUCTION; + key number-of-ue-data-layers; + description + "List of supported values of numElements parameter per number of UE + data layers scheduled in user group. + Please refer to CUS specification clause 7.7.27 for more details."; + leaf number-of-ue-data-layers { + type uint16; + description + "Number of UE data layers scheduled in user group."; + } + leaf-list supported-se-27-num-elements { + type uint16; + description + "Supported values of numElements in SE27 for the provided number of UE data layers."; + } + } + } + + list transmission-window-schedules { + if-feature feat:STATIC-TRANSMISSION-WINDOW-CONTROL; + key id; + description + "Parameters for scheduled UL U-plane message transmission (static transmission window control)"; + leaf id { + type uint16; + description + "Identifies a UL U-plane message transmission schedule"; + } + list schedule { + key symbol; + description + "Defines transmission window offset for given symbol. + If no entry is present for a symbol then O-RU assumes offset=0 for that symbol. + Entries with offset=0 shall be omitted."; + leaf symbol { + type uint16; + description + "Number of a symbol within a frame for which transmission offset is given."; + } + leaf offset { + type uint16; + description + "Transmission window offset; expressed as number of symbols the transmission window start is delayed by. + This value is added to u-plane-transmission-control/transmission-window-offset. + For restrictions on value of offset see description of transmission-window-offset."; + } + } } list endpoint-capacity-sharing-groups { @@ -1286,11 +3596,18 @@ module o-ran-uplane-conf { "Represents groups of endpoints that share capacity. Depending on O-RU implementation, processing resources that handle CU-plane (e.g. memory to keep sections and beams) could be allocated per endpoint or shared between several endpoints. - To address this O-RU shall reports own capability per endpoint (see endpoint-types) + To address this O-RU shall report own capability per endpoint (see endpoint-types) and per group of endpoints sharing capacity. If endpoint is in multiple groups then resulting constraint is minimum over all groups. Note: values of parameters representing capacity that is not shared between endpoints in a group - shall be set to max value of specific parameter; this effectively removes related constraint."; + shall be set to max value of specific parameter; this effectively removes related constraint. + Note: For any endpoint supporting mixed numerology within slot/symbol (multiple-numerology-supported=TRUE) + * Interval specific (per-slot and per-symbol) capacity constraints instantaneous capacity usage + (i.e. capacity is shared/distributed between all numerologies used at an instant of time). + * Instantaneous capacity usage is the sum of capacity usages of all intervals of a specific type (slot/symbol) + that share the instant of time at which instantaneous capacity usage is evaluated regardless of numerology. + * Capacity used in an interval is allocated at the start of the interval and is released at the end of the interval + (e.g. capacity used for symbol #N of numerology #M is unavailable during symbol #N and available for reuse after symbol #N ends)."; leaf id { type uint16; @@ -1302,6 +3619,7 @@ module o-ran-uplane-conf { uses endpoint-beam-capacity; uses endpoint-prb-capacity; uses endpoint-numerology-capacity; + uses endpoint-section-extension-limits; leaf max-endpoints { type uint16; @@ -1318,6 +3636,31 @@ module o-ran-uplane-conf { description "Number of endpoints supporting non-managed delay that can be used (configured for use) at a time"; } + uses transmission-buffering-capacity { + if-feature "feat:STATIC-TRANSMISSION-WINDOW-CONTROL or feat:DYNAMIC-TRANSMISSION-WINDOW-CONTROL"; + } + + uses per-cplane-message-limits { + if-feature feat:CPLANE-MESSAGE-PROCESSING-LIMITS; + } + leaf max-ack-nack-per-symbol { + type uint16; + description + "This value indicates the max number of ACK/NACK feedbacks supported by the endpoint sharing group in a symbol when + section extension 22 (ACK/NACK request) and section type 8 (ACK/NACK feedback) are supported by the endpoint sharing group. + The number of ACK/NACK feedbacks in a symbol is defined as the sum of 'numberofACKs' + 'numberofNACKs' in all C-Plane + messages sent by the endpoints in group in a symbol"; + } + uses supported-configuration-combinations-grp; + + container se24-dmrs-capabilities { + if-feature "feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ"; + description + "Container collecting SE24 DMRS BF capabilties. + Please refer to CUS specification clause 7.7.24 for more details."; + + uses common-se24-dmrs-capabilities-grp; + } } list endpoint-prach-group { @@ -1355,7 +3698,10 @@ module o-ran-uplane-conf { } list compression-method-supported { - uses cf:compression-parameters; + uses cf:compression-method-grouping; + uses cf:compresion-format-grp { + status deprecated; + } leaf-list fs-offset { if-feature cf:CONFIGURABLE-FS-OFFSET; @@ -1370,7 +3716,153 @@ module o-ran-uplane-conf { "List of supported compression methods by O-RU Note: if O-RU supports different compression methods per endpoint then please refer to endpoints to have information what - exactly is supported on paticular endpoint"; + exactly is supported on particular endpoint"; + } + } + + grouping supported-configuration-combinations-grp { + description + "Grouping of supported freqOffset & PRB range combinations."; + + list supported-configuration-combinations { + key "combination-id"; + config false; + + leaf combination-id { + type uint32; + description + "Identification number for a combination."; + } + + list set { + key "set-id"; + + leaf set-id { + type uint32; + description + "Identification number for a set."; + } + + leaf max-overlapping-instances { + type uint32; + description + "Max number of configs of the set that can be used at the same time."; + } + + list config { + key "config-id"; + + leaf config-id { + type uint32; + description + "Identification number for a config."; + } + + leaf-list scs { + type mcap:scs-config-type; + description + "Value corresponds to SCS values defined for frameStructure in C-plane."; + } + + leaf-list carrier-types { + type enumeration { + enum NR { + description + "5G technology"; + } + enum LTE { + description + "LTE technology"; + } + enum DSS_LTE_NR { + if-feature mcap:DSS_LTE_NR; + description + "NR and LTE technologies in Dynamic Spectrum Sharing mode"; + } + } + description + "Type of carrier. Indicates array-carrier technology."; + } + + leaf filter-pass-bandwidth { + type uint64; + units Hz; + + description + "Width of a filter given in Hz. + The filter center frequency is given in center-of-channel-bandwidth of an array carrier. + When filterIndex 0x9 is used, O-RU shall report all the passband filter bandwidth per scs using the list supported-pass-band-for-filterindex09-per-scs."; + } + + leaf max-prb-range { + type uint32; + + description + "Maximum frequency range of PRBs that may be requested per frequency offset. Either contiguously or non-contiguously. + Total number of PRBs requested per config shall not exceed this value."; + } + + leaf center-from-freqoffset { + type boolean; + description + "This node allows to distinguish between combinations valid when + center-from-freqoffset-enabled is set to TRUE and combinations + valid when center-from-freqoffset-enabled is set to FALSE"; + } + + leaf-list supported-filter-indices { + type uint32; + description + "The list of supported values of filterIndex. + An empty list means that the set of supported values of filterIndex is constrained by the supported-filter-indices + provided in the endpoint type."; + } + + description + "Supported freqOffset & PRB range configuration. + Configuration is an instance of processing output equivalent to single FFT operation."; + } + description + "Set of freqOffset & PRB range configurations that require same resource allocation."; + } + description + "List of supported combinations of freqOffset & PRB range configurations. + If a leaf is not present in a list element it implies there is no constraint on that particular + parameter for the configuration in question."; + } + leaf center-from-freqoffset-supported { + type boolean; + description + "Endpoint's support for autonomous center frequency (k0) calculation based on frequency offset. + This capability applies only to RX endpoints."; + } + } + + grouping supported-symb-reorder-capability { + description + "List of capabilities related to symbol reordering."; + leaf-list supported-symb-reorder-capability { + type symb-reorder-capability; + description + "List of supported symbol reordering methods."; + } + leaf max-num-symbol-reordering-pattern-per-slot { + when "../supported-symb-reorder-capability = 'PER-SECTION-TX-WINDOW-REASSIGNMENT'"; + type uint16; + description + "This parameter defines the maximum number of unique symbol reassignment patterns supported + per slot per rx-array-carrier, where a 'symbol reassignment pattern' comprises 14 symbol + numbers specifying an altered symbol order (using txWinForOnAirSymbol0~13). The maximum + value applies over all SE25 invocations, including when an SE25 invocation includes + multiple symbol reassignment patterns. Repeated invocations of a single symbol reassignment + pattern shall count as a single unique instance. When endpoints of different endpoint-types + with different values of this parameter are associated with an rx-array-carrier, then the + smallest of the values shall apply."; + } + leaf-list up-symbolId-type-supported { + type up-SymbolId-type; + description + "List of supported symbol reordering symbolId interpretation capability."; } } @@ -1472,7 +3964,7 @@ module o-ran-uplane-conf { type boolean; description - "Informs if endpoint supports realtime variable bit with"; + "Informs if endpoint supports real-time variable bit with"; } leaf supported-compression-set-id { @@ -1487,6 +3979,22 @@ module o-ran-uplane-conf { uses endpoint-tdd-pattern-support; + leaf-list energy-sharing-group-id { + if-feature feat:MPLANE-DATA-LAYER-CONTROL; + type uint8; + description + "This value indicates a group of common underlying HW that can be used for energy savings."; + } + leaf se10-member-candidate-list { + if-feature feat:SE10-MEMBER-CANDIDATE-LIST; + type leafref { + path "/user-plane-configuration/se10-member-candidate-tx-lists/id"; + require-instance false; + } + description + "This parameter is a pointer to a given member-candidate list entry in 'se10-member-candidate-tx-lists'. + This parameter shall be applicable for endpoints supporting Section Extension 10"; + } } list static-low-level-rx-endpoints { @@ -1564,7 +4072,7 @@ module o-ran-uplane-conf { type boolean; description - "Informs if endpoint supports realtime variable bit with"; + "Informs if endpoint supports real-time variable bit with"; } leaf supported-compression-set-id { @@ -1581,6 +4089,42 @@ module o-ran-uplane-conf { uses endpoint-tdd-pattern-support; + leaf transmission-order { + when "(/user-plane-configuration/endpoint-types[id=current()/../endpoint-type]/ordered-transmission-supported = 'true')"; + if-feature feat:ORDERED-TRANSMISSION; + type uint32; + description + "The value indicates relative order of sending U-plane messages specific to same symbol + and transmission window by two endpoints with ordered-transmission = TRUE + belonging to the same transmission-order-group; + multiple endpoints may report the same value if their relative sending order is not guaranteed"; + } + + leaf transmission-order-group { + when "(/user-plane-configuration/endpoint-types[id=current()/../endpoint-type]/ordered-transmission-supported = 'true')"; + if-feature feat:ORDERED-TRANSMISSION; + type uint32; + description + "The value indicates a group of endpoints that preserve relative ordering of message sending; + message sending between endpoints in different groups is not guaranteed"; + } + + leaf-list energy-sharing-group-id { + if-feature feat:MPLANE-DATA-LAYER-CONTROL; + type uint8; + description + "This value indicates a group of common underlying HW that can be used for energy savings."; + } + leaf se10-member-candidate-list { + if-feature feat:SE10-MEMBER-CANDIDATE-LIST; + type leafref { + path "/user-plane-configuration/se10-member-candidate-rx-lists/id"; + require-instance false; + } + description + "This parameter is a pointer to a given member-candidate list entry in 'se10-member-candidate-rx-lists'. + This parameter shall be applicable for endpoints supporting Section Extension 10"; + } } list low-level-tx-endpoints { @@ -1588,7 +4132,7 @@ module o-ran-uplane-conf { description "Object model for low-level-tx-endpoints configuration - augmented static-low-level-tx-endpoints by local-address - which cannot be added to static low-level-tx-endpoints as we cannot have modificable element in static object"; + which cannot be added to static low-level-tx-endpoints as we cannot have modifiable element in static object"; leaf name { type leafref { @@ -1601,71 +4145,250 @@ module o-ran-uplane-conf { "Unique name of low-level-tx-endpoint object. Reference to static object"; } - container compression { - presence - "This container shall exists to avoid missaligned compression - methods between devices"; - + leaf sro-id { + if-feature feat:SHARED-ORU-MULTI-OPERATOR; + type leafref { + path "/or-user:users/or-user:user/or-user:sro-id"; + } description - "Container which consists of global configurable parameters for compression"; - - uses cf:compression-details; - - leaf fs-offset { - if-feature cf:CONFIGURABLE-FS-OFFSET; - type uint8; - default 0; - description - "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. - Please refer to CU-Plane specification for details"; - } - - list dynamic-compression-configuration { - when "../compression-type = 'DYNAMIC'"; - key "id"; - unique "compression-method iq-bitwidth fs-offset"; - description - "List of possible configuration in case dynamic configuration is used - Note: In case of empty list all available compressions can be choosen dynamically - and default fs-offset is taken (0)."; - - leaf id { - type uint16; - description - "Identification number for particular compression"; - } - - uses cf:compression-method-grouping; - - leaf fs-offset { - if-feature cf:CONFIGURABLE-FS-OFFSET; - type uint8; - default 0; - description - "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. - Please refer to CU-Plane specification for details"; - } - } + "An optional shared resource operator associated with this list entry. + When present, indicates that the list entry corresponds to a low-level-tx-endpoint + associated with a shared resource operator where the sro-id identifies + a specific shared resource operator. + This schema-node is used to refine NACM privileges for shared + resource operators"; } + + uses tx-endpoint-compression-grouping; uses scs-config; container e-axcid { uses eaxc; description - "Contains local address of low level TX endpoint offered by Netconf server."; + "Contains local address of low level TX endpoint offered by NETCONF server."; } uses coupling-methods; leaf configurable-tdd-pattern-supported { + if-feature mcap:CONFIGURABLE-TDD-PATTERN-SUPPORTED; type leafref { - path "/user-plane-configuration/static-low-level-rx-endpoints[name=current()/../name]/configurable-tdd-pattern-supported"; + path "/user-plane-configuration/static-low-level-tx-endpoints[name=current()/../name]/configurable-tdd-pattern-supported"; require-instance false; } description "RO to RW parameter mapping - needed for conditional under tx-array-carrier"; } + + leaf cplane-message-processing-limits-enabled { + if-feature feat:CPLANE-MESSAGE-PROCESSING-LIMITS; + type boolean; + default false; + description + "TRUE: O-DU shall support the C-Plane message processing limits and has selected to adhere to the C-Plane limits defined in 'per-cplane-message-limits'. + FALSE: O-DU shall not support C-Plane message processing limits and endpoint limits defined in 'per-cplane-message-limits' shall not apply"; + } + + leaf uplane-message-section-header-limit-enabled { + if-feature feat:UPLANE-MESSAGE-PROCESSING-LIMITS; + type boolean; + default false; + description + "O-DU declares to obey the limit exposed via the leaf max-section-headers-per-uplane-message by setting this parameter to 'true'. + For details of this parameter's usage, please refer to M-plane spec clause 15.10"; + } + + leaf beam-update-contention-control-enabled { + if-feature feat:BEAM-UPDATE-CONTENTION-CONTROL; + type boolean; + default false; + description + "TRUE: O-DU shall support beam update contention control feature of O-RU.Thus requiring O-DU to comply with beam + updates restrictions defined in CUS-Plane Spec Section 'Weight-based dynamic beamforming'. In this case applicable + beam limits defined in 'beam-update-contention-control-limits' shall apply. + FALSE: O-DU shall not support beam update contention control feature of O-RU. Applicable beam limits defined in + 'endpoint-beam-capacity' shall apply"; + } + + container channel-information-prb-group-configuration { + if-feature feat:CHANNEL-INFORMATION-PRB-GROUP; + description + "Container for configurable parameters for channel information prb group"; + + leaf enable-ci-prb-group { + type boolean; + description + "Informs whether or not to enable channel information PRB group in the O-RU, + if its value is set to true, the O-RU shall receive and process channel + information (e.g., ST6) with PRB group size of configured ci-prb-group-size."; + } + + leaf ci-prb-group-size { + type uint8 { + range "2..254"; + } + description + "The configured channel information PRB group size. + If enable-ci-prb-group is configured as TRUE, and the IE ciPrbGroupSize doesn't exist in a section description for channel information, + the parameter ci-prb-group-size shall be used for this section description. + If the IE ciPrbGroupSize exists in a section description for channel information, + no matter whether enable-ci-prb-group is configured as TRUE, the IE ciPrbGroupSize shall be used for this section description."; + } + } + + leaf non-scheduled-ueid-enabled{ + if-feature feat:NON-SCHEDULED-UEID; + type boolean; + default false; + description + "If O-DU configures 'non-scheduled-ueid-enabled' = TRUE, + and Section Extension 10 is applied to Section Types 5 and beamGroupType = 10b, + and the O-DU set ueId of a port in Section Extension 10 to 0x7FFF, + the endpoint shall interpret that the PRBs in the section description are not scheduled for this port. + The endpoint only interprets this leaf if non-scheduled-ueid-supported = true is reported in the related static endpoint, in other cases this leaf is ignored. + Please refer to CUS specification clause 7.9.13 for more details."; + } + + leaf se-11-continuity-flag-enabled { + if-feature feat:SE11-WITH-CONTINUITY-BIT-SUPPORT; + type boolean; + default false; + description + "By setting the value of this leaf node to TRUE, the O-DU declares it will provide 'continuity' flag information in SE 11. + In this case the O-DU shall provide PRB region 'continuity' information in every SE 11 sent to the applicable low-level-tx-endpoint(s) + (static-low-level-tx-endpoit(s) which indicated support of this feature by setting 'se-11-continuity-flag-supported' flag to TRUE). + In case + - O-DU is running SW conformant to older O_RAN release and does not interpret the flag 'se11-continuity-bit-enabled' or + - the O-DU sets 'se11-continuity-flag-enabled' = FALSE, + no information regarding PRB region continuity is sent to the O-RU. In such case the O-RU shall process the PRB bundles as + it would have in the absence of the 'continuity' flag in SE11. + This behavior shall be same as when O-RU receives message with 'reserved' field value set to '0b'."; + } + + leaf prg-size-supp-se-21-with-st6-enabled { + if-feature feat:PRG-SIZE-SUPP-SE-21-WITH-ST6; + type boolean; + default false; + description + "TRUE: O-DU shall send prgSize information from the O-DU to the O-RU as described in Clause 7.7.2.3.1 of the CUS-Plane spec. + FALSE:prgSize information cannot be sent from the O-DU to the O-RU using Section Type 6."; + } + + leaf prg-size-supp-se-21-with-st5-enabled { + if-feature feat:PRG-SIZE-SUPP-SE-21-WITH-ST5; + type boolean; + default false; + description + "TRUE: O-DU shall send prgSize information from the O-DU to the O-RU as described in Clause 7.7.2.3.2 of the CUS-Plane spec. + FALSE:prgSize information cannot be sent from the O-DU to the O-RU using Section Type 5."; + } + + leaf user-group-optimization-enabled-tx { + if-feature feat:USER-GROUP-OPTIMIZATION; + type boolean; + default false; + description + "The parameter indicates that if the O-RU advertises the feature flag to 'user-group-optimization-supported' set to + TRUE for associated static-level-tx-endpoint, the O-DU may choose to set this flag to 'TRUE' or 'FALSE'. + - If set to 'TRUE', the O-DU shall be required to send all layers for a given user group UEs i.e., UEs with same + time-frequency allocation using single C-Plane section description. + - If set to 'FALSE', the O-DU restriction to send all layers for a given user group UEs shall not apply."; + } + + leaf se-20-multi-sd-punc-pattern-enabled-tx { + if-feature feat:SE20-MULTI-SD-PUNC-PATTERN-SUPPORT; + if-feature feat:USER-GROUP-OPTIMIZATION; + type boolean; + default false; + description + "This flag is applicable for O-RU adevertised static-level-tx-endpoint advertises for which + 'se-20-multi-sd-punc-pattern-suported' = TRUE. The flag is configured by the O-DU to TRUE/FALSE. + - Value of the flag set to 'TRUE' indicates O-DU shall set the value 'multiSDScope' in SE-20 to TRUE/FALSE. + - Value of the flag set to 'FALSE' indicates O-DU shall not set the value 'multiSDScope' in SE-20. The corresponding + fields shall be interpretted as reserved field by the O-RU."; + } + + container combination-configuration { + leaf endpoint-type { + type leafref { + path "/user-plane-configuration/static-low-level-tx-endpoints[name=current()/../../name]/endpoint-type"; + require-instance false; + } + description + "Leafref to the endpoint-type of the endpoint."; + } + + leaf combination-id { + type leafref { + path "/user-plane-configuration/endpoint-types[id = current()/../endpoint-type]/supported-configuration-combinations/combination-id"; + require-instance false; + } + description + "A parameter describing which configuration combination will be used by the endpoint."; + } + + list configurations { + key id; + + leaf id { + type uint32; + description + "Identifier of an entry in the list"; + } + + leaf set-id { + type leafref { + path "/user-plane-configuration/endpoint-types[id = current()/../../endpoint-type]/supported-configuration-combinations[combination-id = current()/../../combination-id]/set/set-id"; + require-instance false; + } + description + "A parameter describing which set will be used by the endpoint."; + } + + leaf config-id { + type leafref { + path "/user-plane-configuration/endpoint-types[id = current()/../../endpoint-type]/supported-configuration-combinations[combination-id = current()/../../combination-id]/set[set-id = current()/../set-id]/config/config-id"; + require-instance false; + } + description + "A parameter describing which config will be used by the endpoint."; + } + + description + "An optional list describing which configurations will be used by the endpoint. + The list can be provided by an O-DU, so that an O-RU can optimize the processing in the endpoint. + If the list is empty, then O-DU intends to use every capability within combination identified by combination-id."; + } + + description + "An optional container describing which configuration combination will be used by the endpoint. + The container can be provided by an O-DU, so that an O-RU can optimize the processing in the endpoint."; + } + + leaf configured-bf-profile-id { + if-feature feat:BF-DELAY-PROFILE; + type leafref { + path "/user-plane-configuration/endpoint-types/bf-profile-group"; + require-instance false; + } + description + "Configure the beamforming method list and related delay profiles will be used by the endpoint. + The configured-bf-profile-id must be one of the supported bf-profile-id(s) reported by the endpiont-type related to the endpoint. + If O-DU does not set configured-bf-profile-id, the O-RU shall not support the feature."; + } + + leaf-list bf-methods { + if-feature "feat:SELECTED-BF-METHOD-CONFIGURATION and feat:BF-DELAY-PROFILE"; + type beamforming-method-type; + description + "Beamforming method(s) configured on the endpoint. + + If the value of configured-bf-profile-id is set, then beamforming method(s) configured on the endpoint shall + be selected from the set of supported beamforming methods of the selected endpoint-bf-profile-group + Otherwise, the beamforming method(s) configured on the endpoint shall be selected from the set of supported + beamforming methods reported in the related endpoint-bf-profile-group(s)."; + } } list low-level-rx-endpoints { @@ -1673,7 +4396,7 @@ module o-ran-uplane-conf { description "Object model for low-level-rx-endpoint configuration - augmented static-low-level-rx-endpoints by local-address - which cannot be added to static low-level-rx-endpoints as we cannot have modificable element in static object"; + which cannot be added to static low-level-rx-endpoints as we cannot have modifiable element in static object"; leaf name { type leafref { @@ -1686,49 +4409,21 @@ module o-ran-uplane-conf { "Unique name of low-level-rx-endpoint object. Reference to static object"; } - container compression { + leaf sro-id { + if-feature feat:SHARED-ORU-MULTI-OPERATOR; + type leafref { + path "/or-user:users/or-user:user/or-user:sro-id"; + } description - "Container which consists of global configurable parameters for compression"; - - uses cf:compression-details; - - leaf fs-offset { - if-feature cf:CONFIGURABLE-FS-OFFSET; - type uint8; - default 0; - description - "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. - Please refer to CU-Plane specification for details"; - } - - list dynamic-compression-configuration { - when "../compression-type = 'DYNAMIC'"; - key "id"; - unique "compression-method iq-bitwidth fs-offset"; - description - "List of possible configuration in case dynamic configuration is used - Note: In case of empty list all available compressions can be choosen dynamically - and default fs-offset is taken (0)."; - - leaf id { - type uint16; - description - "Identification number for particular compression"; - } - - uses cf:compression-method-grouping; - - leaf fs-offset { - if-feature cf:CONFIGURABLE-FS-OFFSET; - type uint8; - default 0; - description - "Adjusts FS (full scale) value of IQ format relative to FS derived from unmodified IQ format. - Please refer to CU-Plane specification for details"; - } - } + "An optional shared resource operator associated with this list entry. + When present, indicates that the list entry corresponds to a low-level-rx-endpoint + associated with a shared resource operator where the sro-id identifies + a specific shared resource operator. + This schema-node is used to refine NACM privileges for shared + resource operators"; } + uses rx-endpoint-compression-grouping; uses scs-config; list ul-fft-sampling-offsets { @@ -1751,8 +4446,11 @@ module o-ran-uplane-conf { description "Determines time advance of capture window for FFT. Value represents time advance of capture window start in relation to the end of CP. Unit is Ts. + The value of this parameter shall not be larger than the duration of the cyclic prefix; in case of + variability of the cyclic prefix duration, the limit is the shortest duration of the cyclic prefix in use. Note: value of this parameter is usually set to '0' (zero) for PRACH channels. - Any phase offset resulting from the non-zero value of this parameter is handled in O-DU."; + Any phase offset resulting from the non-zero value of this parameter is handled in O-DU. + Please refer to the O-RAN CUS-Plane, clause 4.4.3 for more details on the intended usage and value restrictions."; } } @@ -1760,7 +4458,7 @@ module o-ran-uplane-conf { uses eaxc; description - "Contains local address of low level RX endpoint offered by Netconf server."; + "Contains local address of low level RX endpoint offered by NETCONF server."; } leaf eaxc-gain-correction { @@ -1771,7 +4469,7 @@ module o-ran-uplane-conf { units dB; default 0; description - "eAxC specifc part of overall gain_correction. + "eAxC specific part of overall gain_correction. gain_correction = common array-carrier gain-correction + eAxC-gain-correction."; } @@ -1810,7 +4508,7 @@ module o-ran-uplane-conf { } description "This parameter creates reference to static SRS configuration applicable for particular endpoint"; - } + } leaf configurable-tdd-pattern-supported { if-feature mcap:CONFIGURABLE-TDD-PATTERN-SUPPORTED; @@ -1820,6 +4518,285 @@ module o-ran-uplane-conf { } description "RO to RW parameter mapping - needed for conditional under rx-array-carrier"; } + + uses u-plane-transmission-control; + + leaf ordered-transmission { + if-feature feat:ORDERED-TRANSMISSION; + type boolean; + default false; + description + "Commands O-RU to order UL U-plane message transmission between endpoints + Meaningless when ordered transmission is not supported for particular endpoint."; + } + + leaf cplane-message-processing-limits-enabled { + if-feature feat:CPLANE-MESSAGE-PROCESSING-LIMITS; + type boolean; + default false; + description + "TRUE: O-DU shall support C-Plane message processing limits and has selected to adhere + to the C-Plane limits defined in 'per-cplane-message-limits'. + FALSE: O-DU shall not support C-Plane message processing limits and hence C-Plane and + endpoint limits defined in 'per-cplane-message-limits' shall not apply"; + } + + leaf beam-update-contention-control-enabled { + if-feature feat:BEAM-UPDATE-CONTENTION-CONTROL; + type boolean; + default false; + description + "TRUE: O-DU shall support beam update contention control feature of O-RU.Thus requiring O-DU to comply with beam + updates restrictions defined in CUS-Plane Spec Section 'Weight-based dynamic beamforming'. In this case applicable + beam limits defined in 'beam-update-contention-control-limits' shall apply. + FALSE: O-DU shall not support beam update contention control feature of O-RU. Applicable beam limits defined in + 'endpoint-beam-capacity' shall apply"; + } + + leaf non-scheduled-ueid-enabled{ + if-feature feat:NON-SCHEDULED-UEID; + type boolean; + default false; + description + "If O-DU configures 'non-scheduled-ueid-enabled' = TRUE, + and Section Extension 10 is applied to Section Types 5 and beamGroupType = 10b, + and the O-DU set ueId of a port in Section Extension 10 to 0x7FFF, + the endpoint shall interpret that the PRBs in the section description are not scheduled for this port. + The endpoint only interprets this leaf if non-scheduled-ueid-supported = true is reported in the related static endpoint, in other cases this leaf is ignored. + Please refer to CUS specification clause 7.9.13 for more details."; + } + + leaf center-from-freqoffset-enabled { + type boolean; + default false; + description + "Endpoint is enabled / prohibited to autonomously calculate center frequency based on frequency offset."; + } + + leaf user-group-optimization-enabled-rx{ + if-feature feat:USER-GROUP-OPTIMIZATION; + type boolean; + default false; + description + "The parameter indicates that if the O-RU advertises the feature flag to 'user-group-optimization-supported' set to + TRUE for associated static-level-rx-endpoint, the O-DU may choose to set this flag to 'TRUE' or 'FALSE'. + - If set to 'TRUE', the O-DU shall be required to send all layers for a given user group UEs i.e., + UEs with same time-frequency allocation using single C-Plane section description. + - If set to 'FALSE', the O-DU restriction to send all layers for a given user group UEs shall not apply."; + } + + leaf se-20-multi-sd-punc-pattern-enabled-rx { + if-feature feat:SE20-MULTI-SD-PUNC-PATTERN-SUPPORT; + if-feature feat:USER-GROUP-OPTIMIZATION; + type boolean; + default false; + description + "This flag is applicable for O-RU adevertised static-level-rx-endpoint advertises for which + 'se-20-multi-sd-punc-pattern-suported' = TRUE. The flag is configured by the O-DU to TRUE/FALSE. + - Value of the flag set to 'TRUE' indicates O-DU shall set the value 'multiSDScope' in SE-20 to TRUE/FALSE. + - Value of the flag set to 'FALSE' indicates O-DU shall not set the value 'multiSDScope' in SE-20. The corresponding + fields shall be interpretted as reserved field by the O-RU."; + } + + container combination-configuration { + leaf endpoint-type { + type leafref { + path "/user-plane-configuration/static-low-level-rx-endpoints[name=current()/../../name]/endpoint-type"; + require-instance false; + } + description + "Leafref to the endpoint-type of the endpoint."; + } + + leaf combination-id { + type leafref { + path "/user-plane-configuration/endpoint-types[id = current()/../endpoint-type]/supported-configuration-combinations/combination-id"; + require-instance false; + } + description + "A parameter describing which configuration combination will be used by the endpoint."; + } + + list configurations { + key id; + + leaf id { + type uint32; + description + "Identifier of an entry in the list"; + } + + leaf set-id { + type leafref { + path "/user-plane-configuration/endpoint-types[id = current()/../../endpoint-type]/supported-configuration-combinations[combination-id = current()/../../combination-id]/set/set-id"; + require-instance false; + } + description + "A parameter describing which set will be used by the endpoint."; + } + + leaf config-id { + type leafref { + path "/user-plane-configuration/endpoint-types[id = current()/../../endpoint-type]/supported-configuration-combinations[combination-id = current()/../../combination-id]/set[set-id = current()/../set-id]/config/config-id"; + require-instance false; + } + description + "A parameter describing which config will be used by the endpoint."; + } + + description + "An optional list describing which configurations will be used by the endpoint. + The list can be provided by an O-DU, so that an O-RU can optimize the processing in the endpoint."; + + } + + description + "An optional container describing which configuration combination will be used by the endpoint. + The container can be provided by an O-DU, so that an O-RU can optimize the processing in the endpoint."; + } + + leaf configured-bf-profile-id { + if-feature feat:BF-DELAY-PROFILE; + type leafref { + path "/user-plane-configuration/endpoint-types/bf-profile-group"; + require-instance false; + } + description + "Configure which beamforming method list and related delay profile will be used by the endpoint. + The configured-bf-profile-id must be one of the supported bf-profile-id(s) reported by the endpiont-type related to the endpoint. + If O-DU does not set configured-bf-profile-id, the O-RU shall not support the feature."; + } + + leaf sinr-reporting-enabled { + if-feature feat:DMRS-BF-EQ; + type boolean; + default false; + description + "Enables SINR reporting for the endpoint."; + } + + container sinr-reporting-configuration { + when "../sinr-reporting-enabled = 'true'"; + if-feature feat:DMRS-BF-EQ; + description + "Container collecting parameters related to configuration of SINR reporting"; + + container sinr-resolution { + description + "Container collecting parameters related to configuration of SINR reporting + resolution. + Supported values are constrained by the values reported in endpoint-types/supported-sinr-resolutions. + + Please refer to CUS specification clause 7.2.10 for more details."; + leaf sinr-per-prb { + type uint8; + description + "Number of SINR values per PRB."; + } + leaf sinr-slot-mask { + type uint16; + description + "Pattern of SINR reports represented as a bitmask."; + } + } + container sinr-compression { + description + "Configuration of SINR compression."; + uses cf:sinr-compression-details; + leaf sinr-reference-level-config { + type decimal64 { + fraction-digits 4; + } + units dB; + description + "SINR reference level."; + } + + leaf sinr-reference-level-used { + type decimal64 { + fraction-digits 4; + } + units dB; + config false; + description + "SINR reference level used. This parameter shall be the O-RU's best approximation of the sinr-reference-level-config."; + } + } + } + leaf se26-usage-enabled { + type boolean; + default false; + description + "When se26-usage-enabled = FALSE, O-DU shall not use SE 26 and shall not convey UE frequency offset information. + When se26-usage-enabled = TRUE, O-DU may convey UE frequency offset information via SE 26."; + } + + leaf-list bf-methods { + if-feature "feat:SELECTED-BF-METHOD-CONFIGURATION and feat:BF-DELAY-PROFILE"; + type beamforming-method-type; + description + "Beamforming method(s) configured on the endpoint. + + If the value of configured-bf-profile-id is set, then beamforming method(s) configured on the endpoint shall + be selected from the set of supported beamforming methods of the selected endpoint-bf-profile-group + Otherwise, the beamforming method(s) configured on the endpoint shall be selected from the set of supported + beamforming methods reported in the related endpoint-bf-profile-group(s)."; + } + leaf eq-scale-offset-config { + if-feature "feat:DMRS-BF-EQ"; + type decimal64 { + fraction-digits 4; + } + units dB; + description + "scale offset is configured by the O-DU to avoid overflow when encoding data for the fronthaul interface.Refer to cus specification clause 8.1.3.4 for details."; + } + leaf eq-scale-offset-used { + if-feature "feat:DMRS-BF-EQ"; + type decimal64 { + fraction-digits 4; + } + units dB; + config false; + description + "scale offset is used by the O-RU to avoid overflow when encoding data for the fronthaul interface.Refer to cus specification clause 8.1.3.4 for details."; + } + leaf-list rrm-meas-enabled { + if-feature feat:RRM-MEAS-REPORTING; + type rrm-meas-types; + description + "This parameter indicates which rrm measurements are enabled for this low level endpoint"; + } + + leaf se-27-odu-controlled-dimensionality-reduction-enabled { + if-feature feat:SE27-ODU-CONTROLLED-DIMENSIONALITY-REDUCTION; + type enumeration { + enum DISABLED { + description + "O-DU controlled dimnesionality reduction disabled."; + } + enum STATIC { + description + "Static O-DU controlled dimnesionality reduction enabled."; + } + enum DYNAMIC { + description + "Dynamic O-DU controlled dimnesionality reduction enabled."; + } + } + default DISABLED; + description + "Parameter indicating if O-DU controlled dimnesionality reduction is enabled. + Please refer to CUS specification clause 7.7.27 for more details."; + } + leaf se-27-num-elements { + when "../se-27-odu-controlled-dimensionality-reduction-enabled = 'STATIC'"; + if-feature feat:SE27-ODU-CONTROLLED-DIMENSIONALITY-REDUCTION; + type uint16; + description + "Configured value of numElements in SE27. + Please refer to CUS specification clause 7.7.27 for more details."; + } } list tx-array-carriers { @@ -1829,10 +4806,49 @@ module o-ran-uplane-conf { leaf name { type string; - description "Unique name of tx-array-carriers object."; } + list odu-ids { + if-feature feat:SHARED-ORU-MULTI-ODU; + key odu-id; + description + "An optional list of o-du identities associated with this list entry. + When present, indicates that the list entry corresponds to a tx-array-carrier + associated with one or more particular odu-id(s). + + This list is used to enable enhanced watchdog operation when operating + in a single operator environment, where watchdog supervision is performed + on a per odu-id basis and supervision failure only results in a sub-set + of carriers being de-activated."; + + leaf odu-id { + type string; + description "an o-du identity "; + } + } + + list sro-ids-and-odu-ids { + if-feature "feat:SHARED-ORU-MULTI-ODU and feat:SHARED-ORU-MULTI-OPERATOR"; + key "odu-id sro-id"; + description + "An optional list of sro and o-du identities associated with this list entry. + When present, indicates that the list entry corresponds to a tx-array-carrier + associated with one or more particular odu-id(s) operated by a particular sro-id. + + This list is used to enable enhanced watchdog operation when operating + in a multi operator environment, where watchdog supervision is performed on + a per odu-id basis and supervision failure only results in a sub-set of + carriers being de-activated."; + leaf odu-id { + type string; + description "an o-du identity "; + } + leaf sro-id { + type string; + description "an sro identity "; + } + } uses tx-common-array-carrier-elements; @@ -1845,7 +4861,7 @@ module o-ran-uplane-conf { description "This parameter informing which frequency band particular antenna array is serving for. - Intended use is to deal with multiband solutions."; + Intended use is to deal with multi-band solutions."; } container lte-tdd-frame { @@ -1943,7 +4959,9 @@ module o-ran-uplane-conf { mandatory true; description - "Transmission gain in dB. Value applicable to each array element carrier belonging to array carrier."; + "Transmission gain in dB. Value applicable to each array element carrier belonging to array carrier. + + The value of transmission gain shall meet the constraints defined in CUS-Plane, clause 8.1.3.3."; } leaf downlink-radio-frame-offset { @@ -1954,8 +4972,8 @@ module o-ran-uplane-conf { description "This parameter is used for offsetting the starting position of 10ms radio frame. - Note: The value should have same value within DU to all tx-array-carrierss that have same frequency and bandwidth. - Note2: Unit is 1/1.2288e9 Hz and accuracy is 1/4 Tc. Then, its range is calculated 0..12288000."; + Note: The value should have same value within DU to all tx-array-carriers that have same frequency and bandwidth. + Note2: Unit is 1/1.2288e9 s. Then, its range is calculated 0..12288000."; } leaf downlink-sfn-offset { @@ -1967,7 +4985,22 @@ module o-ran-uplane-conf { description "This parameter is used for offsetting SFN value. Unit is in 10ms. - Note: The value should have same value within DU to all tx-array-carrierss that have same frequency and bandwidth."; + Note: The value should have same value within DU to all tx-array-carriers that have same frequency and bandwidth."; + } + + leaf t-da-offset { + if-feature "feat:EXT-ANT-DELAY-CONTROL"; + type uint32; + units Tc; + default 0; + description + "the time difference between the output of DL signal at the + antenna connector of O-RU and the transmission over the air. + units are Tc=~0.5ns=1/1.96608GHz. + An O-RU with 'ext-ant-delay-capability' = 'PER-O-RU' shall reject any configuration + where different values of t-da-offset are configured on tx-array-carriers; + An O-RU with 'ext-ant-delay-capability' = 'PER-ARRAY' shall reject any configuration + where different values of t-da-offset are configured on tx-array-carriers associated with the same tx-array."; } leaf reference-level { @@ -1992,6 +5025,22 @@ module o-ran-uplane-conf { The leaf may exist under tx-array-carrier only in case O-RU supports feature 'CONFIGURABLE-TDD-PATTERN-SUPPORTED' AND all low-level-tx-endpoints linked to this tx-array-carrier have configurable-tdd-pattern-supported = 'true'"; } + + leaf crb-to-prb-grid-offset { + if-feature "feat:PRG-SIZE-SUPP-SE-21-WITH-ST6 or feat:PRG-SIZE-SUPP-SE-21-WITH-ST5"; + type uint16 { + range 0..2199; + } + default 0; + description + "This parameter specifies the value of 'offsetToCarier' parameter as specified in the 3GPP Specification TS 38.331. + This value is the offset in frequency domain, between lowest subcarrier of common RB 0, which is the start of + carrier resource Block(CRB grid) and the lowest usable subcarrier on this array-carrier, which is (RE0 of PRB0), + in units of number of PRBs (using the SCS defined for associated array-carrier). This parameter shall be used with + 'prgSize' in Section Extension 21 by the O-RU to correctly derive Channel Information Based Beamforming weights. + Value of this parameter is not interpretted by the O-RU, if either 'prg-size-supp-se-21-with-st6-enabled' + or 'prg-size-supp-se-21-with-st5-enabled' parameter is not set to TRUE by the O-DU."; + } } list rx-array-carriers { @@ -2005,6 +5054,47 @@ module o-ran-uplane-conf { "Unique name of rx-array-carriers object."; } + list odu-ids { + if-feature feat:SHARED-ORU-MULTI-ODU; + key odu-id; + description + "An optional list of o-du identities associated with this list entry. + When present, indicates that the list entry corresponds to a rx-array-carrier + associated with one or more particular odu-id(s). + + This list is used to enable enhanced watchdog operation when operating + in a single operator environment, where watchdog supervision is performed + on a per odu-id basis and supervision failure only results in a sub-set + of carriers beign de-activated."; + + leaf odu-id { + type string; + description "an o-du identity "; + } + } + + list sro-ids-and-odu-ids { + if-feature "feat:SHARED-ORU-MULTI-ODU and feat:SHARED-ORU-MULTI-OPERATOR"; + key "odu-id sro-id"; + description + "An optional list of sro and o-du identities associated with this list entry. + When present, indicates that the list entry corresponds to a rx-array-carrier + associated with one or more particular odu-id(s) operated by a particular sro-id. + + This list is used to enable enhanced watchdog operation when operating + in a multi operator environment, where watchdog supervision is performed on + a per odu-id basis and supervision failure only results in a sub-set of + carriers beign de-activated."; + leaf odu-id { + type string; + description "an o-du identity "; + } + leaf sro-id { + type string; + description "an sro identity "; + } + } + uses rx-common-array-carrier-elements; leaf downlink-radio-frame-offset { @@ -2015,8 +5105,8 @@ module o-ran-uplane-conf { description "This parameter is used for offsetting the starting position of 10ms radio frame. - Note: The value should have same value within DU to all tx-array-carrierss that have same frequency and bandwidth. - Note2: Unit is 1/1.2288e9 Hz and accuracy is 1/4 Tc. Then, its range is calculated 0..12288000."; + Note: The value should have same value within DU to all tx-array-carriers that have same frequency and bandwidth. + Note2: Unit is 1/1.2288e9 s. Then, its range is calculated 0..12288000."; } leaf downlink-sfn-offset { @@ -2028,7 +5118,7 @@ module o-ran-uplane-conf { description "This parameter is used for offsetting SFN value. Unit is in 10ms. - Note: The value should have same value within DU to all tx-array-carrierss that have same frequency and bandwidth."; + Note: The value should have same value within DU to all tx-array-carriers that have same frequency and bandwidth."; } leaf gain-correction { @@ -2053,6 +5143,21 @@ module o-ran-uplane-conf { units are Tc=~0.5ns=1/1.96608GHz"; } + leaf t-au-offset { + if-feature "feat:EXT-ANT-DELAY-CONTROL"; + type uint32; + units Tc; + default 0; + description + "the time difference between the reception over the air and + the input of UL signal at the antenna connector of O-RU. + units are Tc=~0.5ns=1/1.96608GHz. + An O-RU with 'ext-ant-delay-capability' = 'PER-O-RU' shall reject any configuration + where different values of t-au-offset are configured on rx-array-carriers; + An O-RU with 'ext-ant-delay-capability' = 'PER-ARRAY' shall reject any configuration + where different values of t-au-offset are configured on rx-array-carriers associated with the same rx-array."; + } + leaf configurable-tdd-pattern { when "not(/user-plane-configuration/low-level-rx-endpoints[name = string(/user-plane-configuration/low-level-rx-links[rx-array-carrier = current()/../name]/rx-array-carrier)]/configurable-tdd-pattern-supported = 'false')"; if-feature mcap:CONFIGURABLE-TDD-PATTERN-SUPPORTED; @@ -2064,6 +5169,53 @@ module o-ran-uplane-conf { The leaf may exist under rx-array-carrier only in case O-RU supports feature 'CONFIGURABLE-TDD-PATTERN-SUPPORTED' AND all low-level-rx-endpoints linked to this rx-array-carrier have configurable-tdd-pattern-supported = 'true'"; } + + leaf user-group-mode { + if-feature "feat:USER-GROUP-SELF-ASSEMBLY"; + type enumeration { + enum NO-SELF-ASSEMBLY { + description "No user group self assembly"; + } + enum SELF-ASSEMBLY-WITH-GROUP-ID { + description "User group self assembly with group id."; + } + enum SELF-ASSEMBLY-WITHOUT-GROUP-ID { + description "User group self assembly without group id."; + } + } + default NO-SELF-ASSEMBLY; + description + "Configuration of user group self assembly."; + } + + leaf point-a-offset-to-absolute-frequency-center { + if-feature "(feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ) and feat:POINT-A-OFFSET-TO-ABSOLUTE-FREQUENCY-CENTER"; + type int32; + description + "An offset between center-of-channel-bandwidth and Point A. + If the value is not provided, then Point A coincides with RE#0 of PRB#0 indicated by offset-to-absolute-frequency-center. + The unit of this parameter is 1/2 of reference SCS, where reference SCS is 15 kHz for FR1 and 60 kHz for FR2. + + Please refer to CUS specification clause 7.7.24 for more details."; + } + + leaf continuity-block-size-configured { + if-feature "(feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ) and feat:CONTINUITY-BLOCK-SIZE"; + type uint8; + description + "This parameter specified the O-DU configured value of continuity block size per rx-array-carrier. + The O-DU shall pick one of the values advertised by the O-RU in 'continuity-block-size-list'"; + } + + leaf port-reduced-dmrs-data-sending-enabled { + if-feature "feat:DMRS-BF-EQ or feat:DMRS-BF-NEQ"; + type boolean; + description + "This parameter value if set to TRUE indicates O-DU request to O-RU for sending port reduced DMRS + sending from O-RU. If the flag is set to FALSE indicates O-RU shall not send port reduced DMRS + from O-RU to O-DU."; + } + } list tx-arrays { @@ -2074,6 +5226,16 @@ module o-ran-uplane-conf { uses parameters; + leaf min-gain { + type decimal64 { + fraction-digits 4; + + } + units dB; + description + "Min gain of RF path linked with array element (maximum over elements of array) or array layers"; + } + leaf max-gain { type decimal64 { fraction-digits 4; @@ -2090,13 +5252,38 @@ module o-ran-uplane-conf { mandatory true; description "If true then every element of array has own, power budget independent from power budget of other elements. - Else all elements of array that are at same row and column and have same polarization share power budget"; + Else all elements of array that are at same row and column and have same polarisation share power budget"; } list capabilities { description "List of capabilities related to this tx-array"; uses mcap:support-for-dl; + + container supported-energy-saving-capabilities-dl { + description + "Network energy saving capabilities supported in DL path"; + + container trx-control-capability-info { + if-feature feat:TRX-CONTROL; + description + "A container with parameters for TRX-CONTROL capabilities supported by the O-RU."; + uses mcap:trx-control-capability-info; + } + + container asm-capability-info { + if-feature feat:ADVANCED-SLEEP-MODE; + description + "A container with parameters for advanced sleep mode capabilities supported by the O-RU."; + uses mcap:asm-capability-info; + } + } + } + container mplane-trx-control-txarr-capability-info { + if-feature feat:MPLANE-TRX-CONTROL; + description + "A container with parameters for MPLANE-TRX-CONTROL feature supported by the O-RU."; + uses mplane-trx-control-supp-antenna-masks; } } @@ -2132,6 +5319,32 @@ module o-ran-uplane-conf { description "List of capabilities related to this rx-array"; uses mcap:support-for-ul; + + container supported-energy-saving-capabilities-ul { + description + "Network energy saving capabilities supported in UL path"; + + container trx-control-capability-info { + if-feature feat:TRX-CONTROL; + description + "A container with parameters for TRX-CONTROL capabilities supported by the O-RU"; + uses mcap:trx-control-capability-info; + } + + container asm-capability-info { + if-feature feat:ADVANCED-SLEEP-MODE; + description + "A container with parameters for advanced sleep mode capabilities supported by the O-RU"; + uses mcap:asm-capability-info; + } + } + } + container mplane-trx-control-rxarr-capability-info { + if-feature feat:MPLANE-TRX-CONTROL; + description + "A container with parameters for MPLANE-TRX-CONTROL feature supported by the O-RU."; + + uses mplane-trx-control-supp-antenna-masks; } } @@ -2151,13 +5364,13 @@ module o-ran-uplane-conf { uses array-choice; description - "Defnes name for first array"; + "Defines name for first array"; } container array2 { uses array-choice; description - "Defnes name for second array"; + "Defines name for second array"; } list types { key "relation-type"; @@ -2248,7 +5461,7 @@ module o-ran-uplane-conf { type uint16; description "This parameter contains eAxC_ID that populates content of C-Plane section - extension 11 to eAxC_IDs configured in the group as 'member-tx-eaxc-id'(s)."; + extension 10 to eAxC_IDs configured in the group as 'member-tx-eaxc-id'(s)."; } leaf-list member-tx-eaxc-id { type uint16; @@ -2258,9 +5471,13 @@ module o-ran-uplane-conf { must "current()!=../representative-tx-eaxc-id" { error-message "the representative eaxcid does not need to be a list member"; } + ordered-by user; description "This is a list of member eAxC IDs, which together with the representative-tx-eaxc-id, - are assigned to low-level-tx-endpoints in the group."; + are assigned to low-level-tx-endpoints in the group. + This list is defined as 'ordered-by user', because the order of the eaxc-id list should be maintained, + and the parameters in the SE10 are applied to the eaxc-ids based on the order of eaxc-ids in the list + when the section extension conveys unique parameters (beamId/ueId) per eaxc-id."; } } @@ -2282,7 +5499,7 @@ module o-ran-uplane-conf { type uint16; description "This parameter contains eAxC_ID that populates content of C-Plane section - extension 11 to eAxC_IDs configured in the group as 'member-rx-eaxc-id'(s)."; + extension 10 to eAxC_IDs configured in the group as 'member-rx-eaxc-id'(s)."; } leaf-list member-rx-eaxc-id { @@ -2291,10 +5508,14 @@ module o-ran-uplane-conf { error-message "too many rx-eaxcid-id members"; } must "current()!=../representative-rx-eaxc-id" { - error-message "the representative eaxcid does not need to be a list member"; + error-message "the representative eaxc-id does not need to be a list member"; } + ordered-by user; description - "This is a list of member eAxC IDs assigned to low-level-rx-endpoints in the group."; + "This is a list of member eAxC IDs assigned to low-level-rx-endpoints in the group. + This list is defined as 'ordered-by user', because the order of the eaxc-id list should be maintained, + and the parameters in the SE10 are applied to the eaxc-ids based on the order of eaxc-ids in the list + when the section extension conveys unique parameters (beamId/ueId) per eaxc-id."; } } } @@ -2320,6 +5541,17 @@ module o-ran-uplane-conf { description "Set of parameters related to static PRACH configuration"; + leaf sfn-offset { + type uint32; + + description + "This parameter is used for offsetting SFN value. + The SFN that results from the offset is used as the reference for the start of pattern periods. + If the value is not set, then pattern periods follow the reference set in a related rx-array-carrier. + The value is primarily used for cases in which pattern-period is not a power of 2. + Unit is in 10ms."; + } + leaf pattern-period { type uint16 { range 1..1024; @@ -2357,20 +5589,23 @@ module o-ran-uplane-conf { units Ts; mandatory true; description - "Duration of single sequence of the PRACH. Sequence may be considered as 'single PRACH symbol'"; + "Duration of single PRACH Symbol. Refer to definition of PRACH Symbol in CUS specification clause 3.1."; } list prach-patterns { key prach-pattern-id; min-elements 1; description - "Provides a PRACH pattern. Each record in the list represents a single PRACH occasion. Number of list entries cannot exceed max-prach-patterns"; + "Provides a PRACH pattern. Each record in the list represents a single PRACH occasion. Number of list entries cannot + exceed max-prach-patterns or extended-max-prach-patterns if EXTENDED-PRACH-CONFIGURATION is supported."; leaf prach-pattern-id { - type uint16; + type uint32; mandatory true; description - "Supplementary parameter acting as key for prach-pattern list."; + "Supplementary parameter acting as key for prach-pattern list. + NETCONF client shall limit its maximum value to 65535 when configuring + any O-RU that does not support the EXTENDED-PRACH-CONFIGURATION feature."; } leaf number-of-repetitions { @@ -2379,15 +5614,17 @@ module o-ran-uplane-conf { } mandatory true; description - "This parameter defines number of PRACH repetitions in PRACH occasion, - to which the section control is applicable."; + "This parameter defines number of PRACH PRACH Symbol repetitions in PRACH occasion, + to which the section control is applicable. Refer to definition of PRACH Symbol in CUS specification clause 3.1."; } leaf number-of-occasions { - type uint8; + type uint32; mandatory true; description - "This parameter informs how many consecutive PRACH occasions is described by the PRACH pattern."; + "This parameter informs how many consecutive PRACH occasions is described by the PRACH pattern. + NETCONF client shall limit its maximum value to 255 when configuring any O-RU that does not + support the EXTENDED-PRACH-CONFIGURATION feature."; } leaf re-offset { @@ -2409,10 +5646,11 @@ module o-ran-uplane-conf { to value of parameter number-of-occasions."; leaf occasion-id { - type uint8; + type uint32; mandatory true; description - "Supplementary parameter acting as key in 'occasion-parameters' list"; + "Supplementary parameter acting as key in 'occasion-parameters' list. + The value is limited to 255 if EXTENDED-PRACH-CONFIGURATION is unsupported."; } leaf cp-length { @@ -2431,7 +5669,9 @@ module o-ran-uplane-conf { } leaf beam-id { - type uint16; + type uint16 { + range "min .. 32767"; + } mandatory true; description "This parameter defines the beam pattern to be applied to the U-Plane data. @@ -2520,7 +5760,9 @@ module o-ran-uplane-conf { } leaf beam-id { - type uint16; + type uint16 { + range "min .. 32767"; + } mandatory true; description "This parameter defines the beam pattern to be applied to the U-Plane data. @@ -2531,8 +5773,8 @@ module o-ran-uplane-conf { type uint16; mandatory true; description - "This parameter defines number of consecutive symbols covered by specific srs-pattern. - Single srs-pattern may address at least one symbol. However, possible optimizations + "This parameter defines number of consecutive symbols covered by specific srs-pattern. + Single srs-pattern may address at least one symbol. However, possible optimisations could allow for several (up to 14) symbols."; } @@ -2596,7 +5838,7 @@ module o-ran-uplane-conf { type uint32; mandatory true; description - "Offset from DL air frame boundary transmitted at RF connector to the point in time that is characteristic to the operation on RF switches. Unit is 1/1.2288e9 Hz and accuracy is 1/4 Tc."; + "Offset from DL air frame boundary transmitted at RF connector to the point in time that is characteristic to the operation on RF switches. Unit is 1/1.2288e9 s."; } } } @@ -2630,6 +5872,79 @@ module o-ran-uplane-conf { uses configurable-tdd-pattern; } + + list endpoint-bf-profile-group { + if-feature feat:BF-DELAY-PROFILE; + key "bf-profile-id"; + config false; + description + "An optional list of list(s) containing beamforming methods supported by the O-RU with the associated delay-profile-id + per each beamforming method list"; + leaf bf-profile-id { + type uint16; + description + "Identifies the beamforming method list."; + } + leaf-list supported-bf-methods { + type beamforming-method-type; + min-elements 1; + description + "Beamforming methods can be supported simultaneously."; + } + leaf supported-delay-profile { + type leafref { + path "/or-dm:delay-management/or-dm:non-default-ru-delay-profile/or-dm:delay-profile-id"; + require-instance false; + } + description + "The delay-profile-id associated with the supported beamforming method list. + If not configured or the value is set to 0, all delay parameters shall be equivalent to the default value."; + } + } + list se10-member-candidate-tx-lists { + if-feature feat:SE10-MEMBER-CANDIDATE-LIST; + key "id"; + config false; + description + "List of leaf-lists, where each leaf-list is a member-candidate list comprising of endpoints + which can be associated to one or more static-low-level-tx-endpoint(s)."; + leaf id { + type uint8; + description + "Index into the list se10-member-candidate-tx-lists."; + } + leaf-list member-candidates { + type leafref { + path "/user-plane-configuration/static-low-level-tx-endpoints/name"; + require-instance false; + } + description + "Each leaf-list comprises one or more static-low-elevel-tx-endpoint(s). Endpoints in this list can + be representative endpoint or member endpoint."; + } + } + list se10-member-candidate-rx-lists { + if-feature feat:SE10-MEMBER-CANDIDATE-LIST; + key "id"; + config false; + description + "List of leaf-lists, where each leaf-list is a member-candidate list comprising of endpoints + which can be associated to one or more static-low-level-rx-endpoint(s)."; + leaf id { + type uint8; + description + "Index into the list se10-member-candidate-rx-lists."; + } + leaf-list member-candidates { + type leafref { + path "/user-plane-configuration/static-low-level-rx-endpoints/name"; + require-instance false; + } + description + "Each leaf-list comprises one or more static-low-elevel-rx-endpoint(s). Endpoints in this list can + be representative endpoint or member endpoint."; + } + } } grouping tx-array-notification-group { @@ -2651,8 +5966,15 @@ module o-ran-uplane-conf { type leafref{ path "/user-plane-configuration/tx-array-carriers/state"; } - description - "state of tx-array-carriers is notified at state change"; + description + "state of tx-array-carriers is notified at state change"; + } + leaf availability-status{ + type leafref{ + path "/user-plane-configuration/tx-array-carriers/availability-status"; + } + description + "availability-status of tx-array-carriers is notified at availability-status change"; } } } @@ -2679,16 +6001,23 @@ module o-ran-uplane-conf { description "state of rx-array-carriers is notified at state change"; } + leaf availability-status{ + type leafref{ + path "/user-plane-configuration/rx-array-carriers/availability-status"; + } + description + "availability-status of rx-array-carriers is notified at availability-status change"; + } } } -// top level container - + // top level container container user-plane-configuration { description "top level container for user plane configuration"; uses uplane-conf-group; uses general-config; + uses array-config-group; } //notification statement @@ -2703,4 +6032,68 @@ module o-ran-uplane-conf { uses rx-array-notification-group; } + + notification data-layer-control-wakeup-notification { + if-feature feat:MPLANE-DATA-LAYER-CONTROL; + description + "Notification used to inform about wake-up completion after M-Plane based data layer control sleep is terminated"; + leaf-list energy-sharing-group { + type uint8; + description + "Notification for wake-up completion of underlying HW components corresponding to energy sharing group. + This value shall be specific values from the list of 'energy-sharing-group-id' inside static-low-level-[tr]x-endpoints."; + } + } + notification mplane-trx-control-ant-mask-update { + if-feature feat:MPLANE-TRX-CONTROL; + + leaf array-name { + type union { + type leafref { + path "/user-plane-configuration/rx-arrays/name"; + } + type leafref { + path "/user-plane-configuration/tx-arrays/name"; + } + } + description + "The array name for which antenna mask has been updated using + MPLANE-TRX-CONTROL feature."; + } + leaf array-type { + type enumeration { + enum TX-ARRAY { + description + "this array is of type TX array"; + } + enum RX-ARRAY { + description + "this array is of type RX array"; + } + } + description + "The type of array for which antenna mask has been updated using + MPLANE-TRX-CONTROL feature."; + } + leaf updated-antenna-mask { + type binary; + description + "The updated antenna mask value after processing M-Plane based TRX control command at the O-RU. + If mplane-supported-trx-control-masks list is not advertised as part of capability for the referred [tr]x-array, + the parameter antenna-bitmask shall be used for notification. + The parameter antenna-bitmask-index shall not be used for notification."; + } + leaf updated-antenna-mask-index { + type uint8; + description + "The parameter indicates updated antenna mask index value after processing M-Plane based TRX control command at the O-RU. + If mplane-supported-trx-control-masks list is advertised as part of capability for the referred [tr]x-array, + the parameter antenna-bitmask-index shall be used for notification to refer to the index of advertised mplane-supported-trx-control-masks. + The parameter antenna-bitmask shall not be used for notification."; + } + description + "M-Plane notification event to notify that the commanded mask has been activated via M-plane. This notification + is required to be sent for either tx-array or rx-array for which the antenna mask was + commanded to be changed by the O-DU."; + } } diff --git a/radio/fhi_72/mplane/yang/models/o-ran-usermgmt.yang b/radio/fhi_72/mplane/yang/models/o-ran-usermgmt.yang new file mode 100644 index 0000000000..e8ac1fdeff --- /dev/null +++ b/radio/fhi_72/mplane/yang/models/o-ran-usermgmt.yang @@ -0,0 +1,331 @@ +module o-ran-usermgmt { + yang-version 1.1; + namespace "urn:o-ran:user-mgmt:1.0"; + prefix "o-ran-usermgmt"; + + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + import o-ran-wg4-features { + prefix "feat"; + } + + import ietf-crypto-types { + prefix ct; + } + + organization "O-RAN Alliance"; + + contact + "www.o-ran.org"; + + description + "This module defines the user management model for the O-RAN Equipment. + + Copyright 2024 the O-RAN Alliance. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the above disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the above disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the Members of the O-RAN Alliance nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission."; + + revision "2024-08-12" { + description + "version 16.0.0 + + 1) add SSH Public Key."; + + reference "ORAN-WG4.M.0-v16.00"; + } + + revision "2023-12-11" { + description + "version 10.1.0 + + 1) clarify handling of User-Names."; + + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2022-08-15" { + description + "version 10.0.0 + + 1) introduced SHARED-ORU-MULTI-OPERATOR feature."; + + reference "ORAN-WG4.M.0-v10.00"; + } + + + revision "2021-12-01" { + description + "version 1.3.0 + + 1) typographical corrections in descriptions"; + + reference "ORAN-WG4.M.0-v01.00"; + } + + revision "2020-12-10" { + description + "version 1.2.0 + + 1) updated description for enabled leaf"; + + reference "ORAN-WG4.M.0-v01.00"; + } + + revision "2019-07-03" { + description + "version 1.1.0 + + 1) change name leaf to type nacm:user-name-type + 2) added account-type to qualify when password is required "; + + reference "ORAN-WG4.M.0-v01.00"; + } + + revision "2019-02-04" { + description + "version 1.0.0 + + 1) imported model from xRAN + 2) changed namespace and reference from xran to o-ran"; + + reference "ORAN-WG4.M.0-v01.00"; + } + + typedef password-type { + type string { + length "8..128"; + pattern "[a-zA-Z0-9!$%\\^()\\[\\]_\\-~{}.+]*" { + error-message "Password content does not meet the requirements"; + } + } + description + "The password for this entry. + The Password must contain at least 2 characters from + each of the following groups: + a) Lower case alphabetic (a-z) + b) Upper case alphabetic (A-Z) + c) Numeric 0-9 + d) Special characters Allowed !$%^()[]_-~{}.+ + Password must not contain Username. + + When a password is received by a NETCONF server, + it should be securely stored in the O-RU's configuration datastore. + How to securely store the password in the datastore is implementation-specific + and out of scope of WG4 M-Plane specification."; + } + + grouping user-list { + description "a user list grouping"; + list user { + key "name"; + description + "The list of local users configured on this device."; + leaf name { + type nacm:user-name-type; + description + "The user name string identifying this entry. + + NOTE: o-ran-usermgmt:user-profile/user/name is + identical to nacm:nacm/groups/group/user-name + but the current schema is preserved for backwards + compatibility."; + } + leaf account-type { + type enumeration { + enum PASSWORD { + description "the user-name is for password based authentication"; + } + enum CERTIFICATE { + description "the user-name is for certificate based authentication"; + } + enum SSHPUBLICKEY { + if-feature feat:CLIENT-AUTH-SSH-PUBLIC-KEY; + description "the user-name is for public key based authentication"; + } + } + default "PASSWORD"; + description "the account type"; + } + + leaf password { + nacm:default-deny-all; + type password-type; + description + "The password for this entry. + + This field is only valid when account-type is PASSWORD, + i.e., when account-type is NOT present or present and set to + PASSWORD."; + } + + container ssh-public-key { + nacm:default-deny-all; + when "../account-type='SSHPUBLICKEY'"; + if-feature feat:CLIENT-AUTH-SSH-PUBLIC-KEY; + uses ct:public-key-grouping; + description + "The SSH pubic key for this entry. + + This field is valid only when account-type is SSHPUBLICKEY."; + } + + leaf enabled { + type boolean; + description + "Indicates whether an account is enabled or disabled. + + A NETCONF Server shall reject a configuration that attempts to + enable a Password account for an account where the password leaf + is not configured. + + This validation statement is included in the YANG description and + not in a MUST statement to preserve backwards compatibility."; + } + leaf-list sro-id { + if-feature feat:SHARED-ORU-MULTI-OPERATOR; + type string; + description + "An optional list if Shared Resource Operator identities associated with the + user-account. Used to realize enhanced access privileges in a shared O-RU. + When an sro-id is configured in the O-RU, the O-RU shall + implement additional sro-id based NETCONF access control + as specified in O-RAN.WG4.MP.0-v10.00. + The O-RU does not further interpret the specific value of sro-id."; + } + } + } + + container users { + must "user/enabled='true'" { + error-message "At least one account needs to be enabled."; + } + //TAKE NOTE - any configuration with zero enabled users is invalid. + //This will typically be the case when using a simulated NETCONF Server + //and so this constraint should be removed when operating in those scenarios + + //The config data base of the O-RAN equipment should ensure that the user + //default account is enabled on factory restart + + description "list of user accounts"; + uses user-list; + } + + rpc chg-password { + description "the RPC used to change a password"; + nacm:default-deny-all; + input { + leaf currentPassword { + type password-type; + mandatory true; + description + "provide the current password"; + } + leaf newPassword { + type password-type; + mandatory true; + description + "provide a new password"; + } + leaf newPasswordConfirm { + type password-type; + mandatory true; + description + "re-enter the new password "; + } + } + output { + leaf status { + type enumeration { + enum "Successful" { + value 1; + description "change password operation is successful"; + } + enum "Failed" { + value 2; + description "change password operation failed"; + } + } + mandatory true; + description + "Successful or Failed"; + } + leaf status-message { + type string; + description + "Gives a more detailed reason for success / failure"; + } + } + } + + rpc chg-ssh-public-key { + if-feature feat:CLIENT-AUTH-SSH-PUBLIC-KEY; + description "the RPC used to change SSH public key"; + nacm:default-deny-all; + input { + container current-ssh-public-key { + uses ct:public-key-grouping; + description + "provide the current SSH public algorithm and key"; + } + container new-ssh-public-key { + uses ct:public-key-grouping; + description + "provide a new SSH public algorithm and key"; + } + container new-ssh-public-key-confirm { + uses ct:public-key-grouping; + description + "re-enter the new SSH public algorithm and key"; + } + } + output { + leaf status { + type enumeration { + enum "Successful" { + value 1; + description "change SSH public key operation is successful"; + } + enum "Failed" { + value 2; + description "change SSH public key operation failed"; + } + } + mandatory true; + description + "Successful or Failed"; + } + leaf status-message { + type string; + description + "Gives a more detailed reason for success / failure"; + } + } + } + +} diff --git a/radio/fhi_72/mplane/yang/models/o-ran-wg4-features.yang b/radio/fhi_72/mplane/yang/models/o-ran-wg4-features.yang new file mode 100644 index 0000000000..1f186ea7d6 --- /dev/null +++ b/radio/fhi_72/mplane/yang/models/o-ran-wg4-features.yang @@ -0,0 +1,532 @@ +module o-ran-wg4-features { + yang-version 1.1; + namespace "urn:o-ran:wg4feat:1.0"; + prefix "o-ran-feat"; + + + organization "O-RAN Alliance"; + + contact + "www.o-ran.org"; + + description + "This module defines the set of re-usable type definitions for WG4 specific + features. + + Copyright 2024 the O-RAN Alliance. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the above disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the above disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the Members of the O-RAN Alliance nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission."; + + revision "2024-08-12" { + description + "version 16.0.0 + new features: + + 1) PRG-SIZE-SUPP-SE-21-WITH-ST6 + 2) PRG-SIZE-SUPP-SE-21-WITH-ST5 + 3) USER-GROUP-OPTIMIZATION + 4) BF-DELAY-PROFILE + 5) DMRS-BF-EQ + 6) DMRS-BF-NEQ + 7) RRM-MEAS-REPORTING + 8) USER-GROUP-SELF-ASSEMBLY + 9) UEID-PERSISTENCE + 10) CONTINUITY-BLOCK-SIZE + 11) SELECTED-BF-METHOD-CONFIGURATION + 12) DMRS-BF-NEQ-UNALTERED-FREQ-OFFSET + 13) DMRS-BF-NEQ-UNALTERED-TAE + 14) SE10-MEMBER-CANDIDATE-LIST + 15) MACSEC-BYPASS-POLICY + 16) SE27-ODU-CONTROLLED-DIMENSIONALITY-REDUCTION + 17) SE20-MULTI-SD-PUNC-PATTERN-SUPPORT + 18) CONFIGURABLE-VSWR-THRESHOLDS + 19) CLIENT-AUTH-SSH-PUBLIC-KEY + 20) POINT-A-OFFSET-TO-ABSOLUTE-FREQUENCY-CENTER"; + + reference "ORAN-WG4.M.0-v16.00"; + } + + revision "2024-04-15" { + description + "version 15.0.0 + new features: + + 1) PRG-SIZE-SUPP-SE-21-WITH-ST6 + 2) PRG-SIZE-SUPP-SE-21-WITH-ST5 + 3) BF-DELAY-PROFILE + 4) USER-GROUP-OPTIMIZATION + 5) MULTIPLE-BEAMID-TABLES-SUPPORTED + 6) PER-PORT-PTP-CONFIG + 7) PER-PORT-SYNCE-CONFIG + 8) MPLANE-TRX-CONTROL + 9) PER-INT-TCP-MSS + 10) DEEP-HIBERNATE"; + + reference "ORAN-WG4.M.0-v15.00"; + } + + revision "2023-12-11" { + description + "version 14.0.0 + new features: + + 1) SE23-PRB-BLOCK-MODE-SUPPORT + 2) MPLANE-DATA-LAYER-CONTROL + 3) SHARED-CELL-STATS"; + + reference "ORAN-WG4.M.0-v14.00"; + } + + revision "2023-08-14" { + description + "version 13.0.0 + new features: + + 1) CALL-HOME-REACTIVATION-SUPPORTED + 2) SEQ-ID-CHECKING-CONFIGURABLE + 3) TRX-CONTROL + 4) ADVANCED-SLEEP-MODE"; + + reference "ORAN-WG4.M.0-v13.00"; + } + + revision "2023-04-10" { + description + "version 12.0.0 + new features: + + 1) EXTENDED-PRACH-CONFIGURATION + 2) NON-SCHEDULED-UEID + 3) SE11-WITH-CONTINUITY-BIT-SUPPORT + 4) UPLANE-MESSAGE-PROCESSING-LIMITS"; + + reference "ORAN-WG4.M.0-v12.00"; + } + + revision "2022-12-05" { + description + "version 11.0.0 + new features: + + 1) UPLANE-ONLY-DL-MODE + 2) SUPERVISION-WITH-SESSION-ID + 3) INTEGRITY-CHECK-AT-SW-DOWNLOAD + 4) ST4-SLOT-CONFIG-MSG-SUPPORT"; + + reference "ORAN-WG4.M.0-v11.00"; + } + + + revision "2022-08-15" { + description + "version 10.0.0 + new features: + 1) SHARED-ORU-MULTI-ODU + 2) SHARED-ORU-MULTI-OPERATOR"; + reference "ORAN-WG4.M.0-v10.00"; + } + + revision "2021-12-01" { + description + "version 8.0.0 + new features: + 1) Typographical corrections in descriptions + 2) Add new features: + BEAM-UPDATE-CONTENTION-CONTROL + MULTIPLE-SCS-IN-EAXC + ENHANCED-T-COMBINE + CHANNEL-INFORMATION-COMPRESSION + CHANNEL-INFORMATION-PRB-GROUP + MULTIPLE-TRANSPORT-SESSION-TYPE"; + reference "ORAN-WG4.M.0-v08.00"; + } + + revision "2021-07-26" { + description + "version 7.0.0 + + new features: + 1) EXT-ANT-DELAY-CONTRO + 2) CPLANE-MESSAGE-PROCESSING-LIMITS"; + + reference "ORAN-WG4.M.0-v07.00"; + } + + revision "2021-03-22" { + description + "version 6.0.0 + + 1) Features added to handle updated transmission window control: + STATIC-TRANSMISSION-WINDOW-CONTROL + DYNAMIC-TRANSMISSION-WINDOW-CONTROL + UNIFORMLY-DISTRIBUTED-TRANSMISSION + ORDERED-TRANSMISSION + INDEPENDENT-TRANSMISSION-WINDOW-CONTROL + "; + + reference "ORAN-WG4.M.0-v06.00"; + } + + revision "2020-12-10" { + description + "version 5.0.0 + + 1) initial version."; + + reference "ORAN-WG4.M.0-v05.00"; + } + + feature NON-PERSISTENT-MPLANE { + description + "Indicates that the Radio Unit supports the optional + capability to improve the operation with a SMO using a non- + persistent NETCONF session."; + } + + feature STATIC-TRANSMISSION-WINDOW-CONTROL { + description + "O-RU supports U-plane transmission window control (scheduled transmission + and optionally uniformly distributed transmission) configuration over M-plane"; + } + + feature DYNAMIC-TRANSMISSION-WINDOW-CONTROL { + description + "O-RU supports U-plane transmission window control (scheduled transmission + and optionally uniformly distributed transmission) configuration over C-plane"; + } + + feature UNIFORMLY-DISTRIBUTED-TRANSMISSION { + if-feature "STATIC-TRANSMISSION-WINDOW-CONTROL or DYNAMIC-TRANSMISSION-WINDOW-CONTROL"; + description + "O-RU supports transmission of UL U-plane messages distributed uniformly over transmission window."; + } + + feature ORDERED-TRANSMISSION { + description + "O-RU supports ordered transmission"; + } + + feature INDEPENDENT-TRANSMISSION-WINDOW-CONTROL { + if-feature "STATIC-TRANSMISSION-WINDOW-CONTROL or DYNAMIC-TRANSMISSION-WINDOW-CONTROL"; + description + "O-RU supports independent U-plane transmission window per endpoint. + + If this feature is not supported then for all endpoints with transmission control enabled + (see u-plane-transmission-control/transmission-window-control) must be configured for transmission + window offsets and window sizes that coincide for each symbol. + + If INDEPENDENT-TRANSMISSION-WINDOW-CONTROL feature is not supported then all endpoints with + transmission control enabled that handle the same carrier type and SCS must be configured + (via M-plane or C-plane) with parameter values resulting in transmission windows that coincide + between the endpoints. That is, for every symbol N, the effective transmission window for symbol N + must be shared (start at the same time and end at the same time) by all the endpoints handling + same carrier type and SCS. This restriction applies only to endpoints that have transmission + control enabled. + + If INDEPENDENT-TRANSMISSION-WINDOW-CONTROL feature is supported then restriction described + above does not apply and a different transmission window (window offset and window size) + can be used for every endpoint capable of transmission window control."; + } + + feature EXT-ANT-DELAY-CONTROL { + description + "This feature indicates that the O-RU supports external antenna delay control"; + } + + feature CPLANE-MESSAGE-PROCESSING-LIMITS { + description + "Feature to indicate O-RU limitation of C-Plane message processing. Refer CUS-Plane specification + section 'O-RU C-Plane message limits' for more details on this feature."; + } + + feature CHANNEL-INFORMATION-COMPRESSION { + description + "This feature indicates that the O-RU supports channel information compression."; + } + + feature CHANNEL-INFORMATION-PRB-GROUP { + description + "Feature to indicate O-RU supports receiving and processing channel + information (e.g., ST6) with PRB group size greater than one PRB"; + } + + feature BEAM-UPDATE-CONTENTION-CONTROL { + description + "Feature to indicate O-RU requirements for beam weight update for a given beamId, to avoid beam update contentions. + Refer CUS-Plane specification section 'Weight-based dynamic beamforming' for more details on this feature."; + } + + feature MULTIPLE-SCS-IN-EAXC { + description + "Presence of feature indicates that FHM supports combining for multiple SCS + or multiple c-plane-types/frameStructure in a single eAxC-id in UL direction."; + } + + feature MULTIPLE-TRANSPORT-SESSION-TYPE { + description + "Feature to indicate O-RU supports to be configured with multiple transport-session-type + (Ethernet, ALIASMAC, UDP/IP)"; + } + + feature ENHANCED-T-COMBINE { + description + "Presence of feature indicates that FHM/Cascade O-RU can support t-combine-net and tx-duration"; + } + + feature SHARED-ORU-MULTI-OPERATOR { + description + "Feature to indicate the O-RU supports shared operation with one or more shared + resource operators (i.e., multiple MNOs) and implements enhanced NACM privileges per shared + resource operator. + + Note, there is no linkage or dependency between the SHARED-CELL feature and the SHARED-ORU feature."; + } + + feature SHARED-ORU-MULTI-ODU { + description + "Feature to indicate the O-RU supports independent supervision qualified based on odu-id, where + loss of supervision triggers selective carrier deactivation of carriers associated with odu-id."; + } + + feature INTEGRITY-CHECK-AT-SW-DOWNLOAD { + description "Feature indicates that radio unit support performing integrity check at software download"; + } + + feature SUPERVISION-WITH-SESSION-ID { + description + "O-RUs supporting this feature reuse the session-id generated for each NETCONF + session in supervision-notification. The session-id is defined in RFC 6241. + For these O-RUs, the O-RU controller participating in the NETCONF supervision + procedure can subscribe to supervision-notification notification events, + filtering for the supervision-notification/session-id matching + session-id in the Hello Message received from NETCONF Server earlier."; + } + + feature UPLANE-ONLY-DL-MODE { + description + "Presence of feature indicates that O-RU supports U-Plane-only DL mode."; + } + + feature ST4-SLOT-CONFIG-MSG-SUPPORT { + description + "Feature to indicate O-RU support for Section Type 4 slot configuration message"; + } + feature NON-SCHEDULED-UEID { + description + "Feature to indicate that O-RU supports 'non-scheduled-ueid' to indicate the ports in the section which are not scheduled for a given eAxcid"; + } + + feature EXTENDED-PRACH-CONFIGURATION { + description + "Presence of the feature indicates that O-RU supports extended number of PRACH patterns and occasions + provided by means of static PRACH."; + } + + feature SE11-WITH-CONTINUITY-BIT-SUPPORT { + description + "Feature to indicate O-RU support for handling 'continuity' bit information in Section Extension 11"; + } + + feature UPLANE-MESSAGE-PROCESSING-LIMITS { + description + "Feature to indicate O-RU limitation of U-Plane message processing. Refer M-Plane specification + clause 15.10 for more details on this feature."; + } + + feature CALL-HOME-REACTIVATION-SUPPORTED { + description + "Presence of the feature indicates that O-RU supports re-activation of timed out call home flows."; + } + + feature SEQ-ID-CHECKING-CONFIGURABLE { + description + "Feature to indicate O-RU supports configuration of sequence number checking functionality."; + } + + feature TRX-CONTROL { + description + "Feature to indicate O-RU support for handling RF channel reconfiguration by TRX Control."; + } + + feature ADVANCED-SLEEP-MODE { + description + "Feature to indicate O-RU support for handling Advanced Sleep Modes."; + } + + feature SE23-PRB-BLOCK-MODE-SUPPORT { + description + "Presence of the feature indicates that O-RU supports PRB-BLOCK mode of SE-23 as defined in CUS-Plane + specification Clause 7.7.23.1."; + } + + feature MPLANE-DATA-LAYER-CONTROL { + description + "Feature to indicate O-RU support for M-Plane based data layer control energy saving feature."; + } + + feature SHARED-CELL-STATS { + description + "Feature to indicate FHM/Cascade O-RU support for shared-cell-stats."; + } + + feature PER-PORT-PTP-CONFIG { + description + "This feature indicates that the equipment supports per-port PTP configuration functionality"; + } + + feature PER-PORT-SYNCE-CONFIG { + description + "This feature indicates that the equipment supports per-port SYNCE configuration functionality"; + } + + feature PER-INT-TCP-MSS { + description + "This feature indicates that the RU supports a per-interfacece MSS + configuration for TCP."; + } + + feature MULTIPLE-BEAMID-TABLES-SUPPORTED { + description + "Feature to indicate O-RU support for multiple beamId tables."; + } + + feature MPLANE-TRX-CONTROL { + description + "Feature to indicate O-RU support for M-plane based TRX control for Network Energy Saving."; + } + + feature DEEP-HIBERNATE { + description + "Feature to indicate O-RU support for M-Plane based deep-hibernate energy saving feature."; + } + + feature PRG-SIZE-SUPP-SE-21-WITH-ST6 { + description + "Feature to indicate O-RU support for receiving prgSize information when Section Extension 21 is + sent with Section Type 6."; + } + + feature PRG-SIZE-SUPP-SE-21-WITH-ST5 { + description + "Feature to indicate O-RU support for receiving prgSize information when Section Extension 21 is + sent with Section Type 5."; + } + + feature USER-GROUP-OPTIMIZATION { + description + "Feature to indicate O-DU requirement to send all layers for a given user group i.e., UEs with same + time-frequency allocation using single C-Plane section description."; + } + + feature BF-DELAY-PROFILE { + description + "Feature to indicate O-RU support for beamforming list and delay profiles(s) per endpoint."; + } + + feature DMRS-BF-EQ { + description + "DMRS beamforming with equalization supported. See CUS-plane clause 12.6"; + } + + feature DMRS-BF-NEQ { + description + "DMRS beamforming without equalization supported. See CUS-plane clause 12.6"; + } + + feature RRM-MEAS-REPORTING { + description + "Reporting of RRM measurmenets supported. See CUS-plane clause 12.6.1.6"; + } + + feature USER-GROUP-SELF-ASSEMBLY { + description + "Feature to indicate user group self assembly. See CUS-Plane clause 7.7.24.7."; + } + + feature UEID-PERSISTENCE { + description + "Feature to indicate if ueId persistance over multiple slots is supported. See CUS-Plane clause 7.7.24.10."; + } + + feature CONTINUITY-BLOCK-SIZE { + description + "The O-RUs capability for reporting one or more values of continuity block sizes. See CUS-plane clause 12.6.1.2.1"; + } + + feature SELECTED-BF-METHOD-CONFIGURATION { + description + "Feature to indicate O-RU support for configuration of a subset of beamforming methods from an + endpoint-bf-profile-group that shall be used by a specific endpoint."; + } + + feature DMRS-BF-NEQ-UNALTERED-FREQ-OFFSET { + description + "Feature to indicate that DMRS-BF-NEQ beamforming performed by the O-RU does not change frequency offset, + hence it can be measured by the O-DU."; + } + + feature DMRS-BF-NEQ-UNALTERED-TAE { + description + "Feature to indicate that DMRS-BF-NEQ beamforming performed by the O-RU does not change TAE, + hence TAE can be measured by the O-DU. Refer CUS specification clause 9.2.2.1 for details."; + } + + feature SE10-MEMBER-CANDIDATE-LIST { + description + "Reporting of member-list of endpoints for SE-10 supporting endpoint. See CUS-plane clause 7.7.10.1"; + } + + feature MACSEC-BYPASS-POLICY { + description + "O-RU supports MACsec bypass policy"; + } + + feature SE27-ODU-CONTROLLED-DIMENSIONALITY-REDUCTION { + description + "Presence of the feature indicates that O-RU supports O-DU controlled dimensionality reduction using SE27 as defined in CUS-Plane + specification Clause 7.7.27."; + } + + feature SE20-MULTI-SD-PUNC-PATTERN-SUPPORT { + description + "Feature to indicate O-RU support for handling multiple section description puncturing pattern in + Section Extension 20 per endpoint."; + } + + feature CONFIGURABLE-VSWR-THRESHOLDS { + description + "Feature to indicate O-RU support for configurable VSWR thresholds."; + } + + feature CLIENT-AUTH-SSH-PUBLIC-KEY { + description + "O-RU supports an optional feature to authenticate SSH client via SSHPUBLICKEY method."; + } + + feature POINT-A-OFFSET-TO-ABSOLUTE-FREQUENCY-CENTER { + description + "Feature to indicate if leaf rx-array-carriers/point-a-offset-to-absolute-frequency-center is supported. See CUS-Plane clause 7.7.24.1."; + } +} diff --git a/radio/fhi_72/oaioran.c b/radio/fhi_72/oaioran.c index 493221d6a9..31c754738d 100644 --- a/radio/fhi_72/oaioran.c +++ b/radio/fhi_72/oaioran.c @@ -172,14 +172,16 @@ static int read_prach_data(ru_info_t *ru, int frame, int slot) struct xran_fh_init *fh_init = get_xran_fh_init(); struct xran_fh_config *fh_cfg = get_xran_fh_config(0); - int prach_sym = get_prach_conf_duration(0); + nr_prach_info_t prach_info = get_prach_info(0); struct xran_ru_config *ru_conf = &fh_cfg->ru_conf; int slots_per_frame = 10 << fh_cfg->frame_conf.nNumerology; int slots_per_subframe = 1 << fh_cfg->frame_conf.nNumerology; int tti = slots_per_frame * (frame) + (slot); uint32_t subframe = slot / slots_per_subframe; - uint32_t is_prach_slot = xran_is_prach_slot(0, subframe, (slot % slots_per_subframe)); + // PRACH occasion in a frame if and only if SFN % x == y, TS 38.211 Table 6.3.3.2-2/3/4 + uint32_t is_prach_frame = (frame % prach_info.x == prach_info.y); + uint32_t is_prach_slot = is_prach_frame && xran_is_prach_slot(0, subframe, (slot % slots_per_subframe)); int nb_rx_per_ru = ru->nb_rx / fh_init->xran_ports; /* If it is PRACH slot, copy prach IQ from XRAN PRACH buffer to OAI PRACH buffer */ @@ -188,7 +190,7 @@ static int read_prach_data(ru_info_t *ru, int frame, int slot) LOG_W(HW, "we get rach data from ru, but it is not scheduled %d.%d\n", frame, slot); return -1; } - for (sym_idx = 0; sym_idx < prach_sym; sym_idx++) { + for (sym_idx = 0; sym_idx < prach_info.N_dur; sym_idx++) { for (int aa = 0; aa < ru->nb_rx; aa++) { int16_t *dst, *src; int idx = 0; diff --git a/radio/fhi_72/oran-init.c b/radio/fhi_72/oran-init.c index 07517dcf18..516c2795fe 100644 --- a/radio/fhi_72/oran-init.c +++ b/radio/fhi_72/oran-init.c @@ -30,9 +30,7 @@ #include "common/utils/assertions.h" #include "common/utils/LOG/log.h" -#include "common/utils/nr/nr_common.h" #include "common_lib.h" -#include "openair2/LAYER2/NR_MAC_COMMON/nr_prach_config.h" /* PRACH data samples are 32 bits wide (16bits for I/Q). Each packet contains * 840 samples for long sequence or 144 for short sequence. The payload length @@ -50,7 +48,7 @@ void *gxran_handle; static struct xran_fh_init g_fh_init = {0}; static struct xran_fh_config g_fh_config[XRAN_PORTS_NUM] = {0}; -static uint32_t g_prach_conf_duration[XRAN_PORTS_NUM] = {0}; +static nr_prach_info_t g_prach_info[XRAN_PORTS_NUM] = {0}; static uint32_t get_nSW_ToFpga_FTH_TxBufferLen(int mu, int sections) { @@ -470,11 +468,9 @@ int *oai_oran_initialize(struct xran_fh_init *xran_fh_init, struct xran_fh_confi // retrieve and store prach duration uint8_t idx = xran_fh_config[o_xu_id].prach_conf.nPrachConfIdx; const struct xran_frame_config *fc = &xran_fh_config[o_xu_id].frame_conf; - g_prach_conf_duration[o_xu_id] = - get_nr_prach_occasion_info_from_index(idx, - fc->nNumerology > 2 ? FR2 : FR1, - fc->nFrameDuplexType == XRAN_FDD ? duplex_mode_FDD : duplex_mode_TDD) - .N_dur; + g_prach_info[o_xu_id] = get_nr_prach_occasion_info_from_index(idx, + fc->nNumerology > 2 ? FR2 : FR1, + fc->nFrameDuplexType == XRAN_FDD ? duplex_mode_FDD : duplex_mode_TDD); } // store config after xran initialization -- xran makes modifications to @@ -504,9 +500,9 @@ struct xran_fh_config *get_xran_fh_config(uint32_t port_id) return &g_fh_config[port_id]; } -uint32_t get_prach_conf_duration(uint32_t port_id) +nr_prach_info_t get_prach_info(uint32_t port_id) { struct xran_fh_init *fh_init = get_xran_fh_init(); DevAssert(port_id < fh_init->xran_ports); - return g_prach_conf_duration[port_id]; + return g_prach_info[port_id]; } diff --git a/radio/fhi_72/oran-init.h b/radio/fhi_72/oran-init.h index e56b683a9f..419cbccce4 100644 --- a/radio/fhi_72/oran-init.h +++ b/radio/fhi_72/oran-init.h @@ -22,6 +22,9 @@ #ifndef ORAN_INIT_H #define ORAN_INIT_H +#include "common/utils/nr/nr_common.h" +#include "openair2/LAYER2/NR_MAC_COMMON/nr_prach_config.h" + typedef struct oran_bufs { struct xran_flat_buffer tx[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN][XRAN_NUM_OF_SYMBOL_PER_SLOT]; struct xran_flat_buffer tx_prbmap[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN]; @@ -62,6 +65,16 @@ int *oai_oran_initialize(struct xran_fh_init *fh_init, struct xran_fh_config *fh oran_buf_list_t *get_xran_buffers(uint32_t port_id); struct xran_fh_init *get_xran_fh_init(void); struct xran_fh_config *get_xran_fh_config(uint32_t port_id); -uint32_t get_prach_conf_duration(uint32_t port_id); + +/** + * @brief queries PRACH information necessary for the FHI + * + * @arg port_id XRAN port id + * @return PRACH information holding among other information: + * - N_dur PRACH duration from TS 38.211 Table 6.3.3.2-2/3/4 + * - x from TS 38.211 Table 6.3.3.2-2/3/4 + * - y from TS 38.211 Table 6.3.3.2-2/3/4 + */ +nr_prach_info_t get_prach_info(uint32_t port_id); #endif /* ORAN_INIT_H */ diff --git a/radio/fhi_72/oran_isolate.c b/radio/fhi_72/oran_isolate.c index 9158e468d4..679936d9c9 100644 --- a/radio/fhi_72/oran_isolate.c +++ b/radio/fhi_72/oran_isolate.c @@ -86,6 +86,7 @@ int trx_oran_stop(openair0_device *device) #ifdef OAI_MPLANE printf("[MPLANE] Stopping M-plane.\n"); disconnect_mplane(s->mplane_priv); + free(s->mplane_priv); #endif return (0); } @@ -312,41 +313,42 @@ __attribute__((__visibility__("default"))) int transport_init(openair0_device *d bool success = false; #ifdef OAI_MPLANE - ru_session_list_t ru_session_list = {0}; - success = init_mplane(&ru_session_list); + ru_session_list_t *ru_session_list = calloc(1, sizeof(*ru_session_list)); + assert(ru_session_list != NULL && "Memory exhausted"); + success = init_mplane(ru_session_list); AssertFatal(success, "[MPLANE] Cannot initialize M-plane.\n"); - bool ru_configured[ru_session_list.num_rus]; - for (size_t i = 0; i < ru_session_list.num_rus; i++) { - ru_session_t *ru_session = &ru_session_list.ru_session[i]; + bool ru_configured[ru_session_list->num_rus]; + for (size_t i = 0; i < ru_session_list->num_rus; i++) { + ru_session_t *ru_session = &ru_session_list->ru_session[i]; ru_configured[i] = connect_mplane(ru_session); if (!ru_configured[i]) { continue; } - ru_configured[i] = manage_ru(ru_session, openair0_cfg, ru_session_list.num_rus); + ru_configured[i] = manage_ru(ru_session, openair0_cfg, ru_session_list->num_rus); } bool all_ok = true; - bool ru_ready[ru_session_list.num_rus]; - for (size_t i = 0; i < ru_session_list.num_rus; i++) { + bool ru_ready[ru_session_list->num_rus]; + for (size_t i = 0; i < ru_session_list->num_rus; i++) { if (!ru_configured[i]) { - MP_LOG_I("RU with IP %s couldn't be configured.\n", ru_session_list.ru_session[i].ru_ip_add); + MP_LOG_I("RU with IP %s couldn't be configured.\n", ru_session_list->ru_session[i].ru_ip_add); all_ok = false; } ru_ready[i] = false; } if (!all_ok) { - disconnect_mplane((void *)&ru_session_list); + disconnect_mplane(ru_session_list); AssertFatal(false, "[MPLANE] Stopping M-plane.\n"); } while (true) { sleep(1); bool all_rus_ready = true; - for (int i = 0; i < ru_session_list.num_rus; i++) { - ru_session_t *ru_session = &ru_session_list.ru_session[i]; - if (!ru_ready[i] && ru_session->ru_notif.config_change && ru_session->ru_notif.rx_carrier_state && ru_session->ru_notif.tx_carrier_state) { + for (int i = 0; i < ru_session_list->num_rus; i++) { + ru_session_t *ru_session = &ru_session_list->ru_session[i]; + if (!ru_ready[i] && ru_session->ru_notif.config_change && !ru_session->ru_notif.rx_carrier_state && !ru_session->ru_notif.tx_carrier_state) { MP_LOG_I("RU \"%s\" is now ready.\n", ru_session->ru_ip_add); ru_ready[i] = true; if (!ru_session->pm_stats.start_up_timing) { @@ -364,9 +366,9 @@ __attribute__((__visibility__("default"))) int transport_init(openair0_device *d } } - eth->mplane_priv = (void *)&ru_session_list; + eth->mplane_priv = ru_session_list; - success = get_xran_config((void *)&ru_session_list, openair0_cfg, &fh_init, fh_config); + success = get_xran_config(ru_session_list, openair0_cfg, &fh_init, fh_config); AssertFatal(success, "[MPLANE] Cannot configure xran with M-plane info.\n"); #else success = get_xran_config(NULL, openair0_cfg, &fh_init, fh_config);