IB/isert: allocate RW ctxs according to max IO size
authorMax Gurtovoy <maxg@mellanox.com>
Wed, 8 Jul 2020 09:19:08 +0000 (12:19 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 16 Jul 2020 17:23:22 +0000 (14:23 -0300)
commit317000b926b07c07e7f6c4032bd3344639f5eb4c
tree21867045cd74f053648e99a3d6daa26630c844e0
parent0829d2da608c6ce225052a99b1bc7a2a1c421173
IB/isert: allocate RW ctxs according to max IO size

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 guarantee sufficient size of the MR pool for
the required IO queue depth and IO size.

Link: https://lore.kernel.org/r/20200708091908.162263-1-maxg@mellanox.com
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>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h