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**
25 Desc: This file contain the hash definations for PDCP
29 *********************************************************************21*/
31 @brief PDCP Hash definitions
37 #define PJ_MAX_PDCP_INSTANCES 2
38 #define PJ_FWD_MAX_SDU_CNT 1
40 #define PJ_ALLOC_BUF(gCb,_buf) \
42 if (SGetMsg(gCb->init.region, gCb->init.pool, (Buffer **)&_buf) != ROK) \
48 #define PJ_CPY_MSG(_cb,_x, _y, _ret) \
49 _ret =(SAddMsgRef((_x), PJ_GET_MEM_REGION(_cb), PJ_GET_MEM_POOL(_cb), (_y)))
51 #define PJ_SND_CFM(_cb,_pjRbCb, _txEnt, _cause) \
53 PjuDatCfmInfo *_datCfm; \
54 CmLtePdcpId *_pdcpId; \
55 PjPjuSapCb *_pjuSap; \
56 if (_pjRbCb->rbType == PJ_SRB) \
57 _pjuSap = &(_cb->u.dlCb->pjuSap[PJ_SRB_SAP]); \
59 _pjuSap = &(_cb->u.dlCb->pjuSap[PJ_DRB_SAP]); \
61 PJ_ALLOC(_cb, _datCfm, sizeof(PjuDatCfmInfo)); \
62 PJ_ALLOC(_cb,_pdcpId, sizeof(CmLtePdcpId)); \
63 if ( _datCfm != NULLP && _pdcpId != NULLP ) \
65 _datCfm->cfmSta[_datCfm->numSdus].sduId = _txEnt->sduId;\
66 _datCfm->cfmSta[_datCfm->numSdus].status = _cause; \
68 _pdcpId->rbId = _pjRbCb->rbId; \
69 _pdcpId->rbType = _pjRbCb->rbType; \
70 _pdcpId->ueId = _pjRbCb->ueCb->key.ueId; \
71 _pdcpId->cellId = _pjRbCb->ueCb->key.cellId; \
72 PjUiPjuDatCfm(&(_pjuSap->pst), _pjuSap->suId, _pdcpId, _datCfm);\
74 pjDbmDelTxEnt(_cb, &(pjRbCb->dlCb.txBuf), _txEnt->count); \
77 #define PJ_ADD_PRE_MSG(_pdu, _hdr, _numBytes, _ret) \
82 while (_numBytes > _bytes ) \
84 _liByte = (U8) (_hdr >> (8*_bytes)); \
85 _ret = SAddPreMsg((Data )_liByte, _pdu); \
93 #endif /* __PJENVT2KH__ */
94 /********************************************************************30**
97 **********************************************************************/