aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/chelsio/chcr_core.h
diff options
context:
space:
mode:
authorAtul Gupta <atul.gupta@chelsio.com>2018-11-30 14:32:09 +0530
committerHerbert Xu <herbert@gondor.apana.org.au>2018-12-07 14:15:01 +0800
commit8362ea16f69fe59c4d012f0748e586ad09391f41 (patch)
tree9dc150c535b4e4d35b0740f607bc56d8a14fe4f6 /drivers/crypto/chelsio/chcr_core.h
parentcrypto: chcr - small packet Tx stalls the queue (diff)
downloadlinux-dev-8362ea16f69fe59c4d012f0748e586ad09391f41.tar.xz
linux-dev-8362ea16f69fe59c4d012f0748e586ad09391f41.zip
crypto: chcr - ESN for Inline IPSec Tx
Send SPI, 64b seq nos and 64b IV with aadiv drop for inline crypto. This information is added in outgoing packet after the CPL TX PKT XT and removed by hardware. The aad, auth and cipher offsets are then adjusted for ESN enabled tunnel. Signed-off-by: Atul Gupta <atul.gupta@chelsio.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/chelsio/chcr_core.h')
-rw-r--r--drivers/crypto/chelsio/chcr_core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/crypto/chelsio/chcr_core.h b/drivers/crypto/chelsio/chcr_core.h
index de3a9c085daf..4616663e25d7 100644
--- a/drivers/crypto/chelsio/chcr_core.h
+++ b/drivers/crypto/chelsio/chcr_core.h
@@ -159,8 +159,17 @@ struct chcr_ipsec_wr {
struct chcr_ipsec_req req;
};
+#define ESN_IV_INSERT_OFFSET 12
+struct chcr_ipsec_aadiv {
+ __be32 spi;
+ u8 seq_no[8];
+ u8 iv[8];
+};
+
struct ipsec_sa_entry {
int hmac_ctrl;
+ u16 esn;
+ u16 imm;
unsigned int enckey_len;
unsigned int kctx_len;
unsigned int authsize;