]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx4: Ensure that maximal send/receive SGE less than supported by HW
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 3 Sep 2018 06:11:14 +0000 (09:11 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 6 Sep 2018 19:16:12 +0000 (13:16 -0600)
commit5d4dd13dac0364196860d5b0c748fe3e5ccc2a3a
tree9323ffd9700bfba2f99a48b3fe511ad18be6019e
parent6ee91824d6a2af53e433b95c5dcd8135f46ec310
RDMA/mlx4: Ensure that maximal send/receive SGE less than supported by HW

In calculating the global maximum number of the Scatter/Gather elements
supported, the following four maximum parameters must be taken into
consideration: max_sg_rq, max_sg_sq, max_desc_sz_rq and max_desc_sz_sq.

However instead of bringing this complexity to query_device, which still
won't be sufficient anyway (the calculations are dependent on QP type),
the safer approach will be to restore old code, which will give us 32
SGEs.

Fixes: a806c105e2ff ("IB/core: add max_send_sge and max_recv_sge attributes")
Reported-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx4/main.c