Skip to content

Commit

Permalink
crypto: sha256-mb - SHA256 multibuffer job manager and glue code
Browse files Browse the repository at this point in the history
This patch introduces the multi-buffer job manager which is responsible for
submitting scatter-gather buffers from several SHA256 jobs to the
multi-buffer algorithm. It also contains the flush routine to that's
called by the crypto daemon to complete the job when no new jobs arrive
before the deadline of maximum latency of a SHA256 crypto job.

The SHA256 multi-buffer crypto algorithm is defined and initialized in
this patch.

Signed-off-by: Megha Dey <megha.dey@linux.intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Megha Dey authored and Herbert Xu committed Jun 27, 2016
1 parent ab17787 commit f876f44
Show file tree
Hide file tree
Showing 3 changed files with 1,039 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ ifeq ($(avx2_supported),yes)
obj-$(CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64) += camellia-aesni-avx2.o
obj-$(CONFIG_CRYPTO_SERPENT_AVX2_X86_64) += serpent-avx2.o
obj-$(CONFIG_CRYPTO_SHA1_MB) += sha-mb/
obj-$(CONFIG_CRYPTO_SHA256_MB) += sha256-mb/
endif

aes-i586-y := aes-i586-asm_32.o aes_glue.o
Expand Down
11 changes: 11 additions & 0 deletions arch/x86/crypto/sha256-mb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Arch-specific CryptoAPI modules.
#

avx2_supported := $(call as-instr,vpgatherdd %ymm0$(comma)(%eax$(comma)%ymm1\
$(comma)4)$(comma)%ymm2,yes,no)
ifeq ($(avx2_supported),yes)
obj-$(CONFIG_CRYPTO_SHA256_MB) += sha256-mb.o
sha256-mb-y := sha256_mb.o sha256_mb_mgr_flush_avx2.o \
sha256_mb_mgr_init_avx2.o sha256_mb_mgr_submit_avx2.o sha256_x8_avx2.o
endif
Loading

0 comments on commit f876f44

Please sign in to comment.