From 4d755c9a1a5367061fbb68fbc621e62a35f2fe3a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 2 Jun 2025 11:39:33 +0200 Subject: [PATCH] Move nr_rrc_config.c to DU and rename nr_radio_config.c A number of radio-related RRC parameters, e.g., CellGroupConfig, "originate" at the DU and are sent to the CU for forwarding to the UE only. Similarly, there are additional parameters, e.g., RLC-BearerConfig (part of CellGroupConfig), that originate at the DU. Hence, the DU decides about these parameters, depending on the MAC state and capabilities. To clarify this, move the existing openair2/RRC/NR/nr_rrc_config.{c,h} => openair2/LAYER2/NR_MAC_gNB/nr_radio_config.{c,h} So that developers know that while those are RRC parameters, they originate at the DU. In other words, the CU/RRC is not supposed to use any of these functions in the RRC. Correspondingly, includes of this file have been cleaned up (and when they are not necessary at the MAC as well). --- CMakeLists.txt | 2 +- common/utils/telnetsrv/telnetsrv_o1.c | 2 +- doc/Doxyfile | 4 ++-- openair1/SIMULATION/NR_PHY/dlsim.c | 2 +- openair1/SIMULATION/NR_PHY/ulsim.c | 2 +- openair2/GNB_APP/gnb_config.c | 1 - openair2/LAYER2/NR_MAC_gNB/config.c | 1 - openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c | 1 + openair2/LAYER2/NR_MAC_gNB/main.c | 2 -- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 2 +- .../NR_MAC_gNB/nr_radio_config.c} | 11 +---------- .../NR_MAC_gNB/nr_radio_config.h} | 13 ++----------- openair2/RRC/NR/rrc_gNB_nsa.c | 1 - 13 files changed, 11 insertions(+), 33 deletions(-) rename openair2/{RRC/NR/nr_rrc_config.c => LAYER2/NR_MAC_gNB/nr_radio_config.c} (99%) rename openair2/{RRC/NR/nr_rrc_config.h => LAYER2/NR_MAC_gNB/nr_radio_config.h} (95%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b607056aa4..16dac5f2fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1147,7 +1147,6 @@ set(L2_NR_SRC ${NR_RRC_DIR}/rrc_gNB.c ${NR_RRC_DIR}/mac_rrc_dl_direct.c ${NR_RRC_DIR}/mac_rrc_dl_f1ap.c - ${NR_RRC_DIR}/nr_rrc_config.c ${NR_RRC_DIR}/rrc_gNB_nsa.c ${NR_RRC_DIR}/rrc_gNB_UE_context.c ${NR_RRC_DIR}/rrc_gNB_NGAP.c @@ -1230,6 +1229,7 @@ set (MAC_NR_SRC ${NR_GNB_MAC_DIR}/mac_rrc_dl_handler.c ${NR_GNB_MAC_DIR}/mac_rrc_ul_direct.c ${NR_GNB_MAC_DIR}/mac_rrc_ul_f1ap.c + ${NR_GNB_MAC_DIR}/nr_radio_config.c ) diff --git a/common/utils/telnetsrv/telnetsrv_o1.c b/common/utils/telnetsrv/telnetsrv_o1.c index 7136f5a1b7..ac368885f6 100644 --- a/common/utils/telnetsrv/telnetsrv_o1.c +++ b/common/utils/telnetsrv/telnetsrv_o1.c @@ -34,7 +34,7 @@ #include "openair2/RRC/NR/nr_rrc_defs.h" #include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h" -#include "openair2/RRC/NR/nr_rrc_config.h" +#include "openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c" #include "common/utils/nr/nr_common.h" diff --git a/doc/Doxyfile b/doc/Doxyfile index 6b0b390f05..f128e3eb88 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -1677,6 +1677,7 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h \ +@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h \ @@ -1687,6 +1688,7 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c \ +@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/openair2_proc.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/RLC/rlc.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/mac_tables.c \ @@ -1847,7 +1849,6 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_defs.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_if.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_direct.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_direct.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.h \ @@ -1858,7 +1859,6 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_UE_context.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_e1ap.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \ diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index e36d50c6ad..6238c09a2e 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -37,6 +37,7 @@ #include "LAYER2/NR_MAC_gNB/mac_proto.h" #include "LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h" #include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h" +#include "LAYER2/NR_MAC_gNB/nr_radio_config.h" #include "NR_BCCH-BCH-Message.h" #include "NR_BWP-Downlink.h" #include "NR_CellGroupConfig.h" @@ -61,7 +62,6 @@ #include "PHY/defs_nr_common.h" #include "PHY/impl_defs_nr.h" #include "PHY/phy_vars_nr_ue.h" -#include "RRC/NR/nr_rrc_config.h" #include "SCHED_NR/fapi_nr_l1.h" #include "SCHED_NR/sched_nr.h" #include "SCHED_NR_UE/defs.h" diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index da85ef0de4..4c12530f30 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -87,7 +87,7 @@ #include "openair1/SIMULATION/TOOLS/sim.h" #include "openair2/LAYER2/NR_MAC_UE/mac_proto.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" -#include "openair2/RRC/NR/nr_rrc_config.h" +#include "openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h" #include "time_meas.h" #include "utils.h" diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 2c82a6eb6e..bc8a65b1e3 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -42,7 +42,6 @@ #include "PHY/INIT/nr_phy_init.h" #include "PHY/defs_gNB.h" #include "PHY/defs_nr_common.h" -#include "RRC/NR/nr_rrc_config.h" #include "RRC_nr_paramsvalues.h" #include "T.h" #include "asn_SEQUENCE_OF.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index aacae2bea1..43d48eeeeb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -44,7 +44,6 @@ #include "NR_BCCH-BCH-Message.h" #include "NR_ServingCellConfigCommon.h" #include "NR_MIB.h" -#include "RRC/NR/nr_rrc_config.h" #include "SCHED_NR/phy_frame_config_nr.h" #include "T.h" #include "asn_internal.h" 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 9928c168c1..28c129cb58 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -22,6 +22,7 @@ #include "mac_rrc_dl_handler.h" #include "mac_proto.h" +#include "nr_radio_config.h" #include "openair2/F1AP/f1ap_ids.h" #include "openair2/F1AP/f1ap_common.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 3137ce0902..9c8e414f52 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -53,8 +53,6 @@ #include "NR_ServingCellConfig.h" #include "NR_ServingCellConfigCommon.h" #include "NR_TAG.h" -#include "RRC/NR/MESSAGES/asn1_msg.h" -#include "RRC/NR/nr_rrc_config.h" #include "assertions.h" #include "common/ngran_types.h" #include "common/ran_context.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 0b977de276..d97783604f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -74,7 +74,7 @@ #include "NR_BCCH-BCH-Message.h" #include "NR_CellGroupConfig.h" #include "NR_BCCH-DL-SCH-Message.h" -#include "openair2/RRC/NR/nr_rrc_config.h" +#include "nr_radio_config.h" /* PHY */ #include "time_meas.h" diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c similarity index 99% rename from openair2/RRC/NR/nr_rrc_config.c rename to openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index 385dd5bc2d..fe4b138f49 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -19,16 +19,7 @@ * contact@openairinterface.org */ -/*! \file nr_rrc_config.c - * \brief rrc config for gNB - * \author Raymond Knopp, WEI-TAI CHEN - * \date 2018 - * \version 1.0 - * \company Eurecom, NTUST - * \email: raymond.knopp@eurecom.fr, kroempa@gmail.com - */ - -#include "nr_rrc_config.h" +#include "nr_radio_config.h" #include #include diff --git a/openair2/RRC/NR/nr_rrc_config.h b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h similarity index 95% rename from openair2/RRC/NR/nr_rrc_config.h rename to openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h index b9b074d377..d5a7f8d40a 100644 --- a/openair2/RRC/NR/nr_rrc_config.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h @@ -19,17 +19,8 @@ * contact@openairinterface.org */ -/*! \file nr_rrc_config.c - * \brief rrc config for gNB - * \author Raymond Knopp, WEI-TAI CHEN - * \date 2018 - * \version 1.0 - * \company Eurecom, NTUST - * \email: raymond.knopp@eurecom.fr, kroempa@gmail.com - */ - -#ifndef __NR_RRC_CONFIG_H__ -#define __NR_RRC_CONFIG_H__ +#ifndef __NR_MAC_RRC_CONFIG_H__ +#define __NR_MAC_RRC_CONFIG_H__ #include #include diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 120a400bbf..deabe38327 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -40,7 +40,6 @@ #include #include "MESSAGES/asn1_msg.h" #include "OCTET_STRING.h" -#include "RRC/NR/nr_rrc_config.h" #include "T.h" #include "asn_codecs.h" #include "asn_internal.h"