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
pipeline: increase SWX immediate operand size
[dpdk.git]
/
drivers
/
crypto
/
dpaa_sec
/
dpaa_sec.h
diff --git
a/drivers/crypto/dpaa_sec/dpaa_sec.h
b/drivers/crypto/dpaa_sec/dpaa_sec.h
index
149923a
..
3686996
100644
(file)
--- a/
drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/
drivers/crypto/dpaa_sec/dpaa_sec.h
@@
-1,6
+1,6
@@
/* SPDX-License-Identifier: BSD-3-Clause
*
/* SPDX-License-Identifier: BSD-3-Clause
*
- * Copyright 2016 NXP
+ * Copyright 2016
-2020
NXP
*
*/
*
*/
@@
-38,14
+38,19
@@
enum dpaa_sec_op_type {
DPAA_SEC_NONE, /*!< No Cipher operations*/
DPAA_SEC_CIPHER,/*!< CIPHER operations */
DPAA_SEC_AUTH, /*!< Authentication Operations */
DPAA_SEC_NONE, /*!< No Cipher operations*/
DPAA_SEC_CIPHER,/*!< CIPHER operations */
DPAA_SEC_AUTH, /*!< Authentication Operations */
- DPAA_SEC_AEAD, /*!< Authenticated Encryption with associated data */
+ DPAA_SEC_AEAD, /*!< AEAD (AES-GCM/CCM) type operations */
+ DPAA_SEC_CIPHER_HASH, /*!< Authenticated Encryption with
+ * associated data
+ */
+ DPAA_SEC_HASH_CIPHER, /*!< Encryption with Authenticated
+ * associated data
+ */
DPAA_SEC_IPSEC, /*!< IPSEC protocol operations*/
DPAA_SEC_PDCP, /*!< PDCP protocol operations*/
DPAA_SEC_PKC, /*!< Public Key Cryptographic Operations */
DPAA_SEC_MAX
};
DPAA_SEC_IPSEC, /*!< IPSEC protocol operations*/
DPAA_SEC_PDCP, /*!< PDCP protocol operations*/
DPAA_SEC_PKC, /*!< Public Key Cryptographic Operations */
DPAA_SEC_MAX
};
-
#define DPAA_SEC_MAX_DESC_SIZE 64
/* code or cmd block to caam */
struct sec_cdb {
#define DPAA_SEC_MAX_DESC_SIZE 64
/* code or cmd block to caam */
struct sec_cdb {
@@
-93,7
+98,7
@@
struct sec_cdb {
uint32_t sh_desc[DPAA_SEC_MAX_DESC_SIZE];
};
uint32_t sh_desc[DPAA_SEC_MAX_DESC_SIZE];
};
-
+#ifdef RTE_LIB_SECURITY
/*!
* The structure is to be filled by user as a part of
* dpaa_sec_proto_ctxt for PDCP Protocol
/*!
* The structure is to be filled by user as a part of
* dpaa_sec_proto_ctxt for PDCP Protocol
@@
-104,32
+109,45
@@
struct sec_pdcp_ctxt {
int8_t pkt_dir;/*!< PDCP Frame Direction 0:UL 1:DL*/
int8_t hfn_ovd;/*!< Overwrite HFN per packet*/
uint8_t sn_size; /*!< Sequence number size, 5/7/12/15/18 */
int8_t pkt_dir;/*!< PDCP Frame Direction 0:UL 1:DL*/
int8_t hfn_ovd;/*!< Overwrite HFN per packet*/
uint8_t sn_size; /*!< Sequence number size, 5/7/12/15/18 */
- uint32_t hfn_ovd_offset;/*!< offset from rte_crypto_op at which
+ uint8_t sdap_enabled; /*!< SDAP header is enabled */
+ uint16_t hfn_ovd_offset;/*!< offset from rte_crypto_op at which
* per packet hfn is stored
*/
uint32_t hfn; /*!< Hyper Frame Number */
uint32_t hfn_threshold; /*!< HFN Threashold for key renegotiation */
};
* per packet hfn is stored
*/
uint32_t hfn; /*!< Hyper Frame Number */
uint32_t hfn_threshold; /*!< HFN Threashold for key renegotiation */
};
-
+#endif
typedef struct dpaa_sec_session_entry {
typedef struct dpaa_sec_session_entry {
+ struct sec_cdb cdb; /**< cmd block associated with qp */
+ struct dpaa_sec_qp *qp[MAX_DPAA_CORES];
+ struct qman_fq *inq[MAX_DPAA_CORES];
uint8_t dir; /*!< Operation Direction */
uint8_t dir; /*!< Operation Direction */
+ uint8_t ctxt; /*!< Session Context Type */
enum rte_crypto_cipher_algorithm cipher_alg; /*!< Cipher Algorithm*/
enum rte_crypto_auth_algorithm auth_alg; /*!< Authentication Algorithm*/
enum rte_crypto_aead_algorithm aead_alg; /*!< AEAD Algorithm*/
enum rte_crypto_cipher_algorithm cipher_alg; /*!< Cipher Algorithm*/
enum rte_crypto_auth_algorithm auth_alg; /*!< Authentication Algorithm*/
enum rte_crypto_aead_algorithm aead_alg; /*!< AEAD Algorithm*/
+#ifdef RTE_LIB_SECURITY
enum rte_security_session_protocol proto_alg; /*!< Security Algorithm*/
enum rte_security_session_protocol proto_alg; /*!< Security Algorithm*/
+#endif
union {
struct {
uint8_t *data; /**< pointer to key data */
size_t length; /**< key length in bytes */
union {
struct {
uint8_t *data; /**< pointer to key data */
size_t length; /**< key length in bytes */
+ uint32_t alg;
+ uint32_t algmode;
} aead_key;
struct {
struct {
uint8_t *data; /**< pointer to key data */
size_t length; /**< key length in bytes */
} aead_key;
struct {
struct {
uint8_t *data; /**< pointer to key data */
size_t length; /**< key length in bytes */
+ uint32_t alg;
+ uint32_t algmode;
} cipher_key;
struct {
uint8_t *data; /**< pointer to key data */
size_t length; /**< key length in bytes */
} cipher_key;
struct {
uint8_t *data; /**< pointer to key data */
size_t length; /**< key length in bytes */
+ uint32_t alg;
+ uint32_t algmode;
} auth_key;
};
};
} auth_key;
};
};
@@
-148,12
+166,13
@@
typedef struct dpaa_sec_session_entry {
struct ip ip4_hdr;
struct rte_ipv6_hdr ip6_hdr;
};
struct ip ip4_hdr;
struct rte_ipv6_hdr ip6_hdr;
};
+ uint8_t auth_cipher_text;
+ /**< Authenticate/cipher ordering */
};
};
+#ifdef RTE_LIB_SECURITY
struct sec_pdcp_ctxt pdcp;
struct sec_pdcp_ctxt pdcp;
+#endif
};
};
- struct dpaa_sec_qp *qp[MAX_DPAA_CORES];
- struct qman_fq *inq[MAX_DPAA_CORES];
- struct sec_cdb cdb; /**< cmd block associated with qp */
} dpaa_sec_session;
struct dpaa_sec_qp {
} dpaa_sec_session;
struct dpaa_sec_qp {
@@
-200,6
+219,27
@@
struct dpaa_sec_op_ctx {
};
static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = {
};
static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = {
+ { /* NULL (AUTH) */
+ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+ {.sym = {
+ .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
+ {.auth = {
+ .algo = RTE_CRYPTO_AUTH_NULL,
+ .block_size = 1,
+ .key_size = {
+ .min = 0,
+ .max = 0,
+ .increment = 0
+ },
+ .digest_size = {
+ .min = 0,
+ .max = 0,
+ .increment = 0
+ },
+ .iv_size = { 0 }
+ }, },
+ }, },
+ },
{ /* MD5 HMAC */
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
{ /* MD5 HMAC */
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
@@
-356,6
+396,26
@@
static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = {
}, }
}, }
},
}, }
}, }
},
+ { /* NULL (CIPHER) */
+ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+ {.sym = {
+ .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+ {.cipher = {
+ .algo = RTE_CRYPTO_CIPHER_NULL,
+ .block_size = 1,
+ .key_size = {
+ .min = 0,
+ .max = 0,
+ .increment = 0
+ },
+ .iv_size = {
+ .min = 0,
+ .max = 0,
+ .increment = 0
+ }
+ }, },
+ }, }
+ },
{ /* AES CBC */
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
{ /* AES CBC */
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
@@
-509,6
+569,7
@@
static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = {
RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
};
RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
};
+#ifdef RTE_LIB_SECURITY
static const struct rte_cryptodev_capabilities dpaa_pdcp_capabilities[] = {
{ /* SNOW 3G (UIA2) */
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
static const struct rte_cryptodev_capabilities dpaa_pdcp_capabilities[] = {
{ /* SNOW 3G (UIA2) */
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
@@
-673,7
+734,8
@@
static const struct rte_security_capability dpaa_sec_security_cap[] = {
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,
- .options = { 0 }
+ .options = { 0 },
+ .replay_win_sz_max = 128
},
.crypto_capabilities = dpaa_sec_capabilities
},
},
.crypto_capabilities = dpaa_sec_capabilities
},
@@
-684,7
+746,8
@@
static const struct rte_security_capability dpaa_sec_security_cap[] = {
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS,
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS,
- .options = { 0 }
+ .options = { 0 },
+ .replay_win_sz_max = 128
},
.crypto_capabilities = dpaa_sec_capabilities
},
},
.crypto_capabilities = dpaa_sec_capabilities
},
@@
-693,6
+756,7
@@
static const struct rte_security_capability dpaa_sec_security_cap[] = {
.protocol = RTE_SECURITY_PROTOCOL_PDCP,
.pdcp = {
.domain = RTE_SECURITY_PDCP_MODE_DATA,
.protocol = RTE_SECURITY_PROTOCOL_PDCP,
.pdcp = {
.domain = RTE_SECURITY_PDCP_MODE_DATA,
+ .capa_flags = 0
},
.crypto_capabilities = dpaa_pdcp_capabilities
},
},
.crypto_capabilities = dpaa_pdcp_capabilities
},
@@
-701,6
+765,7
@@
static const struct rte_security_capability dpaa_sec_security_cap[] = {
.protocol = RTE_SECURITY_PROTOCOL_PDCP,
.pdcp = {
.domain = RTE_SECURITY_PDCP_MODE_CONTROL,
.protocol = RTE_SECURITY_PROTOCOL_PDCP,
.pdcp = {
.domain = RTE_SECURITY_PDCP_MODE_CONTROL,
+ .capa_flags = 0
},
.crypto_capabilities = dpaa_pdcp_capabilities
},
},
.crypto_capabilities = dpaa_pdcp_capabilities
},
@@
-708,6
+773,7
@@
static const struct rte_security_capability dpaa_sec_security_cap[] = {
.action = RTE_SECURITY_ACTION_TYPE_NONE
}
};
.action = RTE_SECURITY_ACTION_TYPE_NONE
}
};
+#endif
/**
* Checksum
/**
* Checksum