Currently when an error occurs and the completion state becomes COMPST_RNR_RETRY, qp->comp.rnr_retry is only decreased when qp->comp.rnr_retry != 7. If the user happens to config the rnr retry count to be >= 7, the driver will retry forever, instead of exposing IB_WC_RNR_RETRY_EXC_ERR. --- drivers/infiniband/sw/rxe/rxe_comp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c index 4bc88708b355..16c1870b6482 100644 --- a/drivers/infiniband/sw/rxe/rxe_comp.c +++ b/drivers/infiniband/sw/rxe/rxe_comp.c @@ -745,8 +745,7 @@ int rxe_completer(void *arg) case COMPST_RNR_RETRY: if (qp->comp.rnr_retry > 0) { - if (qp->comp.rnr_retry != 7) - qp->comp.rnr_retry--; + qp->comp.rnr_retry--; qp->req.need_retry = 1; pr_debug("qp#%d set rnr nak timer\n", -- 2.27.0