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
114 U16 hSfn; /*!< Hyper System Frame Number */
115 U16 sfn; /*!< System Frame Number */
116 U8 subframe; /*!< Subframe number */
119 /** @brief PDCP ID */
120 typedef struct cmLtePdcpId
122 CmLteCellId cellId; /*!< Cell ID */
123 CmLteRnti ueId; /*!< UE ID */
124 CmLteRbId rbId; /*!< PDCP Instance ID */
125 U8 rbType; /*!< RB type */
128 /* Defining structures for Memory Information for L2-MEAS */
129 typedef struct cmLtePoolInfo
137 typedef struct cmLteRegionInfo
139 U8 regionType; /* 0-SSI 1-Shared */
142 U8 isGenMemInfoUpdated;
143 CmLtePoolInfo poolInfo[MAX_POOL_SIZE];
146 typedef struct cmLteMemInfo
150 CmLteRegionInfo regInfo[MAX_REGION_SIZE];
153 /** @brief CPU Utilization INFO */
154 typedef struct cmLteCpuUtilInfo
156 U32 avgCpuUtil; /*!< average cpu utilization */
157 U32 maxCpuUtil; /*!< Max cpu utilization */
160 /** @brief CPU INFO */
161 typedef struct cmLteCpuInfo
163 U8 numCores; /*!< number of cores*/
164 CmLteCpuUtilInfo cpuUtil[CM_MAX_CPU_CORES]; /*!< cpu measurement info*/
166 /** @brief CPU Utilization INFO */
167 typedef struct cmCpuUtilStatsInfo
170 U32 maxCpuUtil; /*!< Max cpu utilization */
171 U32 totCpuUtil; /*!< Total cpu utilization */
174 /** @brief CPU INFO */
175 typedef struct cmCpuStatsInfo
177 U8 numCores; /*!< number of cores*/
178 CmCpuUtilStatsInfo cpuUtil[CM_MAX_CPU_CORES]; /*!< cpu measurement info*/
184 /** @brief Counter Statistics */
187 /** @brief Aggregation Level */
188 typedef enum cmLteAggrLvl
190 CM_LTE_AGGR_LVL2 = 2, /*!< Aggregation level 2 */
191 CM_LTE_AGGR_LVL4 = 4, /*!< Aggregation level 4 */
192 CM_LTE_AGGR_LVL8 = 8, /*!< Aggregation level 8 */
193 CM_LTE_AGGR_LVL16= 16 /*!< Aggregation level 16 */
196 /** @brief UE Category */
197 typedef enum cmLteUeCategory
205 CM_LTE_UE_CAT_7, /* RRC-REL10-Upgrade */
209 /****************************************************************************
210 * PACK/UNPACK Functions
211 ***************************************************************************/
213 EXTERN PUBLIC S16 cmUpdateSsiMemInfo(CmLteMemInfo *mInfo);
215 EXTERN PUBLIC S16 cmFillMemUtilizationMeas(CmLteMemInfo *memoryInfo,CmLteMemInfo *memInfo);
217 EXTERN PUBLIC S16 cmClearMemUtilizationCounter(CmLteMemInfo *memInfo);
218 EXTERN PUBLIC S16 UpdateSocMemInfo(U8 area , CmLteMemInfo *mInfo);
220 EXTERN S16 cmFillCpuUtilizationMeas(CmLteCpuInfo *cpuMeasInfo,CmCpuStatsInfo *cpuInfo);
222 EXTERN S16 cmClearCpuUtilizationCounter(CmCpuStatsInfo *cpuInfo);
223 EXTERN PUBLIC Void UpdateSocCpuInfo(CmCpuStatsInfo *cpuInfo,U8 Idx);
225 EXTERN PUBLIC S16 SGetRegPoolInfo(U8* numRegion, U8* numPool);
227 /* Packing Functions */
228 EXTERN S16 cmPkLteRlcId ARGS ((
233 EXTERN S16 cmPkLteTimingInfo ARGS ((
234 CmLteTimingInfo *param,
238 EXTERN S16 cmPkLtePdcpId ARGS ((
243 /* Unpack Function */
244 EXTERN S16 cmUnpkLteRlcId ARGS ((
249 EXTERN S16 cmUnpkLteTimingInfo ARGS ((
250 CmLteTimingInfo *param,
254 EXTERN S16 cmUnpkLtePdcpId ARGS ((
261 typedef struct cmTtiProc
263 U32 totTtiProcessingTime;
265 U32 maxTtiProcessingTime;
267 U32 ttiThresholdExceedCount;
268 /* this count is added to compare phy reported tti stretch and calculated tti stretch */
269 U32 phyReptTtiStretchCount;
272 EXTERN CmTtiProc ttiProc;
274 EXTERN Void cmUpdateTtiCounters(U32 ttiProcessingTime);
275 EXTERN Void cmResetTtiCounters(Void);
280 #endif /* __cplusplus */
281 #endif /* __CM_LTE_X__ */
283 /********************************************************************30**
286 **********************************************************************/