git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/sfc: support EF100 Tx override prefix
[dpdk.git]
/
drivers
/
common
/
cpt
/
cpt_mcode_defines.h
diff --git
a/drivers/common/cpt/cpt_mcode_defines.h
b/drivers/common/cpt/cpt_mcode_defines.h
index
8bb09e6
..
f16ee44
100644
(file)
--- a/
drivers/common/cpt/cpt_mcode_defines.h
+++ b/
drivers/common/cpt/cpt_mcode_defines.h
@@
-20,6
+20,9
@@
#define CPT_MAJOR_OP_ZUC_SNOW3G 0x37
#define CPT_MAJOR_OP_KASUMI 0x38
#define CPT_MAJOR_OP_MISC 0x01
#define CPT_MAJOR_OP_ZUC_SNOW3G 0x37
#define CPT_MAJOR_OP_KASUMI 0x38
#define CPT_MAJOR_OP_MISC 0x01
+#define CPT_HMAC_FIRST_BIT_POS 0x4
+#define CPT_FC_MINOR_OP_ENCRYPT 0x0
+#define CPT_FC_MINOR_OP_DECRYPT 0x1
/* AE opcodes */
#define CPT_MAJOR_OP_MODEX 0x03
/* AE opcodes */
#define CPT_MAJOR_OP_MODEX 0x03
@@
-38,9
+41,6
@@
#define CPT_BLOCK_TYPE1 0
#define CPT_BLOCK_TYPE2 1
#define CPT_BLOCK_TYPE1 0
#define CPT_BLOCK_TYPE2 1
-#define CPT_BYTE_16 16
-#define CPT_BYTE_24 24
-#define CPT_BYTE_32 32
#define CPT_MAX_SG_IN_OUT_CNT 32
#define CPT_MAX_SG_CNT (CPT_MAX_SG_IN_OUT_CNT/2)
#define CPT_MAX_SG_IN_OUT_CNT 32
#define CPT_MAX_SG_CNT (CPT_MAX_SG_IN_OUT_CNT/2)
@@
-106,7
+106,7
@@
typedef enum {
SHA2_SHA384 = 5,
SHA2_SHA512 = 6,
GMAC_TYPE = 7,
SHA2_SHA384 = 5,
SHA2_SHA512 = 6,
GMAC_TYPE = 7,
-
XCBC_TYPE
= 8,
+
POLY1305
= 8,
SHA3_SHA224 = 10,
SHA3_SHA256 = 11,
SHA3_SHA384 = 12,
SHA3_SHA224 = 10,
SHA3_SHA256 = 11,
SHA3_SHA384 = 12,
@@
-136,6
+136,7
@@
typedef enum {
AES_CTR = 0x6,
AES_GCM = 0x7,
AES_XTS = 0x8,
AES_CTR = 0x6,
AES_GCM = 0x7,
AES_XTS = 0x8,
+ CHACHA20 = 0x9,
/* These are only for software use */
ZUC_EEA3 = 0x90,
/* These are only for software use */
ZUC_EEA3 = 0x90,
@@
-219,7
+220,10
@@
typedef enum {
CPT_EC_ID_P256 = 2,
CPT_EC_ID_P384 = 3,
CPT_EC_ID_P521 = 4,
CPT_EC_ID_P256 = 2,
CPT_EC_ID_P384 = 3,
CPT_EC_ID_P521 = 4,
- CPT_EC_ID_PMAX = 5
+ CPT_EC_ID_P160 = 5,
+ CPT_EC_ID_P320 = 6,
+ CPT_EC_ID_P512 = 7,
+ CPT_EC_ID_PMAX = 8
} cpt_ec_id_t;
typedef struct sglist_comp {
} cpt_ec_id_t;
typedef struct sglist_comp {
@@
-241,12
+245,14
@@
struct cpt_sess_misc {
uint16_t aes_gcm:1;
/** Flag for AES CTR */
uint16_t aes_ctr:1;
uint16_t aes_gcm:1;
/** Flag for AES CTR */
uint16_t aes_ctr:1;
+ /** Flag for CHACHA POLY */
+ uint16_t chacha_poly:1;
/** Flag for NULL cipher/auth */
uint16_t is_null:1;
/** Flag for GMAC */
uint16_t is_gmac:1;
/** Flag for NULL cipher/auth */
uint16_t is_null:1;
/** Flag for GMAC */
uint16_t is_gmac:1;
- /**
Engine group
*/
- uint16_t
egrp
:3;
+ /**
Unused field
*/
+ uint16_t
rsvd1
:3;
/** AAD length */
uint16_t aad_length;
/** MAC len in bytes */
/** AAD length */
uint16_t aad_length;
/** MAC len in bytes */
@@
-255,14
+261,16
@@
struct cpt_sess_misc {
uint8_t iv_length;
/** Auth IV length in bytes */
uint8_t auth_iv_length;
uint8_t iv_length;
/** Auth IV length in bytes */
uint8_t auth_iv_length;
- /**
Reserv
ed field */
- uint8_t rsvd
1
;
+ /**
Unus
ed field */
+ uint8_t rsvd
2
;
/** IV offset in bytes */
uint16_t iv_offset;
/** Auth IV offset in bytes */
uint16_t auth_iv_offset;
/** Salt */
uint32_t salt;
/** IV offset in bytes */
uint16_t iv_offset;
/** Auth IV offset in bytes */
uint16_t auth_iv_offset;
/** Salt */
uint32_t salt;
+ /** CPT inst word 7 */
+ uint64_t cpt_inst_w7;
/** Context DMA address */
phys_addr_t ctx_dma_addr;
};
/** Context DMA address */
phys_addr_t ctx_dma_addr;
};
@@
-312,15
+320,18
@@
struct cpt_ctx {
uint64_t hmac :1;
uint64_t zsk_flags :3;
uint64_t k_ecb :1;
uint64_t hmac :1;
uint64_t zsk_flags :3;
uint64_t k_ecb :1;
+ uint64_t auth_enc :1;
+ uint64_t dec_auth :1;
uint64_t snow3g :2;
uint64_t snow3g :2;
- uint64_t rsvd :
21
;
+ uint64_t rsvd :
19
;
/* Below fields are accessed by hardware */
union {
mc_fc_context_t fctx;
mc_zuc_snow3g_ctx_t zs_ctx;
mc_kasumi_ctx_t k_ctx;
/* Below fields are accessed by hardware */
union {
mc_fc_context_t fctx;
mc_zuc_snow3g_ctx_t zs_ctx;
mc_kasumi_ctx_t k_ctx;
- };
- uint8_t auth_key[64];
+ } mc_ctx;
+ uint8_t *auth_key;
+ uint64_t auth_key_iova;
};
/* Prime and order fields of built-in elliptic curves */
};
/* Prime and order fields of built-in elliptic curves */
@@
-336,6
+347,18
@@
struct cpt_ec_group {
uint8_t data[66];
unsigned int length;
} order;
uint8_t data[66];
unsigned int length;
} order;
+
+ struct {
+ /* P521 maximum length */
+ uint8_t data[66];
+ unsigned int length;
+ } consta;
+
+ struct {
+ /* P521 maximum length */
+ uint8_t data[66];
+ unsigned int length;
+ } constb;
};
struct cpt_asym_ec_ctx {
};
struct cpt_asym_ec_ctx {
@@
-350,6
+373,7
@@
struct cpt_asym_sess_misc {
struct rte_crypto_modex_xform mod_ctx;
struct cpt_asym_ec_ctx ec_ctx;
};
struct rte_crypto_modex_xform mod_ctx;
struct cpt_asym_ec_ctx ec_ctx;
};
+ uint64_t cpt_inst_w7;
};
/* Buffer pointer */
};
/* Buffer pointer */
@@
-366,14
+390,6
@@
typedef struct{
buf_ptr_t bufs[0];
} iov_ptr_t;
buf_ptr_t bufs[0];
} iov_ptr_t;
-typedef union opcode_info {
- uint16_t flags;
- struct {
- uint8_t major;
- uint8_t minor;
- } s;
-} opcode_info_t;
-
typedef struct fc_params {
/* 0th cache line */
union {
typedef struct fc_params {
/* 0th cache line */
union {
@@
-427,6
+443,9
@@
typedef mc_hash_type_t auth_type_t;
#define SESS_PRIV(__sess) \
(void *)((uint8_t *)__sess + sizeof(struct cpt_sess_misc))
#define SESS_PRIV(__sess) \
(void *)((uint8_t *)__sess + sizeof(struct cpt_sess_misc))
+#define GET_SESS_FC_TYPE(__sess) \
+ (((struct cpt_ctx *)(SESS_PRIV(__sess)))->fc_type)
+
/*
* Get the session size
*
/*
* Get the session size
*