RDMA/rxe: Move work queue code to subroutines
authorBob Pearson <rpearsonhpe@gmail.com>
Tue, 20 Jun 2023 13:55:19 +0000 (08:55 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 31 Jul 2023 18:24:12 +0000 (15:24 -0300)
commite0ba8ff46704fc924e2ef0451ba196cbdc0d68f2
tree7a87a58e16b4f88417bad43ddc30ab9317fc6280
parent272bba19d631e21e47f6ffa5654d3c17c57ea2ac
RDMA/rxe: Move work queue code to subroutines

This patch:
- Moves code to initialize a qp send work queue to a
  subroutine named rxe_init_sq.
- Moves code to initialize a qp recv work queue to a
  subroutine named rxe_init_rq.
- Moves initialization of qp request and response packet
  queues ahead of work queue initialization so that cleanup
  of a qp if it is not fully completed can successfully
  attempt to drain the packet queues without a seg fault.
- Makes minor whitespace cleanups.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Link: https://lore.kernel.org/r/20230620135519.9365-2-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Acked-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_qp.c