* [PATCH 1/1] IB/isert: allocate RW ctxs according to max IO size
@ 2020-07-08 9:19 Max Gurtovoy
2020-07-10 4:54 ` Sagi Grimberg
2020-07-16 17:31 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Max Gurtovoy @ 2020-07-08 9:19 UTC (permalink / raw)
To: sagi, krishna2, linux-rdma, leonro, jgg
Cc: israelr, nirranjan, bharat, oren, Max Gurtovoy
Current iSER target code allocates MR pool budget based on queue size.
Since there is no handshake between iSER initiator and target on max IO
size, we'll set the iSER target to support upto 16MiB IO operations and
allocate the correct number of RDMA ctxs according to the factor of MR's
per IO operation. This would guaranty sufficient size of the MR pool for
the required IO queue depth and IO size.
Reported-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
Tested-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
drivers/infiniband/ulp/isert/ib_isert.c | 6 ++++--
drivers/infiniband/ulp/isert/ib_isert.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index b7df38e..49f5f05 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -119,7 +119,7 @@
{
struct isert_device *device = isert_conn->device;
struct ib_qp_init_attr attr;
- int ret;
+ int ret, factor;
memset(&attr, 0, sizeof(struct ib_qp_init_attr));
attr.event_handler = isert_qp_event_callback;
@@ -128,7 +128,9 @@
attr.recv_cq = comp->cq;
attr.cap.max_send_wr = ISERT_QP_MAX_REQ_DTOS + 1;
attr.cap.max_recv_wr = ISERT_QP_MAX_RECV_DTOS + 1;
- attr.cap.max_rdma_ctxs = ISCSI_DEF_XMIT_CMDS_MAX;
+ factor = rdma_rw_mr_factor(device->ib_device, cma_id->port_num,
+ ISCSI_ISER_MAX_SG_TABLESIZE);
+ attr.cap.max_rdma_ctxs = ISCSI_DEF_XMIT_CMDS_MAX * factor;
attr.cap.max_send_sge = device->ib_device->attrs.max_send_sge;
attr.cap.max_recv_sge = 1;
attr.sq_sig_type = IB_SIGNAL_REQ_WR;
diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h
index 3b296ba..c9ccf1d 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.h
+++ b/drivers/infiniband/ulp/isert/ib_isert.h
@@ -63,7 +63,8 @@
(ISER_RX_PAYLOAD_SIZE + sizeof(u64) + sizeof(struct ib_sge) + \
sizeof(struct ib_cqe) + sizeof(bool)))
-#define ISCSI_ISER_SG_TABLESIZE 256
+/* Maximum support is 16MB I/O size */
+#define ISCSI_ISER_MAX_SG_TABLESIZE 4096
enum isert_desc_type {
ISCSI_TX_CONTROL,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] IB/isert: allocate RW ctxs according to max IO size
2020-07-08 9:19 [PATCH 1/1] IB/isert: allocate RW ctxs according to max IO size Max Gurtovoy
@ 2020-07-10 4:54 ` Sagi Grimberg
2020-07-16 17:31 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2020-07-10 4:54 UTC (permalink / raw)
To: Max Gurtovoy, krishna2, linux-rdma, leonro, jgg
Cc: israelr, nirranjan, bharat, oren
Looks good to me Max, thanks
Acked-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] IB/isert: allocate RW ctxs according to max IO size
2020-07-08 9:19 [PATCH 1/1] IB/isert: allocate RW ctxs according to max IO size Max Gurtovoy
2020-07-10 4:54 ` Sagi Grimberg
@ 2020-07-16 17:31 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-07-16 17:31 UTC (permalink / raw)
To: Max Gurtovoy
Cc: sagi, krishna2, linux-rdma, leonro, israelr, nirranjan, bharat,
oren
On Wed, Jul 08, 2020 at 12:19:08PM +0300, Max Gurtovoy wrote:
> Current iSER target code allocates MR pool budget based on queue size.
> Since there is no handshake between iSER initiator and target on max IO
> size, we'll set the iSER target to support upto 16MiB IO operations and
> allocate the correct number of RDMA ctxs according to the factor of MR's
> per IO operation. This would guaranty sufficient size of the MR pool for
> the required IO queue depth and IO size.
>
> Reported-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
> Tested-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
> Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
> Acked-by: Sagi Grimberg <sagi@grimberg.me>
> ---
> drivers/infiniband/ulp/isert/ib_isert.c | 6 ++++--
> drivers/infiniband/ulp/isert/ib_isert.h | 3 ++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-16 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 9:19 [PATCH 1/1] IB/isert: allocate RW ctxs according to max IO size Max Gurtovoy
2020-07-10 4:54 ` Sagi Grimberg
2020-07-16 17:31 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).