X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_rlc_inf.c;h=2bdcf248a39b538a326800a77534f446e8ae2874;hb=4588074b60b6cd2d5a2c27fb1f0a8114e30b1810;hp=22bcaf95cf65b218f33cc82aa0678a9382f50c38;hpb=788e4f7e2d55fbfa67a986d9b21791aaaa4e4f2a;p=o-du%2Fl2.git diff --git a/src/cm/du_app_rlc_inf.c b/src/cm/du_app_rlc_inf.c index 22bcaf95c..2bdcf248a 100644 --- a/src/cm/du_app_rlc_inf.c +++ b/src/cm/du_app_rlc_inf.c @@ -423,7 +423,7 @@ uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func, Pst *pst, * RFAILED - failure * * ****************************************************************/ -uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg) +uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeRecfg *ueRecfg) { Buffer *mBuf = NULLP; @@ -435,7 +435,7 @@ uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg) return RFAILED; } /* pack the address of the structure */ - CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf); + CMCHKPK(oduPackPointer,(PTR)ueRecfg, mBuf); } else { @@ -467,11 +467,11 @@ uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf) { if(pst->selector == ODU_SELECTOR_LWLC) { - RlcUeCfg *ueCfg; + RlcUeRecfg *ueRecfg; /* unpack the address of the structure */ - CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf); + CMCHKUNPK(oduUnpackPointer, (PTR *)&ueRecfg, mBuf); ODU_PUT_MSG_BUF(mBuf); - return (*func)(pst, ueCfg); + return (*func)(pst, ueRecfg); } else { @@ -859,6 +859,87 @@ uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf) return RFAILED; } +/******************************************************************* +* +* @brief Packs and Sends Slice PM from RLC to DUAPP +* +* @details +* +* Function : packRlcDuSlicePm +* +* Functionality: +* Packs and Sends Slice Performance Metrics from RLC to DUAPP +* +* +* @params[in] Post structure pointer +* SlicePmList *sliceStats +* +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ + +uint8_t packRlcDuSlicePm(Pst *pst, SlicePmList *sliceStats) +{ + Buffer *mBuf = NULLP; + + if(pst->selector == ODU_SELECTOR_LWLC) + { + if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) + { + DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuSlicePm"); + return RFAILED; + } + /* pack the address of the structure */ + CMCHKPK(oduPackPointer,(PTR)sliceStats, mBuf); + } + else + { + DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuSlicePm"); + return RFAILED; + } + + return ODU_POST_TASK(pst,mBuf); +} + +/******************************************************************* +* +* @brief Unpacks Slice PM received from RLC +* +* @details +* +* Function : unpackRlcSlicePm +* +* Functionality: +* Unpacks Slice Performance Metrics received from RLC +* +* @params[in] Pointer to Handler +* Post structure pointer +* Message Buffer +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ + +uint8_t unpackRlcSlicePm(RlcSlicePmToDuFunc func, Pst *pst, Buffer *mBuf) +{ + if(pst->selector == ODU_SELECTOR_LWLC) + { + SlicePmList *sliceStats = NULLP; + /* unpack the address of the structure */ + CMCHKUNPK(oduUnpackPointer, (PTR *)&sliceStats, mBuf); + ODU_PUT_MSG_BUF(mBuf); + return (*func)(pst, sliceStats); + } + else + { + /* Nothing to do for other selectors */ + DU_LOG("\nERROR --> RLC: Only LWLC supported for Slice Metrics "); + ODU_PUT_MSG_BUF(mBuf); + } + + return RFAILED; +} /********************************************************************** End of file ***********************************************************************/