Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
implementation of RLC UE delete req and rsp JIRA-ID : ODUHIGH-43
[o-du/l2.git]
/
src
/
5gnrrlc
/
kw_udx_dl.c
diff --git
a/src/5gnrrlc/kw_udx_dl.c
b/src/5gnrrlc/kw_udx_dl.c
index
96338e5
..
421ee67
100755
(executable)
--- a/
src/5gnrrlc/kw_udx_dl.c
+++ b/
src/5gnrrlc/kw_udx_dl.c
@@
-18,7
+18,7
@@
/**********************************************************************
/**********************************************************************
- Name:
LTE
RLC layer
+ Name:
NR
RLC layer
Type: C include file
Type: C include file
@@
-27,9
+27,6
@@
File: kw_udx_dl.c
**********************************************************************/
File: kw_udx_dl.c
**********************************************************************/
-static const char* RLOG_MODULE_NAME="UDX";
-static int RLOG_MODULE_ID=262144;
-static int RLOG_FILE_ID=203;
/* header include files (.h) */
#include "common_def.h"
/* header include files (.h) */
#include "common_def.h"
@@
-58,7
+55,7
@@
static int RLOG_FILE_ID=203;
#define RLC_MODULE RLC_DBGMASK_UDX
/* local defines */
#define RLC_MODULE RLC_DBGMASK_UDX
/* local defines */
-
EXTERN
S16 rlcDlmHndlStaRsp ARGS (( RlcCb *gCb,RlcDlRbCb *rbCb,
+S16 rlcDlmHndlStaRsp ARGS (( RlcCb *gCb,RlcDlRbCb *rbCb,
RlcUdxStaPdu *pStaPdu, RlcUdxBufLst *rlsPduLst));
RlcUdxStaPdu *pStaPdu, RlcUdxBufLst *rlsPduLst));
@@
-82,19
+79,12
@@
EXTERN S16 rlcDlmHndlStaRsp ARGS (( RlcCb *gCb,RlcDlRbCb *rbCb,
* -# ROK
* -# RFAILED
*/
* -# ROK
* -# RFAILED
*/
-#ifdef ANSI
S16 rlcDlUdxBndReq
(
Pst *pst,
SuId suId,
SpId spId
)
S16 rlcDlUdxBndReq
(
Pst *pst,
SuId suId,
SpId spId
)
-#else
-S16 rlcDlUdxBndReq (pst, suId, spId)
-Pst *pst;
-SuId suId;
-SpId spId;
-#endif
{
RlcUdxDlSapCb *udxSap; /* pointer to session SAP */
RlcCb *tRlcCb;
{
RlcUdxDlSapCb *udxSap; /* pointer to session SAP */
RlcCb *tRlcCb;
@@
-128,7
+118,7
@@
SpId spId;
/* Update the State */
udxSap->state = RLC_SAP_BND;
/* Update the State */
udxSap->state = RLC_SAP_BND;
-
RLOG1(L_INFO, "
UDX SAP state [%d]", udxSap->state);
+
DU_LOG("\nINFO --> RLC_DL :
UDX SAP state [%d]", udxSap->state);
break;
}
/* SAP is already bound */
break;
}
/* SAP is already bound */
@@
-146,7
+136,7
@@
SpId spId;
RLC_SEND_SAPID_ALARM(tRlcCb, spId,
LKW_EVENT_UDX_BND_REQ, LCM_CAUSE_INV_PAR_VAL);
RLC_SEND_SAPID_ALARM(tRlcCb, spId,
LKW_EVENT_UDX_BND_REQ, LCM_CAUSE_INV_PAR_VAL);
-
RLOG0(L_ERROR, "
UDX SAP already Bound");
+
DU_LOG("\nERROR --> RLC_DL :
UDX SAP already Bound");
rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK);
}
break;
rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK);
}
break;
@@
-158,7
+148,7
@@
SpId spId;
RLC_SEND_SAPID_ALARM(tRlcCb,spId,
LKW_EVENT_CKW_BND_REQ, LCM_CAUSE_INV_STATE);
#endif /* ERRCLASS & ERRCLS_INT_PAR */
RLC_SEND_SAPID_ALARM(tRlcCb,spId,
LKW_EVENT_CKW_BND_REQ, LCM_CAUSE_INV_STATE);
#endif /* ERRCLASS & ERRCLS_INT_PAR */
-
RLOG0(L_ERROR, "
Invalid UDX SAP State in Bind Req");
+
DU_LOG("\nERROR --> RLC_DL :
Invalid UDX SAP State in Bind Req");
rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK);
break;
}
rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK);
break;
}
@@
-179,19
+169,12
@@
SpId spId;
* @return S16
* -# ROK
*/
* @return S16
* -# ROK
*/
-#ifdef ANSI
S16 rlcDlUdxUbndReq
(
Pst *pst,
SpId spId,
Reason reason
)
S16 rlcDlUdxUbndReq
(
Pst *pst,
SpId spId,
Reason reason
)
-#else
-S16 rlcDlUdxUbndReq(pst, spId, reason)
-Pst *pst;
-SpId spId;
-Reason reason;
-#endif
{
RlcUdxDlSapCb *udxSap;
RlcCb *tRlcCb;
{
RlcUdxDlSapCb *udxSap;
RlcCb *tRlcCb;
@@
-205,7
+188,7
@@
Reason reason;
tRlcCb = RLC_GET_RLCCB(pst->dstInst);
tRlcCb = RLC_GET_RLCCB(pst->dstInst);
-
RLOG2(L_DEBUG,"
Unbind Req for spId[%d], reason[%d]",
+
DU_LOG("\nDEBUG --> RLC_DL :
Unbind Req for spId[%d], reason[%d]",
spId, reason);
UNUSED(reason);
/* disable upper sap (CKW) */
spId, reason);
UNUSED(reason);
/* disable upper sap (CKW) */
@@
-240,23
+223,16
@@
Reason reason;
* -# ROK
* -# RFAILED
*/
* -# ROK
* -# RFAILED
*/
-#ifdef ANSI
S16 rlcDlUdxCfgReq
(
Pst *pst,
SpId spId,
RlcCfgInfo *cfg
)
S16 rlcDlUdxCfgReq
(
Pst *pst,
SpId spId,
RlcCfgInfo *cfg
)
-#else
-S16 rlcDlUdxCfgReq(pst, spId, cfg)
-Pst *pst;
-SpId spId;
-RlcCfgInfo *cfg;
-#endif
{
RlcCfgCfmInfo *cfgCfm;
{
RlcCfgCfmInfo *cfgCfm;
-
U8
idx;
- RlcCb
*tRlcCb;
+
uint8_t
idx;
+ RlcCb *tRlcCb;
Pst *pstUdxCfm;
#if (ERRCLASS & ERRCLS_INT_PAR)
Pst *pstUdxCfm;
#if (ERRCLASS & ERRCLS_INT_PAR)
@@
-279,7
+255,7
@@
RlcCfgInfo *cfg;
#if (ERRCLASS & ERRCLS_ADD_RES)
if (cfgCfm == NULLP)
{
#if (ERRCLASS & ERRCLS_ADD_RES)
if (cfgCfm == NULLP)
{
-
RLOG0(L_FATAL,"
Memory Allocation Failed.");
+
DU_LOG("\nERROR --> RLC_DL :
Memory Allocation Failed.");
/* kw002.201 Freeing from proper region */
/* RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo)); */
return RFAILED;
/* kw002.201 Freeing from proper region */
/* RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo)); */
return RFAILED;
@@
-305,7
+281,7
@@
RlcCfgInfo *cfg;
if (rlcCfgAddDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
entCfg, entCfgCfm) != ROK)
{
if (rlcCfgAddDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
entCfg, entCfgCfm) != ROK)
{
-
RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"
Addition Failed due to[%d]",
+
DU_LOG("\nERROR --> RLC_DL :
Addition Failed due to[%d]",
entCfgCfm->status.reason);
}
}
entCfgCfm->status.reason);
}
}
@@
-319,7
+295,7
@@
RlcCfgInfo *cfg;
if (rlcCfgReCfgDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
entCfg, entCfgCfm) != ROK)
{
if (rlcCfgReCfgDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
entCfg, entCfgCfm) != ROK)
{
-
RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"
ReCfg Failed due to[%d]",
+
DU_LOG("\nERROR --> RLC_DL :
ReCfg Failed due to[%d]",
entCfgCfm->status.reason);
}
}
entCfgCfm->status.reason);
}
}
@@
-334,7
+310,7
@@
RlcCfgInfo *cfg;
if (rlcCfgDelDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
entCfg, entCfgCfm) != ROK)
{
if (rlcCfgDelDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
entCfg, entCfgCfm) != ROK)
{
-
RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"
Deletion Failed due to[%d]",
+
DU_LOG("\nERROR --> RLC_DL :
Deletion Failed due to[%d]",
entCfgCfm->status.reason);
}
}
entCfgCfm->status.reason);
}
}
@@
-357,7
+333,7
@@
RlcCfgInfo *cfg;
if (rlcCfgReEstDlRb(tRlcCb,cfg->ueId, cfg->cellId,
sndReEst,entCfg, entCfgCfm) != ROK)
{
if (rlcCfgReEstDlRb(tRlcCb,cfg->ueId, cfg->cellId,
sndReEst,entCfg, entCfgCfm) != ROK)
{
-
RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"
Reest Failed due to[%d]",
+
DU_LOG("\nERROR --> RLC_DL :
Reest Failed due to[%d]",
entCfgCfm->status.reason);
}
}
entCfgCfm->status.reason);
}
}
@@
-370,9
+346,14
@@
RlcCfgInfo *cfg;
if (rlcCfgDelDlUe(tRlcCb,cfg->ueId, cfg->cellId,
entCfg, entCfgCfm) != ROK)
{
if (rlcCfgDelDlUe(tRlcCb,cfg->ueId, cfg->cellId,
entCfg, entCfgCfm) != ROK)
{
-
RLOG_ARG1(L_ERROR,DBG_UEID,cfg->ueId,"
deletion Failed due to[%d]",
+
DU_LOG("\nERROR --> RLC_DL :
deletion Failed due to[%d]",
entCfgCfm->status.reason);
}
entCfgCfm->status.reason);
}
+ else
+ {
+ DU_LOG("\nDEBUG --> RLC_DL: UE information is deleted for UEIdx[%d] and CellId[%d]",\
+ cfg->ueId, cfg->cellId);
+ }
break;
}
case CKW_CFG_DELETE_CELL:
break;
}
case CKW_CFG_DELETE_CELL:
@@
-380,7
+361,7
@@
RlcCfgInfo *cfg;
if (rlcCfgDelDlCell(tRlcCb,cfg->cellId,entCfg,entCfgCfm)
!= ROK )
{
if (rlcCfgDelDlCell(tRlcCb,cfg->cellId,entCfg,entCfgCfm)
!= ROK )
{
-
RLOG_ARG1(L_ERROR,DBG_CELLID,cfg->cellId,"
deletion Failed due to[%d]",
+
DU_LOG("\nERROR --> RLC_DL :
deletion Failed due to[%d]",
entCfgCfm->status.reason);
}
break;
entCfgCfm->status.reason);
}
break;
@@
-390,7
+371,7
@@
RlcCfgInfo *cfg;
{
RLC_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType,\
CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_CFG);
{
RLC_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType,\
CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_CFG);
-
RLOG0(L_ERROR, "
Invalid CfgType");
+
DU_LOG("\nERROR --> RLC_DL :
Invalid CfgType");
}
}
}
}
}
}
@@
-427,23
+408,14
@@
RlcCfgInfo *cfg;
* -# ROK
* -# RFAILED
*/
* -# ROK
* -# RFAILED
*/
-#ifdef ANSI
S16 rlcDlUdxUeIdChgReq
(
Pst *pst,
SpId spId,
S16 rlcDlUdxUeIdChgReq
(
Pst *pst,
SpId spId,
-
U32
transId,
+
uint32_t
transId,
CkwUeInfo *ueInfo,
CkwUeInfo *newUeInfo
)
CkwUeInfo *ueInfo,
CkwUeInfo *newUeInfo
)
-#else
-S16 rlcDlUdxUeIdChgReq(pst,spId,transId,ueInfo,newUeInfo)
-Pst *pst;
-SpId spId;
-U32 transId;
-CkwUeInfo *ueInfo;
-CkwUeInfo *newUeInfo;
-#endif
{
CmStatus status;
RlcCb *tRlcCb;
{
CmStatus status;
RlcCb *tRlcCb;
@@
-469,7
+441,7
@@
CkwUeInfo *newUeInfo;
if (rlcCfgDlUeIdChng(tRlcCb, ueInfo, newUeInfo, &status) != ROK)
{
if (rlcCfgDlUeIdChng(tRlcCb, ueInfo, newUeInfo, &status) != ROK)
{
-
RLOG_ARG1(L_ERROR,DBG_CELLID,newUeInfo->cellId,"
Failure due to[%d]",
+
DU_LOG("\nERROR --> RLC_DL :
Failure due to[%d]",
status.reason);
}
rlcDlUdxUeIdChgCfm(&(tRlcCb->u.dlCb->udxDlSap[spId].pst),
status.reason);
}
rlcDlUdxUeIdChgCfm(&(tRlcCb->u.dlCb->udxDlSap[spId].pst),
@@
-493,7
+465,6
@@
CkwUeInfo *newUeInfo;
* -# ROK
* -# RFAILED
**/
* -# ROK
* -# RFAILED
**/
-#ifdef ANSI
S16 rlcDlUdxStaPduReq
(
Pst *pst,
S16 rlcDlUdxStaPduReq
(
Pst *pst,
@@
-501,13
+472,6
@@
SpId spId,
CmLteRlcId *rlcId,
RlcUdxDlStaPdu *pStaPdu
)
CmLteRlcId *rlcId,
RlcUdxDlStaPdu *pStaPdu
)
-#else
-S16 rlcDlUdxStaPduReq(pst, spId, rlcId, pStaPdu)
-Pst *pst;
-SpId spId;
-CmLteRlcId *rlcId;
-RlcUdxDlStaPdu *pStaPdu;
-#endif
{
RlcDlRbCb *rbCb;
RlcCb *tRlcCb;
{
RlcDlRbCb *rbCb;
RlcCb *tRlcCb;
@@
-517,7
+481,7
@@
RlcUdxDlStaPdu *pStaPdu;
rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb); /* Fetch DBM RbCb */
if (!rbCb)
{
rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb); /* Fetch DBM RbCb */
if (!rbCb)
{
-
RLOG_ARG2(L_ERROR, DBG_UEID,rlcId->ueId, "
CellId [%u]:RbId[%d] not found",
+
DU_LOG("\nERROR --> RLC_DL :
CellId [%u]:RbId[%d] not found",
rlcId->cellId,rlcId->rbId);
RLC_FREE_SHRABL_BUF(pst->region,
pst->pool,
rlcId->cellId,rlcId->rbId);
RLC_FREE_SHRABL_BUF(pst->region,
pst->pool,
@@
-526,19
+490,19
@@
RlcUdxDlStaPdu *pStaPdu;
return RFAILED;
}
return RFAILED;
}
- AMDL.cntrlBo = pStaPdu->controlBo;
+
RLC_
AMDL.cntrlBo = pStaPdu->controlBo;
/* If there already exists a STAUS PDU, free it and take the new one
into account */
/* If there already exists a STAUS PDU, free it and take the new one
into account */
- if(AMDL.pStaPdu)
+ if(
RLC_
AMDL.pStaPdu)
{
RLC_FREE_SHRABL_BUF(pst->region,
pst->pool,
{
RLC_FREE_SHRABL_BUF(pst->region,
pst->pool,
- AMDL.pStaPdu,
+
RLC_
AMDL.pStaPdu,
sizeof(RlcUdxDlStaPdu));
}
sizeof(RlcUdxDlStaPdu));
}
- AMDL.pStaPdu = pStaPdu;
- rlcAmmSendDedLcBoStatus(tRlcCb, rbCb, &AMDL);
+
RLC_
AMDL.pStaPdu = pStaPdu;
+ rlcAmmSendDedLcBoStatus(tRlcCb, rbCb, &
RLC_
AMDL);
return (ROK);
}
return (ROK);
}
@@
-556,7
+520,6
@@
RlcUdxDlStaPdu *pStaPdu;
* -# ROK
* -# RFAILED
**/
* -# ROK
* -# RFAILED
**/
-#ifdef ANSI
S16 rlcDlUdxStaUpdReq
(
Pst* pst,
S16 rlcDlUdxStaUpdReq
(
Pst* pst,
@@
-564,13
+527,6
@@
SpId spId,
CmLteRlcId *rlcId,
RlcUdxStaPdu *pStaPdu
)
CmLteRlcId *rlcId,
RlcUdxStaPdu *pStaPdu
)
-#else
-S16 rlcDlUdxStaUpdReq(pst, spId, rlcId,pStaPdu)
-Pst* pst;
-SpId spId;
-CmLteRlcId *rlcId;
-RlcUdxStaPdu *pStaPdu;
-#endif
{
RlcCb *tRlcCb;
RlcDlRbCb *rbCb;
{
RlcCb *tRlcCb;
RlcDlRbCb *rbCb;
@@
-580,7
+536,7
@@
RlcUdxStaPdu *pStaPdu;
rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb);
if (!rbCb)
{
rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb);
if (!rbCb)
{
-
RLOG_ARG2(L_ERROR, DBG_UEID,rlcId->ueId, "
CellId [%u]:RbId[%d] not found",
+
DU_LOG("\nERROR --> RLC_DL :
CellId [%u]:RbId[%d] not found",
rlcId->cellId,rlcId->rbId);
return RFAILED;
}
rlcId->cellId,rlcId->rbId);
return RFAILED;
}
@@
-598,21
+554,15
@@
RlcUdxStaPdu *pStaPdu;
#ifdef LTE_L2_MEAS
/**
*/
#ifdef LTE_L2_MEAS
/**
*/
-#ifdef ANSI
S16 rlcDlUdxL2MeasReq
(
Pst *pst,
RlcL2MeasReqEvt *measReqEvt
)
S16 rlcDlUdxL2MeasReq
(
Pst *pst,
RlcL2MeasReqEvt *measReqEvt
)
-#else
-S16 rlcDlUdxL2MeasReq (pst, measReqEvt)
-Pst *pst;
-RlcL2MeasReqEvt *measReqEvt;
-#endif
{
{
-
U32
cntr;
-
U8
measType;
-
VOLATILE U32
startTime = 0;
+
uint32_t
cntr;
+
uint8_t
measType;
+
volatile uint32_t
startTime = 0;
RlcCb *tRlcCb;
/*starting Task*/
RlcCb *tRlcCb;
/*starting Task*/
@@
-638,7
+588,7
@@
RlcL2MeasReqEvt *measReqEvt;
else
{
/* for nonIpThroughput meas, enable only for the sent QCIs */
else
{
/* for nonIpThroughput meas, enable only for the sent QCIs */
-
U32
i;
+
uint32_t
i;
for(i = 0; i < LKW_MAX_QCI; i++)
{
tRlcCb->u.dlCb->rlcL2Cb.measOn[i] |= measType;
for(i = 0; i < LKW_MAX_QCI; i++)
{
tRlcCb->u.dlCb->rlcL2Cb.measOn[i] |= measType;
@@
-671,24
+621,18
@@
After receving this request, RLC stops L2 Measurement
* -# Failure : RFAILED
*/
* -# Failure : RFAILED
*/
-#ifdef ANSI
S16 rlcDlUdxL2MeasStopReq
(
Pst *pst,
S16 rlcDlUdxL2MeasStopReq
(
Pst *pst,
-
U8
measType
+
uint8_t
measType
)
)
-#else
-S16 rlcDlUdxL2MeasStopReq (pst, measType)
-Pst *pst;
-U8 measType;
-#endif
{
/* S16 ret = ROK;*/
RlcL2MeasEvtCb *measEvtCb = NULLP;
{
/* S16 ret = ROK;*/
RlcL2MeasEvtCb *measEvtCb = NULLP;
-
U16
cntr;
-
U8
status = ROK;
+
uint16_t
cntr;
+
uint8_t
status = ROK;
/* RlcL2MeasCfmEvt measCfmEvt; */
/* RlcL2MeasCfmEvt measCfmEvt; */
-
VOLATILE U32
startTime = 0;
+
volatile uint32_t
startTime = 0;
RlcCb *tRlcCb=NULLP;
/*starting Task*/
RlcCb *tRlcCb=NULLP;
/*starting Task*/
@@
-732,22
+676,15
@@
After receving this request, RLC sends L2 Measurement
* -# Failure : RFAILED
*/
* -# Failure : RFAILED
*/
-#ifdef ANSI
S16 rlcDlUdxL2MeasSendReq
(
Pst *pst,
S16 rlcDlUdxL2MeasSendReq
(
Pst *pst,
-
U8
measType
+
uint8_t
measType
)
)
-#else
-S16 rlcDlUdxL2MeasSendReq (pst, measType)
-Pst *pst;
-U8 measType;
-#endif
{
RlcL2MeasEvtCb *measEvtCb;
{
RlcL2MeasEvtCb *measEvtCb;
- U16 cntr;
-
- VOLATILE U32 startTime = 0;
+ uint16_t cntr;
+ volatile uint32_t startTime = 0;
RlcCb *tRlcCb;
tRlcCb = RLC_GET_RLCCB(pst->dstInst);
RlcCb *tRlcCb;
tRlcCb = RLC_GET_RLCCB(pst->dstInst);