SLice Mapping to RLC DB [ Jira Id - ODUHIGH-371 ]
[o-du/l2.git] / src / 5gnrrlc / rlc_ul.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /**********************************************************************
20   
21         Name:     NR RLC file for uplink and non real time tasks 
22     
23         Type:     C include file
24   
25         Desc:     This file contains helper macros for RLC uplink
26                   and non real time tasks
27  
28         File:     rlc_ul.h
29
30 **********************************************************************/
31 /** 
32  * @file rlc_ul.h
33  * @brief RLC uplink helper macros
34 */
35
36 #ifndef __RLC_ULH__
37 #define __RLC_ULH__
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif /* __cplusplus */
42
43 /**
44  * @def RLC_MEAS_IS_UL_IP_MEAS_ON_FOR_RB
45  *
46  *    This macro is used to check if UL IP throughput measurement is ON
47  *    or off for the passed rb
48  *
49  *    Returns TRUE(non-zero) if measurement is ON else FALSE (zero)
50  *
51  * @param[in] _gCb     RLC UL Cb
52  * @param[in] _rbCb    RLC uplink control block
53  *
54 */ 
55 #define RLC_MEAS_IS_UL_IP_MEAS_ON_FOR_RB(_gCb, _rbCb)  \
56      ((_rbCb->rlcId.rbType == CM_LTE_DRB) && \
57      (_gCb->u.ulCb->rlcL2Cb.measOn[_rbCb->qci] & LKW_L2MEAS_UL_IP) && \
58      (_rbCb->rbL2Cb.measOn & LKW_L2MEAS_UL_IP))
59
60 typedef struct rlcUlUeCb RlcUlUeCb;
61
62 /** 
63  * @brief  Structure to hold a RLC UM PDU segment
64  *
65  * @details
66  *    - lstEnt : This is required for the linked list in which the segments
67  *               are stored
68  *    - seg    : Holds the segment data
69  *    - segSz  : The length of the segment in bytes
70  *    - soEnd  : SOEnd
71  *    - umHdr  : The UM Header for the PDU segment
72  *
73 */
74 typedef struct rlcUmSeg
75 {
76    CmLList   lstEnt;   /*!< List entry for PDU segment */
77    Buffer    *seg;     /*!< PDU segment */
78    MsgLen    segSz;    /*!< Buffer Size */
79    uint16_t  soEnd;    /*!< Segment Offset End */
80    RlcUmHdr  umHdr;    /*!<Um Header */
81 }RlcUmSeg;
82
83 /** 
84  * @brief  Structure to hold a  UM PDU
85  *
86  * @details
87  *    - pdu : Buffer holding the UM PDU data
88  *    - umHdr : UM PDU Header Information
89  *    - pduSz : Length of the PDU excluding the header
90 */
91 typedef struct rlcUmRecBuf
92 {
93    RlcSn       sn;            /*!< Sequence Number */
94    CmLList     lnk;           /*!< Link to the receive buffer list */
95    Bool        allSegRcvd;    /*!< Flag to check whether all seg are received */
96    Bool        noMissingSeg;  /*!< Flag to check all the bytes are received before the last byte of segment */
97    CmLListCp   segLst;        /*!< PDU Segments list */
98    uint16_t    expSo;         /*!< Next expected seg offset */
99    Bool        allRcvd;       /*!< All bytes received or not */
100    RlcUmSeg    *expByteSeg;   /*!< Next expected byte segment */
101    Buffer      *pdu;          /**< Buffer holding the UM PDU */
102    RlcUmHdr    umHdr;         /**< UM PDU Header Information */
103    MsgLen      pduSz;         /**< PDU Size */
104 }RlcUmRecBuf;
105
106 /** 
107  * @brief  Structure to hold uplink information in UM mode for a particular RB
108  *
109  * @details
110  *    - snLen : The sequence number length can be 5 bits or 10 bits. 
111  *              Here it is stored as 1 or 2 (as the number of bytes)
112  *    - recBuf : Holds all the received PDUs. PDU's are removed from this 
113  *               after a SDU is formed or during restablishment
114  *    - umWinSz : The window size is 512 for 10 bits sequence number and 16 
115  *                for 5 bits sequence number
116  *    - partialSdu : This is used to store the partially completed SDU. 
117  *                   It remains till complete SDU is received
118 */
119 typedef struct rlcUmUl
120 {
121    uint8_t       snLen;         /**< Sequence number length */
122    uint8_t       reAsmblTmrInt; /**< Timer Interval */
123    CmLListCp     *recBufLst;    /**!<Reception Buffer List */
124    RlcSn         umWinSz;       /**< UM window size */
125    uint16_t      modBitMask;    /**< Bitmask for modulus to wrap around variables */
126    RlcSn         sn;            /**< Sequence number */
127    RlcSn         vrUr;          /**< VR(UR) - Receive state variable */
128    RlcSn         vrUh;          /**< VR(UH) - Highest received state variable */
129    RlcSn         vrUx;          /**< VR(UX) - Reordering state variable */
130    CmTimer       reAsmblTmr;    /**< Reordering Timer */
131    Buffer        *assembleSdu;  /**< Assemble Sdu - Remains till the complete SDU is received */
132    uint16_t      expSo;         /*!< Expected SO for reassembly */
133    RlcSn         expSn;         /*!< Expected Sn */
134 }RlcUmUl;
135 /*@}*/
136
137 /** 
138  * @brief  Structure to hold a RLC AM PDU segment
139  *
140  * @details
141  *    - lstEnt : This is required for the linked list in which the segments
142  *               are stored
143  *    - seg    : Holds the segment data
144  *    - segSz  : The length of the segment in bytes
145  *    - soEnd  : SOEnd
146  *    - amHdr  : The AM Header for the PDU segment
147  *
148 */
149 typedef struct rlcSeg
150 {
151    CmLList   lstEnt;   /**< List entry for PDU segment */
152    Buffer    *seg;     /**< PDU segment */
153    MsgLen    segSz;    /**< Buffer Size */
154    uint16_t  soEnd;    /**< Segment Offset End */
155    RlcAmHdr  amHdr;    /**< AM header */
156 }RlcSeg;
157
158 /*@}*/
159
160 /** 
161  * @brief  Structure to hold a received AM PDU or segments of a PDU
162  *
163  * @details
164  *    - pdu         : Holds the PDU data
165  *    - pduSz       : Length of the PDU in bytes
166  *    - amHdr       : The AM Header for the PDU  
167  *    - segLst      : The length of the segment in bytes
168  *    - expByteSeg  : The next expected segment for re-ordering
169  *    - expSo       : The next expected SO so to be in sequence
170  *    - allRcvd     : Whether all the segments for this PDU has been recevied
171  *
172 */
173 typedef struct rlcAmRecBuf
174 {
175    CmLList     lnk;           /**< Link to the receive buffer list */
176    Buffer      *pdu;          /**< PDU buffer */
177    MsgLen      pduSz;         /**< Buffer Size */
178    RlcAmHdr    amHdr;         /**< AM header Info */
179    CmLListCp   segLst;        /**< PDU Segments list */
180    RlcSeg      *expByteSeg;   /**< Next expected byte segment */
181    uint16_t    expSo;         /**< Next expected seg offset */
182    Bool        allRcvd;       /**< All bytes received or not */
183    Bool        isDelvUpperLayer; /**< Is it sent to upper layer */ 
184    Bool        noMissingSeg;  /*!< Flag to check all the bytes are received before the last byte of segment */
185 }RlcAmRecBuf;
186
187 /** @addtogroup ammode */
188 /*@{*/
189
190 /** 
191  * @brief  Structure to hold information about an uplink AM Radio Bearer
192  *
193  * @details
194  *    - recBuf            : Reception buffer
195  *    - rxNext            : RX_Next - Receive state variable 
196  *    - rxNextHighestRcvd : RX_Next_Highest_Rcvd - Highest received state variable
197  *    - rxNextStatusTrig  : RX_Next_Status_Trigger - reorderig state variable
198  *    - vrMr              : VR(MR) - Maximum acceptable receive state variable
199  *    - rxHighestStatus   : RX_Highest_Status - Maximum STATUS transmit state variable
200  *    - staTrg           : Flag to indicate if status trigger occured
201  *    - partialSdu       : Partial SDU - Remains till the complete SDU 
202  *                         is received
203  *    - expSn            : The expected sequence number for reassembly  
204  *    - expSo            : The expected SO for reassembly
205  *    - staProhTmr       : The Status Probihit Timer
206  *    - staProhTmrInt    : Status Prohibit Timer interval (in ??)
207  *    - reAsmblTmr         : The Reordering Timer
208  *    - reAsmblTmrInt      : Re-ordering timer interval
209  *    - gatherStaPduInfo : Whether to gather information required to create 
210  *                         the STATUS PDU
211  *
212 */
213 typedef struct rlcAmUl
214 {
215 #ifndef LTE_TDD 
216    CmLListCp   *recBufLst;
217 #else
218 //   RlcAmRecBuf   *recBuf[1024];              /**< Reception buffer */
219 #endif
220    RlcSn         rxNext;                /**< RX_Next:Equvalent to VR(R) in 4G */
221    RlcSn         rxNextHighestRcvd;     /**< RX_Next_Highest_Rcvd: Equvalent to VR(H) in 4G */ 
222    RlcSn         rxNextStatusTrig;      /**< rxNextStatusTrig: Equvalent to VR(X) in 4G*/
223    RlcSn         vrMr;                  /**< VR(MR) */ 
224    RlcSn         rxHighestStatus;       /**< rxHighestStatus: Eqvalent to VR(MS) in 4G*/
225    Bool         staTrg;                /**< Whether status trigger occured */
226    Buffer       *partialSdu;           /**< Partially received SDU */
227    RlcSn         expSn;                 /**< Expected SN for reassembly */
228    uint16_t          expSo;                 /**< Expected SO for reassembly */
229    CmTimer      staProhTmr;            /**< T_status_prohibit Timer */
230    uint16_t          staProhTmrInt;         /**< Timer Interval */
231    CmTimer      reAsmblTmr;              /**< T_reordering Timer */
232    uint8_t           reAsmblTmrInt;           /**< Timer Interval */
233    Bool         gatherStaPduInfo;      /**< Gather STATUS PDU creation info*/
234    Bool         isOutOfSeq;            /**< To identify whether packets are Out-Of-Seq or not */
235    uint8_t           snLen;                 /*!< Sequence number length:12 bit or 18 bit : 5GNR RLC */
236    uint32_t          snModMask;             /*!< (2 Pwr SnLen - 1): 5GNR RLC */
237 }RlcAmUl;
238
239 /*@}*/
240
241 /** 
242  * @brief  Structure to hold uplink information about a Radio Bearer
243  *
244  * @details
245  *    - rlcId    : RLC identifier, uniquely identifies a Radio Bearer
246  *    - lch      : Information (type and id) of the logical channel associated 
247  *                 with this Radio  Bearer.
248  *    - mode     : The mode of the Radio Bearer; UM or AM
249  *    - dir      : The direction of the Radio Bearer, downlink or uplink or both
250  *    - inst     : Id of RLC instance where this Radio Bearer is present. Used
251  *                 to find the instance from the Radio Bearer for memory needs 
252  *                 as different instances might have different memory.
253  *    - k1wuSapId : KWU SAP identifier
254  *    - udxSapId : UDX SAP idenrifier
255  *    - transId  : Stores the transaction identifier used to communicate 
256  *                 with MAC, the same value as sent by MAC is passed back 
257  *                 for it to be able to corelate
258  *    - m        : Mode of the RB (TM/UM/AM)
259  *      - umDl   : Unacknowledged Mode downlink information
260  *      - amDl   : Acknowledged Mode downlink information
261 */
262 typedef struct _rlcUlRbCb
263 {
264 /* kw005.201 added support for L2 Measurement */
265 #ifdef LTE_L2_MEAS
266    RlcL2MeasRbCb    rbL2Cb;              /**< RB measurement L2 Cb */
267    RlcUlUeCb        *ueCb;              /*!< Pointer to UeCb  */
268    uint8_t          qci;                 /**< qci of the RB */
269    RlcL2MeasIpThruput l2MeasIpThruput;   /**< Holds related parameter for
270                                              DL/Ul ip throughput>*/
271 #endif /* LTE_L2_MEAS */
272    CmLteRlcId     rlcId;      /**< RLC Identifier */
273    RlcLchInfo     lch;        /**< Logical Channel Info */
274    Snssai         *snssai;    /**< Snssai Info */
275    CmLteRlcMode   mode;       /**< Entity Mode */
276    uint8_t        dir;        /**< Direction for UL/DL */
277    Inst           inst;       /**< Tapa where Rb created Instance id */
278    SpId           k1wuSapId;   /**< KWU sap Id, to get the KwuSapCb */
279    SpId           udxSapId;   /**< KWU sap Id, to get the KwuSapCb */
280    uint32_t       transId;    /**< Transaction Id for RLC */
281    union          
282    {
283       RlcUmUl   umUl;   /**< UM  mode Ul elements */
284       RlcAmUl   amUl;   /**< AM mode uplink elements */
285    }m;   /**< RLC mode specific Info */
286 }RlcUlRbCb;
287
288 /** 
289  * @brief  Structure to hold mapping between logical channel and Radio Bearer
290  *
291  * @details
292  *    - ulRbCb   : Pointer to the uplink Radio Bearer
293 */
294 typedef struct rlcUlLch
295 {
296    RlcUlRbCb *ulRbCb;   /**< Pointer to Uplink RbCb */
297 }RlcUlLch;                                  
298
299 /**
300 * @brief  Structure to hold ue delete information 
301 *
302 * @details
303 *    - pst      :  Pst 
304 *    - ueDelTmr :  Ue delete timer
305 */
306 typedef struct rlcUeDeleteInfo
307 {
308    Pst        pst;        /*Pst */ 
309    CmTimer    ueDelTmr;   /*Ue delete timer*/
310 }RlcUeDeleteInfo;
311
312 /** 
313  * @brief  Structure to hold uplink information about the Cells
314  *
315  * @details
316  *    - cellHlEnt : Information about cells are stored in a hash table. This is
317  *                  required for that.
318  *    - cellId    : Identity of the cell
319  *    - rbCb      : Radio Bearers in the cell
320  *    - lCh       : Logical Channels in the cell
321  *    - selfPstUl : Pst structure for sending messages to self
322 */
323 typedef struct rlcUlCellCb
324 {
325    CmHashListEnt   cellHlEnt;                 /**< Hash list entry for CellCb */
326    CmLteCellId     cellId;                    /**< Cell Id */
327    RlcUlRbCb        *rbCb[RLC_MAX_RB_PER_CELL]; /**< RbCbs within a Cell */
328    RlcUlLch         lCh[RLC_MAX_LCH_PER_CELL];  /**< Logical channels in a cell */
329    Pst             selfPstUl;
330 }RlcUlCellCb;
331
332 /** 
333  * @brief  Structure to hold uplink information about the UEs
334  *
335  * @details
336  *    - ueHlEnt : Information about cells are stored in a hash table. This is
337  *                required for that.
338  *    - key     : Key to store/find the UE in the hashtable
339  *    - srbCb   : Signaling Radio Bearers configured for the UE
340  *    - drbCb   : Data Radio Bearers configured for the UE
341  *    - lCh     : Logical Channels in the UE
342 */
343 struct rlcUlUeCb
344 {
345    CmHashListEnt   ueHlEnt;                   /**< Hash list entry for UeCb */
346    CmLteRnti       ueId;     /*!< UE Id */
347    CmLteCellId     cellId;   /*!< Cell Id */
348    RlcUlRbCb       *srbCb[RLC_MAX_SRB_PER_UE]; /**< SRB RbCbs within an UE */ 
349    RlcUlRbCb       *drbCb[RLC_MAX_DRB_PER_UE]; /**< DRB RbCbs within an UE */ 
350    RlcUlLch        lCh[RLC_MAX_LCH_PER_UE];    /**< Logical channels of an UE*/
351 /* kw005.201 added support for L2 Measurement */
352 #ifdef LTE_L2_MEAS
353    uint32_t        firstPacketTTI;            /*!< is first packet of the burst */
354    uint16_t        numActRb[LKW_MAX_QCI];     /**< number of RBs Active */
355    Bool            isUlBurstActive;   /*!<Has the Burst started for UL IP Thrpt meas */
356 #endif /* LTE_L2_MEAS */
357    RlcUeDeleteInfo ueDeleteInfo;    /*!<Ue Delete Info */
358 };
359
360 /** 
361  * @brief  Structure to hold temporary data of configuration 
362  *
363  * @details
364  *    - entUlCfgCfm      :  Holds the UL configuration status  
365  *    - rbCb             :  Rb Block
366  */
367 typedef struct rlcUlEntTmpData
368 {
369    RlcEntCfgCfmInfo   entUlCfgCfm; /**< Ul Configuration status*/ 
370    RlcUlRbCb           *rbCb;       /**< Rb Block */
371 }RlcUlEntTmpData;
372
373 /** 
374  * @brief  Structure to hold transaction information in configuration request 
375  *
376  * @details
377  *    - transHlEnt   : List entry for transaction block. 
378  *    - transId      : Transaction Id
379  *    - ueId         : ue Id
380  *    - cellId       : cell Id
381  *    - ueCb         : Ue Block
382  *    - cellCb       : Cell Block
383  *    - cfgInfo      : Configuration Information 
384  *    - ueInfo       : UE Information
385  *    - newUeInfo    : New Ue Information
386  *    - cfgTmpData   : Temporary data per Configuration entity
387 */
388 typedef struct rlcUlCfgTmpData
389 {
390    CmHashListEnt    transHlEnt;                  /**< List Entry of 
391                                                    Transaction*/
392    uint32_t              transId;                     /**< Locally generated Transaction Id */
393    uint32_t              uprLyrTransId;               /**< Transaction Id generated by upper layer. 
394                                                       This is used while sending confirm to the User Layer */
395    CmLteCellId      cellId;                      /**< Cell Id */
396    CmLteRnti        ueId;                        /**< Ue Id */
397    RlcUlUeCb         *ueCb;                       /**< Ue Block */
398    RlcUlCellCb       *cellCb;                     /**< Cell Block */
399    RlcCfgInfo       *cfgInfo;                    /**< Config Information*/
400    CkwUeInfo        *ueInfo;                     /**< Ue Information */
401    CkwUeInfo        *newUeInfo;                  /**< New Ue Information */
402    RlcUlEntTmpData   cfgEntData[CKW_MAX_ENT_CFG]; /**< Entity Data */
403 } RlcUlCfgTmpData;
404 /****************************************************************************
405  *                      Declarations
406  ***************************************************************************/
407 /****************************************************************************
408  *                    Configuration Functions 
409  ***************************************************************************/
410
411 S16 rlcValidateRbCfgParams ARGS ((RlcCb *gCb,
412                                         CmLteRnti   ueId,
413                                         CmLteCellId cellId,
414                                         RlcEntCfgInfo  *cfgToValidate,
415                                         CmStatus        *status));
416 S16 rlcCfgValidateUlRb ARGS (( RlcCb *gCb,
417                                     RlcEntCfgInfo *cfgToValidate,
418                                     RlcUlEntTmpData *cfgInfo, 
419                                     RlcUlCfgTmpData *cfg));
420
421 S16 rlcCfgRollBackUlRb ARGS ((RlcCb *gCb,
422                                     CmLteRnti ueId,
423                                     RlcEntCfgInfo *cfgToValidate,
424                                     RlcUlEntTmpData *cfgTempData));
425
426 Void rlcCfgApplyUlRb ARGS ((RlcCb *gCb,
427                                   RlcEntCfgInfo *cfgToAply,
428                                   RlcUlEntTmpData *cfgTmpData,
429                                   RlcUlCfgTmpData *cfgTmpInfo));
430
431 S16 rlcCfgValidateReEstRb ARGS ((RlcCb *gCb,
432                                        CmLteRnti  ueId,
433                                        CmLteCellId cellId,
434                                        RlcEntCfgInfo *cfgToValidate,
435                                        RlcUlEntTmpData   *cfgTmpData));
436
437 Void rlcCfgApplyReEstUlRb ARGS ((RlcCb *gCb,
438                                       CmLteRnti ueId,
439                                       CmLteCellId cellId,
440                                       Bool sndReEstInd,
441                                       RlcUlEntTmpData *cfgTmpData));
442
443 Void rlcCfgApplyDelUlCell ARGS ((RlcCb *gCb,
444                                       RlcUlCfgTmpData *cfgTmpData));
445
446 S16 rlcCfgValidateDelUlCell ARGS ((RlcCb *gCb,
447                                          CmLteCellId cellId,
448                                          RlcEntCfgInfo *cfgToValidate,
449                                          RlcUlEntTmpData   *cfgTmpData,
450                                          RlcUlCfgTmpData *cfgInfo));
451
452 S16 rlcCfgValidateDelUlUe ARGS ((RlcCb *gCb,
453                                        RlcEntCfgInfo *cfgToValidate,
454                                        RlcUlEntTmpData *cfgTmpData,
455                                        RlcUlCfgTmpData *cfgInfo));
456
457 Void rlcCfgApplyDelUlUe ARGS ((RlcCb *gCb,
458                                     RlcUlCfgTmpData *cfgTmpData));
459
460 Void rlcUlHdlCfgReq ARGS ((RlcCb *gCb,
461                                      RlcUlCfgTmpData *cfgInfo,
462                                      RlcCfgInfo *cfg));
463
464 Void rlcCfgApplyUlUeIdChng ARGS ((RlcCb *gCb,
465                                         CkwUeInfo *ueInfo,
466                                         CkwUeInfo *newUeInfo,
467                                         RlcUlCfgTmpData *cfgTmpInfo));
468
469 S16 rlcCfgValidateUeIdChng ARGS ((RlcCb *gCb,
470                                         CkwUeInfo *ueInfo,
471                                         CkwUeInfo *newUeInfo,
472                                         RlcUlCfgTmpData *cfgTmpInfo));
473
474 /****************************************************************************
475  *                    DBM module Functions 
476  ***************************************************************************/
477 S16 rlcDbmUlInit ARGS ((RlcCb *gCb));
478
479 Void rlcDbmUlDeInit ARGS ((RlcCb *gCb));
480
481 S16 rlcDbmAddUlUeCb ARGS ((RlcCb *gCb,
482                                     CmLteRnti ueId,
483                                     CmLteCellId cellId,
484                                     RlcUlUeCb *ueCb));
485
486 uint8_t rlcDbmFetchUlUeCb ARGS ((RlcCb *gCb,
487                                    CmLteRnti ueId,
488                                    CmLteCellId cellId,
489                                    RlcUlUeCb **ueCb));
490
491 Void rlcDbmDelUlUeCb ARGS ((RlcCb *gCb,   
492                                   RlcUlUeCb *ueCb,
493                                   Bool abortFlag));
494
495 Void rlcDbmDelAllUlUe ARGS ((RlcCb *gCb));
496
497 S16 rlcDbmAddUlCellCb ARGS ((RlcCb *gCb,
498                                       CmLteCellId cellId,
499                                       RlcUlCellCb *cellCb));
500
501 Void rlcDbmFetchUlCellCb ARGS ((RlcCb *gCb, 
502                                       CmLteCellId cellId,
503                                       RlcUlCellCb **cellCb));
504
505 Void rlcDbmDelUlCellCb ARGS ((RlcCb *gCb,  
506                                    RlcUlCellCb *cellCb));
507
508 Void rlcDbmDelAllUlCell ARGS ((RlcCb *gCb));
509
510 Void rlcDbmFetchUlRbCbByRbId ARGS ((RlcCb *gCb, 
511                                           CmLteRlcId *rlcId, 
512                                           RlcUlRbCb **rbCb));
513
514 Void rlcDbmFetchUlRbCbFromLchId ARGS ((RlcCb *gCb, 
515                                              CmLteRnti ueId, 
516                                              CmLteCellId cellId, 
517                                              CmLteLcId lcId,  
518                                              RlcUlRbCb **rbCb));
519
520 Void rlcDbmDelAllUlRb ARGS ((RlcCb *gCb, 
521                                    RlcUlRbCb **rbCbLst, 
522                                    uint8_t numRbCb));
523
524 S16 rlcDbmAddUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
525
526 S16 rlcDbmFindUlTransaction ARGS((RlcCb *gCb, 
527                                         uint32_t transId, 
528                                         RlcUlCfgTmpData **cfg));
529
530 S16 rlcDbmDelUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
531
532 S16 rlcDbmDelAllUlTransactions ARGS((RlcCb *gCb));
533
534 Void rlcDbmUlShutdown ARGS ((RlcCb *gCb));
535
536 /****************************************************************************
537  *                    Transparent Mode Functions 
538  ***************************************************************************/
539 #ifdef CCPU_OPT
540 void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
541                             RlcUlRbCb *rbCb,
542                             CmLteRnti   tCrnti,
543                             Buffer *pdu));
544
545 #else
546 void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
547                             RlcUlRbCb *rbCb,
548                             Buffer *pdu));
549 #endif                                 
550
551 Void rlcTmmUlReEstablish ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
552
553 /****************************************************************************
554  *                    Unacknowledged Mode Functions 
555  ***************************************************************************/
556 #ifdef LTE_L2_MEAS
557 Void rlcUmmProcessPdus ARGS((RlcCb *gCb,
558                                   RlcUlRbCb *rbCb, 
559                                   KwPduInfo *pduInfo,
560                                   uint32_t ttiCnt));
561 #else 
562 Void rlcUmmProcessPdus ARGS ((RlcCb *gCb, 
563                                     RlcUlRbCb *rbCb,
564                                     KwPduInfo *pduInfo));
565 #endif 
566 Void rlcUmmUlReEstablish ARGS ((RlcCb *gCb, 
567                                      CmLteRlcId *rlcId, 
568                                      RlcUlRbCb *rbCb));
569
570 Void rlcUmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb  *rbCb));
571
572
573 Void rlcUmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb)); 
574
575 /****************************************************************************
576  *                    Acknowledged Mode Functions 
577  ***************************************************************************/
578 Void rlcAmmUlReEstablish ARGS((RlcCb *gCb, 
579                                      CmLteRlcId rlcId, 
580                                      Bool sndReEst,
581                                      RlcUlRbCb *rbCb));
582 #ifdef LTE_L2_MEAS
583 Void rlcAmmProcessPdus ARGS((RlcCb *gCb,
584                                   RlcUlRbCb *rbCb, 
585                                   KwPduInfo *pduInfo,
586                                   uint32_t ttiCnt));
587 #else
588 Void rlcAmmProcessPdus ARGS((RlcCb *gCb, 
589                                   RlcUlRbCb *rbCb,
590                                   KwPduInfo *pduInfo));
591 #endif 
592
593 Void rlcAmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
594
595 Void rlcAmmStaProTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
596
597 Void rlcAmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
598
599 /****************************************************************************
600  *                    Utility Functions 
601  ***************************************************************************/
602
603 void rlcUtlStoreUmRecBuf ARGS ((CmLListCp   *recBufLst,
604                                 RlcUmRecBuf *recBuf,
605                                 RlcSn        sn
606                               ));
607 RlcUmRecBuf* rlcUtlGetUmRecBuf ARGS ((CmLListCp        *recBufLst,
608                                       RlcSn              sn
609                                     ));
610 void rlcUtlDelUmRecBuf(RlcCb *gCb, CmLListCp *recBufLst, RlcUmRecBuf  *recBuf);
611
612 Void rlcUtlStoreRecBuf ARGS ((CmLListCp        *recBufLst,
613                                     RlcAmRecBuf       *recBuf,
614                                     RlcSn              sn
615                                    ));
616 RlcAmRecBuf* rlcUtlGetRecBuf ARGS ((CmLListCp        *recBufLst,
617                                   RlcSn              sn
618                                   ));
619 Void rlcUtlDelRecBuf ARGS ((CmLListCp        *recBufLst,
620                                   RlcAmRecBuf       *recBuf,
621                                   RlcCb              *gCb
622                                   ));
623
624 uint8_t rlcUtlRcvFrmMac ARGS ((RlcCb *gCb, KwDatIndInfo *datIndInfo));
625
626 uint8_t rlcUtlSendUlDataToDu ARGS ((RlcCb *gCb,RlcUlRbCb *rbCb, Buffer *sdu));
627
628 #ifdef LTE_L2_MEAS
629 S16 rlcUtlHdlL2TmrExp   ARGS (( RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
630
631 Void rlcUtlCalUlIpThrPutIncTTI ARGS ((RlcCb *gCb, 
632                                              RlcUlRbCb  *rbCb,
633                                              uint32_t ttiCnt));
634
635 Void rlcUtlCalUlIpThrPut ARGS((RlcCb *gCb, 
636                                      RlcUlRbCb *rbCb, 
637                                      Buffer *pdu, 
638                                      uint32_t ttiCnt));
639
640 S16 rlcUtlSndUlL2MeasCfm  ARGS ((RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
641
642 S16 rlcUtlSndUlL2MeasNCfm ARGS ((RlcCb *gCb, 
643                                        RlcL2MeasReqEvt *measReqEvt,
644                                        RlcL2MeasCfmEvt *measCfmEvt));
645
646 S16 rlcUtlL2MeasUlInit ARGS((RlcCb *gCb));
647
648 Void rlcUtlResetUlL2MeasInRlcRb ARGS((RlcCb *gCb,
649                                            RlcL2MeasCb *measCb,
650                                            uint8_t measType));
651
652 S16 rlcUtlValidateIpThL2Meas ARGS ((RlcL2MeasReqEvt *measReqEvt,
653          RlcL2MeasCfmEvt *measCfmEvt));
654
655 #endif /*  LTE_L2_MEAS */
656 /****************************************************************************
657  *                    Activation Functions 
658  ***************************************************************************/
659 S16 rlcUlActvInit ARGS ((Ent ent, 
660                                Inst inst, 
661                                Region region, 
662                                Reason reason));
663
664 S16 rlcUlActvTsk ARGS ((Pst *pst, Buffer *mBuf));
665
666 /****************************************************************************
667  *                    Debug Functions 
668  ***************************************************************************/
669 Void DumpRLCUlDebugInformation ARGS((Void));
670
671 uint8_t rlcProcCommLcUlData(Pst *pst, SuId suId, RguCDatIndInfo  *datInd);
672 uint8_t rlcProcDedLcUlData(Pst *pst, SuId suId, RguDDatIndInfo  *datInd);
673
674 #ifdef __cplusplus
675 }
676 #endif /* __cplusplus */
677
678
679 #endif /* __RLC_ULH__ */
680 /**********************************************************************
681   
682          End of file
683 **********************************************************************/