diff options
author | Shachar Raindel <raindel@mellanox.com> | 2014-05-22 14:50:12 +0300 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-05-27 11:53:09 -0700 |
commit | a74d24168d2df78e7a532567eb0e7538e6b09568 (patch) | |
tree | 1748a31b03e4bb85e0e33edeb0400d0001bc7065 /drivers/infiniband/hw/mlx5/mlx5_ib.h | |
parent | IB/mlx5: Set QP offsets and parameters for user QPs and not just for kernel QPs (diff) | |
download | linux-dev-a74d24168d2df78e7a532567eb0e7538e6b09568.tar.xz linux-dev-a74d24168d2df78e7a532567eb0e7538e6b09568.zip |
IB/mlx5: Refactor UMR to have its own context struct
Instead of having the UMR context part of each memory region, allocate
a struct on the stack. This allows queuing multiple UMRs that access
the same memory region.
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index 50541586e0a6..f2ccf1a5a291 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -264,8 +264,6 @@ struct mlx5_ib_mr { __be64 *pas; dma_addr_t dma; int npages; - struct completion done; - enum ib_wc_status status; struct mlx5_ib_dev *dev; struct mlx5_create_mkey_mbox_out out; struct mlx5_core_sig_ctx *sig; @@ -277,6 +275,17 @@ struct mlx5_ib_fast_reg_page_list { dma_addr_t map; }; +struct mlx5_ib_umr_context { + enum ib_wc_status status; + struct completion done; +}; + +static inline void mlx5_ib_init_umr_context(struct mlx5_ib_umr_context *context) +{ + context->status = -1; + init_completion(&context->done); +} + struct umr_common { struct ib_pd *pd; struct ib_cq *cq; |