diff mbox series

[for-next,v2,9/9] RDMA/rxe: Replace __rxe_do_task by rxe_run_task

Message ID 20220630190425.2251-10-rpearsonhpe@gmail.com (mailing list archive)
State Accepted
Commit 312527436b11c56e3726d0bb9a520c28018fcf13
Headers show
Series RDMA/rxe: Various fixes | expand

Commit Message

Bob Pearson June 30, 2022, 7:04 p.m. UTC
In rxe_req.c replace calls to __rxe_do_task() by calls to
rxe_run_task(.., 0). Using __rxe_do_task is an error because
the completer tasklet is not designed to be re-entrant and
__rxe_do_task() should only be called when it is clear that
no one else could be calling the completer tasklet as is the
case in rxe_qp.c where this call is used in safe environments.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_req.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Zhijian Li (Fujitsu) July 1, 2022, 1:24 a.m. UTC | #1
On 01/07/2022 03:04, Bob Pearson wrote:
> In rxe_req.c replace calls to __rxe_do_task() by calls to
> rxe_run_task(.., 0). Using __rxe_do_task is an error because
> the completer tasklet is not designed to be re-entrant and
> __rxe_do_task() should only be called when it is clear that
> no one else could be calling the completer tasklet as is the
> case in rxe_qp.c where this call is used in safe environments.
>
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
LGTM,

Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>

> ---
>   drivers/infiniband/sw/rxe/rxe_req.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
> index 008ae51c7560..58b9f170b18b 100644
> --- a/drivers/infiniband/sw/rxe/rxe_req.c
> +++ b/drivers/infiniband/sw/rxe/rxe_req.c
> @@ -723,7 +723,7 @@ int rxe_requester(void *arg)
>   						       qp->req.wqe_index);
>   			wqe->state = wqe_state_done;
>   			wqe->status = IB_WC_SUCCESS;
> -			__rxe_do_task(&qp->comp.task);
> +			rxe_run_task(&qp->comp.task, 0);
>   			goto done;
>   		}
>   		payload = mtu;
> @@ -804,7 +804,7 @@ int rxe_requester(void *arg)
>   	goto out;
>   err:
>   	wqe->state = wqe_state_error;
> -	__rxe_do_task(&qp->comp.task);
> +	rxe_run_task(&qp->comp.task, 0);
>   exit:
>   	ret = -EAGAIN;
>   out:
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index 008ae51c7560..58b9f170b18b 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -723,7 +723,7 @@  int rxe_requester(void *arg)
 						       qp->req.wqe_index);
 			wqe->state = wqe_state_done;
 			wqe->status = IB_WC_SUCCESS;
-			__rxe_do_task(&qp->comp.task);
+			rxe_run_task(&qp->comp.task, 0);
 			goto done;
 		}
 		payload = mtu;
@@ -804,7 +804,7 @@  int rxe_requester(void *arg)
 	goto out;
 err:
 	wqe->state = wqe_state_error;
-	__rxe_do_task(&qp->comp.task);
+	rxe_run_task(&qp->comp.task, 0);
 exit:
 	ret = -EAGAIN;
 out: