aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srpt/ib_srpt.h
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-07-21 13:03:47 -0700
committerDoug Ledford <dledford@redhat.com>2016-08-02 12:02:41 -0400
commit30c6d8773de06878f920666d8c945f81cb2081b3 (patch)
tree335bf8bf0f37814934ed3fa60e8d9ba01e8a35d5 /drivers/infiniband/ulp/srpt/ib_srpt.h
parentIB/core, RDMA RW API: Do not exceed QP SGE send limit (diff)
downloadlinux-dev-30c6d8773de06878f920666d8c945f81cb2081b3.tar.xz
linux-dev-30c6d8773de06878f920666d8c945f81cb2081b3.zip
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>
Diffstat (limited to 'drivers/infiniband/ulp/srpt/ib_srpt.h')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h
index 389030487da7..581878782854 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.h
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.h
@@ -106,7 +106,11 @@ enum {
SRP_LOGIN_RSP_MULTICHAN_MAINTAINED = 0x2,
SRPT_DEF_SG_TABLESIZE = 128,
- SRPT_DEF_SG_PER_WQE = 16,
+ /*
+ * An experimentally determined value that avoids that QP creation
+ * fails due to "swiotlb buffer is full" on systems using the swiotlb.
+ */
+ SRPT_MAX_SG_PER_WQE = 16,
MIN_SRPT_SQ_SIZE = 16,
DEF_SRPT_SQ_SIZE = 4096,