From 1181790b866d0a54faf0e550cf1f0222ec3a2b19 Mon Sep 17 00:00:00 2001 From: Bing-Kai Hong Date: Fri, 21 Sep 2018 22:03:27 +0200 Subject: [PATCH] Partially update the node_type check --- openair2/ENB_APP/enb_config.c | 6 ++++-- openair2/LAYER2/PROTO_AGENT/proto_agent.c | 13 +++++++------ openair2/RRC/LTE/rrc_eNB.c | 11 ++++++++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 334299b3c2..16fa62404c 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -743,7 +743,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) { nb_cc++; - if (rrc->node_type != ngran_eNB_CU && rrc->node_type != ngran_ng_eNB_CU) { + if ( (rrc->node_type != ngran_eNB_CU) || (rrc->node_type != ngran_ng_eNB_CU) || (rrc->node_type != ngran_gNB_CU) ) { // Cell params, MIB/SIB1 in DU RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; @@ -1826,7 +1826,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) { } // node_type!=ngran_eNB_DU } - if (rrc->node_type == ngran_eNB_CU || rrc->node_type == ngran_ng_eNB_CU) { + if ( (rrc->node_type == ngran_eNB_CU) || (rrc->node_type == ngran_ng_eNB_CU) || (rrc->node_type == ngran_gNB_CU) ) { char srb1path[MAX_OPTNAME_SIZE*2 + 8]; sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1); int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path); @@ -2178,6 +2178,8 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) { #endif } + LOG_I(RRC,"Node type %d \n ", rrc->node_type); + return 0; } diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent.c b/openair2/LAYER2/PROTO_AGENT/proto_agent.c index 394ba25814..de8af0fb33 100644 --- a/openair2/LAYER2/PROTO_AGENT/proto_agent.c +++ b/openair2/LAYER2/PROTO_AGENT/proto_agent.c @@ -59,12 +59,13 @@ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p) { int channel_id; -/* - DevAssert(p->local_ipv4_address); - DevAssert(p->local_port > 1024); // "unprivileged" port - DevAssert(p->remote_ipv4_address); - DevAssert(p->remote_port > 1024); // "unprivileged" port - */ + // RS: CUDU does not work! + //DevAssert(p->local_interface); + //DevAssert(p->local_ipv4_address); + //DevAssert(p->local_port > 1024); // "unprivileged" port + //DevAssert(p->remote_ipv4_address); + //DevAssert(p->remote_port > 1024); // "unprivileged" port + proto_agent[mod_id].mod_id = mod_id; /* Initialize the channel container */ diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 811e2ce40f..cacb8dee6a 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -168,7 +168,10 @@ init_SI( AssertFatal(carrier->SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); - if (rrc->node_type != ngran_eNB_CU && rrc->node_type != ngran_ng_eNB_CU) { + LOG_I(RRC,"[eNB %d] Node type %d \n ", ctxt_pP->module_id, rrc->node_type); + if ((rrc->node_type != ngran_eNB_CU) || + (rrc->node_type != ngran_ng_eNB_CU) || + (rrc->node_type != ngran_gNB_CU) ) { // copy basic Cell parameters carrier->physCellId = configuration->Nid_cell[CC_id]; carrier->p_eNB = configuration->nb_antenna_ports[CC_id]; @@ -204,8 +207,8 @@ init_SI( AssertFatal(carrier->sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255"); } - if (rrc->node_type != ngran_eNB_DU) { - + if ((rrc->node_type != ngran_eNB_DU) || + (rrc->node_type != ngran_gNB_DU)) { carrier->SIB23 = (uint8_t*) malloc16(64); AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB"); carrier->sizeof_SIB23 = do_SIB23( @@ -217,6 +220,8 @@ init_SI( #endif ); + LOG_I(RRC,"do_SIB23, size %d \n ", carrier->sizeof_SIB23); + AssertFatal(carrier->sizeof_SIB23 != 255,"FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB23 == 255");