diff options
author | Bob Pearson <rpearsonhpe@gmail.com> | 2023-03-04 20:45:32 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-03-24 17:21:36 +0300 |
commit | 960ebe97e5238565d15063c8f4d1b2108efe2e65 (patch) | |
tree | 09ec062c0011ad3423473e05083ca0798c1854e9 /drivers/infiniband/sw/rxe/rxe_task.c | |
parent | a246aa2e8a6d8919462b7ffe550cbe51d2894152 (diff) | |
download | linux-960ebe97e5238565d15063c8f4d1b2108efe2e65.tar.xz |
RDMA/rxe: Remove __rxe_do_task()
The subroutine __rxe_do_task is not thread safe and it has no way to
guarantee that the tasks, which are designed with the assumption that they
are non-reentrant, are not reentered. All of its uses are non-performance
critical.
This patch replaces calls to __rxe_do_task with calls to
rxe_sched_task. It also removes irrelevant or unneeded if tests.
Instead of calling the task machinery a single call to the tasklet
function (rxe_requester, etc.) is sufficient to draing the queues if task
execution has been disabled or stopped.
Together these changes allow the removal of __rxe_do_task.
Link: https://lore.kernel.org/r/20230304174533.11296-7-rpearsonhpe@gmail.com
Signed-off-by: Ian Ziemba <ian.ziemba@hpe.com>
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_task.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_task.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c index 959cc6229a34..a67f48545443 100644 --- a/drivers/infiniband/sw/rxe/rxe_task.c +++ b/drivers/infiniband/sw/rxe/rxe_task.c @@ -6,19 +6,6 @@ #include "rxe.h" -int __rxe_do_task(struct rxe_task *task) - -{ - int ret; - - while ((ret = task->func(task->qp)) == 0) - ; - - task->ret = ret; - - return ret; -} - /* * this locking is due to a potential race where * a second caller finds the task already running |