]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Add helper mlx5_ib_post_send_wait
authorBinoy Jayan <binoy.jayan@linaro.org>
Mon, 2 Jan 2017 09:37:40 +0000 (11:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Jan 2017 20:51:20 +0000 (15:51 -0500)
commitc0fc2858cb4a9fc03dd3c8c18dd3c0c18fab71b5
tree41b07985a1a680c559be2090731be6be57193812
parent633e6d5b3f284d79987a07b11f6b97e9a937f3e4
IB/mlx5: Add helper mlx5_ib_post_send_wait

Clean up the following common code (to post a list of work requests to the
send queue of the specified QP) at various places and add a helper function
'mlx5_ib_post_send_wait' to implement the same.

 - Initialize 'mlx5_ib_umr_context' on stack
 - Assign "mlx5_umr_wr:wr:wr_cqe to umr_context.cqe
 - Acquire the semaphore
 - call ib_post_send with a single ib_send_wr
 - wait_for_completion()
 - Check for umr_context.status
 - Release the semaphore

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/mlx5/mr.c