From 70be6742271044f885bf4a923cfe45ff6ebc4ff9 Mon Sep 17 00:00:00 2001 From: Melissa Elkadi Date: Thu, 23 Sep 2021 14:19:55 -0700 Subject: [PATCH] Code clean up part 2. This commit continues to clean up the reminader of the changed files in the merge req 1274. The changes include log updates, comment removals, etc. --- openair2/RRC/LTE/MESSAGES/asn1_msg.c | 87 +--------------------- openair2/RRC/LTE/rrc_UE.c | 20 ++--- openair2/RRC/LTE/rrc_eNB.c | 7 +- openair2/RRC/LTE/rrc_proto.h | 1 + openair2/RRC/NR/MESSAGES/asn1_msg.c | 1 - openair2/RRC/NR/rrc_gNB_internode.c | 1 + openair2/RRC/NR/rrc_gNB_nsa.c | 4 +- openair2/RRC/NR_UE/rrc_UE.c | 45 +---------- openair2/X2AP/x2ap_eNB_generate_messages.c | 2 +- openair3/NAS/UE/ESM/esm_ebr_context.c | 8 +- openair3/NAS/UE/nas_ue_task.c | 2 +- targets/RT/USER/lte-enb.c | 1 - 12 files changed, 23 insertions(+), 156 deletions(-) diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 33d76770aa..9ff815ff35 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -2380,7 +2380,6 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin static void assign_scg_ConfigResponseNR_r15(LTE_RRCConnectionReconfigurationComplete_t *rrc, OCTET_STRING_t *str) { - /* Melissa TODO: Need to free this memory when we are done. */ LTE_RRCConnectionReconfigurationComplete_r8_IEs_t *rrc_r8 = &rrc->criticalExtensions.choice. rrcConnectionReconfigurationComplete_r8; typeof(rrc_r8->nonCriticalExtension) nce1; @@ -2444,7 +2443,7 @@ do_RRCConnectionReconfigurationComplete( buffer_size); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); - LOG_I(RRC,"RRCConnectionReconfigurationComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); + LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8); } @@ -4313,67 +4312,6 @@ ssize_t do_nrMeasurementReport(uint8_t *buffer, ASN_SEQUENCE_ADD(&measResultListEUTRA2->list, measresulteutra_list); measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA=*(measResultListEUTRA2); - #if 0 //Melissa: This was a hack. Incomplete filling of ul_dcch_msg is done above - measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array = - calloc(1, sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array)); - measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array[0] = - calloc(1, sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array[0])); - measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrpResult = - calloc(1, sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrpResult)); - measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrqResult = - calloc(1, sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrqResult)); - if (measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells == NULL) - LOG_E(MAC, "Melissa, the calloc failed on neighcells.....!!\n"); - LTE_MeasResults_t *mr_r8 = &measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults; - mr_r8->measId = measid; - mr_r8->measResultPCell.rsrpResult = rsrp_s; - mr_r8->measResultPCell.rsrqResult = rsrq_s; - mr_r8->measResultNeighCells = CALLOC(1, sizeof(*mr_r8->measResultNeighCells)); - mr_r8->measResultNeighCells->present = LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15; - mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.count = 1; - - mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array)); - mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0] = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0])); - mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15 = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15)); - mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15 = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15)); - //mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15 = rsrp_tar; - //mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15 = rsrq_tar; - LOG_D(RRC, "Melissa Elkadi RSRQ of Target %ld\n", - *mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15); - LOG_D(RRC, "Melissa Elkadi RSRP of Target %ld\n", - *mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15); - - //mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.count = 1; - //mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->physCellId = 0; - mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array)); - mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array[0] = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array[0])); - mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrpResult = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrpResult)); - mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrqResult = - calloc(1, sizeof(*mr_r8->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrqResult)); - - LTE_MeasResultCellNR_r15_t *measResultCellNR_r15; - measResultCellNR_r15 = CALLOC(1, sizeof(*measResultCellNR_r15)); - measResultCellNR_r15->ext1 //Melissa should be null - measResultCellNR_r15->pci_r15 = phy_id; - measResultCellNR_r15->measResultCell_r15.rsrpResult_r15 = &rsrp_tar; - measResultCellNR_r15->measResultCell_r15.rsrqResult_r15 = &rsrq_tar; - - LTE_MeasResultCellListNR_r15_t *measResultListNR_r15; - measResultListNR_r15 = CALLOC(1, sizeof(*measResultListNR_r15)); - ASN_SEQUENCE_ADD(&measResultListNR_r15->list, measResultCellNR_r15); - - ASN_SEQUENCE_ADD(&mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list, measResultListNR_r15); - - //xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, &ul_dcch_msg); - #endif - asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_UL_DCCH_Message, NULL, &ul_dcch_msg, @@ -4385,28 +4323,7 @@ ssize_t do_nrMeasurementReport(uint8_t *buffer, SEQUENCE_free(&asn_DEF_LTE_UL_DCCH_Message, &ul_dcch_msg, ASFM_FREE_UNDERLYING_AND_RESET); return -1; } - #if 0 - LTE_UL_DCCH_Message_t *ul_dcch_msg_dec = NULL; - asn_dec_rval_t dec_rval = uper_decode( - NULL, - &asn_DEF_LTE_UL_DCCH_Message, - (void **)&ul_dcch_msg_dec, - buffer, - bufsize, - 0, - 0); - if (1) { - xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg_dec); - } - LOG_I(RRC, "Melissa, this is rsrp_result %ld\n", - *ul_dcch_msg_dec->message.choice.c1.choice.measurementReport.criticalExtensions. - choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells-> - choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15); - AssertFatal(ul_dcch_msg_dec->message.choice.c1.choice.measurementReport.criticalExtensions. - choice.c1.choice.measurementReport_r8.measResults. - measResultNeighCells->choice.measResultListEUTRA.list.array[0]->measResult.rsrqResult != NULL, "rsrq not allocated! and dec_val = %lu", dec_rval.consumed); - SEQUENCE_free(&asn_DEF_LTE_UL_DCCH_Message, &ul_dcch_msg, ASFM_FREE_UNDERLYING_AND_RESET); Melissa, might want to figure this out! - #endif + return((enc_rval.encoded+7)/8); } diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index bb6364dfbd..e158b1ac73 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -788,6 +788,7 @@ rrc_ue_establish_drb( return(0); } + //----------------------------------------------------------------------------- void rrc_ue_process_measConfig( @@ -1734,7 +1735,7 @@ rrc_ue_process_nrueCapabilityEnquiry( OCTET_STRING_fromBuf(&ue_CapabilityRAT_Container.ue_CapabilityRAT_Container, (const char *)nrue_cap_info->mesg, nrue_cap_info->mesg_len); - # if(1) //Melissa: This is a hack. The MRDC capabilites should be filled in the NR UE + # if(1) // TODO: The MRDC capabilites should be filled in the NR UE NR_UE_CapabilityRAT_Container_t ue_CapabilityRAT_Container_mrdc; memset(&ue_CapabilityRAT_Container_mrdc, 0, sizeof(ue_CapabilityRAT_Container_mrdc)); uint8_t buffer_mrdc[RRC_BUF_SIZE]; @@ -1971,15 +1972,6 @@ rrc_ue_process_rrcConnectionReconfiguration( nsa_sendmsg_to_nrue(&msg, sizeof(msg), RRC_CONFIG_COMPLETE_REQ); LOG_A(RRC, "Sent RRC_CONFIG_COMPLETE_REQ to the NR UE\n"); - #if 0 //Melissa, this is a hack. We need the transaction_id from latest dl_dcch_msg the LTE UE received. (Ln 6658) - LTE_RRCConnectionReconfiguration_t *rrc = &UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].dl_dcch_msg->message. - choice.c1.choice.rrcConnectionReconfiguration; - if (rrc != NULL) { - SEQUENCE_free(&asn_DEF_LTE_RRCConnectionReconfiguration, rrc, ASFM_FREE_EVERYTHING); - } - rrc->rrc_TransactionIdentifier = rrcConnectionReconfiguration->rrc_TransactionIdentifier; - rrcConnectionReconfiguration = NULL; - #endif } if (r_r8->mobilityControlInfo) { @@ -2059,7 +2051,7 @@ rrc_ue_process_rrcConnectionReconfiguration( NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.data = pdu_buffer; itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p); } - LOG_I(RRC, "Melissa Elkadi, we have sent NAS_CONN_ESTABLI_CNF to NAS layer via itti!\n"); + LOG_D(RRC, "Sent NAS_CONN_ESTABLI_CNF to NAS layer via itti!\n"); free (r_r8->dedicatedInfoNASList); } @@ -2517,7 +2509,6 @@ rrc_ue_decode_dcch( UE_RRC_INFO *info = &UE_rrc_inst[ctxt_pP->module_id].Info[eNB_indexP]; if (info->dl_dcch_msg != NULL) { info->dl_dcch_msg = NULL; - //SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, info->dl_dcch_msg, ASFM_FREE_EVERYTHING); Melissa } info->dl_dcch_msg = dl_dcch_msg; dl_dcch_msg = NULL; @@ -2533,7 +2524,6 @@ rrc_ue_decode_dcch( UE_RRC_INFO *info = &UE_rrc_inst[ctxt_pP->module_id].Info[eNB_indexP]; if (info->dl_dcch_msg != NULL) { info->dl_dcch_msg = NULL; - //SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, info->dl_dcch_msg, ASFM_FREE_EVERYTHING); Melissa } info->dl_dcch_msg = dl_dcch_msg; dl_dcch_msg = NULL; @@ -2571,7 +2561,7 @@ rrc_ue_decode_dcch( #ifndef NO_RRM send_msg(&S_rrc,msg_rrc_end_scan_req(ctxt_pP->module_id,eNB_indexP)); #endif - if (0) //Melissa hack: Were not done with underlying members of dl_dcch_msg (Use after free) + if (0) //We're not done with underlying members of dl_dcch_msg (Use after free error when enabled) { SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, dl_dcch_msg, ASFM_FREE_EVERYTHING); } @@ -5067,7 +5057,7 @@ void *rrc_ue_task( void *args_p ) { } case NAS_OAI_TUN_NSA: { - LOG_I(NAS, "Melissa Elkadi Received %s: length %lu. About to send this to the NR UE\n", ITTI_MSG_NAME (msg_p), + LOG_D(NAS, "Received %s: length %lu. About to send this to the NR UE\n", ITTI_MSG_NAME (msg_p), sizeof(NAS_OAI_TUN_NSA (msg_p).buffer)); char buffer[RRC_BUF_SIZE]; memcpy(buffer, NAS_OAI_TUN_NSA(msg_p).buffer, sizeof(buffer)); diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index e84d946e0a..8c4c2d56d4 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -90,6 +90,7 @@ #include #include "intertask_interface.h" +#include "softmodem-common.h" #if ENABLE_RAL #include "rrc_eNB_ral.h" @@ -4600,8 +4601,8 @@ rrc_eNB_process_MeasurementReport( if(is_en_dc_supported(ue_context_pP->ue_context.UE_Capability)) { - //AssertFatal(measResults2->measResultNeighCells!=NULL,"no measResultNeighCells, shouldn't happen!\n"); - //AssertFatal(measResults2->measResultNeighCells->present==LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15,"field is not LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15"); + AssertFatal(measResults2->measResultNeighCells!=NULL,"no measResultNeighCells, shouldn't happen!\n"); + AssertFatal(measResults2->measResultNeighCells->present==LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15,"field is not LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15"); /** to add gNB as Secondary node CG-ConfigInfo to be added as per 36.423 r15 **/ if(encode_CG_ConfigInfo(enc_buf,sizeof(enc_buf),ue_context_pP,&enc_size) == RRC_OK) LOG_I(RRC,"CG-ConfigInfo encoded successfully\n"); @@ -7990,7 +7991,7 @@ rrc_eNB_decode_dcch( /*FK: left the condition as is for the case MME is used (S1 mode) but setting dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/ int flexran_agent_handover = 0; - if (1) { //Melissa: This is a hack. We are bypassing EPC mode here. if(EPC_MODE_ENABLED) + if (EPC_MODE_ENABLED || get_softmodem_params()->nsa) { if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) { dedicated_DRB = 1; LOG_I(RRC, diff --git a/openair2/RRC/LTE/rrc_proto.h b/openair2/RRC/LTE/rrc_proto.h index da6057aafd..f0456005f5 100644 --- a/openair2/RRC/LTE/rrc_proto.h +++ b/openair2/RRC/LTE/rrc_proto.h @@ -529,6 +529,7 @@ rrc_data_req_ue( const pdcp_transmission_mode_t modeP ); + void rrc_data_ind( const protocol_ctxt_t *const ctxt_pP, diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 53643eea8f..57aaa87ea5 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1031,7 +1031,6 @@ void fill_initial_SpCellConfig(rnti_t rnti, // one symbol (13) NR_PUCCH_Resource_t *pucchres0=calloc(1,sizeof(*pucchres0)); pucchres0->pucch_ResourceId=0; - //pucchres0->startingPRB=0; pucchres0->startingPRB=(8+rnti) % curr_bwp; LOG_D(NR_RRC, "pucchres0->startPRB %ld rnti %d curr_bwp %d\n", pucchres0->startingPRB, rnti, curr_bwp); pucchres0->intraSlotFrequencyHopping=NULL; diff --git a/openair2/RRC/NR/rrc_gNB_internode.c b/openair2/RRC/NR/rrc_gNB_internode.c index 04749b2800..c4cd41c5b4 100644 --- a/openair2/RRC/NR/rrc_gNB_internode.c +++ b/openair2/RRC/NR/rrc_gNB_internode.c @@ -59,6 +59,7 @@ int parse_CG_ConfigInfo(gNB_RRC_INST *rrc, NR_CG_ConfigInfo_t *CG_ConfigInfo, x2 AssertFatal(1==0,"[InterNode] Failed to decode NR_UE_CapabilityRAT_ContainerList (%zu bits), size of OCTET_STRING %lu\n", dec_rval.consumed, cg_ConfigInfo->ue_CapabilityInfo->size); } + rrc_parse_ue_capabilities(rrc,UE_CapabilityRAT_ContainerList, m,cg_ConfigInfo); } diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index cf70c90bce..52985a0961 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -297,7 +297,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0,rrc->module_id); memset(&create_tunnel_resp, 0, sizeof(create_tunnel_resp)); if (!IS_SOFTMODEM_NOS1) { - LOG_I(RRC, "Melissa Elkadi calling gtpv1u_create_s1u_tunnel()\n"); + LOG_D(RRC, "Calling gtpv1u_create_s1u_tunnel()\n"); gtpv1u_create_s1u_tunnel( ctxt.instance, &create_tunnel_req, @@ -404,7 +404,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ (LTE_PMCH_InfoList_r9_t *) NULL, ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); - LOG_I(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti); + LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti); } diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 8cd93b8048..ff9855b70c 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2025,15 +2025,6 @@ nr_rrc_ue_establish_srb2( } } - /*rrc_data_req_nr_ue ( - ctxt_pP, - DCCH, - nr_rrc_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); Melissa Elkadi come back here!*/ - if (measConfig->s_MeasureConfig->present == NR_MeasConfig__s_MeasureConfig_PR_ssb_RSRP) { NR_UE_rrc_inst[ctxt_pP->module_id].s_measure = measConfig->s_MeasureConfig->choice.ssb_RSRP; } else if (measConfig->s_MeasureConfig->present == NR_MeasConfig__s_MeasureConfig_PR_csi_RSRP) { @@ -2699,38 +2690,6 @@ nr_rrc_ue_process_ueCapabilityEnquiry( } } -//----------------------------------------------------------------------------- -#if 0 -static void nr_rrc_ue_generate_RRCReestablishmentRequest( const protocol_ctxt_t *const ctxt_pP, const uint8_t gNB_index ) -{ - NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size = - do_RRCReestablishmentRequest( - ctxt_pP->module_id, - (uint8_t *)NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload, 1); - LOG_I(NR_RRC,"[UE %d] : Frame %d, Logical Channel UL-CCCH (SRB0), Generating RRCReestablishmentRequest (bytes %d, gNB %d)\n", - ctxt_pP->module_id, ctxt_pP->frame, NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size, gNB_index); - - for (int i=0; imodule_id].Srb0[gNB_index].Tx_buffer.payload_size; i++) { - LOG_T(NR_RRC,"%x.",NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload[i]); - } - - LOG_T(NR_RRC,"\n"); - -#ifdef ITTI_SIM - MessageDef *message_p; - uint8_t *message_buffer; - message_buffer = itti_malloc (TASK_RRC_NRUE,TASK_RRC_GNB_SIM, - NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size); - memcpy (message_buffer, (uint8_t*)NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload, - NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size); - message_p = itti_alloc_new_message (TASK_RRC_NRUE, 0, UE_RRC_CCCH_DATA_IND); - UE_RRC_CCCH_DATA_IND (message_p).sdu = message_buffer; - UE_RRC_CCCH_DATA_IND (message_p).size = NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size; - itti_send_msg_to_task (TASK_RRC_GNB_SIM, ctxt_pP->instance, message_p); -#endif -} -#endif - void nr_rrc_ue_generate_rrcReestablishmentComplete( const protocol_ctxt_t *const ctxt_pP, @@ -2890,7 +2849,7 @@ static void nsa_rrc_ue_process_ueCapabilityEnquiry(void) UECap->sdu_size = (enc_rval.encoded + 7) / 8; LOG_A(NR_RRC, "[NR_RRC] NRUE Capability encoded, %d bytes (%zd bits)\n", UECap->sdu_size, enc_rval.encoded + 7); - /* Melissa: Hack. Need to add ctxt->mod_id as array indices */ + NR_UE_rrc_inst[0].UECap = UECap; NR_UE_rrc_inst[0].UECapability = UECap->sdu; NR_UE_rrc_inst[0].UECapability_size = UECap->sdu_size; @@ -3031,7 +2990,7 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len) LOG_I(NR_RRC, "We got an OAI_TUN_IFACE_NSA!!\n"); char cmd_line[RRC_BUF_SIZE]; memcpy(cmd_line, msg_buffer, sizeof(cmd_line)); - LOG_I(NR_RRC, "Melissa Elkadi, this is the command line we got: %s\n", cmd_line); + LOG_D(NR_RRC, "Command line: %s\n", cmd_line); if (background_system(cmd_line) != 0) { LOG_E(NR_RRC, "ESM-PROC - failed command '%s'", cmd_line); diff --git a/openair2/X2AP/x2ap_eNB_generate_messages.c b/openair2/X2AP/x2ap_eNB_generate_messages.c index 13618a921c..9724e0cc38 100644 --- a/openair2/X2AP/x2ap_eNB_generate_messages.c +++ b/openair2/X2AP/x2ap_eNB_generate_messages.c @@ -1734,7 +1734,7 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request( X2AP_ERROR("Failed to encode ENDC X2 SgNB_addition request message\n"); return -1; } - # if 0 //Melissa: This is a hack becasue we are trying to access this after free. + # if 0 // TODO: Sanitizer complains we are trying to access this after free. free(ie->value.choice.MeNBtoSgNBContainer.buf); #endif MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id); diff --git a/openair3/NAS/UE/ESM/esm_ebr_context.c b/openair3/NAS/UE/ESM/esm_ebr_context.c index 6ba3fc2a86..b801ca2ad5 100644 --- a/openair3/NAS/UE/ESM/esm_ebr_context.c +++ b/openair3/NAS/UE/ESM/esm_ebr_context.c @@ -263,7 +263,7 @@ int esm_ebr_context_create( netmask = 32; strcpy(broadcast, ipv4_addr); } - LOG_I(NAS, "Melissa Elkadi setting commandline string: " + LOG_D(NAS, "setting commandline string: " "ip address add %s/%d broadcast %s dev %s%d && " "ip link set %s%d up && " "ip rule add from %s/32 table %d && " @@ -276,7 +276,7 @@ int esm_ebr_context_create( ipv4_addr, ueid + 10000, UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1, ueid + 10000); - if (get_softmodem_params()->nsa == 0) + if (!get_softmodem_params()->nsa) { res = sprintf(command_line, "ip address add %s/%d broadcast %s dev %s%d && " @@ -307,7 +307,7 @@ int esm_ebr_context_create( * common/utils/system.c for details. */ - LOG_TRACE(INFO, "Melissa Elkadi ESM-PROC - executing %s ", + LOG_TRACE(INFO, "ESM-PROC - executing %s ", command_line); if (background_system(command_line) != 0) { @@ -332,7 +332,7 @@ int esm_ebr_context_create( if ( res<0 ) { LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string"); } - LOG_I(NAS, "Melissa Elkadi, sending NAS_OAI_TUN_NSA msg to LTE UE via itti\n"); + LOG_D(NAS, "Sending NAS_OAI_TUN_NSA msg to LTE UE via itti\n"); MessageDef *msg_p = itti_alloc_new_message(TASK_NAS_UE, 0, NAS_OAI_TUN_NSA); memcpy(NAS_OAI_TUN_NSA(msg_p).buffer, command_line, sizeof(NAS_OAI_TUN_NSA(msg_p).buffer)); itti_send_msg_to_task(TASK_RRC_UE, 0, msg_p); diff --git a/openair3/NAS/UE/nas_ue_task.c b/openair3/NAS/UE/nas_ue_task.c index 8c03fe43be..670600e0ad 100644 --- a/openair3/NAS/UE/nas_ue_task.c +++ b/openair3/NAS/UE/nas_ue_task.c @@ -252,7 +252,7 @@ void *nas_ue_task(void *args_p) break; case NAS_CONN_ESTABLI_CNF: - LOG_I(NAS, "Melissa Elkadi [UE %d] Received %s: errCode %u, length %u\n", Mod_id, ITTI_MSG_NAME (msg_p), + LOG_I(NAS, "[UE %d] Received %s: errCode %u, length %u\n", Mod_id, ITTI_MSG_NAME (msg_p), NAS_CONN_ESTABLI_CNF (msg_p).errCode, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length); if ((NAS_CONN_ESTABLI_CNF (msg_p).errCode == AS_SUCCESS) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index ef250c0865..0bdf29227f 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -958,7 +958,6 @@ void init_eNB_proc(int inst) { // Original Code from Fujitsu w/ old structure/field name //pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, &proc_rxtx[0] ); //pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, eNB_thread_rxtx, &proc_rxtx[1] ); - pthread_create( &L1_proc->pthread, attr0, L1_thread, L1_proc ); if (pthread_setname_np(L1_proc->pthread, "oai:enb-L1-rx") != 0) {