From: Tomasz Gromadzki Date: Thu, 29 Aug 2024 11:47:36 +0000 (+0200) Subject: Revert "rpma: simplify server_cmpl_process()" X-Git-Tag: fio-3.38~30^2~6 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f87aa551edddd31863c50592a4158d76acf24643;p=fio.git Revert "rpma: simplify server_cmpl_process()" This reverts commit d3061c18e84c91a417f8832b1a7cc09b1d26d1ee. --- diff --git a/engines/librpma_gpspm.c b/engines/librpma_gpspm.c index 70116d0d..e751e302 100644 --- a/engines/librpma_gpspm.c +++ b/engines/librpma_gpspm.c @@ -700,25 +700,29 @@ static int server_cmpl_process(struct thread_data *td) ret = rpma_cq_get_wc(csd->cq, 1, wc, NULL); if (ret == RPMA_E_NO_COMPLETION) { - if (o->busy_wait_polling) - return 0; /* lack of completion is not an error */ - - ret = rpma_cq_wait(csd->cq); - if (ret == RPMA_E_NO_COMPLETION) - return 0; /* lack of completion is not an error */ - if (ret) { - librpma_td_verror(td, ret, "rpma_cq_wait"); - goto err_terminate; - } - - ret = rpma_cq_get_wc(csd->cq, 1, wc, NULL); - if (ret == RPMA_E_NO_COMPLETION) - return 0; /* lack of completion is not an error */ - if (ret) { - librpma_td_verror(td, ret, "rpma_cq_get_wc"); - goto err_terminate; + if (o->busy_wait_polling == 0) { + ret = rpma_cq_wait(csd->cq); + if (ret == RPMA_E_NO_COMPLETION) { + /* lack of completion is not an error */ + return 0; + } else if (ret != 0) { + librpma_td_verror(td, ret, "rpma_cq_wait"); + goto err_terminate; + } + + ret = rpma_cq_get_wc(csd->cq, 1, wc, NULL); + if (ret == RPMA_E_NO_COMPLETION) { + /* lack of completion is not an error */ + return 0; + } else if (ret != 0) { + librpma_td_verror(td, ret, "rpma_cq_get_wc"); + goto err_terminate; + } + } else { + /* lack of completion is not an error */ + return 0; } - } else if (ret) { + } else if (ret != 0) { librpma_td_verror(td, ret, "rpma_cq_get_wc"); goto err_terminate; }