Skip to content

Commit

Permalink
fabtests/efa/rnr_cq_read_err: poll cq when hitting EAGAIN
Browse files Browse the repository at this point in the history
When hitting EAGAIN, the test should poll cq to progress
the ibv cq and endpoint to release resources.

Signed-off-by: Shi Jin <sjina@amazon.com>
  • Loading branch information
shijin-aws committed Feb 29, 2024
1 parent da03159 commit 0008e34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fabtests/prov/efa/src/rdm_rnr_read_cq_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ static int rnr_read_cq_error(void)
for (i = 0; i < total_send; i++) {
do {
ret = fi_send(ep, tx_buf, 32, mr_desc, remote_fi_addr, &tx_ctx);
if (ret < 0 && ret != -FI_EAGAIN) {
if (ret == -FI_EAGAIN) {
fi_cq_read(txcq, NULL, 0);
continue;
}

if (ret < 0) {
FT_PRINTERR("fi_send", -ret);
return ret;
}
Expand Down

0 comments on commit 0008e34

Please sign in to comment.