appl_ref_init_deinit.h (7152B)
1 /** \file appl_ref_init_deinit.h 2 * 3 * init and deinit functions to be used by the INIT_DNX command. 4 * 5 * need to make minimal amount of steps before we are able to use call bcm_init 6 */ 7 8 /* 9 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 10 * 11 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 12 */ 13 14 #ifndef FILE_APPL_REF_DNX_INIT_DEINIT_H_INCLUDED 15 /* { */ 16 #define FILE_APPL_REF_DNX_INIT_DEINIT_H_INCLUDED 17 18 #ifndef BCM_DNX_SUPPORT 19 #error "This file is for use by DNX (JR2) family only!" 20 #endif 21 22 #include <appl/diag/diag.h> 23 #include <appl/reference/dnxc/appl_ref_init_utils.h> 24 #include <shared/utilex/utilex_seq.h> 25 26 /* 27 * MACROs: 28 * { 29 */ 30 31 /* 32 * } 33 */ 34 35 /* 36 * Defines: 37 * { 38 */ 39 /* 40 * Default time threshold (in microseconds) for the time each 41 * step is taking during init. This value was chosen because the 42 * majority of the steps are below it. For steps that are 43 * expected to be above the default, a specific threshold can be 44 * set. 45 */ 46 #define APPL_DNX_INIT_STEP_TIME_THRESH_DEFAULT APPL_INIT_STEP_TIME_THRESH_DEFAULT 47 /* 48 * } 49 */ 50 51 /* 52 * Structs and Enums: 53 * { 54 */ 55 56 /* 57 * } 58 */ 59 60 /* 61 * Globals: 62 * { 63 */ 64 extern char appl_dnx_init_usage[]; 65 /* 66 * } 67 */ 68 /* 69 * Function Declarations: 70 * { 71 */ 72 73 /** 74 * \brief - Get the list of DNX application steps 75 * 76 * \param [in] unit - Unit ID 77 * \param [Out] appl_steps - pointer to the list of application steps 78 * 79 * \return 80 * shr_error_e 81 * 82 * \remark 83 * * None 84 * \see 85 * * None 86 */ 87 shr_error_e 88 appl_dnx_step_list_get( 89 int unit, 90 const appl_dnxc_init_step_t **appl_steps); 91 92 /** 93 * \brief - Get the list of DNX application steps' time thresholds 94 * 95 * \param [in] unit - Unit ID 96 * \param [Out] time_thresh_list - pointer to the list of steps' time thresholds 97 * 98 * \return 99 * shr_error_e 100 * 101 * \remark 102 * * None 103 * \see 104 * * None 105 */ 106 shr_error_e 107 appl_dnx_step_time_thresh_list_get( 108 int unit, 109 const appl_init_time_thresh_info_t ** time_thresh_list); 110 111 /** 112 * \brief - Get the time threshold of DNX application step in microseconds 113 * 114 * \param [in] unit - Unit ID 115 * \param [in] unit - Step ID 116 * \param [Out] time_thresh - time threshold in microseconds 117 * 118 * \return 119 * shr_error_e 120 * 121 * \remark 122 * * None 123 * \see 124 * * None 125 */ 126 shr_error_e 127 appl_dnx_per_dev_step_time_threshold_get( 128 int unit, 129 int step_id, 130 sal_usecs_t * time_thresh); 131 132 /** 133 * \brief - Get the time threshold of DNX full Application init in microseconds 134 * 135 * \param [in] unit - Unit ID 136 * \param [Out] time_thresh - Device specific time thresholds 137 * for the step 138 * 139 * \return 140 * shr_error_e 141 * 142 * \remark 143 * * None 144 * \see 145 * * None 146 */ 147 shr_error_e 148 appl_dnx_per_dev_full_time_threshold_get( 149 int unit, 150 sal_usecs_t * time_thresh); 151 152 /** 153 * \brief Describes the IDs for the different steps and 154 * sub-steps of the DNX APPL. 155 */ 156 typedef enum 157 { 158 /** 159 * Invalid Value, used to indicate to APIs that this input is 160 * not relevant 161 */ 162 APPL_DNX_STEP_INVALID_STEP = UTILEX_SEQ_STEP_INVALID, 163 /** 164 * SDK init (attach and bcm_init()) 165 */ 166 APPL_DNX_STEP_SDK, 167 /** 168 * Reference applications 169 */ 170 APPL_DNX_STEP_APPS, 171 /** 172 * first step of application 173 */ 174 APPL_DNX_STEP_FIRST, 175 /** 176 * parse system params application 177 */ 178 APPL_DNX_STEP_SYS_PARAMS, 179 /** 180 * General device confiugurations application 181 */ 182 APPL_DNX_STEP_SYS_DEVICE, 183 /** 184 * System ports application 185 */ 186 APPL_DNX_STEP_SYS_PORTS, 187 /** 188 * Sniff recycle ports application 189 */ 190 APPL_DNX_STEP_SNIFF_PORTS, 191 /** 192 * End to end scheduling scheme application 193 */ 194 APPL_DNX_STEP_E2E_SCHEME, 195 /** 196 * OAM application 197 */ 198 APPL_DNX_STEP_OAM, 199 /** 200 * PP ETH Processing application 201 */ 202 APPL_DNX_STEP_PP_ETH_PROCESSING, 203 /* 204 * Used to disable all possible threads created after init 205 * using the shell commands 206 */ 207 APPL_DNX_STEP_SHELL_THREADS, 208 /** 209 * EEDB Access application 210 */ 211 APPL_DNX_STEP_EEDB_ACCESS, 212 /** 213 * MDB EM FALSE HIT application 214 */ 215 APPL_DNX_STEP_MDB_EM_FALSE_HIT, 216 /** 217 * L2 application 218 */ 219 APPL_DNX_STEP_L2, 220 /** 221 * VLAN application 222 */ 223 APPL_DNX_STEP_VLAN, 224 /** 225 * VLAN application 226 */ 227 APPL_DNX_STEP_COMPRESSED_LAYER_TYPE, 228 /** 229 * Traffic enable application 230 */ 231 APPL_DNX_STEP_TRAFFIC_EN, 232 /** 233 * CPU RX application 234 */ 235 APPL_DNX_STEP_RX, 236 /** 237 * Reference FIELD applications 238 */ 239 APPL_DNX_STEP_FP_APPS, 240 /** 241 * Fec Dest enable application 242 */ 243 APPL_DNX_STEP_FP_FEC_DEST, 244 /** 245 * Oam Index enable application 246 */ 247 APPL_DNX_STEP_FP_OAM_INDEX, 248 /** 249 * Trap L4 enable application 250 */ 251 APPL_DNX_STEP_FP_TRAP_L4, 252 /** 253 * Flow ID enable application 254 */ 255 APPL_DNX_STEP_FP_FLOW_ID, 256 /** 257 * ROO enable application 258 */ 259 APPL_DNX_STEP_FP_ROO, 260 /** 261 * IPMC INLIF enable application 262 */ 263 APPL_DNX_STEP_FP_IPMC_INLIF, 264 /** 265 * J1 Same port drop enable application 266 */ 267 APPL_DNX_STEP_FP_J1_SAME_PORT, 268 /** 269 * J1 learning enable application 270 */ 271 APPL_DNX_STEP_FP_LEARN_AND_LIMIT, 272 /** 273 * J1 learning nullify key msbs enable application 274 */ 275 APPL_DNX_STEP_FP_LEARN_NULLIFY_KEY_MSBS, 276 /** 277 * J1 MPLS PHP application 278 */ 279 APPL_DNX_STEP_FP_J1_PHP, 280 /** 281 * Oam stat enable application 282 */ 283 APPL_DNX_STEP_FP_OAM_STAT, 284 #if defined(INCLUDE_KBP) 285 /** 286 * KBP application 287 */ 288 APPL_DNX_STEP_KBP, 289 #endif 290 /** 291 * Linkscan application 292 */ 293 APPL_DNX_STEP_LINKSCAN, 294 /** 295 * ITMH application 296 */ 297 APPL_DNX_STEP_ITMH, 298 /** 299 * ITMH-PPH application 300 */ 301 APPL_DNX_STEP_ITMH_PPH, 302 /** 303 * J1 ITMH application 304 */ 305 APPL_DNX_STEP_J1_ITMH, 306 /** 307 * J1 ITMH-PPH application 308 */ 309 APPL_DNX_STEP_J1_ITMH_PPH, 310 /** 311 * RCH remove application 312 */ 313 APPL_DNX_STEP_RCH_REMOVE, 314 /** 315 * SRV6 application 316 */ 317 APPL_DNX_STEP_SRV6, 318 /** 319 * NAT application 320 */ 321 APPL_DNX_STEP_NAT, 322 /* 323 * Interrupt application 324 */ 325 APPL_DNX_STEP_INTERRUPT, 326 /** 327 * Last meaningful step of application 328 */ 329 APPL_DNX_STEP_END, 330 /** 331 * QOS application 332 */ 333 APPL_DNX_STEP_QOS, 334 /** 335 * DRAM application 336 */ 337 APPL_DNX_STEP_DRAM, 338 /** 339 * HARD RESET application 340 */ 341 APPL_DNX_STEP_HARD_RESET, 342 /** 343 * VISIBILITY application 344 */ 345 APPL_DNX_STEP_VISIBILITY, 346 /** 347 * COMPENSATION application 348 */ 349 APPL_DNX_STEP_COMPENSATION, 350 /** 351 * RX Trap application 352 */ 353 APPL_DNX_STEP_RX_TRAP, 354 /** 355 * init done step, used to update modules that the init was done 356 */ 357 APPL_DNX_STEP_INIT_DONE, 358 /** 359 * Number of init steps, must be before last. 360 */ 361 APPL_DNX_INIT_STEP_COUNT, 362 /** 363 * Must be last 364 */ 365 APPL_DNX_STEP_LAST_STEP = UTILEX_SEQ_STEP_LAST 366 } appl_dnx_step_id_e; 367 368 369 /* 370 * } 371 */ 372 373 /* } */ 374 #endif