Subject: Re: [RFC] Replace scatterlist with crypto_frag

From: Jeff Garzik <[email-masked]>
Date: Fri, 03 Jun 2005 20:02:52 -0400

Herbert Xu wrote:
> The Crypto API doesn't need all the data contained in a scatterlist
> structure.  For instance, it has no need for anything to do with DMA.
> When we implement hardware crypto (which might do DMA), they're going
> to have their own lists of descriptors so they can't use the scatterlist
> as is anyway.

I'm not sure I agree with this.

A standard feature of struct scatterlist is having the DMA mappings 
right next to the kernel virtual address/length info.  Drivers use the 
arch-specific DMA-mapped part of struct scatterlist to fill the 
hardware-specific descriptions with addresses and other info.

Since you -will- have to DMA map buffers before passing them to 
hardware, it seems like struct scatterlist is much more appropriate than 
  crypto_frag when dealing with hardware.

For pure software implementations, I don't see why you can't just ignore 
the extra fields that each arch puts into struct scatterlist.

	Jeff