X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_cryptodev.h;h=1cdd84d01f635417ad51bfbf5779b49e9ba5aadd;hb=88caad251c8de3a84e353b0b2a27014bc303df87;hp=d20586e397c2b5777febdcaac4b540da1845991a;hpb=5adf37e676f1c6045012c9c8f83cfb8aebb007ea;p=dpdk.git diff --git a/app/test/test_cryptodev.h b/app/test/test_cryptodev.h index d20586e397..1cdd84d01f 100644 --- a/app/test/test_cryptodev.h +++ b/app/test/test_cryptodev.h @@ -19,7 +19,7 @@ #define DEFAULT_NUM_XFORMS (2) #define NUM_MBUFS (8191) #define MBUF_CACHE_SIZE (256) -#define MBUF_DATAPAYLOAD_SIZE (2048 + DIGEST_BYTE_LENGTH_SHA512) +#define MBUF_DATAPAYLOAD_SIZE (4096 + DIGEST_BYTE_LENGTH_SHA512) #define MBUF_SIZE (sizeof(struct rte_mbuf) + \ RTE_PKTMBUF_HEADROOM + MBUF_DATAPAYLOAD_SIZE) @@ -44,6 +44,7 @@ #define TRUNCATED_DIGEST_BYTE_LENGTH_SHA512 (32) #define MAXIMUM_IV_LENGTH (16) +#define AES_GCM_J0_LENGTH (16) #define IV_OFFSET (sizeof(struct rte_crypto_op) + \ sizeof(struct rte_crypto_sym_op) + DEFAULT_NUM_XFORMS * \ @@ -66,8 +67,35 @@ #define CRYPTODEV_NAME_CCP_PMD crypto_ccp #define CRYPTODEV_NAME_VIRTIO_PMD crypto_virtio #define CRYPTODEV_NAME_OCTEONTX_SYM_PMD crypto_octeontx +#define CRYPTODEV_NAME_OCTEONTX2_PMD crypto_octeontx2 #define CRYPTODEV_NAME_CAAM_JR_PMD crypto_caam_jr #define CRYPTODEV_NAME_NITROX_PMD crypto_nitrox_sym +#define CRYPTODEV_NAME_BCMFS_PMD crypto_bcmfs +#define CRYPTODEV_NAME_CN9K_PMD crypto_cn9k +#define CRYPTODEV_NAME_CN10K_PMD crypto_cn10k +#define CRYPTODEV_NAME_MLX5_PMD crypto_mlx5 + + +enum cryptodev_api_test_type { + CRYPTODEV_API_TEST = 0, + CRYPTODEV_RAW_API_TEST +}; + +extern enum cryptodev_api_test_type global_api_test_type; + +extern struct crypto_testsuite_params *p_testsuite_params; +struct crypto_testsuite_params { + struct rte_mempool *mbuf_pool; + struct rte_mempool *large_mbuf_pool; + struct rte_mempool *op_mpool; + struct rte_mempool *session_mpool; + struct rte_mempool *session_priv_mpool; + struct rte_cryptodev_config conf; + struct rte_cryptodev_qp_conf qp_conf; + + uint8_t valid_devs[RTE_CRYPTO_MAX_DEVS]; + uint8_t valid_dev_count; +}; /** * Write (spread) data from buffer to mbuf data @@ -207,4 +235,27 @@ fail: return NULL; } +void +process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id, + struct rte_crypto_op *op, uint8_t is_cipher, uint8_t is_auth, + uint8_t len_in_bits, uint8_t cipher_iv_len); + +int +check_cipher_capabilities_supported(const enum rte_crypto_cipher_algorithm *ciphers, + uint16_t num_ciphers); + +int +check_auth_capabilities_supported(const enum rte_crypto_auth_algorithm *auths, + uint16_t num_auths); + +int +check_aead_capabilities_supported(const enum rte_crypto_aead_algorithm *aeads, + uint16_t num_aeads); + +int +ut_setup(void); + +void +ut_teardown(void); + #endif /* TEST_CRYPTODEV_H_ */