Moving all common header file into common_def.h file
[o-du/l2.git] / src / cm / cm_tenb_stats.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /**********************************************************************
20  
21     Name:  
22  
23     Type:  
24  
25     Desc:  
26  
27     File:  cm_tenb_stats.x 
28  
29 **********************************************************************/
30  
31 /** @file cm_tenb_stats.x
32 */
33
34 #ifdef TENB_STATS
35  
36 #include "cm_tenb_stats.h"
37 #include "l2_tenb_stats.h"
38
39 #ifndef __TENBSTATSINFX__
40 #define __TENBSTATSINFX__
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif /* __cplusplus */
45
46 typedef struct tsInfL2CellStats
47 {
48    U32   cellId;
49    struct schCellStats{ 
50       U32   msg4Fail;
51       U32   msg3Fail;
52       U32   dlSumCw0Cqi;
53       U32   dlNumCw0Cqi;
54       U32   dlSumCw1Cqi;
55       U32   dlNumCw1Cqi;
56       U32   dlSumCw0iTbs;
57       U32   dlNumCw0iTbs;
58       U32   dlSumCw1iTbs;
59       U32   dlNumCw1iTbs;
60       U32   riCnt[4]; /* Rank = 1..4 */
61       U32   dlNack[2][4];
62       U32   dlAckNack[2][4]; /* [CW_CNT][RV_CNT] */
63       U32   dlDtx[2][4];
64       U32   ulNack[4];
65       U32   ulAckNack[4];    /* [RV_CNT] */
66       U32   ulDtx[4];
67       U32   dlPrbUsage[10]; /* dlPrbUsage[0] to have overall PRB usage */
68       U32   ulPrbUsage[10]; /* dlPrbUsage[0] to have overall PRB usage */
69       U32   dlPdbRatio[10];
70       U32   avgTtiProcTime; /* In us */
71       U32   cntTtiProcTime1000; /* Count of instances where TTI proc time was
72       greater than 1000us */
73       U32   cntTtiProcTime900; /* Count of instances where TTI proc time was
74       greater than 900us and less than 1000us */
75       U32   cntTtiProcTime800;
76       U32   cntTtiProcTime700;
77       U32   cntTtiProcTime600;
78       U32   cntTtiProcTime500;
79 #ifdef RG_5GTF
80       U32   dl5gtfUePick;
81       U32   dl5gtfRbAllocPass;
82       U32   dl5gtfRbAllocFail;
83       U32   dl5gtfFnlzPass;
84       U32   dl5gtfFnlzFail;
85       U32   dl5gtfBoUpd;
86       U32   dl5gtfPdcchSend;
87       U32   dl5gtfPdschCons;
88
89       U32   ul5gtfSrRecv;
90       U32   ul5gtfBsrRecv;
91       U32   ul5gtfUeSchPick;
92       U32   ul5gtfPdcchSchd;
93       U32   ul5gtfAllocAllocated;
94       U32   ul5gtfUeRbAllocDone;
95       U32   ul5gtfUeRmvFnlzZeroBo;
96       U32   ul5gtfUeFnlzReAdd;
97       U32   ul5gtfPdcchSend;
98       U32   ul5gtfRbAllocFail;
99 #endif
100       U32   ulSumCqi;
101       U32   ulNumCqi;
102       U32   ulSumiTbs;
103       U32   ulNumiTbs;
104       U32   dlTtlTpt;
105       U32   ulTtlTpt;
106    }sch;
107    struct rlcCellStats{ 
108       U32   maxRlcSrbRetxFail;
109       U32   maxRlcDrbRetxFail;
110       U32   reOdrTmrExp;
111    }rlc;
112 }TSInfL2CellStats;
113
114 typedef struct tsInfL2UeStats
115 {
116    U32 rnti;
117    struct nonPersistentUeStats{
118       struct schUeStats{
119          U32 dlTxOccns;
120          U32 dlRetxOccns;
121          U32 dlPrbUsg;
122          U32 dlNackCnt[2]; /* [CW_CNT] */
123          U32 dlAckNackCnt[2]; /* [CW_CNT] */
124          U32 dlDtxCnt[2]; /* [CW_CNT] */
125          U32 dlSumCw0Cqi;
126          U32 dlNumCw0Cqi;
127          U32 dlSumCw1Cqi;
128          U32 dlNumCw1Cqi;
129          U32 dlSumCw0iTbs;
130          U32 dlNumCw0iTbs;
131          U32 dlSumCw1iTbs;
132          U32 dlNumCw1iTbs;
133          U32 cqiDropCnt;
134          U32 dlPdbLvl[5]; /* PDB Levels */ 
135          U32 riCnt[4]; /* Rank = 1..4 */
136          U32 dlBo;
137          U32 dlTpt;
138          U32 ulTxOccns;
139          U32 ulRetxOccns;
140          U32 ulPrbUsg;
141          U32 ulAckNackCnt;
142          U32 ulNackCnt;
143          U32 ulDtxCnt;
144          U32 ulSumCqi;
145          U32 ulNumCqi;
146          U32 ulSumiTbs;
147          U32 ulNumiTbs;
148          U32 ulTpt;
149       }sch[L2_STATS_MAX_CELLS];
150       struct pdcpUeStats{
151          U32 dlPdcpDropCnt;
152          U32 dlPdcpAckWaitDropCnt;
153          U32 dlFlowCtrlDropCnt;
154       }pdcp;
155       struct rlcUeStats{
156          U32 ulReOdrTmrExpCnt;
157          U32 dlMaxPktsInSduQ;
158          U32 dlMaxWindowSz;
159       }rlc;
160    }nonPersistent;
161    struct persistentUeStats{
162       U32 activatedSCells;
163       U32 numActivation;
164       U32 numDeactivation;
165    }persistent;
166 }TSInfL2UeStats;
167
168 typedef struct tsInfStatsCb
169 {
170    Bool initDone;
171    Bool sockSend;
172    Bool fileSend;
173    Bool consPrint;
174    U32  statsPer;
175    U32  sockPort;
176    Bool startSockSend;
177    U8   cmdForFileStats;
178    char fileName[100];
179    FILE *fptr;
180    U32  enbIp;
181 }TSInfStatsCb;
182
183 typedef Void (*TSInfL2UeStatsInd) ARGS((
184  Pst *, 
185  SuId , 
186  TSInfL2UeStats *
187 ));
188 EXTERN Void TSInfHdlL2UeStatsInd ARGS((
189  Pst               *pst,
190  SuId              suId,
191  TSInfL2UeStats     *stats 
192 ));
193 EXTERN Void TSInfUnpkL2UeStats ARGS((
194  TSInfL2UeStatsInd   func,
195  Pst                *pst,
196  Buffer             *mBuf
197 ));
198 typedef Void (*TSInfL2CellStatsInd) ARGS((
199  Pst *, 
200  SuId , 
201  TSInfL2CellStats *
202 ));
203 EXTERN Void TSInfHdlL2CellStatsInd ARGS((
204  Pst                 *pst,
205  SuId                suId,
206  TSInfL2CellStats    *stats 
207 ));
208 EXTERN Void TSInfUnpkL2CellStats ARGS((
209  TSInfL2CellStatsInd   func,
210  Pst                  *pst,
211  Buffer               *mBuf
212 ));
213 EXTERN Void TSInfPkSndL2UeStats ARGS((
214  Pst               *pst,
215  SuId              suId,
216  TSInfL2UeStats     *stats 
217 ));
218 EXTERN Void TSInfPkSndL2CellStats ARGS((
219  Pst                 *pst,
220  SuId                suId,
221  TSInfL2CellStats     *stats 
222 ));
223 EXTERN Void TSInfTrigStats ARGS((
224  Region    region,
225  Pool      pool
226 ));
227
228 #ifdef __cplusplus
229 }
230 #endif /* __cplusplus */
231 #endif /* __TENBSTATSINFX__ */
232 #endif /* TENB_STATS */
233
234 /**********************************************************************
235          End of file
236 **********************************************************************/