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:
Jaroslava Fiedlerova
2025-04-17 19:56:58 +02:00
30 changed files with 386 additions and 664 deletions
+6
View File
@@ -24,6 +24,12 @@
#include <stdint.h>
typedef struct plmn_id_s {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
} plmn_id_t;
typedef struct nssai_s {
uint8_t sst;
uint32_t sd;
+16
View File
@@ -167,4 +167,20 @@ typedef struct paramlist_def {
int numelt ;
} paramlist_def_t;
/* Macros to get parameters with the config module API */
#define GET_PARAMS(param_def, param_desc, prefix) \
printf("Reading '%s' section from the config file\n", #param_def); \
paramdef_t param_def[] = param_desc; \
config_get(config_get_if(), param_def, sizeofArray(param_def), prefix);
/* Macros to get params lists with the config module API */
#define GET_PARAMS_LIST(param_list, param_def, param_desc, list_name, prefix, ...) \
paramdef_t param_def[] = param_desc; \
paramlist_def_t param_list = {list_name, NULL, 0}; \
__VA_OPT__(checkedparam_t config_check_##param_def[] = __VA_ARGS__; \
static_assert(sizeofArray(config_check_##param_def) == sizeofArray(param_def), \
"param_def_t array and corresponding checkedparam_t array should have the same size"); \
for (int i = 0; i < sizeofArray(param_def); ++i) param_def[i].chkPptr = &(config_check_##param_def[i]);) \
config_getlist(config_get_if(), &param_list, param_def, sizeofArray(param_def), prefix);
#endif /* INCLUDE_CONFIG_PARAMDESC_H */
+2
View File
@@ -80,6 +80,8 @@
#define NB_RAB_MAX 11 /* from LTE_maxDRB in LTE_asn_constant.h */
#define RAB_OFFSET 0x000F
#define MAX_NUM_SLICES 1024
// RLC Entity
#define RLC_TX_MAXSIZE 10000000
#define RLC_RX_MAXSIZE 10000000