From 2dfad4c065c9e2160cff59a18b49152c854e18aa Mon Sep 17 00:00:00 2001 From: Raphael Defosseux <raphael.defosseux@eurecom.fr> Date: Mon, 13 Jan 2020 16:46:21 +0100 Subject: [PATCH] Fix compilation issues for: - physical simulators - LTE eNB - LTE UE - 5G-NR gNB Still NR-UE does not build and eNB segs fault at start of program Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr> --- cmake_targets/CMakeLists.txt | 2 +- openair1/PHY/defs_RU.h | 2 +- openair1/PHY/defs_common.h | 3 --- openair1/PHY/defs_eNB.h | 1 + openair1/SCHED/ru_procedures.c | 8 ++++---- openair2/ENB_APP/enb_paramdef.h | 1 - openair2/F1AP/f1ap_du_rrc_message_transfer.c | 3 +-- openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 6 +++--- openair2/LAYER2/RLC/rlc_rrc.c | 2 +- openair2/MCE_APP/mce_config.h | 2 +- openair2/PHY_INTERFACE/IF_Module.h | 1 - .../MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1 | 2 +- openair2/RRC/LTE/rrc_UE.c | 1 + openair2/RRC/LTE/rrc_eNB_M2AP.c | 12 ++++++++++++ openair3/MME_APP/mme_config.h | 2 +- targets/RT/USER/lte-ru.c | 4 ++-- targets/RT/USER/ru_control.c | 4 ++-- 17 files changed, 32 insertions(+), 24 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 273591c8e2d..6f9e9239390 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2589,7 +2589,7 @@ target_link_libraries (nr-softmodem UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB L2 L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB - X2AP_LIB X2AP_ENB F1AP_LIB F1AP ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} + X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} -Wl,--end-group z dl) target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES}) diff --git a/openair1/PHY/defs_RU.h b/openair1/PHY/defs_RU.h index aeada81d80d..94afeed12f4 100644 --- a/openair1/PHY/defs_RU.h +++ b/openair1/PHY/defs_RU.h @@ -37,7 +37,7 @@ #include "common_lib.h" #include "openairinterface5g_limits.h" #include "PHY/TOOLS/time_meas.h" -#include "openair1/PHY/defs_common.h" +#include "defs_common.h" #define MAX_BANDS_PER_RRU 4 diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index 811ae17e712..463523a9bab 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -72,9 +72,6 @@ #include "types.h" #include "nfapi_interface.h" -//#include "defs.h" - -#include "defs_RU.h" #define RX_NB_TH_MAX 2 #define RX_NB_TH 2 diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index dba49b6a780..7b06f6c8c70 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -57,6 +57,7 @@ #include "common_lib.h" #include "msc.h" #include "defs_common.h" +#include "defs_RU.h" #include "impl_defs_top.h" #include "PHY/TOOLS/time_meas.h" //#include "PHY/CODING/coding_defs.h" diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c index 0188f5cab52..8e95f892500 100644 --- a/openair1/SCHED/ru_procedures.c +++ b/openair1/SCHED/ru_procedures.c @@ -80,7 +80,7 @@ void feptx0(RU_t *ru, slot_offset = slot*(fp->samples_per_tti>>1); //slot_offset = subframe*fp->samples_per_tti + (slot*(fp->samples_per_tti>>1)); - //LOG_D(PHY,"SFN/SF:RU:TX:%d/%d Generating slot %d\n",ru->proc.frame_tx, ru->proc.subframe_tx,slot); + //LOG_D(PHY,"SFN/SF:RU:TX:%d/%d Generating slot %d\n",ru->proc.frame_tx, ru->proc.tti_tx,slot); for (aa=0; aa<ru->nb_tx; aa++) { if (fp->Ncp == EXTENDED) { @@ -105,7 +105,7 @@ void feptx0(RU_t *ru, CYCLIC_PREFIX); LOG_D(PHY,"SFN/SF:RU:TX:%d/%d Generating slot %d F(%d) t(%d) IS PMCH(%d)\n", ru->proc.frame_tx, - ru->proc.subframe_tx, + ru->proc.tti_tx, slot, slot*slot_sizeF+fp->ofdm_symbol_size*2, slot_offset+((fp->ofdm_symbol_size>>2)*2+fp->ofdm_symbol_size*2), @@ -214,7 +214,7 @@ static void *feptx_thread(void *param) } /*if(opp_enabled == 1 && ru->ofdm_mod_wakeup_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_mod_wakeup_stats,"fep wakeup",stderr); - printf("delay in fep wakeup in frame_tx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx); + printf("delay in fep wakeup in frame_tx: %d subframe_rx: %d \n",proc->frame_tx,proc->tti_tx); }*/ } return(NULL); @@ -273,7 +273,7 @@ void feptx_ofdm_2thread(RU_t *ru, stop_meas(&ru->ofdm_mod_wait_stats); /*if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_mod_wait_stats,"fep wakeup",stderr); - printf("delay in feptx wait on condition in frame_rx: %d subframe_rx: %d \n", proc->frame_tx, proc->subframe_tx); + printf("delay in feptx wait on condition in frame_rx: %d subframe_rx: %d \n", proc->frame_tx, proc->tti_tx); }*/ stop_meas(&ru->ofdm_mod_stats); diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 36ede04e347..2975cf4aeaf 100644 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -1050,7 +1050,6 @@ typedef struct srb1_params_s { {ENB_CONFIG_STRING_MCE_IPV4_ADDR_FOR_M2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \ } -} /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* GTPU configuration parameters */ diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 223155c98a5..f93a6724a32 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -541,6 +541,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, if (pdcp_pdu_p != NULL) { memset(pdcp_pdu_p->data, 0, rrc_dl_sdu_len); memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, rrc_dl_sdu_len); + rlc_status = rlc_data_req(&ctxt , 1 , MBMS_FLAG_NO @@ -549,10 +550,8 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, , 0 , rrc_dl_sdu_len , pdcp_pdu_p -#ifdef Rel14 ,NULL ,NULL -#endif ); switch (rlc_status) { case RLC_OP_STATUS_OK: diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index df65240d62b..f198a98b234 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -295,9 +295,9 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p ctxt.module_id, ctxt.rnti, ctxt.enb_flag); if (h_rc == HASH_TABLE_OK) { - LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %d \n", + LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %ld \n", ctxt.frame, ctxt.instance, len, rab_id); - LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %u]\n", + LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n", ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id, ctxt.rnti, rab_id); MSC_LOG_RX_MESSAGE((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, @@ -334,7 +334,7 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p MSC_AS_TIME_ARGS(ctxt_pP), ctxt.instance, rab_id, rab_id, len); LOG_D(PDCP, - "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %u] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n", + "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n", ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id, ctxt.rnti, rab_id, key); //if (!UE_NAS_USE_TUN) { diff --git a/openair2/LAYER2/RLC/rlc_rrc.c b/openair2/LAYER2/RLC/rlc_rrc.c index 73da0cdb66c..85ee4e05719 100644 --- a/openair2/LAYER2/RLC/rlc_rrc.c +++ b/openair2/LAYER2/RLC/rlc_rrc.c @@ -379,7 +379,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t *const ctxt_pP } } - LOG_I(RLC, PROTOCOL_CTXT_FMT" CONFIG REQ MBMS ASN1 LC ID %u RB ID %u SESSION ID %u SERVICE ID %u\n", + LOG_I(RLC, PROTOCOL_CTXT_FMT" CONFIG REQ MBMS ASN1 LC ID %u RB ID %ld SESSION ID %u SERVICE ID %u\n", PROTOCOL_CTXT_ARGS(ctxt_pP), lc_id, rb_id, diff --git a/openair2/MCE_APP/mce_config.h b/openair2/MCE_APP/mce_config.h index f3394015406..3078b64e49d 100644 --- a/openair2/MCE_APP/mce_config.h +++ b/openair2/MCE_APP/mce_config.h @@ -37,7 +37,7 @@ #include "commonDef.h" #include "platform_types.h" #include "platform_constants.h" -#include "PHY/impl_defs_lte.h" +#include "PHY/impl_defs_top.h" #include "PHY/defs_eNB.h" #include "s1ap_messages_types.h" #include "f1ap_messages_types.h" diff --git a/openair2/PHY_INTERFACE/IF_Module.h b/openair2/PHY_INTERFACE/IF_Module.h index b964ab565d8..f2602220970 100644 --- a/openair2/PHY_INTERFACE/IF_Module.h +++ b/openair2/PHY_INTERFACE/IF_Module.h @@ -140,7 +140,6 @@ typedef struct IF_Module_s { void (*UL_indication)(UL_IND_t *UL_INFO); void (*schedule_response)(Sched_Rsp_t *Sched_INFO); void (*PHY_config_req)(PHY_Config_t *config_INFO); - void (*PHY_config_req)(PHY_Config_t* config_INFO); void (*PHY_config_update_sib2_req)(PHY_Config_t* config_INFO); void (*PHY_config_update_sib13_req)(PHY_Config_t* config_INFO); uint32_t CC_mask; diff --git a/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1 b/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1 index 91194c2ff5c..02b8843c2b5 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1 +++ b/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1 @@ -126,7 +126,7 @@ DL-DCCH-MessageType ::= CHOICE { loggedMeasurementConfiguration-r10 LoggedMeasurementConfiguration-r10, rnReconfiguration-r10 RNReconfiguration-r10, rrcConnectionResume-r13 RRCConnectionResume-r13, - spare3 NULL, spare2 NULL, spare1 NULL + spare4 NULL, spare3 NULL, spare2 NULL, spare1 NULL }, messageClassExtension SEQUENCE {} } diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index e2030e9da34..4c0965b0aea 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -2165,6 +2165,7 @@ rrc_ue_decode_dcch( case LTE_DL_DCCH_MessageType__c1_PR_spare1: case LTE_DL_DCCH_MessageType__c1_PR_spare2: case LTE_DL_DCCH_MessageType__c1_PR_spare3: + case LTE_DL_DCCH_MessageType__c1_PR_spare4: break; default: diff --git a/openair2/RRC/LTE/rrc_eNB_M2AP.c b/openair2/RRC/LTE/rrc_eNB_M2AP.c index 5ef4e6e249c..bd586dfc71c 100644 --- a/openair2/RRC/LTE/rrc_eNB_M2AP.c +++ b/openair2/RRC/LTE/rrc_eNB_M2AP.c @@ -476,6 +476,12 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2( break; case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib21_v1430: break; + case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib24_v1530: + break; + case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib25_v1530: + break; + case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib26_v1530: + break; case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2: LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2, %p %p\n",&typeandinfo->choice.sib2,*sib2); @@ -885,6 +891,12 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2_SIB13( break; case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib21_v1430: break; + case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib24_v1530: + break; + case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib25_v1530: + break; + case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib26_v1530: + break; case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2: LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2, %p %p\n",&typeandinfo->choice.sib2,*sib2); diff --git a/openair3/MME_APP/mme_config.h b/openair3/MME_APP/mme_config.h index 97b2fae0324..4371ad55f6f 100644 --- a/openair3/MME_APP/mme_config.h +++ b/openair3/MME_APP/mme_config.h @@ -36,7 +36,7 @@ #include "commonDef.h" #include "platform_types.h" #include "platform_constants.h" -#include "PHY/impl_defs_lte.h" +#include "PHY/impl_defs_top.h" #include "PHY/defs_eNB.h" #include "s1ap_messages_types.h" #include "f1ap_messages_types.h" diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 084543e3966..459732a30c3 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -1889,8 +1889,8 @@ static void *ru_thread( void *param ) { #ifdef MBMS_EXPERIMENTAL //Workaround ... this must be properly handled if(ru->if_south==LOCAL_RF && ru->function==eNodeB_3GPP && RC.eNB[0][0]!=NULL){ - if(ru->frame_parms.num_MBSFN_config!=RC.eNB[0][0]->frame_parms.num_MBSFN_config){ - ru->frame_parms = RC.eNB[0][0]->frame_parms;//->frame_parms; + if(ru->frame_parms->num_MBSFN_config!=RC.eNB[0][0]->frame_parms.num_MBSFN_config){ + ru->frame_parms = &RC.eNB[0][0]->frame_parms;//->frame_parms; LOG_W(PHY,"RU MBSFN SF PARAMS Updated\n"); } } diff --git a/targets/RT/USER/ru_control.c b/targets/RT/USER/ru_control.c index e01749b294d..6daf0f4dfac 100644 --- a/targets/RT/USER/ru_control.c +++ b/targets/RT/USER/ru_control.c @@ -685,9 +685,9 @@ void* ru_thread_control( void* param ) msg_len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_config_t); LOG_W(PHY,"New MBSFN config received from RAU --- num_MBSFN_config %d\n",((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config); - ru->frame_parms.num_MBSFN_config = ((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config; + ru->frame_parms->num_MBSFN_config = ((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config; for(int i=0; i < ((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config; i++){ - ru->frame_parms.MBSFN_config[i].mbsfn_SubframeConfig=((RRU_config_t *)&rru_config_msg.msg[0])->MBSFN_config[i].mbsfn_SubframeConfig; + ru->frame_parms->MBSFN_config[i].mbsfn_SubframeConfig=((RRU_config_t *)&rru_config_msg.msg[0])->MBSFN_config[i].mbsfn_SubframeConfig; LOG_W(PHY,"Configuration received from RAU (num MBSFN %d, MBSFN_SubframeConfig[%d] pattern is %x )\n", ((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config, i, -- GitLab