X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch.c;h=fe18fec2efe14a32717edaa854c2bbda69e2f811;hb=ff0c6fbd56fc24b9c286dc6444e1e0fbe8871625;hp=a0ff7760396088e1ff26f609635398b83b18f486;hpb=a5f35b2204dd87ebe347f11282000852b55810ad;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index a0ff77603..fe18fec2e 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -142,9 +142,7 @@ uint8_t SchInstCfg(RgCfg *cfg, Inst dInst) return LCM_REASON_INVALID_MSGTYPE; } /* Update the Pst structure for LM interface */ - memcpy(&schCb[inst].schInit.lmPst, - &cfg->s.schInstCfg.genCfg.lmPst, - sizeof(Pst)); + memcpy(&schCb[inst].schInit.lmPst, &cfg->s.schInstCfg.genCfg.lmPst, sizeof(Pst)); schCb[inst].schInit.inst = inst; schCb[inst].schInit.lmPst.srcProcId = schCb[inst].schInit.procId; @@ -170,8 +168,7 @@ uint8_t SchInstCfg(RgCfg *cfg, Inst dInst) /* SS_MT_TMR needs to be enabled as schActvTmr needs instance information */ /* Timer Registration request to system services */ - if (ODU_REG_TMR_MT(schCb[inst].schInit.ent, dInst, - (int)schCb[inst].genCfg.tmrRes, schActvTmr) != ROK) + if (ODU_REG_TMR_MT(schCb[inst].schInit.ent, dInst, (int)schCb[inst].genCfg.tmrRes, schActvTmr) != ROK) { DU_LOG("\nERROR --> SCH : SchInstCfg(): Failed to " "register timer."); @@ -868,7 +865,7 @@ uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg) SchCellCb *cellCb; SchCellCfgCfm schCellCfgCfm; Pst rspPst; - Inst inst = pst->dstInst-1; + Inst inst = pst->dstInst - SCH_INST_START; uint8_t coreset0Idx = 0; uint8_t numRbs = 0; uint8_t offset = 0; @@ -965,6 +962,12 @@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) GET_UE_ID(dlBoInfo->crnti, ueId); ueCb = &cell->ueCb[ueId-1]; + if(ueCb->ueCfg.dataTransmissionAction == STOP_DATA_TRANSMISSION) + { + DU_LOG("INFO --> SCH : DL Data transmission not allowed for UE %d", ueCb->ueCfg.ueId); + return ROK; + } + lcId = dlBoInfo->lcId; CHECK_LCID(lcId, isLcIdValid); if(isLcIdValid == FALSE) @@ -1000,8 +1003,6 @@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) } else { - /* TODO : These part of changes will be corrected during DL scheduling as - * per K0 - K1 -K2 */ SET_ONE_BIT(ueId, cell->boIndBitMap); if(ueCb->dlInfo.dlLcCtxt[lcId].lcId == lcId) { @@ -1067,6 +1068,12 @@ uint8_t MacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd) return RFAILED; } + if(ueCb->ueCfg.dataTransmissionAction == STOP_DATA_TRANSMISSION) + { + DU_LOG("\nINFO --> SCH: UL Data transmission not allowed for UE %d", ueCb->ueCfg.ueId); + return ROK; + } + ueCb->bsrRcvd = true; /* store dataVolume per lcg in uecb */ for(lcgIdx = 0; lcgIdx < bsrInd->numLcg; lcgIdx++) @@ -1117,7 +1124,11 @@ uint8_t MacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd) DU_LOG("\nERROR --> SCH : Crnti %d is inactive", uciInd->crnti); return ROK; } - + if(ueCb->ueCfg.dataTransmissionAction == STOP_DATA_TRANSMISSION) + { + DU_LOG("\nINFO --> SCH: UL Data transmission not allowed for UE %d", ueCb->ueCfg.ueId); + return ROK; + } if(uciInd->numSrBits) { ueCb->srRcvd = true; @@ -1751,7 +1762,9 @@ uint8_t addSliceCfgInSchDb(SchSliceCfg *storeSliceCfg, SchSliceCfgReq *cfgReq, S return RFAILED; } - memcpy(storeSliceCfg->listOfConfirguration[sliceIdx], cfgReq->listOfConfirguration[sliceIdx], sizeof(SchRrmPolicyOfSlice)); + memcpy(&storeSliceCfg->listOfConfirguration[sliceIdx]->snssai, &cfgReq->listOfConfirguration[sliceIdx]->snssai, sizeof(Snssai)); + memcpy(storeSliceCfg->listOfConfirguration[sliceIdx]->rrmPolicyRatioInfo, cfgReq->listOfConfirguration[sliceIdx]->rrmPolicyRatioInfo, + sizeof(SchRrmPolicyRatio)); sliceIdx++; } } @@ -1818,7 +1831,7 @@ void freeSchSliceCfgReq(SchSliceCfgReq *cfgReq) uint8_t MacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *schSliceCfgReq) { uint8_t count = 0; - Inst inst = pst->dstInst - 1; + Inst inst = pst->dstInst - SCH_INST_START; SchSliceCfgRsp sliceCfgRsp; DU_LOG("\nINFO --> SCH : Received Slice Cfg request from MAC"); @@ -1887,7 +1900,8 @@ uint8_t modifySliceCfgInSchDb(SchSliceCfg *storeSliceCfg, SchSliceCfgReq *cfgReq { if(!memcmp(&storeSliceCfg->listOfConfirguration[sliceIdx]->snssai, &cfgReq->listOfConfirguration[cfgIdx]->snssai, sizeof(Snssai))) { - storeSliceCfg->listOfConfirguration[sliceIdx]->rrmPolicyRatioInfo = cfgReq->listOfConfirguration[cfgIdx]->rrmPolicyRatioInfo; + memcpy(storeSliceCfg->listOfConfirguration[sliceIdx]->rrmPolicyRatioInfo, cfgReq->listOfConfirguration[cfgIdx]->rrmPolicyRatioInfo, + sizeof(SchRrmPolicyRatio)); break; } } @@ -1944,7 +1958,7 @@ void SchSendSliceReCfgRspToMac(Inst inst, SchSliceCfgRsp schSliceReCfgRsp) uint8_t MacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *schSliceReCfgReq) { uint8_t count = 0; - Inst inst = pst->dstInst - 1; + Inst inst = pst->dstInst - SCH_INST_START; SchSliceCfgRsp schSliceReCfgRsp; DU_LOG("\nINFO --> SCH : Received Slice ReCfg request from MAC");