Merge "[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-422]F1AP Paging Message Handling at...
authorHarshita Lal <harshita.lal@radisys.com>
Wed, 20 Apr 2022 06:13:10 +0000 (06:13 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Wed, 20 Apr 2022 06:13:10 +0000 (06:13 +0000)
1  2 
src/du_app/du_f1ap_msg_hdl.c

@@@ -11920,9 -11920,9 +11920,9 @@@ void freeAperDecodeF1UeContextSetupReq(
  uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
  {
     int8_t ueIdx = -1;
 -   uint8_t  ret=0, ieIdx=0, ieExtIdx = 0, cellIdx=0, servCellIdx = 0;
 +   uint8_t  ret=0, ieIdx=0, ieExtIdx = 0, servCellIdx = 0;
     bool ueCbFound = false, hoInProgress = false;
 -   uint16_t nrCellId = 0;
 +   uint16_t nrCellId = 0,  cellIdx=0;
     uint32_t gnbCuUeF1apId=0, gnbDuUeF1apId=0, bitRateSize=0;
     DuUeCb   *duUeCb = NULL;
     UEContextSetupRequest_t   *ueSetReq = NULL;
                    duUeCb->f1UeDb = NULL;
                    duUeCb->gnbCuUeF1apId = gnbCuUeF1apId;
                    duUeCb->gnbDuUeF1apId = gnbDuUeF1apId;
 +                  GET_CRNTI(duUeCb->crnti, duUeCb->gnbDuUeF1apId);
                    duUeCb->ueState = UE_HANDIN_IN_PROGRESS;
                 }
  
@@@ -12567,7 -12566,7 +12567,7 @@@ uint8_t BuildAndSendUeContextSetupRsp(u
  
        ueSetRsp =
           &f1apMsg->choice.successfulOutcome->value.choice.UEContextSetupResponse;
 -      elementCnt = 4;
 +      elementCnt = 5;
        ueSetRsp->protocolIEs.list.count = elementCnt;
        ueSetRsp->protocolIEs.list.size = \
                                          elementCnt * sizeof(UEContextSetupResponse_t *);
                                                              UEContextSetupResponseIEs__value_PR_DUtoCURRCInformation;
        BuildCellGroupConfigRrc(ueCb, &ueSetRsp->protocolIEs.list.array[idx]->value.choice.DUtoCURRCInformation.cellGroupConfig);
  
 +      /* CRNTI */
 +      idx++;
 +      ueSetRsp->protocolIEs.list.array[idx]->id  = ProtocolIE_ID_id_C_RNTI;
 +      ueSetRsp->protocolIEs.list.array[idx]->criticality = Criticality_reject;
 +      ueSetRsp->protocolIEs.list.array[idx]->value.present = UEContextSetupResponseIEs__value_PR_C_RNTI;
 +      ueSetRsp->protocolIEs.list.array[idx]->value.choice.C_RNTI = ueCb->crnti; 
 +
 +
        /* Drb Setup List */
        idx++;
        ueSetRsp->protocolIEs.list.array[idx]->id  = \
@@@ -12719,20 -12710,12 +12719,20 @@@ uint8_t BuildAndSendUeCtxtRsp(uint8_t c
     {
        case UE_CTXT_SETUP:
           {
 -            BuildAndSendUeContextSetupRsp(cellId,ueId);
 +            if((BuildAndSendUeContextSetupRsp(cellId,ueId)) != ROK)
 +            {
 +               DU_LOG("\nERROR  -->  F1AP : Failed at BuildAndSendUeContextSetupRsp()");
 +               return RFAILED;
 +            }
              break;
           }
        case UE_CTXT_MOD:
           {
 -            BuildAndSendUeContextModRsp(&duCb.actvCellLst[cellIdx]->ueCb[ueId-1]);
 +            if((BuildAndSendUeContextModRsp(&duCb.actvCellLst[cellIdx]->ueCb[ueId-1])) != ROK)
 +            {
 +               DU_LOG("\nERROR  -->  F1AP : Failed at BuildAndSendUeContextModRsp");
 +               return RFAILED;
 +            }
              break;
           }
        default:
@@@ -14256,29 -14239,32 +14256,29 @@@ uint8_t BuildAndSendUeContextModRsp(DuU
           BuildCellGroupConfigRrc(ueCb, &ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.DUtoCURRCInformation.cellGroupConfig);
        }
  
 -      if((ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY) || (ueCb->f1UeDb->actionType == UE_CTXT_MOD))
 +      if((ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY) || ((ueCb->f1UeDb->actionType == UE_CTXT_MOD) && (ueCb->f1UeDb->duUeCfg.numDrbSetupMod)))
        { 
 -         if(ueCb->f1UeDb->duUeCfg.numDrbSetupMod)
 +         ieIdx++;
 +         ueContextModifyRes->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_DRBs_SetupMod_List;
 +         ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
 +         ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present =\
 +                                                                           UEContextModificationResponseIEs__value_PR_DRBs_SetupMod_List;
 +         if(ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY)
           {
 -            ieIdx++;
 -            ueContextModifyRes->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_DRBs_SetupMod_List;
 -            ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
 -            ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present =\
 -                                                                              UEContextModificationResponseIEs__value_PR_DRBs_SetupMod_List;
 -            if(ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY)
 +            for(tnlIdx = 0; tnlIdx < duCb.numTeId; tnlIdx++)
              {
 -               for(tnlIdx = 0; tnlIdx < duCb.numTeId; tnlIdx++)
 +               if(duCb.upTnlCfg[tnlIdx]->ueId == ueCb->gnbDuUeF1apId)
                 {
 -                  if(duCb.upTnlCfg[tnlIdx]->ueId == ueCb->gnbDuUeF1apId)
 -                  {
 -                     memcpy(&ueCb->f1UeDb->duUeCfg.upTnlInfo[ueCb->f1UeDb->duUeCfg.numDrbSetupMod++], duCb.upTnlCfg[tnlIdx], sizeof(UpTnlCfg));
 -                  }
 +                  memcpy(&ueCb->f1UeDb->duUeCfg.upTnlInfo[ueCb->f1UeDb->duUeCfg.numDrbSetupMod++], duCb.upTnlCfg[tnlIdx], sizeof(UpTnlCfg));
                 }
              }
 -            ret = BuildDrbSetupModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\
 -                     value.choice.DRBs_SetupMod_List) , &ueCb->f1UeDb->duUeCfg);
 -            if(ret != ROK)
 -            {
 -               DU_LOG( "\nERROR  -->  F1AP : Failed to build DRB setupmod List ");
 -               break;
 -            }
 +         }
 +         ret = BuildDrbSetupModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\
 +                  value.choice.DRBs_SetupMod_List) , &ueCb->f1UeDb->duUeCfg);
 +         if(ret != ROK)
 +         {
 +            DU_LOG( "\nERROR  -->  F1AP : Failed to build DRB setupmod List ");
 +            break;
           }
        }
  
@@@ -15433,7 -15419,7 +15433,7 @@@ void freeAperDecodePagingMsg(Paging_
  uint8_t procPagingMsg(F1AP_PDU_t *f1apMsg) 
  {
     uint8_t ieIdx = 0, cellListIdx = 0;
-    uint16_t cellId = 0, cellIdx = 0;
+    uint16_t cellId = 0;
     Paging_t   *paging = NULLP;
     PagingCell_list_t  *pagingCelllist = NULLP;
     PagingCell_ItemIEs_t *pagingCellItemIes = NULLP;
                    case ProtocolIE_ID_id_UEIdentityIndexValue:
                       {
                          bitStringToInt(&paging->protocolIEs.list.array[ieIdx]->value.choice.UEIdentityIndexValue.choice.indexLength10,\
-                                          &tmpPagingParam->ueId);
+                                          &tmpPagingParam->pagUeId);
                          break;
                       }
  
                                   pagingCellItemIes = (PagingCell_ItemIEs_t *)pagingCelllist->list.array[cellListIdx];
                                   pagingCellItem = &pagingCellItemIes->value.choice.PagingCell_Item;
                                   bitStringToInt(&pagingCellItem->nRCGI.nRCellIdentity, &cellId);
-                                  GET_CELL_IDX(cellId, cellIdx);
-                                  if(duCb.actvCellLst[cellIdx])
+                                  if(processPagingMsg(cellId, tmpPagingParam) != ROK)
                                   {
-                                     /* fill Ue Paging information*/
-                                     if(FillPagingInfoInCellCb(duCb.actvCellLst[cellIdx], tmpPagingParam)!= ROK)
-                                     {
-                                        DU_LOG("\nERROR  --> DU APP : CellCb:%d not present to fill UE Paging Information",cellIdx);
-                                        continue;
-                                     }
-                                  }
-                                  else
-                                  {
-                                     DU_LOG("\nERROR  --> F1AP : CellId:%d Not in Activelist",cellId);
+                                     DU_LOG("\nERROR  --> DU APP : Paging Processing Failed at CellId:%d",cellId);
                                      continue;
                                   }
                                }