1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /**********************************************************************
21 Name: LTE MAC SC1 scheduler
25 Desc: Defines required by SC1 scheduler
29 **********************************************************************/
30 /** @file rg_sch_sc1.x
31 @brief This file contains data structures for the SC1 scheduler.
39 #endif /* __cplusplus */
42 typedef Void (*RgSchSc1SvcMngFunc) ARGS((RgSchCellCb *cell, RgSchUeCb *ue, RgSchDlLcCb *svc));
46 * Cell specific downlink scheduling information for Scheduler type 1.
48 typedef struct rgSc1DlCell
50 CmLListCp prioLst[RG_SC1_DL_NUM_Q]; /*!< Priority queues */
51 CmLListCp retxLst[RG_SC1_DL_NUM_Q]; /*!< Retransmission queues */
52 RgSchSc1SvcMngFunc svcMngFunc[RG_SC1_DL_NUM_Q]; /*!< Function for managing
58 * Cell specific uplink scheduling information for Scheduler type 1.
60 typedef struct rgSc1UlCell
62 CmLListCp contResLst;/*!< UEs with pending UL alloc for msg4 */
63 CmLListCp ueTxLst[2];/*!< Queue for UEs Ded Data Trans
64 * ueTxLst[0] for signalling and
65 * ueTxLst[1] for other data */
70 * Uplink information for scheduler per UE.
72 typedef struct rgSc1UlUe
74 CmLList txLnk; /* Lnk to one of Transmission Queues */
75 CmLList contResLnk; /* Lnk to one of Cont Res Queue */
76 Bool srRcvd; /* TRUE if SR reported is yet to be satisfied */
77 U8 qId; /* Id of the Tx Q to which this UE belongs */
82 * Downlink information for scheduler per UE.
84 typedef struct rgSc1DlUe
86 CmLList prioLnk; /*!< To link UE into priority queues */
87 CmLListCp gbrSvcs; /*!< List of GBR services */
88 U8 prio; /*!< Current priority of UE for DL */
89 CmLListCp ambrLst; /*!< To maintain services per priority for a UE */
90 RgSchDlLcCb *ambrSvc;/*!< Points to the current AMBR service */
91 U32 ambr; /*!< UE's Remaining AMBR */
92 U32 effAmbr; /*!< min(svc->bo, ambr)*/
93 CmLListCp schdSvcs; /*!< List of services for which
94 allocation requested */
95 U8 taReqBytes;/*!< Set to the Number of bytes Requested for TA
97 CmLListCp retxHqProcs; /*!< List of RETX Hq Procs in suspension */
98 CmLListCp lcsWithData; /*!< List of services with non-zero effBo */
103 * Downlink HARQ information for SC1 scheduler per UE.
105 typedef struct rgSc1DlHqProc {
106 CmLList retxLnkUe; /*!< To link retransmitting HARQ processes in ue */
107 U8 cqi; /*!< CQI at which the allocation was made */
108 U8 prio; /*!< Priority of the allocation */
113 * Downlink service information for SC1 scheduler per UE.
115 typedef struct rgSc1DlSvc {
116 U32 gbr; /*!< Pending GBR to be satisfied */
117 U32 mbr; /*!< Pending MBR to be satisfied */
118 U32 bo; /*!< BO yet to be satisfied */
119 U32 effGbr; /*!< GBR/BO, lower of the two */
120 U32 effMbr; /*!< MBR/BO, lower of the two */
121 CmLList gbrLnk; /*!< used to maintain svcs to be refreshed */
122 CmLList prioLnk; /*!< Used to queue up services on UE */
123 CmLList schdSvcLnk; /*!< Used to queue up services on UE
124 * scheduled svcs list */
125 U32 reqBytes; /*!< Set to number of bytes Req for Allocation */
126 U16 hdrEstimate; /*!< RLC Hdr est computed during SVC allocn */
127 CmLList lcWithDataLnk;/*!< Used to maintain svc in ue's
128 * lcsWithData List */
132 EXTERN Void rgSCHSc1DlLcRmv ARGS((
137 EXTERN Void rgSCHSc1DlLcBoUpd ARGS((
142 EXTERN Void rgSCHSc1DlProcAddToCellRetx ARGS((
146 EXTERN Void rgSCHSc1DlAllocFnlz ARGS((
148 RgSchCmnDlRbAllocInfo *allocInfo
150 EXTERN Void rgSCHSc1UlAllocFnlz ARGS((
152 RgSchCmnUlRbAllocInfo *allocInfo
154 EXTERN Void rgSCHSc1UlCqiInd ARGS((
157 TfuUlCqiRpt *ulCqiInfo
159 EXTERN S16 rgSCHSc1UlLcgUpd ARGS((
162 RgInfUeDatInd *datInd
165 EXTERN Void rgSCHSc1DlCqiInd ARGS((
171 EXTERN Void rgSCHSc1UlUeRefresh ARGS((
175 EXTERN Void rgSCHSc1UlUeReset ARGS((
179 EXTERN Void rgSCHSc1DlUeRefresh ARGS((
183 EXTERN Void rgSCHSc1DlHndlInActUes ARGS((
187 EXTERN Void rgSCHSc1UlHndlInActUes ARGS((
191 EXTERN Void rgSCHSc1UlActvtUe ARGS((
195 EXTERN Void rgSCHSc1DlActvtUe ARGS((
199 EXTERN Void rgSCHSc1DlInit ARGS((
202 EXTERN Void rgSCHSc1UlInit ARGS((
205 EXTERN S16 rgSCHSc1RgrUlCellCfg ARGS((
210 EXTERN S16 rgSCHSc1RgrDlCellCfg ARGS((
215 EXTERN Void rgSCHSc1UlCellDel ARGS((
218 EXTERN Void rgSCHSc1DlCellDel ARGS((
221 EXTERN S16 rgSCHSc1RgrUlUeCfg ARGS((
227 EXTERN S16 rgSCHSc1RgrDlUeCfg ARGS((
233 EXTERN S16 rgSCHSc1RgrUlUeRecfg ARGS((
239 EXTERN S16 rgSCHSc1RgrDlUeRecfg ARGS((
245 EXTERN Void rgSCHSc1UlUeDel ARGS((
249 EXTERN Void rgSCHSc1DlUeDel ARGS((
253 EXTERN S16 rgSCHSc1RgrLcCfg ARGS((
260 EXTERN S16 rgSCHSc1RgrLcgCfg ARGS((
267 EXTERN S16 rgSCHSc1RgrLcRecfg ARGS((
271 RgrLchRecfg *lcRecfg,
274 EXTERN S16 rgSCHSc1RgrLcgRecfg ARGS((
281 EXTERN Void rgSCHSc1LcgDel ARGS((
286 EXTERN Void rgSCHSc1UpdBsrShort ARGS((
292 EXTERN Void rgSCHSc1UpdBsrTrunc ARGS((
298 EXTERN Void rgSCHSc1UpdBsrLong ARGS((
303 EXTERN Void rgSCHSc1ContResUlGrant ARGS((
307 EXTERN Void rgSCHSc1SrRcvd ARGS((
311 EXTERN Void rgSCHSc1UlSched ARGS((
313 RgSchCmnUlRbAllocInfo *allocInfo
315 EXTERN Void rgSCHSc1DlSched ARGS((
317 RgSchCmnDlRbAllocInfo *allocInfo
319 EXTERN S16 rgSCHSc1RgrUlCellRecfg ARGS((
324 EXTERN Void rgSCHSc1DlUeReset ARGS((
329 EXTERN S16 rgSCHSc1DlUeHqEntInit ARGS((
334 EXTERN S16 rgSCHSc1DlUeHqEntDeInit ARGS((
339 EXTERN S16 rgSCHSc1UlLchCfg ARGS((
346 EXTERN S16 rgSCHSc1UlLchRecfg ARGS((
353 EXTERN S16 rgSCHSc1UlLchDel ARGS((
361 #endif /* __cplusplus */
362 #endif /* __RGSCHSC1X__ */
365 /**********************************************************************
367 **********************************************************************/