From 217ccacd40f87b3dcafded3ba31b5a78da2308a1 Mon Sep 17 00:00:00 2001 From: svaidhya Date: Tue, 13 Aug 2024 15:46:27 +0530 Subject: [PATCH] [BUG-ID: ODUHIGH-623]: Added RbType In UL/DL Data Transfer in RLC-MAC Interface Change-Id: Ib3c08543b5b3bbbe6828ff83d825a9c4c6a31c08 Signed-off-by: svaidhya --- build/odu/makefile | 2 +- src/5gnrmac/mac_msg_hdl.c | 14 ++++++++++++++ src/5gnrrlc/rlc_tmm_dl.c | 1 + src/5gnrrlc/rlc_utl_dl.c | 1 + src/cm/common_def.h | 6 ++++++ src/cm/du_app_rlc_inf.h | 16 +++++----------- src/cm/rlc_mac_inf.h | 1 + src/du_app/du_f1ap_conversions.c | 2 +- src/du_app/du_f1ap_conversions.h | 2 +- 9 files changed, 31 insertions(+), 14 deletions(-) diff --git a/build/odu/makefile b/build/odu/makefile index a230fb2cf..a6f9061be 100644 --- a/build/odu/makefile +++ b/build/odu/makefile @@ -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 diff --git a/src/5gnrmac/mac_msg_hdl.c b/src/5gnrmac/mac_msg_hdl.c index 509b04ff3..7f2cf450a 100644 --- a/src/5gnrmac/mac_msg_hdl.c +++ b/src/5gnrmac/mac_msg_hdl.c @@ -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; diff --git a/src/5gnrrlc/rlc_tmm_dl.c b/src/5gnrrlc/rlc_tmm_dl.c index fa9d10116..2f6e4b4ff 100755 --- a/src/5gnrrlc/rlc_tmm_dl.c +++ b/src/5gnrrlc/rlc_tmm_dl.c @@ -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 */ diff --git a/src/5gnrrlc/rlc_utl_dl.c b/src/5gnrrlc/rlc_utl_dl.c index 870ff96c6..a3e9f9cf5 100755 --- a/src/5gnrrlc/rlc_utl_dl.c +++ b/src/5gnrrlc/rlc_utl_dl.c @@ -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 */ diff --git a/src/cm/common_def.h b/src/cm/common_def.h index 3001fccc6..673eaf03d 100644 --- a/src/cm/common_def.h +++ b/src/cm/common_def.h @@ -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; diff --git a/src/cm/du_app_rlc_inf.h b/src/cm/du_app_rlc_inf.h index ee536f64b..1fb938a7d 100644 --- a/src/cm/du_app_rlc_inf.h +++ b/src/cm/du_app_rlc_inf.h @@ -54,12 +54,6 @@ #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; diff --git a/src/cm/rlc_mac_inf.h b/src/cm/rlc_mac_inf.h index 4a39a5b25..a50692a3d 100644 --- a/src/cm/rlc_mac_inf.h +++ b/src/cm/rlc_mac_inf.h @@ -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 */ diff --git a/src/du_app/du_f1ap_conversions.c b/src/du_app/du_f1ap_conversions.c index c684c9127..6936cbe8c 100644 --- a/src/du_app/du_f1ap_conversions.c +++ b/src/du_app/du_f1ap_conversions.c @@ -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) { diff --git a/src/du_app/du_f1ap_conversions.h b/src/du_app/du_f1ap_conversions.h index 03d766468..57a1df5a8 100644 --- a/src/du_app/du_f1ap_conversions.h +++ b/src/du_app/du_f1ap_conversions.h @@ -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); -- 2.16.6