RLC BO, BO response and DL Data handling. [Issue-ID: ODUHIGH-181]
[o-du/l2.git] / src / 5gnrrlc / kw_udx.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  
21     Name:   LTE RLC layer
22  
23     Type:   C include file
24  
25     Desc:   Defines required by LTE MAC
26  
27     File:   kw_udx.x
28  
29  
30 **********************************************************************/
31 /** @file kw_udx.x
32 @brief This file contains basic data structures for the Uplink Downlink 
33 interface.
34 */
35  
36 #ifndef __UDX_X__
37 #define __UDX_X__
38
39 #include "ckw.h"
40 #include "ckw.x"
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif /* __cplusplus */
45
46 typedef struct rlcNackInfo
47 {
48    U8 nackRange;
49    U8 isSegment;
50    U32 sn;      /*!< Nack Sn */
51    U16 soStart; /*!< Segment offset start */
52    U16 soEnd;   /*!< Segment offset End */
53 }RlcNackInfo;
54
55 typedef struct rlcUdxStaPdu
56 {
57    U32 ackSn;
58    /* TODO : RLC_MAX_NACK_CNT should set to MAx SR delay 
59       It is tradeoff to consider array based instead of dynamic
60       as there are chances where we might loose Status information
61       on spill over*/
62    U8 nackCnt;         /* Cnt of Nacks in the array*/
63    RlcNackInfo nackInfo[RLC_MAX_NACK_CNT];
64 }RlcUdxStaPdu;
65
66 typedef struct rlcUdxBufLst
67 {
68    CmLListCp rlsTxLst;      /*!< Stores to be released Tx PDUs */
69    CmLListCp rlsRetxLst;    /*!< Stores to be released Retx PDUs */
70    CmLListCp rlsSduLst;     /*!< Stores to be released SDUs*/
71 }RlcUdxBufLst;
72
73 typedef struct rlcStatusPdu
74 {
75    U32         ackSn;
76    RlcNackInfo  nackInfo[RLC_MAX_NACK_CNT];
77    U16         nackCount;
78    U16         controlBo;
79 }RlcUdxDlStaPdu;
80 /* ### Umapathi*/
81
82 /**
83   * @brief
84   * UDX APIs
85   */
86 typedef S16 (*UdxBndCfm) ARGS((Pst* pst, SuId suId,U8  status ));
87
88 typedef S16 (*UdxBndReq) ARGS((Pst* pst, SuId suId,SpId  spId ));
89
90 typedef S16 (*UdxUbndReq) ARGS((Pst* pst, SuId suId,Reason reason));
91
92 typedef S16 (*UdxCfgReq) ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
93
94 typedef S16 (*UdxCfgCfm) ARGS((Pst* pst,SuId suId,RlcCfgCfmInfo *cfmInfo));
95
96 typedef S16 (*UdxStaUpdReq) ARGS((Pst* pst,
97                                   SpId spId,
98                                   CmLteRlcId *rlcId,
99                                   RlcUdxStaPdu *pStaPdu ));
100
101 typedef S16 (*UdxUeIdChgReq) ARGS((Pst *pst, 
102                                    SpId spId, 
103                                    U32 transId, 
104                                    CkwUeInfo *ueInfo, 
105                                    CkwUeInfo *newUeInfo));
106
107 typedef S16 (*UdxUeIdChgCfm) ARGS((Pst *pst, 
108                                    SuId suId, 
109                                    U32 transId, 
110                                    CmStatus status));
111
112 typedef S16 (*UdxStaUpdCfm) ARGS((Pst* pst,
113                                   SuId  suId,
114                                   CmLteRlcId *rlcId,
115                                   RlcUdxBufLst *pBufLst));
116
117 typedef S16 (*UdxStaPduReq) ARGS((Pst* pst,
118                                   SpId  spId, 
119                                   CmLteRlcId *rlcId,
120                                   RlcUdxDlStaPdu *pStaPdu));
121
122 typedef S16 (*UdxStaProhTmrStart) ARGS((Pst* pst,
123                                          SuId  suId,
124                                          CmLteRlcId  *rlcId));
125
126 #ifdef LTE_L2_MEAS
127 typedef S16 (*UdxL2MeasReq) ARGS((Pst* pst,
128                                 RlcL2MeasReqEvt *measReqEvt));
129
130 typedef S16 (*UdxL2MeasSendReq) ARGS((Pst* pst,
131                                     U8 measType));
132
133 typedef S16 (*UdxL2MeasStopReq) ARGS((Pst* pst,
134                                     U8 measType));
135 #endif
136
137 #ifdef LCUDX
138 S16 cmPkUdxBndCfm ARGS((Pst* pst, SuId suId,U8  status ));
139 S16 cmPkUdxBndReq ARGS((Pst* pst, SuId suId,SpId  spId ));
140 S16 cmPkUdxUbndReq ARGS((Pst* pst, SuId suId,Reason reason));
141 S16 cmPkUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
142 S16 cmPkUdxCfgCfm ARGS(( Pst* pst,SuId suId,RlcCfgCfmInfo *cfmInfo));
143 S16 cmPkUdxStaUpdReq ARGS((Pst* pst,SpId spId,CmLteRlcId *rlcId,
144                                RlcUdxStaPdu         *pStaPdu ));
145 S16 cmPkUdxUeIdChgReq ARGS((Pst *pst, SpId spId, U32 transId, 
146                                   CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
147 S16 cmPkUdxUeIdChgCfm ARGS((Pst *pst, SuId suId, U32 transId, 
148                                    CmStatus status));
149
150
151 S16 cmPkUdxStaUpdCfm ARGS((Pst* pst,SuId  suId,CmLteRlcId  *rlcId,
152                              RlcUdxBufLst  *pBufLst));
153
154 S16 cmPkUdxStaPduReq ARGS(( Pst* pst,SpId  spId, CmLteRlcId *rlcId,
155                              RlcUdxDlStaPdu  *pStaPdu ));
156 S16 cmPkUdxStaProhTmrStart ARGS((Pst *pst, 
157                                         SpId spId, 
158                                         CmLteRlcId *rlcId));
159
160 #ifdef LTE_L2_MEAS
161 S16 cmPkUdxL2MeasReq ARGS((Pst *pst, RlcL2MeasReqEvt *measReqEvt)); 
162 S16 cmPkUdxL2MeasSendReq ARGS((Pst *pst, U8 measType)); 
163 S16 cmPkUdxL2MeasStopReq ARGS((Pst *pst, U8 measType)); 
164 #endif
165
166 S16 cmUnpkUdxBndCfm ARGS((UdxBndCfm func,Pst* pst, Buffer *mBuf ));
167 S16 cmUnpkUdxBndReq ARGS((UdxBndReq func,Pst* pst, Buffer *mBuf ));
168 S16 cmUnpkUdxUbndReq ARGS((UdxUbndReq func,Pst* pst, Buffer *mBuf));
169 S16 cmUnpkUdxCfgReq ARGS((UdxCfgReq func,Pst *pst, Buffer *mBuf));
170 S16 cmUnpkUdxCfgCfm ARGS((UdxCfgCfm func , Pst* pst,Buffer *mBuf));
171 S16 cmUnpkUdxStaUpdReq ARGS((UdxStaUpdReq func,Pst* pst,Buffer *mBuf));
172 S16 cmUnpkUdxUeIdChgReq ARGS((UdxUeIdChgReq func,Pst *pst, Buffer *mBuf)); 
173 S16 cmUnpkUdxUeIdChgCfm ARGS((UdxUeIdChgCfm func,Pst *pst, Buffer *mBuf)); 
174
175 S16 cmUnpkUdxStaUpdCfm ARGS((UdxStaUpdCfm func,Pst* pst,Buffer *mBuf));
176
177 S16 cmUnpkUdxStaPduReq ARGS((UdxStaPduReq func, Pst* pst, Buffer *mBuf));
178
179 S16 cmUnpkUdxStaProhTmrStart ARGS((UdxStaProhTmrStart func,
180                                           Pst* pst,
181                                           Buffer *mBuf));
182
183 #ifdef LTE_L2_MEAS
184 S16 cmUnpkUdxL2MeasReq ARGS((UdxL2MeasReq func, Pst* pst, Buffer *mBuf));
185 S16 cmUnpkUdxL2MeasSendReq ARGS((UdxL2MeasSendReq func, Pst* pst, Buffer *mBuf));
186 S16 cmUnpkUdxL2MeasStopReq ARGS((UdxL2MeasStopReq func, Pst* pst, Buffer *mBuf));
187 #endif
188 #endif
189
190 #ifdef KW
191 S16 rlcUlUdxBndReq ARGS((Pst* pst, SuId suId, SpId spId));
192
193 S16 rlcDlUdxBndReq ARGS((Pst* pst, SuId suId, SpId spId));
194
195 S16 rlcDlUdxBndCfm ARGS((Pst* pst, SuId suId, U8 status));
196
197 S16 rlcUlUdxBndCfm ARGS((Pst* pst, SuId suId, U8 status));
198
199 S16 rlcDlUdxCfgCfm ARGS((Pst* pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
200
201 S16 rlcUlUdxCfgCfm ARGS((Pst* pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
202
203 S16 rlcDlUdxUeIdChgCfm ARGS((Pst *pst, 
204                                    SuId suId, 
205                                    U32 transId,  
206                                    CmStatus status));
207
208 S16 rlcUlUdxUeIdChgCfm ARGS((Pst *pst, 
209                                    SuId suId, 
210                                    U32 transId, 
211                                    CmStatus status));
212
213 S16 rlcUlUdxUbndReq ARGS((Pst* pst, SuId suId, Reason reason));
214
215 S16 rlcDlUdxUbndReq ARGS((Pst* pst, SuId suId, Reason reason));
216
217 S16 rlcUlUdxUeIdChgReq ARGS((Pst *pst, 
218                                    SpId spId, 
219                                    U32 transId, 
220                                    CkwUeInfo *ueInfo, 
221                                    CkwUeInfo *newUeInfo));
222
223 S16 rlcUlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
224
225 S16 rlcDlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
226
227 uint8_t rlcUlUdxStaUpdReq ARGS((Pst* pst,
228                                   SpId spId,
229                                   CmLteRlcId *rlcId,
230                                   RlcUdxStaPdu *pStaPdu));
231
232 S16 rlcDlUdxStaUpdReq ARGS((Pst* pst,
233                                   SpId spId,
234                                   CmLteRlcId *rlcId,
235                                   RlcUdxStaPdu *pStaPdu));
236
237 S16 rlcDlUdxStaUpdCfm ARGS((Pst* pst,
238                                   SuId suId,
239                                   CmLteRlcId *rlcId,
240                                   RlcUdxBufLst *pBufLst));
241
242 S16 rlcUlUdxStaUpdCfm ARGS((Pst* pst,
243                                   SuId suId,
244                                   CmLteRlcId *rlcId,
245                                   RlcUdxBufLst *pBufLst));
246
247 uint8_t rlcUlUdxStaPduReq ARGS((Pst *pst,
248                                   SpId spId,
249                                   CmLteRlcId *rlcId,
250                                   RlcUdxDlStaPdu *pStaPdu ));
251
252 S16 rlcDlUdxStaPduReq ARGS((Pst *pst,
253                                   SpId spId,
254                                   CmLteRlcId *rlcId,
255                                   RlcUdxDlStaPdu *pStaPdu));
256
257 S16 rlcDlUdxUeIdChgReq ARGS((Pst *pst, 
258                                    SpId spId, 
259                                    U32 transId, 
260                                    CkwUeInfo *ueInfo, 
261                                    CkwUeInfo *newUeInfo));
262
263 S16 rlcDlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
264
265
266 S16 rlcUlUdxStaUpdCfm ARGS((Pst* pst,
267                                   SuId suId,
268                                   CmLteRlcId *rlcId,
269                                   RlcUdxBufLst *pBufLst));
270
271 S16 rlcDlUdxStaPduReq ARGS((Pst *pst,
272                                   SpId spId,
273                                   CmLteRlcId *rlcId,
274                                   RlcUdxDlStaPdu *pStaPdu));
275
276 S16 rlcUlUdxStaProhTmrStart ARGS((Pst *pst,
277                                         SpId spId,
278                                         CmLteRlcId *rlcId ));
279
280 uint8_t rlcDlUdxStaProhTmrStart ARGS((Pst *pst,
281                                         SpId spId,
282                                         CmLteRlcId *rlcId ));
283
284 #ifdef LTE_L2_MEAS
285 S16 rlcDlUdxL2MeasReq ARGS((Pst *pst, RlcL2MeasReqEvt *measReqEvt)); 
286
287 S16 rlcDlUdxL2MeasSendReq ARGS((Pst *pst, U8 status)); 
288
289 S16 rlcDlUdxL2MeasStopReq ARGS((Pst *pst, U8 status)); 
290
291 S16 rlcUlUdxL2MeasReq ARGS((Pst* pst, RlcL2MeasReqEvt *measReqEvt));
292
293 S16 rlcUlUdxL2MeasSendReq ARGS((Pst *pst, U8 status));
294
295 S16 rlcUlUdxL2MeasStopReq ARGS((Pst* pst, U8 measType));
296 #endif
297
298 #endif
299
300 #ifdef __cplusplus
301 }
302 #endif /* __cplusplus */
303 #endif /* __UDX_X__ */
304
305
306 /**********************************************************************
307          End of file
308 **********************************************************************/