Re: [PATCH 20/22] IB/iser: Support up to 8MB data transfer in a single command

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

 



On Aug 2, 2015, at 4:01 AM, Sagi Grimberg <sagig@xxxxxxxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux