lkml.org 
[lkml]   [2007]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 7/10] i386 sg: add support for chaining scatterlists
    On Wed, May 09 2007, Andrew Morton wrote:
    > On Wed, 09 May 2007 20:03:29 +1000 Herbert Xu <herbert@gondor.apana.org.au> wrote:
    >
    > > Jens Axboe <jens.axboe@oracle.com> wrote:
    > > >
    > > > diff --git a/include/asm-i386/scatterlist.h b/include/asm-i386/scatterlist.h
    > > > index d7e45a8..794b68c 100644
    > > > --- a/include/asm-i386/scatterlist.h
    > > > +++ b/include/asm-i386/scatterlist.h
    > > > @@ -8,8 +8,11 @@ struct scatterlist {
    > > > unsigned int offset;
    > > > dma_addr_t dma_address;
    > > > unsigned int length;
    > > > + struct scatterlist *next;
    > > > };
    > >
    > > BTW, the crypto layer's scatterlist already has a chaining mechanism
    > > using the existing structure. The only difference is that the chained
    > > pointer is stored inside the 'struct page *' rather than a new pointer.
    >
    > <greps-and-fails>
    >
    > Which field in the page is it using?

    crypto/scatterwalk.h:

    static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist
    *sg)
    {
    return (++sg)->length ? sg : (void *)sg->page;
    }

    it's just using the page pointer, not a pointer in the page structure.

    --
    Jens Axboe

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-05-09 12:37    [W:0.021 / U:65.160 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site