| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
#include "rdma/opx/fi_opx_endpoint.h" |
| 34 |
#include "rdma/opx/fi_opx_hfi1_version.h" |
| 35 |
|
| 36 |
void opx_wfr_rhe_debug(struct fi_opx_ep *opx_ep, volatile uint64_t *rhe_ptr, volatile uint32_t *rhf_ptr, |
| 37 |
const uint32_t rhf_msb, const uint32_t rhf_lsb, const uint64_t rhf_seq, |
| 38 |
const uint64_t hdrq_offset, const uint64_t rhf_rcvd, const union opx_hfi1_packet_hdr *const hdr, |
| 39 |
const enum opx_hfi1_type hfi1_type) |
| 40 |
{ |
| 41 |
#ifdef OPX_VERBOSE_TRIGGER |
| 42 |
fprintf(stderr, |
| 43 |
#else |
| 44 |
FI_DBG_TRACE( |
| 45 |
fi_opx_global.prov, FI_LOG_EP_DATA, |
| 46 |
#endif |
| 47 |
"RHF(%#16.16lX) RHE %#8.8X is ERRORED %u, UseEgrBuf %u, EgrIndex %#X/%#X, EgrOffset %#X, %s%s%s %s%s%s%s%s%s%s%s \n", |
| 48 |
rhf_rcvd, rhf_msb & 0xBFE00000u, OPX_IS_ERRORED_RHF(rhf_rcvd, hfi1_type) != 0UL, |
| 49 |
OPX_RHF_IS_USE_EGR_BUF(rhf_rcvd, hfi1_type), (uint32_t) OPX_RHF_EGR_INDEX(rhf_rcvd, hfi1_type), |
| 50 |
opx_ep->rx->egrq.last_egrbfr_index, (uint32_t) OPX_RHF_EGR_OFFSET(rhf_rcvd, hfi1_type), |
| 51 |
OPX_RHF_RCV_TYPE_EXPECTED_RCV(rhf_rcvd, hfi1_type) ? "EXPECTED_RCV" : "", |
| 52 |
OPX_RHF_RCV_TYPE_EAGER_RCV(rhf_rcvd, hfi1_type) ? "EAGER_RCV" : "", |
| 53 |
OPX_RHF_RCV_TYPE_OTHER(rhf_rcvd, hfi1_type) ? "OTHER RCV" : "", |
| 54 |
rhf_msb & OPX_WFR_RHF_ICRCERR ? "OPX_WFR_RHF_ICRCERR" : "", |
| 55 |
rhf_msb & OPX_WFR_RHF_LENERR ? "OPX_WFR_RHF_LENERR" : "", |
| 56 |
rhf_msb & OPX_WFR_RHF_ECCERR ? "OPX_WFR_RHF_ECCERR" : "", |
| 57 |
rhf_msb & OPX_WFR_RHF_TIDERR ? "OPX_WFR_RHF_TIDERR" : "", |
| 58 |
rhf_msb & OPX_WFR_RHF_DCERR ? "OPX_WFR_RHF_DCERR" : "", |
| 59 |
rhf_msb & OPX_WFR_RHF_DCUNCERR ? "OPX_WFR_RHF_DCUNCERR" : "", |
| 60 |
rhf_msb & OPX_WFR_RHF_KHDRLENERR ? "OPX_WFR_RHF_KHDRLENERR" : "", |
| 61 |
rhf_msb & OPX_WFR_RHF_RCVTYPEERR ? "OPX_WFR_RHF_RCVTYPEERR" : ""); |
| 62 |
|
| 63 |
FI_WARN(fi_opx_global.prov, FI_LOG_EP_DATA, |
| 64 |
"%s HEADER ERROR RHF(%#16.16lX) RHE(%#8.8X) %s%s%s %s%s%s%s%s%s%s%s \n", OPX_HFI_TYPE_STRING(hfi1_type), |
| 65 |
rhf_rcvd, rhf_msb & 0xBFE00000u, |
| 66 |
OPX_RHF_RCV_TYPE_EXPECTED_RCV(rhf_rcvd, hfi1_type) ? "EXPECTED_RCV" : "", |
| 67 |
OPX_RHF_RCV_TYPE_EAGER_RCV(rhf_rcvd, hfi1_type) ? "EAGER_RCV" : "", |
| 68 |
OPX_RHF_RCV_TYPE_OTHER(rhf_rcvd, hfi1_type) ? "OTHER RCV" : "", |
| 69 |
rhf_msb & OPX_WFR_RHF_ICRCERR ? "OPX_WFR_RHF_ICRCERR" : "", |
| 70 |
rhf_msb & OPX_WFR_RHF_LENERR ? "OPX_WFR_RHF_LENERR" : "", |
| 71 |
rhf_msb & OPX_WFR_RHF_ECCERR ? "OPX_WFR_RHF_ECCERR" : "", |
| 72 |
rhf_msb & OPX_WFR_RHF_TIDERR ? "OPX_WFR_RHF_TIDERR" : "", |
| 73 |
rhf_msb & OPX_WFR_RHF_DCERR ? "OPX_WFR_RHF_DCERR" : "", |
| 74 |
rhf_msb & OPX_WFR_RHF_DCUNCERR ? "OPX_WFR_RHF_DCUNCERR" : "", |
| 75 |
rhf_msb & OPX_WFR_RHF_KHDRLENERR ? "OPX_WFR_RHF_KHDRLENERR" : "", |
| 76 |
rhf_msb & OPX_WFR_RHF_RCVTYPEERR ? "OPX_WFR_RHF_RCVTYPEERR" : ""); |
| 77 |
|
| 78 |
FI_OPX_DEBUG_COUNTERS_INC(opx_ep->debug_counters.rhf.error); |
| 79 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_ICRCERR, opx_ep->debug_counters.rhf.icrcerr); |
| 80 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_LENERR, opx_ep->debug_counters.rhf.lenerr); |
| 81 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_ECCERR, opx_ep->debug_counters.rhf.eccerr); |
| 82 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_TIDERR, opx_ep->debug_counters.rhf.tiderr); |
| 83 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_DCERR, opx_ep->debug_counters.rhf.dcerr); |
| 84 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_DCUNCERR, opx_ep->debug_counters.rhf.dcuncerr); |
| 85 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_KHDRLENERR, opx_ep->debug_counters.rhf.khdrlenerr); |
| 86 |
FI_OPX_DEBUG_COUNTERS_INC_COND(rhf_msb & OPX_WFR_RHF_RCVTYPEERR, opx_ep->debug_counters.rhf.rcvtypeerr); |
| 87 |
|
| 88 |
FI_OPX_DEBUG_COUNTERS_INC_COND((OPX_RHF_RCV_TYPE_EXPECTED_RCV(rhf_rcvd, hfi1_type)), |
| 89 |
opx_ep->debug_counters.rhf.rcvtypeexp); |
| 90 |
FI_OPX_DEBUG_COUNTERS_INC_COND((OPX_RHF_RCV_TYPE_EAGER_RCV(rhf_rcvd, hfi1_type)), |
| 91 |
opx_ep->debug_counters.rhf.rcvtypeegr); |
| 92 |
FI_OPX_DEBUG_COUNTERS_INC_COND((OPX_RHF_RCV_TYPE_OTHER(rhf_rcvd, hfi1_type)), |
| 93 |
opx_ep->debug_counters.rhf.rcvtypeoth); |
| 94 |
|
| 95 |
#ifdef OPX_VERBOSE_TRIGGER |
| 96 |
fi_opx_hfi1_dump_packet_hdr(hdr, hfi1_type, "OPX_IS_ERRORED_RHF", __LINE__); |
| 97 |
#endif |
| 98 |
|
| 99 |
return; |
| 100 |
} |