Skip to content

Commit 0357a1b

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 943db6a commit 0357a1b

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
@@ -105,12 +105,14 @@
105105

106106
#define NOTIFY_COMP_ERROR_SEND(wc,scnt,ccnt) \
107107
{ fprintf(stderr," Completion with error at client\n"); \
108-
fprintf(stderr," Failed status %d: wr_id %d syndrom 0x%x\n",wc.status,(int) wc.wr_id,wc.vendor_err); \
109-
fprintf(stderr, "scnt=%lu, ccnt=%lu\n",scnt, ccnt); }
108+
fprintf(stderr," Failed status-%s (%d): wr_id %d syndrom 0x%x\n", \
109+
ibv_wc_status_str(wc.status),wc.status,(int) wc.wr_id,wc.vendor_err); \
110+
fprintf(stderr," scnt=%lu, ccnt=%lu\n",scnt, ccnt); }
110111

111112
#define NOTIFY_COMP_ERROR_RECV(wc,rcnt) \
112113
{ fprintf(stderr," Completion with error at server\n"); \
113-
fprintf(stderr," Failed status %d: wr_id %d syndrom 0x%x\n",wc.status,(int) wc.wr_id,wc.vendor_err); \
114+
fprintf(stderr," Failed status-%s (%d): wr_id %d syndrom 0x%x\n", \
115+
ibv_wc_status_str(wc.status),wc.status,(int) wc.wr_id,wc.vendor_err); \
114116
fprintf(stderr," rcnt=%lu\n",rcnt); }
115117

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

0 commit comments

Comments
 (0)