openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

commit ee1046ccddbff9485dd2acd42ebdf0d07a5d1554
parent 6e71e590205ea57c3132643cc2dc8ad4b2674fab
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date:   Mon, 20 Jan 2020 15:48:29 -0800

SDK-179672: Improvement has been done for ALPM error tracking: Added route ...

Devices: 56980_A0,56980_B0,AllChips
Module: ALPM

Symptom:
Debuggability enhancements for ALPM error messages in syslog followed by
crash

Improvement has been done for ALPM error tracking:   Added route
sequence in ALPM error message and trace log, if alpm_trace_enable=1.
"Alpm stat show" includes first 127 ALPM error messages recorded.

Diffstat:
Msdk-6.5.16/include/bcm_int/esw/alpm.h | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sdk-6.5.16/include/bcm_int/esw/alpm.h b/sdk-6.5.16/include/bcm_int/esw/alpm.h @@ -1016,12 +1016,14 @@ extern char alpm_tmpbuf[_ALPM_ERR_MSG_BUF_ENT_SZ]; extern void alpm_util_snprintf(const char *fmt, ...); #define ALPM_ERR_MSG_LOG(stuff_) do { \ - ALPM_LOG(BSL_LS_BCM_ALPM|BSL_ERROR, ("#%d: ", ALPMTR_CNT(u)));\ + if (ALPMTR(u)) ALPM_LOG(BSL_LS_BCM_ALPM|BSL_ERROR, ("#%d: ", ALPMTR_CNT(u)));\ ALPM_LOG(BSL_LS_BCM_ALPM|BSL_ERROR, stuff_);\ - sal_memset(alpm_tmpbuf, 0, sizeof(alpm_tmpbuf));\ - sal_sprintf(alpm_tmpbuf, "#%d: ", ALPMTR_CNT(u));\ - alpm_util_snprintf stuff_;\ - _ALPM_ERR_MSG_INSERT(u, alpm_tmpbuf); \ + if (ALPMC(u) != NULL) {\ + sal_memset(alpm_tmpbuf, 0, sizeof(alpm_tmpbuf));\ + if (ALPMTR(u)) sal_sprintf(alpm_tmpbuf, "#%d: ", ALPMTR_CNT(u));\ + alpm_util_snprintf stuff_;\ + _ALPM_ERR_MSG_INSERT(u, alpm_tmpbuf); \ + }\ } while (0) /* Any layer log macros */