summaryrefslogtreecommitdiff
path: root/drivers/crypto/chelsio/chcr_algo.h
diff options
context:
space:
mode:
authorHarsh Jain <harsh@chelsio.com>2018-03-06 08:07:52 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-16 18:35:47 +0300
commit5110e65536f35e854f5d520b913505dbdbe22787 (patch)
treecea75b421f19e1b8cf1593cd77e782e8b30341a8 /drivers/crypto/chelsio/chcr_algo.h
parent7ffb911882a34a0d1f05ba64d78bf9b61d1e4179 (diff)
downloadlinux-5110e65536f35e854f5d520b913505dbdbe22787.tar.xz
crypto: chelsio -Split Hash requests for large scatter gather list
Send multiple WRs to H/W when No. of entries received in scatter list cannot be sent in single request. Signed-off-by: Harsh Jain <harsh@chelsio.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/chelsio/chcr_algo.h')
-rw-r--r--drivers/crypto/chelsio/chcr_algo.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/crypto/chelsio/chcr_algo.h b/drivers/crypto/chelsio/chcr_algo.h
index 7742b65a9ac5..6748c293ccd4 100644
--- a/drivers/crypto/chelsio/chcr_algo.h
+++ b/drivers/crypto/chelsio/chcr_algo.h
@@ -222,8 +222,10 @@
#define MIN_GCM_SG 1 /* IV */
#define MIN_DIGEST_SG 1 /*Partial Buffer*/
#define MIN_CCM_SG 2 /*IV+B0*/
-#define SPACE_LEFT(len) \
- ((SGE_MAX_WR_LEN - WR_MIN_LEN - (len)))
+#define CIP_SPACE_LEFT(len) \
+ ((SGE_MAX_WR_LEN - CIP_WR_MIN_LEN - (len)))
+#define HASH_SPACE_LEFT(len) \
+ ((SGE_MAX_WR_LEN - HASH_WR_MIN_LEN - (len)))
struct algo_param {
unsigned int auth_mode;
@@ -232,12 +234,14 @@ struct algo_param {
};
struct hash_wr_param {
+ struct algo_param alg_prm;
unsigned int opad_needed;
unsigned int more;
unsigned int last;
- struct algo_param alg_prm;
+ unsigned int kctx_len;
unsigned int sg_len;
unsigned int bfr_len;
+ unsigned int hash_size;
u64 scmd1;
};