instru.c (1104B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: instru.c 8 * Purpose: Instrumentation common APIs 9 */ 10 11 #include <soc/drv.h> 12 #include <bcm/instru.h> 13 #include <bcm/init.h> 14 #include <bcm/error.h> 15 #include <bcm_int/common/debug.h> 16 #include <bcm_int/control.h> 17 18 #if defined(BCM_PETRA_SUPPORT) && defined(CRASH_RECOVERY_SUPPORT) 19 #include <soc/dcmn/dcmn_crash_recovery.h> 20 #endif 21 22 #if (defined(BCM_DPP_SUPPORT) || defined(BCM_PETRA_SUPPORT) || defined(BCM_DFE_SUPPORT)) 23 #define SOC_SYNC_WHEN_NOT_DIRTY ((SOC_IS_DPP(unit) || SOC_IS_DFE(unit)) ? 1 : 0) 24 #else 25 #define SOC_SYNC_WHEN_NOT_DIRTY 0 26 #endif 27 28 /* 29 * Function: 30 * bcm_switch_pkt_info_t_init 31 * Description: 32 * Initialize an switch packet parameter structure 33 * Parameters: 34 * pkt_info - pointer to switch packet parameter structure 35 * Return: none 36 */ 37 extern void 38 bcm_instru_ipt_t_init(bcm_instru_ipt_t *config) 39 { 40 sal_memset(config, 0, sizeof(bcm_instru_ipt_t)); 41 } 42