Merge remote-tracking branch 'origin/cleanup-cmake' into integration_2026_w07 (!3915)
Cleanup Cmake: remove some double compilation Harmonize some cmake code to avoid double compilation, notably around polar and smallblock. In develop, we just add their sources to other targets, whereas now we define STATIC libraries (further changed to shared library in !3856) to avoid double compilation. With this command line: cmake .. -GNinja -DENABLE_TESTS=ON && ninja shows that before we compile 12631 files, where after it is 12583 there is additional supporting cleanup (move code, remove headers, types, ...). there is more harmonization to do, I limited myself to some easy wins. For instance, we do the same with PDCP/SDAP, and this should be refactored into STATIC libraries as well.
This commit is contained in:
@@ -414,22 +414,6 @@ typedef struct NbIoTRrcConfigurationReq_s {
|
||||
long ue_TimersAndConstants_n311_NB;
|
||||
} NbIoTRrcConfigurationReq;
|
||||
|
||||
// gNB: GNB_APP -> RRC messages
|
||||
typedef struct NRRrcConfigurationReq_s {
|
||||
uint32_t tac;
|
||||
plmn_id_t plmn[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
bool um_on_default_drb;
|
||||
bool enable_sdap;
|
||||
} gNB_RrcConfigurationReq;
|
||||
|
||||
typedef struct NRDuDlReq_s {
|
||||
rnti_t rnti;
|
||||
uint8_t *buf;
|
||||
uint64_t srb_id;
|
||||
} NRDuDlReq_t;
|
||||
|
||||
// eNB: realtime -> RRC messages
|
||||
typedef struct rrc_subframe_process_s {
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
@@ -3,7 +3,7 @@ add_subdirectory(MESSAGES)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_executable(f1ap_ids_test f1ap_ids_test.c f1ap_ids.c)
|
||||
target_link_libraries(f1ap_ids_test HASHTABLE minimal_lib)
|
||||
target_link_libraries(f1ap_ids_test ds minimal_lib)
|
||||
add_dependencies(tests f1ap_ids_test)
|
||||
add_test(NAME F1AP_ID_test COMMAND f1ap_ids_test)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "f1ap_ids.h"
|
||||
|
||||
#include <pthread.h>
|
||||
#include "common/utils/hashtable/hashtable.h"
|
||||
#include "ds/hashtable.h"
|
||||
#include "common/utils/assertions.h"
|
||||
|
||||
|
||||
|
||||
@@ -2092,7 +2092,7 @@ gNB_RRC_INST *RCconfig_NRRRC()
|
||||
|
||||
// search if in active list
|
||||
|
||||
gNB_RrcConfigurationReq nrrrc_config = {0};
|
||||
nr_rrc_config_t nrrrc_config = {0};
|
||||
for (k=0; k <num_gnbs ; k++) {
|
||||
if (strcmp(GNBSParams[GNB_ACTIVE_GNBS_IDX].strlistptr[k], *(GNBParamList.paramarray[i][GNB_GNB_NAME_IDX].strptr) )== 0) {
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
/* utils */
|
||||
#include "assertions.h"
|
||||
#include "reverse_bits.h"
|
||||
#include "oai_asn1.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair3/UTILS/conversions.h"
|
||||
#include "LAYER2/nr_rlc/nr_rlc_asn1_utils.h"
|
||||
#include "reverse_bits.h"
|
||||
|
||||
#include "NR_MeasurementTimingConfiguration.h"
|
||||
#include "uper_decoder.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define MBMS_MULTICAST_OUT
|
||||
|
||||
#include "assertions.h"
|
||||
#include "hashtable.h"
|
||||
#include "ds/hashtable.h"
|
||||
#include "pdcp.h"
|
||||
#include "pdcp_util.h"
|
||||
#include "pdcp_sequence_manager.h"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
# include "hashtable.h"
|
||||
#include "ds/hashtable.h"
|
||||
# include "LTE_asn_constant.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
#include "intertask_interface.h"
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "common/utils/oai_asn1.h"
|
||||
#include "constr_TYPE.h"
|
||||
#include "cuup_cucp_if.h"
|
||||
#include "gtpv1_u_messages_types.h"
|
||||
#include "nr_pdcp/nr_pdcp_entity.h"
|
||||
#include "nr_pdcp_oai_api.h"
|
||||
#include "openair2/COMMON/e1ap_messages_types.h"
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "LTE_DRB-ToAddModList.h"
|
||||
#include "LTE_DRB-ToReleaseList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#include "LTE_SRB-ToAddModList.h"
|
||||
#include "NR_DRB-ToAddMod.h"
|
||||
#include "NR_QFI.h"
|
||||
#include "NR_SDAP-Config.h"
|
||||
@@ -53,7 +48,7 @@
|
||||
#include "f1ap_messages_types.h"
|
||||
#include "gnb_config.h"
|
||||
#include "gtpv1_u_messages_types.h"
|
||||
#include "hashtable.h"
|
||||
#include "ds/hashtable.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "NR_MAC_UE/mac_proto.h"
|
||||
#include "assertions.h"
|
||||
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
|
||||
#include "reverse_bits.h"
|
||||
#include "openair2/RRC/NR_UE/L2_interface_ue.h"
|
||||
|
||||
#define MAX_IF_MODULES 100
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "assertions.h"
|
||||
#include "hashtable.h"
|
||||
#include "ds/hashtable.h"
|
||||
#include "oai_asn1.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
|
||||
@@ -325,7 +325,6 @@ int do_RRCSetup(uint8_t *const buffer,
|
||||
const uint8_t transaction_id,
|
||||
const uint8_t *masterCellGroup,
|
||||
int masterCellGroup_len,
|
||||
const gNB_RrcConfigurationReq *configuration,
|
||||
NR_SRB_ToAddModList_t *SRBs)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#define __RRC_NR_MESSAGES_ASN1_MSG__H__
|
||||
|
||||
#include <common/utils/assertions.h>
|
||||
#include "common/platform_constants.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "NR_ARFCN-ValueNR.h"
|
||||
@@ -52,10 +53,10 @@
|
||||
#include "NR_SecurityConfig.h"
|
||||
#include "NR_MeasurementReport.h"
|
||||
#include "NR_MeasurementTimingConfiguration.h"
|
||||
#include "NR_UE-NR-Capability.h"
|
||||
#include "NR_UE-CapabilityRAT-ContainerList.h"
|
||||
#include "ds/seq_arr.h"
|
||||
#include "ds/byte_array.h"
|
||||
#include "rrc_messages_types.h"
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_configuration.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
struct asn_TYPE_descriptor_s;
|
||||
@@ -95,7 +96,6 @@ int do_RRCSetup(uint8_t *const buffer,
|
||||
const uint8_t transaction_id,
|
||||
const uint8_t *masterCellGroup,
|
||||
int masterCellGroup_len,
|
||||
const gNB_RrcConfigurationReq *configuration,
|
||||
NR_SRB_ToAddModList_t *SRBs);
|
||||
|
||||
int do_NR_SecurityModeCommand(uint8_t *const buffer,
|
||||
|
||||
@@ -148,6 +148,16 @@ typedef enum {
|
||||
RRC_UECAPABILITY_ENQUIRY,
|
||||
} rrc_action_t;
|
||||
|
||||
typedef struct nr_rrc_config {
|
||||
uint32_t tac;
|
||||
plmn_id_t plmn[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
bool um_on_default_drb;
|
||||
bool enable_sdap;
|
||||
int drbs;
|
||||
} nr_rrc_config_t;
|
||||
|
||||
/* Small state for delaying NG-triggered actions (setup/release) */
|
||||
typedef struct {
|
||||
int max_delays;
|
||||
@@ -440,7 +450,7 @@ typedef struct gNB_RRC_INST_s {
|
||||
RB_HEAD(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
|
||||
|
||||
// RRC configuration
|
||||
gNB_RrcConfigurationReq configuration;
|
||||
nr_rrc_config_t configuration;
|
||||
seq_arr_t *SIBs;
|
||||
|
||||
// gNB N3 GTPU instance
|
||||
|
||||
@@ -118,7 +118,7 @@ byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t *
|
||||
nr_rrc_reconfig_param_t get_RRCReconfiguration_params(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t srb_reest_bitmap, bool drb_reestablish);
|
||||
|
||||
f1ap_qos_flow_param_t get_qos_char_from_qos_flow_param(const pdusession_level_qos_parameter_t *qos_param);
|
||||
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration);
|
||||
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, nr_rrc_config_t *configuration);
|
||||
NR_SRB_ToAddModList_t *createSRBlist(gNB_RRC_UE_t *ue, uint8_t reestablish);
|
||||
NR_DRB_ToAddModList_t *createDRBlist(gNB_RRC_UE_t *ue, bool reestablish, bool do_integrity, bool do_ciphering);
|
||||
void activate_srb(gNB_RRC_UE_t *UE, int srb_id);
|
||||
|
||||
@@ -360,7 +360,7 @@ static void rrc_gNB_CU_DU_init(gNB_RRC_INST *rrc)
|
||||
cu_init_f1_ue_data();
|
||||
}
|
||||
|
||||
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration)
|
||||
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, nr_rrc_config_t *configuration)
|
||||
{
|
||||
AssertFatal(rrc != NULL, "RC.nrrrc not initialized!");
|
||||
AssertFatal(MAX_MOBILES_PER_GNB < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
|
||||
@@ -587,7 +587,7 @@ static void rrc_gNB_generate_RRCSetup(instance_t instance,
|
||||
ue_p->xids[xid] = RRC_SETUP;
|
||||
NR_SRB_ToAddModList_t *SRBs = createSRBlist(ue_p, false);
|
||||
|
||||
int size = do_RRCSetup(buf, sizeof(buf), xid, masterCellGroup, masterCellGroup_len, &rrc->configuration, SRBs);
|
||||
int size = do_RRCSetup(buf, sizeof(buf), xid, masterCellGroup, masterCellGroup_len, SRBs);
|
||||
AssertFatal(size > 0, "do_RRCSetup failed\n");
|
||||
AssertFatal(size <= 1024, "memory corruption\n");
|
||||
|
||||
|
||||
@@ -1641,7 +1641,7 @@ int rrc_gNB_process_PAGING_IND(MessageDef *msg_p, instance_t instance)
|
||||
p->mnc_digit_length,
|
||||
p->mnc,
|
||||
msg->tac[tai_size]);
|
||||
gNB_RrcConfigurationReq *req = &RC.nrrrc[instance]->configuration;
|
||||
nr_rrc_config_t *req = &RC.nrrrc[instance]->configuration;
|
||||
for (uint8_t j = 0; j < req->num_plmn; j++) {
|
||||
plmn_id_t *req_plmn = &req->plmn[j];
|
||||
if (req_plmn->mcc == p->mcc && req_plmn->mnc == p->mnc && req->tac == msg->tac[tai_size]) {
|
||||
|
||||
@@ -95,7 +95,7 @@ int get_ssb_arfcn(const struct nr_rrc_cell_container_t *cell)
|
||||
|
||||
static bool rrc_gNB_plmn_matches(const gNB_RRC_INST *rrc, const f1ap_served_cell_info_t *info)
|
||||
{
|
||||
const gNB_RrcConfigurationReq *conf = &rrc->configuration;
|
||||
const nr_rrc_config_t *conf = &rrc->configuration;
|
||||
return conf->num_plmn == 1 // F1 supports only one
|
||||
&& conf->plmn[0].mcc == info->plmn.mcc && conf->plmn[0].mnc == info->plmn.mnc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user