X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcrypto%2Fccp%2Fccp_crypto.h;h=882b398acaaca00d1e0df3b80cfcadff19df6edd;hb=34511c25d5fdc03ca972bc7fed50e2dd43e8c956;hp=23b048671b5fdc76b4997bf539fae7841636a162;hpb=1df800f8951882ab38fe8a82ac419b9718a1b910;p=dpdk.git diff --git a/drivers/crypto/ccp/ccp_crypto.h b/drivers/crypto/ccp/ccp_crypto.h index 23b048671b..882b398aca 100644 --- a/drivers/crypto/ccp/ccp_crypto.h +++ b/drivers/crypto/ccp/ccp_crypto.h @@ -42,10 +42,9 @@ #define HMAC_IPAD_VALUE 0x36 #define HMAC_OPAD_VALUE 0x5c -#ifdef RTE_LIBRTE_PMD_CCP_CPU_AUTH +/* MD5 */ #define MD5_DIGEST_SIZE 16 #define MD5_BLOCK_SIZE 64 -#endif /* SHA */ #define SHA_COMMON_DIGEST_SIZE 32 @@ -68,6 +67,9 @@ #define SHA512_BLOCK_SIZE 128 #define SHA3_512_BLOCK_SIZE 72 +/* Maximum length for digest */ +#define DIGEST_LENGTH_MAX 64 + /* SHA LSB intialiazation values */ #define SHA1_H0 0x67452301UL @@ -232,9 +234,7 @@ enum ccp_hash_algo { CCP_AUTH_ALGO_SHA3_512_HMAC, CCP_AUTH_ALGO_AES_CMAC, CCP_AUTH_ALGO_AES_GCM, -#ifdef RTE_LIBRTE_PMD_CCP_CPU_AUTH CCP_AUTH_ALGO_MD5_HMAC, -#endif }; /** @@ -247,6 +247,7 @@ enum ccp_hash_op { /* CCP crypto private session structure */ struct ccp_session { + bool auth_opt; enum ccp_cmd_order cmd_id; /**< chain order mode */ struct { @@ -318,6 +319,7 @@ struct ccp_session { extern uint8_t ccp_cryptodev_driver_id; struct ccp_qp; +struct ccp_private; /** * Set and validate CCP crypto session parameters @@ -327,7 +329,8 @@ struct ccp_qp; * @return 0 on success otherwise -1 */ int ccp_set_session_parameters(struct ccp_session *sess, - const struct rte_crypto_sym_xform *xform); + const struct rte_crypto_sym_xform *xform, + struct ccp_private *internals); /** * Find count of slots @@ -346,7 +349,7 @@ int ccp_compute_slot_count(struct ccp_session *session); * @param nb_ops No. of ops to be submitted * @return 0 on success otherwise -1 */ -int process_ops_to_enqueue(const struct ccp_qp *qp, +int process_ops_to_enqueue(struct ccp_qp *qp, struct rte_crypto_op **op, struct ccp_queue *cmd_q, uint16_t nb_ops,