RDMA/rxe: Remove __rxe_do_task()
authorBob Pearson <rpearsonhpe@gmail.com>
Sat, 4 Mar 2023 17:45:32 +0000 (11:45 -0600)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 24 Mar 2023 14:21:36 +0000 (11:21 -0300)
commit960ebe97e5238565d15063c8f4d1b2108efe2e65
tree09ec062c0011ad3423473e05083ca0798c1854e9
parenta246aa2e8a6d8919462b7ffe550cbe51d2894152
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>
drivers/infiniband/sw/rxe/rxe_qp.c
drivers/infiniband/sw/rxe/rxe_task.c
drivers/infiniband/sw/rxe/rxe_task.h