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 /* Defines APIs exchanged between du_app and cl module of RLC */
23 /* Macro for Ue Context */
24 #define MAX_NUM_LOGICAL_CHANNELS 11
25 #define EVENT_RLC_UL_UE_CREATE_REQ 210
26 #define EVENT_RLC_UL_UE_CREATE_RSP 211 /*!< Config Confirm */
27 #define EVENT_UL_RRC_MSG_TRANS_TO_DU 212
32 #define RB_TYPE_SRB 0 /* Signalling Radio Bearer */
33 #define RB_TYPE_DRB 1 /* Data Radio Bearer */
35 /* RLC Direction Config */
36 #define RLC_CFG_DIR_UL 1 /*!< Uplink direction */
37 #define RLC_CFG_DIR_DL 2 /*!< Downlink direction */
38 #define RLC_CFG_DIR_BOTH 3 /*!< Both Downlink and Uplink Direction*/
41 /* Logical Channel Type */
42 #define LCH_BCCH 1 /*!< BCCH Logical Channel */
43 #define LCH_PCCH 2 /*!< PCCH Logical Channel */
44 #define LCH_CCCH 3 /*!< CCCH Logical Channel */
45 #define LCH_DTCH 4 /*!< DTCH Logical Channel */
46 #define LCH_DCCH 5 /*!< DCCH Logical Channel */
51 RLC_CFG_REAS_NONE , /*!< No Failure */
52 RLC_CFG_REAS_RB_CREAT_FAIL , /*!< RB CB creation Failure */
53 RLC_CFG_REAS_UE_CREAT_FAIL , /*!< UE CB creation Failure */
54 RLC_CFG_REAS_CELL_CREAT_FAIL , /*!< CELL CB creation Failure */
55 RLC_CFG_REAS_RB_PRSNT , /*!< RB CB already present */
56 RLC_CFG_REAS_LCHTYPE_MIS , /*!< Logical channel type mismatch */
57 RLC_CFG_REAS_RB_UNKWN , /*!< RB Cb unknown */
58 RLC_CFG_REAS_UE_UNKWN , /*!< UE Cb unknown */
59 RLC_CFG_REAS_CELL_UNKWN , /*!< Cell Cb unknown */
60 RLC_CFG_REAS_RB_DEL_FAIL , /*!< RB Cb Deletion Failure */
61 RLC_CFG_REAS_UE_DEL_FAIL , /*!< UE Cb Deletion Failure */
62 RLC_CFG_REAS_RB_REEST_FAIL , /*!< RB Cb Re establish Failure */
63 RLC_CFG_REAS_RB_MODE_MIS , /*!< RB Cb Mode mismatch */
64 RLC_CFG_REAS_REEST_FAIL , /*!< RB Cb Re-establishment Failed */
65 RLC_CFG_REAS_RECFG_FAIL , /*!< RB Cb Re-configuration Failed */
66 RLC_CFG_REAS_INVALID_CFG , /*!< Invalid Configuration Type */
67 RLC_CFG_REAS_SAME_UEID , /*!< UE Ids match in ChngUeId Request */
68 RLC_CFG_REAS_CELL_DEL_FAIL , /*!< Cell Cb Deletion Failure */
69 RLC_CFG_REAS_INVALID_LCHID , /*!< Invalid LChId */
70 RLC_CFG_REAS_INVALID_DIR , /*!< Invalid Direction */
71 RLC_CFG_REAS_UE_EXISTS , /*!< UE ID already exists */
72 RLC_CFG_REAS_INVALID_SNLEN , /*!< Invalid SN Length */
73 RLC_CFG_REAS_SNLEN_MIS , /*!< SN Length mismatch */
74 RLC_CFG_REAS_INVALID_RGUSAP /*!< Invalid RGU SAP ID */
79 RLC_AM, //Acknowledged Mode
80 RLC_UM_BI_DIRECTIONAL, //UnAcknowledged Mode
81 RLC_UM_UNI_DIRECTIONAL_UL,
82 RLC_UM_UNI_DIRECTIONAL_DL
155 POLL_RETX_TMR_1000MS,
156 POLL_RETX_TMR_2000MS,
157 POLL_RETX_TMR_4000MS,
158 POLL_RETX_TMR_SPARE5,
159 POLL_RETX_TMR_SPARE4,
160 POLL_RETX_TMR_SPARE3,
161 POLL_RETX_TMR_SPARE2,
181 POLL_PDU_TMR_12288MS,
182 POLL_PDU_TMR_16384MS,
183 POLL_PDU_TMR_20480MS,
184 POLL_PDU_TMR_24576MS,
185 POLL_PDU_TMR_28672MS,
186 POLL_PDU_TMR_32768MS,
187 POLL_PDU_TMR_40960MS,
188 POLL_PDU_TMR_49152MS,
189 POLL_PDU_TMR_57344MS,
190 POLL_PDU_TMR_65536MS,
191 POLL_PDU_TMR_INFINITY,
192 POLL_PDU_TMR_SPARE_8,
193 POLL_PDU_TMR_SPARE_7,
194 POLL_PDU_TMR_SPARE_6,
195 POLL_PDU_TMR_SPARE_5,
196 POLL_PDU_TMR_SPARE_4,
197 POLL_PDU_TMR_SPARE_3,
198 POLL_PDU_TMR_SPARE_2,
407 typedef struct ulAmCfg
409 SnLenAm snLenUl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
410 TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
411 TStatProhTmr statProhTmr; /* T_status_prohibit Timer in msec*/
415 typedef struct dlAmCfg
417 SnLenAm snLenDl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
418 TpollReTxTmr pollRetxTmr; /* T_poll_retransmit Timer in msec */
419 PollPdu pollPdu; /* Used to trigger a poll for every pollPdu.*/
420 PollBytes pollByte; /* Poll_Byte in bytes. */
421 MaxRetxTh maxRetxTh; /* Max_Retx_Threshold */
425 typedef struct dlUmCfg
427 SnLenUm snLenDlUm; /* Sequence Number length in bits. Allowed values are 6 and 12 */
431 typedef struct ulUmCfg
433 SnLenUm snLenUlUm; /* Sequence Number length in bits. Allowed values are 6 and 12 */
434 TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
438 typedef struct amBearerCfg
444 typedef struct umBiDirBearerCfg
450 typedef struct umUniDirUlBearerCfg
453 }UmUniDirUlBearerCfg;
455 typedef struct umUniDirDlBearerCfg
458 }UmUniDirDlBearerCfg;
460 /* Spec Ref: 38.331, 6.3.2 RLC-BearerConfig */
461 typedef struct rlcBearerCfg
471 UmBiDirBearerCfg umBiDirCfg;
472 UmUniDirUlBearerCfg umUniDirUlCfg;
473 UmUniDirDlBearerCfg umUniDirDlCfg;
477 typedef struct rlcUeCfg
482 RlcBearerCfg rlcBearerCfg[MAX_NUM_LOGICAL_CHANNELS];
485 typedef struct rlcUeCfgRsp
490 FailureReason reason;
493 /* UL RRC Message from RLC to DU APP */
494 typedef struct ulRrcMsgInfo
496 uint16_t cellId; /* Cell Id */
497 uint16_t ueIdx; /* UE Index */
498 uint8_t lcId; /* Logical channel Id */
499 uint16_t msgLen; /* RRC message length (in bytes) */
500 uint8_t *rrcMsg; /* RRC Message (UL-DCCH Message) */
503 /* Function Pointers */
504 /* UE create Request from DU APP to RLC*/
505 typedef uint8_t (*DuRlcUlUeCreateReq) ARGS((
509 /* UE create Response from RLC to DU APP*/
510 typedef uint8_t (*RlcUlDuUeCreateRsp) ARGS((
512 RlcUeCfgRsp *ueCfgRsp));
514 /* UL RRC Message from RLC to DU APP */
515 typedef uint8_t (*RlcUlRrcMsgToDuFunc) ARGS((
517 RlcUlRrcMsgInfo *ulRrcMsgInfo));
519 /* Function Declarations */
520 uint8_t packDuRlcUlUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
521 uint8_t unpackRlcUlUeCreateReq(DuRlcUlUeCreateReq func, Pst *pst, Buffer *mBuf);
522 uint8_t RlcUlProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
523 uint8_t packRlcUlDuUeCreateRsp(Pst *pst, RlcUeCfgRsp *ueCfgRsp);
524 uint8_t unpackRlcUlUeCreateRsp(RlcUlDuUeCreateRsp func, Pst *pst, Buffer *mBuf);
525 uint8_t DuProcRlcUlUeCreateRsp(Pst *pst, RlcUeCfgRsp *cfgRsp);
526 uint8_t packRlcUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
527 uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
528 uint8_t unpackRlcUlRrcMsgToDu(RlcUlRrcMsgToDuFunc func, Pst *pst, Buffer *mBuf);
530 #endif /* RLC_INF_H */
532 /**********************************************************************
534 **********************************************************************/