IB/mlx5: Use fragmented SRQ's buffer for in-kernel users
authorGuy Levi <guyle@mellanox.com>
Mon, 26 Nov 2018 06:15:39 +0000 (08:15 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 30 Nov 2018 00:12:13 +0000 (17:12 -0700)
commit20e5a59b2e64a01f8e0957727887564a4d004970
tree5257a694c12f2e2c2963f81795f1348fdf843bcd
parentb024dd0eba6e6d568f69d63c5e3153aba94c23e3
IB/mlx5: Use fragmented SRQ's buffer for in-kernel users

The current implementation of create SRQ 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 the advantage of the new mlx5_core API which allocates a
fragmented buffer, and makes the SRQ creation much more resilient to
memory fragmentation. Data-path code was adapted to the fact that WQEs can
cross buffers.

Signed-off-by: Guy Levi <guyle@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/srq.c