Commit 4262c98a authored by Harsh Jain's avatar Harsh Jain Committed by Herbert Xu

crypto: chelsio - Remove separate buffer used for DMA map B0 block in CCM

Extends memory required for IV to include B0 Block and DMA map in
single operation.
Signed-off-by: default avatarHarsh Jain <harsh@chelsio.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 335bcc4a
This diff is collapsed.
...@@ -190,8 +190,8 @@ struct chcr_aead_reqctx { ...@@ -190,8 +190,8 @@ struct chcr_aead_reqctx {
short int dst_nents; short int dst_nents;
u16 imm; u16 imm;
u16 verify; u16 verify;
u8 iv[CHCR_MAX_CRYPTO_IV_LEN]; u8 iv[CHCR_MAX_CRYPTO_IV_LEN + MAX_SCRATCH_PAD_SIZE];
unsigned char scratch_pad[MAX_SCRATCH_PAD_SIZE]; u8 *scratch_pad;
}; };
struct ulptx_walk { struct ulptx_walk {
...@@ -311,8 +311,7 @@ struct chcr_alg_template { ...@@ -311,8 +311,7 @@ struct chcr_alg_template {
typedef struct sk_buff *(*create_wr_t)(struct aead_request *req, typedef struct sk_buff *(*create_wr_t)(struct aead_request *req,
unsigned short qid, unsigned short qid,
int size, int size);
unsigned short op_type);
void chcr_verify_tag(struct aead_request *req, u8 *input, int *err); void chcr_verify_tag(struct aead_request *req, u8 *input, int *err);
int chcr_aead_dma_map(struct device *dev, struct aead_request *req, int chcr_aead_dma_map(struct device *dev, struct aead_request *req,
...@@ -321,10 +320,10 @@ void chcr_aead_dma_unmap(struct device *dev, struct aead_request *req, ...@@ -321,10 +320,10 @@ void chcr_aead_dma_unmap(struct device *dev, struct aead_request *req,
unsigned short op_type); unsigned short op_type);
void chcr_add_aead_dst_ent(struct aead_request *req, void chcr_add_aead_dst_ent(struct aead_request *req,
struct cpl_rx_phys_dsgl *phys_cpl, struct cpl_rx_phys_dsgl *phys_cpl,
unsigned int assoclen, unsigned short op_type, unsigned int assoclen,
unsigned short qid); unsigned short qid);
void chcr_add_aead_src_ent(struct aead_request *req, struct ulptx_sgl *ulptx, void chcr_add_aead_src_ent(struct aead_request *req, struct ulptx_sgl *ulptx,
unsigned int assoclen, unsigned short op_type); unsigned int assoclen);
void chcr_add_cipher_src_ent(struct ablkcipher_request *req, void chcr_add_cipher_src_ent(struct ablkcipher_request *req,
void *ulptx, void *ulptx,
struct cipher_wr_param *wrparam); struct cipher_wr_param *wrparam);
...@@ -339,4 +338,5 @@ void chcr_add_hash_src_ent(struct ahash_request *req, struct ulptx_sgl *ulptx, ...@@ -339,4 +338,5 @@ void chcr_add_hash_src_ent(struct ahash_request *req, struct ulptx_sgl *ulptx,
struct hash_wr_param *param); struct hash_wr_param *param);
int chcr_hash_dma_map(struct device *dev, struct ahash_request *req); int chcr_hash_dma_map(struct device *dev, struct ahash_request *req);
void chcr_hash_dma_unmap(struct device *dev, struct ahash_request *req); void chcr_hash_dma_unmap(struct device *dev, struct ahash_request *req);
void chcr_aead_common_exit(struct aead_request *req);
#endif /* __CHCR_CRYPTO_H__ */ #endif /* __CHCR_CRYPTO_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment