linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: Johannes Goetzfried
	<Johannes.Goetzfried@informatik.stud.uni-erlangen.de>
Cc: "Herbert Xu" <herbert@gondor.apana.org.au>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	"Tilo Müller" <tilo.mueller@informatik.uni-erlangen.de>
Subject: Re: [PATCH] crypto: serpent - add x86_64/avx assembler implementation
Date: Mon, 28 May 2012 09:37:09 +0300	[thread overview]
Message-ID: <20120528093709.20517gw0jqzuyvbs@naisho.dyndns.info> (raw)
In-Reply-To: <20120527145112.GF17705@kronos.redsun>

Quoting Johannes Goetzfried  
<Johannes.Goetzfried@informatik.stud.uni-erlangen.de>:

> This patch adds a x86_64/avx assembler implementation of the Serpent block
> cipher. The implementation is very similar to the sse2 implementation and
> processes eight blocks in parallel. Because of the new non-destructive three
> operand syntax all move-instructions can be removed and therefore a little
> performance increase is provided.

/* /me adds CPU with AVX to wishlist. */

<snip>

> diff --git a/arch/x86/crypto/serpent_avx_glue.c  
> b/arch/x86/crypto/serpent_avx_glue.c
> new file mode 100644
> index 0000000..85ef6e7
> --- /dev/null
> +++ b/arch/x86/crypto/serpent_avx_glue.c
> @@ -0,0 +1,949 @@
> +/*
> + * Glue Code for AVX assembler versions of Serpent Cipher
> + *
> + * Copyright (C) 2012 Johannes Goetzfried
> + *     <Johannes.Goetzfried@informatik.stud.uni-erlangen.de>
> + *
> + * Glue code based on twofish_avx_glue.c by:

Should be serpent_sse2_glue.c?

> + *  Copyright (C) 2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> + *

<snip>

> +}, {
> +	.cra_name		= "ecb(serpent)",
> +	.cra_driver_name	= "ecb-serpent-avx",
> +	.cra_priority		= 400,

serpent_sse2_glue.c has priority 400 too, so you should increase  
priority here to 500.

...

Actually about duplicating glue code.. is it really needed? On x86_64,  
both avx and sse2 versions process 8-blocks parallel and therefore  
glue code could be easily shared (as is done in SHA1 SSSE3/AVX).

-Jussi

  reply	other threads:[~2012-05-28  6:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-27 14:51 [PATCH] crypto: serpent - add x86_64/avx assembler implementation Johannes Goetzfried
2012-05-28  6:37 ` Jussi Kivilinna [this message]
2012-05-28 14:10   ` Johannes Goetzfried
2012-05-28 21:33     ` Jussi Kivilinna
2012-05-30  2:27 ` Andi Kleen
2012-05-30  7:30   ` Jussi Kivilinna
2012-05-30 11:32     ` Johannes Goetzfried
2012-05-30 15:39       ` Andi Kleen
2012-05-30 17:36         ` Johannes Goetzfried
2012-05-30 18:53         ` Jussi Kivilinna
2012-06-09 14:50           ` [PATCH] crypto: aes - make assembler implementation default for i386 and x86-64 Jussi Kivilinna
2012-06-12  8:26             ` Herbert Xu
2012-06-12 18:25               ` Jussi Kivilinna
2012-06-18  9:02                 ` Herbert Xu
2012-06-20 11:49                   ` Jussi Kivilinna
2012-05-30 21:29         ` [PATCH] crypto: serpent - add x86_64/avx assembler implementation Herbert Xu
2012-05-30 21:40           ` Andi Kleen
2012-05-30 21:44             ` Herbert Xu
2012-05-30 21:55               ` Andi Kleen
2012-05-30 22:34                 ` Herbert Xu
2012-05-30 11:36   ` Johannes Goetzfried
2012-05-30 16:26     ` Andi Kleen
2012-05-30 17:49       ` Johannes Goetzfried
  -- strict thread matches above, loose matches on Subject: below --
2012-05-28 14:12 Johannes Goetzfried

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120528093709.20517gw0jqzuyvbs@naisho.dyndns.info \
    --to=jussi.kivilinna@mbnet.fi \
    --cc=Johannes.Goetzfried@informatik.stud.uni-erlangen.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tilo.mueller@informatik.uni-erlangen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).