[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-480] WG8 Alignment | Third Phase | RLC-MAC... 68/9968/3
authorlal.harshita <Harshita.Lal@radisys.com>
Tue, 6 Dec 2022 09:13:24 +0000 (14:43 +0530)
committerlal.harshita <Harshita.Lal@radisys.com>
Wed, 7 Dec 2022 06:27:06 +0000 (11:57 +0530)
Change-Id: Iaba92e1c63d6d80edf78e6494487f339ed0ac20d
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
14 files changed:
src/5gnrmac/mac_msg_hdl.c
src/5gnrmac/mac_slot_ind.c
src/5gnrmac/mac_upr_inf_api.c
src/5gnrmac/mac_upr_inf_api.h
src/5gnrrlc/rlc_lwr_inf_api.c
src/5gnrrlc/rlc_lwr_inf_api.h
src/5gnrrlc/rlc_msg_hdl.c
src/5gnrrlc/rlc_tmm_dl.c
src/5gnrrlc/rlc_utl_dl.c
src/cm/du_app_rlc_inf.h
src/cm/rlc_mac_inf.c
src/cm/rlc_mac_inf.h
src/du_app/du_f1ap_msg_hdl.c
src/du_app/du_ue_mgr.c

index 176d311..b369270 100644 (file)
@@ -239,7 +239,7 @@ uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData)
+uint8_t MacProcRlcDlData(Pst* pstInfo, RlcDlData *dlData)
 {
    uint8_t   pduIdx = 0;
    uint8_t   ueId  = 0;
@@ -323,7 +323,7 @@ uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData)
    }
    if(pstInfo->selector == ODU_SELECTOR_LWLC)
    {
-      MAC_FREE_SHRABL_BUF(pstInfo->region, pstInfo->pool, dlData, sizeof(RlcData));
+      MAC_FREE_SHRABL_BUF(pstInfo->region, pstInfo->pool, dlData, sizeof(RlcDlData));
    }
    return ROK;
 }
@@ -352,27 +352,22 @@ uint8_t macProcUlData(uint16_t cellId, uint16_t rnti, SlotTimingInfo slotInfo, \
 uint8_t lcId, uint16_t pduLen, uint8_t *pdu)
 {
    Pst         pst;
-   RlcData     *ulData;
+   RlcUlData     *ulData;
 
    /* Filling RLC Ul Data*/
-   MAC_ALLOC_SHRABL_BUF(ulData, sizeof(RlcData));
+   MAC_ALLOC_SHRABL_BUF(ulData, sizeof(RlcUlData));
    if(!ulData)
    {
       DU_LOG("\nERROR  -->  MAC : Memory allocation failed while sending UL data to RLC");
       return RFAILED;
    }
-   memset(ulData, 0, sizeof(RlcData));
+   memset(ulData, 0, sizeof(RlcUlData));
    ulData->cellId = cellId; 
    ulData->rnti = rnti;
    memcpy(&ulData->slotInfo, &slotInfo, sizeof(SlotTimingInfo));
    ulData->slotInfo.cellId = cellId;
 
    /* Filling pdu info */
-   if(lcId != SRB0_LCID)
-      ulData->pduInfo[ulData->numPdu].commCh = false;
-   else
-      ulData->pduInfo[ulData->numPdu].commCh = true;
-
    ulData->pduInfo[ulData->numPdu].lcId = lcId;
    ulData->pduInfo[ulData->numPdu].pduBuf = pdu;
    ulData->pduInfo[ulData->numPdu].pduLen = pduLen;
@@ -464,7 +459,6 @@ uint8_t sendSchedRptToRlc(DlSchedInfo dlInfo, SlotTimingInfo slotInfo, uint8_t u
       {
          schedRpt->lcSch[lcIdx].lcId = dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].lcSchInfo[lcIdx].lcId;
          schedRpt->lcSch[lcIdx].bufSize = dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].lcSchInfo[lcIdx].schBytes;
-         schedRpt->lcSch[lcIdx].commCh = false;
       }
    }
 
index 7c42b10..466f51b 100644 (file)
@@ -169,7 +169,7 @@ uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo)
                         MAC_ALLOC(txPdu, txPduLen);
                         if(!txPdu)
                         {
-                           DU_LOG("\nERROR  -->  MAC : Memory allocation failed in MacProcRlcDlData");
+                           DU_LOG("\nERROR  -->  MAC : Memory allocation failed in MacProcDlAlloc");
                            return RFAILED;
                         }   
                         memcpy(txPdu, retxTb,  txPduLen);
index 4b1f776..72f816d 100644 (file)
@@ -173,7 +173,7 @@ uint8_t MacDuAppUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t MacSendUlDataToRlc(Pst *pst, RlcData *ulData)
+uint8_t MacSendUlDataToRlc(Pst *pst, RlcUlData *ulData)
 {
    return (*rlcMacSendUlDataOpts[pst->selector])(pst, ulData);
 }
index 1b4d107..6e050fa 100644 (file)
@@ -22,7 +22,7 @@
 uint8_t MacDuAppCellUpInd(Pst *pst, OduCellId *cellId);
 uint8_t MacDuAppStopInd(Pst *pst, OduCellId *cellId);
 uint8_t MacDuAppUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
-uint8_t MacSendUlDataToRlc(Pst *pst, RlcData *ulData);
+uint8_t MacSendUlDataToRlc(Pst *pst, RlcUlData *ulData);
 uint8_t MacSendSchedResultRptToRlc(Pst *pst, RlcSchedResultRpt *schedRpt);
 uint8_t MacDuAppSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
 
index 615f9f3..43052ab 100644 (file)
@@ -75,7 +75,7 @@ uint8_t RlcSendBoStatusToMac(Pst *pst, RlcBoStatus *boSta)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t RlcSendDlDataToMac(Pst *pst, RlcData *dlData)
+uint8_t RlcSendDlDataToMac(Pst *pst, RlcDlData *dlData)
 {
    /* jump to specific primitive depending on configured selector */
    return (*rlcMacSendDlDataOpts[pst->selector])(pst, dlData);
index 1c1be9c..4f45e9b 100644 (file)
@@ -19,7 +19,7 @@
 /* This file stores defines used at RLC lower mac interface */
 
 uint8_t RlcSendBoStatusToMac(Pst *pst, RlcBoStatus *staRsp);
-uint8_t RlcSendDlDataToMac(Pst *pst, RlcData *dlData);
+uint8_t RlcSendDlDataToMac(Pst *pst, RlcDlData *dlData);
 
 /**********************************************************************
          End of file
index d73f833..119ac12 100644 (file)
@@ -401,11 +401,11 @@ uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo)
       return RFAILED;
    }
 
-   datReqInfo->rlcId.rbType = dlRrcMsgInfo->rbType;
-   datReqInfo->rlcId.rbId = dlRrcMsgInfo->rbId;
+   datReqInfo->rlcId.rbType = RB_TYPE_SRB;
+   datReqInfo->rlcId.rbId = dlRrcMsgInfo->lcId;
    datReqInfo->rlcId.ueId = dlRrcMsgInfo->ueId;
    datReqInfo->rlcId.cellId = dlRrcMsgInfo->cellId;
-   datReqInfo->lcType = dlRrcMsgInfo->lcType;
+   datReqInfo->lcType = LCH_DCCH;
    datReqInfo->sduId = ++(rlcCb[pst->dstInst]->dlSduId);
 
    /* Copy fixed buffer to message */
@@ -455,7 +455,7 @@ uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t RlcProcUlData(Pst *pst, RlcData *ulData)
+uint8_t RlcProcUlData(Pst *pst, RlcUlData *ulData)
 {
    uint8_t         ret = ROK;
    uint8_t         idx, pduIdx;
@@ -479,72 +479,39 @@ uint8_t RlcProcUlData(Pst *pst, RlcData *ulData)
     * and call common channel's handler */
    for(idx = 0; idx< ulData->numPdu; idx++)
    {
-      if(ulData->pduInfo[idx].commCh)
+      if(!dLchPduPres)
       {
-         RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, cLchUlDat, \
-               sizeof(RguCDatIndInfo));
-         if(!cLchUlDat)
+         RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
+               sizeof(RguDDatIndInfo));
+         if(!dLchUlDat)
          {
-            DU_LOG("\nERROR  -->  RLC : Memory allocation failed at RlcProcUlData");
-            ret = RFAILED;
-            break;
-         }
-         memset(cLchUlDat, 0, sizeof(RguCDatIndInfo));
-
-         cLchUlDat->cellId = ulData->cellId;
-         GET_UE_ID(ulData->rnti, cLchUlDat->rnti);
-         cLchUlDat->lcId   = ulData->pduInfo[idx].lcId;
-
-         /* Copy fixed buffer to message */
-         if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, &cLchUlDat->pdu) != ROK)
-         {
-            DU_LOG("\nERROR  -->  RLC : Memory allocation failed at RlcProcUlData");
-            RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, cLchUlDat, \
-                  sizeof(RguCDatIndInfo));
+            DU_LOG("\nERROR  -->  RLC : Memory allocation failed at RlcMacProcUlData");
             ret = RFAILED;
             break;
          }
-         oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, cLchUlDat->pdu, \
-               ulData->pduInfo[idx].pduLen);
-
-         rlcProcCommLcUlData(pst, 0, cLchUlDat);
+         dLchPduPres = TRUE;
       }
-      else
+
+      /* Copy fixed buffer to message */
+      lcId = ulData->pduInfo[idx].lcId;
+      if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, \
+               &dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]) != ROK)
       {
-         if(!dLchPduPres)
+         DU_LOG("\nERROR  -->  RLC : Memory allocation failed at RlcMacProcUlData");
+         for(pduIdx=0; pduIdx < dLchData[lcId].pdu.numPdu; pduIdx++)
          {
-            RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
-                  sizeof(RguDDatIndInfo));
-            if(!dLchUlDat)
-            {
-               DU_LOG("\nERROR  -->  RLC : Memory allocation failed at RlcMacProcUlData");
-               ret = RFAILED;
-               break;
-            }
-            dLchPduPres = TRUE;
+            ODU_PUT_MSG_BUF(dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]);
          }
-
-         /* Copy fixed buffer to message */
-         lcId = ulData->pduInfo[idx].lcId;
-         if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, \
-                  &dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]) != ROK)
-         {
-            DU_LOG("\nERROR  -->  RLC : Memory allocation failed at RlcMacProcUlData");
-            for(pduIdx=0; pduIdx < dLchData[lcId].pdu.numPdu; pduIdx++)
-            {
-               ODU_PUT_MSG_BUF(dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]);
-            }
-            RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
-                  sizeof(RguDDatIndInfo));
-            ret = RFAILED;
-            break;
-         }
-         oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, \
-               dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu],\
-               ulData->pduInfo[idx].pduLen);
-
-         dLchData[lcId].pdu.numPdu++;
+         RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
+               sizeof(RguDDatIndInfo));
+         ret = RFAILED;
+         break;
       }
+      oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, \
+            dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu],\
+            ulData->pduInfo[idx].pduLen);
+
+      dLchData[lcId].pdu.numPdu++;
    }
 
    /* If any PDU received on dedicated logical channel, copy into RguDDatIndInfo
@@ -574,7 +541,7 @@ uint8_t RlcProcUlData(Pst *pst, RlcData *ulData)
       RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData->pduInfo[pduIdx].pduBuf, \
             ulData->pduInfo[pduIdx].pduLen);
    }
-   RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData, sizeof(RlcData));
+   RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData, sizeof(RlcUlData));
    return ROK;
 
 }/* End of RlcProcUlData */
@@ -608,64 +575,38 @@ uint8_t RlcProcSchedResultRpt(Pst *pst, RlcSchedResultRpt *schRep)
    DU_LOG("\nDEBUG  -->  RLC : Received scheduling report from MAC");
    for(idx=0; idx < schRep->numLc; idx++)
    {
-      /* If it is common channel, fill status indication information
-       * and trigger the handler for each common lch separately */
-      if(schRep->lcSch[idx].commCh)
+      /* Fill status info structure if at least one channel's scheduling report is received */
+      if(nmbDLch == 0)
       {
-          RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, cLchSchInfo, \
-            sizeof(RguCStaIndInfo));
-         if(!cLchSchInfo)
-         {
-            DU_LOG("\nERROR  -->  RLC: RlcProcSchedResultRpt: Memory allocation failed for cLchSchInfo");
-            ret = RFAILED;
-            break;
-         }
-          memset(cLchSchInfo, 0, sizeof(RguCStaIndInfo));
-
-          cLchSchInfo->cellId  = schRep->cellId;
-          cLchSchInfo->lcId    = schRep->lcSch[idx].lcId;
-          cLchSchInfo->transId = schRep->slotInfo.sfn;
-         cLchSchInfo->transId = (cLchSchInfo->transId << 16) | schRep->slotInfo.slot;
-          cLchSchInfo->rnti = schRep->rnti;
-          rlcProcCommLcSchedRpt(pst, 0, cLchSchInfo);
+         RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, dLchSchInfo, \
+               sizeof(RguDStaIndInfo));
+         if(!dLchSchInfo)
+         {
+            DU_LOG("\nERROR  -->  RLC: RlcProcSchedResultRpt: Memory allocation failed for dLchSchInfo");
+            ret = RFAILED;
+            break;
+         }
 
+         dLchSchInfo->cellId = schRep->cellId;
+         dLchSchInfo->nmbOfUeGrantPerTti = 1;
+         /* MAC sends Scheduling report for one UE at a time. Hence filling
+            only the 0th index of staInd */
+         dLchSchInfo->staInd[0].rnti = schRep->rnti;
+
+         /* Storing sfn/slot into a single 32-bit variable to be used later*/
+         dLchSchInfo->staInd[0].transId = schRep->slotInfo.sfn;
+         dLchSchInfo->staInd[0].transId = \
+                                          (dLchSchInfo->staInd[0].transId << 16) | schRep->slotInfo.slot; 
+         dLchSchInfo->staInd[0].nmbOfTbs = 1;
+         dLchSchInfo->staInd[0].fillCtrlPdu = true; 
       }
-      else
-      {
-          /* Fill status info structure if at least one dedicated channel
-           * scheduling report is received */
-          if(nmbDLch == 0)
-          {
-             RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, dLchSchInfo, \
-               sizeof(RguDStaIndInfo));
-             if(!dLchSchInfo)
-             {
-                DU_LOG("\nERROR  -->  RLC: RlcProcSchedResultRpt: Memory allocation failed for dLchSchInfo");
-                ret = RFAILED;
-                break;
-             }
-
-             dLchSchInfo->cellId = schRep->cellId;
-             dLchSchInfo->nmbOfUeGrantPerTti = 1;
-            /* MAC sends Scheduling report for one UE at a time. Hence filling
-            only the 0th index of staInd */
-             dLchSchInfo->staInd[0].rnti = schRep->rnti;
-
-            /* Storing sfn/slot into a single 32-bit variable to be used later*/
-            dLchSchInfo->staInd[0].transId = schRep->slotInfo.sfn;
-            dLchSchInfo->staInd[0].transId = \
-               (dLchSchInfo->staInd[0].transId << 16) | schRep->slotInfo.slot; 
-             dLchSchInfo->staInd[0].nmbOfTbs = 1;
-             dLchSchInfo->staInd[0].fillCtrlPdu = true; 
-          }
-
-          /* Fill logical channel scheduling info */
-         dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].lcId = \
-            schRep->lcSch[idx].lcId;
-         dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].totBufSize = \
-            schRep->lcSch[idx].bufSize;
-          nmbDLch++;
-      }
+
+      /* Fill logical channel scheduling info */
+      dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].lcId = \
+                                                                   schRep->lcSch[idx].lcId;
+      dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].totBufSize = \
+                                                                         schRep->lcSch[idx].bufSize;
+      nmbDLch++;
    }
 
    /* Calling handler for all dedicated channels scheduling*/
index b492472..fa9d101 100755 (executable)
@@ -156,7 +156,7 @@ void rlcTmmSendToMac(RlcCb *gCb, SuId suId, RlcDlRbCb *rbCb, RguCStaIndInfo *sta
    Pst              pst;
    CmLList          *node;          /* Current Link List Node */
    RlcSdu           *sdu;           /* SDU */
-   RlcData          *dlData;
+   RlcDlData        *dlData;
    uint16_t         pduLen;
    uint16_t         copyLen;
    int16_t          timeDiff = 0;
@@ -288,7 +288,7 @@ void rlcTmmSendToMac(RlcCb *gCb, SuId suId, RlcDlRbCb *rbCb, RguCStaIndInfo *sta
    sdu = (RlcSdu *)node->node;
 
     RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
-                        dlData,(Size)sizeof(RlcData));
+                        dlData,(Size)sizeof(RlcDlData));
 #if (ERRCLASS & ERRCLS_ADD_RES)
    if ( dlData == NULLP )
    {
@@ -303,7 +303,6 @@ void rlcTmmSendToMac(RlcCb *gCb, SuId suId, RlcDlRbCb *rbCb, RguCStaIndInfo *sta
    dlData->cellId = rbCb->rlcId.cellId;
    dlData->rnti = sdu->mode.tm.rnti;
    dlData->numPdu = 1;
-   dlData->pduInfo[0].commCh = TRUE;
    dlData->pduInfo[0].lcId = rbCb->lch.lChId;
 
    /* Copy Message to fixed buffer to send */
@@ -343,7 +342,7 @@ void rlcTmmSendToMac(RlcCb *gCb, SuId suId, RlcDlRbCb *rbCb, RguCStaIndInfo *sta
    {
       RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[0].pduBuf, \
          dlData->pduInfo[0].pduLen);
-      RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+      RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcDlData));
    } 
 
    return;
@@ -414,7 +413,6 @@ static void rlcTmmSendBoSta(RlcCb *gCb, RlcDlRbCb *rbCb, MsgLen bo, RlcDatReqInf
 
    boStatus->cellId = rbCb->rlcId.cellId;
    boStatus->ueId = rbCb->rlcId.ueId;
-   boStatus->commCh = TRUE;
    boStatus->lcId = rbCb->lch.lChId;
    boStatus->bo = bo;
 
index 877e471..4547d32 100755 (executable)
@@ -224,7 +224,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
    RguDDatReqPerUe  datPerUe;             /* DL data info per UE */
    RguDatReqTb      datPerTb;             /* DL data info per TB */
    RguLchDatReq     datPerLch;            /* DL data info per Lch */
-   RlcData          *dlData = NULLP;      /* DL data to be sent to MAC */
+   RlcDlData        *dlData = NULLP;      /* DL data to be sent to MAC */
    RlcDlRrcMsgRsp   *dlRrcMsgRsp = NULLP; /*DL RRC Rsp to be sent to DU*/
    Pst              pst;                  /* Post structure */
    uint16_t         pduLen;               /* PDU length */
@@ -234,7 +234,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
    uint8_t          ret = ROK;
 
    RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
-         dlData, sizeof(RlcData));
+         dlData, sizeof(RlcDlData));
    if(dlData == NULLP)
    {
       DU_LOG("\nERROR  -->  RLC_DL : rlcSendDedLcDlData: Memory allocation failed for dl data");
@@ -242,7 +242,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             datReqInfo, sizeof(RguDDatReqInfo));
       return RFAILED;
    }
-   memset(dlData, 0, sizeof(RlcData));
+   memset(dlData, 0, sizeof(RlcDlData));
 
    for(ueIdx = 0; ueIdx < datReqInfo->nmbOfUeGrantPerTti; ueIdx++)
    {
@@ -265,7 +265,6 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             lcId = datPerLch.lcId;
             for(pduIdx = 0; pduIdx < datPerLch.pdu.numPdu; pduIdx++)
             {
-               dlData->pduInfo[dlData->numPdu].commCh = FALSE;
                dlData->pduInfo[dlData->numPdu].lcId = datPerLch.lcId;
 
                /* Copy Message to fixed buffer to send */
@@ -282,7 +281,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
                            dlData->pduInfo[pduIdx].pduLen);
                   }
                   RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
-                        dlData, sizeof(RlcData));
+                        dlData, sizeof(RlcDlData));
                   RLC_FREE_SHRABL_BUF(post->region, post->pool,
                         datReqInfo, sizeof(RguDDatReqInfo));
                   return RFAILED;
@@ -299,7 +298,6 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             }/* For per PDU */
             dlData->boStatus[dlData->numLc].cellId = datReqInfo->cellId;
             GET_UE_ID(datPerUe.rnti, dlData->boStatus[dlData->numLc].ueId);
-            dlData->boStatus[dlData->numLc].commCh = false;
             dlData->boStatus[dlData->numLc].lcId = datPerLch.lcId;
             dlData->boStatus[dlData->numLc].bo = datPerLch.boReport.bo + datPerLch.boReport.estRlcHdrSz;
             dlData->numLc++;
@@ -321,7 +319,6 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             }
             boStatus->cellId = dlData->cellId;
             GET_UE_ID(dlData->rnti, boStatus->ueId);
-            boStatus->commCh = FALSE; 
             boStatus->lcId = dlData->boStatus[lchIdx].lcId;
             boStatus->bo = dlData->boStatus[lchIdx].bo;
 
@@ -337,7 +334,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             DU_LOG("\nDEBUG  -->  RLC_DL : rlcSendDedLcDlData: BO Status sent successfully for LCID:%d,BO:%d",\
                   boStatus->lcId, boStatus->bo);
          }
-         RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, dlData, sizeof(RlcData));
+         RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, dlData, sizeof(RlcDlData));
          RLC_FREE_SHRABL_BUF(post->region, post->pool, datReqInfo, sizeof(RguDDatReqInfo));
          return (ret);
       }
@@ -351,7 +348,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[pduIdx].pduBuf,\
                   dlData->pduInfo[pduIdx].pduLen);
          }
-         RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+         RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcDlData));
          RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
                datReqInfo, sizeof(RguDDatReqInfo));
          return RFAILED;
@@ -370,7 +367,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[pduIdx].pduBuf,\
                   dlData->pduInfo[pduIdx].pduLen);
          }
-         RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+         RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcDlData));
          RLC_FREE_SHRABL_BUF(post->region, post->pool, datReqInfo, sizeof(RguDDatReqInfo));
          RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlRrcMsgRsp, sizeof(RlcDlRrcMsgRsp));
          return RFAILED;
@@ -705,7 +702,6 @@ uint8_t rlcUtlSendDedLcBoStatus(RlcCb *gCb, RlcDlRbCb *rbCb, int32_t bo, \
 
    boStatus->cellId = rbCb->rlcId.cellId;
    boStatus->ueId = rbCb->rlcId.ueId;
-   boStatus->commCh = FALSE; 
    boStatus->lcId = rbCb->lch.lChId;
    boStatus->bo = bo + estHdrSz;
 
index debc8b0..593e5a1 100644 (file)
@@ -253,10 +253,7 @@ typedef struct dlRrcMsgInfo
 {
    uint16_t   cellId;         /* Cell Id */
    uint16_t   ueId;           /* UE Id */
-   RlcRbType  rbType;         /* Radio Bearer Type */
-   uint8_t    rbId;           /* Radio Bearer Id */
-   uint8_t    lcType;         /* Logical channel type */
-   uint8_t    lcId;           /* Logical channel Id */
+   uint8_t    lcId;           /* Logical channel Id {1...3} */
    bool       execDup;        /* Execution duplication enabled */
    bool       deliveryStaRpt;  /* Reporting of delivery status by RLC to DU-APP enabled */
    uint16_t   msgLen;         /* RRC Message length */
@@ -311,7 +308,7 @@ typedef struct dlDataMsgInfo
 {
    uint16_t   cellId;         /* Cell Id */
    uint16_t   ueId;           /* UE Id */
-   uint8_t    rbId;           /* Radio Bearer Id */
+   uint8_t    rbId;           /* Radio Bearer Id {4 .. MAC\7fX_NUM_DRB} */
    uint16_t   msgLen;         /* Message length */
    Buffer     *dlMsg;         /* DL Data */
 }RlcDlUserDataInfo;
index b792976..c4610b8 100644 (file)
@@ -171,7 +171,7 @@ uint8_t unpackSchedResultRpt(RlcMacSchedResultRptFunc func, Pst *pst, Buffer *mB
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t packRlcDlData(Pst* pst, RlcData *dlData)
+uint8_t packRlcDlData(Pst* pst, RlcDlData *dlData)
 {
    Buffer *mBuf = NULLP;
 
@@ -210,7 +210,7 @@ uint8_t packRlcDlData(Pst* pst, RlcData *dlData)
  * ****************************************************************/
 uint8_t unpackRlcDlData(RlcMacDlDataFunc func, Pst *pst, Buffer *mBuf)
 {
-   RlcData *dlData;
+   RlcDlData *dlData;
 
    if (pst->selector == ODU_SELECTOR_LWLC)
    {
@@ -239,7 +239,7 @@ uint8_t unpackRlcDlData(RlcMacDlDataFunc func, Pst *pst, Buffer *mBuf)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t packRlcUlData(Pst* pst, RlcData *ulData)
+uint8_t packRlcUlData(Pst* pst, RlcUlData *ulData)
 {
    Buffer *mBuf = NULLP;
  
@@ -279,7 +279,7 @@ uint8_t packRlcUlData(Pst* pst, RlcData *ulData)
  * ****************************************************************/
 uint8_t unpackRlcUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf)
 {
-   RlcData *ulData;
+   RlcUlData *ulData;
  
    if (pst->selector == ODU_SELECTOR_LWLC)
    {
index dd9db9f..4a39a5b 100644 (file)
@@ -35,7 +35,6 @@ typedef struct rlcBoStatus
 {
    uint16_t   cellId;     /*!< CELL ID */
    uint16_t   ueId;       /*!< UE ID */
-   bool       commCh;     /*!< Common or Dedicated Channel */
    uint8_t    lcId;       /*!< Logical channel ID */
    uint32_t   bo;         /*!< Buffer occupancy reported by RLC */
 }RlcBoStatus;
@@ -43,7 +42,6 @@ typedef struct rlcBoStatus
 /* Scheduled logical channel info */
 typedef struct rlcLcSchInfo
 {
-   bool      commCh;      /* Common or dedicated channel */
    uint8_t   lcId;        /*!< Logical channel ID */
    uint32_t  bufSize;  /*!< Total buffer size in bytes scheduled by MAC */
 }RlcLcSchInfo;
@@ -51,7 +49,6 @@ typedef struct rlcLcSchInfo
 /* Schedule result report */
 typedef struct rlcSchedResultRpt
 {
-   //Slot info
    SlotTimingInfo slotInfo;     /*!< Timing info */
    uint16_t       cellId;       /*!< CELL ID */
    uint16_t       rnti;         /*!< Temporary CRNTI */
@@ -62,28 +59,36 @@ typedef struct rlcSchedResultRpt
 /* DL/UL data transfer */
 typedef struct rlcPduInfo
 {
-   bool       commCh;   /*!<Common or Dedicated Channel */
    uint8_t    lcId;     /*!< Logical channel ID */
    uint16_t   pduLen;   /*!< PDU Length */
    uint8_t    *pduBuf;  /*!< RLC PDU buffer */
 }RlcPduInfo;
  
-typedef struct rlcData
+typedef struct rlcDlData
 {
-   uint16_t      cellId;       /*!< CELL ID */
-   uint16_t      rnti;         /*!< Temporary CRNTI */
-   SlotTimingInfo   slotInfo;     /*!< Timing info */
-   uint8_t       numPdu;       /*!< Number of RLC PDUs */
-   RlcPduInfo    pduInfo[MAX_NUM_PDU];
-   uint8_t       numLc;
-   RlcBoStatus   boStatus[MAX_NUM_LC];     /*!< Buffer occupancy */
-}RlcData;
+   SlotTimingInfo slotInfo;     /*!< Timing info */
+   uint16_t       cellId;       /*!< CELL ID */
+   uint16_t       rnti;         /*!< Temporary CRNTI */
+   uint8_t        numPdu;       /*!< Number of RLC PDUs */
+   RlcPduInfo     pduInfo[MAX_NUM_PDU];
+   uint8_t        numLc;
+   RlcBoStatus    boStatus[MAX_NUM_LC];     /*!< Buffer occupancy */
+}RlcDlData;
+
+typedef struct rlcUlData
+{
+   SlotTimingInfo slotInfo;     /*!< Timing info */
+   uint16_t       cellId;       /*!< CELL ID */
+   uint16_t       rnti;         /*!< Temporary CRNTI */
+   uint8_t        numPdu;       /*!< Number of RLC PDUs */
+   RlcPduInfo     pduInfo[MAX_NUM_PDU];
+}RlcUlData;
 
 /* Function pointers */
 typedef uint8_t (*RlcMacBoStatusFunc)(Pst* pst, RlcBoStatus  *boStatus);
 typedef uint8_t (*RlcMacSchedResultRptFunc)(Pst *pst, RlcSchedResultRpt *schRpt);
-typedef uint8_t (*RlcMacDlDataFunc)(Pst* pst, RlcData *dlData);
-typedef uint8_t (*RlcMacUlDataFunc)(Pst* pst, RlcData *ulData);
+typedef uint8_t (*RlcMacDlDataFunc)(Pst* pst, RlcDlData *dlData);
+typedef uint8_t (*RlcMacUlDataFunc)(Pst* pst, RlcUlData *ulData);
 
 /* Function declarations */
 uint8_t packRlcBoStatus(Pst* pst, RlcBoStatus*  boStatus);
@@ -92,12 +97,12 @@ uint8_t MacProcRlcBoStatus(Pst* pst, RlcBoStatus* boStatus);
 uint8_t packRlcSchedResultRpt(Pst* pst, RlcSchedResultRpt *schRpt);
 uint8_t unpackSchedResultRpt(RlcMacSchedResultRptFunc func, Pst *pst, Buffer *mBuf);
 uint8_t RlcProcSchedResultRpt(Pst *pst, RlcSchedResultRpt *schRpt);
-uint8_t packRlcDlData(Pst* pst, RlcData *datReq);
+uint8_t packRlcDlData(Pst* pst, RlcDlData *datReq);
 uint8_t unpackRlcDlData(RlcMacDlDataFunc func, Pst *pst, Buffer *mBuf);
-uint8_t MacProcRlcDlData(Pst* pst, RlcData *dlData);
-uint8_t packRlcUlData(Pst* pst, RlcData *ulData);
+uint8_t MacProcRlcDlData(Pst* pst, RlcDlData *dlData);
+uint8_t packRlcUlData(Pst* pst, RlcUlData *ulData);
 uint8_t unpackRlcUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf);
-uint8_t RlcProcUlData(Pst* pst, RlcData *ulData);
+uint8_t RlcProcUlData(Pst* pst, RlcUlData *ulData);
 
 /**********************************************************************
           End of file
index 3445666..1450f92 100644 (file)
@@ -15832,15 +15832,6 @@ uint8_t BuildDrbModList(DRBs_Modified_List_t *drbModList, DuUeCfg *ueCfg)
    uint8_t drbCnt =0;
    struct DRBs_Modified_ItemIEs *drbItemIe;
 
-   /*VS: Below for loop is for debug purpose, to remove in final patch*/
-   for(arrIdx = 0; arrIdx < ueCfg->numDrb; arrIdx++)
-   {
-      if(ueCfg->upTnlInfo[arrIdx].configType == CONFIG_MOD)
-      {
-         drbCnt++; 
-      }
-   }
-
    drbCnt = ueCfg->numDrbModified;
 
    drbModList->list.count = drbCnt;
index d009614..1d56ab3 100644 (file)
@@ -389,15 +389,23 @@ uint8_t duBuildAndSendDlRrcMsgToRlc(uint16_t cellId, RlcUeCfg ueCfg, F1DlRrcMsg
       return RFAILED;
    }
 
+   /*As per Spec ORAN WG8 AAD, lcId for DL RRC range from 1...3*/
+   if((f1DlRrcMsg->srbId < SRB1_LCID) || (f1DlRrcMsg->srbId > SRB3_LCID))
+   {
+      DU_LOG("\nERROR  -->  DU APP : Received SRBID for this Dl RRC Msg is not valid");
+      return RFAILED;
+   }
+
    DU_ALLOC_SHRABL_BUF(dlRrcMsgInfo, sizeof(RlcDlRrcMsgInfo));
+  
    if(!dlRrcMsgInfo)
    {
       DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for dlRrcMsgInfo in \
-         duBuildAndSendDlRrcMsgToRlc");
+            duBuildAndSendDlRrcMsgToRlc");
       DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, f1DlRrcMsg->rrcMsgPdu, f1DlRrcMsg->rrcMsgSize);
       return RFAILED;
    }
-   
+
    /* Filling up the RRC msg info */
    dlRrcMsgInfo->cellId = cellId;
    dlRrcMsgInfo->ueId = ueCfg.ueId;
@@ -405,13 +413,17 @@ uint8_t duBuildAndSendDlRrcMsgToRlc(uint16_t cellId, RlcUeCfg ueCfg, F1DlRrcMsg
    {
       if(ueCfg.rlcLcCfg[lcIdx].lcId == f1DlRrcMsg->srbId)
       {
-         dlRrcMsgInfo->rbType = ueCfg.rlcLcCfg[lcIdx].rbType;
-         dlRrcMsgInfo->rbId   = ueCfg.rlcLcCfg[lcIdx].rbId;
-        dlRrcMsgInfo->lcType = ueCfg.rlcLcCfg[lcIdx].lcType;
-         dlRrcMsgInfo->lcId   = ueCfg.rlcLcCfg[lcIdx].lcId;
-        break;
+         dlRrcMsgInfo->lcId   = f1DlRrcMsg->srbId;
+         break;
       }
    }
+   if(lcIdx == (MAX_NUM_LC + 1))
+   {
+      DU_LOG("\nERROR  -->  DU APP : (duBuildAndSendDlRrcMsgToRlc) SRB for this DL_RRC msg is not configured.");
+      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, f1DlRrcMsg->rrcMsgPdu, f1DlRrcMsg->rrcMsgSize);
+      return RFAILED;
+   }
+
    dlRrcMsgInfo->execDup = f1DlRrcMsg->execDup;
    dlRrcMsgInfo->deliveryStaRpt = f1DlRrcMsg->deliveryStatRpt;
    dlRrcMsgInfo->msgLen = f1DlRrcMsg->rrcMsgSize;
@@ -513,6 +525,11 @@ uint8_t duProcDlRrcMsg(F1DlRrcMsg *dlRrcMsg)
                ueFound = true;
                ret = duBuildAndSendDlRrcMsgToRlc(duCb.actvCellLst[cellIdx]->cellId, \
                      duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg, dlRrcMsg);
+               if(ret == RFAILED)
+               {
+                  DU_LOG("\nERROR   -->  DU_APP: duBuildAndSendDlRrcMsgToRlc() Failed for UE ID:%d", dlRrcMsg->gnbDuUeF1apId);
+                  return RFAILED;
+               }
                break; 
             }
          }