Commit fecb4bc3 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/fix-e2-agent' into integration_2023_w48

parents 5440d667 8e990850
...@@ -61,6 +61,7 @@ ForEachMacros: ...@@ -61,6 +61,7 @@ ForEachMacros:
- Q_FOREACH - Q_FOREACH
- BOOST_FOREACH - BOOST_FOREACH
- RB_FOREACH - RB_FOREACH
- UE_iterator
IncludeBlocks: Preserve IncludeBlocks: Preserve
IncludeCategories: IncludeCategories:
- Regex: '^<ext/.*\.h>' - Regex: '^<ext/.*\.h>'
......
...@@ -8,6 +8,7 @@ gNBs = ...@@ -8,6 +8,7 @@ gNBs =
{ {
////////// Identification parameters: ////////// Identification parameters:
gNB_ID = 0xe00; gNB_ID = 0xe00;
gNB_CU_UP_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB"; # cell_type = "CELL_MACRO_GNB";
......
...@@ -8,6 +8,7 @@ gNBs = ...@@ -8,6 +8,7 @@ gNBs =
{ {
////////// Identification parameters: ////////// Identification parameters:
gNB_ID = 0xe00; gNB_ID = 0xe00;
gNB_CU_UP_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB"; # cell_type = "CELL_MACRO_GNB";
......
...@@ -7,6 +7,7 @@ gNBs = ...@@ -7,6 +7,7 @@ gNBs =
{ {
////////// Identification parameters: ////////// Identification parameters:
gNB_ID = 0xe00; gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB"; # cell_type = "CELL_MACRO_GNB";
......
...@@ -7,6 +7,7 @@ gNBs = ...@@ -7,6 +7,7 @@ gNBs =
{ {
////////// Identification parameters: ////////// Identification parameters:
gNB_ID = 0xe00; gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB"; # cell_type = "CELL_MACRO_GNB";
......
...@@ -7,6 +7,7 @@ gNBs = ...@@ -7,6 +7,7 @@ gNBs =
{ {
////////// Identification parameters: ////////// Identification parameters:
gNB_ID = 0xe00; gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB"; # cell_type = "CELL_MACRO_GNB";
......
...@@ -205,7 +205,7 @@ services: ...@@ -205,7 +205,7 @@ services:
privileged: true privileged: true
container_name: rfsim5g-oai-du2 container_name: rfsim5g-oai-du2
environment: environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --gNBs.[0].gNB_ID 0xe01 --gNBs.[0].nr_cellid 87654321 --gNBs.[0].servingCellConfigCommon.[0].physCellId 1 --MACRLCs.[0].local_n_address 192.168.71.143 --log_config.global_log_options level,nocolor,time USE_ADDITIONAL_OPTIONS: --sa --rfsim --gNBs.[0].gNB_DU_ID 0xe01 --gNBs.[0].nr_cellid 87654321 --gNBs.[0].servingCellConfigCommon.[0].physCellId 1 --MACRLCs.[0].local_n_address 192.168.71.143 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0 ASAN_OPTIONS: detect_leaks=0
depends_on: depends_on:
- oai-cu - oai-cu
...@@ -224,7 +224,7 @@ services: ...@@ -224,7 +224,7 @@ services:
privileged: true privileged: true
container_name: rfsim5g-oai-du3 container_name: rfsim5g-oai-du3
environment: environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --gNBs.[0].gNB_ID 0xe02 --gNBs.[0].nr_cellid 11111111 --gNBs.[0].servingCellConfigCommon.[0].physCellId 2 --MACRLCs.[0].local_n_address 192.168.71.144 --log_config.global_log_options level,nocolor,time USE_ADDITIONAL_OPTIONS: --sa --rfsim --gNBs.[0].gNB_DU_ID 0xe02 --gNBs.[0].nr_cellid 11111111 --gNBs.[0].servingCellConfigCommon.[0].physCellId 2 --MACRLCs.[0].local_n_address 192.168.71.144 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0 ASAN_OPTIONS: detect_leaks=0
depends_on: depends_on:
- oai-cu - oai-cu
......
...@@ -116,6 +116,14 @@ sudo cmake_targets/ran_build/build/nr-softmodem --sa -O ci-scripts/conf_files/gn ...@@ -116,6 +116,14 @@ sudo cmake_targets/ran_build/build/nr-softmodem --sa -O ci-scripts/conf_files/gn
These files are tested in the CI, and are configured for use in docker, These files are tested in the CI, and are configured for use in docker,
see [this `docker-compose` file](../ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml). see [this `docker-compose` file](../ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml).
The rules to decide if a config triggers a start of a DU, CU, or monolithic
gNB, are, in order:
1. If the `MACRLCs` section lists `f1` as northbound transport preference
(`tr_n_preference`), it is a DU.
2. If the `gNBs` section lists `f1` as a southound transport preference
(`tr_s_preference`), it is a CU.
3. It is a (monolithic) gNB.
## Configuration of F1 IP/port information ## Configuration of F1 IP/port information
For a local deployment, you should update the following fields. For a local deployment, you should update the following fields.
......
...@@ -36,6 +36,12 @@ COPY . . ...@@ -36,6 +36,12 @@ COPY . .
RUN /bin/sh oaienv && \ RUN /bin/sh oaienv && \
cd cmake_targets && \ cd cmake_targets && \
mkdir -p log && \ mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP -t Ethernet --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror $BUILD_OPTION && \ ./build_oai -c --ninja \
--eNB --gNB --RU --UE --nrUE \
--build-lib "telnetsrv enbscope uescope nrscope nrqtscope" \
-w USRP -t Ethernet \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF \
--noavx512 \
--cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror $BUILD_OPTION && \
# Mainly to see if the sanitize option was perfectly executed # Mainly to see if the sanitize option was perfectly executed
ldd ran_build/build/nr-softmodem ldd ran_build/build/nr-softmodem
...@@ -130,7 +130,8 @@ int main(int argc, char **argv) ...@@ -130,7 +130,8 @@ int main(int argc, char **argv)
AssertFatal(rc >= 0, "Create task for CUUP E1 failed\n"); AssertFatal(rc >= 0, "Create task for CUUP E1 failed\n");
nr_pdcp_layer_init(true); nr_pdcp_layer_init(true);
cu_init_f1_ue_data(); // for CU-UP/CP mapping: we use the same cu_init_f1_ue_data(); // for CU-UP/CP mapping: we use the same
MessageDef *msg = RCconfig_NR_CU_E1(true); E1_t e1type = UPtype;
MessageDef *msg = RCconfig_NR_CU_E1(&e1type);
AssertFatal(msg != NULL, "Send init to task for E1AP UP failed\n"); AssertFatal(msg != NULL, "Send init to task for E1AP UP failed\n");
itti_send_msg_to_task(TASK_CUUP_E1, 0, msg); itti_send_msg_to_task(TASK_CUUP_E1, 0, msg);
......
...@@ -402,9 +402,9 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf ...@@ -402,9 +402,9 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
// If CU // If CU
if (node_type == ngran_gNB_CU || node_type == ngran_gNB) { if (node_type == ngran_gNB_CU || node_type == ngran_gNB) {
MessageDef *msg = RCconfig_NR_CU_E1(false); MessageDef *msg = RCconfig_NR_CU_E1(NULL);
instance_t inst = 0; instance_t inst = 0;
createE1inst(UPtype, inst, &E1AP_REGISTER_REQ(msg).net_config, NULL); createE1inst(UPtype, inst, E1AP_REGISTER_REQ(msg).gnb_id, &E1AP_REGISTER_REQ(msg).net_config, NULL);
cuup_init_n3(inst); cuup_init_n3(inst);
RC.nrrrc[gnb_id_start]->e1_inst = inst; // stupid instance !!!*/ RC.nrrrc[gnb_id_start]->e1_inst = inst; // stupid instance !!!*/
...@@ -571,6 +571,53 @@ void init_pdcp(void) { ...@@ -571,6 +571,53 @@ void init_pdcp(void) {
} }
} }
#ifdef E2_AGENT
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h" // need to get info from MAC
static void initialize_agent(ngran_node_t node_type, e2_agent_args_t oai_args)
{
AssertFatal(oai_args.sm_dir != NULL , "Please, specify the directory where the SMs are located in the config file, i.e., add in config file the next line: e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\");} ");
AssertFatal(oai_args.ip != NULL , "Please, specify the IP address of the nearRT-RIC in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\"");
printf("After RCconfig_NR_E2agent %s %s \n",oai_args.sm_dir, oai_args.ip );
fr_args_t args = { .ip = oai_args.ip }; // init_fr_args(0, NULL);
memcpy(args.libs_dir, oai_args.sm_dir, 128);
sleep(1);
const gNB_RRC_INST* rrc = RC.nrrrc[0];
assert(rrc != NULL && "rrc cannot be NULL");
const int mcc = rrc->configuration.mcc[0];
const int mnc = rrc->configuration.mnc[0];
const int mnc_digit_len = rrc->configuration.mnc_digit_length[0];
// const ngran_node_t node_type = rrc->node_type;
int nb_id = 0;
int cu_du_id = 0;
if (node_type == ngran_gNB) {
nb_id = rrc->node_id;
} else if (node_type == ngran_gNB_DU) {
const gNB_MAC_INST* mac = RC.nrmac[0];
AssertFatal(mac != NULL, "MAC not initialized\n");
cu_du_id = mac->f1_config.gnb_id;
nb_id = mac->f1_config.setup_req->gNB_DU_id;
} else if (node_type == ngran_gNB_CU) {
// agent buggy: the CU has no second ID, it is the CU-UP ID
// however, that is not a problem her for us, so put the same ID twice
nb_id = rrc->node_id;
cu_du_id = rrc->node_id;
} else {
LOG_E(NR_RRC, "not supported ran type detect\n");
}
printf("[E2 NODE]: mcc = %d mnc = %d mnc_digit = %d nb_id = %d \n", mcc, mnc, mnc_digit_len, nb_id);
printf("[E2 NODE]: Args %s %s \n", args.ip, args.libs_dir);
sm_io_ag_ran_t io = init_ran_func_ag();
init_agent_api(mcc, mnc, mnc_digit_len, nb_id, cu_du_id, node_type, io, &args);
}
#endif
configmodule_interface_t *uniqCfg = NULL; configmodule_interface_t *uniqCfg = NULL;
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
int ru_id, CC_id = 0; int ru_id, CC_id = 0;
...@@ -689,54 +736,18 @@ int main( int argc, char **argv ) { ...@@ -689,54 +736,18 @@ int main( int argc, char **argv ) {
config_sync_var=0; config_sync_var=0;
#ifdef E2_AGENT #ifdef E2_AGENT
////////////////////////////////// //////////////////////////////////
////////////////////////////////// //////////////////////////////////
//// Init the E2 Agent //// Init the E2 Agent
sm_io_ag_ran_t io = init_ran_func_ag();
// OAI Wrapper // OAI Wrapper
e2_agent_args_t oai_args = RCconfig_NR_E2agent(); e2_agent_args_t oai_args = RCconfig_NR_E2agent();
AssertFatal(oai_args.sm_dir != NULL , "Please, specify the directory where the SMs are located in the config file, i.e., add in config file the next line: e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\");} ");
AssertFatal(oai_args.ip != NULL , "Please, specify the IP address of the nearRT-RIC in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\"");
printf("After RCconfig_NR_E2agent %s %s \n",oai_args.sm_dir, oai_args.ip ); if (oai_args.enabled) {
initialize_agent(node_type, oai_args);
fr_args_t args = { .ip = oai_args.ip }; // init_fr_args(0, NULL);
memcpy(args.libs_dir, oai_args.sm_dir, 128);
sleep(1);
const gNB_RRC_INST* rrc = RC.nrrrc[0];
assert(rrc != NULL && "rrc cannot be NULL");
const int mcc = rrc->configuration.mcc[0];
const int mnc = rrc->configuration.mnc[0];
const int mnc_digit_len = rrc->configuration.mnc_digit_length[0];
// const ngran_node_t node_type = rrc->node_type;
int nb_id = 0;
int cu_du_id = 0;
if (node_type == ngran_gNB) {
nb_id = rrc->configuration.cell_identity;
} else if (node_type == ngran_gNB_DU) {
cu_du_id = rrc->node_id + 1; // Hack to avoid been 0
nb_id = rrc->configuration.cell_identity;
} else if (node_type == ngran_gNB_CU) {
cu_du_id = rrc->node_id + 1;
nb_id = rrc->configuration.cell_identity;
} else {
LOG_E(NR_RRC, "not supported ran type detect\n");
} }
printf("[E2 NODE]: mcc = %d mnc = %d mnc_digit = %d nb_id = %d \n", mcc, mnc, mnc_digit_len, nb_id);
printf("[E2 NODE]: Args %s %s \n", args.ip, args.libs_dir);
init_agent_api(mcc, mnc, mnc_digit_len, nb_id, cu_du_id, node_type, io, &args);
// }
#endif // E2_AGENT #endif // E2_AGENT
......
...@@ -87,6 +87,7 @@ typedef struct e1ap_setup_req_s { ...@@ -87,6 +87,7 @@ typedef struct e1ap_setup_req_s {
typedef struct e1ap_register_req_t { typedef struct e1ap_register_req_t {
e1ap_setup_req_t setup_req; e1ap_setup_req_t setup_req;
e1ap_net_config_t net_config; e1ap_net_config_t net_config;
uint32_t gnb_id; // unused in CU-UP, but might be necessary for some functionality, e.g., E2 agent
} e1ap_register_req_t; } e1ap_register_req_t;
typedef struct e1ap_setup_resp_s { typedef struct e1ap_setup_resp_s {
......
...@@ -1801,7 +1801,7 @@ void cucp_task_send_sctp_init_req(instance_t instance, char *my_addr) { ...@@ -1801,7 +1801,7 @@ void cucp_task_send_sctp_init_req(instance_t instance, char *my_addr) {
void e1_task_handle_sctp_association_ind(E1_t type, instance_t instance, sctp_new_association_ind_t *sctp_new_ind) void e1_task_handle_sctp_association_ind(E1_t type, instance_t instance, sctp_new_association_ind_t *sctp_new_ind)
{ {
if (!getCxtE1(instance)) if (!getCxtE1(instance))
createE1inst(type, instance, NULL, NULL); createE1inst(type, instance, 0, NULL, NULL);
e1ap_upcp_inst_t *inst = getCxtE1(instance); e1ap_upcp_inst_t *inst = getCxtE1(instance);
inst->sockState = SCTP_STATE_ESTABLISHED; inst->sockState = SCTP_STATE_ESTABLISHED;
if (type == UPtype) if (type == UPtype)
...@@ -1897,7 +1897,7 @@ void *E1AP_CUUP_task(void *arg) { ...@@ -1897,7 +1897,7 @@ void *E1AP_CUUP_task(void *arg) {
switch (msgType) { switch (msgType) {
case E1AP_REGISTER_REQ: { case E1AP_REGISTER_REQ: {
e1ap_register_req_t *reg_req = &E1AP_REGISTER_REQ(msg); e1ap_register_req_t *reg_req = &E1AP_REGISTER_REQ(msg);
createE1inst(UPtype, myInstance, &reg_req->net_config, &reg_req->setup_req); createE1inst(UPtype, myInstance, reg_req->gnb_id, &reg_req->net_config, &reg_req->setup_req);
e1_task_send_sctp_association_req(TASK_CUUP_E1, myInstance, &reg_req->net_config); e1_task_send_sctp_association_req(TASK_CUUP_E1, myInstance, &reg_req->net_config);
} break; } break;
......
...@@ -37,12 +37,13 @@ e1ap_upcp_inst_t *getCxtE1(instance_t instance) ...@@ -37,12 +37,13 @@ e1ap_upcp_inst_t *getCxtE1(instance_t instance)
return e1ap_inst[instance]; return e1ap_inst[instance];
} }
void createE1inst(E1_t type, instance_t instance, e1ap_net_config_t *nc, e1ap_setup_req_t *req) void createE1inst(E1_t type, instance_t instance, uint64_t gnb_id, e1ap_net_config_t *nc, e1ap_setup_req_t *req)
{ {
AssertFatal(e1ap_inst[instance] == NULL, "Double call to E1 instance %d\n", (int)instance); AssertFatal(e1ap_inst[instance] == NULL, "Double call to E1 instance %d\n", (int)instance);
e1ap_inst[instance] = calloc(1, sizeof(e1ap_upcp_inst_t)); e1ap_inst[instance] = calloc(1, sizeof(e1ap_upcp_inst_t));
e1ap_inst[instance]->type = type; e1ap_inst[instance]->type = type;
e1ap_inst[instance]->instance = instance; e1ap_inst[instance]->instance = instance;
e1ap_inst[instance]->gnb_id = gnb_id;
e1ap_inst[instance]->cuup.assoc_id = -1; e1ap_inst[instance]->cuup.assoc_id = -1;
if (nc) if (nc)
memcpy(&e1ap_inst[instance]->net_config, nc, sizeof(*nc)); memcpy(&e1ap_inst[instance]->net_config, nc, sizeof(*nc));
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
typedef struct e1ap_upcp_inst_s { typedef struct e1ap_upcp_inst_s {
instance_t instance; instance_t instance;
uint32_t gnb_id; // associated gNB's ID, unused in E1 but necessary for e.g. E2 agent
E1_t type; E1_t type;
enum sctp_state_e sockState; enum sctp_state_e sockState;
struct { struct {
...@@ -52,7 +53,7 @@ e1ap_upcp_inst_t *getCxtE1(instance_t instance); ...@@ -52,7 +53,7 @@ e1ap_upcp_inst_t *getCxtE1(instance_t instance);
long E1AP_get_next_transaction_identifier(); long E1AP_get_next_transaction_identifier();
void E1AP_free_transaction_identifier(long id); void E1AP_free_transaction_identifier(long id);
void createE1inst(E1_t type, instance_t instance, e1ap_net_config_t *nc, e1ap_setup_req_t *req); void createE1inst(E1_t type, instance_t instance, uint64_t gnb_id, e1ap_net_config_t *nc, e1ap_setup_req_t *req);
int e1ap_encode_send(E1_t type, sctp_assoc_t assoc_id, struct E1AP_E1AP_PDU *pdu, uint16_t stream, const char *func); int e1ap_encode_send(E1_t type, sctp_assoc_t assoc_id, struct E1AP_E1AP_PDU *pdu, uint16_t stream, const char *func);
......
...@@ -68,7 +68,7 @@ static void get_NGU_S1U_addr(char **addr, uint16_t *port) ...@@ -68,7 +68,7 @@ static void get_NGU_S1U_addr(char **addr, uint16_t *port)
return; return;
} }
MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process) MessageDef *RCconfig_NR_CU_E1(const E1_t *entity)
{ {
MessageDef *msgConfig = itti_alloc_new_message(TASK_GNB_APP, 0, E1AP_REGISTER_REQ); MessageDef *msgConfig = itti_alloc_new_message(TASK_GNB_APP, 0, E1AP_REGISTER_REQ);
if (!msgConfig) if (!msgConfig)
...@@ -82,14 +82,12 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process) ...@@ -82,14 +82,12 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process)
sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0); sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
int num_gnbs = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt; int num_gnbs = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt;
AssertFatal(num_gnbs == 1, "Support only one gNB per process\n"); AssertFatal(num_gnbs == 1, "Support only one gNB per process\n");
config_getlist(config_get_if(), &GNBParamList, GNBParams, sizeofArray(GNBParams), NULL);
paramdef_t *gnbParms = GNBParamList.paramarray[0];
e1ap_setup_req_t *e1Setup = &E1AP_REGISTER_REQ(msgConfig).setup_req;
if (num_gnbs > 0) { if (num_gnbs > 0) {
config_getlist(config_get_if(), &GNBParamList, GNBParams, sizeofArray(GNBParams), NULL);
paramdef_t *gnbParms = GNBParamList.paramarray[0];
AssertFatal(gnbParms[GNB_GNB_ID_IDX].uptr != NULL, "gNB id %d is not defined in configuration file\n", 0);
e1ap_setup_req_t *e1Setup = &E1AP_REGISTER_REQ(msgConfig).setup_req;
msgConfig->ittiMsgHeader.destinationInstance = 0; msgConfig->ittiMsgHeader.destinationInstance = 0;
e1Setup->gNB_cu_up_id = *(gnbParms[GNB_GNB_ID_IDX].uptr);
if (*gnbParms[GNB_GNB_NAME_IDX].strptr) if (*gnbParms[GNB_GNB_NAME_IDX].strptr)
e1Setup->gNB_cu_up_name = *(gnbParms[GNB_GNB_NAME_IDX].strptr); e1Setup->gNB_cu_up_name = *(gnbParms[GNB_GNB_NAME_IDX].strptr);
...@@ -132,7 +130,11 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process) ...@@ -132,7 +130,11 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process)
get_NGU_S1U_addr(&e1ap_nc->localAddressN3, &e1ap_nc->localPortN3); get_NGU_S1U_addr(&e1ap_nc->localAddressN3, &e1ap_nc->localPortN3);
e1ap_nc->remotePortN3 = e1ap_nc->localPortN3 ; e1ap_nc->remotePortN3 = e1ap_nc->localPortN3 ;
if (separate_CUUP_process) { AssertFatal(config_isparamset(gnbParms, GNB_GNB_ID_IDX), "%s is not defined in configuration file\n", GNB_CONFIG_STRING_GNB_ID);
uint32_t gnb_id = *gnbParms[GNB_GNB_ID_IDX].uptr;
E1AP_REGISTER_REQ(msgConfig).gnb_id = gnb_id;
if (entity != NULL) {
paramlist_def_t GNBE1ParamList = {GNB_CONFIG_STRING_E1_PARAMETERS, NULL, 0}; paramlist_def_t GNBE1ParamList = {GNB_CONFIG_STRING_E1_PARAMETERS, NULL, 0};
paramdef_t GNBE1Params[] = GNBE1PARAMS_DESC; paramdef_t GNBE1Params[] = GNBE1PARAMS_DESC;
config_getlist(config_get_if(), &GNBE1ParamList, GNBE1Params, sizeofArray(GNBE1Params), aprefix); config_getlist(config_get_if(), &GNBE1ParamList, GNBE1Params, sizeofArray(GNBE1Params), aprefix);
...@@ -141,6 +143,24 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process) ...@@ -141,6 +143,24 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process)
e1ap_nc->CUCP_e1_ip_address.ipv4 = 1; e1ap_nc->CUCP_e1_ip_address.ipv4 = 1;
strcpy(e1ap_nc->CUUP_e1_ip_address.ipv4_address, *(e1Parms[GNB_CONFIG_E1_IPV4_ADDRESS_CUUP].strptr)); strcpy(e1ap_nc->CUUP_e1_ip_address.ipv4_address, *(e1Parms[GNB_CONFIG_E1_IPV4_ADDRESS_CUUP].strptr));
e1ap_nc->CUUP_e1_ip_address.ipv4 = 1; e1ap_nc->CUUP_e1_ip_address.ipv4 = 1;
if (*entity == CPtype) {
// CP needs gNB_ID (although not used, but other parts check it as
// well), and gNB-CU-UP ID should NOT be present as it comes through E1!
AssertFatal(!config_isparamset(gnbParms, GNB_GNB_CU_UP_ID_IDX), "%s must not be defined in configuration file\n", GNB_CONFIG_STRING_GNB_CU_UP_ID);
} else { // UPtype
AssertFatal(config_isparamset(gnbParms, GNB_GNB_CU_UP_ID_IDX), "%s is not be defined in configuration file\n", GNB_CONFIG_STRING_GNB_CU_UP_ID);
e1Setup->gNB_cu_up_id = *gnbParms[GNB_GNB_CU_UP_ID_IDX].u64ptr;
}
} else {
// integrated CU-CP/UP. We don't care about the gNB-CU-UP ID that much,
// but if it's there, check it's the same as gNB ID
uint64_t *gnb_cu_up_id = gnbParms[GNB_GNB_CU_UP_ID_IDX].u64ptr;
AssertFatal(!config_isparamset(gnbParms, GNB_GNB_CU_UP_ID_IDX) || *gnb_cu_up_id == gnb_id,
"%s is different of %s: they need to match or remove %s from config\n",
GNB_CONFIG_STRING_GNB_CU_UP_ID,
GNB_CONFIG_STRING_GNB_ID,
GNB_CONFIG_STRING_GNB_CU_UP_ID);
e1Setup->gNB_cu_up_id = gnb_id;
} }
} }
return msgConfig; return msgConfig;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "ran_func_gtp.h" #include "ran_func_gtp.h"
#include <assert.h> #include <assert.h>
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef RAN_FUNC_SM_GTP_READ_WRITE_AGENT_H #ifndef RAN_FUNC_SM_GTP_READ_WRITE_AGENT_H
#define RAN_FUNC_SM_GTP_READ_WRITE_AGENT_H #define RAN_FUNC_SM_GTP_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "ran_func_mac.h" #include "ran_func_mac.h"
#include "openair2/E2AP/flexric/test/rnd/fill_rnd_data_mac.h" #include "openair2/E2AP/flexric/test/rnd/fill_rnd_data_mac.h"
#include <assert.h> #include <assert.h>
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef SM_MAC_READ_WRITE_AGENT_H #ifndef SM_MAC_READ_WRITE_AGENT_H
#define SM_MAC_READ_WRITE_AGENT_H #define SM_MAC_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "ran_func_pdcp.h" #include "ran_func_pdcp.h"
#include <assert.h> #include <assert.h>
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef RAN_FUNC_SM_PDCP_READ_WRITE_AGENT_H #ifndef RAN_FUNC_SM_PDCP_READ_WRITE_AGENT_H
#define RAN_FUNC_SM_PDCP_READ_WRITE_AGENT_H #define RAN_FUNC_SM_PDCP_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef RAN_FUNC_SM_RLC_READ_WRITE_AGENT_H #ifndef RAN_FUNC_SM_RLC_READ_WRITE_AGENT_H
#define RAN_FUNC_SM_RLC_READ_WRITE_AGENT_H #define RAN_FUNC_SM_RLC_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "ran_func_slice.h" #include "ran_func_slice.h"
#include "../../flexric/test/rnd/fill_rnd_data_slice.h" #include "../../flexric/test/rnd/fill_rnd_data_slice.h"
#include <assert.h> #include <assert.h>
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef RAN_FUNC_SM_SLICE_READ_WRITE_AGENT_H #ifndef RAN_FUNC_SM_SLICE_READ_WRITE_AGENT_H
#define RAN_FUNC_SM_SLICE_READ_WRITE_AGENT_H #define RAN_FUNC_SM_SLICE_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "ran_func_tc.h" #include "ran_func_tc.h"
#include "../../flexric/test/rnd/fill_rnd_data_tc.h" #include "../../flexric/test/rnd/fill_rnd_data_tc.h"
#include <assert.h> #include <assert.h>
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef RAN_FUNC_SM_TC_READ_WRITE_AGENT_H #ifndef RAN_FUNC_SM_TC_READ_WRITE_AGENT_H
#define RAN_FUNC_SM_TC_READ_WRITE_AGENT_H #define RAN_FUNC_SM_TC_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef RAN_FUNC_SM_KPM_READ_WRITE_AGENT_H #ifndef RAN_FUNC_SM_KPM_READ_WRITE_AGENT_H
#define RAN_FUNC_SM_KPM_READ_WRITE_AGENT_H #define RAN_FUNC_SM_KPM_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "ran_func_rc.h" #include "ran_func_rc.h"
#include "../../flexric/test/rnd/fill_rnd_data_rc.h" #include "../../flexric/test/rnd/fill_rnd_data_rc.h"
#include "../../flexric/src/sm/rc_sm/ie/ir/lst_ran_param.h" #include "../../flexric/src/sm/rc_sm/ie/ir/lst_ran_param.h"
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef RAN_FUNC_SM_RAN_CTRL_READ_WRITE_AGENT_H #ifndef RAN_FUNC_SM_RAN_CTRL_READ_WRITE_AGENT_H
#define RAN_FUNC_SM_RAN_CTRL_READ_WRITE_AGENT_H #define RAN_FUNC_SM_RAN_CTRL_READ_WRITE_AGENT_H
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "init_ran_func.h" #include "init_ran_func.h"
#include "read_setup_ran.h" #include "read_setup_ran.h"
#include "../flexric/src/agent/e2_agent_api.h" #include "../flexric/src/agent/e2_agent_api.h"
......
...@@ -89,7 +89,7 @@ git submodule update ...@@ -89,7 +89,7 @@ git submodule update
```bash ```bash
git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric
cd flexric/ cd flexric/
git checkout 035fd2e8f9a9d2c16df8d44c9e8c13ccddf9ff19 git checkout 93961d2480b2c7a5721e03435cb34cf9446d1ad1
``` ```
### 2.2.2 Build FlexRIC ### 2.2.2 Build FlexRIC
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
typedef struct{ typedef struct{
const char *ip; const char *ip;
const char *sm_dir; const char *sm_dir;
const bool enabled;
} e2_agent_args_t; } e2_agent_args_t;
#endif #endif
......
flexric @ 93961d24
Subproject commit 035fd2e8f9a9d2c16df8d44c9e8c13ccddf9ff19 Subproject commit 93961d2480b2c7a5721e03435cb34cf9446d1ad1
...@@ -2942,9 +2942,19 @@ e2_agent_args_t RCconfig_E2agent(void) ...@@ -2942,9 +2942,19 @@ e2_agent_args_t RCconfig_E2agent(void)
LOG_W(GNB_APP, "configuration file does not contain a \"%s\" section, applying default parameters\n", CONFIG_STRING_E2AGENT); LOG_W(GNB_APP, "configuration file does not contain a \"%s\" section, applying default parameters\n", CONFIG_STRING_E2AGENT);
return (e2_agent_args_t) {0}; return (e2_agent_args_t) {0};
} }
bool enabled = config_isparamset(e2agent_params, E2AGENT_CONFIG_SMDIR_IDX)
&& config_isparamset(e2agent_params, E2AGENT_CONFIG_IP_IDX);
if (!enabled) {
LOG_W(GNB_APP, "E2 agent is DISABLED (for activation, define .%s.{%s,%s} parameters)\n", CONFIG_STRING_E2AGENT, E2AGENT_CONFIG_IP, E2AGENT_CONFIG_SMDIR);
return (e2_agent_args_t) {
.enabled = false,
};
}
return (e2_agent_args_t) { return (e2_agent_args_t) {
.enabled = true,
.ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr, .ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr,
.port = *e2agent_params[E2AGENT_CONFIG_PORT_IDX].u16ptr,
.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr, .sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr,
}; };
} }
......
...@@ -1330,9 +1330,8 @@ typedef struct srb1_params_s { ...@@ -1330,9 +1330,8 @@ typedef struct srb1_params_s {
//#define E2AGENT_CONFIG_PORT "port" //#define E2AGENT_CONFIG_PORT "port"
#define E2AGENT_CONFIG_SMDIR "sm_dir" #define E2AGENT_CONFIG_SMDIR "sm_dir"
static const char* const e2agent_config_ip_default = NULL; static const char* const e2agent_config_ip_default = "127.0.0.1";
static const char* const e2agent_config_smdir_default = NULL; static const char* const e2agent_config_smdir_default = ".";
//static const uint16_t e2agent_config_port_default = 36421;
#define E2AGENT_PARAMS_DESC { \ #define E2AGENT_PARAMS_DESC { \
{E2AGENT_CONFIG_IP, "RIC IP address", 0, strptr:NULL, defstrval:(char*)e2agent_config_ip_default, TYPE_STRING, 0}, \ {E2AGENT_CONFIG_IP, "RIC IP address", 0, strptr:NULL, defstrval:(char*)e2agent_config_ip_default, TYPE_STRING, 0}, \
......
...@@ -146,7 +146,8 @@ void *gNB_app_task(void *args_p) ...@@ -146,7 +146,8 @@ void *gNB_app_task(void *args_p)
if (node_type == ngran_gNB_CUCP) { if (node_type == ngran_gNB_CUCP) {
if (itti_create_task(TASK_CUCP_E1, E1AP_CUCP_task, NULL) < 0) if (itti_create_task(TASK_CUCP_E1, E1AP_CUCP_task, NULL) < 0)
AssertFatal(false, "Create task for E1AP CP failed\n"); AssertFatal(false, "Create task for E1AP CP failed\n");
MessageDef *msg = RCconfig_NR_CU_E1(true); E1_t e1type = CPtype;
MessageDef *msg = RCconfig_NR_CU_E1(&e1type);
AssertFatal(msg != NULL, "Send inti to task for E1AP CP failed\n"); AssertFatal(msg != NULL, "Send inti to task for E1AP CP failed\n");
// this sends the E1AP_REGISTER_REQ to CU-CP so it sets up the socket // this sends the E1AP_REGISTER_REQ to CU-CP so it sets up the socket
// it does NOT use the E1AP part // it does NOT use the E1AP part
......
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
#include "nfapi/oai_integration/vendor_ext.h" #include "nfapi/oai_integration/vendor_ext.h"
extern uint16_t sf_ahead; extern uint16_t sf_ahead;
int macrlc_has_f1 = 0;
// synchronization raster per band tables (Rel.15) // synchronization raster per band tables (Rel.15)
// (38.101-1 Table 5.4.3.3-1 and 38.101-2 Table 5.4.3.3-1) // (38.101-1 Table 5.4.3.3-1 and 38.101-2 Table 5.4.3.3-1)
...@@ -1034,7 +1033,9 @@ static NR_ServingCellConfig_t *get_scd_config(configmodule_interface_t *cfg) ...@@ -1034,7 +1033,9 @@ static NR_ServingCellConfig_t *get_scd_config(configmodule_interface_t *cfg)
} }
static int read_du_cell_info(configmodule_interface_t *cfg, static int read_du_cell_info(configmodule_interface_t *cfg,
uint64_t *id, bool separate_du,
uint32_t *gnb_id,
uint64_t *gnb_du_id,
char **name, char **name,
f1ap_served_cell_info_t *info, f1ap_served_cell_info_t *info,
int max_cell_info) int max_cell_info)
...@@ -1051,7 +1052,11 @@ static int read_du_cell_info(configmodule_interface_t *cfg, ...@@ -1051,7 +1052,11 @@ static int read_du_cell_info(configmodule_interface_t *cfg,
// Output a list of all eNBs. // Output a list of all eNBs.
config_getlist(cfg, &GNBParamList, GNBParams, sizeof(GNBParams) / sizeof(paramdef_t), NULL); config_getlist(cfg, &GNBParamList, GNBParams, sizeof(GNBParams) / sizeof(paramdef_t), NULL);
AssertFatal(GNBParamList.paramarray[0][GNB_GNB_ID_IDX].uptr != NULL, "gNB id %u is not defined in configuration file\n", 0);
// read the gNB-ID. The DU itself only needs the gNB-DU ID, but some (e.g.,
// E2 agent) need the gNB-ID as well if it is running in a separate process
AssertFatal(config_isparamset(GNBParamList.paramarray[0], GNB_GNB_ID_IDX), "%s is not defined in configuration file\n", GNB_CONFIG_STRING_GNB_ID);
*gnb_id = *GNBParamList.paramarray[0][GNB_GNB_ID_IDX].uptr;
AssertFatal(strcmp(GNBSParams[GNB_ACTIVE_GNBS_IDX].strlistptr[0], *GNBParamList.paramarray[0][GNB_GNB_NAME_IDX].strptr) == 0, AssertFatal(strcmp(GNBSParams[GNB_ACTIVE_GNBS_IDX].strlistptr[0], *GNBParamList.paramarray[0][GNB_GNB_NAME_IDX].strptr) == 0,
"no active gNB found/mismatch of gNBs: %s vs %s\n", "no active gNB found/mismatch of gNBs: %s vs %s\n",
...@@ -1068,7 +1073,17 @@ static int read_du_cell_info(configmodule_interface_t *cfg, ...@@ -1068,7 +1073,17 @@ static int read_du_cell_info(configmodule_interface_t *cfg,
paramlist_def_t PLMNParamList = {GNB_CONFIG_STRING_PLMN_LIST, NULL, 0}; paramlist_def_t PLMNParamList = {GNB_CONFIG_STRING_PLMN_LIST, NULL, 0};
config_getlist(cfg, &PLMNParamList, PLMNParams, sizeof(PLMNParams) / sizeof(paramdef_t), aprefix); config_getlist(cfg, &PLMNParamList, PLMNParams, sizeof(PLMNParams) / sizeof(paramdef_t), aprefix);
*id = *(GNBParamList.paramarray[0][GNB_GNB_ID_IDX].uptr); // if fronthaul is F1, require gNB_DU_ID, else use gNB_ID
if (separate_du) {
AssertFatal(config_isparamset(GNBParamList.paramarray[0], GNB_GNB_DU_ID_IDX), "%s is not defined in configuration file\n", GNB_CONFIG_STRING_GNB_DU_ID);
*gnb_du_id = *GNBParamList.paramarray[0][GNB_GNB_DU_ID_IDX].u64ptr;
} else {
AssertFatal(!config_isparamset(GNBParamList.paramarray[0], GNB_GNB_DU_ID_IDX),
"%s should not be defined in configuration file for monolithic gNB\n",
GNB_CONFIG_STRING_GNB_DU_ID);
*gnb_du_id = *gnb_id; // the gNB-DU ID is equal to the gNB ID, since the config has no gNB-DU ID
}
*name = strdup(*(GNBParamList.paramarray[0][GNB_GNB_NAME_IDX].strptr)); *name = strdup(*(GNBParamList.paramarray[0][GNB_GNB_NAME_IDX].strptr));
info->tac = malloc(sizeof(*info->tac)); info->tac = malloc(sizeof(*info->tac));
AssertFatal(info->tac != NULL, "out of memory\n"); AssertFatal(info->tac != NULL, "out of memory\n");
...@@ -1252,7 +1267,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) ...@@ -1252,7 +1267,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) { if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
// check number of instances is same as RRC/PDCP // check number of instances is same as RRC/PDCP
} else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "f1") == 0) { } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "f1") == 0
|| strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "cudu") == 0) {
printf("Configuring F1 interfaces for MACRLC\n"); printf("Configuring F1 interfaces for MACRLC\n");
RC.nrmac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); RC.nrmac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr));
RC.nrmac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); RC.nrmac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr));
...@@ -1261,18 +1277,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) ...@@ -1261,18 +1277,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
RC.nrmac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr); RC.nrmac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr);
RC.nrmac[j]->eth_params_n.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr); RC.nrmac[j]->eth_params_n.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr);
RC.nrmac[j]->eth_params_n.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr); RC.nrmac[j]->eth_params_n.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);
;
RC.nrmac[j]->eth_params_n.transp_preference = ETH_UDP_MODE;
macrlc_has_f1 = 1;
} else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "cudu") == 0) {
RC.nrmac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr));
RC.nrmac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr));
RC.nrmac[j]->eth_params_n.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr));
RC.nrmac[j]->eth_params_n.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr);
RC.nrmac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr);
RC.nrmac[j]->eth_params_n.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr);
RC.nrmac[j]->eth_params_n.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);
;
RC.nrmac[j]->eth_params_n.transp_preference = ETH_UDP_MODE; RC.nrmac[j]->eth_params_n.transp_preference = ETH_UDP_MODE;
} else { // other midhaul } else { // other midhaul
AssertFatal(1 == 0, "MACRLC %d: %s unknown northbound midhaul\n", j, *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr)); AssertFatal(1 == 0, "MACRLC %d: %s unknown northbound midhaul\n", j, *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr));
...@@ -1314,10 +1318,11 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) ...@@ -1314,10 +1318,11 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
memcpy(RC.nrmac[j]->ulprbbl, prbbl, 275 * sizeof(prbbl[0])); memcpy(RC.nrmac[j]->ulprbbl, prbbl, 275 * sizeof(prbbl[0]));
} // for (j=0;j<RC.nb_nr_macrlc_inst;j++) } // for (j=0;j<RC.nb_nr_macrlc_inst;j++)
uint64_t id; uint64_t gnb_du_id = 0;
uint32_t gnb_id = 0;
char *name = NULL; char *name = NULL;
f1ap_served_cell_info_t info; f1ap_served_cell_info_t info;
read_du_cell_info(cfg, &id, &name, &info, 1); read_du_cell_info(cfg, NODE_IS_DU(node_type), &gnb_id, &gnb_du_id, &name, &info, 1);
if (get_softmodem_params()->sa) if (get_softmodem_params()->sa)
nr_mac_configure_sib1(RC.nrmac[0], &info.plmn, info.nr_cellid, *info.tac); nr_mac_configure_sib1(RC.nrmac[0], &info.plmn, info.nr_cellid, *info.tac);
...@@ -1326,9 +1331,10 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) ...@@ -1326,9 +1331,10 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
// and store it at MAC for sending later // and store it at MAC for sending later
NR_BCCH_BCH_Message_t *mib = RC.nrmac[0]->common_channels[0].mib; NR_BCCH_BCH_Message_t *mib = RC.nrmac[0]->common_channels[0].mib;
const NR_BCCH_DL_SCH_Message_t *sib1 = RC.nrmac[0]->common_channels[0].sib1; const NR_BCCH_DL_SCH_Message_t *sib1 = RC.nrmac[0]->common_channels[0].sib1;
f1ap_setup_req_t *req = RC_read_F1Setup(id, name, &info, scc, mib, sib1); f1ap_setup_req_t *req = RC_read_F1Setup(gnb_du_id, name, &info, scc, mib, sib1);
AssertFatal(req != NULL, "could not read F1 Setup information\n"); AssertFatal(req != NULL, "could not read F1 Setup information\n");
RC.nrmac[0]->f1_config.setup_req = req; RC.nrmac[0]->f1_config.setup_req = req;
RC.nrmac[0]->f1_config.gnb_id = gnb_id;
free(name); /* read_du_cell_info() allocated memory */ free(name); /* read_du_cell_info() allocated memory */
...@@ -1550,12 +1556,12 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc) ...@@ -1550,12 +1556,12 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc)
printf("NRRRC %u: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr)); printf("NRRRC %u: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr));
rrc->node_type = get_node_type(); rrc->node_type = get_node_type();
rrc->node_id = gnb_id;
if (NODE_IS_CU(rrc->node_type)) { if (NODE_IS_CU(rrc->node_type)) {
paramdef_t SCTPParams[] = GNBSCTPPARAMS_DESC; paramdef_t SCTPParams[] = GNBSCTPPARAMS_DESC;
char aprefix[MAX_OPTNAME_SIZE*2 + 8]; char aprefix[MAX_OPTNAME_SIZE*2 + 8];
sprintf(aprefix,"%s.[%u].%s",GNB_CONFIG_STRING_GNB_LIST,i,GNB_CONFIG_STRING_SCTP_CONFIG); sprintf(aprefix,"%s.[%u].%s",GNB_CONFIG_STRING_GNB_LIST,i,GNB_CONFIG_STRING_SCTP_CONFIG);
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix); config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
rrc->node_id = gnb_id;
LOG_I(GNB_APP,"F1AP: gNB_CU_id[%d] %d\n",k,rrc->node_id); LOG_I(GNB_APP,"F1AP: gNB_CU_id[%d] %d\n",k,rrc->node_id);
rrc->node_name = strdup(*(GNBParamList.paramarray[0][GNB_GNB_NAME_IDX].strptr)); rrc->node_name = strdup(*(GNBParamList.paramarray[0][GNB_GNB_NAME_IDX].strptr));
LOG_I(GNB_APP,"F1AP: gNB_CU_name[%d] %s\n",k,rrc->node_name); LOG_I(GNB_APP,"F1AP: gNB_CU_name[%d] %s\n",k,rrc->node_name);
...@@ -2242,7 +2248,7 @@ ngran_node_t get_node_type(void) ...@@ -2242,7 +2248,7 @@ ngran_node_t get_node_type(void)
RC.nb_nr_macrlc_inst = MacRLC_ParamList.numelt; RC.nb_nr_macrlc_inst = MacRLC_ParamList.numelt;
for (int j = 0; j < RC.nb_nr_macrlc_inst; j++) { for (int j = 0; j < RC.nb_nr_macrlc_inst; j++) {
if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "f1") == 0) { if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "f1") == 0) {
macrlc_has_f1 = 1; return ngran_gNB_DU; // MACRLCs present in config: it must be a DU
} }
} }
} }
...@@ -2256,10 +2262,9 @@ ngran_node_t get_node_type(void) ...@@ -2256,10 +2262,9 @@ ngran_node_t get_node_type(void)
return ngran_gNB_CUUP; return ngran_gNB_CUUP;
else else
return ngran_gNB_CU; return ngran_gNB_CU;
} else if (macrlc_has_f1 == 0) } else {
return ngran_gNB; return ngran_gNB;
else }
return ngran_gNB_DU;
} }
#ifdef E2_AGENT #ifdef E2_AGENT
...@@ -2272,7 +2277,14 @@ e2_agent_args_t RCconfig_NR_E2agent(void) ...@@ -2272,7 +2277,14 @@ e2_agent_args_t RCconfig_NR_E2agent(void)
LOG_W(GNB_APP, "configuration file does not contain a \"%s\" section, applying default parameters from FlexRIC\n", CONFIG_STRING_E2AGENT); LOG_W(GNB_APP, "configuration file does not contain a \"%s\" section, applying default parameters from FlexRIC\n", CONFIG_STRING_E2AGENT);
return (e2_agent_args_t) { 0 }; return (e2_agent_args_t) { 0 };
} }
e2_agent_args_t dst = {0};
bool enabled = config_isparamset(e2agent_params, E2AGENT_CONFIG_SMDIR_IDX)
&& config_isparamset(e2agent_params, E2AGENT_CONFIG_IP_IDX);
e2_agent_args_t dst = {.enabled = enabled};
if (!enabled) {
LOG_W(GNB_APP, "E2 agent is DISABLED (for activation, define .%s.{%s,%s} parameters)\n", CONFIG_STRING_E2AGENT, E2AGENT_CONFIG_IP, E2AGENT_CONFIG_SMDIR);
return dst;
}
if (e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr != NULL) if (e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr != NULL)
dst.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr; dst.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr;
......
...@@ -107,7 +107,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i); ...@@ -107,7 +107,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i); int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
void wait_f1_setup_response(void); void wait_f1_setup_response(void);
int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update); int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update);
MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process); MessageDef *RCconfig_NR_CU_E1(const E1_t *entity);
ngran_node_t get_node_type(void); ngran_node_t get_node_type(void);
#ifdef E2_AGENT #ifdef E2_AGENT
......
...@@ -127,15 +127,21 @@ typedef enum { ...@@ -127,15 +127,21 @@ typedef enum {
#define GNB_CONFIG_STRING_UMONDEFAULTDRB "um_on_default_drb" #define GNB_CONFIG_STRING_UMONDEFAULTDRB "um_on_default_drb"
#define GNB_CONFIG_STRING_FORCE256QAMOFF "force_256qam_off" #define GNB_CONFIG_STRING_FORCE256QAMOFF "force_256qam_off"
#define GNB_CONFIG_STRING_ENABLE_SDAP "enable_sdap" #define GNB_CONFIG_STRING_ENABLE_SDAP "enable_sdap"
#define GNB_CONFIG_STRING_DRBS "drbs"
#define GNB_CONFIG_STRING_GNB_DU_ID "gNB_DU_ID"
#define GNB_CONFIG_STRING_GNB_CU_UP_ID "gNB_CU_UP_ID"
#define GNB_CONFIG_HLP_STRING_ENABLE_SDAP "enable the SDAP layer\n" #define GNB_CONFIG_HLP_STRING_ENABLE_SDAP "enable the SDAP layer\n"
#define GNB_CONFIG_HLP_FORCE256QAMOFF "suppress activation of 256 QAM despite UE support" #define GNB_CONFIG_HLP_FORCE256QAMOFF "suppress activation of 256 QAM despite UE support"
#define GNB_CONFIG_STRING_DRBS "drbs"
#define GNB_CONFIG_HLP_STRING_DRBS "Number of total DRBs to establish, including the mandatory for PDU SEssion (default=1)\n" #define GNB_CONFIG_HLP_STRING_DRBS "Number of total DRBs to establish, including the mandatory for PDU SEssion (default=1)\n"
#define GNB_CONFIG_HLP_GNB_DU_ID "defines the gNB-DU ID (only applicable for DU)"
#define GNB_CONFIG_HLP_GNB_CU_UP_ID "defines the gNB-CU-UP ID (only applicable for CU-UP)"
/*-----------------------------------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------------------------*/
/* cell configuration parameters */ /* cell configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-----------------------------------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------------------------*/
// clang-format off
#define GNBPARAMS_DESC {\ #define GNBPARAMS_DESC {\
{GNB_CONFIG_STRING_GNB_ID, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ {GNB_CONFIG_STRING_GNB_ID, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_CELL_TYPE, NULL, 0, .strptr=NULL, .defstrval="CELL_MACRO_GNB", TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_CELL_TYPE, NULL, 0, .strptr=NULL, .defstrval="CELL_MACRO_GNB", TYPE_STRING, 0}, \
...@@ -165,7 +171,11 @@ typedef enum { ...@@ -165,7 +171,11 @@ typedef enum {
{GNB_CONFIG_STRING_FORCE256QAMOFF, GNB_CONFIG_HLP_FORCE256QAMOFF, PARAMFLAG_BOOL, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ {GNB_CONFIG_STRING_FORCE256QAMOFF, GNB_CONFIG_HLP_FORCE256QAMOFF, PARAMFLAG_BOOL, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_ENABLE_SDAP, GNB_CONFIG_HLP_STRING_ENABLE_SDAP, PARAMFLAG_BOOL,.iptr=NULL, .defintval=0, TYPE_INT, 0}, \ {GNB_CONFIG_STRING_ENABLE_SDAP, GNB_CONFIG_HLP_STRING_ENABLE_SDAP, PARAMFLAG_BOOL,.iptr=NULL, .defintval=0, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_DRBS, GNB_CONFIG_HLP_STRING_DRBS, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ {GNB_CONFIG_STRING_DRBS, GNB_CONFIG_HLP_STRING_DRBS, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_GNB_DU_ID, GNB_CONFIG_HLP_GNB_DU_ID, 0, .u64ptr=NULL, .defint64val=1, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_GNB_CU_UP_ID, GNB_CONFIG_HLP_GNB_CU_UP_ID, 0, .u64ptr=NULL, .defint64val=1, TYPE_UINT64, 0}, \
} }
// clang-format on
#define GNB_GNB_ID_IDX 0 #define GNB_GNB_ID_IDX 0
#define GNB_CELL_TYPE_IDX 1 #define GNB_CELL_TYPE_IDX 1
...@@ -195,6 +205,8 @@ typedef enum { ...@@ -195,6 +205,8 @@ typedef enum {
#define GNB_FORCE256QAMOFF_IDX 25 #define GNB_FORCE256QAMOFF_IDX 25
#define GNB_ENABLE_SDAP_IDX 26 #define GNB_ENABLE_SDAP_IDX 26
#define GNB_DRBS 27 #define GNB_DRBS 27
#define GNB_GNB_DU_ID_IDX 28
#define GNB_GNB_CU_UP_ID_IDX 29
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD} #define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
#define GNBPARAMS_CHECK { \ #define GNBPARAMS_CHECK { \
......
...@@ -730,6 +730,7 @@ typedef bool (*nr_pp_impl_ul)(module_id_t mod_id, ...@@ -730,6 +730,7 @@ typedef bool (*nr_pp_impl_ul)(module_id_t mod_id,
typedef struct f1_config_t { typedef struct f1_config_t {
f1ap_setup_req_t *setup_req; f1ap_setup_req_t *setup_req;
f1ap_setup_resp_t *setup_resp; f1ap_setup_resp_t *setup_resp;
uint32_t gnb_id; // associated gNB's ID, not used in DU itself
} f1_config_t; } f1_config_t;
/*! \brief top level eNB MAC structure */ /*! \brief top level eNB MAC structure */
......
...@@ -7,6 +7,7 @@ gNBs = ...@@ -7,6 +7,7 @@ gNBs =
{ {
////////// Identification parameters: ////////// Identification parameters:
gNB_ID = 0xe00; gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB"; # cell_type = "CELL_MACRO_GNB";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment