Re: [PATCH] IB/iser: explicitly set shost max_segment_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 56848232eb81..2984a366dd7d 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -653,6 +653,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,
  						   SHOST_DIX_GUARD_CRC);
  		}
+ shost->max_segment_size = ib_dma_max_seg_size(ib_dev);
  		if (!(ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG))
  			shost->virt_boundary_mask = ~MASK_4K;

We only really need this settings in the IB_DEVICE_SG_GAPS_REG case,
as the segement size is unlimited on the PRP-like scheme used by the
other MR types anyway, and set as such by the block layer.  I.e.g this
should become:

  		if (ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG)
			shost->max_segment_size = ib_dma_max_seg_size(ib_dev);
		else
   			shost->virt_boundary_mask = ~MASK_4K;

Not sure I understand.

max_segment_size and virt_boundary_mask are related how?



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux