Adding new commiter to ODU-High repo
[o-du/l2.git] / src / 5gnrrlc / rlc_dl_ul_inf.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:    UDX  Control Interface
22     
23         Type:    C include file
24   
25         Desc:    This file Contains the Data structures for and prototypes
26                   UDX Interface
27  
28         File:    rlc_dl_ul_inf.h
29   
30 **********************************************************************/
31
32 #ifndef __RLC_DL_UL_INF_H__
33 #define __RLC_DL_UL_INF_H__
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38
39
40 /** @file rlc_dl_ul_inf.h
41     @brief UDX Interface File (ckw.h)
42 */
43  
44 /* UDX Interface Hash Defines */
45
46 /* Loose Coupling define */
47 #define UDX_SEL_LC            0     /*!< Loose Coupling Option */
48 #define UDX_SEL_LWLC          1
49 #define RLC_MAX_UDX 3
50
51
52 /* CKW Interface defines */
53 #define UDX_MAX_ENT_CFG       24    /*!< Maximum number of entities to configure */
54
55 #define   ERRUDX 0
56 #define   EUDXXXX 0
57 /* ckw_h_001.main_3 added support for L2 Measurement */   
58 #ifdef LTE_L2_MEAS
59 #define UDX_MAX_QCI           10
60 #endif
61 /* CKW Interface configuration type */
62 #define UDX_CFG_ADD           1     /*!< Add RLC Entity */
63 #define UDX_CFG_MODIFY        2     /*!< Modify RLC Entity */
64 #define UDX_CFG_DELETE        3     /*!< Delete RLC entity */
65 #define UDX_CFG_REESTABLISH   4     /*!< Re-establish RLC entity */
66 #define UDX_CFG_DELETE_UE     5     /*!< Release RLC entities per UE */
67 #define UDX_CFG_DELETE_CELL   6     /*!< Release RLC entities per Cell */
68
69 /* CKW RLC entity direction configuration */
70 #define UDX_CFG_DIR_UL        1     /*!< Unlink direction */
71 #define UDX_CFG_DIR_DL        2     /*!< Downlink direction */
72 #define UDX_CFG_DIR_BOTH      3     /*!< Both Downlink and Unlink */
73
74 /* CKW Configuration confirmations */
75 #define UDX_CFG_CFM_OK        1     /*!< Configuration confirmation success */
76 #define UDX_CFG_CFM_NOK       2     /*!< Configuration confirmation failed */
77
78 /***********************************************************************
79         Defines for  CKW Interface Events
80  ***********************************************************************/
81 #define UDX_EVT_BND_REQ              0x01   /*!< Bind Request */
82 #define UDX_EVT_BND_CFM              0x02   /*!< Bind Confirm */
83 #define UDX_EVT_UBND_REQ             0x03   /*!< Unbind Request */
84 #define UDX_EVT_CFG_REQ              0x04   /*!< Config Request */
85 #define UDX_EVT_CFG_CFM              0x05   /*!< Config Confirm */
86 #define UDX_EVT_UEIDCHG_REQ          0x06   /*!< UE Id Change Request */
87 #define UDX_EVT_UEIDCHG_CFM          0x07   /*!< UE Id Change Confirm */
88 #define UDX_EVT_STA_UPD_REQ          0x08
89 #define UDX_EVT_STA_UPD_CFM          0x09
90 #define UDX_EVT_STA_PDU_REQ          0x0A
91 #define UDX_EVT_STA_PHBT_TMR_START   0x0B
92 #define UDX_EVT_DL_CLEANUP_MEM       0x10   /*!< To cleanup memory in DL inst */
93
94 /***********************************************************************
95         Defines for Measurements 
96  ***********************************************************************/
97 #define UDX_EVT_L2MEAS_REQ           0x11 
98 #define UDX_EVT_L2MEAS_SEND_REQ      0x12 
99 #define UDX_EVT_L2MEAS_STOP_REQ      0x13 
100
101 typedef struct rlcNackInfo
102 {
103    uint8_t nackRange;
104    uint8_t isSegment;
105    uint32_t sn;      /*!< Nack Sn */
106    uint16_t soStart; /*!< Segment offset start */
107    uint16_t soEnd;   /*!< Segment offset End */
108 }RlcNackInfo;
109
110 typedef struct rlcUdxStaPdu
111 {
112    uint32_t ackSn;
113    /* TODO : RLC_MAX_NACK_CNT should set to MAx SR delay 
114       It is tradeoff to consider array based instead of dynamic
115       as there are chances where we might loose Status information
116       on spill over*/
117    uint8_t nackCnt;         /* Cnt of Nacks in the array*/
118    RlcNackInfo nackInfo[RLC_MAX_NACK_CNT];
119 }RlcUdxStaPdu;
120
121 typedef struct rlcUdxBufLst
122 {
123    CmLListCp rlsTxLst;      /*!< Stores to be released Tx PDUs */
124    CmLListCp rlsRetxLst;    /*!< Stores to be released Retx PDUs */
125    CmLListCp rlsSduLst;     /*!< Stores to be released SDUs*/
126 }RlcUdxBufLst;
127
128 typedef struct rlcStatusPdu
129 {
130    uint32_t     ackSn;
131    RlcNackInfo  nackInfo[RLC_MAX_NACK_CNT];
132    uint16_t     nackCount;
133    uint16_t     controlBo;
134 }RlcUdxDlStaPdu;
135 /* ### Umapathi*/
136
137 /**
138   * @brief
139   * UDX APIs
140   */
141 typedef S16 (*UdxBndCfm) ARGS((Pst* pst, SuId suId,uint8_t  status ));
142
143 typedef S16 (*UdxBndReq) ARGS((Pst* pst, SuId suId,SpId  spId ));
144
145 typedef S16 (*UdxUbndReq) ARGS((Pst* pst, SuId suId,Reason reason));
146
147 typedef S16 (*UdxCfgReq) ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
148
149 typedef S16 (*UdxCfgCfm) ARGS((Pst* pst,SuId suId,RlcCfgCfmInfo *cfmInfo));
150
151 typedef S16 (*UdxStaUpdReq) ARGS((Pst* pst,
152                                   SpId spId,
153                                   CmLteRlcId *rlcId,
154                                   RlcUdxStaPdu *pStaPdu ));
155
156 typedef S16 (*UdxUeIdChgReq) ARGS((Pst *pst, 
157                                    SpId spId, 
158                                    uint32_t transId, 
159                                    CkwUeInfo *ueInfo, 
160                                    CkwUeInfo *newUeInfo));
161
162 typedef S16 (*UdxUeIdChgCfm) ARGS((Pst *pst, 
163                                    SuId suId, 
164                                    uint32_t transId, 
165                                    CmStatus status));
166
167 typedef S16 (*UdxStaUpdCfm) ARGS((Pst* pst,
168                                   SuId  suId,
169                                   CmLteRlcId *rlcId,
170                                   RlcUdxBufLst *pBufLst));
171
172 typedef S16 (*UdxStaPduReq) ARGS((Pst* pst,
173                                   SpId  spId, 
174                                   CmLteRlcId *rlcId,
175                                   RlcUdxDlStaPdu *pStaPdu));
176
177 typedef S16 (*UdxStaProhTmrStart) ARGS((Pst* pst,
178                                          SuId  suId,
179                                          CmLteRlcId  *rlcId));
180
181 #ifdef LTE_L2_MEAS
182 typedef S16 (*UdxL2MeasReq) ARGS((Pst* pst,
183                                 RlcL2MeasReqEvt *measReqEvt));
184
185 typedef S16 (*UdxL2MeasSendReq) ARGS((Pst* pst,
186                                     uint8_t measType));
187
188 typedef S16 (*UdxL2MeasStopReq) ARGS((Pst* pst,
189                                     uint8_t measType));
190 #endif
191
192 #ifdef LCUDX
193 S16 cmPkUdxBndCfm ARGS((Pst* pst, SuId suId,uint8_t  status ));
194 S16 cmPkUdxBndReq ARGS((Pst* pst, SuId suId,SpId  spId ));
195 S16 cmPkUdxUbndReq ARGS((Pst* pst, SuId suId,Reason reason));
196 S16 cmPkUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
197 S16 cmPkUdxCfgCfm ARGS(( Pst* pst,SuId suId,RlcCfgCfmInfo *cfmInfo));
198 S16 cmPkUdxStaUpdReq ARGS((Pst* pst,SpId spId,CmLteRlcId *rlcId,
199                                RlcUdxStaPdu         *pStaPdu ));
200 S16 cmPkUdxUeIdChgReq ARGS((Pst *pst, SpId spId, uint32_t transId, 
201                                   CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
202 S16 cmPkUdxUeIdChgCfm ARGS((Pst *pst, SuId suId, uint32_t transId, 
203                                    CmStatus status));
204
205
206 S16 cmPkUdxStaUpdCfm ARGS((Pst* pst,SuId  suId,CmLteRlcId  *rlcId,
207                              RlcUdxBufLst  *pBufLst));
208
209 S16 cmPkUdxStaPduReq ARGS(( Pst* pst,SpId  spId, CmLteRlcId *rlcId,
210                              RlcUdxDlStaPdu  *pStaPdu ));
211 S16 cmPkUdxStaProhTmrStart ARGS((Pst *pst, 
212                                         SpId spId, 
213                                         CmLteRlcId *rlcId));
214
215 #ifdef LTE_L2_MEAS
216 S16 cmPkUdxL2MeasReq ARGS((Pst *pst, RlcL2MeasReqEvt *measReqEvt)); 
217 S16 cmPkUdxL2MeasSendReq ARGS((Pst *pst, uint8_t measType)); 
218 S16 cmPkUdxL2MeasStopReq ARGS((Pst *pst, uint8_t measType)); 
219 #endif
220
221 S16 cmUnpkUdxBndCfm ARGS((UdxBndCfm func,Pst* pst, Buffer *mBuf ));
222 S16 cmUnpkUdxBndReq ARGS((UdxBndReq func,Pst* pst, Buffer *mBuf ));
223 S16 cmUnpkUdxUbndReq ARGS((UdxUbndReq func,Pst* pst, Buffer *mBuf));
224 S16 cmUnpkUdxCfgReq ARGS((UdxCfgReq func,Pst *pst, Buffer *mBuf));
225 S16 cmUnpkUdxCfgCfm ARGS((UdxCfgCfm func , Pst* pst,Buffer *mBuf));
226 S16 cmUnpkUdxStaUpdReq ARGS((UdxStaUpdReq func,Pst* pst,Buffer *mBuf));
227 S16 cmUnpkUdxUeIdChgReq ARGS((UdxUeIdChgReq func,Pst *pst, Buffer *mBuf)); 
228 S16 cmUnpkUdxUeIdChgCfm ARGS((UdxUeIdChgCfm func,Pst *pst, Buffer *mBuf)); 
229
230 S16 cmUnpkUdxStaUpdCfm ARGS((UdxStaUpdCfm func,Pst* pst,Buffer *mBuf));
231
232 S16 cmUnpkUdxStaPduReq ARGS((UdxStaPduReq func, Pst* pst, Buffer *mBuf));
233
234 S16 cmUnpkUdxStaProhTmrStart ARGS((UdxStaProhTmrStart func,
235                                           Pst* pst,
236                                           Buffer *mBuf));
237
238 #ifdef LTE_L2_MEAS
239 S16 cmUnpkUdxL2MeasReq ARGS((UdxL2MeasReq func, Pst* pst, Buffer *mBuf));
240 S16 cmUnpkUdxL2MeasSendReq ARGS((UdxL2MeasSendReq func, Pst* pst, Buffer *mBuf));
241 S16 cmUnpkUdxL2MeasStopReq ARGS((UdxL2MeasStopReq func, Pst* pst, Buffer *mBuf));
242 #endif
243 #endif
244
245 #ifdef KW
246 S16 rlcUlUdxBndReq ARGS((Pst* pst, SuId suId, SpId spId));
247
248 S16 rlcDlUdxBndReq ARGS((Pst* pst, SuId suId, SpId spId));
249
250 S16 rlcDlUdxBndCfm ARGS((Pst* pst, SuId suId, uint8_t status));
251
252 S16 rlcUlUdxBndCfm ARGS((Pst* pst, SuId suId, uint8_t status));
253
254 S16 rlcDlUdxCfgCfm ARGS((Pst* pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
255
256 S16 rlcUlUdxCfgCfm ARGS((Pst* pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
257
258 S16 rlcDlUdxUeIdChgCfm ARGS((Pst *pst, 
259                                    SuId suId, 
260                                    uint32_t transId,  
261                                    CmStatus status));
262
263 S16 rlcUlUdxUeIdChgCfm ARGS((Pst *pst, 
264                                    SuId suId, 
265                                    uint32_t transId, 
266                                    CmStatus status));
267
268 S16 rlcUlUdxUbndReq ARGS((Pst* pst, SuId suId, Reason reason));
269
270 S16 rlcDlUdxUbndReq ARGS((Pst* pst, SuId suId, Reason reason));
271
272 S16 rlcUlUdxUeIdChgReq ARGS((Pst *pst, 
273                                    SpId spId, 
274                                    uint32_t transId, 
275                                    CkwUeInfo *ueInfo, 
276                                    CkwUeInfo *newUeInfo));
277
278 S16 rlcUlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
279
280 S16 rlcDlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
281
282 uint8_t rlcUlUdxStaUpdReq ARGS((Pst* pst,
283                                   SpId spId,
284                                   CmLteRlcId *rlcId,
285                                   RlcUdxStaPdu *pStaPdu));
286
287 S16 rlcDlUdxStaUpdReq ARGS((Pst* pst,
288                                   SpId spId,
289                                   CmLteRlcId *rlcId,
290                                   RlcUdxStaPdu *pStaPdu));
291
292 S16 rlcDlUdxStaUpdCfm ARGS((Pst* pst,
293                                   SuId suId,
294                                   CmLteRlcId *rlcId,
295                                   RlcUdxBufLst *pBufLst));
296
297 S16 rlcUlUdxStaUpdCfm ARGS((Pst* pst,
298                                   SuId suId,
299                                   CmLteRlcId *rlcId,
300                                   RlcUdxBufLst *pBufLst));
301
302 uint8_t rlcUlUdxStaPduReq ARGS((Pst *pst,
303                                   SpId spId,
304                                   CmLteRlcId *rlcId,
305                                   RlcUdxDlStaPdu *pStaPdu ));
306
307 S16 rlcDlUdxStaPduReq ARGS((Pst *pst,
308                                   SpId spId,
309                                   CmLteRlcId *rlcId,
310                                   RlcUdxDlStaPdu *pStaPdu));
311
312 S16 rlcDlUdxUeIdChgReq ARGS((Pst *pst, 
313                                    SpId spId, 
314                                    uint32_t transId, 
315                                    CkwUeInfo *ueInfo, 
316                                    CkwUeInfo *newUeInfo));
317
318 S16 rlcDlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
319
320
321 S16 rlcUlUdxStaUpdCfm ARGS((Pst* pst,
322                                   SuId suId,
323                                   CmLteRlcId *rlcId,
324                                   RlcUdxBufLst *pBufLst));
325
326 S16 rlcDlUdxStaPduReq ARGS((Pst *pst,
327                                   SpId spId,
328                                   CmLteRlcId *rlcId,
329                                   RlcUdxDlStaPdu *pStaPdu));
330
331 S16 rlcUlUdxStaProhTmrStart ARGS((Pst *pst,
332                                         SpId spId,
333                                         CmLteRlcId *rlcId ));
334
335 uint8_t rlcDlUdxStaProhTmrStart ARGS((Pst *pst,
336                                         SpId spId,
337                                         CmLteRlcId *rlcId ));
338
339 #ifdef LTE_L2_MEAS
340 S16 rlcDlUdxL2MeasReq ARGS((Pst *pst, RlcL2MeasReqEvt *measReqEvt)); 
341
342 S16 rlcDlUdxL2MeasSendReq ARGS((Pst *pst, uint8_t status)); 
343
344 S16 rlcDlUdxL2MeasStopReq ARGS((Pst *pst, uint8_t status)); 
345
346 S16 rlcUlUdxL2MeasReq ARGS((Pst* pst, RlcL2MeasReqEvt *measReqEvt));
347
348 S16 rlcUlUdxL2MeasSendReq ARGS((Pst *pst, uint8_t status));
349
350 S16 rlcUlUdxL2MeasStopReq ARGS((Pst* pst, uint8_t measType));
351 #endif
352
353 #endif
354
355
356
357
358 #ifdef __cplusplus
359 }
360 #endif /* __cplusplus */
361
362 #endif
363
364 \f  
365 /********************************************************************30**
366          End of file
367 **********************************************************************/