OSDN Git Service

IB/mlx5: Use fragmented QP's buffer for in-kernel users
authorGuy Levi <guyle@mellanox.com>
Mon, 26 Nov 2018 06:15:50 +0000 (08:15 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 30 Nov 2018 00:12:13 +0000 (17:12 -0700)
commit34f4c9554d8b2a7d2deb9503e9373b598ee3279f
tree28b9f7c04c3a0f12c7fa795ec5cd66c812b83971
parent20e5a59b2e64a01f8e0957727887564a4d004970
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>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/qp.c