]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: Combined memory allocation for decryption request
authorVakul Garg <vakul.garg@nxp.com>
Fri, 10 Aug 2018 15:16:41 +0000 (20:46 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Aug 2018 15:41:09 +0000 (08:41 -0700)
commit7ef4a5171064a209d224b5cba006e80ac7d98c25
tree2388709906c2696baa252891f4845d8a680b8369
parent86ec2c91ea87fe463e7c74e59999d857b9f906bc
net/tls: Combined memory allocation for decryption request

For preparing decryption request, several memory chunks are required
(aead_req, sgin, sgout, iv, aad). For submitting the decrypt request to
an accelerator, it is required that the buffers which are read by the
accelerator must be dma-able and not come from stack. The buffers for
aad and iv can be separately kmalloced each, but it is inefficient.
This patch does a combined allocation for preparing decryption request
and then segments into aead_req || sgin || sgout || iv || aad.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tls.h
net/tls/tls_sw.c