Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guy Levi authored and jgunthorpe committed Nov 30, 2018
1 parent 20e5a59 commit 34f4c95
Show file tree
Hide file tree
Showing 2 changed files with 241 additions and 167 deletions.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/mlx5/mlx5_ib.h
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down

0 comments on commit 34f4c95

Please sign in to comment.