UL data path changes at Phy stub, RLC UL UM and DU APP [Issue-ID: ODUHIGH-262]
[o-du/l2.git] / src / 5gnrrlc / kw.x
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**
20   
21         Name:    LTE RLC file 
22     
23         Type:    C include file
24   
25         Desc:    This file contains all the data structures and 
26                  prototypes for LTE RLC.
27  
28         File:    kw.x
29
30 *********************************************************************21*/
31 /** @file kw.x
32 @brief RLC Product Structures, prototypes
33 */
34
35 #ifndef __KWX__
36 #define __KWX__
37  
38 #ifdef __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
41
42 /** @brief Local typedefs */
43 typedef uint32_t    RlcSn;   /*!< Sequence Number length */
44
45 typedef RguDDatIndInfo KwDatIndInfo;
46
47 typedef RguDStaIndInfo KwDStaIndInfo;
48
49 typedef RguPduInfo KwPduInfo; /* kw002.201 : Aligning the structure with RGU */
50
51 typedef struct _amRlcStats
52 {
53    uint32_t   numDLStaPduSent;
54    uint32_t   numDLNacksInStaPdu;
55    uint32_t   numDLBytesUnused;
56    uint32_t   numDLPollTimerExpiresSrb;
57    uint32_t   numDLPollTimerExpiresDrb;
58    uint32_t   numDLMaxRetx;
59    uint32_t   numDLRetransPdus;
60    uint32_t   numULPdusDiscarded;
61    uint32_t   numULReOrdTimerExpires;
62    uint32_t   numULStaPduRcvd;
63    uint32_t   numULNackInStaPduRcvd;
64    uint32_t   numRlcAmCellSduTx; /* Count of SDUs transmitted in DL for all UEs */
65    uint32_t   numRlcAmCellSduBytesTx; /*Total number of bytes transmitted in DL for all Ues */
66    uint32_t   numRlcAmCellRetxPdu; /*Count of PDUs retransmitted for all Ues */
67    uint32_t   numRlcAmMaxRetx; /*Total number of Max-RLC retransmissions hit for all the Ues */
68    uint32_t   numRlcAmCellDupPduRx; /*Count of Duplicate PDUs detected for a UE in UL for all Ues */
69    uint32_t   numRlcAmCellDropOutWinRx; /*Count of PDUs dropped due to Out of Window reception for all Ues */
70    uint32_t   numRlcAmCellSduRx; /* Count of SDUs received in UL for all UEs*/
71    uint32_t   numRlcAmCellSduBytesRx;/*Total number of bytes received in UL for all Ues*/
72    uint32_t   numRlcAmCellNackRx; /*Total number of UL PDUs nacked for all the Ues*/
73    uint32_t   numRlcAmCellWinStall; /*Number of window stalls detected for all the Ues */
74 }AMRLCStats;
75
76 typedef struct _umRlcStats
77 {
78    uint32_t   numDLBytesUnused;
79    uint32_t   numDLMaxRetx;
80    uint32_t   numULPdusDiscarded;
81    uint32_t   numULReOrdTimerExpires;
82    uint32_t   numULPdusOutsideWindow;
83 }UMRLCStats;
84
85 typedef struct _rlcStats
86 {
87    AMRLCStats   amRlcStats;
88    UMRLCStats   umRlcStats;
89 }RLCStats;
90
91 RLCStats gRlcStats;
92
93 /* kw005.201 added support for L2 Measurement */
94 #ifdef LTE_L2_MEAS
95 typedef struct rlcSduSnMap RlcSduSnMap;
96 typedef RguLchMapInfo KwLchMapInfo;
97 #endif /*  LTE_L2_MEAS */
98
99
100 /** @defgroup ummode UM Module Info 
101 */
102 /** 
103  * @brief  Structure to hold an Unacknowledged Mode header
104  *
105  * @details
106  *    - si    : Segmentation Info
107  *    - sn    : Sequence number
108  *    - so    : Segmentation offset
109 */
110 typedef struct rlcUmHdr
111 {
112    uint8_t     si;              /*!< Segmentation Info */
113    RlcSn       sn;              /*!< Sequence number */
114    uint16_t    so;              /*!< Segmentation offset */
115 }RlcUmHdr;
116
117
118 /** 
119  * @brief  Structure to hold an Acknowledged Mode header
120  *
121  * @details
122  *    - dc    : Data/Control PDU
123  *    - rf    : Resegmentation flag
124  *    - p     : Poll bit
125  *    - fi    : Framing Info
126  *    - e     : Extension bit
127  *    - lsf   : Last segment flat
128  *    - sn    : Sequence number
129  *    - so    : Segment offset
130  *    - numLi : Number of length indicators in the following array (li)
131  *    - li    : Length indicators
132 */
133 typedef struct rlcAmHdr
134 {
135    uint8_t     dc;              /*!< Data/Control PDU */
136    uint8_t     p;               /*!< Poll bit */
137    uint8_t     si;              /*!< Segmentation Info: 5GNR */ 
138    RlcSn       sn;              /*!< Sequence number */
139    uint32_t    so;              /*!< Segment offset */
140 }RlcAmHdr;
141
142 /* structures used for encoding/decoding the headers */
143 typedef struct rlcCntrlInfo
144 {
145    uint16_t  val;
146    uint8_t   len;
147    uint16_t  idx;
148    uint8_t   emtBits;
149    uint16_t  e1Idx;
150    uint16_t  e2Idx;   
151    uint8_t   e1eb;
152 }RlcCntrlInfo;
153
154 typedef struct rlcHdrInfo
155 {
156    uint32_t  val;
157    uint8_t   len;
158    uint8_t   eb;
159    uint8_t   *hdr;
160    uint16_t  idx;
161    uint8_t   pEb;
162    uint8_t   pLen;
163 }RlcHdrInfo;
164
165 typedef struct rlcExtHdr
166 {
167    uint32_t val;
168    uint16_t len;
169    uint8_t  hdr;
170    uint8_t  pLen;
171 }RlcExtHdr;
172
173 /** 
174  * @brief  Structure to hold information about a Logical channel
175  *
176  * @details
177  *    - lChId    : Logical channel Id
178  *    - lChType  : Logical channel type 
179 */ 
180 typedef struct rlcLchInfo
181 {
182    CmLteLcId     lChId;     /*!< Logical channel Id */
183    CmLteLcType   lChType;   /*!< Logical channel type */
184 }RlcLchInfo;
185
186 /* kw005.201 added support for L2 Measurement */
187 #ifdef LTE_L2_MEAS
188
189 /** @struct RlcL2Cntr
190  * RLC L2 Counter  */
191 typedef struct rlcL2Cntr
192 {
193    struct
194    {
195       uint32_t  numActvUe;        /*!< number of active Ue */
196       uint32_t  sampOc;           /*!< Total number of sampling occasion */
197    }actUe;
198    struct
199    {
200       uint32_t  dLoss;            /*!< Total number of lost packets */  
201       uint32_t  posPkts;          /*!< Total number of positively acknowlegded 
202                                   packets */
203    }uuLoss;
204    struct                    /*!< For DL IP throughput */
205    {
206       uint32_t volSummation;      /*!< Sum of data in bytes */
207       uint32_t timeSummation;     /*!< Sum of time difference in milli sec*/
208    }dlIpThruput;
209    struct                    /*!< For UL IP throughput */
210    {
211       uint32_t volSummation;      /*!< Sum of data in bytes */
212       uint32_t timeSummation;     /*!< Sum of time difference in milli sec*/
213    }ulIpThruput;
214    /* Discard new changes starts */
215    struct                    /*!< For UL IP throughput */
216    {
217       uint32_t discSdus;          /*!< Total RLC SDUs discarded */
218       uint32_t totSdus;           /*!< Total RLC SDUs received */
219    }dlDisc;
220    struct                    /*!< For UL IP throughput */
221    {
222       uint64_t sduDelay;          /*!< Total SDUs delay */
223       uint32_t numSdus;
224    }dlPjSduDelay;
225    uint32_t    totDrbsPerQci;     /*!< Total Count of DRB's for this QCI */
226 }RlcL2Cntr;
227
228 struct rlcSduSnMap
229 {
230    CmLList     lstEnt;
231    Bool        failMarked;
232    Bool        fullySent;
233    uint32_t    sduId;
234    uint16_t    numSn;
235    uint16_t    snList[RLC_MAX_PDU_MAP];
236    uint16_t    harqAck;
237    uint16_t    reqSent;
238    uint16_t    rspRcvd;
239 };
240
241 typedef struct rlcSnSduMap
242 {
243    uint16_t         sn;
244    CmLteLcId        lChId;              /*!< Logical channel Id */
245    uint16_t         numSdu;
246 #ifdef LTE_RLC_R9
247    Bool        isBurstSplitted;    /*!< true: burst for this LCH is splitted */
248 #endif /* LTE_RLC_R9 */
249    RlcSduSnMap  *sduList[RLC_MAX_DL_LI];
250 }RlcSnSduMap;
251
252 typedef struct rlcTbSnMap
253 {
254    CmHashListEnt  hlTbEnt;
255    uint32_t       tbId;
256    uint16_t       prevNumSn;
257    uint16_t       numSn;
258    RlcSnSduMap    snSduMap[RGU_MAX_PDU * RGU_MAX_LC];
259 }RlcTbSnMap;
260
261 typedef struct rlcL2MeasCbUeMeasInfo
262 {
263    CmLteRnti   ueId;                    /*!< UE ID (Used only for IP Throughput
264                                              in UL/DL */
265    CmLteCellId cellId;                  /*!< UE ID (Used only for IP Throughput
266                                              in UL/DL */
267    Bool        isValid;                 /*! < is this UE entry valid */
268    uint8_t     numLcId;                 /*!< Holds the number of LCh for which Ul Ip
269                                              measurement is ON */
270    uint8_t     lcId[RLC_MAX_LCH_PER_UE]; /*!< Holds the list of LCh for which Ul ip
271                                              measurement is ON */
272    RlcL2Cntr    measData[LKW_MAX_QCI];
273    uint16_t     numQci;                  /*!< number of valid qcI */
274    uint8_t      qci[LKW_MAX_QCI];        /*!< list of valid qcI */
275 }RlcL2MeasCbUeMeasInfo;
276
277 typedef struct rlcL2MeasCbIpThMeas
278 {
279    uint8_t                   numUes;
280    uint8_t                   totNumQci;
281    uint8_t                   totQci[LKW_MAX_QCI];
282    RlcL2MeasCbUeMeasInfo ueInfoLst[LKW_MAX_UE]; /*Added for handling meas for multiple ues*/ 
283 }RlcL2MeasCbIpThMeas;
284
285 typedef struct rlcL2MeasCbNonIpThMeas
286 {
287    uint16_t    numSamples;              /*!< Number of samples to take on numActUe */
288    uint16_t    numQci;                  /*!< number of valid qcI */
289    uint8_t     qci[LKW_MAX_QCI];        /*!< list of valid qcI */
290    RlcL2Cntr   measData[LKW_MAX_QCI];   /*!< Measurement CB */
291 }RlcL2MeasCbNonIpThMeas;
292
293 typedef union rlcL2MeasCbIpNonIpThMeasVal
294 {
295    RlcL2MeasCbIpThMeas    ipThMeas;
296    RlcL2MeasCbNonIpThMeas nonIpThMeas;
297 }RlcL2MeasCbIpNonIpThMeasVal;
298
299 /** @struct RlcL2MeasCb
300  * RLC L2 Measurement CB */
301 typedef struct rlcL2MeasCb
302 {
303    uint8_t        measType;        /*!< Bit-wise set measurement types */
304    RlcL2MeasCbIpNonIpThMeasVal val;   /* Union of IP tpt or non-ip tpt */
305 }RlcL2MeasCb;
306
307 /** @struct RlcL2MeasEvtCb
308  * RLC L2 Measurement Evt CB */
309 typedef struct rlcL2MeasEvtCb
310 {
311    uint32_t      transId;                /*!< TransId of Measurement Req */
312    uint32_t      cbIdx;                  /*!< TransId of Measurement Req */
313    CmTimer       l2Tmr; /* NOT USED */                 /*!< L2 Timer per request */
314    TmrCfg        l2TmrCfg; /* NOT USED */               /*!< Time period of measurement */
315    RlcL2MeasCb   measCb;                 /*!< Measurement CB */ 
316    EpcTime       startTime; /* NOT USED */            /*!<  start time when meas starts*/ 
317 }RlcL2MeasEvtCb;
318
319 /** @struct RlcL2MeasRbCb
320  * RLC L2 Measurement Rb CB */
321 typedef struct rlcL2MeasRbCb
322 {
323    uint8_t        measOn;                      /*!< Measurements that are running */ 
324    RlcL2Cntr      *l2Sts[RLC_MAX_L2MEAS_EVT];  /*!< L2 Mesurement statistics */     
325 }RlcL2MeasRbCb;
326
327 /** @struct RlcL2Cb
328  * RLC L2  CB */
329 typedef struct rlcL2Cb
330 {
331    uint16_t        rlcNumMeas;                   /*!< Number of measurements going on */
332    RlcL2MeasEvtCb  rlcL2EvtCb[LKW_MAX_L2MEAS];  /*!< Pointers to Measurement Cb */
333    uint8_t         measOn[LKW_MAX_QCI];          /*!< Measurement on */
334    uint32_t        numActUe[LKW_MAX_QCI];       /*!< Measurement on */
335 }RlcL2Cb;
336
337
338 typedef enum _dlIpThrputState
339 {
340    KW_DL_IPTHRU_RESET = 0,
341    KW_DL_IPTHRU_BURST_STARTED,
342    KW_DL_IPTHRU_BURST_CONTINUE,
343    KW_DL_IPTHRU_BURST_COMPLETED
344 }DlIpThrputState;
345
346 /** 
347 * @struct rlcL2MeasSduLst
348 * Structure to hold parameters of 
349 * burst sdus in DL for a RB */
350 typedef struct rlcOutStngSduInfo
351 {
352    uint32_t  sduId;            /*!< SDU Id of sdu */
353    MsgLen    sduLen;           /*!< Size of sdu */
354    uint32_t  numTb;            /*!< Hold the number of TBs for this sdu in DL */
355 }RlcOutStngSduInfo;
356
357 /** 
358 * @struct rlcL2MeasDlIpTh
359 * Structure to hold parameters for DL ip 
360 * throughput for a RB */
361 typedef struct rlcL2MeasDlIpTh
362 {
363    Bool               isBurstAct;            /*!< Set to TRUE when burst is active in DL */
364    uint64_t           burstStartTime;        /*!< Holds the starting time of the burst */
365    uint32_t           burstEndSduId;         /*!< Sdu ID when burst ends */
366    uint8_t            lastSduIdx;            /*!< Holds the index of last outStanding sdu */
367    RlcOutStngSduInfo  outStngSduArr[RLC_L2MEAS_MAX_OUTSTNGSDU];/*!< Hold the burst sdu information */
368 }RlcL2MeasDlIpTh;
369
370 /** 
371 * @struct rlcL2MeasIpThruput
372 * Structure to hold parameters for UL/DL ip 
373 * throughput for a RB */
374 typedef struct rlcL2MeasIpThruput
375 {
376    uint32_t         dataVol;                 /*!< Holds volume of new data in bytes
377                                               for UL IP throughput */
378    uint32_t         ttiCnt;                  /*!< Holds ttiCnt received from MAC in UL */
379    uint32_t         prevTtiCnt;        /*!< Holds previous ttiCnt received from MAC in UL */
380    RlcL2MeasDlIpTh  dlIpTh;
381 }RlcL2MeasIpThruput;
382
383 #endif /* LTE_L2_MEAS */
384
385 /** 
386  * @brief  Structure to hold an UE key for the UE hast lists
387  *
388  * @details
389  *    - ueId    : UE Id
390  *    - cellId  : Cell Id 
391 */
392 typedef struct rlcUeKey
393 {
394    CmLteRnti     ueId;     /*!< UE Id */
395    CmLteCellId   cellId;   /*!< Cell Id */
396 }RlcUeKey;
397
398 /** 
399  * @brief  Structure to hold an information about the CKW SAP
400  *
401  * @details
402  *    - pst   : Service user post structure
403  *    - spId  : Service provider Id
404  *    - suId  : Service user Id
405  *    - state : State of the SAP
406  *    - sts   : SAP specific statistics 
407 */
408 typedef struct rlcCkwSapCb
409 {
410    Pst           pst;     /*!< Service user post structure */
411    SpId          spId;    /*!< Service provider Id */
412    SuId          suId;    /*!< Service user Id */
413    uint8_t       state;   /*!< Sap Status */
414    RlcCkwCntSts   sts;     /*!< Statistics */
415 }RlcCkwSapCb;
416
417 /** 
418  * @brief  Structure to hold an information about the KWU SAP
419  *
420  * @details
421  *    - pst   : Service user post structure
422  *    - spId  : Service provider Id
423  *    - suId  : Service user Id
424  *    - state : State of the SAP
425  *    - sts   : SAP specific statistics 
426 */
427 typedef struct rlcKwuSapCb
428 {
429    Pst           pst;     /*!< Service user post structure */
430    SpId          spId;    /*!< Service provider Id */
431    SuId          suId;    /*!< Service user Id */
432    uint8_t       state;   /*!< Sap Status */
433    RlcKwuSapSts  sts;     /*!< Statistics */
434 }RlcKwuSapCb;
435
436 /** 
437  * @brief  Structure to hold an information about the RGU SAP
438  *
439  * @details
440  *    - pst       : Service user post structure
441  *    - spId      : Service provider Id
442  *    - suId      : Service user Id
443  *    - state     : State of the SAP
444  *    - bndTmr    : Bind Timer
445  *    - bndTmrInt : Timer Interval
446  *    - retryCnt  : Bind Retry Count
447 */
448 typedef struct rlcRguSapCb
449 {
450    Pst       pst;         /*!< Service user post structure */
451    SpId      spId;        /*!< Service provider Id */
452    SuId      suId;        /*!< Service user Id */
453    uint8_t   state;       /*!< Sap Status */
454    CmTimer   bndTmr;      /*!< Bind Timer */
455    uint16_t  bndTmrInt;   /*!< Timer Interval */
456    uint8_t   retryCnt;    /*!< Bind Retry Count */
457 }RlcRguSapCb;
458
459 /** 
460  * @brief  Structure to hold an information about the UDX UL SAP
461  *
462  * @details
463  *    - pst       : Service user post structure
464  *    - spId      : Service provider Id
465  *    - suId      : Service user Id
466  *    - state     : State of the SAP
467  *    - bndTmr    : Bind Timer
468  *    - bndTmrInt : Timer Interval
469  *    - retryCnt  : Bind Retry Count
470 */
471 typedef struct rlcUdxUlSapCb
472 {
473    Pst       pst;         /*!< Service user post structure */
474    SpId      spId;        /*!< Service provider Id */
475    SuId      suId;        /*!< Service user Id */
476    uint8_t   state;       /*!< Sap Status */
477    CmTimer   bndTmr;      /*!< Bind Timer */
478    uint16_t  bndTmrInt;   /*!< Timer Interval */
479    uint8_t   retryCnt;    /*!< Bind Retry Count */
480 }RlcUdxUlSapCb;
481
482 /** 
483  * @brief  Structure to hold an information about the UDX DL SAP
484  *
485  * @details
486  *    - pst       : Service user post structure
487  *    - spId      : Service provider Id
488  *    - suId      : Service user Id
489  *    - state     : State of the SAP
490 */
491 typedef struct rlcUdxDlSapCb
492 {
493    Pst     pst;     /*!< Service user post structure */
494    SpId    spId;    /*!< Service provider Id */
495    SuId    suId;    /*!< Service user Id */
496    uint8_t state;   /*!< Sap Status */
497 }RlcUdxDlSapCb;
498
499 /** 
500  * @brief  Structure to hold info about memory to be freed
501  *
502  * @details
503  *    - sduLst  : The SDU queues are appended to this queue, used 
504  *                for the UM SDU queues
505  *    - txLst   : Stores to be released AM Mode TX PDUs
506  *    - reTxLst : Stores to be released AM Re TX PDU's
507  *    - rbLst   : List of AM DL RBs to be freed 
508 */
509 typedef struct rlcDlDataToBeFreed
510 {
511    CmLListCp   sduLst;     /*!< Queue of SDU's to be freed  */
512    CmLListCp   txLst;     /*!< Stores to be released TX PDUs */
513    CmLListCp   reTxLst;   /*!< Stores to be released ReTX PDUs */
514    CmLListCp   rbLst;     /*!< List of AM DL RBs to be freed */
515 }RlcDlDataToBeFreed;
516
517 /** 
518  * @brief  Structure to hold an information about DL RLC instance
519  *
520  * @details
521  *    - numKwuSaps        : Number of RLC KWU Saps
522  *    - numUdxSaps        : Number of RLC UDX Saps
523  *    - rlcKwuDlSap          : Pointer to the array of KWU SAPS
524  *    - udxDlSap          : Pointer to the array of UDX SAPS
525  *    - rguDlSap          : RGU Sap Control Block
526  *    - cellLstCp         : Hashlist of CellCb
527  *    - ueLstCp           : Hashlist of UeCb 
528  *    - toBeFreed         : Pointer to data to be freed
529  *    - shutdownReveived  : Request for shutdown recevied or not
530  *    - eventInQueue      : Event for cleanup exists in queue or not
531  */
532 typedef struct rlcDlCb
533 {
534    uint8_t             numKwuSaps;         /*!< Number of RLC Data Saps */
535    uint8_t             numUdxSaps;         /*!< Number of RLC Data Saps */
536    RlcKwuSapCb         *rlcKwuDlSap;          /*!< KWU Sap Control Block */
537    RlcUdxDlSapCb       *udxDlSap;          /*!< UDX DL Sap Control Block */
538    RlcRguSapCb         *rguDlSap;          /*!< RGU Sap Control Block */
539    CmHashListCp        cellLstCp;          /*!< Hashlist of CellCb */
540    CmHashListCp        ueLstCp;            /*!< Hashlist of UeCb */
541    RlcDlDataToBeFreed  toBeFreed;          /*!< Pointer to data to be freed */        
542    Pst                 selfPst;            /*!< Pst to post events to self */
543    Buffer              *selfPstMBuf;       /*!< Buffer used for self post */
544    Bool                shutdownReceived;   /*!< Request for shutdown recevied */
545    Bool                eventInQueue;       /*!< Event exists in queue or not */
546 #ifdef LTE_L2_MEAS
547    RlcL2Cb              rlcL2Cb; /*!< Control Block for L2 Measurements in RLC */
548 #endif /* LTE_L2_MEAS */
549 }RlcDlCb;
550
551 /** 
552  * @brief  Structure to hold an information about UL RLC instance
553  *
554  * @details
555  *    - ckwSap       : CKW Sap Conrol Block
556  *    - numKwuSaps   : Number of RLC KWU Saps
557  *    - numUdxSaps   : Number of RLC UDX Saps
558  *    - udxUlSap     : Pointer to the array of UDX SAPS 
559  *    - rlcKwuUlSap     : Pointer to the array of KWU SAPS
560  *    - rguUlSap     : RGU Sap Control Block
561  *    - cellLstCp    : Hashlist of CellCb
562  *    - ueLstCp      : Hashlist of UeCb 
563  *    - transIdLstCp : Hashlist of cfg trans
564  */
565 typedef struct rlcUlCb
566 {
567    RlcCkwSapCb     ckwSap;         /*!< CKW Sap Conrol Block */ 
568    uint8_t         numKwuSaps;     /*!< Number of RLC Data Saps */
569    uint8_t         numUdxSaps;     /*!< Number of RLC Data Saps */
570    RlcUdxUlSapCb   *udxUlSap;      /*!< UDX DL Sap Control Block */
571    RlcKwuSapCb     *rlcKwuUlSap;      /*!< KWU Sap Control Block */
572    RlcRguSapCb     *rguUlSap;      /*!< RGU Sap Control Block */
573    CmHashListCp   cellLstCp;      /*!< Hashlist of CellCb */
574    CmHashListCp   ueLstCp;        /*!< Hashlist of UeCb */
575    CmHashListCp   transIdLstCp;   /*!< Hashlist of cfg trans */
576    uint8_t        rlcUlUdxEventType;  /*!<Ue Create/ReConfig> */
577 /* kw005.201 added support for L2 Measurement */
578 #ifdef LTE_L2_MEAS
579    RlcL2Cb        rlcL2Cb; /*!< Control Block for L2 Measurements in RLC */
580 #endif /* LTE_L2_MEAS */
581 }RlcUlCb;
582
583
584 /** 
585  * @brief  Structure to hold an information about a RLC instance
586  *
587  * @details
588  *    - init    : Task Initialization Info
589  *    - genCfg  : General Configuration
590  *    - genSts  : General Statistics
591  *    - trcLen  : Trace Length
592  *    - trcMask : Trace Mask
593  *    - rlcTq    : Timer queue
594  *    - rlcTqCp  : Timer queue control point
595  *    - u       : Union depending on whether the instance is UL or DL
596  *      - ulCb  : UL instance Control Block
597  *      - dlCb  : DL instance Control Block
598  */
599 typedef struct rlcCb
600 {
601    TskInit    init;               /*!< Task Initialization Info */
602    RlcGenCfg   genCfg;             /*!< General Configuration Structure */
603    RlcGenSts   genSts;             /*!< General Statistics */
604    S16        trcLen;             /*!< Trace Length */
605    uint8_t         trcMask;            /*!< Trace Mask */
606    CmTqType   rlcTq[RLC_TMR_LEN];   /*!< Timer queue */
607    CmTqCp     rlcTqCp;             /*!< Timer queue control point */
608    union 
609    {
610       RlcUlCb   *ulCb;   /*!< Ul Control Block */
611       RlcDlCb   *dlCb;   /*!< Dl Control Block */
612    } u;
613    uint8_t    dlSduId;   /*!< Downlink SDU ID */
614 }RlcCb;
615
616 RlcCb *rlcCb[MAX_RLC_INSTANCES];   /*!< RLC global control block */
617
618 /****************************************************************************
619  *                      Declarations
620  ***************************************************************************/
621 S16 rlcGetSId ARGS((SystemId *s));
622
623 Void rlcTmrExpiry ARGS((PTR cb, S16 tmrEvnt));
624
625 S16 rlcLmmSendTrc ARGS ((RlcCb *gCb, Event event, Buffer *mBuf));
626
627 void rlcStartTmr ARGS((RlcCb *gCb, PTR cb, S16 tmrEvnt));
628
629 void rlcStopTmr  ARGS((RlcCb *gCb, PTR cb, uint8_t tmrType));
630
631 bool rlcChkTmr ARGS((RlcCb *gCb,PTR cb, S16 tmrEvnt));
632
633 #ifdef LTE_L2_MEAS
634 Void rlcLmmSendAlarm ARGS (( RlcCb *gCb,
635                                    uint16_t category, 
636                                    uint16_t event, 
637                                    uint16_t cause, 
638                                    SuId suId, 
639                                    uint32_t ueId, 
640                                    uint8_t qci));
641
642 S16 RlcMiRlcDlL2MeasReq ARGS (( Pst *pst, RlcL2MeasReqEvt *measReqEvt ));
643 S16 RlcMiRlcDlL2MeasSendReq ARGS((Pst *pst,uint8_t measType));
644 S16 RlcMiRlcDlL2MeasStopReq ARGS((Pst *pst,uint8_t measType));
645 S16 RlcMiRlcUlL2MeasReq ARGS (( Pst *pst, RlcL2MeasReqEvt *measReqEvt ));
646 S16 RlcMiRlcUlL2MeasSendReq ARGS((Pst *pst,uint8_t measType));
647 S16 RlcMiRlcUlL2MeasStopReq ARGS((Pst *pst,uint8_t measType));
648 Void rlcUtlPlcMeasDatInL2Sts ARGS((RlcL2Cntr *measData, 
649                                          RlcL2MeasRbCb *rbL2Cb,
650                                          uint8_t measType));
651 #else /* LTE_L2_MEAS */
652 Void rlcLmmSendAlarm ARGS ((RlcCb *gCb,
653                                   uint16_t category, 
654                                   uint16_t event, 
655                                   uint16_t cause, 
656                                   SuId suId, 
657                                   uint32_t ueId));
658 #endif /* LTE_L2_MEAS */
659
660 #ifdef __cplusplus
661 }
662 #endif /* __cplusplus */
663
664 #endif /* __KWX__ */
665
666 \f  
667 /********************************************************************30**
668   
669          End of file
670 **********************************************************************/