IB/srpt: Limit the number of SG elements per work request
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 21 Jul 2016 20:03:47 +0000 (13:03 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 2 Aug 2016 16:02:41 +0000 (12:02 -0400)
commit30c6d8773de06878f920666d8c945f81cb2081b3
tree335bf8bf0f37814934ed3fa60e8d9ba01e8a35d5
parent632bc3f65081dd1e2e5394a9161580a0f78e8839
IB/srpt: Limit the number of SG elements per work request

Limit the number of SG elements per work request to what the HCA
and the queue pair support.

Fixes: 34693573fde0 ("IB/srpt: Reduce QP buffer size")
Reported-by: Parav Pandit <pandit.parav@gmail.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Parav Pandit <pandit.parav@gmail.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: <stable@vger.kernel.org> #v4.7+
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h