On Sat, Jun 23, 2007 at 12:44:06AM +0200, Sebastian Siewior wrote: > > >OK this makes sense. However you need to make sure that alignmask > >is set appropriately (i.e., at least 8/16). > > I don't thing I understand. Why do I have to change the alignmask for > the xor operation? I guess you are talking about crypto_cbc_alloc() > > |if (!(alg->cra_blocksize % 4)) > | inst->alg.cra_alignmask |= 3; > > don't you? Yes. > Since this (also) changes the alignment of in+out data I would prefer not > to. The speed up you gain from less xors is probably less than what you > spent on additional kmap()/memcpy()/kmalloc() in case the data is %4 but > not %5. Without it the data is not guaranteed to be aligned to 64 bits and you'll get alignment traps on non-x86 architectures. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html