X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcu_stub%2Fcu_f1ap_msg_hdl.c;h=f7db5fba2b747c21364632888696c89768c6e29e;hb=c5c410562096194a3f6836ab1a6a48b315c60974;hp=bba7b90380d215ef9bbc148ebc593175ce3d600a;hpb=775c05505b7b9ae227bbe72b0e0bf32b52e6a89f;p=o-du%2Fl2.git diff --git a/src/cu_stub/cu_f1ap_msg_hdl.c b/src/cu_stub/cu_f1ap_msg_hdl.c index bba7b9038..f7db5fba2 100644 --- a/src/cu_stub/cu_f1ap_msg_hdl.c +++ b/src/cu_stub/cu_f1ap_msg_hdl.c @@ -171,6 +171,7 @@ #define SCRAMBLING_ID NR_PCI #define DMRS_ADDITIONAL_POS 0 /* DMRS Additional poistion */ #define RES_ALLOC_TYPE 1 /* Resource allocation type */ +#define FIVE_QI_VALUE 9 /*spec 23.501, Table 5.7.4-1*/ /******************************************************************* * @@ -1767,6 +1768,9 @@ uint8_t setDlRRCMsgType() case RRC_RECONFIG: rrcMsgType = RRC_RECONFIG; break; + case UE_CONTEXT_MOD_REQ: + rrcMsgType = UE_CONTEXT_MOD_REQ; + break; default: break; } @@ -2027,7 +2031,7 @@ uint8_t BuildQOSInfo(QoSFlowLevelQoSParameters_t *drbQos) return RFAILED; } /*FiveQI*/ - drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->fiveQI = 0; + drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->fiveQI = FIVE_QI_VALUE; /*AveragingWindow*/ CU_ALLOC(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow,\ sizeof(AveragingWindow_t)); @@ -2048,11 +2052,10 @@ uint8_t BuildQOSInfo(QoSFlowLevelQoSParameters_t *drbQos) *(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume) = 0; /*nRGRAN Allocation Retention Priority*/ - drbQos->nGRANallocationRetentionPriority.priorityLevel = PriorityLevel_highest; + drbQos->nGRANallocationRetentionPriority.priorityLevel = PriorityLevel_lowest; drbQos->nGRANallocationRetentionPriority.pre_emptionCapability = Pre_emptionCapability_may_trigger_pre_emption; drbQos->nGRANallocationRetentionPriority.pre_emptionVulnerability = Pre_emptionVulnerability_not_pre_emptable; - /* TO DO: GBR_QoSFlowInformation */ return ROK; }/*End of BuildQOSInfo*/ @@ -2204,14 +2207,15 @@ uint8_t BuildULTnlInfo(ULUPTNLInformation_ToBeSetup_List_t *ulInfo) { return RFAILED; } + /* NOTE: Below IP address must be changed if running on different IP configuration */ ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ - transportLayerAddress.buf[0] = 4; + transportLayerAddress.buf[0] = 192; ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ - transportLayerAddress.buf[1] = 4; + transportLayerAddress.buf[1] = 168; ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ - transportLayerAddress.buf[2] = 4; + transportLayerAddress.buf[2] = 130; ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ - transportLayerAddress.buf[3] = 5; + transportLayerAddress.buf[3] = 82; ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ transportLayerAddress.bits_unused = 0; /*GTP TEID*/ @@ -2226,13 +2230,13 @@ uint8_t BuildULTnlInfo(ULUPTNLInformation_ToBeSetup_List_t *ulInfo) return RFAILED; } ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ - gTP_TEID.buf[0] = 11; + gTP_TEID.buf[0] = 0; ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ gTP_TEID.buf[1] = 0; ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ gTP_TEID.buf[2] = 0; ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\ - gTP_TEID.buf[3] = 2; + gTP_TEID.buf[3] = 1; return ROK; }/*End of BuildULTnlInfo*/ @@ -6550,6 +6554,11 @@ uint8_t procUlRrcMsg(F1AP_PDU_t *f1apMsg) BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType); } } + if(rrcMsgType == UE_CONTEXT_MOD_REQ) + { + DU_LOG("\nINFO --> F1AP: Sending UE Context Modification Request"); + BuildAndSendUeContextModificationReq(); + } } return ret; } @@ -6830,13 +6839,13 @@ uint8_t BuildUlTnlInfoforDrb2(ULUPTNLInformation_ToBeSetup_List_t *ulInfo) return RFAILED; } ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\ - gTP_TEID.buf[0] = 11; + gTP_TEID.buf[0] = 0; ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\ gTP_TEID.buf[1] = 0; ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\ gTP_TEID.buf[2] = 0; ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\ - gTP_TEID.buf[3] = 1; + gTP_TEID.buf[3] = 2; return ROK; }/*End of BuildULTnlInfo*/ @@ -7095,7 +7104,7 @@ void FreeDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet) { if(arrIdx == 0) { - drbItemIe =drbSet->list.array[arrIdx]; + drbItemIe = (DRBs_ToBeSetupMod_ItemIEs_t *)drbSet->list.array[arrIdx]; FreeDrb2Item(&(drbItemIe->value.choice.DRBs_ToBeSetupMod_Item)); } CU_FREE(drbSet->list.array[arrIdx], sizeof(DRBs_ToBeSetupMod_ItemIEs_t)); @@ -7150,7 +7159,7 @@ uint8_t BuildDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet) } arrIdx=0; - ret = FillDrbItemList(drbSet->list.array[arrIdx]); + ret = FillDrbItemList((DRBs_ToBeSetupMod_ItemIEs_t *)drbSet->list.array[arrIdx]); if(ret != ROK) { DU_LOG("\nERROR --> F1AP : FillDrbItemList failed"); @@ -7176,10 +7185,8 @@ uint8_t BuildDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet) * ****************************************************************/ void FreeUeContextModicationRequest(F1AP_PDU_t *f1apMsg) { - uint8_t arrIdx =0 , ieId=0, drbIe=0, arrIdx1; + uint8_t arrIdx =0 , ieId=0; UEContextModificationRequest_t *UeContextModifyReq = NULLP; - DRBs_ToBeSetupMod_List_t *drbSet; - DRBs_ToBeSetupMod_ItemIEs_t *drbItemIe = NULLP; if(f1apMsg) { @@ -7420,88 +7427,103 @@ void F1APMsgHdlr(Buffer *mBuf) switch(f1apMsg->present) { case F1AP_PDU_PR_initiatingMessage: - { - switch(f1apMsg->choice.initiatingMessage->value.present) - { - case InitiatingMessage__value_PR_Reset: - { - DU_LOG("\nINFO --> F1AP : F1 reset request received "); - BuildAndSendF1ResetAck(); - break; - } - - case InitiatingMessage__value_PR_F1SetupRequest: - { - DU_LOG("\nINFO --> F1AP : F1 setup request received"); - BuildAndSendF1SetupRsp(); - break; - } - - case InitiatingMessage__value_PR_GNBDUConfigurationUpdate: - { - DU_LOG("\nINFO --> F1AP : GNB-DU config update received"); - BuildAndSendDUUpdateAck(); - DU_LOG("\nINFO --> F1AP : Sending F1 reset request"); - BuildAndSendF1ResetReq(); - break; - } - case InitiatingMessage__value_PR_InitialULRRCMessageTransfer: - { - DU_LOG("\nINFO --> F1AP : Received InitialULRRCMessageTransfer"); - procInitULRRCMsg(f1apMsg); - break; - } - case InitiatingMessage__value_PR_ULRRCMessageTransfer: - { - DU_LOG("\nINFO --> F1AP : Received ULRRCMessageTransfer"); - procUlRrcMsg(f1apMsg); - break; - } - - case InitiatingMessage__value_PR_RRCDeliveryReport: - { - DU_LOG("\nINFO --> F1AP : Received RRC delivery report"); - break; - } - default: - { - DU_LOG("\nERROR --> F1AP : Invalid type of intiating message [%d]",\ - f1apMsg->choice.initiatingMessage->value.present); - return; - } - }/* End of switch(initiatingMessage) */ - break; - } + { + switch(f1apMsg->choice.initiatingMessage->value.present) + { + case InitiatingMessage__value_PR_Reset: + { + DU_LOG("\nINFO --> F1AP : F1 reset request received "); + BuildAndSendF1ResetAck(); + break; + } + + case InitiatingMessage__value_PR_F1SetupRequest: + { + DU_LOG("\nINFO --> F1AP : F1 setup request received"); + BuildAndSendF1SetupRsp(); + break; + } + + case InitiatingMessage__value_PR_GNBDUConfigurationUpdate: + { + DU_LOG("\nINFO --> F1AP : GNB-DU config update received"); + BuildAndSendDUUpdateAck(); + DU_LOG("\nINFO --> F1AP : Sending F1 reset request"); + BuildAndSendF1ResetReq(); + break; + } + case InitiatingMessage__value_PR_InitialULRRCMessageTransfer: + { + DU_LOG("\nINFO --> F1AP : Received InitialULRRCMessageTransfer"); + procInitULRRCMsg(f1apMsg); + break; + } + case InitiatingMessage__value_PR_ULRRCMessageTransfer: + { + DU_LOG("\nINFO --> F1AP : Received ULRRCMessageTransfer"); + procUlRrcMsg(f1apMsg); + break; + } + + case InitiatingMessage__value_PR_RRCDeliveryReport: + { + DU_LOG("\nINFO --> F1AP : Received RRC delivery report"); + break; + } + case InitiatingMessage__value_PR_UEContextReleaseRequest: + { + DU_LOG("\nINFO --> F1AP : Received UE Context Release Request"); + break; + } + default: + { + DU_LOG("\nERROR --> F1AP : Invalid type of intiating message [%d]",\ + f1apMsg->choice.initiatingMessage->value.present); + return; + } + }/* End of switch(initiatingMessage) */ + break; + } case F1AP_PDU_PR_successfulOutcome: - { - switch(f1apMsg->choice.successfulOutcome->value.present) - { - case SuccessfulOutcome__value_PR_ResetAcknowledge: - { - DU_LOG("\nINFO --> F1Reset Acknowledgement is received successfully "); - break; - } - case SuccessfulOutcome__value_PR_UEContextSetupResponse: - { - DU_LOG("\nINFO --> F1AP : UE ContextSetupResponse received"); - f1apMsgDb.dlRrcMsgCount++; /* keeping DL RRC Msg Count */ - break; - } - default: - { - DU_LOG("\nERROR --> F1AP : Invalid type of successful outcome message [%d]",\ - f1apMsg->choice.successfulOutcome->value.present); - return; - } - }/* End of switch(successfulOutcome) */ - break; - } + { + switch(f1apMsg->choice.successfulOutcome->value.present) + { + case SuccessfulOutcome__value_PR_ResetAcknowledge: + { + DU_LOG("\nINFO --> F1Reset Acknowledgement is received successfully "); + break; + } + case SuccessfulOutcome__value_PR_UEContextSetupResponse: + { + DU_LOG("\nINFO --> F1AP : UE ContextSetupResponse received"); + f1apMsgDb.dlRrcMsgCount++; /* keeping DL RRC Msg Count */ + break; + } + case SuccessfulOutcome__value_PR_UEContextModificationResponse: + { + DU_LOG("\nINFO --> F1AP : UE Context Modification Response received"); + break; + } + case SuccessfulOutcome__value_PR_UEContextReleaseComplete: + { + DU_LOG("\nINFO --> F1AP : UE Context release complete received"); + break; + } + default: + { + DU_LOG("\nERROR --> F1AP : Invalid type of successful outcome message [%d]",\ + f1apMsg->choice.successfulOutcome->value.present); + return; + } + }/* End of switch(successfulOutcome) */ + break; + } default: - { - DU_LOG("\nERROR --> F1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present); - return; - } + { + DU_LOG("\nERROR --> F1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present); + return; + } }/* End of switch(f1apMsg->present) */ } /* End of F1APMsgHdlr */