diff options
author | Guy Levi <guyle@mellanox.com> | 2018-11-26 08:15:50 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-29 17:12:13 -0700 |
commit | 34f4c9554d8b2a7d2deb9503e9373b598ee3279f (patch) | |
tree | 28b9f7c04c3a0f12c7fa795ec5cd66c812b83971 /drivers/infiniband/hw/mlx5/mlx5_ib.h | |
parent | IB/mlx5: Use fragmented SRQ's buffer for in-kernel users (diff) | |
download | linux-dev-34f4c9554d8b2a7d2deb9503e9373b598ee3279f.tar.xz linux-dev-34f4c9554d8b2a7d2deb9503e9373b598ee3279f.zip |
IB/mlx5: Use fragmented QP's buffer for in-kernel users
The current implementation of create QP requires contiguous memory, such a
requirement is problematic once the memory is fragmented or the system is
low in memory, it causes failures in dma_zalloc_coherent().
This patch takes advantage of the new mlx5_core API which allocates a
fragmented buffer. This makes the QP creation much more resilient to
memory fragmentation. Data-path code was adapted to the fact that WQEs can
cross buffers.
We also use the opportunity to fix some cosmetic legacy coding convention
errors which were in the feature scope.
Signed-off-by: Guy Levi <guyle@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index caed1fe76102..93772434b9e3 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -257,6 +257,7 @@ enum mlx5_ib_rq_flags { }; struct mlx5_ib_wq { + struct mlx5_frag_buf_ctrl fbc; u64 *wrid; u32 *wr_data; struct wr_list *w_list; @@ -275,7 +276,7 @@ struct mlx5_ib_wq { unsigned tail; u16 cur_post; u16 last_poll; - void *qend; + void *cur_edge; }; enum mlx5_ib_wq_flags { |