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 Contains the Data structures for Common LTE
29 Sid: cm_lte.x@@/main/2 - Fri Nov 13 14:09:17 2009
33 *********************************************************************21*/
40 #define cmPkLteRbId SPkU8
41 #define cmPkLteRnti SPkU16
42 #define cmPkLteCellId SPkU16
43 #define cmPkLteRlcMode SPkU8
44 #define cmPkLteLcId SPkU8
45 #define cmPkLteLcType SPkU8
46 #define cmPkLteAggrLvl SPkU32
48 /* Unpacking Defines */
49 #define cmUnpkLteRbId SUnpkU8
50 #define cmUnpkLteRnti SUnpkU16
51 #define cmUnpkLteCellId SUnpkU16
52 #define cmUnpkLteRlcMode SUnpkU8
53 #define cmUnpkLteLcId SUnpkU8
54 #define cmUnpkLteLcType SUnpkU8
55 #define cmUnpkLteAggrLvl SUnpkU32
57 #define MAX_POOL_SIZE 6 /*!< Maximum pool size */
58 #define MAX_REGION_SIZE 5 /*!< Maximum Region size */
60 #define CM_PACK_STRUCT __attribute__((packed))
62 #define CM_PACK_STRUCT
70 #endif /*__cplusplus*/
73 @brief CM_LTE Interface File (cm_lte.x)
76 /* definitions for Common LTE */
78 /** @brief Radio Bearer ID */
82 typedef U16 CmLteCellId;
85 typedef U16 CmLteRnti;
87 /** @brief Mode Type TM/UM/AM */
88 typedef U8 CmLteRlcMode;
90 /** @brief Logical Channel ID */
93 /** @brief Logical Channel Type */
94 typedef U8 CmLteLcType;
96 /** @brief Transport Channel Type */
97 typedef U8 CmLteTrchType;
99 /** @brief Contention Resolution ID */
100 typedef U8 CmLteContResId[6];
103 typedef struct cmLteRlcId
105 CmLteRbId rbId; /*!< Radio Bearer ID */
106 U8 rbType; /*!< RB Type */
107 CmLteRnti ueId; /*!< UE ID */
108 CmLteCellId cellId; /*!< Cell ID */
111 /** @brief LTE Timing Info */
112 typedef struct cmLteTimingInfo
115 U16 hSfn; /*!< Hyper System Frame Number */
117 U16 sfn; /*!< System Frame Number */
118 U16 slot; /*!< Subframe number */
121 /** @brief PDCP ID */
122 typedef struct cmLtePdcpId
124 CmLteCellId cellId; /*!< Cell ID */
125 CmLteRnti ueId; /*!< UE ID */
126 CmLteRbId rbId; /*!< PDCP Instance ID */
127 U8 rbType; /*!< RB type */
130 /* Defining structures for Memory Information for L2-MEAS */
131 typedef struct cmLtePoolInfo
139 typedef struct cmLteRegionInfo
141 U8 regionType; /* 0-SSI 1-Shared */
144 U8 isGenMemInfoUpdated;
145 CmLtePoolInfo poolInfo[MAX_POOL_SIZE];
148 typedef struct cmLteMemInfo
152 CmLteRegionInfo regInfo[MAX_REGION_SIZE];
155 /** @brief CPU Utilization INFO */
156 typedef struct cmLteCpuUtilInfo
158 U32 avgCpuUtil; /*!< average cpu utilization */
159 U32 maxCpuUtil; /*!< Max cpu utilization */
162 /** @brief CPU INFO */
163 typedef struct cmLteCpuInfo
165 U8 numCores; /*!< number of cores*/
166 CmLteCpuUtilInfo cpuUtil[CM_MAX_CPU_CORES]; /*!< cpu measurement info*/
168 /** @brief CPU Utilization INFO */
169 typedef struct cmCpuUtilStatsInfo
172 U32 maxCpuUtil; /*!< Max cpu utilization */
173 U32 totCpuUtil; /*!< Total cpu utilization */
176 /** @brief CPU INFO */
177 typedef struct cmCpuStatsInfo
179 U8 numCores; /*!< number of cores*/
180 CmCpuUtilStatsInfo cpuUtil[CM_MAX_CPU_CORES]; /*!< cpu measurement info*/
186 /** @brief Counter Statistics */
189 /** @brief Aggregation Level */
190 typedef enum cmLteAggrLvl
192 CM_LTE_AGGR_LVL2 = 2, /*!< Aggregation level 2 */
193 CM_LTE_AGGR_LVL4 = 4, /*!< Aggregation level 4 */
194 CM_LTE_AGGR_LVL8 = 8, /*!< Aggregation level 8 */
195 CM_LTE_AGGR_LVL16= 16 /*!< Aggregation level 16 */
198 /** @brief UE Category */
199 typedef enum cmLteUeCategory
207 CM_LTE_UE_CAT_7, /* RRC-REL10-Upgrade */
211 /****************************************************************************
212 * PACK/UNPACK Functions
213 ***************************************************************************/
215 EXTERN PUBLIC S16 cmUpdateSsiMemInfo(CmLteMemInfo *mInfo);
217 EXTERN PUBLIC S16 cmFillMemUtilizationMeas(CmLteMemInfo *memoryInfo,CmLteMemInfo *memInfo);
219 EXTERN PUBLIC S16 cmClearMemUtilizationCounter(CmLteMemInfo *memInfo);
220 EXTERN PUBLIC S16 UpdateSocMemInfo(U8 area , CmLteMemInfo *mInfo);
222 EXTERN S16 cmFillCpuUtilizationMeas(CmLteCpuInfo *cpuMeasInfo,CmCpuStatsInfo *cpuInfo);
224 EXTERN S16 cmClearCpuUtilizationCounter(CmCpuStatsInfo *cpuInfo);
225 EXTERN PUBLIC Void UpdateSocCpuInfo(CmCpuStatsInfo *cpuInfo,U8 Idx);
227 EXTERN PUBLIC S16 SGetRegPoolInfo(U8* numRegion, U8* numPool);
229 /* Packing Functions */
230 EXTERN S16 cmPkLteRlcId ARGS ((
235 EXTERN S16 cmPkLteTimingInfo ARGS ((
236 CmLteTimingInfo *param,
240 EXTERN S16 cmPkLtePdcpId ARGS ((
245 /* Unpack Function */
246 EXTERN S16 cmUnpkLteRlcId ARGS ((
251 EXTERN S16 cmUnpkLteTimingInfo ARGS ((
252 CmLteTimingInfo *param,
256 EXTERN S16 cmUnpkLtePdcpId ARGS ((
263 typedef struct cmTtiProc
265 U32 totTtiProcessingTime;
267 U32 maxTtiProcessingTime;
269 U32 ttiThresholdExceedCount;
270 /* this count is added to compare phy reported tti stretch and calculated tti stretch */
271 U32 phyReptTtiStretchCount;
274 EXTERN CmTtiProc ttiProc;
276 EXTERN Void cmUpdateTtiCounters(U32 ttiProcessingTime);
277 EXTERN Void cmResetTtiCounters(Void);
282 #endif /* __cplusplus */
283 #endif /* __CM_LTE_X__ */
285 /********************************************************************30**
288 **********************************************************************/