nvme-rdma: support devices with queue size < 32
authorMarta Rybczynska <mrybczyn@kalray.eu>
Mon, 10 Apr 2017 15:12:34 +0000 (17:12 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 22 May 2017 18:49:49 +0000 (20:49 +0200)
commit0544f5494a03b8846db74e02be5685d1f32b06c9
tree00c2f3c58c70d5d995ac4e8f32d7d201a8e45698
parent08332893e37af6ae779367e78e444f8f9571511d
nvme-rdma: support devices with queue size < 32

In the case of small NVMe-oF queue size (<32) we may enter a deadlock
caused by the fact that the IB completions aren't sent waiting for 32
and the send queue will fill up.

The error is seen as (using mlx5):
[ 2048.693355] mlx5_0:mlx5_ib_post_send:3765:(pid 7273):
[ 2048.693360] nvme nvme1: nvme_rdma_post_send failed with error code -12

This patch changes the way the signaling is done so that it depends on
the queue depth now. The magic define has been removed completely.

Cc: stable@vger.kernel.org
Signed-off-by: Marta Rybczynska <marta.rybczynska@kalray.eu>
Signed-off-by: Samuel Jones <sjones@kalray.eu>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/rdma.c