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 /********************************************************************20**
21 Name: LKW RLC Layer Manager Interface
25 Desc: This file Contains the Data structures and prototypes
30 *********************************************************************21*/
37 #endif /* __cplusplus */
41 General Configuration Structure. */
42 typedef struct kwGenCfg
44 Pst lmPst; /*!< Post structure for communicating
46 U32 maxUe; /*!< Maximum number of UEs supported
48 U16 maxKwuSaps; /*!< Maximum KWU SAPs. */
49 /* Supported by SPLIT Architecture */
50 U16 maxUdxSaps; /*!< Maximum Udx SAPs. */
51 /* Supported by SPLIT Architecture ends */
52 Ticks timeRes; /*!< Time resolution. */
53 /* Supported by SPLIT Architecture */
54 U8 rlcMode; /*!< RLC_DL or RLC_UL */
55 /* Supported by SPLIT Architecture ends */
56 U16 maxRguSaps; /*!< Maximum RGU SAPs. */
60 SAP Configuration Structure */
61 typedef struct kwSapCfg
63 Selector selector; /*!< Selector for LC/TC. */
64 MemoryId mem; /*!< Region and pool. */
65 ProcId procId; /*!< Processor ID. */
66 Ent ent; /*!< Entity ID. */
67 Inst inst; /*!< Instance ID. */
68 SpId sapId; /*!< SAP ID. */
69 U16 bndTmrIntvl; /*!< Bind timer interval. */
70 Priority priority; /*!< Priority. */
71 Route route; /*!< Route. */
75 * Configuration Structure
81 KwGenCfg gen; /*!< General configuraton. */
82 KwSapCfg sap; /*!< SAP configuration. */
87 General Statistics Structure */
88 typedef struct kwGenSts
90 CntrSts numUe; /*!< Total number of UEs. */
91 CntrSts pdusRecv; /*!< Number of PDUs received. */
92 CntrSts pdusSent; /*!< Number of PDUs sent. */
93 CntrSts pdusRetx; /*!< Number of PDUs retransmitted. */
94 CntrSts bytesRecv; /*!< Number of bytes received. */
95 CntrSts bytesSent; /*!< Number of bytes sent. */
96 CntrSts unexpPdusRecv; /*!< Unexpected PDU received. */
97 CntrSts errorPdusRecv; /*!< Format error pdus received. */
98 CntrSts protTimeOut; /*!< Number of protocol time outs leading
100 CntrSts numOfRb; /*!< Total number of RBs in RLC. */
101 CntrSts numSduDisc; /*!< Number of SDUs discarded. */
105 RLC Upper SAP statistics */
106 typedef struct kwKwuSapSts
108 /* lkw_x_001.main_2, changed from suId to spId */
109 SpId spId; /*!< Service Provider ID. */
110 CntrSts sduRx; /*!< Number of SDUs received. */
111 CntrSts sduTx; /*!< Number of tranxmitted SDUs. */
115 RRC Control SAP Statistics */
116 typedef struct kwCkwCntSts
118 CntrSts statMsgs; /*!< Number of Status Messages send. */
122 Statistics Structure */
125 DateTime dt; /*!< Date and Time structure. */
128 KwGenSts gen; /*!< General Statistics. */
129 KwKwuSapSts kwuSap; /*!< RLC upper SAP statistics. */
130 KwCkwCntSts ckwSap; /*!< RRC control SAP. */
135 MAC Upper SAP Status Structure */
136 typedef struct kwRguSapSta
138 SuId suId; /*!< Service user ID. */
139 State state; /*!< State of the SAP. */
143 RLC Upper SAP Status Structure */
144 typedef struct kwKwuSapSta
146 SpId spId; /*!< Service provider ID. */
147 State state; /*!< State of the SAP. */
151 RRC Control SAP Status Structure */
152 typedef struct kwCkwCntSapSta
154 SpId spId; /*!< Service provider ID. */
155 State state; /*!< State of the SAP. */
160 typedef struct kwSSta
162 DateTime dt; /*!< Date and Time structure. */
165 SystemId sysId; /*!< System ID. */
166 KwRguSapSta rguSap; /*!< RLC lower SAP (MAC) status. */
167 KwKwuSapSta kwuSap; /*!< RLC Upper SAP status. */
168 KwCkwCntSapSta ckwSap; /*!< RRC Control SAP Status. */
173 Trace Control Structure */
174 typedef struct kwTrcCntrl
176 U8 trcMask; /*!< Trace mask. */
177 S16 trcLen; /*!< Trace length. */
181 Debug Control Structure */
182 typedef struct kwDbgCntrl
184 U32 dbgMask; /*!< Debug mask. Assign non zero value to enable
185 and zero to disable debug */
189 SAP Control Structure */
190 typedef struct kwSapCntrl
192 SuId suId; /*!< Service user ID. */
193 SpId spId; /*!< Service provider ID. */
198 typedef struct kwCntrl
200 DateTime dt; /*!< Date and Time structure. */
201 U8 action; /*!< Action. */
202 U8 subAction; /*!< Sub action. */
205 KwTrcCntrl trcCntrl; /*!< Trace Control Structure. */
206 KwDbgCntrl dbgCntrl; /*!< Debug Control Structure. */
207 KwSapCntrl sapCntrl; /*!< SAP Control Structure. */
209 U32 logMask; /*!< Logging Control Structure. */
215 Unsolicited Status Structure */
216 typedef struct kwUSta
218 DateTime dt; /*!< Date and Time structure. */
219 CmAlarm alarm; /*!< Alarm. */
220 SuId suId; /*!< Service user ID. */
221 U32 ueId; /*!< Urnti UE ID. */
222 /* lkw_x_001.main_2, added support for L2 measurement */
224 U8 qci; /*!< Qci value */
232 DateTime dt; /*!< Date and Time structure. */
233 U16 event; /*!< Event. Events defined in the differenct RLC
234 interfaces are pssible values here.*/
238 Layer Management Structure */
239 typedef struct _kwMngmt
241 Header hdr; /*!< Common header. */
242 CmStatus cfm; /*!< Status of confirmation. */
245 KwCfg cfg; /*!< General Configuration. */
246 KwCntrl cntrl; /*!< Control Structure. */
247 KwSts sts; /*!< Statistics. */
248 KwSSta ssta; /*!< Status. */
249 KwUSta usta; /*!< Unsolicited Status. */
250 KwTrc trc; /*!< Trace Structre. */
254 /* lkw_x_001.main_2, added support for L2 measurement */
257 /** @brief Measurement Request Params Structure. */
258 typedef struct kwL2MeasReqInfo
260 U8 measType; /*!< Measurement type, bit 1 to 4 (LSB nibble)
261 will be used for non IP Throughput and
262 bit 5 and 6 will be used for DL and UL
263 Ipthroughput respectively */
268 U16 numSamples; /*!<Sampling period: */
269 U8 numQci; /*!<number of qCI to take measurement for */
270 U8 qci[LKW_MAX_QCI]; /*!<QCI for the measurement */
278 U8 numQci; /*!<number of qCI to take measurement for */
279 U8 qci[LKW_MAX_QCI]; /*!<QCI for the measurement */
280 CmLteRnti ueId; /*!< UE ID (Used only for IP Throughput in UL/DL */
281 CmLteCellId cellId; /*!< Cell ID (Used only for IP Throughput in UL/DL */
282 }ueInfoLst[LKW_MAX_UE];
288 /** @brief Measurement Request Exvent Structure. */
289 typedef struct kwL2MeasReqEvt
291 U32 transId; /*!< Transaction Identifier */
292 U16 measPeriod; /*!< Measurement Period */
293 KwL2MeasReqInfo measReq; /*!< Measurement request structure */
296 /** @brief Measurement Confirm Params Structure. */
297 typedef struct kwL2MeasCfmInfo
299 U8 qci; /*!< QCI value */
304 U32 numActUe; /*!< num of Active UEs*/
305 U32 uuLoss; /*!< Uu Loss Rate */
306 /* Discard new changes starts */
307 U32 dlDiscRate; /*!< DL Discard rate to be reported */
308 /* Discard new changes ends */
312 struct /*!< Structure for IP throughput*/
314 F32 dlIpThPut; /*!< Scheduled DL IP throughput */
315 F32 ulIpThPut; /*!< Scheduled UL IP throughput */
321 typedef struct kwL2MeasCfmUeInfoLst
323 CmLteRnti ueId; /*!< UE Id used for DL/UL Ipthroughput*/
324 CmLteCellId cellId; /*!< Cell Id used for DL/UL Ipthroughput*/
325 KwL2MeasCfmInfo measCfm[LKW_MAX_QCI]; /*!< Measurement confirm structure*/
326 U16 numCfm; /*!< Number of Measurement confirm*/
327 }KwL2MeasCfmUeInfoLst;
329 typedef struct kwL2MeasCfmIpThMeas
331 U16 numUes; /*!< Number of Ue Info*/
332 KwL2MeasCfmUeInfoLst ueInfoLst[LKW_MAX_UE]; /*!< UE info list*/
333 }KwL2MeasCfmIpThMeas;
335 typedef struct kwL2MeasCfmNonIpThMeas
337 U16 numCfm; /*!< Number of confirm */
338 KwL2MeasCfmInfo measCfm[LKW_MAX_QCI]; /*!< Confirmation info */
339 }KwL2MeasCfmNonIpThMeas;
341 typedef union kwL2MeasCfmIpNonIp
343 KwL2MeasCfmIpThMeas ipThMeas; /*!< Ip thrupt measurements*/
344 KwL2MeasCfmNonIpThMeas nonIpThMeas; /*!< Non-Ip thrupt measurements*/
347 /** @brief Measurement Confirm Event Structure. */
348 typedef struct kwL2MeasCfmEvt
350 U32 transId; /*!< Transaction id */
351 CmStatus status; /*!< Status is for all QCIs */
352 U8 measType; /*!< Measurement type, bit 1 to 4 (LSB nibble)
353 will be used for non IP Throughput and
354 bit 5 and 6 will be used for DL and UL
355 Ipthroughput respectively. It is same for
356 all qci in this Cfm event. */
357 KwL2MeasCfmIpNonIp val;
360 #endif /* LTE_L2_MEAS */
362 /* Control primitives towards LTE RLC */
363 /* Pointer functions to pack/unpack primitives */
364 typedef S16 (*LkwCfgReq) ARGS((Pst *pst, KwMngmt *cfg));
365 typedef S16 (*LkwCfgCfm) ARGS((Pst *pst, KwMngmt *cfgCfm));
367 typedef S16 (*LkwCntrlReq) ARGS((Pst *pst, KwMngmt *cntl));
368 typedef S16 (*LkwCntrlCfm) ARGS((Pst *pst, KwMngmt *cntlCfm));
370 typedef S16 (*LkwStaInd) ARGS((Pst *pst, KwMngmt *staInd));
371 typedef S16 (*LkwStaReq) ARGS((Pst *pst, KwMngmt *staReq));
372 typedef S16 (*LkwStaCfm) ARGS((Pst *pst, KwMngmt *staCfm));
374 typedef S16 (*LkwStsReq) ARGS((Pst *pst, Action, KwMngmt *sts));
375 typedef S16 (*LkwStsCfm) ARGS((Pst *pst, Action, KwMngmt *stsCfm));
377 typedef S16 (*LkwTrcInd) ARGS((Pst *pst, KwMngmt *trc, Buffer *mBuf));
379 /* lkw_x_001.main_2, added support for L2 measurement */
381 typedef S16 (*LkwL2MeasReq) ARGS((Pst *pst, KwL2MeasReqEvt *measEvt));
382 typedef S16 (*LkwL2MeasCfm) ARGS((Pst *pst, KwL2MeasCfmEvt *measEvt));
383 typedef S16 (*LkwL2MeasSendReq) ARGS((Pst *pst, U8 measType));
384 typedef S16 (*LkwL2MeasStopReq) ARGS((Pst *pst, U8 measType));
385 typedef S16 (*LkwL2MeasStopCfm) ARGS((Pst *pst, U8 measType,U8 status));
386 #endif /* LTE_L2_MEAS */
388 /* Layer primitives */
389 /** @details This function processes configuration requests received from the layer manager.The configuration requests are general configuration, or configuration of RGU, KWU, and CKW SAPs. The type of the configuration request is determined from the elmId field in the header of the layer manager message.This function is called by the layer manager to configure RLC.
391 @param[in] pst - Pointer to post structure
392 @param[in] cfg - Configuration management structure
393 @return ROK if success , RFAILED if failure
396 EXTERN S16 KwMiLkwCfgReq ARGS((Pst *pst, KwMngmt *cfg));
399 @details This function is called by the KwMiLkwCfgReq function for responding to configuration requests.The cfm field in the KwMngmt structure contains the response value.
401 @param[in] pst - Pointer to post structure
402 @param[in] cfm - Configuration management structure
403 @return ROK if success , RFAILED if failure
405 EXTERN S16 KwMiLkwCfgCfm ARGS((Pst *pst, KwMngmt *cfgCfm));
409 The layer manager initiates and uses the management-control procedure to control
410 RLC elements.The RLC control request primitive (KwMiLkwCntrlReq) is called
411 more than once and at any time after the management-configuration procedure.The
412 control request primitive is confirmed by a KwMiLkwCntrlCfm primitive.
414 @param[in] pst - Pointer to post structure
415 @param[in] cntl - Configuration management structure
416 @return ROK if success , RFAILED if failure
418 EXTERN S16 KwMiLkwCntrlReq ARGS((Pst *pst, KwMngmt *cntl));
422 This function is called by the KwMiLkwCntrlReq function to send a control confirm to the layer management module.
424 @param[in] pst - Pointer to post structure
425 @param[in] cfm - Configuration management structure
426 @return ROK if success , RFAILED if failure
428 EXTERN S16 KwMiLkwCntrlCfm ARGS((Pst *pst, KwMngmt *cntlCfm));
432 This function processes solicited status requests received from the layer manager.The layer manager can request status information regarding the system ID, RGSA
435 @param[in] pst - Pointer to post structure
436 @param[in] cfg - Configuration management structure
437 @return ROK if success , RFAILED if failure
439 EXTERN S16 KwMiLkwStaReq ARGS((Pst *pst, KwMngmt *staInd));
443 This function is called by the KwMiLkwStaReq function to send the requested stat
444 us information to the layer manager.
446 @param[in] pst - Pointer to post structure
447 @param[in] stacfm - Configuration management structure
448 @return ROK if success , RFAILED if failure
450 EXTERN S16 KwMiLkwStaCfm ARGS((Pst *pst, KwMngmt *staCfm));
454 This function processes statistics requests received from the layer manager. After collecting the statistics, this function calls the statistics confirm function to send the statistics to the layer manager.
456 @param[in] pst - Pointer to post structure
457 @param[in] acton - action
458 @param[in] sts - Configuration management structure
459 @return ROK if success , RFAILED if failure
461 EXTERN S16 KwMiLkwStsReq ARGS((Pst *pst, Action, KwMngmt *sts));
464 This function is called by the KwMiLkwStsReq function for responding to statisti
467 @param[in] pst - Pointer to post structure
468 @param[in] action - action
469 @param[in] cfg - Configuration management structure
470 @return ROK if success , RFAILED if failure
472 EXTERN S16 KwMiLkwStsCfm ARGS((Pst *pst, Action action, KwMngmt *stsCfm));
475 This function is used by RLC module to send unsolicited trace indications to
476 the layer manager, when tracing is enabled by the layer manager through a previous control request.
478 @param[in] pst - Pointer to post structure
479 @param[in] cfg - Configuration management structure
480 @param[in] buf - buffer
481 @return ROK if success , RFAILED if failure
483 EXTERN S16 KwMiLkwTrcInd ARGS ((Pst *pst, KwMngmt *trc, Buffer *mBuf));
486 @details This function is used by RLC to send unsolicited status information to the layer manager, when the unsolicited status flag is enabled by the layer manager through a previous control request.
488 @param[in] pst - Pointer to post structure
489 @param[in] staReq - Configuration management structure
490 @return ROK if success , RFAILED if failure
492 /* lkw_x_001.main_2, added support for L2 measurement */
495 @details This function is called by the Layer Manger function to request
496 for Measurement responding to statisti cs requests.
498 @param[in] pst - Pointer to post structure
499 @param[in] measEvt - Measurement Request structure
500 @return ROK if success , RFAILED if failure
502 EXTERN S16 KwMiLkwL2MeasReq ARGS((Pst *pst, KwL2MeasReqEvt *measEvt));
503 EXTERN S16 KwMiLkwL2MeasStopReq ARGS((Pst *pst,U8 measType));
504 EXTERN S16 KwMiLkwL2MeasSendReq ARGS((Pst *pst,U8 measType));
506 @details This function can be used by PDCP to send the measurement values
507 after doing L2 measurement that was requested by the layer manager.
509 @param[in] pst - Pointer to post structure
510 @param[in] measEvt - Measurement confirmation structure
511 @return ROK if success , RFAILED if failure
513 EXTERN S16 KwMiLkwL2MeasCfm ARGS((Pst *pst, KwL2MeasCfmEvt *measCfm));
514 EXTERN S16 KwMiLkwL2MeasStopCfm ARGS((Pst *pst, U8 measType, U8 status));
515 #endif /* LTE_L2_MEAS */
517 EXTERN S16 KwMiLkwStaInd ARGS((Pst *pst, KwMngmt *staReq));
519 EXTERN Void kwSendLmAlarm ARGS ((
527 EXTERN S16 SmMiLkwCfgCfm ARGS((
532 EXTERN S16 SmMiLkwCntrlCfm ARGS((
537 EXTERN S16 SmMiLkwStaInd ARGS((
542 EXTERN S16 SmMiLkwStaCfm ARGS((
547 EXTERN S16 SmMiLkwStsCfm ARGS((
553 EXTERN S16 SmMiLkwTrcInd ARGS((
559 EXTERN S16 SmMiLkwStsReq ARGS((
565 EXTERN S16 SmMiLkwStaReq ARGS((
570 EXTERN S16 SmMiLkwCntrlReq ARGS((
575 EXTERN S16 SmMiLkwCfgReq ARGS((
580 /* lkw_x_001.main_2, added support for L2 measurement */
582 EXTERN S16 SmMiLkwL2MeasReq ARGS((
586 EXTERN S16 SmMiLkwL2MeasStopReq ARGS((
591 EXTERN S16 SmMiLkwL2MeasSendReq ARGS((
595 EXTERN S16 SmMiLkwL2MeasCfm ARGS((
599 EXTERN S16 SmMiLkwL2MeasStopCfm ARGS((
604 #endif /* LTE_L2_MEAS */
607 EXTERN S16 smKwActvInit ARGS((Ent ent, Inst inst, Region region, Reason reason));
608 EXTERN S16 smKwActvTsk ARGS((Pst *pst, Buffer *mBuf));
610 /* pack/unpack functions */
612 EXTERN S16 cmPkLkwCfgReq ARGS((
617 EXTERN S16 cmPkLkwCfgCfm ARGS((
623 EXTERN S16 cmPkLkwCntrlReq ARGS((
628 EXTERN S16 cmPkLkwCntrlCfm ARGS((
633 EXTERN S16 cmPkLkwStaInd ARGS((
638 EXTERN S16 cmPkLkwStaReq ARGS((
643 EXTERN S16 cmPkLkwStaCfm ARGS((
648 EXTERN S16 cmPkLkwStsReq ARGS((
654 EXTERN S16 cmPkLkwStsCfm ARGS((
660 EXTERN S16 cmPkLkwTrcInd ARGS((
666 EXTERN S16 cmUnpkLkwCfgReq ARGS((
672 EXTERN S16 cmUnpkLkwCfgCfm ARGS((
678 EXTERN S16 cmUnpkLkwCntrlReq ARGS((
684 EXTERN S16 cmUnpkLkwCntrlCfm ARGS((
690 EXTERN S16 cmUnpkLkwStaInd ARGS((
696 EXTERN S16 cmUnpkLkwStaReq ARGS((
702 EXTERN S16 cmUnpkLkwStaCfm ARGS((
708 EXTERN S16 cmUnpkLkwStsReq ARGS((
714 EXTERN S16 cmUnpkLkwStsCfm ARGS((
720 EXTERN S16 cmUnpkLkwTrcInd ARGS((
725 /* lkw_x_001.main_2, added support for L2 measurement */
727 EXTERN S16 cmPkLkwL2MeasReq ARGS((
729 KwL2MeasReqEvt * measReqEvt
731 EXTERN S16 cmUnpkLkwL2MeasReq ARGS((
736 EXTERN S16 cmPkLkwL2MeasCfm ARGS((
738 KwL2MeasCfmEvt *measCfmEvt
740 EXTERN S16 cmUnpkLkwL2MeasCfm ARGS((
745 EXTERN S16 cmPkKwL2MeasReqInfo ARGS((
746 KwL2MeasReqInfo * measReqInfo,
749 EXTERN S16 cmUnpkKwL2MeasReqInfo ARGS((
750 KwL2MeasReqInfo * measReqInfo,
753 EXTERN S16 cmPkKwL2MeasCfmInfo ARGS((
754 KwL2MeasCfmInfo * measCfmInfo,
758 EXTERN S16 cmUnpkKwL2MeasCfmInfo ARGS((
759 KwL2MeasCfmInfo * measCfmInfo,
763 EXTERN S16 cmPkLkwL2MeasStopReq ARGS((
767 EXTERN S16 cmUnpkLkwL2MeasStopReq ARGS((
768 LkwL2MeasStopReq func,
772 EXTERN S16 cmPkLkwL2MeasSendReq ARGS((
776 EXTERN S16 cmUnpkLkwL2MeasSendReq ARGS((
777 LkwL2MeasSendReq func,
781 EXTERN S16 cmPkLkwL2MeasStopCfm ARGS((
786 EXTERN S16 cmUnpkLkwL2MeasStopCfm ARGS((
787 LkwL2MeasStopCfm func,
791 #endif /* LTE_L2_MEAS */
797 #endif /* __cplusplus */
798 #endif /* __LKW_X__ */
801 /********************************************************************30**
803 **********************************************************************/