Skip to content

Commit c7f9e40

Browse files
committed
chore: make completion error outputs more descriptive
Output description string of WC error status directly, which makes it easier for users to get the reasons (e.g. retry counter exceeded) without needing to refer to the codes. Signed-off-by: Shady Chan <[email protected]>
1 parent a8b2d43 commit c7f9e40

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/perftest_resources.h

100755100644
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@
107107

108108
#define NOTIFY_COMP_ERROR_SEND(wc,scnt,ccnt) \
109109
{ fprintf(stderr," Completion with error at client\n"); \
110-
fprintf(stderr," Failed status %d: qp_num %d wr_id %d syndrom 0x%x\n",wc.status,(int) wc.qp_num,(int) wc.wr_id,wc.vendor_err); \
111-
fprintf(stderr, "scnt=%lu, ccnt=%lu\n",scnt, ccnt); }
110+
fprintf(stderr," Failed status-%s (%d): wr_id %d syndrom 0x%x\n", \
111+
ibv_wc_status_str(wc.status),wc.status,(int) wc.wr_id,wc.vendor_err); \
112+
fprintf(stderr," scnt=%lu, ccnt=%lu\n",scnt, ccnt); }
112113

113114
#define NOTIFY_COMP_ERROR_RECV(wc,rcnt) \
114115
{ fprintf(stderr," Completion with error at server\n"); \
115-
fprintf(stderr," Failed status %d: qp_num %d wr_id %d syndrom 0x%x\n",wc.status,(int) wc.qp_num,(int) wc.wr_id,wc.vendor_err); \
116+
fprintf(stderr," Failed status-%s (%d): wr_id %d syndrom 0x%x\n", \
117+
ibv_wc_status_str(wc.status),wc.status,(int) wc.wr_id,wc.vendor_err); \
116118
fprintf(stderr," rcnt=%lu\n",rcnt); }
117119

118120
/* Macro to determine packet size in case of UD. The UD addition is for the GRH . */

0 commit comments

Comments
 (0)