* Patch "IB/srpt: Limit the number of SG elements per work request" has been added to the 4.7-stable tree
@ 2016-08-18 12:45 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-08-18 12:45 UTC (permalink / raw)
To: bart.vanassche, dledford, gregkh, hch, loberman, nab,
pandit.parav, sagi, swise
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
IB/srpt: Limit the number of SG elements per work request
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ib-srpt-limit-the-number-of-sg-elements-per-work-request.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 30c6d8773de06878f920666d8c945f81cb2081b3 Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bart.vanassche@sandisk.com>
Date: Thu, 21 Jul 2016 13:03:47 -0700
Subject: IB/srpt: Limit the number of SG elements per work request
From: Bart Van Assche <bart.vanassche@sandisk.com>
commit 30c6d8773de06878f920666d8c945f81cb2081b3 upstream.
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ++-
drivers/infiniband/ulp/srpt/ib_srpt.h | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1601,6 +1601,7 @@ static int srpt_create_ch_ib(struct srpt
struct ib_qp_init_attr *qp_init;
struct srpt_port *sport = ch->sport;
struct srpt_device *sdev = sport->sdev;
+ const struct ib_device_attr *attrs = &sdev->device->attrs;
u32 srp_sq_size = sport->port_attrib.srp_sq_size;
int ret;
@@ -1638,7 +1639,7 @@ retry:
*/
qp_init->cap.max_send_wr = srp_sq_size / 2;
qp_init->cap.max_rdma_ctxs = srp_sq_size / 2;
- qp_init->cap.max_send_sge = SRPT_DEF_SG_PER_WQE;
+ qp_init->cap.max_send_sge = min(attrs->max_sge, SRPT_MAX_SG_PER_WQE);
qp_init->port_num = ch->sport->port;
ch->qp = ib_create_qp(sdev->pd, qp_init);
--- 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,
Patches currently in stable-queue which might be from bart.vanassche@sandisk.com are
queue-4.7/dm-set-dmf_suspended-_before_-clearing-dmf_noflush_suspending.patch
queue-4.7/ib-core-make-rdma_rw_ctx_init-initialize-all-used-fields.patch
queue-4.7/ib-rdmavt-disable-by-default.patch
queue-4.7/ib-srpt-limit-the-number-of-sg-elements-per-work-request.patch
queue-4.7/ib-core-rdma-rw-api-do-not-exceed-qp-sge-send-limit.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-18 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 12:45 Patch "IB/srpt: Limit the number of SG elements per work request" has been added to the 4.7-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox