Merge remote-tracking branch 'origin/nr-gnb-config-refactor' into integration_2025_w16 (!3293)
Cleanup and refactor initial gNB configuration This is follow-up on !3048 (merged). Major changes in this MR: - Add config functions to reduce redundant code repeated in multiple places in the file - Add macros to reduce redundant code in gNB configuration - Refactor RCconfig_NR_NG - Cleanup obsolete and commented out code - Refactor includes in executables/nr-gnb.c - Introduce platform type plmn_id_t for consistency across the stack: F1AP, NGAP can now use the same struct type - And other minor formatting
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "common/5g_platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
@@ -92,12 +93,6 @@ typedef struct f1ap_net_config_t {
|
||||
uint16_t DUport;
|
||||
} f1ap_net_config_t;
|
||||
|
||||
typedef struct f1ap_plmn_t {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
} f1ap_plmn_t;
|
||||
|
||||
typedef struct f1ap_cp_tnl_s {
|
||||
in_addr_t tl_address; // currently only IPv4 supported
|
||||
uint16_t port;
|
||||
@@ -129,7 +124,7 @@ typedef struct f1ap_tdd_info_t {
|
||||
|
||||
typedef struct f1ap_served_cell_info_t {
|
||||
// NR CGI
|
||||
f1ap_plmn_t plmn;
|
||||
plmn_id_t plmn;
|
||||
uint64_t nr_cellid; // NR Global Cell Id
|
||||
|
||||
// NR Physical Cell Ids
|
||||
@@ -140,7 +135,7 @@ typedef struct f1ap_served_cell_info_t {
|
||||
|
||||
// Number of slice support items (max 16, could be increased to as much as 1024)
|
||||
uint16_t num_ssi;
|
||||
nssai_t nssai[16];
|
||||
nssai_t nssai[MAX_NUM_SLICES];
|
||||
|
||||
f1ap_mode_t mode;
|
||||
union {
|
||||
@@ -192,7 +187,7 @@ typedef struct f1ap_sib_msg_t {
|
||||
} f1ap_sib_msg_t;
|
||||
|
||||
typedef struct served_cells_to_activate_s {
|
||||
f1ap_plmn_t plmn;
|
||||
plmn_id_t plmn;
|
||||
// NR Global Cell Id
|
||||
uint64_t nr_cellid;
|
||||
/// NRPCI [int 0..1007]
|
||||
@@ -239,7 +234,7 @@ typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
|
||||
uint16_t num_cells_failed_to_be_activated;
|
||||
struct {
|
||||
// NR CGI
|
||||
f1ap_plmn_t plmn;
|
||||
plmn_id_t plmn;
|
||||
uint64_t nr_cellid;
|
||||
uint16_t cause;
|
||||
} cells_failed_to_be_activated[F1AP_MAX_NB_CELLS];
|
||||
@@ -256,7 +251,7 @@ typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
|
||||
struct {
|
||||
uint32_t gNB_CU_ue_id;
|
||||
// NR CGI
|
||||
f1ap_plmn_t ue_plmn;
|
||||
plmn_id_t ue_plmn;
|
||||
uint64_t ue_nr_cellid;
|
||||
} dedicatedSIDeliveryNeededUEs[F1AP_MAX_NO_UE_ID];
|
||||
} f1ap_gnb_cu_configuration_update_acknowledge_t;
|
||||
@@ -283,7 +278,7 @@ typedef struct f1ap_gnb_du_configuration_update_s {
|
||||
/// int cells_to_modify
|
||||
uint16_t num_cells_to_modify;
|
||||
struct {
|
||||
f1ap_plmn_t old_plmn;
|
||||
plmn_id_t old_plmn;
|
||||
uint64_t old_nr_cellid; // NR Global Cell Id
|
||||
f1ap_served_cell_info_t info;
|
||||
f1ap_gnb_du_system_info_t *sys_info;
|
||||
@@ -293,7 +288,7 @@ typedef struct f1ap_gnb_du_configuration_update_s {
|
||||
uint16_t num_cells_to_delete;
|
||||
struct {
|
||||
// NR CGI
|
||||
f1ap_plmn_t plmn;
|
||||
plmn_id_t plmn;
|
||||
uint64_t nr_cellid; // NR Global Cell Id
|
||||
} cell_to_delete[F1AP_MAX_NB_CELLS];
|
||||
/// gNB-DU unique ID, at least within a gNB-CU (0 .. 2^36 - 1)
|
||||
@@ -333,7 +328,7 @@ typedef struct f1ap_dl_rrc_message_s {
|
||||
|
||||
typedef struct f1ap_initial_ul_rrc_message_s {
|
||||
uint32_t gNB_DU_ue_id;
|
||||
f1ap_plmn_t plmn;
|
||||
plmn_id_t plmn;
|
||||
/// nr cell id
|
||||
uint64_t nr_cellid;
|
||||
/// crnti
|
||||
@@ -475,7 +470,7 @@ typedef struct f1ap_ue_context_setup_s {
|
||||
uint32_t gNB_CU_ue_id;
|
||||
uint32_t gNB_DU_ue_id;
|
||||
// SpCell Info
|
||||
f1ap_plmn_t plmn;
|
||||
plmn_id_t plmn;
|
||||
uint64_t nr_cellid;
|
||||
uint8_t servCellIndex;
|
||||
uint8_t *cellULConfigured;
|
||||
@@ -549,7 +544,7 @@ typedef struct f1ap_paging_ind_s {
|
||||
uint16_t ueidentityindexvalue;
|
||||
uint64_t fiveg_s_tmsi;
|
||||
uint8_t fiveg_s_tmsi_length;
|
||||
f1ap_plmn_t plmn;
|
||||
plmn_id_t plmn;
|
||||
uint64_t nr_cellid;
|
||||
uint8_t paging_drx;
|
||||
} f1ap_paging_ind_t;
|
||||
|
||||
@@ -435,10 +435,8 @@ typedef enum ngap_paging_ind_present_s {
|
||||
} ngap_paging_ind_present_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
uint8_t num_nssai;
|
||||
plmn_id_t plmn;
|
||||
uint16_t num_nssai;
|
||||
nssai_t s_nssai[8];
|
||||
} ngap_plmn_t;
|
||||
|
||||
|
||||
@@ -416,9 +416,7 @@ typedef struct NbIoTRrcConfigurationReq_s {
|
||||
// gNB: GNB_APP -> RRC messages
|
||||
typedef struct NRRrcConfigurationReq_s {
|
||||
uint32_t tac;
|
||||
uint16_t mcc[PLMN_LIST_MAX_SIZE];
|
||||
uint16_t mnc[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
plmn_id_t plmn[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
bool um_on_default_drb;
|
||||
|
||||
Reference in New Issue
Block a user