#define BLOCKCIPHER_TEST_OP_DECRYPT 0x02
#define BLOCKCIPHER_TEST_OP_AUTH_GEN 0x04
#define BLOCKCIPHER_TEST_OP_AUTH_VERIFY 0x08
+#define BLOCKCIPHER_TEST_OP_DIGEST_ENCRYPTED 0x10
#define BLOCKCIPHER_TEST_FEATURE_OOP 0x01
#define BLOCKCIPHER_TEST_FEATURE_SESSIONLESS 0x02
#define BLOCKCIPHER_TEST_FEATURE_STOPPER 0x04 /* stop upon failing */
#define BLOCKCIPHER_TEST_FEATURE_SG 0x08 /* Scatter Gather */
-
-#define BLOCKCIPHER_TEST_TARGET_PMD_MB 0x0001 /* Multi-buffer flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_QAT 0x0002 /* QAT flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL 0x0004 /* SW OPENSSL flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 0x0008 /* ARMv8 flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER 0x0010 /* Scheduler */
-#define BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC 0x0020 /* DPAA2_SEC flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC 0x0040 /* DPAA_SEC flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_MVSAM 0x0080 /* Marvell flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX 0x0100 /* OCTEON TX flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_VIRTIO 0x0200 /* VIRTIO flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR 0x0400 /* CAAM_JR flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_CCP 0x0800 /* CCP flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_NULL 0x1000 /* NULL flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_NITROX 0x2000 /* NITROX flag */
+#define BLOCKCIPHER_TEST_FEATURE_DIGEST_ENCRYPTED 0x10
#define BLOCKCIPHER_TEST_OP_CIPHER (BLOCKCIPHER_TEST_OP_ENCRYPT | \
BLOCKCIPHER_TEST_OP_DECRYPT)
#define BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC (BLOCKCIPHER_TEST_OP_DECRYPT | \
BLOCKCIPHER_TEST_OP_AUTH_VERIFY)
+#define BLOCKCIPHER_TEST_OP_AUTH_GEN_ENC (BLOCKCIPHER_TEST_OP_ENCRYPT | \
+ BLOCKCIPHER_TEST_OP_AUTH_GEN | \
+ BLOCKCIPHER_TEST_OP_DIGEST_ENCRYPTED)
+
+#define BLOCKCIPHER_TEST_OP_DEC_AUTH_VERIFY (BLOCKCIPHER_TEST_OP_DECRYPT | \
+ BLOCKCIPHER_TEST_OP_AUTH_VERIFY | \
+ BLOCKCIPHER_TEST_OP_DIGEST_ENCRYPTED)
+
enum blockcipher_test_type {
BLKCIPHER_AES_CHAIN_TYPE, /* use aes_chain_test_cases[] */
BLKCIPHER_AES_CIPHERONLY_TYPE, /* use aes_cipheronly_test_cases[] */
const struct blockcipher_test_data *test_data;
uint8_t op_mask; /* operation mask */
uint8_t feature_mask;
- uint32_t pmd_mask;
};
struct blockcipher_test_data {
unsigned int cipher_offset;
unsigned int auth_offset;
+ uint32_t xts_dataunit_len;
+ bool wrapped_key;
};
-int
-test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
- struct rte_mempool *op_mpool,
- struct rte_mempool *sess_mpool,
- struct rte_mempool *sess_priv_mpool,
- uint8_t dev_id,
- int driver_id,
- enum blockcipher_test_type test_type);
+struct unit_test_suite *
+build_blockcipher_test_suite(enum blockcipher_test_type test_type);
+
+void
+free_blockcipher_test_suite(struct unit_test_suite *ts);
#endif /* TEST_CRYPTODEV_BLOCKCIPHER_H_ */