diff options
author | Harsh Jain <harsh@chelsio.com> | 2016-11-29 16:30:38 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-30 15:01:47 +0300 |
commit | 44fce12a3464c35b5c6a36b6db379745ff502b82 (patch) | |
tree | 1ab37b1b09380f77fc0e02224bb42398e74a520a /drivers/crypto/chelsio/chcr_crypto.h | |
parent | 18f0aa06a3c90b249e8b3a423e67dbfb0c784688 (diff) | |
download | linux-44fce12a3464c35b5c6a36b6db379745ff502b82.tar.xz |
crypto: chcr - Remove dynamic allocation
Remove malloc/free in hash operation and allocate
memory in chcr_ahash_req_ctx structure.
Signed-off-by: Jitendra Lulla <JLULLA@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/chelsio/chcr_crypto.h')
-rw-r--r-- | drivers/crypto/chelsio/chcr_crypto.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/crypto/chelsio/chcr_crypto.h b/drivers/crypto/chelsio/chcr_crypto.h index acce36702e1f..8934ea2fe56b 100644 --- a/drivers/crypto/chelsio/chcr_crypto.h +++ b/drivers/crypto/chelsio/chcr_crypto.h @@ -150,12 +150,14 @@ struct chcr_context { struct chcr_ahash_req_ctx { u32 result; - char bfr[CHCR_HASH_MAX_BLOCK_SIZE_128]; - u8 bfr_len; + u8 bfr1[CHCR_HASH_MAX_BLOCK_SIZE_128]; + u8 bfr2[CHCR_HASH_MAX_BLOCK_SIZE_128]; + u8 *reqbfr; + u8 *skbfr; + u8 reqlen; /* DMA the partial hash in it */ u8 partial_hash[CHCR_HASH_MAX_DIGEST_SIZE]; u64 data_len; /* Data len till time */ - void *dummy_payload_ptr; /* SKB which is being sent to the hardware for processing */ struct sk_buff *skb; }; |