From 284b57acbf2a88acdf4e6d6fd4e29171f0f2e548 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 28 Jul 2023 11:43:48 +0200 Subject: [PATCH] bugfix: put constants in correct file The RLC tests were not compiling because of the include of openair2/RRC/NR/rrc_gNB_radio_bearers.h by openair2/LAYER2/nr_rlc/nr_rlc_entity.h which does not seem correct/necessary to start with. The only thing needed by nr_rlc_entity.h from rrc_gNB_radio_bearers.h is MAX_DRBS_PER_UE which can be defined in common/platform_constants.h like NGAP_MAX_PDU_SESSION. --- common/platform_constants.h | 3 +++ openair2/LAYER2/nr_rlc/nr_rlc_entity.h | 1 - openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h | 1 + openair2/RRC/NR/rrc_gNB_radio_bearers.h | 4 ++-- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/platform_constants.h b/common/platform_constants.h index 8e17c18343..a6344184bd 100644 --- a/common/platform_constants.h +++ b/common/platform_constants.h @@ -72,6 +72,9 @@ #define NGAP_MAX_PDU_SESSION (256) /* As defined in TS 38.413 9.2.1.1 Range Bound for PDU Sessions. */ #define NGAP_MAX_DRBS_PER_UE (32) /* As defined in TS 38.413 9.2.1.1 - maxnoofDRBs */ +#define MAX_DRBS_PER_UE (32) /* Maximum number of Data Radio Bearers per UE */ +#define MAX_PDUS_PER_UE (8) /* Maximum number of PDU Sessions per UE */ + #define NB_RB_MBMS_MAX (29 * 16) /* 29 = LTE_maxSessionPerPMCH + 16 = LTE_maxServiceCount from LTE_asn_constant.h */ #define NB_RAB_MAX 11 /* from LTE_maxDRB in LTE_asn_constant.h */ diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity.h b/openair2/LAYER2/nr_rlc/nr_rlc_entity.h index 675f4a3e96..cd26094cf7 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity.h +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity.h @@ -23,7 +23,6 @@ #define _NR_RLC_ENTITY_H_ #include -#include "openair2/RRC/NR/rrc_gNB_radio_bearers.h" #include "common/utils/time_stat.h" diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h b/openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h index c7e42a0a0d..958f216592 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h +++ b/openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h @@ -23,6 +23,7 @@ #define _NR_RLC_UE_MANAGER_H_ #include "openair2/COMMON/platform_types.h" #include "nr_rlc_entity.h" +#include "common/platform_constants.h" typedef void nr_rlc_ue_manager_t; diff --git a/openair2/RRC/NR/rrc_gNB_radio_bearers.h b/openair2/RRC/NR/rrc_gNB_radio_bearers.h index 219bc21948..aff6e75ea6 100644 --- a/openair2/RRC/NR/rrc_gNB_radio_bearers.h +++ b/openair2/RRC/NR/rrc_gNB_radio_bearers.h @@ -27,8 +27,8 @@ #include "NR_DRB-ToAddMod.h" #include "NR_SRB-ToAddMod.h" -#define MAX_DRBS_PER_UE (32) /* Maximum number of Data Radio Bearers per UE */ -#define MAX_PDUS_PER_UE (8) /* Maximum number of PDU Sessions per UE */ +#include "common/platform_constants.h" + #define DRB_ACTIVE_NONGBR (2) /* DRB is used for Non-GBR Flows */ #define DRB_ACTIVE (1) #define DRB_INACTIVE (0)