crypto: pcrypt - Support for multiple padata instances

As it is, we have one encryption and decryption padata instance
for the whole system. This patch adds the possibility to
request for private padata instances. So two crypto users can
parallelize on different cpusets. Or if two crypto users should
not interfere with each other (e.g. IPsec and dm-crypt), they
can use different padata instances. This patch recycles the
unuses crypto_attr_u32 for these purposes. For example

pcrypt(authenc(hmac(sha1-generic),cbc(aes-asm)))

uses the system default padata instances.

pcrypt(authenc(hmac(sha1-generic),cbc(aes-asm)),1)

uses a separate padata instance with prefix 1.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
1 file changed