Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/1] net/tls: Combined memory allocation for decryption request
@ 2018-08-10 15:16 Vakul Garg
  2018-08-10 15:16 ` [PATCH net-next v3 1/1] " Vakul Garg
  0 siblings, 1 reply; 3+ messages in thread
From: Vakul Garg @ 2018-08-10 15:16 UTC (permalink / raw)
  To: netdev; +Cc: borisp, aviadye, davejwatson, davem, Vakul Garg

This patch does a combined memory allocation from heap for scatterlists,
aead_request, aad and iv for the tls record decryption path. In present
code, aead_request is allocated from heap, scatterlists on a conditional
basis are allocated on heap or on stack. This is inefficient as it may
requires multiple kmalloc/kfree.

The initialization vector passed in cryption request is allocated on
stack. This is a problem since the stack memory is not dma-able from
crypto accelerators.

Doing one combined memory allocation for each decryption request fixes
both the above issues. It also paves a way to be able to submit multiple
async decryption requests while the previous one is pending i.e. being 
processed or queued.


Vakul Garg (1):
  net/tls: Combined memory allocation for decryption request

 include/net/tls.h |   4 -
 net/tls/tls_sw.c  | 238 ++++++++++++++++++++++++++++++++----------------------
 2 files changed, 142 insertions(+), 100 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-13 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10 15:16 [PATCH net-next v3 0/1] net/tls: Combined memory allocation for decryption request Vakul Garg
2018-08-10 15:16 ` [PATCH net-next v3 1/1] " Vakul Garg
2018-08-13 15:42   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox