X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Flibrpma_gpspm.c;h=7414770971f9d602d521517deb1156ee775bc437;hb=2c7dd23e5142e421723ede2557fe868ac32c8265;hp=ac614f462ab7b731758ee89badac409d51b4a4f1;hpb=1487c122c651191b34d8f0b2ac1c6ee5cd343874;p=fio.git diff --git a/engines/librpma_gpspm.c b/engines/librpma_gpspm.c index ac614f46..74147709 100644 --- a/engines/librpma_gpspm.c +++ b/engines/librpma_gpspm.c @@ -683,12 +683,33 @@ static int server_cmpl_process(struct thread_data *td) struct librpma_fio_server_data *csd = td->io_ops_data; struct server_data *sd = csd->server_data; struct rpma_completion *cmpl = &sd->msgs_queued[sd->msg_queued_nr]; + struct librpma_fio_options_values *o = td->eo; int ret; ret = rpma_conn_completion_get(csd->conn, cmpl); if (ret == RPMA_E_NO_COMPLETION) { - /* lack of completion is not an error */ - return 0; + if (o->busy_wait_polling == 0) { + ret = rpma_conn_completion_wait(csd->conn); + 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_conn_completion_wait"); + goto err_terminate; + } + + ret = rpma_conn_completion_get(csd->conn, cmpl); + 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_conn_completion_get"); + goto err_terminate; + } + } else { + /* lack of completion is not an error */ + return 0; + } } else if (ret != 0) { librpma_td_verror(td, ret, "rpma_conn_completion_get"); goto err_terminate;