Re: [PATCH 04/17] RMDA/core: Introduce ib_scatterlist structure

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

 




On 3/8/2019 10:05 AM, Christoph Hellwig wrote:
On Sun, Mar 03, 2019 at 06:44:21PM +0200, Max Gurtovoy wrote:
This is interesting idea, but it's a big change to be done for each ULP to
use sg_table (only NVMeoF use it AFAIK). I think this transition should be
done separately (and well tested !!). We can do it before or we can do it
after this patchset.
Nothing uses ib_scatterlist either, as you just introduce it.  I'd
rather move to a common and more useful structure directly.

We've started exploring the sg_table option and found that there is no dma_nents arg there.

So I guess you've meant that we should add functionality there (and just use the sg_table struct "as is" without using sg_alloc_table_chained/sg_init_table/sg_free_table_chained).

how is this pseudo code in your opinion :

sg_table->sgl = sgl;

sg_table->nents = nents; //get from blk_rq_nr_phys_segments or scsi_sg_count

sg_table->dma_nents = dma_nents; //returned from ib_dma_map_sg

for NON-PI:

ib_map_mr_sg(mr, sg_table, offset_p, SZ_4K);

for PI (set meta_sg_table as above):

ib_map_mr_sg_pi(mr, sg_table, offset_p, meta_sg_table, meta_offset_p, SZ_4K);






[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