X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_tenb_stats.c;h=393f1d4fc232938651fc836ad6fa7750978bb449;hb=3f340f5742e5c7c92b8541479ee7f2d670200cfb;hp=03d759e1b005b3af9853fe72a7f7684c2d18ee3a;hpb=4d45b914f9e94203603d3b9fdbcb1aad361301dd;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_tenb_stats.c b/src/5gnrrlc/kw_tenb_stats.c index 03d759e1b..393f1d4fc 100755 --- a/src/5gnrrlc/kw_tenb_stats.c +++ b/src/5gnrrlc/kw_tenb_stats.c @@ -52,10 +52,10 @@ #endif #ifdef TENB_STATS -PUBLIC TSL2CellStatsCb* l2CellStats[L2_STATS_MAX_CELLS]; -PUBLIC TSL2UeStatsCb* l2UeStats[L2_STATS_MAX_UES]; -PUBLIC CmLListCp freeL2UeStatsLst; /*!< Free Pool of UE stats Blocks */ -PUBLIC CmLListCp inUseL2UeStatsLst;/*!< In Use Pool of UE stats Blocks */ +TSL2CellStatsCb* l2CellStats[L2_STATS_MAX_CELLS]; +TSL2UeStatsCb* l2UeStats[L2_STATS_MAX_UES]; +CmLListCp freeL2UeStatsLst; /*!< Free Pool of UE stats Blocks */ +CmLListCp inUseL2UeStatsLst;/*!< In Use Pool of UE stats Blocks */ /* * @@ -70,21 +70,19 @@ PUBLIC CmLListCp inUseL2UeStatsLst;/*!< In Use Pool of UE stats Blocks */ * */ #ifdef ANSI -PUBLIC Void TSL2AllocStatsMem +Void TSL2AllocStatsMem ( Region region, Pool pool ) #else -PUBLIC Void TSL2AllocStatsMem(region, pool) +Void TSL2AllocStatsMem(region, pool) Region region; Pool pool; #endif { U32 cnt=0; - TRC2(TSL2AllocStatsMem) - cmLListInit(&inUseL2UeStatsLst); cmLListInit(&freeL2UeStatsLst); for (cnt=0; cnt < L2_STATS_MAX_CELLS; cnt++) @@ -97,7 +95,7 @@ PUBLIC Void TSL2AllocStatsMem(region, pool) printf("\n STATS Unexpected MEM Alloc Failure\n"); } } - cmMemset((U8 *)l2CellStats[cnt], 0x00, (Size)sizeof(TSL2CellStatsCb)); + memset(l2CellStats[cnt], 0x00, sizeof(TSL2CellStatsCb)); } for (cnt=0; cnt < L2_STATS_MAX_UES; cnt++) @@ -111,7 +109,7 @@ PUBLIC Void TSL2AllocStatsMem(region, pool) printf("\n STATS Unexpected MEM Alloc Failure at %d\n", (int)cnt); } } - cmMemset((U8 *)statsCb, 0x00, (Size)sizeof(TSL2UeStatsCb)); + memset(statsCb, 0x00, sizeof(TSL2UeStatsCb)); statsCb->lnk.node = (PTR)statsCb; cmLListAdd2Tail(&freeL2UeStatsLst, &statsCb->lnk); l2UeStats[cnt] = statsCb; @@ -133,20 +131,18 @@ PUBLIC Void TSL2AllocStatsMem(region, pool) * */ #ifdef ANSI -PUBLIC TSL2UeStatsCb* TSL2AllocUeStatsBlk +TSL2UeStatsCb* TSL2AllocUeStatsBlk ( U16 rnti ) #else -PUBLIC TSL2UeStatsCb* TSL2AllocUeStatsBlk(rnti) +TSL2UeStatsCb* TSL2AllocUeStatsBlk(rnti) U16 rnti; #endif { CmLList *tmp = NULLP; TSL2UeStatsCb *statsCb = NULLP; - TRC2(TSL2AllocUeStatsBlk) - tmp = freeL2UeStatsLst.first; if (tmp == NULLP) { @@ -175,19 +171,17 @@ PUBLIC TSL2UeStatsCb* TSL2AllocUeStatsBlk(rnti) * */ #ifdef ANSI -PUBLIC Void TSL2DeallocUeStatsBlk +Void TSL2DeallocUeStatsBlk ( U16 rnti, TSL2UeStatsCb *statsCb ) #else -PUBLIC Void TSL2DeallocUeStatsBlk(rnti, statsCb) +Void TSL2DeallocUeStatsBlk(rnti, statsCb) U16 rnti; TSL2UeStatsCb *statsCb; #endif { - TRC2(TSL2DeallocUeStatsBlk) - statsCb->inUse = FALSE; cmLListDelFrm(&inUseL2UeStatsLst, &statsCb->lnk); freeL2UeStatsLst.crnt = freeL2UeStatsLst.first; @@ -209,17 +203,15 @@ PUBLIC Void TSL2DeallocUeStatsBlk(rnti, statsCb) * */ #ifdef ANSI -PUBLIC TSL2CellStatsCb* TSL2AllocCellStatsBlk +TSL2CellStatsCb* TSL2AllocCellStatsBlk ( U32 cellId ) #else -PUBLIC TSL2CellStatsCb* TSL2AllocCellStatsBlk(cellId) +TSL2CellStatsCb* TSL2AllocCellStatsBlk(cellId) U32 cellId; #endif { - TRC2(TSL2AllocCellStatsBlk) - if (cellId != 1) { printf("\n STATS Unexpected CellID = %d\n", (int)cellId); @@ -241,16 +233,15 @@ PUBLIC TSL2CellStatsCb* TSL2AllocCellStatsBlk(cellId) * */ #ifdef ANSI -PUBLIC Void TSL2DeallocCellStatsBlk +Void TSL2DeallocCellStatsBlk ( U32 cellId ) #else -PUBLIC Void TSL2DeallocCellStatsBlk(cellId) +Void TSL2DeallocCellStatsBlk(cellId) U32 cellId; #endif { - TRC2(TSL2DeallocCellStatsBlk) RETVOID; } @@ -271,21 +262,19 @@ PUBLIC Void TSL2DeallocCellStatsBlk(cellId) * */ #ifdef ANSI -PUBLIC Void TSL2SendStatsToApp +Void TSL2SendStatsToApp ( Pst *pst, SuId suId ) #else -PUBLIC Void TSL2SendStatsToApp(pst, suId) +Void TSL2SendStatsToApp(pst, suId) Pst *pst; SuId suId; #endif { U32 idx; - TRC2(TSL2SendStatsToApp) - for (idx = 0; idx < L2_STATS_MAX_UES; idx++) { TSL2UeStatsCb *statsCb = l2UeStats[idx]; @@ -307,8 +296,8 @@ PUBLIC Void TSL2SendStatsToApp(pst, suId) #endif } rnti = statsCb->stats.rnti; - cmMemset((U8 *)&statsCb->stats.nonPersistent, 0x00, (Size)sizeof(statsCb->stats.nonPersistent)); - /* cmMemset((U8 *)&statsCb->stats, 0x00, (Size)sizeof(TSInfL2UeStats)); */ + memset(&statsCb->stats.nonPersistent, 0x00, sizeof(statsCb->stats.nonPersistent)); + /* memset(&statsCb->stats, 0x00, sizeof(TSInfL2UeStats)); */ statsCb->stats.rnti = rnti; } @@ -330,7 +319,7 @@ PUBLIC Void TSL2SendStatsToApp(pst, suId) #endif } cellId = statsCellCb->cellId; - cmMemset((U8 *)l2CellStats[idx], 0x00, (Size)sizeof(TSInfL2CellStats)); + memset(l2CellStats[idx], 0x00, sizeof(TSInfL2CellStats)); statsCellCb->cellId = cellId; } RETVOID;