IB/hfi1: Modify logging frequency of DCC errors
Use rate-limit state to limit number of messages logged to kernel message buffer for DCC errors. Add new macro dd_dev_info_ratelimited for that propose. Replace all dd_dev_info calls in handle_dcc_err function with rate-limited version. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jakub Byczkowski <jakub.byczkowski@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
f9215b5e53
commit
c27aad00d1
|
@ -7827,7 +7827,8 @@ static void handle_dcc_err(struct hfi1_devdata *dd, u32 unused, u64 reg)
|
|||
}
|
||||
|
||||
/* just report this */
|
||||
dd_dev_info(dd, "DCC Error: fmconfig error: %s\n", extra);
|
||||
dd_dev_info_ratelimited(dd, "DCC Error: fmconfig error: %s\n",
|
||||
extra);
|
||||
reg &= ~DCC_ERR_FLG_FMCONFIG_ERR_SMASK;
|
||||
}
|
||||
|
||||
|
@ -7878,34 +7879,35 @@ static void handle_dcc_err(struct hfi1_devdata *dd, u32 unused, u64 reg)
|
|||
}
|
||||
|
||||
/* just report this */
|
||||
dd_dev_info(dd, "DCC Error: PortRcv error: %s\n", extra);
|
||||
dd_dev_info(dd, " hdr0 0x%llx, hdr1 0x%llx\n",
|
||||
hdr0, hdr1);
|
||||
dd_dev_info_ratelimited(dd, "DCC Error: PortRcv error: %s\n"
|
||||
" hdr0 0x%llx, hdr1 0x%llx\n",
|
||||
extra, hdr0, hdr1);
|
||||
|
||||
reg &= ~DCC_ERR_FLG_RCVPORT_ERR_SMASK;
|
||||
}
|
||||
|
||||
if (reg & DCC_ERR_FLG_EN_CSR_ACCESS_BLOCKED_UC_SMASK) {
|
||||
/* informative only */
|
||||
dd_dev_info(dd, "8051 access to LCB blocked\n");
|
||||
dd_dev_info_ratelimited(dd, "8051 access to LCB blocked\n");
|
||||
reg &= ~DCC_ERR_FLG_EN_CSR_ACCESS_BLOCKED_UC_SMASK;
|
||||
}
|
||||
if (reg & DCC_ERR_FLG_EN_CSR_ACCESS_BLOCKED_HOST_SMASK) {
|
||||
/* informative only */
|
||||
dd_dev_info(dd, "host access to LCB blocked\n");
|
||||
dd_dev_info_ratelimited(dd, "host access to LCB blocked\n");
|
||||
reg &= ~DCC_ERR_FLG_EN_CSR_ACCESS_BLOCKED_HOST_SMASK;
|
||||
}
|
||||
|
||||
/* report any remaining errors */
|
||||
if (reg)
|
||||
dd_dev_info(dd, "DCC Error: %s\n",
|
||||
dcc_err_string(buf, sizeof(buf), reg));
|
||||
dd_dev_info_ratelimited(dd, "DCC Error: %s\n",
|
||||
dcc_err_string(buf, sizeof(buf), reg));
|
||||
|
||||
if (lcl_reason == 0)
|
||||
lcl_reason = OPA_LINKDOWN_REASON_UNKNOWN;
|
||||
|
||||
if (do_bounce) {
|
||||
dd_dev_info(dd, "%s: PortErrorAction bounce\n", __func__);
|
||||
dd_dev_info_ratelimited(dd, "%s: PortErrorAction bounce\n",
|
||||
__func__);
|
||||
set_link_down_reason(ppd, lcl_reason, 0, lcl_reason);
|
||||
queue_work(ppd->hfi1_wq, &ppd->link_bounce_work);
|
||||
}
|
||||
|
|
|
@ -1942,6 +1942,10 @@ static inline u64 hfi1_pkt_base_sdma_integrity(struct hfi1_devdata *dd)
|
|||
dev_info(&(dd)->pcidev->dev, "%s: " fmt, \
|
||||
get_unit_name((dd)->unit), ##__VA_ARGS__)
|
||||
|
||||
#define dd_dev_info_ratelimited(dd, fmt, ...) \
|
||||
dev_info_ratelimited(&(dd)->pcidev->dev, "%s: " fmt, \
|
||||
get_unit_name((dd)->unit), ##__VA_ARGS__)
|
||||
|
||||
#define dd_dev_dbg(dd, fmt, ...) \
|
||||
dev_dbg(&(dd)->pcidev->dev, "%s: " fmt, \
|
||||
get_unit_name((dd)->unit), ##__VA_ARGS__)
|
||||
|
|
Loading…
Reference in New Issue