Re: [Ocf-linux-users] OCF Talitos driver - DMA alignment
Brought to you by:
david-m
From: Kim P. <kim...@fr...> - 2010-05-12 00:11:38
|
On Tue, 11 May 2010 13:22:38 +0300 avital sela <avi...@gm...> wrote: > Hi Kim, Hi Avital, > I'm working on an ocf driver for a custom made hw that does AES and SHA, and > uses DMA. > I've noticed that in your talitos driver you also used DMA but you never > checked for alignment, whereas in David's Safenet code he did check for > alignments. > My questions are: > 1. are you using a 1-byte aligned DMA, therefore you don't need alignment? correct, talitos drives h/w that doesn't have alignment restrictions. > 2. or alternatively, is there some way to guarantee that buffers are 32bit > aligned beforehand? In OCF-linux, both safe and hifn drivers look like they copy data to ensure alignment. In the upstream kernel's crypto API, it looks like a crypto drivers' .cra_alignmask setting is used for this purpose. [cc:ing ocf list in case there's something I'm missing.] Kim |