/******************************************************************************* ################################################################################ # Copyright (c) [2017-2019] [Radisys] # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # # You may obtain a copy of the License at # # # # http://www.apache.org/licenses/LICENSE-2.0 # # # # Unless required by applicable law or agreed to in writing, software # # distributed under the License is distributed on an "AS IS" BASIS, # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ *******************************************************************************/ /********************************************************************** Name: Upper Layer Interface Type: C header file Desc: Structures, variables and typedefs required by RGU interface File: rgu.x *********************************************************************21*/ #ifndef __RGUX__ #define __RGUX__ #ifdef __cplusplus extern "C" { #endif /** @file rgu.x @brief Structure declarations and definitions for RGU interface. */ /*********************************************************************** typedefs and data structures ***********************************************************************/ /** * @brief PDU information given on a logical channel. */ typedef struct rguPduInfo { U8 numPdu; /*!< Number of PDUs */ Buffer *mBuf[RGU_MAX_PDU]; /*!< numPdu data buffers */ } RguPduInfo; /** * @brief Buffer Occupancy Report for dedicated logical channel. */ typedef struct rguDBoReport { S32 bo; /*!< Buffer occupancy reported by RLC */ #ifdef CCPU_OPT U16 estRlcHdrSz; /*!< Estimated RLC header size */ Bool staPduPrsnt; /*!< Indicates whether the BO includes a status PDU as well */ #endif U32 staPduBo; /*!< Indicates the Status PDU BO. This is included in bo */ U32 oldestSduArrTime; } RguDBoReport; /** * @brief DatReq from RLC to MAC for Common Channels (BCCH, PCCH and CCCH). */ typedef struct rguCDatReqInfo { CmLteCellId cellId; /*!< CELL ID */ CmLteLcId lcId; /*!< Logical channel ID */ CmLteLcType lcType; /*!< Logical channel Type */ U32 transId; /*!< Transaction ID */ #ifdef EMTC_ENABLE U8 pnb; /*Paging narrowBand on which UE performs Paging*/ #endif union{ CmLteTimingInfo timeToTx; /*!< Actual time when PHY transmits this, applicable to BCCH and PCCH only */ CmLteRnti rnti; /*!< Temporary CRNTI:Applicable for CCCH. */ }u; Buffer *pdu; /*!< PDU to be transmitted */ } RguCDatReqInfo; /** * @brief DatReq Information of a logical channel. */ typedef struct rguLchDatReq { CmLteLcId lcId; /*!< Logical channel ID */ RguDBoReport boReport; /*!< BO for the logical channel */ RguPduInfo pdu; /*!< PDU to be transmitted*/ Bool setMaxUlPrio; #ifdef L2_OPTMZ Bool freeBuff; /*!< TRUE if Buffer is to be freed by MAC It is set for UM bearer*/ #endif } RguLchDatReq; /*rgu_x_001.main_3 - ADD - L2M Support */ #ifdef LTE_L2_MEAS /** * @brief Structure to store logical channels to SN mapping */ typedef struct rguLchmapInfo { CmLteLcId lChId; /*!< Logical channel Id */ U16 snList[RGU_MAX_LC]; /*!< Set of sequence numbers */ }RguLchMapInfo; /** * @brief Sequence Number mapping info per TB * */ typedef struct rguSnMapInfo { U32 tbId; /*!< TB id for which sn info map */ U8 numLch; /*!< Number of Ded Logical Channels */ RguLchMapInfo lchMap[RGU_MAX_LC]; /*!< LC to SN Mapping Info*/ } RguSnMapInfo; /* * @brief Structure to hold harq status Indication to RLC * */ typedef struct rguHarqStatusInd { CmLteCellId cellId; /*!< Cell Id*/ CmLteRnti ueId; /*!< ue Id*/ U8 numTbs; /*!< Number of Tbs present */ U32 tbId[RGU_MAX_TB]; /*!< tbId provided by RLC in DatReq */ U16 status[RGU_MAX_TB]; /*!< Status back to RLC ACK/NACK*/ } RguHarqStatusInd; /* * @brief Structure to hold rguHarqStatusInd and pst structure * */ typedef struct rguHarqStaInd { RguHarqStatusInd hqStatusInd; Pst pst; } RguHarqStaInd; /* * @brief UL Throughput Measurement Request from RLC to MAC regarding configuration * of an LC for a particular UE to provide Timing Info. * */ typedef struct rguL2MUlThrpMeasReqInfo { CmLteCellId cellId; /*!< Cell Id*/ CmLteRnti rnti; /*!< UE Id*/ U8 numLcId; /*!< Number of LC Ids configured */ U8 lcId[RGU_MAX_LC]; /*!< LC ID indices that are configured */ Bool enbMeas; /*!< Indication to enable/disable measurement for the LC ID*/ } RguL2MUlThrpMeasReqInfo; #endif /* LTE_L2_MEAS */ /** * @brief DatReq info for each TB of a UE. */ typedef struct rguDatReqTb { U8 nmbLch; /*!< Number of logical channels of a UE that have data for this TB */ RguLchDatReq lchData[RGU_MAX_LC]; /*!< Data Buffers and BO of logical channels for this TB */ /* rgu_x_001.main_3 - ADD - L2M Support */ #ifdef LTE_L2_MEAS U32 tbId; /*!< RLC's internal tbId maintained per UE */ #endif /* LTE_L2_MEAS */ }RguDatReqTb; /** * @brief DatReq from RLC to MAC for dedicated channels of an UE. */ typedef struct rguDDatReqPerUe { CmLteRnti rnti; /*!< UE ID */ U32 transId; /*!< Transaction ID */ U8 nmbOfTbs; /*!< Number of TBs. Relevant for MIMO */ RguDatReqTb datReqTb[2]; /*!< DatReq info for MAX 2 TBs */ } RguDDatReqPerUe; /** * @brief DatReq from RLC to MAC for dedicated channels of all UEs in a TTI. */ typedef struct rguDDatReqInfo { CmLteCellId cellId; /*!< CELL ID */ U8 nmbOfUeGrantPerTti; /*!< Number of TBs. Relevant for MIMO */ RguDDatReqPerUe datReq[RGU_MAX_NUM_UE_PER_TTI]; /*!< Pointer to DatReq for MAX UEs configured Per TTI */ } RguDDatReqInfo; /** * @brief DatInd from MAC to RLC on CCCH. */ typedef struct rguCDatIndInfo { CmLteCellId cellId; /*!< Cell ID */ CmLteRnti rnti; /*!< RNTI */ CmLteLcId lcId; /*!< Logical channel instance */ Buffer *pdu; /*!< PDU received always one */ } RguCDatIndInfo; #ifdef MAC_RLC_UL_RBUF typedef struct rguDedDatInd1 { Void *msg; }RguDedDatInd1; #endif /* rgu_x_001.main_3 - ADD - L2M & R9 Support */ #ifdef LTE_L2_MEAS /** * * Segment Indication ID from MAC to RLC */ typedef enum rguL2MUlThrpSegInd { RGU_L2M_ULTHRP_NOTDEF = 0,/**< Specifies No Indication */ RGU_L2M_ULTHRP_FIRST = 1, /**< Specifies First Segment Indication */ RGU_L2M_ULTHRP_LAST = 2, /**< Specifies Last Segment Indication */ RGU_L2M_ULTHRP_INTERIM = 3 /**< Specifies Interim Segment Indication */ }RguL2MUlThrpSegInd; /** * @brief Scheduled IP Throughput Timing Info from MAC to RLC. */ typedef struct rgL2MeasUlThrpTimInfo { U32 thrpTimeUl; /*!< Difference in Timing values T1, T2 */ RguL2MUlThrpSegInd firstLastSegInd; /*!< Indication of Data Burst */ }RgL2MeasUlThrpTimInfo; #endif /** * @brief DatInd Information for a logical channel. */ typedef struct rguLchDatInd { CmLteLcId lcId; /*!< Logical channel instance */ RguPduInfo pdu; /*!< PDU received */ /* rgu_x_001.main_3 - ADD - L2M & R9 Support */ }RguLchDatInd; /** * @brief Data Indication from MAC to RLC for dedicated channels of an UE. */ typedef struct rguDDatIndInfo { CmLteCellId cellId; /*!< CELL ID */ CmLteRnti rnti; /*!< UE ID */ U8 numLch; /*!< Number of logical channels within the UE that has data */ RguLchDatInd lchData[RGU_MAX_LC]; /*!< Data buffers of logical channels */ #ifdef LTE_L2_MEAS U32 ttiCnt; /*!< The Current TTI in the Cell */ U8 burstInd; /*!< Indicates the Burst Start or End */ #endif } RguDDatIndInfo; /** * @brief Status Response from RLC to MAC for common logical channel. */ typedef struct rguCStaRspInfo { CmLteCellId cellId; /*!< CELL ID */ CmLteLcId lcId; /*!< Logical channel ID */ CmLteLcType lcType; /*!< Logical channel type */ S32 bo; /*!< Buffer occupancy reported by RLC */ #ifdef EMTC_ENABLE U8 emtcDiReason; /*!< Reason for DI message to send. */ U8 pnb; /*paging narrowBand on which UE will perform paging*/ #endif union /*!< lcType in the primitive is the union selector */ { CmLteTimingInfo timeToTx; /*!< Timing info for the BO, applicable for BCCH and PCCH */ CmLteRnti rnti; /*!< Temporary CRNTI, only for CCCH */ } u; } RguCStaRspInfo; /** * @brief Status Response from RLC to MAC for dedicated logical channel. */ typedef struct rguDStaRspInfo { Pst post; CmLteCellId cellId; /*!< CELL ID */ CmLteRnti rnti; /*!< UE ID */ CmLteLcId lcId; /*!< Logical channel ID */ RguDBoReport boReport; /*!< BO report for this common channel */ } RguDStaRspInfo; /** * @brief Status Indication from MAC to RLC for common logical channel. */ typedef struct rguCStaIndInfo { CmLteCellId cellId; /*!< CELL ID */ CmLteLcId lcId; /*!< Logical channel ID */ U32 transId; /*!< Transaction ID */ CmLteRnti rnti; /*!< Temporary CRNTI */ #ifdef EMTC_ENABLE Bool isEmtcPaging; /*!< To Identify whether Paging is EMTC or Lagecy */ CmLteTimingInfo pagingTimingInfo; /*!< paging TimingInfo information */ #endif } RguCStaIndInfo; /** * @brief StaInd info for each logical channel of an UE. */ typedef struct rguLchStaInd { CmLteLcId lcId; /*!< Logical channel ID */ S16 totBufSize; /*!< Total buffer size in bytes scheduled by MAC */ } RguLchStaInd; /** * @brief StaInd info for each TB of a UE. */ typedef struct rguStaIndTb { U8 nmbLch; /*!< Number of logical channels scheduled for this TB */ RguLchStaInd lchStaInd[RGU_MAX_LC];/*!< Buffer size allocated for scheduled logical channels for this TB */ #ifdef LTE_L2_MEAS U32 tbId; /*!< RLC internal TB id */ U16 status; /*!< Status back to RLC ACK/NACK/RGU_NACK_LOSS */ #endif }RguStaIndTb; /** * @brief StaInd from MAC to RLC for dedicated logical channels of an UE. */ typedef struct rguDStaIndPerUe { CmLteRnti rnti; /*!< UE ID */ U32 transId; /*!< Transaction ID */ U8 nmbOfTbs; /*!< Number of TBs. Relevant for MIMO */ RguStaIndTb staIndTb[2]; /*!< StaInd info for MAX 2 TBs */ Bool fillCtrlPdu; /*!< Flag to fill RLC control PDU */ } RguDStaIndPerUe; /** * @brief StaInd from MAC to RLC for dedicated logical channels of all UEs Per TTI. */ typedef struct rguDStaIndInfo { CmLteCellId cellId; /*!< CELL ID */ U8 nmbOfUeGrantPerTti; /*!< Number of TBs. Relevant for MIMO */ RguDStaIndPerUe staInd[RGU_MAX_NUM_UE_PER_TTI]; /*!< StaInd info for MAX number of UEs per TTI */ } RguDStaIndInfo; /** * @brief flowCntrl info per LC. */ typedef struct rguLcFlowCntrlInfo { CmLteLcId lcId; U32 pktAdmitCnt; U32 maxBo4FlowCtrl; /*!< MAX BO of Queued SDUs at RLC beyond which Flow is Controlled */ }RguLcFlowCntrlInfo; /** * @brief flowCntrl info per UE. */ typedef struct rguUeFlowCntrlInfo { CmLteRnti ueId; U32 numLcs; RguLcFlowCntrlInfo lcInfo[RGU_MAX_LC]; }RguUeFlowCntrlInfo; /** * @brief flowCntrlInd from MAC to RLC for dedicated logical channels of all UEs Per TTI. */ typedef struct rguFlowCntrlInd { CmLteCellId cellId; /*!< CELL ID */ U32 numUes; RguUeFlowCntrlInfo ueFlowCntrlInfo[RGU_MAX_NUM_UE_PER_TTI]; }RguFlowCntrlInd; typedef struct rguInfoRingElem { SpId spId; U8 event; Void *msg; }RguInfoRingElem; /* Buffer occupancy status information */ typedef struct rlcMacBOStatus { CmLteCellId cellId; /*!< CELL ID */ CmLteRnti rnti; /*!< UE ID */ Bool commCh; /*!< Common or Dedicated Channel */ CmLteLcId lcId; /*!< Logical channel ID */ S32 bo; /*!< Buffer occupancy reported by RLC */ }RlcMacBOStatus; /* Schedule result report from RLC to MAC */ typedef struct rlcMacLchSta { Bool commCh; /*!