[BUG-ID: ODUHIGH-623]: Added RbType In UL/DL Data Transfer in RLC-MAC Interface 58/13258/2
authorsvaidhya <svaidhya@radisys.com>
Tue, 13 Aug 2024 10:16:27 +0000 (15:46 +0530)
committersvaidhya <svaidhya@radisys.com>
Tue, 13 Aug 2024 10:21:14 +0000 (15:51 +0530)
Change-Id: Ib3c08543b5b3bbbe6828ff83d825a9c4c6a31c08
Signed-off-by: svaidhya <svaidhya@radisys.com>
build/odu/makefile
src/5gnrmac/mac_msg_hdl.c
src/5gnrrlc/rlc_tmm_dl.c
src/5gnrrlc/rlc_utl_dl.c
src/cm/common_def.h
src/cm/du_app_rlc_inf.h
src/cm/rlc_mac_inf.h
src/du_app/du_f1ap_conversions.c
src/du_app/du_f1ap_conversions.h

index a230fb2..a6f9061 100644 (file)
@@ -74,7 +74,7 @@ endif
 # macro for output file name and makefile name
 #
 
-PLTFRM_FLAGS=-UMSPD -DODU -DINTEL_FAPI -UODU_MEMORY_DEBUG_LOG -DDEBUG_ASN_PRINT -UDEBUG_PRINT -DERROR_PRINT -USTART_DL_UL_DATA -UNR_DRX -UCALL_FLOW_DEBUG_LOG -UODU_SLOT_IND_DEBUG_LOG -UNFAPI_ENABLED -UTHREAD_AFFINITY -UMEM_SIZE_CHECK -DFAPI_DECODER 
+PLTFRM_FLAGS=-UMSPD -DODU -DINTEL_FAPI -UODU_MEMORY_DEBUG_LOG -DDEBUG_ASN_PRINT -UDEBUG_PRINT -DERROR_PRINT -USTART_DL_UL_DATA -UNR_DRX -UCALL_FLOW_DEBUG_LOG -UODU_SLOT_IND_DEBUG_LOG -UNFAPI_ENABLED -UTHREAD_AFFINITY -UMEM_SIZE_CHECK -UFAPI_DECODER 
 
 ifeq ($(MODE),TDD)
    PLTFRM_FLAGS += -DNR_TDD
index 509b04f..7f2cf45 100644 (file)
@@ -388,6 +388,20 @@ uint8_t lcId, uint16_t pduLen, uint8_t *pdu)
    ulData->slotInfo.cellId = cellId;
 
    /* Filling pdu info */
+   if(lcId < MIN_DRB_LCID)
+   {
+      ulData->pduInfo[ulData->numPdu].rbType = RB_TYPE_SRB;
+   }
+   else if(lcId <= MAX_DRB_LCID)
+   {
+      ulData->pduInfo[ulData->numPdu].rbType = RB_TYPE_DRB;
+   }
+   else
+   {
+      DU_LOG("\nERROR  --> MAC: Invalid LCID:%d thus can't forward UL DATA to RLC", lcId);
+      MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulData, sizeof(RlcUlData));
+      return RFAILED;
+   }
    ulData->pduInfo[ulData->numPdu].lcId = lcId;
    ulData->pduInfo[ulData->numPdu].pduBuf = pdu;
    ulData->pduInfo[ulData->numPdu].pduLen = pduLen;
index fa9d101..2f6e4b4 100755 (executable)
@@ -303,6 +303,7 @@ 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].rbType = RB_TYPE_DRB;
    dlData->pduInfo[0].lcId = rbCb->lch.lChId;
 
    /* Copy Message to fixed buffer to send */
index 870ff96..a3e9f9c 100755 (executable)
@@ -265,6 +265,7 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
             lcId = datPerLch.lcId;
             for(pduIdx = 0; pduIdx < datPerLch.pdu.numPdu; pduIdx++)
             {
+               dlData->pduInfo[dlData->numPdu].rbType = RB_TYPE_DRB;
                dlData->pduInfo[dlData->numPdu].lcId = datPerLch.lcId;
 
                /* Copy Message to fixed buffer to send */
index 3001fcc..673eaf0 100644 (file)
@@ -329,6 +329,12 @@ typedef enum
    TRAVERSE_ALL
 }ActionTypeLL;
 
+typedef enum
+{
+   RB_TYPE_SRB,      /* Signalling Radio Bearer */
+   RB_TYPE_DRB       /* Data Radio Bearer */
+}RbType;  
+
 typedef struct slotTimingInfo
 {
    uint16_t cellId;
index ee536f6..1fb938a 100644 (file)
 #define LCH_DTCH      4      /*!< DTCH Logical Channel */
 #define LCH_DCCH      5      /*!< DCCH Logical Channel */
 
-typedef enum
-{
-   RB_TYPE_SRB,      /* Signalling Radio Bearer */
-   RB_TYPE_DRB       /* Data Radio Bearer */
-}RlcRbType;  
-
 typedef enum
 {
    TRANSMISSION_IN_PROGRESS,
@@ -125,10 +119,10 @@ typedef enum
 
 typedef struct rlcMaxRetransInd 
 {
-   uint16_t       cellId;
-   uint16_t       ueId;
-   RlcRbType      lcType;
-   uint8_t        lcId;
+   uint16_t    cellId;
+   uint16_t    ueId;
+   RbType      lcType;
+   uint8_t     lcId;
 }RlcMaxRetransInfo;
 
 typedef struct ulAmCfg
@@ -188,7 +182,7 @@ typedef struct umUniDirDlBearerCfg
 typedef struct rlcBearerCfg
 {
    uint8_t      rbId;
-   RlcRbType    rbType;
+   RbType       rbType;
    uint8_t      lcId;
    uint8_t      lcType;
    Snssai       *snssai; 
index 4a39a5b..a50692a 100644 (file)
@@ -59,6 +59,7 @@ typedef struct rlcSchedResultRpt
 /* DL/UL data transfer */
 typedef struct rlcPduInfo
 {
+   RbType     rbType;   /*!< Radio Bearer Type */
    uint8_t    lcId;     /*!< Logical channel ID */
    uint16_t   pduLen;   /*!< PDU Length */
    uint8_t    *pduBuf;  /*!< RLC PDU buffer */
index c684c91..6936cbe 100644 (file)
@@ -37,7 +37,7 @@
  * @return RRC codec enum value for RB type
  *
  * **********************************************************************/
-RLC_BearerConfig__servedRadioBearer_PR covertRbTypeFromIntEnumToRrcEnum(RlcRbType rbType)
+RLC_BearerConfig__servedRadioBearer_PR covertRbTypeFromIntEnumToRrcEnum(RbType rbType)
 {
    switch(rbType)
    {
index 03d7664..57a1df5 100644 (file)
@@ -39,7 +39,7 @@
 #include "ShortDRXCycleLength.h"
 #include "DRX-ConfigRrc.h"
 
-RLC_BearerConfig__servedRadioBearer_PR covertRbTypeFromIntEnumToRrcEnum(RlcRbType rbType);
+RLC_BearerConfig__servedRadioBearer_PR covertRbTypeFromIntEnumToRrcEnum(RbType rbType);
 RLC_Config_PR covertRlcModeFromIntEnumToRrcEnum(RlcMode mode);
 SN_FieldLengthAM_t covertAmSnLenFromIntEnumToRrcEnum(SnLenAm snLen);
 SnLenAm covertAmSnLenFromRrcEnumToIntEnum(SN_FieldLengthAM_t snLen);