On Aug 2, 2015, at 4:01 AM, Sagi Grimberg <sa...@dev.mellanox.co.il> wrote:

>>> +static void
>>> +iser_calc_scsi_params(struct iser_conn *iser_conn,
>>> +              unsigned int max_sectors)
>>> +{
>>> +    struct iser_device *device = iser_conn->ib_conn.device;
>>> +    unsigned short sg_tablesize, sup_sg_tablesize;
>>> +
>>> +    sg_tablesize = DIV_ROUND_UP(max_sectors * 512, SIZE_4K);
>>> +    sup_sg_tablesize = min_t(unsigned, ISCSI_ISER_MAX_SG_TABLESIZE,
>>> +                 device->dev_attr.max_fast_reg_page_list_len);
>>> +
>>> +    if (sg_tablesize > sup_sg_tablesize) {
>>> +        sg_tablesize = sup_sg_tablesize;
>>> +        iser_conn->scsi_max_sectors = sg_tablesize * SIZE_4K / 512;
>>> +    } else {
>>> +        iser_conn->scsi_max_sectors = max_sectors;
>>> +    }
>>> +
>> 
>> Why SIZE_4K and not PAGE_SIZE?
> 
> Yes, I'll change that to PAGE_SIZE.
> 
> Thanks.

Would non-4KB pages (e.g. PPC 64KB) be an issue? Would this work between hosts 
with different page sizes?

Scott

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to