From: lal.harshita Date: Fri, 9 Jul 2021 12:30:25 +0000 (+0530) Subject: Added Call flow debug print for all the layer X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=5f70467d3aff8403461316ea6a7522934c1c5ecd;p=o-du%2Fl2.git Added Call flow debug print for all the layer Change-Id: I658d3d21dabe9c004ff19a83c53fbed24ab344a3 Signed-off-by: lal.harshita (cherry picked from commit a71383f67779dcf9d67d15bf47949c7df9b5ddbb) --- diff --git a/build/odu/makefile b/build/odu/makefile index f47838813..193760dae 100644 --- a/build/odu/makefile +++ b/build/odu/makefile @@ -74,7 +74,7 @@ endif # macro for output file name and makefile name # -PLTFRM_FLAGS= -UMSPD -DODU -DINTEL_FAPI #-DODU_MEMORY_DEBUG_LOG #-DODU_SLOT_IND_DEBUG_LOG -DEGTP_TEST +PLTFRM_FLAGS= -UMSPD -DODU -DINTEL_FAPI #-DCALL_FLOW_DEBUG_LOG #-DODU_MEMORY_DEBUG_LOG #-DODU_SLOT_IND_DEBUG_LOG -DEGTP_TEST ifeq ($(MODE),TDD) PLTFRM_FLAGS += -DNR_TDD diff --git a/src/5gnrmac/lwr_mac_ex_ms.c b/src/5gnrmac/lwr_mac_ex_ms.c index 91fb52ca7..abf31e35f 100644 --- a/src/5gnrmac/lwr_mac_ex_ms.c +++ b/src/5gnrmac/lwr_mac_ex_ms.c @@ -55,6 +55,84 @@ uint8_t lwrMacActvInit(Ent entity, Inst inst, Region region, Reason reason) return ROK; } +/************************************************************************** +* @brief function prints src, dest, msg info about all the msgs received +* +* @details +* +* Function : callFlowlwrMacActvTsk +* +* Functionality: +* function prints src, dest, msg info about all the msgs received +* +* @param[in] Pst *pst +* +* @return void +***************************************************************************/ + +void callFlowlwrMacActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="ENTLWRMAC"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTLWRMAC: + { + strcpy(sourceTask,"ENTLWRMAC"); + switch(pst->event) + { +#ifdef INTEL_WLS_MEM + case EVT_START_WLS_RCVR: + { + strcpy(message,"EVT_START_WLS_RCVR"); + break; + } +#endif + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + +#ifndef INTEL_WLS_MEM + case ENTPHYSTUB: + { + strcpy(sourceTask,"PHY"); + switch(pst->event) + { + case EVT_PHY_STUB_SLOT_IND: + { + strcpy(message,"EVT_PHY_STUB_SLOT_IND"); + break; + } + + case EVT_PHY_STUB_STOP_IND: + { + strcpy(message,"EVT_PHY_STUB_STOP_IND"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } +#endif + + default: + { + strcpy(sourceTask,"Invalid Source Entity Id"); + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} /************************************************************************** * @brief Task Activation callback function. * @@ -79,6 +157,10 @@ uint8_t lwrMacActvTsk(Pst *pst, Buffer *mBuf) { uint8_t ret = ROK; +#ifdef CALL_FLOW_DEBUG_LOG + callFlowlwrMacActvTsk(pst); +#endif + switch(pst->srcEnt) { case ENTLWRMAC: diff --git a/src/5gnrmac/lwr_mac_fsm.c b/src/5gnrmac/lwr_mac_fsm.c index ffef57551..2627533e1 100644 --- a/src/5gnrmac/lwr_mac_fsm.c +++ b/src/5gnrmac/lwr_mac_fsm.c @@ -98,6 +98,9 @@ void lwrMacLayerInit(Region region, Pool pool) * ****************************************************************/ uint8_t lwr_mac_procInvalidEvt(void *msg) { +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : INVALID_EVENT\n"); +#endif DU_LOG("\nERROR --> LWR_MAC: Error Indication Event[%d] received in state [%d]", lwrMacCb.event, lwrMacCb.phyState); return ROK; } @@ -1325,6 +1328,10 @@ void setMibPdu(uint8_t *mibPdu, uint32_t *val, uint16_t sfn) uint8_t lwr_mac_procParamReqEvt(void *msg) { #ifdef INTEL_FAPI +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : PARAM_REQ\n"); +#endif + /* startGuardTimer(); */ fapi_param_req_t *paramReq = NULL; fapi_msg_header_t *msgHeader; @@ -1987,6 +1994,9 @@ uint8_t lwr_mac_procIqSamplesReqEvt(void *msg) uint8_t lwr_mac_procConfigReqEvt(void *msg) { #ifdef INTEL_FAPI +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : CONFIG_REQ\n"); +#endif #ifdef NR_TDD uint8_t slotIdx = 0; uint8_t symbolIdx =0; @@ -2279,6 +2289,9 @@ uint8_t lwr_mac_procConfigRspEvt(void *msg) uint8_t lwr_mac_procStartReqEvt(void *msg) { #ifdef INTEL_FAPI +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : START_REQ\n"); +#endif fapi_msg_header_t *msgHeader; fapi_start_req_t *startReq; fapi_vendor_msg_t *vendorMsg; @@ -2361,6 +2374,10 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) uint8_t lwr_mac_procStopReqEvt(SlotIndInfo slotInfo, p_fapi_api_queue_elem_t prevElem) { #ifdef INTEL_FAPI +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : STOP_REQ\n"); +#endif + fapi_stop_req_t *stopReq; fapi_vendor_msg_t *vendorMsg; p_fapi_api_queue_elem_t stopReqElem; @@ -3326,6 +3343,10 @@ uint8_t fillDlMsgTxDataReq(fapi_tx_pdu_desc_t *pduDesc, uint16_t pduIndex, DlMsg * ****************************************************************/ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) { +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : DL_TTI_REQUEST\n"); +#endif + #ifdef INTEL_FAPI uint8_t idx =0; uint8_t nPdu = 0; @@ -3570,6 +3591,10 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo, p_fapi_api_queue_elem_t prevElem) { #ifdef INTEL_FAPI +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : TX_DATA_REQ\n"); +#endif + uint8_t nPdu = 0; uint16_t cellIdx; uint16_t pduIndex = 0; @@ -3918,6 +3943,10 @@ void fillPucchPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, MacCellCfg *macCellCfg,\ ******************************************************************/ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo, p_fapi_api_queue_elem_t prevElem) { +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : UL_TTI_REQUEST\n"); +#endif + #ifdef INTEL_FAPI uint16_t cellIdx =0; uint8_t pduIdx = -1; @@ -4013,6 +4042,9 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo, p_fapi_api_queue_elem_t prevEl ******************************************************************/ void fillUlDciPdu(fapi_dl_dci_t *ulDciPtr, DciInfo *schDciInfo) { +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTLWRMAC : UL_DCI_REQUEST\n"); +#endif if(ulDciPtr != NULLP) { uint8_t numBytes =0; diff --git a/src/5gnrmac/lwr_mac_handle_phy.c b/src/5gnrmac/lwr_mac_handle_phy.c index 7e9d54e89..e58d203cc 100644 --- a/src/5gnrmac/lwr_mac_handle_phy.c +++ b/src/5gnrmac/lwr_mac_handle_phy.c @@ -477,6 +477,63 @@ uint8_t procUciInd(fapi_uci_indication_t *fapiUciInd) } #endif /* FAPI */ +/******************************************************************* + * @brief Function prints src, dest, msg infor about all the msgs that + received. + * + * @details + * + * Function :callFlowFromPhyToLwrMac + * + * Function call Flow From Phy To LwrMac + * + * @param[in] Pst *pst, Post structure of the primitive. + * + * @return void + * ****************************************************************/ +void callFlowFromPhyToLwrMac(uint16_t msgId) +{ + char message[100]; + switch(msgId) + { +#ifdef INTEL_TIMER_MODE + case FAPI_VENDOR_EXT_UL_IQ_SAMPLES: + strcpy(message,"FAPI_VENDOR_EXT_UL_IQ_SAMPLES"); + break; +#endif + case FAPI_PARAM_RESPONSE: + strcpy(message,"FAPI_PARAM_RESPONSE"); + break; + case FAPI_CONFIG_RESPONSE: + strcpy(message,"FAPI_CONFIG_RESPONSE"); + break; + case FAPI_SLOT_INDICATION: + strcpy(message,"FAPI_SLOT_INDICATION"); + break; + case FAPI_ERROR_INDICATION: + strcpy(message,"FAPI_ERROR_INDICATION"); + break; + case FAPI_RX_DATA_INDICATION: + strcpy(message,"FAPI_RX_DATA_INDICATION"); + break; + case FAPI_CRC_INDICATION: + strcpy(message,"FAPI_CRC_INDICATION"); + break; + case FAPI_UCI_INDICATION: + strcpy(message,"FAPI_UCI_INDICATION"); + break; + case FAPI_SRS_INDICATION: + strcpy(message,"FAPI_SRS_INDICATION"); + break; + case FAPI_RACH_INDICATION: + strcpy(message,"FAPI_RACH_INDICATION"); + break; + case FAPI_STOP_INDICATION: + strcpy(message,"FAPI_STOP_INDICATION"); + break; + } + DU_LOG("\nCall Flow: PHY -> ENTLWRMAC : %s\n",message); +} /******************************************************************* * * @brief Processes message from PHY @@ -499,6 +556,9 @@ void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg) fapi_msg_t *header = NULLP; header = (fapi_msg_t *)msg; +#ifdef CALL_FLOW_DEBUG_LOG + callFlowFromPhyToLwrMac(header->msg_id); +#endif switch(header->msg_id) { #ifdef INTEL_TIMER_MODE diff --git a/src/5gnrmac/lwr_mac_phy.c b/src/5gnrmac/lwr_mac_phy.c index 4d22edae4..ac87d0b42 100644 --- a/src/5gnrmac/lwr_mac_phy.c +++ b/src/5gnrmac/lwr_mac_phy.c @@ -272,8 +272,49 @@ uint8_t LwrMacSendToL1(void *msg) uint8_t ret = ROK; #ifdef INTEL_FAPI uint16_t msgLen =0; + char message[100]; p_fapi_api_queue_elem_t currMsg = NULLP; +#ifdef CALL_FLOW_DEBUG_LOG + currMsg = (p_fapi_api_queue_elem_t)msg; + while(currMsg) + { + switch(currMsg->msg_type) + { + case FAPI_PARAM_REQUEST: + strcpy(message, "FAPI_PARAM_REQUEST"); + break; + case FAPI_CONFIG_REQUEST: + strcpy(message, "FAPI_CONFIG_REQUEST"); + break; + case FAPI_START_REQUEST: + strcpy(message, "FAPI_START_REQUEST"); + break; + case FAPI_DL_TTI_REQUEST: + strcpy(message, "FAPI_DL_TTI_REQUEST"); + break; + case FAPI_TX_DATA_REQUEST: + strcpy(message, "FAPI_TX_DATA_REQUEST"); + break; + case FAPI_UL_TTI_REQUEST: + strcpy(message, "FAPI_UL_TTI_REQUEST"); + break; + case FAPI_STOP_REQUEST: + strcpy(message, "FAPI_STOP_REQUEST"); + break; + case FAPI_UL_DCI_REQUEST: + strcpy(message, "FAPI_UL_DCI_REQUEST"); + break; + default: + strcpy(message, "INVALID_MSG"); + break; + } + DU_LOG("\nCall Flow: ENTLWRMAC -> PHY : %s\n",message); + currMsg = currMsg->p_next; + } +#endif + + #ifdef INTEL_WLS_MEM void * wlsHdlr = NULLP; diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 3fa2e9364..2524a00a7 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -367,6 +367,10 @@ uint8_t MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm) { uint16_t *cellId = NULLP; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_SCH_CELL_CFG_CFM\n"); +#endif + if(schCellCfgCfm->rsp == RSP_OK) { cellId = &schCellCfgCfm->cellId; @@ -469,6 +473,10 @@ uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp) uint8_t ret = ROK; uint16_t cellIdx=0; CellDeleteStatus status; + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_CELL_DELETE_RSP_TO_MAC\n"); +#endif if(schCellDelRsp) { diff --git a/src/5gnrmac/mac_msg_router.c b/src/5gnrmac/mac_msg_router.c index edb663985..e08afddb5 100755 --- a/src/5gnrmac/mac_msg_router.c +++ b/src/5gnrmac/mac_msg_router.c @@ -391,8 +391,221 @@ Buffer *mBuf /* message buffer */ } } +/** +* @brief Function prints src, dest, msg infor about all the msgs that received. +* +* @details +* +* Function : callFlowRgActvTsk +* +* Function prints src, dest, msg infor about all the msgs that received +* +* @param[in] Pst *pst, Post structure of the primitive. +* +* @return void +**/ + +void callFlowRgActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="ENTMAC"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTDUAPP: + { + strcpy(sourceTask,"ENTDUAPP"); + switch(pst->event) + { +#ifdef LCRGMILRG + case EVTLRGCFGREQ: + strcpy(message,"EVTLRGCFGREQ"); + break; + case EVTMACSCHGENCFGREQ: + strcpy(message,"EVTMACSCHGENCFGREQ"); + break; + case EVTLRGCNTRLREQ: + strcpy(message,"EVTLRGCNTRLREQ"); + break; + case EVTLRGSSTAREQ: + strcpy(message,"EVTLRGSSTAREQ"); + break; + case EVTLRGSTSREQ: + strcpy(message,"EVTLRGSTSREQ"); + break; +#endif /* LCRGMILRG */ + case EVENT_MAC_CELL_CONFIG_REQ: + strcpy(message,"EVENT_MAC_CELL_CONFIG_REQ"); + break; + case EVENT_MAC_CELL_START: + strcpy(message,"EVENT_MAC_CELL_START"); + break; + case EVENT_MAC_CELL_STOP: + strcpy(message,"EVENT_MAC_CELL_STOP"); + break; + case EVENT_MAC_DL_CCCH_IND: + strcpy(message,"EVENT_MAC_DL_CCCH_IND"); + break; + case EVENT_MAC_UE_CREATE_REQ: + strcpy(message,"EVENT_MAC_UE_CREATE_REQ"); + break; + case EVENT_MAC_UE_RECONFIG_REQ: + strcpy(message,"EVENT_MAC_UE_RECONFIG_REQ"); + break; + case EVENT_MAC_UE_DELETE_REQ: + strcpy(message,"EVENT_MAC_UE_DELETE_REQ"); + break; + case EVENT_MAC_CELL_DELETE_REQ: + strcpy(message,"EVENT_MAC_CELL_DELETE_REQ"); + break; + default: + strcpy(message,"Invalid Event"); + break; + } + break; + } + case ENTRLC: + { + strcpy(sourceTask,"ENTRLC"); + switch(pst->event) + { +#ifdef LCRGUIRGU + case EVTRGUBNDREQ: + strcpy(message,"EVTRGUBNDREQ"); + break; + case EVTRGUUBNDREQ: + strcpy(message,"EVTRGUUBNDREQ"); + break; + case EVENT_DL_DATA_TO_MAC: + strcpy(message,"EVENT_DL_DATA_TO_MAC"); + break; + case EVENT_BO_STATUS_TO_MAC: + strcpy(message,"EVENT_BO_STATUS_TO_MAC"); + break; +#endif + default: + strcpy(message,"Invalid Event"); + break; + } + + break; + } + case ENTLWRMAC: + { + strcpy(sourceTask,"ENTLWRMAC"); + switch(pst->event) + { + case EVENT_SLOT_IND_TO_MAC: + strcpy(message,"EVENT_SLOT_IND_TO_MAC"); + break; + case EVENT_STOP_IND_TO_MAC: + strcpy(message,"EVENT_STOP_IND_TO_MAC"); + break; + case EVENT_RACH_IND_TO_MAC: + strcpy(message,"EVENT_RACH_IND_TO_MAC"); + break; + case EVENT_CRC_IND_TO_MAC: + strcpy(message,"EVENT_CRC_IND_TO_MAC"); + break; + case EVENT_RX_DATA_IND_TO_MAC: + strcpy(message,"EVENT_RX_DATA_IND_TO_MAC"); + break; + case EVENT_UCI_IND_TO_MAC: + strcpy(message,"EVENT_UCI_IND_TO_MAC"); + break; + default: + strcpy(message,"Invalid Event"); + break; + } + + break; + } + case ENTMAC: /* When scheduler instance sends msg to MAC */ + { + strcpy(sourceTask,"ENTMAC"); + switch(pst->event) + { +#ifdef LCRG + case EVTINFCELLREGREQ: + strcpy(message,"EVTINFCELLREGREQ"); + break; + case EVTINFSFALLOCREQ: + strcpy(message,"EVTINFSFALLOCREQ"); + break; + case EVTINFRLSHQREQ: + strcpy(message,"EVTINFRLSHQREQ"); + break; + case EVTINFHQENTRESET: + strcpy(message,"EVTINFHQENTRESET"); + break; + case EVTINFRLSRNTIREQ: + strcpy(message,"EVTINFRLSRNTIREQ"); + break; +#ifdef LTEMAC_SPS + case EVTINFSPSLCREG: + strcpy(message,"EVTINFSPSLCREG"); + break; + case EVTINFSPSLCDEREG: + strcpy(message,"EVTINFSPSLCDEREG"); + break; + case EVTINFSPSRESET: + strcpy(message,"EVTINFSPSRESET"); + break; +#endif /* LTEMAC_SPS */ + case EVTINFLCGREG: + strcpy(message,"EVTINFLCGREG"); + break; +#endif +#if defined(LTE_ADV) && defined(LCPRG) + case EVTPRGUESCELLCFGREQ: + strcpy(message,"EVTPRGUESCELLCFGREQ"); + break; + case EVTPRGUESCELLCFGCFM: + strcpy(message,"EVTPRGUESCELLCFGCFM"); + break; + case EVTPRGUESCELLLCHMODCFM: + strcpy(message,"EVTPRGUESCELLLCHMODCFM"); + break; + case EVTPRGUESCELLLCHDELCFMDEL: + strcpy(message,"EVTPRGUESCELLLCHDELCFMDEL"); + break; + case EVTPRGUESCELLLCHADDCFM: + strcpy(message,"EVTPRGUESCELLLCHADDCFM"); + break; + case EVTPRGUESCELLDELREQ: + strcpy(message,"EVTPRGUESCELLDELREQ"); + break; + case EVTPRGUESCELLLCHMODREQ: + strcpy(message,"EVTPRGUESCELLLCHMODREQ"); + break; + case EVTPRGUESCELLLCHDELREQ: + strcpy(message,"EVTPRGUESCELLLCHDELREQ"); + break; + case EVTPRGUESCELLLCHADDREQ: + strcpy(message,"EVTPRGUESCELLLCHADDREQ"); + break; + +#endif + default: + strcpy(message,"Invalid Event"); + break; + } + break; + } + + default: + { + strcpy(sourceTask,"Invalid Source Entity Id"); + break; + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} +/********************************************************************** + /** * @brief Task Activation callback function. * @@ -417,6 +630,11 @@ Pst *pst, /* post structure */ Buffer *mBuf /* message buffer */ ) { + +#ifdef CALL_FLOW_DEBUG_LOG + callFlowRgActvTsk(pst); +#endif + switch(pst->srcEnt) { /* The originator of this message is the stack manager, diff --git a/src/5gnrmac/mac_rach.c b/src/5gnrmac/mac_rach.c index 968055938..306913c69 100644 --- a/src/5gnrmac/mac_rach.c +++ b/src/5gnrmac/mac_rach.c @@ -127,6 +127,10 @@ uint8_t MacProcUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo) { uint16_t cellIdx; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_UL_SCH_INFO\n"); +#endif + GET_CELL_IDX(ulSchedInfo->cellId, cellIdx); if(ulSchedInfo != NULLP) { diff --git a/src/5gnrmac/mac_slot_ind.c b/src/5gnrmac/mac_slot_ind.c index 27088ed02..c763b2473 100644 --- a/src/5gnrmac/mac_slot_ind.c +++ b/src/5gnrmac/mac_slot_ind.c @@ -57,6 +57,9 @@ uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo) uint16_t cellIdx; MacDlSlot *currDlSlot = NULLP; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_DL_SCH_INFO\n"); +#endif if(dlSchedInfo != NULLP) { GET_CELL_IDX(dlSchedInfo->cellId, cellIdx); diff --git a/src/5gnrmac/mac_ue_mgr.c b/src/5gnrmac/mac_ue_mgr.c index 357d5ec81..cb2867331 100644 --- a/src/5gnrmac/mac_ue_mgr.c +++ b/src/5gnrmac/mac_ue_mgr.c @@ -2298,6 +2298,21 @@ uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *schCfgRsp) uint16_t cellIdx; MacUeCfg *ueCfg = NULLP; +#ifdef CALL_FLOW_DEBUG_LOG + switch(pst->event) + { + case EVENT_UE_CONFIG_RSP_TO_MAC: + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_UE_CONFIG_RSP_TO_MAC\n"); + break; + case EVENT_UE_RECONFIG_RSP_TO_MAC: + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_UE_RECONFIG_RSP_TO_MAC\n"); + break; + default: + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : Invalid Event\n"); + break; + } +#endif + GET_CELL_IDX(schCfgRsp->cellId, cellIdx); ueCfg = getMacUeCfg(cellIdx, schCfgRsp->ueIdx); if(ueCfg == NULLP) @@ -2309,55 +2324,54 @@ uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *schCfgRsp) switch(pst->event) { case EVENT_UE_CONFIG_RSP_TO_MAC: - { - if(schCfgRsp->rsp != RSP_NOK) - { - DU_LOG("\nINFO --> MAC: SCH UeConfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()", schCfgRsp->crnti); - if(ret == ROK) - { - ret = procMacUeCfgData(pst, ueCfg); - if(ret == ROK) - { - result = MAC_DU_APP_RSP_OK; + { + if(schCfgRsp->rsp != RSP_NOK) + { + DU_LOG("\nINFO --> MAC: SCH UeConfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()", schCfgRsp->crnti); + if(ret == ROK) + { + ret = procMacUeCfgData(pst, ueCfg); + if(ret == ROK) + { + result = MAC_DU_APP_RSP_OK; + } } - } - } - else - { - DU_LOG("\nERROR --> MAC: SCH UeConfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti); - } - ret = MacSendUeCreateRsp(result, schCfgRsp); - } - break; + } + else + { + DU_LOG("\nERROR --> MAC: SCH UeConfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti); + } + ret = MacSendUeCreateRsp(result, schCfgRsp); + } + break; case EVENT_UE_RECONFIG_RSP_TO_MAC: - { - if(schCfgRsp->rsp != RSP_NOK) - { - DU_LOG("\nINFO --> MAC: SCH UeReconfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()", schCfgRsp->crnti); - if(ret == ROK) - { - ret = procMacUeCfgData(pst, ueCfg); - if(ret == ROK) - { - result = MAC_DU_APP_RSP_OK; + { + + if(schCfgRsp->rsp != RSP_NOK) + { + DU_LOG("\nINFO --> MAC: SCH UeReconfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()",\ + schCfgRsp->crnti); + if(ret == ROK) + { + ret = procMacUeCfgData(pst, ueCfg); + if(ret == ROK) + { + result = MAC_DU_APP_RSP_OK; + } } - } - } - else - { - DU_LOG("\nERROR --> MAC: SCH UeReconfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti); - } - ret = MacSendUeReconfigRsp(result, schCfgRsp); - } - break; - - default: - break; + } + else + { + DU_LOG("\nERROR --> MAC: SCH UeReconfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()",\ + schCfgRsp->crnti); + } + ret = MacSendUeReconfigRsp(result, schCfgRsp); + } + break; } MAC_FREE(ueCfg, sizeof(MacUeCfg)); ueCfg = NULLP; - return ret; } @@ -2534,6 +2548,10 @@ uint8_t MacProcSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *schUeDelRsp) uint16_t cellIdx=0; uint8_t ret = RFAILED; UeDeleteStatus result; + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_UE_DELETE_RSP_TO_MAC\n"); +#endif if(schUeDelRsp) { diff --git a/src/5gnrrlc/rlc_dl_msg_router.c b/src/5gnrrlc/rlc_dl_msg_router.c index 258e2e678..f68e037e2 100755 --- a/src/5gnrrlc/rlc_dl_msg_router.c +++ b/src/5gnrrlc/rlc_dl_msg_router.c @@ -188,6 +188,186 @@ Reason reason /* reason */ return ROK; } /* kwActvInit */ +/* +* +* @brief +* +* Function: +* name : callFlowRlcDlActvTsk +* +* @b Description: +* Function used to print values of src, dest, message +* received at the layer +* +* @param[in] pst - Pst Structure +* +* @return void +*/ +void callFlowRlcDlActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="ENTMAC"; + char message[100]; + switch(pst->srcEnt) + { + case ENTDUAPP: + { + strcpy(sourceTask,"ENTDUAPP"); + switch(pst->event) + { +#ifdef LCLKW + case LKW_EVT_CFG_REQ: + { + strcpy(message,"LKW_EVT_CFG_REQ"); + break; + } + + case LKW_EVT_CNTRL_REQ: + { + strcpy(message,"LKW_EVT_CNTRL_REQ"); + break; + } + + case LKW_EVT_STS_REQ: + { + strcpy(message,"LKW_EVT_STS_REQ"); + break; + } + + case LKW_EVT_STA_REQ: + { + strcpy(message,"LKW_EVT_STA_REQ"); + break; + } + /* kw005.201 added support for L2 Measurement */ +#endif /* LCLKW */ + +#ifdef LCKWU + case KWU_EVT_DAT_REQ: /* Data request */ + { + strcpy(message,"KWU_EVT_DAT_REQ"); + break; + } +#endif /* LCKWU */ + + case EVENT_DL_RRC_MSG_TRANS_TO_RLC: + { + strcpy(message,"EVENT_DL_RRC_MSG_TRANS_TO_RLC"); + break; + } + case EVENT_DL_USER_DATA_TRANS_TO_RLC: + { + strcpy(message,"EVENT_DL_USER_DATA_TRANS_TO_RLC"); + break; + } + default: + strcpy(message,"Invalid Event"); + break; + } + break; + } + + case ENTRLC: + { + + strcpy(sourceTask,"ENTRLC"); + switch(pst->event) + { +#ifdef LCUDX + case UDX_EVT_BND_REQ: /* Bind request */ + { + strcpy(message,"UDX_EVT_BND_REQ"); + break; + } + + case UDX_EVT_UBND_REQ: /* Bind request */ + { + strcpy(message,"UDX_EVT_UBND_REQ"); + break; + } + case UDX_EVT_CFG_REQ: /* Unbind request */ + { + strcpy(message,"UDX_EVT_CFG_REQ"); + break; + } + + case UDX_EVT_UEIDCHG_REQ: /* Configuration request */ + { + strcpy(message,"UDX_EVT_UEIDCHG_REQ"); + break; + } + + case UDX_EVT_STA_UPD_REQ: /* Configuration request */ + { + strcpy(message,"UDX_EVT_STA_UPD_REQ"); + break; + } + + case UDX_EVT_STA_PDU_REQ: /* Configuration request */ + { + strcpy(message,"UDX_EVT_STA_PDU_REQ"); + break; + } + +#endif /* LCCKW */ + case UDX_EVT_DL_CLEANUP_MEM: + { + strcpy(message,"UDX_EVT_DL_CLEANUP_MEM"); + break; + } + + default: + strcpy(message,"Invalid Event"); + break; + + } + break; + } + + case ENTMAC: + { + strcpy(sourceTask,"ENTMAC"); + switch(pst->event) + { +#ifdef LCRGU + case EVTRGUBNDCFM: /* Bind request */ + { + strcpy(message,"EVTRGUBNDCFM"); + break; + } + case EVENT_SCHED_RESULT_TO_RLC: + { + strcpy(message,"EVENT_SCHED_RESULT_TO_RLC"); + break; + } + /* kw005.201 added support for L2 Measurement */ + case EVTRGUFLOWCNTRLIND: + { + strcpy(message,"EVTRGUFLOWCNTRLIND"); + break; + } +#endif /* LCRGU */ +#ifdef RLC_STA_PROC_IN_MAC/* RLC Status PDU Processing */ + case UDX_EVT_STA_UPD_REQ: /* Configuration request */ + { + strcpy(message,"UDX_EVT_STA_UPD_REQ"); + break; + } +#endif + default: + strcpy(message,"Invalid Event"); + break; + + } + break; + } + default: + { + strcpy(sourceTask,"Invalid Source Entity Id"); + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} /** * @@ -221,6 +401,10 @@ Buffer *mBuf /* message buffer */ gRlcTId = pthread_self(); #endif +#ifdef CALL_FLOW_DEBUG_LOG + callFlowRlcDlActvTsk(pst); +#endif + switch(pst->srcEnt) { case ENTDUAPP: diff --git a/src/5gnrrlc/rlc_ul_msg_router.c b/src/5gnrrlc/rlc_ul_msg_router.c index e7da9421a..24b55b76d 100755 --- a/src/5gnrrlc/rlc_ul_msg_router.c +++ b/src/5gnrrlc/rlc_ul_msg_router.c @@ -167,6 +167,162 @@ Reason reason /* reason */ return ROK; } /* rlcUlActvInit */ +/* +* @brief +* +* Function: +* name : callFlowRlcUlActvTsk +* +* @b Description: +* Function used to print values of src, dest, message +* received at the layer +* +* @param[in] pst - Pst Structure +* +* @return void +*/ + +void callFlowRlcUlActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="ENTRLCUL"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTDUAPP: + { + strcpy(sourceTask,"ENTDUAPP"); + switch(pst->event) + { +#ifdef LCLKW + case LKW_EVT_CFG_REQ: + { + strcpy(message,"LKW_EVT_CFG_REQ"); + break; + } + + case LKW_EVT_CNTRL_REQ: + { + strcpy(message,"LKW_EVT_CNTRL_REQ"); + break; + } + + case EVENT_RLC_UE_CREATE_REQ: /* UE Create Request */ + { + strcpy(message,"EVENT_RLC_UE_CREATE_REQ"); + break; + } + case EVENT_RLC_UE_RECONFIG_REQ: /* UE Reconfig Request */ + { + strcpy(message,"EVENT_RLC_UE_RECONFIG_REQ"); + break; + } + case EVENT_RLC_UE_DELETE_REQ: + { + strcpy(message,"EVENT_RLC_UE_DELETE_REQ"); + break; + } + + case LKW_EVT_STS_REQ: + { + strcpy(message,"LKW_EVT_STS_REQ"); + break; + } + + case LKW_EVT_STA_REQ: + { + strcpy(message,"LKW_EVT_STA_REQ"); + break; + } + /* kw005.201 added support for L2 Measurement */ +#endif /* LCLKW */ + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + + case ENTRLC: + { + strcpy(sourceTask,"ENTRLC"); + switch(pst->event) + { +#ifdef LCUDX + case UDX_EVT_BND_CFM: /* Bind request */ + { + strcpy(message,"UDX_EVT_BND_CFM"); + break; + } + + case UDX_EVT_CFG_CFM: /* Unbind request */ + { + strcpy(message,"UDX_EVT_CFG_CFM"); + break; + } + + case UDX_EVT_UEIDCHG_CFM: /* Configuration request */ + { + strcpy(message,"UDX_EVT_UEIDCHG_CFM"); + break; + } + + case UDX_EVT_STA_PHBT_TMR_START: /* Status Prohibit Timer Start */ + { + strcpy(message,"UDX_EVT_STA_PHBT_TMR_START"); + break; + } + +#endif /* LCCKW */ + + default: + strcpy(message,"Invalid Event"); + break; + + } + break; + } + + case ENTMAC: + { + strcpy(sourceTask,"ENTMAC"); + switch(pst->event) + { +#ifdef LCRGU + case EVTRGUBNDCFM: /* Bind request */ + { + strcpy(message,"EVTRGUBNDCFM"); + break; + } + + case EVENT_UL_DATA_TO_RLC: /* UL Data request */ + { + strcpy(message,"EVENT_UL_DATA_TO_RLC"); + break; + } + +#endif /* LCRGU */ + + default: + strcpy(message,"Invalid Event"); + break; + } + break; + } + default: + { + strcpy(sourceTask,"Invalid Source Entity Id"); + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); + +} + + + /** * @@ -193,6 +349,9 @@ Buffer *mBuf /* message buffer */ { S16 ret = ROK; +#ifdef CALL_FLOW_DEBUG_LOG + callFlowRlcUlActvTsk(pst); +#endif switch(pst->srcEnt) { diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index 257c5855f..63a0ec862 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -198,6 +198,10 @@ uint8_t SchProcGenCfgReq(Pst *pst, RgMngmt *cfg) RgMngmt cfm; Pst cfmPst; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : GENERAL_CFG_REQ\n"); +#endif + if(pst->dstInst < SCH_INST_START) { DU_LOG("\nERROR --> SCH : Invalid inst ID"); @@ -264,6 +268,10 @@ uint8_t MacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) { Inst inst = pst->dstInst-SCH_INST_START; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_SLOT_IND_TO_SCH\n"); +#endif + schProcessSlotInd(slotInd, inst); return ROK; @@ -288,6 +296,11 @@ uint8_t MacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) uint8_t MacSchRachInd(Pst *pst, RachIndInfo *rachInd) { Inst inst = pst->dstInst-SCH_INST_START; + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_RACH_IND_TO_SCH\n"); +#endif + DU_LOG("\nINFO --> SCH : Received Rach indication"); schProcessRachInd(rachInd, inst); return ROK; @@ -312,6 +325,10 @@ uint8_t MacSchRachInd(Pst *pst, RachIndInfo *rachInd) * ****************************************************************/ uint8_t MacSchCrcInd(Pst *pst, CrcIndInfo *crcInd) { +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_CRC_IND_TO_SCH\n"); +#endif + switch(crcInd->crcInd[0]) { case CRC_FAILED: @@ -841,6 +858,10 @@ uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg) Pst rspPst; Inst inst = pst->dstInst-1; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_SCH_CELL_CFG\n"); +#endif + schInitCellCb(inst, schCellCfg); cellCb = schCb[inst].cells[inst]; //cells is of MAX_CELLS, why inst cellCb->macInst = pst->srcInst; @@ -864,7 +885,6 @@ uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg) schCellCfgCfm.rsp = RSP_OK; ret = (*SchCellCfgCfmOpts[rspPst.selector])(&rspPst, &schCellCfgCfm); - return ret; } @@ -896,8 +916,12 @@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) SchUeCb *ueCb = NULLP; SchCellCb *cell = NULLP; SchDlSlotInfo *schDlSlotInfo = NULLP; - Inst inst = pst->dstInst-SCH_INST_START; + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_DL_RLC_BO_INFO_TO_SCH\n"); +#endif + DU_LOG("\nDEBUG --> SCH : Received RLC BO Status indication"); cell = schCb[inst].cells[inst]; @@ -992,6 +1016,10 @@ uint8_t MacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd) SchUeCb *ueCb = NULLP; uint8_t lcgIdx; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_SHORT_BSR\n"); +#endif + DU_LOG("\nDEBUG --> SCH : Received BSR"); cellCb = schCb[schInst].cells[schInst]; ueCb = schGetUeCb(cellCb, bsrInd->crnti); @@ -1029,6 +1057,10 @@ uint8_t MacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd) SchUeCb *ueCb; SchCellCb *cellCb = schCb[inst].cells[inst]; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_UCI_IND_TO_SCH\n"); +#endif + DU_LOG("\nDEBUG --> SCH : Received SR"); ueCb = schGetUeCb(cellCb, uciInd->crnti); diff --git a/src/5gnrsch/sch_msg_router.c b/src/5gnrsch/sch_msg_router.c index 83d36242f..f5723e2de 100755 --- a/src/5gnrsch/sch_msg_router.c +++ b/src/5gnrsch/sch_msg_router.c @@ -53,8 +53,74 @@ registered with SSI during the LTE MAC Task initialization. #include "rg_sch.x" /* typedefs for Scheduler */ #include "mac_sch_interface.h" +/* +* @brief +* +* Function: +* name : callFlowSchActvTsk +* +* @b Description: +* Function used to print values of src, dest, message +* received at the layer +* +* @param[in] pst - Pst Structure +* +* @return void +*/ + +void callFlowSchActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="ENTSCH"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTMAC: /* When MAC sends a msg to Scheduler instance */ + { + strcpy(sourceTask,"ENTMAC"); + switch(pst->event) + { +#ifdef LCSCH + case EVTINFDEDBOUPDTREQ: + strcpy(message,"EVTINFDEDBOUPDTREQ"); + break; + case EVTINFCMNBOUPDTREQ: + strcpy(message,"EVTINFCMNBOUPDTREQ"); + break; + case EVTINFSFRECPIND: + strcpy(message,"EVTINFSFRECPIND"); + break; + /*Fix: start: Inform UE delete to scheduler*/ + case EVTINFUEDELIND: + strcpy(message,"EVTINFUEDELIND"); + break; + /*Fix: end: Inform UE delete to scheduler*/ +#ifdef LTE_L2_MEAS + case EVTINFL2MEASCFM: + strcpy(message,"EVTINFL2MEASCFM"); + break; + case EVTINFL2MEASSTOPCFM: + strcpy(message,"EVTINFL2MEASSTOPCFM"); + break; +#endif +#endif + case EVENT_SLOT_IND_TO_SCH: + strcpy(message,"EVENT_SLOT_IND_TO_SCH"); + break; + default: + strcpy(message,"Invalid Event"); + break; + } + break; + } + default: + strcpy(sourceTask,"Invalid Source Entity Id"); + break; + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} - /** * @brief Task Activation callback function. * @@ -79,6 +145,11 @@ Pst *pst, /* post structure */ Buffer *mBuf /* message buffer */ ) { + +#ifdef CALL_FLOW_DEBUG_LOG + callFlowSchActvTsk(pst); +#endif + switch(pst->srcEnt) { /* The originator of this message is the stack manager, diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 6d8b7daa2..2b1bf5702 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -73,7 +73,7 @@ uint8_t sendDlAllocToMac(DlSchedInfo *dlSchedInfo, Inst inst) memset(&pst, 0, sizeof(Pst)); FILL_PST_SCH_TO_MAC(pst, inst); - pst.event = EVENT_DL_ALLOC; + pst.event = EVENT_DL_SCH_INFO; return(*schMacDlAllocOpts[pst.selector])(&pst, dlSchedInfo); diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index 0250da432..e2ce9f9d4 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -357,6 +357,10 @@ uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfg) SchUeCfgRsp cfgRsp; Inst inst = pst->dstInst - 1; memset(&cfgRsp, 0, sizeof(SchUeCfgRsp)); + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_ADD_UE_CONFIG_REQ_TO_SCH\n"); +#endif if(!ueCfg) { @@ -595,6 +599,10 @@ uint8_t MacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfg) SchUeCfgRsp cfgRsp; Inst inst = pst->dstInst - 1; memset(&cfgRsp, 0, sizeof(SchUeCfgRsp)); + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH\n"); +#endif if(!ueCfg) { @@ -824,7 +832,11 @@ uint8_t MacSchUeDeleteReq(Pst *pst, SchUeDelete *ueDelete) ErrorCause result; SchCellCb *cellCb = NULLP; Inst inst = pst->dstInst - 1; - + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_UE_DELETE_REQ_TO_SCH\n"); +#endif + if(!ueDelete) { DU_LOG("\nERROR --> SCH : MacSchUeDeleteReq(): Ue Delete request failed"); @@ -972,6 +984,10 @@ uint8_t MacSchCellDeleteReq(Pst *pst, SchCellDelete *cellDelete) uint8_t cellIdx=0, ret = RFAILED; Inst inst = pst->dstInst - 1; SchMacRsp result= RSP_OK; + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_CELL_DELETE_REQ_TO_SCH\n"); +#endif if(!cellDelete) { diff --git a/src/cm/mac_sch_interface.h b/src/cm/mac_sch_interface.h index 4fa5e7bce..85da85c40 100644 --- a/src/cm/mac_sch_interface.h +++ b/src/cm/mac_sch_interface.h @@ -19,7 +19,7 @@ /* events */ #define EVENT_SCH_CELL_CFG 1 #define EVENT_SCH_CELL_CFG_CFM 2 -#define EVENT_DL_ALLOC 3 +#define EVENT_DL_SCH_INFO 3 #define EVENT_UL_SCH_INFO 4 #define EVENT_RACH_IND_TO_SCH 5 #define EVENT_CRC_IND_TO_SCH 6 diff --git a/src/du_app/du_egtp.c b/src/du_app/du_egtp.c index 3b7799622..b895aa296 100644 --- a/src/du_app/du_egtp.c +++ b/src/du_app/du_egtp.c @@ -63,6 +63,102 @@ uint8_t egtpActvInit(Ent entity, Inst inst, Region region, Reason reason) return ROK; } +/************************************************************************** +* @brief Function prints the src dest and msg reached to egtp. +* +* @details +* +* Function : callFlowEgtpActvTsk +* +* Functionality: +* Function prints the src dest and msg reached to egtp. +* +* @param[in] Pst *pst, Post structure of the primitive. +* +* @return void +* +***************************************************************************/ + +void callFlowEgtpActvTsk(Pst *pst) +{ + + char sourceTask[50]; + char destTask[50]="ENTEGTP"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTDUAPP: + { + strcpy(sourceTask,"ENTDUAPP"); + switch(pst->event) + { + case EVTCFGREQ: + { + strcpy(message,"EVTCFGREQ"); + break; + } + case EVTSRVOPENREQ: + { + strcpy(message,"EVTSRVOPENREQ"); + break; + } + case EVTTNLMGMTREQ: + { + strcpy(message,"EVTTNLMGMTREQ"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + case ENTEGTP: + { + strcpy(sourceTask,"ENTEGTP"); + switch(pst->event) + { + case EVTSTARTPOLL: + { + strcpy(message,"EVTSTARTPOLL"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + case ENTRLC: + { + strcpy(sourceTask,"ENTRLC"); + switch(pst->event) + { + case EVTDATIND: + { + strcpy(message,"EVTDATIND"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + default: + { + strcpy(sourceTask,"Invalid Source Entity Id"); + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} /************************************************************************** * @brief Task Activation callback function. @@ -86,6 +182,10 @@ uint8_t egtpActvInit(Ent entity, Inst inst, Region region, Reason reason) uint8_t egtpActvTsk(Pst *pst, Buffer *mBuf) { uint8_t ret = ROK; + +#ifdef CALL_FLOW_DEBUG_LOG + callFlowEgtpActvTsk(pst); +#endif switch(pst->srcEnt) { @@ -377,6 +477,10 @@ uint8_t egtpTnlMgmtReq(Pst *pst, EgtpTnlEvt tnlEvt) { uint8_t ret = ROK; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTDUAPP -> ENTEGTP : TNL_MGMT\n"); +#endif + DU_LOG("\nDEBUG --> EGTP : Received tunnel management request"); switch(tnlEvt.action) { @@ -566,6 +670,10 @@ uint8_t egtpHdlDatInd(EgtpMsg egtpMsg) uint32_t msgLen; EgtpMsgHdr *msgHdr; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTDUAPP -> ENTEGTP : DATA_INDICATION\n"); +#endif + DU_LOG("\nDEBUG --> EGTP : Received Data Indication"); cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(egtpMsg.msgHdr.teId), sizeof(uint32_t), 0, (PTR *)&teidCb); diff --git a/src/du_app/du_mgr_msg_router.c b/src/du_app/du_mgr_msg_router.c index 8f0391a8b..6241229d1 100644 --- a/src/du_app/du_mgr_msg_router.c +++ b/src/du_app/du_mgr_msg_router.c @@ -103,6 +103,250 @@ uint8_t duActvInit(Ent entity, Inst inst, Region region, Reason reason) } +/************************************************************************** +* @brief Function prints the src dest and msg reached to egtp. +* +* @details +* +* Function : callFlowduActvTsk +* +* Functionality: +* Function prints the src dest and msg reached to egtp. +* +* @param[in] Pst *pst, Post structure of the primitive. +* +* @return void +* ++***************************************************************************/ + +void callFlowduActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="ENTDUAPP"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTDUAPP: + { + strcpy(sourceTask,"ENTDUAPP"); + switch(pst->event) + { + case EVTCFG: + { + strcpy(message,"EVTCFG"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + + break; + } + case ENTRLC: + { + strcpy(sourceTask,"ENTRLC"); + switch(pst->event) + { + case LKW_EVT_CFG_CFM: + { + strcpy(message,"LKW_EVT_CFG_CFM"); + break; + } + case LKW_EVT_CNTRL_CFM: + { + strcpy(message,"LKW_EVT_CNTRL_CFM"); + break; + } + case LKW_EVT_STA_IND: + { + strcpy(message,"LKW_EVT_STA_IND"); + break; + } + case EVENT_RLC_UE_CREATE_RSP: + { + strcpy(message,"EVENT_RLC_UE_CREATE_RSP"); + break; + } + case EVENT_RLC_UE_RECONFIG_RSP: + { + strcpy(message,"EVENT_RLC_UE_RECONFIG_RSP"); + break; + } + case EVENT_RLC_UE_DELETE_RSP: + { + strcpy(message,"EVENT_RLC_UE_DELETE_RSP"); + break; + } + case EVENT_UL_RRC_MSG_TRANS_TO_DU: + { + strcpy(message,"EVENT_UL_RRC_MSG_TRANS_TO_DU"); + break; + } + case EVENT_RRC_DELIVERY_MSG_TRANS_TO_DU: + { + strcpy(message,"EVENT_RRC_DELIVERY_MSG_TRANS_TO_DU"); + break; + } + case EVENT_DL_RRC_MSG_RSP_TO_DU: + { + strcpy(message,"EVENT_DL_RRC_MSG_RSP_TO_DU"); + break; + } + case EVENT_UL_USER_DATA_TRANS_TO_DU: + { + strcpy(message,"EVENT_UL_USER_DATA_TRANS_TO_DU"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + } + } + break; + } + case ENTMAC: + { + strcpy(sourceTask,"ENTMAC"); + switch(pst->event) + { + case EVTCFG: + { + strcpy(message,"EVTCFG"); + break; + } + case EVTLRGCFGCFM: + { + strcpy(message,"EVTLRGCFGCFM"); + break; + } + case EVTLRGCNTRLCFM: + { + strcpy(message,"EVTLRGCNTRLCFM"); + break; + } + case EVTMACSCHGENCFGCFM: + { + strcpy(message,"EVTMACSCHGENCFGCFM"); + break; + } + case EVENT_MAC_CELL_CONFIG_CFM: + { + strcpy(message,"EVENT_MAC_CELL_CONFIG_CFM"); + break; + } + case EVENT_MAC_CELL_UP_IND: + { + strcpy(message,"EVENT_MAC_CELL_UP_IND"); + break; + } + case EVENT_MAC_STOP_IND: + { + strcpy(message,"EVENT_MAC_STOP_IND"); + break; + } + case EVENT_MAC_UL_CCCH_IND: + { + strcpy(message,"EVENT_MAC_UL_CCCH_IND"); + break; + } + case EVENT_MAC_UE_CREATE_RSP: + { + strcpy(message,"EVENT_MAC_UE_CREATE_RSP"); + break; + } + case EVENT_MAC_UE_RECONFIG_RSP: + { + strcpy(message,"EVENT_MAC_UE_RECONFIG_RSP"); + break; + } + case EVENT_MAC_UE_DELETE_RSP: + { + strcpy(message,"EVENT_MAC_UE_DELETE_RSP"); + break; + } + case EVENT_MAC_CELL_DELETE_RSP: + { + strcpy(message,"EVENT_MAC_CELL_DELETE_RSP"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + + break; + } + case ENTSCTP: + { + strcpy(sourceTask,"ENTSCTP"); + switch(pst->event) + { + case EVENT_CU_DATA: + { + strcpy(message,"EVENT_CU_DATA"); + break; + } + case EVENT_SCTP_NTFY: + { + strcpy(message,"EVENT_SCTP_NTFY"); + break; + } + case EVENT_RIC_DATA: + { + strcpy(message,"EVENT_RIC_DATA"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + + } + break; + } + case ENTEGTP: + { + strcpy(sourceTask,"ENTEGTP"); + switch(pst->event) + { + case EVTCFGCFM: + { + strcpy(message,"EVTCFGCFM"); + break; + } + case EVTSRVOPENCFM: + { + strcpy(message,"EVTSRVOPENCFM"); + break; + } + case EVTTNLMGMTCFM: + { + strcpy(message,"EVTTNLMGMTCFM"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + default: + { + strcpy(sourceTask,"Invalid Source Entity Id"); + break; + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} /************************************************************************** * @brief Task Activation callback function. * @@ -126,6 +370,10 @@ uint8_t duActvInit(Ent entity, Inst inst, Region region, Reason reason) uint8_t duActvTsk(Pst *pst, Buffer *mBuf) { uint8_t ret = ROK; + +#ifdef CALL_FLOW_DEBUG_LOG + callFlowduActvTsk(pst); +#endif switch(pst->srcEnt) { diff --git a/src/du_app/du_sctp.c b/src/du_app/du_sctp.c index 92734a5ee..96f7adab1 100644 --- a/src/du_app/du_sctp.c +++ b/src/du_app/du_sctp.c @@ -65,6 +65,44 @@ uint8_t sctpActvInit(Ent entity, Inst inst, Region region, Reason reason) } +/************************************************************************** +* @brief Function prints src, dest, msg infor about all the msgs that received. +* +* @details +* +* Function : callFlowSctpActvTsk +* +* Function prints src, dest, msg infor about all the msgs that received +* +* @param[in] Pst *pst, Post structure of the primitive. +* +* @return void +***************************************************************************/ +uint8_t callFlowSctpActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="ENTSCTP"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTDUAPP: + { + strcpy(sourceTask,"ENTDUAPP"); + switch(pst->event) + { + case EVTSTARTPOLL: + { + strcpy(message,"EVTSTARTPOLL"); + break; + } + } + break; + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} + /************************************************************************** * @brief Task Activation callback function. * @@ -86,6 +124,12 @@ uint8_t sctpActvInit(Ent entity, Inst inst, Region region, Reason reason) ***************************************************************************/ uint8_t sctpActvTsk(Pst *pst, Buffer *mBuf) { + +#ifdef CALL_FLOW_DEBUG_LOG + callFlowSctpActvTsk(pst); +#endif + + switch(pst->srcEnt) { case ENTDUAPP: @@ -155,6 +199,9 @@ uint8_t duSctpCfgReq(SctpParams sctpCfg) uint8_t ret = ROK; CmStatus cfm; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTDUAPP -> ENTSCTP : EVENT_CFG_REQ_TO_SCTP\n"); +#endif /* Fill F1 Params */ f1Params.destIpAddr.ipV4Pres = sctpCfg.cuIpAddr.ipV4Pres; f1Params.destIpAddr.ipV4Addr = sctpCfg.cuIpAddr.ipV4Addr; @@ -339,6 +386,10 @@ uint8_t duSctpAssocReq(uint8_t itfType) CmStatus cfm; DuSctpDestCb *paramPtr = NULLP; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTDUAPP -> ENTSCTP : EVENT_ASSOC_REQ_TO_SCTP\n"); +#endif + DU_ALLOC(paramPtr, sizeof(DuSctpDestCb)); if(paramPtr == NULLP) { @@ -640,6 +691,12 @@ uint8_t processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32 } else { +#ifdef CALL_FLOW_DEBUG_LOG + if(pollParams->port == f1Params.destPort) + DU_LOG("\nCall Flow: CU -> ENTSCTP : EVENT_SCTP_MSG\n"); + else + DU_LOG("\nCall Flow: RIC -> ENTSCTP : EVENT_SCTP_MSG\n"); +#endif if((((pollParams->flag & CM_INET_SCTP_MSG_NOTIFICATION) != 0)) && ret == ROK) { if(pollParams->port == f1Params.destPort) @@ -770,16 +827,33 @@ uint8_t sctpSend(Buffer *mBuf, uint8_t itfType) memInfo.region = DU_APP_MEM_REGION; memInfo.pool = DU_POOL; + +#ifdef CALL_FLOW_DEBUG_LOG + if(itfType == F1_INTERFACE) + { + DU_LOG("\nCall Flow: ENTDUAPP -> ENTSCTP : EVENT_F1AP_MSG_TO_SCTP\n"); + } + else + { + DU_LOG("\nCall Flow: ENTDUAPP -> ENTSCTP : EVENT_E2AP_MSG_TO_SCTP\n"); + } +#endif if(itfType == F1_INTERFACE) { - DU_LOG("\nDEBUG --> SCTP : sending the message to DuApp"); + DU_LOG("\nDEBUG --> SCTP : sending the message to CU"); +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCTP -> CU : EVENT_F1AP_MSG_TO_CU\n"); +#endif ret = cmInetSctpSendMsg(&f1Params.sockFd, &f1Params.destIpNetAddr, f1Params.destPort, &memInfo, mBuf, &len, 0, FALSE, 0, 0/*SCT_PROTID_NONE*/, RWOULDBLOCK); } if(itfType == E2_INTERFACE) { DU_LOG("\nDEBUG --> SCTP : sending the message to ric"); +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCTP -> RIC : EVENT_E2AP_MSG_TO_RIC\n"); +#endif ret = cmInetSctpSendMsg(&ricParams.sockFd, &ricParams.destIpNetAddr, ricParams.destPort, &memInfo, mBuf, &len, 0, FALSE, 0, 0/*SCT_PROTID_NONE*/, RWOULDBLOCK); } diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index 16ade9f80..39569c923 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -214,6 +214,11 @@ uint8_t duBuildAndSendDlUserDataToRlc(uint16_t msgLen, EgtpMsg *egtpMsg) uint8_t duHdlEgtpDlData(EgtpMsg *egtpMsg) { uint16_t msgLen = 0; + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTEGTP -> ENTDUAPP : EVENT_HDL_RECV_DL_DATA\n"); +#endif + DU_LOG("\nDEBUG --> DU_APP : Processing DL data in duHdlEgtpDlData()"); if(!egtpMsg->msg) diff --git a/src/phy_stub/phy_stub_ex_ms.c b/src/phy_stub/phy_stub_ex_ms.c index 4bbdbe1e2..387326c17 100644 --- a/src/phy_stub/phy_stub_ex_ms.c +++ b/src/phy_stub/phy_stub_ex_ms.c @@ -49,7 +49,50 @@ uint8_t phyStubActvInit(Ent ent, Inst inst, Region reg, Reason reason) return ROK; } +/************************************************************************** +* @brief Function prints the src dest and msg reached to egtp. +* +* @details +* +* Function : callFlowPhyStubActvTsk +* +* Functionality: +* Function prints the src dest and msg reached to egtp. +* +* @param[in] Pst *pst, Post structure of the primitive. +* +* @return void +* +***************************************************************************/ + +void callFlowPhyStubActvTsk(Pst *pst) +{ + char sourceTask[50]; + char destTask[50]="PHY"; + char message[100]; + switch(pst->srcEnt) + { + case ENTPHYSTUB: + { + strcpy(sourceTask,"PHY"); + switch(pst->event) + { + case EVT_PHY_START_SLOT_IND: + { + strcpy(message,"EVT_PHY_START_SLOT_IND"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} /******************************************************************* * * @brief Receives messages for Phy stub slot indication generator task @@ -69,6 +112,11 @@ uint8_t phyStubActvInit(Ent ent, Inst inst, Region reg, Reason reason) uint8_t phyStubActvTsk(Pst *pst, Buffer *mBuf) { DU_LOG("\nPHY_STUB: Received Event [%d]", pst->event); + +#ifdef CALL_FLOW_DEBUG_LOG + callFlowPhyStubActvTsk(pst); +#endif + switch(pst->srcEnt) { case ENTPHYSTUB: