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
[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-498] Fix in DL data flow and trace alignment
[o-du/l2.git]
/
src
/
cm
/
cm_lte.c
diff --git
a/src/cm/cm_lte.c
b/src/cm/cm_lte.c
index
ebb4dcc
..
3c8e706
100755
(executable)
--- a/
src/cm/cm_lte.c
+++ b/
src/cm/cm_lte.c
@@
-70,7
+70,7
@@
/* public variable declarations */
/* public variable declarations */
-
PUBLIC U32
cmLteTime;
+
uint32_t
cmLteTime;
\f
/***********************************************************
\f
/***********************************************************
@@
-88,26
+88,15
@@
PUBLIC U32 cmLteTime;
* File :
*
**********************************************************/
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmPkLteRlcId
-(
-CmLteRlcId *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmPkLteRlcId(param, mBuf)
-CmLteRlcId *param;
-Buffer *mBuf;
-#endif
+S16 cmPkLteRlcId(CmLteRlcId *param,Buffer *mBuf)
{
{
- TRC3(cmPkLteRlcId);
CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
- CMCHKPK(
SPkU
8, param->rbType, mBuf);
+ CMCHKPK(
oduUnpackUInt
8, param->rbType, mBuf);
CMCHKPK(cmPkLteRbId, param->rbId, mBuf);
CMCHKPK(cmPkLteRbId, param->rbId, mBuf);
-
RETVALUE(ROK)
;
+
return ROK
;
}
}
@@
-127,26
+116,15
@@
Buffer *mBuf;
* File :
*
**********************************************************/
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmUnpkLteRlcId
-(
-CmLteRlcId *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkLteRlcId(param, mBuf)
-CmLteRlcId *param;
-Buffer *mBuf;
-#endif
+S16 cmUnpkLteRlcId(CmLteRlcId *param,Buffer *mBuf)
{
{
- TRC3(cmUnpkLteRlcId);
CMCHKUNPK(cmUnpkLteRbId, ¶m->rbId, mBuf);
CMCHKUNPK(cmUnpkLteRbId, ¶m->rbId, mBuf);
- CMCHKUNPK(
SUnpkU
8, ¶m->rbType, mBuf);
+ CMCHKUNPK(
oduPackUInt
8, ¶m->rbType, mBuf);
CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
-
RETVALUE(ROK)
;
+
return ROK
;
}
}
@@
-166,25
+144,14
@@
Buffer *mBuf;
* File :
*
**********************************************************/
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmPkLteTimingInfo
-(
-CmLteTimingInfo *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmPkLteTimingInfo(param, mBuf)
-CmLteTimingInfo *param;
-Buffer *mBuf;
-#endif
+S16 cmPkLteTimingInfo(CmLteTimingInfo *param,Buffer *mBuf)
{
{
- TRC3(cmPkLteTimingInfo);
- CMCHKPK(
SPkU8, param->subframe
, mBuf);
- CMCHKPK(
SPkU
16, param->sfn, mBuf);
-
CMCHKPK(SPkU
16, param->hSfn, mBuf);
-
RETVALUE(ROK)
;
+ CMCHKPK(
oduUnpackUInt16, param->slot
, mBuf);
+ CMCHKPK(
oduUnpackUInt
16, param->sfn, mBuf);
+
//CMCHKPK(oduUnpackUInt
16, param->hSfn, mBuf);
+
return ROK
;
}
}
@@
-204,25
+171,14
@@
Buffer *mBuf;
* File :
*
**********************************************************/
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmUnpkLteTimingInfo
-(
-CmLteTimingInfo *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkLteTimingInfo(param, mBuf)
-CmLteTimingInfo *param;
-Buffer *mBuf;
-#endif
+S16 cmUnpkLteTimingInfo(CmLteTimingInfo *param,Buffer *mBuf)
{
{
- TRC3(cmUnpkLteTimingInfo);
-
CMCHKUNPK(SUnpkU
16, ¶m->hSfn, mBuf);
- CMCHKUNPK(
SUnpkU
16, ¶m->sfn, mBuf);
- CMCHKUNPK(
SUnpkU8, ¶m->subframe
, mBuf);
-
RETVALUE(ROK)
;
+
//CMCHKUNPK(oduPackUInt
16, ¶m->hSfn, mBuf);
+ CMCHKUNPK(
oduPackUInt
16, ¶m->sfn, mBuf);
+ CMCHKUNPK(
oduPackUInt16,¶m->slot
, mBuf);
+
return ROK
;
}
}
@@
-242,26
+198,15
@@
Buffer *mBuf;
* File :
*
**********************************************************/
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmPkLtePdcpId
-(
-CmLtePdcpId *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmPkLtePdcpId(param, mBuf)
-CmLtePdcpId *param;
-Buffer *mBuf;
-#endif
+S16 cmPkLtePdcpId(CmLtePdcpId *param,Buffer *mBuf)
{
{
- TRC3(cmPkLtePdcpId);
- CMCHKPK(
SPkU
8, param->rbType, mBuf);
+ CMCHKPK(
oduUnpackUInt
8, param->rbType, mBuf);
CMCHKPK(cmPkLteRbId, param->rbId, mBuf);
CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
CMCHKPK(cmPkLteRbId, param->rbId, mBuf);
CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
-
RETVALUE(ROK)
;
+
return ROK
;
}
}
@@
-281,42
+226,23
@@
Buffer *mBuf;
* File :
*
**********************************************************/
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmUnpkLtePdcpId
-(
-CmLtePdcpId *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkLtePdcpId(param, mBuf)
-CmLtePdcpId *param;
-Buffer *mBuf;
-#endif
+S16 cmUnpkLtePdcpId(CmLtePdcpId *param,Buffer *mBuf)
{
{
- TRC3(cmUnpkLtePdcpId);
CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
CMCHKUNPK(cmUnpkLteRbId, ¶m->rbId, mBuf);
CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
CMCHKUNPK(cmUnpkLteRbId, ¶m->rbId, mBuf);
- CMCHKUNPK(
SUnpkU
8, ¶m->rbType, mBuf);
-
RETVALUE(ROK)
;
+ CMCHKUNPK(
oduPackUInt
8, ¶m->rbType, mBuf);
+
return ROK
;
}
#ifdef LTE_L2_MEAS
}
#ifdef LTE_L2_MEAS
-#ifdef ANSI
-PUBLIC S16 cmUpdateSsiMemInfo
-(
-CmLteMemInfo *mInfo
-)
-#else
-PUBLIC S16 cmUpdateSsiMemInfo(mInfo)
-CmLteMemInfo *mInfo;
-#endif
+S16 cmUpdateSsiMemInfo(CmLteMemInfo *mInfo)
{
{
-
U8
numReg = 0;
-
U8
numPool = 0;
-
U8
idxReg;
-
U8
idxPool;
+
uint8_t
numReg = 0;
+
uint8_t
numPool = 0;
+
uint8_t
idxReg;
+
uint8_t
idxPool;
SsMemDbgInfo dbgInfo;
SGetRegPoolInfo(&numReg,&numPool);
SsMemDbgInfo dbgInfo;
SGetRegPoolInfo(&numReg,&numPool);
@@
-352,24
+278,14
@@
CmLteMemInfo *mInfo;
mInfo->regInfo[idxReg].isGenMemInfoUpdated = TRUE;
}
}
mInfo->regInfo[idxReg].isGenMemInfoUpdated = TRUE;
}
}
-
RETVALUE(ROK)
;
+
return ROK
;
}
}
-#ifdef ANSI
-PUBLIC S16 cmFillMemUtilizationMeas
-(
- CmLteMemInfo *memoryInfo,
-CmLteMemInfo *memInfo
-)
-#else
-PUBLIC S16 cmFillMemUtilizationMeas(memoryInfo,memInfo)
-CmLteMemInfo *memoryInfo;
-CmLteMemInfo *memInfo;
-#endif
+S16 cmFillMemUtilizationMeas( CmLteMemInfo *memoryInfo,CmLteMemInfo *memInfo)
{
{
-
U8
idxReg = 0;
-
U8
idxPool = 0;
-
U8
numPool = 0;
+
uint8_t
idxReg = 0;
+
uint8_t
idxPool = 0;
+
uint8_t
numPool = 0;
memoryInfo->numRegions = memInfo->numRegions;
for(idxReg=0; idxReg < memInfo->numRegions; idxReg++)
memoryInfo->numRegions = memInfo->numRegions;
for(idxReg=0; idxReg < memInfo->numRegions; idxReg++)
@@
-387,22
+303,14
@@
CmLteMemInfo *memInfo;
memoryInfo->regInfo[idxReg].poolInfo[idxPool].maxUsed = memInfo->regInfo[idxReg].poolInfo[idxPool].maxUsed;
}
}
memoryInfo->regInfo[idxReg].poolInfo[idxPool].maxUsed = memInfo->regInfo[idxReg].poolInfo[idxPool].maxUsed;
}
}
-
RETVALUE(ROK)
;
+
return ROK
;
}
}
-#ifdef ANSI
-PUBLIC S16 cmClearMemUtilizationCounter
-(
-CmLteMemInfo *memInfo
-)
-#else
-PUBLIC S16 cmClearMemUtilizationCounter(memInfo)
-CmLteMemInfo *memInfo;
-#endif
+S16 cmClearMemUtilizationCounter(CmLteMemInfo *memInfo)
{
{
-
U8
idxReg = 0;
-
U8
idxPool = 0;
-
U8
numPool = 0;
+
uint8_t
idxReg = 0;
+
uint8_t
idxPool = 0;
+
uint8_t
numPool = 0;
for(idxReg=0; idxReg < memInfo->numRegions; idxReg++)
{
memInfo->regInfo[idxReg].regionId = 0;
for(idxReg=0; idxReg < memInfo->numRegions; idxReg++)
{
memInfo->regInfo[idxReg].regionId = 0;
@@
-419,20
+327,12
@@
CmLteMemInfo *memInfo;
memInfo->regInfo[idxReg].poolInfo[idxPool].maxUsed = 0;
}
}
memInfo->regInfo[idxReg].poolInfo[idxPool].maxUsed = 0;
}
}
-
RETVALUE(ROK)
;
+
return ROK
;
}
}
-#ifdef ANSI
-PUBLIC S16 cmClearCpuUtilizationCounter
-(
-CmCpuStatsInfo *cpuInfo
-)
-#else
-PUBLIC S16 cmClearCpuUtilizationCounter(cpuInfo)
-CmCpuStatsInfo *cpuInfo
-#endif
+S16 cmClearCpuUtilizationCounter(CmCpuStatsInfo *cpuInfo)
{
{
-
U8
idx= 0;
+
uint8_t
idx= 0;
for(idx=0; idx < cpuInfo->numCores; idx++)
{
cpuInfo->cpuUtil[idx].maxCpuUtil = 0;
for(idx=0; idx < cpuInfo->numCores; idx++)
{
cpuInfo->cpuUtil[idx].maxCpuUtil = 0;
@@
-440,29
+340,19
@@
CmCpuStatsInfo *cpuInfo
cpuInfo->cpuUtil[idx].numSamples = 0;
}
cpuInfo->numCores = 0;
cpuInfo->cpuUtil[idx].numSamples = 0;
}
cpuInfo->numCores = 0;
-
RETVALUE(ROK)
;
+
return ROK
;
}
}
-#ifdef ANSI
-PUBLIC S16 cmFillCpuUtilizationMeas
-(
-CmLteCpuInfo *cpuMeasInfo,
-CmCpuStatsInfo *cpuInfo
-)
-#else
-PUBLIC S16 cmFillCpuUtilizationMeas(cpuMeasInfo,cpuInfo)
-CmLteCpuInfo *cpuMeasInfo;
-CmCpuStatsInfo *cpuInfo;
-#endif
+S16 cmFillCpuUtilizationMeas(CmLteCpuInfo *cpuMeasInfo,CmCpuStatsInfo *cpuInfo)
{
{
-
U8
idx= 0;
+
uint8_t
idx= 0;
cpuMeasInfo->numCores = cpuInfo->numCores;
for(idx=0; idx < cpuInfo->numCores; idx++)
{
cpuMeasInfo->cpuUtil[idx].avgCpuUtil = cpuInfo->cpuUtil[idx].totCpuUtil/cpuInfo->cpuUtil[idx].numSamples;
cpuMeasInfo->cpuUtil[idx].maxCpuUtil = cpuInfo->cpuUtil[idx].maxCpuUtil;
}
cpuMeasInfo->numCores = cpuInfo->numCores;
for(idx=0; idx < cpuInfo->numCores; idx++)
{
cpuMeasInfo->cpuUtil[idx].avgCpuUtil = cpuInfo->cpuUtil[idx].totCpuUtil/cpuInfo->cpuUtil[idx].numSamples;
cpuMeasInfo->cpuUtil[idx].maxCpuUtil = cpuInfo->cpuUtil[idx].maxCpuUtil;
}
-
RETVALUE(ROK)
;
+
return ROK
;
}
#endif
}
#endif
@@
-471,7
+361,7
@@
CmCpuStatsInfo *cpuInfo;
CmTtiProc ttiProc;
#define TTI_1MS 950
CmTtiProc ttiProc;
#define TTI_1MS 950
-
PUBLIC Void cmUpdateTtiCounters(U32
ttiProcessingTime)
+
Void cmUpdateTtiCounters(uint32_t
ttiProcessingTime)
{
ttiProc.numOfTti++;
ttiProc.totTtiProcessingTime += ttiProcessingTime;
{
ttiProc.numOfTti++;
ttiProc.totTtiProcessingTime += ttiProcessingTime;
@@
-487,10
+377,10
@@
PUBLIC Void cmUpdateTtiCounters(U32 ttiProcessingTime)
{
ttiProc.ttiStretchCount++;
}
{
ttiProc.ttiStretchCount++;
}
-
RETVOID
;
+
return
;
}
}
-
PUBLIC
Void cmResetTtiCounters(Void)
+Void cmResetTtiCounters(Void)
{
ttiProc.totTtiProcessingTime = 0;
ttiProc.numOfTti = 0;
{
ttiProc.totTtiProcessingTime = 0;
ttiProc.numOfTti = 0;
@@
-498,7
+388,7
@@
PUBLIC Void cmResetTtiCounters(Void)
ttiProc.ttiStretchCount = 0;
ttiProc.ttiThresholdExceedCount = 0;
ttiProc.phyReptTtiStretchCount = 0;
ttiProc.ttiStretchCount = 0;
ttiProc.ttiThresholdExceedCount = 0;
ttiProc.phyReptTtiStretchCount = 0;
-
RETVOID
;
+
return
;
}
#endif
}
#endif