[Epic-ID: ODUHIGH-516][Task-ID: ODUHIGH-530] Handling of Ric action deletion
[o-du/l2.git] / src / 5gnrsch / sch.c
index ace885e..d8adc88 100644 (file)
@@ -2678,7 +2678,7 @@ uint8_t SchProcStatsReq(Pst *pst, SchStatsReq *statsReq)
    Inst    inst = pst->dstInst - SCH_INST_START;
    bool    measTypeInvalid;
    CauseOfResult cause;
-   SchStatsInfo  *statsInfo = NULLP;
+   CmLList *statsGrpNode=NULLP; 
    SchStatsGrpInfo *grpInfo = NULLP;
    SchStatsGrp *grpInfoDb = NULLP;
    SchStatsRsp schStatsRsp;
@@ -2694,7 +2694,7 @@ uint8_t SchProcStatsReq(Pst *pst, SchStatsReq *statsReq)
    /* [Step 1] Basic validation. If fails, all stats group in stats request are rejected */
    
    /* If maximum number of statistics already configured */
-   if(schCb[inst].statistics.numOfStatsCfgd >= MAX_NUM_STATS_CFG)
+   if(schCb[inst].statistics.statsGrpList.count >= MAX_NUM_STATS_GRP)
    {
       DU_LOG("\nERROR  -->  SCH : SchProcStatsReq: Maximum number of statistics configured. \
             Cannot process new request.");
@@ -2706,111 +2706,121 @@ uint8_t SchProcStatsReq(Pst *pst, SchStatsReq *statsReq)
    memset(&schStatsRsp, 0, sizeof(SchStatsRsp));
 
    /* [Step 2] Traverse all stats group and validate each measurement types in each group */
-   statsInfo = &schCb[inst].statistics.statsInfoList[schCb[inst].statistics.numOfStatsCfgd];
-   statsInfo->numStatsGroup = 0;
    for(reqGrpIdx=0; reqGrpIdx<statsReq->numStatsGroup && grpIdx<MAX_NUM_STATS; reqGrpIdx++)
    {
-       measTypeInvalid = false;
-       grpInfo = &statsReq->statsGrpList[reqGrpIdx];
-       grpInfoDb = &statsInfo->statsGrpList[grpIdx];
-       for(reqMeasIdx = 0; reqMeasIdx < grpInfo->numStats; reqMeasIdx++)
-       {
-          switch(grpInfo->statsList[reqMeasIdx])
-          {
-             case SCH_DL_TOTAL_PRB_USAGE:
-                {
-                   /* Allocate memory */
-                   SCH_ALLOC(grpInfoDb->kpiStats.dlTotalPrbUsage, sizeof(TotalPrbUsage));
-                   if(!grpInfoDb->kpiStats.dlTotalPrbUsage)
-                   {
-                      DU_LOG("\nERROR   -->  SCH : Memory allocation failed for dlTotalPrbUsage in \
-                            SchProcStatsReq()");
-                      measTypeInvalid = true;
-                      cause = RESOURCE_UNAVAILABLE;
-                   }
-                   break;
-                }
-
-             case SCH_UL_TOTAL_PRB_USAGE:
-                {
-                   /* Allocate memory */
-                   SCH_ALLOC(grpInfoDb->kpiStats.ulTotalPrbUsage, sizeof(TotalPrbUsage));
-                   if(!grpInfoDb->kpiStats.ulTotalPrbUsage)
-                   {
-                      DU_LOG("\nERROR   -->  SCH : Memory allocation failed for dlTotalPrbUsage in \
-                            SchProcStatsReq()");
-                      measTypeInvalid = true;
-                      cause = RESOURCE_UNAVAILABLE;
-                   }
-                   break;
-                }
-
-             default:
-                {
-                   DU_LOG("\nERROR  -->  SCH : SchProcStatsReq: Invalid measurement type [%d]", \
-                         grpInfo->statsList[reqMeasIdx]);
-                   measTypeInvalid = true;
-                   cause = PARAM_INVALID;
-                   break;
-                }
-          }
-
-          /* [Step 3 a] If any measurement type validation fails in a group, that group
-           *  is not configured */
-          if(measTypeInvalid)
-          {
-             SCH_FREE(grpInfoDb->kpiStats.dlTotalPrbUsage, sizeof(TotalPrbUsage));
-             SCH_FREE(grpInfoDb->kpiStats.ulTotalPrbUsage, sizeof(TotalPrbUsage));
-             memset(grpInfoDb, 0, sizeof(SchStatsGrp));   
-             break;
-          }
-       }
-   
-       /* [Step 4] If a group passes all validation, it is added to SCH database.
-        * A timer is started for this group. And the group is added to
-        * stats-group-accepted-list in sch-stats-response message. */
-       if(!measTypeInvalid)
-       {
-          /* Add this group's configured KPIs to list of Active KPIs */
-          if(schAddToKpiActiveList(inst, grpInfoDb) == ROK)
-          {
-             grpInfoDb->schInst = inst;
-             grpInfoDb->subscriptionId = statsReq->subscriptionId;
-             grpInfoDb->groupId = grpInfo->groupId;
-             grpInfoDb->periodicity = grpInfo->periodicity;
-
-
-             /* Start timer */
-             cmInitTimers(&(grpInfoDb->periodTimer), 1);
-             schStartTmr(&schCb[inst], (PTR)(grpInfoDb), EVENT_STATISTICS_TMR, grpInfoDb->periodicity);
-
-             schStatsRsp.statsGrpAcceptedList[schStatsRsp.numGrpAccepted] = grpInfo->groupId;
-             schStatsRsp.numGrpAccepted++;
-             grpIdx++;
-          }
-          else
-          {
-            memset(grpInfoDb, 0, sizeof(SchStatsGrp));
-          }
-       }
-       else
-       {
-          /* [Step 3 b] The rejected group is added to stats-group-rejected-list in
-           * sch-stats-response message */
-          memset(grpInfoDb, 0, sizeof(SchStatsGrp));
-          schStatsRsp.statsGrpRejectedList[schStatsRsp.numGrpRejected].groupId = grpInfo->groupId;
-          schStatsRsp.statsGrpRejectedList[schStatsRsp.numGrpRejected].cause = cause;
-          schStatsRsp.numGrpRejected++;
-       }
-   }
-   statsInfo->numStatsGroup = grpIdx;
-   if(statsInfo->numStatsGroup)
-   {
-      schCb[inst].statistics.numOfStatsCfgd++;
-   }
-   else
-   {
-      memset(statsInfo, 0, sizeof(SchStatsInfo));
+      measTypeInvalid = false;
+      grpInfo = &statsReq->statsGrpList[reqGrpIdx];
+      SCH_ALLOC(grpInfoDb, sizeof(SchStatsGrp));
+      if(grpInfoDb == NULLP)
+      {
+
+         DU_LOG("\nERROR   -->  SCH : Memory allocation failed for dlTotalPrbUsage in \
+               SchProcStatsReq()");
+         measTypeInvalid = true;
+         cause = RESOURCE_UNAVAILABLE;
+      }
+      else
+      {
+         for(reqMeasIdx = 0; reqMeasIdx < grpInfo->numStats; reqMeasIdx++)
+         {
+            switch(grpInfo->statsList[reqMeasIdx])
+            {
+               case SCH_DL_TOTAL_PRB_USAGE:
+                  {
+                     /* Allocate memory */
+                     SCH_ALLOC(grpInfoDb->kpiStats.dlTotalPrbUsage, sizeof(TotalPrbUsage));
+                     if(!grpInfoDb->kpiStats.dlTotalPrbUsage)
+                     {
+                        DU_LOG("\nERROR  -->  E2AP : Memory allocation failed in %s at line %d",__func__, __LINE__);
+                        measTypeInvalid = true;
+                        cause = RESOURCE_UNAVAILABLE;
+                     }
+                     break;
+                  }
+
+               case SCH_UL_TOTAL_PRB_USAGE:
+                  {
+                     /* Allocate memory */
+                     SCH_ALLOC(grpInfoDb->kpiStats.ulTotalPrbUsage, sizeof(TotalPrbUsage));
+                     if(!grpInfoDb->kpiStats.ulTotalPrbUsage)
+                     {
+                        DU_LOG("\nERROR  -->  E2AP : Memory allocation failed in %s at line %d",__func__, __LINE__);
+                        measTypeInvalid = true;
+                        cause = RESOURCE_UNAVAILABLE;
+                     }
+                     break;
+                  }
+
+               default:
+                  {
+                     DU_LOG("\nERROR  -->  SCH : SchProcStatsReq: Invalid measurement type [%d]", \
+                           grpInfo->statsList[reqMeasIdx]);
+                     measTypeInvalid = true;
+                     cause = PARAM_INVALID;
+                     break;
+                  }
+            }
+
+            /* [Step 3 a] If any measurement type validation fails in a group, that group
+             *  is not configured */
+            if(measTypeInvalid)
+            {
+               SCH_FREE(grpInfoDb->kpiStats.dlTotalPrbUsage, sizeof(TotalPrbUsage));
+               SCH_FREE(grpInfoDb->kpiStats.ulTotalPrbUsage, sizeof(TotalPrbUsage));
+               memset(grpInfoDb, 0, sizeof(SchStatsGrp));   
+               break;
+            }
+         }
+      } 
+      /* [Step 4] If a group passes all validation, it is added to SCH database.
+       * A timer is started for this group. And the group is added to
+       * stats-group-accepted-list in sch-stats-response message. */
+      if(!measTypeInvalid)
+      {
+         /* Add this group's configured KPIs to list of Active KPIs */
+         if(schAddToKpiActiveList(inst, grpInfoDb) == ROK)
+         {
+            grpInfoDb->schInst = inst;
+            grpInfoDb->subscriptionId = statsReq->subscriptionId;
+            grpInfoDb->groupId = grpInfo->groupId;
+            grpInfoDb->periodicity = grpInfo->periodicity;
+
+
+            /* Start timer */
+            cmInitTimers(&(grpInfoDb->periodTimer), 1);
+            schStartTmr(&schCb[inst], (PTR)(grpInfoDb), EVENT_STATISTICS_TMR, grpInfoDb->periodicity);
+
+
+            /* Adding the information in link list*/
+            SCH_ALLOC(statsGrpNode, sizeof(CmLList));
+            if(statsGrpNode)
+            {
+               statsGrpNode->node = (PTR) grpInfoDb;
+               cmLListAdd2Tail(&schCb[inst].statistics.statsGrpList, statsGrpNode);
+               schStatsRsp.statsGrpAcceptedList[schStatsRsp.numGrpAccepted] = grpInfo->groupId;
+               schStatsRsp.numGrpAccepted++;
+               grpIdx++;
+            }
+            else
+            {
+               DU_LOG("\nERROR  -->  E2AP : Memory allocation failed in %s at %d",__func__,__LINE__);
+               SCH_FREE(grpInfoDb->kpiStats.dlTotalPrbUsage, sizeof(TotalPrbUsage));
+               SCH_FREE(grpInfoDb->kpiStats.ulTotalPrbUsage, sizeof(TotalPrbUsage));
+               SCH_FREE(grpInfoDb, sizeof(SchStatsGrp));
+               schStatsRsp.statsGrpRejectedList[schStatsRsp.numGrpRejected].groupId = grpInfo->groupId;
+               schStatsRsp.statsGrpRejectedList[schStatsRsp.numGrpRejected].cause = cause;
+               schStatsRsp.numGrpRejected++;
+            }
+         }
+      }
+      else
+      {
+         /* [Step 3 b] The rejected group is added to stats-group-rejected-list in
+          * sch-stats-response message */
+         schStatsRsp.statsGrpRejectedList[schStatsRsp.numGrpRejected].groupId = grpInfo->groupId;
+         schStatsRsp.statsGrpRejectedList[schStatsRsp.numGrpRejected].cause = cause;
+         schStatsRsp.numGrpRejected++;
+      }
    }
    schStatsRsp.subscriptionId = statsReq->subscriptionId;
 
@@ -2947,51 +2957,119 @@ uint8_t schCalcAndSendGrpStats(SchStatsGrp *grpInfo)
 
 /*******************************************************************
  *
- * @brief Fill and send Statistics Delete Response to MAC
+ * @brief Delete statistics group
  *
  * @details
  *
- *    Function :  SchSendStatsDeleteRspToMac
+ *    Function : deleteStatsGrp
  *
- *    Functionality: Fill and send Statistics Delete Response to MAC
+ *    Functionality:
+ *    Delete statistics group
  *
- * @params[in]  
- *       Statistics Delete Request from MAC
- *       Statistics Delete result
- *       Cause of response
+ * @params[in]
+ *           Inst
+ *           Stats Grp Node
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t SchSendStatsDeleteRspToMac(SchStatsDeleteReq *statsDeleteReq, SchMacRsp rsp, CauseOfResult cause)
+void deleteStatsGrp(Inst inst, CmLList *grpNode)
 {
-   Pst rspPst;
-   uint8_t ret = ROK;
-   SchStatsDeleteRsp  *schStatsDeleteRsp;
+   SchStatsGrp *statsGrpInfo=NULLP;
+   
+   if(grpNode)
+   {
+      statsGrpInfo = (SchStatsGrp*)grpNode->node;
+      SCH_FREE(statsGrpInfo->kpiStats.dlTotalPrbUsage, sizeof(TotalPrbUsage));
+      SCH_FREE(statsGrpInfo->kpiStats.ulTotalPrbUsage, sizeof(TotalPrbUsage));
+      if(schChkTmr((PTR)statsGrpInfo, EVENT_STATISTICS_TMR) == true)
+      {
+         schStopTmr(&schCb[inst], (PTR)statsGrpInfo, EVENT_STATISTICS_TMR);
+      }
+      memset(statsGrpInfo, 0, sizeof(SchStatsGrp));
+      SCH_FREE(grpNode->node, sizeof(SchStatsGrp));
+      SCH_FREE(grpNode, sizeof(CmLList));
+   }
+}
 
-   DU_LOG("\nINFO   --> SCH : Filling Statistics Delete Response");
-   SCH_ALLOC(schStatsDeleteRsp, sizeof(SchStatsDeleteRsp));
-   if(schStatsDeleteRsp == NULLP)
+/******************************************************************
+ *
+ * @brief Deletion of node from statistics group list
+ *
+ * @details
+ *
+ *    Function : deleteFromStatsGrpList
+ *
+ *    Functionality: Deletion of node from statistics group list
+ *    [Step 1]: Traverse each and every node of stats group list
+ *    stored in the database
+ *    [Step 2]: Check if the node's subscription id is same 
+ *    as the subscription id received. If same then go to step 3
+ *    else move to the next node of the list.
+ *    [Step 3]: If deleteAllGrp == true, then delete the node and 
+ *    move to the next node of the list.
+ *    [Step 4]: If deleteAllGrp != true, then check if the node's group
+ *    id is same as group id received then delete the node and mark the 
+ *    status found true else move to the next node of the list.
+ *    [Step 5]: Once the traversing complete,  
+ *    if deleteAllGrp is true, then return successful rsp;
+ *    else if status found is true, then return  successful rsp;
+ *    else return failure.
+ * @params[in] 
+ *           Inst
+ *           Stats Grp List 
+ *           Subscription Id
+ *           Group Id
+ *           boolen of deleteAllGrp
+ * @return void
+ *
+ * ****************************************************************/
+uint8_t deleteFromStatsGrpList(Inst inst, CmLListCp *statsGrpList, uint64_t  subscriptionId, uint8_t  groupId, bool deleteAllGrp)
+{
+   bool statsFound=false;
+   SchStatsGrp *statsGrpInfo=NULLP;
+   CmLList *grpNode=NULLP;
+
+   /* [Step 1] */
+   CM_LLIST_FIRST_NODE(statsGrpList, grpNode);
+   while(grpNode)
    {
-      DU_LOG("\nERROR  --> SCH : Failed to allocate memory in SchSendStatsDeleteRspToMac()");
-      return RFAILED;
+      statsGrpInfo = (SchStatsGrp*)grpNode->node;
+
+      /* [Step 2] */
+      if(statsGrpInfo->subscriptionId== subscriptionId) 
+      {
+         if(deleteAllGrp == true)
+         {
+            /* [Step 3] */
+            cmLListDelFrm(statsGrpList, grpNode);
+            deleteStatsGrp(inst, grpNode);
+         }
+         else
+         {
+            /* [Step 4] */
+            if(statsGrpInfo->groupId== groupId) 
+            {
+               cmLListDelFrm(statsGrpList, grpNode);
+               deleteStatsGrp(inst, grpNode);
+               statsFound = true;
+            }
+         }
+      }
+      CM_LLIST_FIRST_NODE(statsGrpList, grpNode);
    }
-   
-   schStatsDeleteRsp->subscriptionId=statsDeleteReq->subscriptionId;
-   schStatsDeleteRsp->rsp=rsp;
-   schStatsDeleteRsp->cause=cause;
-   /* Filling response post */
-   memset(&rspPst, 0, sizeof(Pst));
-   FILL_PST_SCH_TO_MAC(rspPst, inst);
-   rspPst.event = EVENT_STATISTICS_DELETE_RSP_TO_MAC;
 
-   ret = MacMessageRouter(&rspPst, (void *)schStatsDeleteRsp);
-   if(ret == RFAILED)
+   /* [Step 5] */
+   if(deleteAllGrp == true)
    {
-      DU_LOG("\nERROR  -->  SCH : SchSendStatsDeleteRspToMac(): Failed to send Statistics Response");
-      return ret;
+      return ROK;
    }
-   return ret;
+   else
+   {
+      if(statsFound == true)
+         return ROK;
+   }
+   return RFAILED;
 }
 
 /*******************************************************************
@@ -3003,47 +3081,72 @@ uint8_t SchSendStatsDeleteRspToMac(SchStatsDeleteReq *statsDeleteReq, SchMacRsp
  *    Function : deleteStatsInfo 
  *
  *    Functionality:
- *    Delete statistics information
- *
+ *   Delete statistics information base on numStatsGroup 
+ *   Info- If numStatsGroup = 0' indicates the Deletion procedure triggered by
+ *   'SUBS_DELETION_REQ' wherein all the groups of this particular
+ *   Subscription has to be removed 
+ *   else when numStatsGroup != 0 then this is
+ *   for SUBS_MOD_REQ's actionToBeDeleted wherein particular action(s) has
+ *   to be removed thus need to pass groupId belonging to that subscription
+ *   which has to be deleted.'
+ *
+ *   [Step-1] If numStatsGroup = 0, Deletion of all stats group belonging to
+ *   received subscription Id.
+ *   [Step-2] Else if numStatsGroup > 0, Deletion of individual stats group 
+ *   from list whose information are present in stats delete request.
+ *   [Step-3] Fill the result of the stats deletion in the SCH stats delete
+ *   response
  * @params[in] 
  *             Instance
- *             Subscription id 
+ *             Subscription delete req
+ *             Subscription delete rsp
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t deleteStatsInfo(Inst inst, uint64_t subscriptionId)
+uint8_t deleteStatsInfo(Inst inst, SchStatsDeleteReq *statsDeleteReq, SchStatsDeleteRsp  *schStatsDeleteRsp)
 {
-   bool statsFound=false;
-   uint8_t idx=0, statsGrpIdx=0;
-   SchStatsGrp *statsGrpInfo=NULLP;
+   uint8_t statsGrpIdx=0;
+   CmLListCp  *statsGrpList =NULLP;
 
-   if(schCb[inst].statistics.numOfStatsCfgd)
+   statsGrpList = &schCb[inst].statistics.statsGrpList;
+   
+   if(!statsDeleteReq->numStatsGroupToBeDeleted)
    {
-      for(idx=0;idx<schCb[inst].statistics.numOfStatsCfgd; idx++)
+      /* [Step-1] */
+      if(deleteFromStatsGrpList(inst,statsGrpList, statsDeleteReq->subscriptionId, 0, true) == ROK)
       {
-         for(statsGrpIdx=0;statsGrpIdx<schCb[inst].statistics.statsInfoList[idx].numStatsGroup; statsGrpIdx++)
-         {
-            statsGrpInfo = &schCb[inst].statistics.statsInfoList[idx].statsGrpList[statsGrpIdx];
-            if(statsGrpInfo->subscriptionId ==subscriptionId)
-            {
-               SCH_FREE(statsGrpInfo->kpiStats.dlTotalPrbUsage, sizeof(TotalPrbUsage));
-               SCH_FREE(statsGrpInfo->kpiStats.ulTotalPrbUsage, sizeof(TotalPrbUsage));
-               if(schChkTmr((PTR)statsGrpInfo, EVENT_STATISTICS_TMR) == true)
-               {
-                  schStopTmr(&schCb[inst], (PTR)statsGrpInfo, EVENT_STATISTICS_TMR);
-               }
-               memset(statsGrpInfo, 0, sizeof(SchStatsGrp));
-               statsFound = true;
-            }
-         }
+         /* [Step 3]*/
+         schStatsDeleteRsp->subsDelRsp = RSP_OK;  
+         schStatsDeleteRsp->subsDelCause = SUCCESSFUL;
+      }
+      else
+      {
+         /* [Step-3]*/
+         schStatsDeleteRsp->subsDelRsp = RSP_NOK;  
+         schStatsDeleteRsp->subsDelCause = STATS_ID_NOT_FOUND; 
       }
    }
-
-   if(statsFound ==false)
+   else
    {
-      DU_LOG("\nERROR  -->  SCH : SchProcStatsDeleteReq(): Statistics information is not present");
-      return RFAILED;
+      for(statsGrpIdx=0; statsGrpIdx<statsDeleteReq->numStatsGroupToBeDeleted; statsGrpIdx++)
+      {
+         /* [Step-2] */
+         if(deleteFromStatsGrpList(inst, statsGrpList, statsDeleteReq->subscriptionId,\
+                  statsDeleteReq->statsGrpIdToBeDelList[statsGrpIdx], false) != ROK)
+         {
+            /* [Step-3]*/
+            schStatsDeleteRsp->statsGrpDelInfo[statsGrpIdx].statsGrpDelRsp = RSP_OK;  
+            schStatsDeleteRsp->statsGrpDelInfo[statsGrpIdx].statsGrpDelCause = SUCCESSFUL; 
+         }
+         else
+         {
+            /* [Step-3]*/
+            schStatsDeleteRsp->statsGrpDelInfo[statsGrpIdx].statsGrpDelRsp = RSP_NOK;  
+            schStatsDeleteRsp->statsGrpDelInfo[statsGrpIdx].statsGrpDelCause = STATS_ID_NOT_FOUND; 
+         }
+      }
+      schStatsDeleteRsp->numStatsGroupDeleted = statsDeleteReq->numStatsGroupToBeDeleted;
    }
    return ROK;
 }
@@ -3067,7 +3170,9 @@ uint8_t deleteStatsInfo(Inst inst, uint64_t subscriptionId)
  * ****************************************************************/
 uint8_t SchProcStatsDeleteReq(Pst *pst, SchStatsDeleteReq *statsDeleteReq)
 {
+   Pst rspPst;
    uint8_t ret =ROK;
+   SchStatsDeleteRsp  *schStatsDeleteRsp;
    Inst    inst = pst->dstInst - SCH_INST_START;
 
    DU_LOG("\nINFO   -->  SCH : Received Statistics Delete Request from MAC");
@@ -3077,15 +3182,25 @@ uint8_t SchProcStatsDeleteReq(Pst *pst, SchStatsDeleteReq *statsDeleteReq)
       DU_LOG("\nERROR  -->  SCH : SchProcStatsDeleteReq(): Received Null pointer");
       return RFAILED;
    }
-
-   ret = deleteStatsInfo(inst, statsDeleteReq->subscriptionId);
-   if(ret == ROK)
+   
+   /* Process Stats delete request and fill stats delete response simultaneously */
+   SCH_ALLOC(schStatsDeleteRsp, sizeof(SchStatsDeleteRsp));
+   if(schStatsDeleteRsp == NULLP)
    {
-      SchSendStatsDeleteRspToMac(statsDeleteReq, RSP_OK, SUCCESSFUL);
+      DU_LOG("\nERROR  --> SCH : Failed to allocate memory in SchProcStatsDeleteReq()");
+      return RFAILED;
    }
-   else
+   schStatsDeleteRsp->subscriptionId=statsDeleteReq->subscriptionId;
+   deleteStatsInfo(inst, statsDeleteReq, schStatsDeleteRsp);
+   
+   memset(&rspPst, 0, sizeof(Pst));
+   FILL_PST_SCH_TO_MAC(rspPst, inst);
+   rspPst.event = EVENT_STATISTICS_DELETE_RSP_TO_MAC;
+
+   ret = MacMessageRouter(&rspPst, (void *)schStatsDeleteRsp);
+   if(ret == RFAILED)
    {
-      SchSendStatsDeleteRspToMac(statsDeleteReq, RSP_NOK, STATS_ID_NOT_FOUND);
+      DU_LOG("\nERROR  -->  SCH : SchProcStatsDeleteReq(): Failed to send Statistics Response");
    }
    SCH_FREE(statsDeleteReq, sizeof(SchStatsDeleteReq));