]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: inside-secure - remove request list to improve performance
authorOfer Heifetz <oferh@marvell.com>
Thu, 28 Jun 2018 15:21:57 +0000 (17:21 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 8 Jul 2018 16:30:19 +0000 (00:30 +0800)
commitb5b31ffd7246c2463779607fafa05180c496cf21
tree2dcff99ca9570b5b587b434e3b9b0f1d4221dea1
parent349465451731e48591694ce1702af6d13c28f77c
crypto: inside-secure - remove request list to improve performance

This patch main goal is to improve driver performance by moving the
crypto request from a list to a RDR ring shadow.

This is possible since there is one producer and one consume for this
RDR request shadow and one ring descriptor is left unused.
Doing this change eliminates the use of spinlock when accessing the
descriptor ring and the need to dynamicaly allocate memory per crypto
request.

The crypto request is placed in the first RDR shadow descriptor only
if there are enough descriptors, when the result handler is invoked,
it fetches the first result descriptor from RDR shadow.

Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel.c
drivers/crypto/inside-secure/safexcel.h
drivers/crypto/inside-secure/safexcel_cipher.c
drivers/crypto/inside-secure/safexcel_hash.c
drivers/crypto/inside-secure/safexcel_ring.c