OSDN Git Service

RDMA/rxe: Move local ops to subroutine
authorBob Pearson <rpearsonhpe@gmail.com>
Tue, 8 Jun 2021 04:25:49 +0000 (23:25 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 16 Jun 2021 23:51:18 +0000 (20:51 -0300)
commitc1a411268a4b17ecdf271f0cefed53e10e9fa166
treefa744b848a4d9bf886284fb792345d4e8ef362d3
parent886441fb2e658e601e22705c1a9c856ac2e8a464
RDMA/rxe: Move local ops to subroutine

Simplify rxe_requester() by moving the local operations to a subroutine.
Add an error return for illegal send WR opcode.  Moved next_index ahead of
rxe_run_task which fixed a small bug where work completions were delayed
until after the next wqe which was not the intended behavior.  Let errors
return their own WC status. Previously all errors were reported as
protection errors which was incorrect. Changed the return of errors from
rxe_do_local_ops() to err: which causes an immediate completion.  Without
this an error on a last WR may get lost. Changed fill_packet() to
finish_packet() which is more accurate.

Fixes: 8700e2e7c485 ("The software RoCE driver")
Link: https://lore.kernel.org/r/20210608042552.33275-7-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_req.c