RE: iSER Connection via LIO not working

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

 



> Subject: Re: iSER Connection via LIO not working
> 
> Hi,
> 
> after a bit of digging and adding about 100 logs I found the following
> commit which screws with the qib implementation.
> 
> https://gitlab-
> beta.engr.illinois.edu/ejclark2/linux/commit/df749cdc45d9f97cb0a5e6ceab80
> e2e00ee9bf85
> 
> If you check, qib never sets the max_fast_reg_page_list_len (I assume,
> haven't found it in the code, it's there for mellanox)
> 
> therefore in iser_calc_scsi_params, the scsi_max_sectors is always set
> to 0.
> 
> Maybe someone that has experience there could figure out what exactly is
> going on?
> 
> Adding
> 
> sup_sg_tablesize = ISCSI_ISER_MAX_SG_TABLESIZE;
> 
> directly under the sup_sg_tablesize calculation at least fixes the iser
> connection for QLogic Adapters (~800 - 900 MB/s direct IO vs. ~200 MB/s
> via iscsi and no more errors)
> 

Good job tracking this down.   Thanks!

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->ib_device->attrs.max_fast_reg_page_list_len);

        iser_conn->scsi_sg_tablesize = min(sg_tablesize, sup_sg_tablesize);
}

The bug is that device->ib_device->attrs.max_fast_reg_page_list_len should only be considered valid IFF IB_DEVICE_MEM_MGT_EXTENSIONS is set in
device->ib_device->device_cap_flags.  The assignment you suggest should be an else on an if test of the device_cap_flags bit. 

This appears to be the only storage ULP that reads this field exported from drivers.

Mike
--
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