linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] IB/iser: bound protection_sg size by data_sg size
@ 2019-09-24 21:03 Max Gurtovoy
  2019-09-25 20:52 ` Sagi Grimberg
  2019-10-01 14:29 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Max Gurtovoy @ 2019-09-24 21:03 UTC (permalink / raw)
  To: jgg, linux-rdma, dledford, leonro, sagi; +Cc: martin.petersen, Max Gurtovoy

In case we don't set the sg_prot_tablesize, the scsi layer assign the
default size (65535 entries). We should limit this size since we should
take into consideration the underlaying device capability. This cap is
considered when calculating the sg_tablesize. Otherwise, for example,
we can get that /sys/block/sdb/queue/max_segments is 128 and
/sys/block/sdb/queue/max_integrity_segments is 65535.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
 drivers/infiniband/ulp/iser/iscsi_iser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 5036155..55f45ed 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -646,6 +646,7 @@ static void iscsi_iser_cleanup_task(struct iscsi_task *task)
 		if (ib_conn->pi_support) {
 			u32 sig_caps = ib_dev->attrs.sig_prot_cap;
 
+			shost->sg_prot_tablesize = shost->sg_tablesize;
 			scsi_host_set_prot(shost, iser_dif_prot_caps(sig_caps));
 			scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP |
 						   SHOST_DIX_GUARD_CRC);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] IB/iser: bound protection_sg size by data_sg size
  2019-09-24 21:03 [PATCH 1/1] IB/iser: bound protection_sg size by data_sg size Max Gurtovoy
@ 2019-09-25 20:52 ` Sagi Grimberg
  2019-10-01 14:29 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2019-09-25 20:52 UTC (permalink / raw)
  To: Max Gurtovoy, jgg, linux-rdma, dledford, leonro; +Cc: martin.petersen

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] IB/iser: bound protection_sg size by data_sg size
  2019-09-24 21:03 [PATCH 1/1] IB/iser: bound protection_sg size by data_sg size Max Gurtovoy
  2019-09-25 20:52 ` Sagi Grimberg
@ 2019-10-01 14:29 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2019-10-01 14:29 UTC (permalink / raw)
  To: Max Gurtovoy; +Cc: linux-rdma, dledford, leonro, sagi, martin.petersen

On Wed, Sep 25, 2019 at 12:03:47AM +0300, Max Gurtovoy wrote:
> In case we don't set the sg_prot_tablesize, the scsi layer assign the
> default size (65535 entries). We should limit this size since we should
> take into consideration the underlaying device capability. This cap is
> considered when calculating the sg_tablesize. Otherwise, for example,
> we can get that /sys/block/sdb/queue/max_segments is 128 and
> /sys/block/sdb/queue/max_integrity_segments is 65535.
> 
> Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> ---
>  drivers/infiniband/ulp/iser/iscsi_iser.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-01 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 21:03 [PATCH 1/1] IB/iser: bound protection_sg size by data_sg size Max Gurtovoy
2019-09-25 20:52 ` Sagi Grimberg
2019-10-01 14:29 ` 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).