On 03/25/2011 12:07 AM, Vladimir Zapolskiy wrote:
> This change adds setting up of alignment mask for buffers according to
> the value, which is obtained from the kernel algorithm definition.
> 
> Signed-off-by: Vladimir Zapolskiy <vzapols...@gmail.com>
> ---
>  examples/hashcrypt_speed.c |   10 ++++++----
>  examples/sha_speed.c       |   10 ++++++----
>  examples/speed.c           |   12 ++++++++++--
>  3 files changed, 22 insertions(+), 10 deletions(-)
> 
> diff --git a/examples/hashcrypt_speed.c b/examples/hashcrypt_speed.c
> index f5e0e40..2344577 100644
> --- a/examples/hashcrypt_speed.c
> +++ b/examples/hashcrypt_speed.c
> @@ -80,7 +80,7 @@ int hash_data(struct session_op *sess, int fdc, int 
> chunksize, int alignmask)
>       uint8_t mac[AALG_MAX_RESULT_LEN];
>  
>       if (alignmask) {
> -             if (posix_memalign((void **)&buffer, alignmask, chunksize)) {
> +             if (posix_memalign((void **)&buffer, alignmask + 1, chunksize)) 
> {


Hello Vladimir,
 This part of the patch I don't understand. Why do you add 1 to alignmask?

regards,
Nikos


_______________________________________________
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel

Reply via email to