4 * Copyright(c) 2015-2016 Intel Corporation. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
16 * * Neither the name of Intel Corporation nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #include <rte_common.h>
34 #include <rte_hexdump.h>
36 #include <rte_malloc.h>
37 #include <rte_memcpy.h>
39 #include <rte_crypto.h>
40 #include <rte_cryptodev.h>
41 #include <rte_cryptodev_pmd.h>
44 #include "test_cryptodev_aes.h"
46 #ifndef AES_TEST_MSG_LEN
47 #define AES_TEST_MSG_LEN 256
50 #define AES_TEST_OP_ENCRYPT 0x01
51 #define AES_TEST_OP_DECRYPT 0x02
52 #define AES_TEST_OP_AUTH_GEN 0x04
53 #define AES_TEST_OP_AUTH_VERIFY 0x08
55 #define AES_TEST_FEATURE_OOP 0x01
56 #define AES_TEST_FEATURE_SESSIONLESS 0x02
57 #define AES_TEST_FEATURE_STOPPER 0x04 /* stop upon failing */
59 #define AES_TEST_TARGET_PMD_MB 0x0001 /* Multi-buffer flag */
60 #define AES_TEST_TARGET_PMD_QAT 0x0002 /* QAT flag */
62 #define AES_TEST_OP_CIPHER (AES_TEST_OP_ENCRYPT | \
65 #define AES_TEST_OP_AUTH (AES_TEST_OP_AUTH_GEN | \
66 AES_TEST_OP_AUTH_VERIFY)
68 #define AES_TEST_OP_ENC_AUTH_GEN (AES_TEST_OP_ENCRYPT | \
71 #define AES_TEST_OP_AUTH_VERIFY_DEC (AES_TEST_OP_DECRYPT | \
72 AES_TEST_OP_AUTH_VERIFY)
74 struct aes_test_case {
75 const char *test_descr; /* test description */
76 const struct aes_test_data *test_data;
77 uint8_t op_mask; /* operation mask */
82 static const struct aes_test_case aes_test_cases[] = {
84 .test_descr = "AES-128-CTR HMAC-SHA1 Encryption Digest",
85 .test_data = &aes_test_data_1,
86 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
87 .pmd_mask = AES_TEST_TARGET_PMD_MB |
88 AES_TEST_TARGET_PMD_QAT
91 .test_descr = "AES-128-CTR HMAC-SHA1 Decryption Digest "
93 .test_data = &aes_test_data_1,
94 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
95 .pmd_mask = AES_TEST_TARGET_PMD_MB |
96 AES_TEST_TARGET_PMD_QAT
99 .test_descr = "AES-192-CTR XCBC Encryption Digest",
100 .test_data = &aes_test_data_2,
101 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
102 .pmd_mask = AES_TEST_TARGET_PMD_MB |
103 AES_TEST_TARGET_PMD_QAT
106 .test_descr = "AES-192-CTR XCBC Decryption Digest Verify",
107 .test_data = &aes_test_data_2,
108 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
109 .pmd_mask = AES_TEST_TARGET_PMD_MB |
110 AES_TEST_TARGET_PMD_QAT
113 .test_descr = "AES-256-CTR HMAC-SHA1 Encryption Digest",
114 .test_data = &aes_test_data_3,
115 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
116 .pmd_mask = AES_TEST_TARGET_PMD_MB |
117 AES_TEST_TARGET_PMD_QAT
120 .test_descr = "AES-256-CTR HMAC-SHA1 Decryption Digest "
122 .test_data = &aes_test_data_3,
123 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
124 .pmd_mask = AES_TEST_TARGET_PMD_MB |
125 AES_TEST_TARGET_PMD_QAT
128 .test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest",
129 .test_data = &aes_test_data_4,
130 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
131 .pmd_mask = AES_TEST_TARGET_PMD_MB |
132 AES_TEST_TARGET_PMD_QAT
135 .test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest "
137 .test_data = &aes_test_data_4,
138 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
139 .pmd_mask = AES_TEST_TARGET_PMD_MB |
140 AES_TEST_TARGET_PMD_QAT
143 .test_descr = "AES-128-CBC HMAC-SHA256 Encryption Digest",
144 .test_data = &aes_test_data_5,
145 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
146 .pmd_mask = AES_TEST_TARGET_PMD_MB |
147 AES_TEST_TARGET_PMD_QAT
150 .test_descr = "AES-128-CBC HMAC-SHA256 Decryption Digest "
152 .test_data = &aes_test_data_5,
153 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
154 .pmd_mask = AES_TEST_TARGET_PMD_MB |
155 AES_TEST_TARGET_PMD_QAT
158 .test_descr = "AES-128-CBC HMAC-SHA512 Encryption Digest",
159 .test_data = &aes_test_data_6,
160 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
161 .pmd_mask = AES_TEST_TARGET_PMD_MB |
162 AES_TEST_TARGET_PMD_QAT
165 .test_descr = "AES-128-CBC HMAC-SHA512 Encryption Digest "
167 .test_data = &aes_test_data_6,
168 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
169 .feature_mask = AES_TEST_FEATURE_SESSIONLESS,
170 .pmd_mask = AES_TEST_TARGET_PMD_MB
173 .test_descr = "AES-128-CBC HMAC-SHA512 Decryption Digest "
175 .test_data = &aes_test_data_6,
176 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
177 .pmd_mask = AES_TEST_TARGET_PMD_MB |
178 AES_TEST_TARGET_PMD_QAT
181 .test_descr = "AES-128-CBC XCBC Encryption Digest",
182 .test_data = &aes_test_data_7,
183 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
184 .pmd_mask = AES_TEST_TARGET_PMD_MB |
185 AES_TEST_TARGET_PMD_QAT
188 .test_descr = "AES-128-CBC XCBC Decryption Digest Verify",
189 .test_data = &aes_test_data_7,
190 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
191 .pmd_mask = AES_TEST_TARGET_PMD_MB |
192 AES_TEST_TARGET_PMD_QAT
195 .test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest "
197 .test_data = &aes_test_data_4,
198 .op_mask = AES_TEST_OP_ENC_AUTH_GEN,
199 .feature_mask = AES_TEST_FEATURE_OOP,
200 .pmd_mask = AES_TEST_TARGET_PMD_QAT
203 .test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest "
205 .test_data = &aes_test_data_4,
206 .op_mask = AES_TEST_OP_AUTH_VERIFY_DEC,
207 .feature_mask = AES_TEST_FEATURE_OOP,
208 .pmd_mask = AES_TEST_TARGET_PMD_QAT
213 test_AES_one_case(const struct aes_test_case *t,
214 struct rte_mempool *mbuf_pool,
215 struct rte_mempool *op_mpool,
217 enum rte_cryptodev_type cryptodev_type,
220 struct rte_mbuf *ibuf = NULL;
221 struct rte_mbuf *obuf = NULL;
222 struct rte_mbuf *iobuf;
223 struct rte_crypto_sym_xform *cipher_xform = NULL;
224 struct rte_crypto_sym_xform *auth_xform = NULL;
225 struct rte_crypto_sym_xform *init_xform = NULL;
226 struct rte_crypto_sym_op *sym_op = NULL;
227 struct rte_crypto_op *op = NULL;
228 struct rte_cryptodev_sym_session *sess = NULL;
230 int status = TEST_SUCCESS;
231 const struct aes_test_data *tdata = t->test_data;
232 uint8_t cipher_key[tdata->cipher_key.len];
233 uint8_t auth_key[tdata->auth_key.len];
234 uint32_t buf_len = tdata->ciphertext.len;
235 uint32_t digest_len = 0;
238 if (tdata->cipher_key.len)
239 memcpy(cipher_key, tdata->cipher_key.data,
240 tdata->cipher_key.len);
241 if (tdata->auth_key.len)
242 memcpy(auth_key, tdata->auth_key.data,
243 tdata->auth_key.len);
245 switch (cryptodev_type) {
246 case RTE_CRYPTODEV_QAT_SYM_PMD:
247 digest_len = tdata->digest.len;
249 case RTE_CRYPTODEV_AESNI_MB_PMD:
250 digest_len = tdata->digest.truncated_len;
253 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u FAILED: %s",
254 __LINE__, "Unsupported PMD type");
255 status = TEST_FAILED;
260 ibuf = rte_pktmbuf_alloc(mbuf_pool);
262 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u FAILED: %s",
263 __LINE__, "Allocation of rte_mbuf failed");
264 status = TEST_FAILED;
268 if (t->op_mask & AES_TEST_OP_CIPHER)
269 buf_len += tdata->iv.len;
270 if (t->op_mask & AES_TEST_OP_AUTH)
271 buf_len += digest_len;
273 buf_p = rte_pktmbuf_append(ibuf, buf_len);
275 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u FAILED: %s",
276 __LINE__, "No room to append mbuf");
277 status = TEST_FAILED;
281 if (t->op_mask & AES_TEST_OP_CIPHER) {
282 rte_memcpy(buf_p, tdata->iv.data, tdata->iv.len);
283 buf_p += tdata->iv.len;
286 /* only encryption requires plaintext.data input,
287 * decryption/(digest gen)/(digest verify) use ciphertext.data
289 if (t->op_mask & AES_TEST_OP_ENCRYPT) {
290 rte_memcpy(buf_p, tdata->plaintext.data,
291 tdata->plaintext.len);
292 buf_p += tdata->plaintext.len;
294 rte_memcpy(buf_p, tdata->ciphertext.data,
295 tdata->ciphertext.len);
296 buf_p += tdata->ciphertext.len;
299 if (t->op_mask & AES_TEST_OP_AUTH_VERIFY)
300 rte_memcpy(buf_p, tdata->digest.data, digest_len);
302 memset(buf_p, 0, digest_len);
304 if (t->feature_mask & AES_TEST_FEATURE_OOP) {
305 obuf = rte_pktmbuf_alloc(mbuf_pool);
307 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
308 "FAILED: %s", __LINE__,
309 "Allocation of rte_mbuf failed");
310 status = TEST_FAILED;
314 buf_p = rte_pktmbuf_append(obuf, buf_len);
316 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
317 "FAILED: %s", __LINE__,
318 "No room to append mbuf");
319 status = TEST_FAILED;
322 memset(buf_p, 0, buf_len);
325 /* Generate Crypto op data structure */
326 op = rte_crypto_op_alloc(op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC);
328 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u FAILED: %s",
329 __LINE__, "Failed to allocate symmetric crypto "
331 status = TEST_FAILED;
337 sym_op->m_src = ibuf;
339 if (t->feature_mask & AES_TEST_FEATURE_OOP) {
340 sym_op->m_dst = obuf;
343 sym_op->m_dst = NULL;
347 /* sessionless op requires allocate xform using
348 * rte_crypto_op_sym_xforms_alloc(), otherwise rte_zmalloc()
350 if (t->feature_mask & AES_TEST_FEATURE_SESSIONLESS) {
351 uint32_t n_xforms = 0;
353 if (t->op_mask & AES_TEST_OP_CIPHER)
355 if (t->op_mask & AES_TEST_OP_AUTH)
358 if (rte_crypto_op_sym_xforms_alloc(op, n_xforms)
360 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
361 "FAILED: %s", __LINE__, "Failed to "
362 "allocate space for crypto transforms");
363 status = TEST_FAILED;
367 cipher_xform = rte_zmalloc(NULL,
368 sizeof(struct rte_crypto_sym_xform), 0);
370 auth_xform = rte_zmalloc(NULL,
371 sizeof(struct rte_crypto_sym_xform), 0);
373 if (!cipher_xform || !auth_xform) {
374 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
375 "FAILED: %s", __LINE__, "Failed to "
376 "allocate memory for crypto transforms");
377 status = TEST_FAILED;
382 /* preparing xform, for sessioned op, init_xform is initialized
383 * here and later as param in rte_cryptodev_sym_session_create()
385 if (t->op_mask == AES_TEST_OP_ENC_AUTH_GEN) {
386 if (t->feature_mask & AES_TEST_FEATURE_SESSIONLESS) {
387 cipher_xform = op->sym->xform;
388 auth_xform = cipher_xform->next;
389 auth_xform->next = NULL;
391 cipher_xform->next = auth_xform;
392 auth_xform->next = NULL;
393 init_xform = cipher_xform;
395 } else if (t->op_mask == AES_TEST_OP_AUTH_VERIFY_DEC) {
396 if (t->feature_mask & AES_TEST_FEATURE_SESSIONLESS) {
397 auth_xform = op->sym->xform;
398 cipher_xform = auth_xform->next;
399 cipher_xform->next = NULL;
401 auth_xform->next = cipher_xform;
402 cipher_xform->next = NULL;
403 init_xform = auth_xform;
405 } else if ((t->op_mask == AES_TEST_OP_ENCRYPT) ||
406 (t->op_mask == AES_TEST_OP_DECRYPT)) {
407 if (t->feature_mask & AES_TEST_FEATURE_SESSIONLESS)
408 cipher_xform = op->sym->xform;
410 init_xform = cipher_xform;
411 cipher_xform->next = NULL;
412 } else if ((t->op_mask == AES_TEST_OP_AUTH_GEN) ||
413 (t->op_mask == AES_TEST_OP_AUTH_VERIFY)) {
414 if (t->feature_mask & AES_TEST_FEATURE_SESSIONLESS)
415 auth_xform = op->sym->xform;
417 init_xform = auth_xform;
418 auth_xform->next = NULL;
420 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u FAILED: %s",
421 __LINE__, "Unrecognized operation");
422 status = TEST_FAILED;
426 /*configure xforms & sym_op cipher and auth data*/
427 if (t->op_mask & AES_TEST_OP_CIPHER) {
428 cipher_xform->type = RTE_CRYPTO_SYM_XFORM_CIPHER;
429 cipher_xform->cipher.algo = tdata->crypto_algo;
430 if (t->op_mask & AES_TEST_OP_ENCRYPT)
431 cipher_xform->cipher.op =
432 RTE_CRYPTO_CIPHER_OP_ENCRYPT;
434 cipher_xform->cipher.op =
435 RTE_CRYPTO_CIPHER_OP_DECRYPT;
436 cipher_xform->cipher.key.data = cipher_key;
437 cipher_xform->cipher.key.length = tdata->cipher_key.len;
439 sym_op->cipher.data.offset = tdata->iv.len;
440 sym_op->cipher.data.length = tdata->ciphertext.len;
441 sym_op->cipher.iv.data = rte_pktmbuf_mtod(sym_op->m_src,
443 sym_op->cipher.iv.length = tdata->iv.len;
444 sym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(
448 if (t->op_mask & AES_TEST_OP_AUTH) {
449 uint32_t auth_data_offset = 0;
450 uint32_t digest_offset = tdata->ciphertext.len;
452 if (t->op_mask & AES_TEST_OP_CIPHER) {
453 digest_offset += tdata->iv.len;
454 auth_data_offset += tdata->iv.len;
457 auth_xform->type = RTE_CRYPTO_SYM_XFORM_AUTH;
458 auth_xform->auth.algo = tdata->auth_algo;
459 auth_xform->auth.key.length = tdata->auth_key.len;
460 auth_xform->auth.key.data = auth_key;
461 auth_xform->auth.digest_length = digest_len;
463 if (t->op_mask & AES_TEST_OP_AUTH_GEN) {
464 auth_xform->auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
465 sym_op->auth.digest.data = rte_pktmbuf_mtod_offset
466 (iobuf, uint8_t *, digest_offset);
467 sym_op->auth.digest.phys_addr =
468 rte_pktmbuf_mtophys_offset(iobuf,
471 auth_xform->auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;
472 sym_op->auth.digest.data = rte_pktmbuf_mtod_offset
473 (sym_op->m_src, uint8_t *, digest_offset);
474 sym_op->auth.digest.phys_addr =
475 rte_pktmbuf_mtophys_offset(sym_op->m_src,
479 sym_op->auth.data.offset = auth_data_offset;
480 sym_op->auth.data.length = tdata->ciphertext.len;
481 sym_op->auth.digest.length = digest_len;
484 /* create session for sessioned op */
485 if (!(t->feature_mask & AES_TEST_FEATURE_SESSIONLESS)) {
486 sess = rte_cryptodev_sym_session_create(dev_id,
489 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
490 "FAILED: %s", __LINE__,
491 "Session creation failed");
492 status = TEST_FAILED;
496 /* attach symmetric crypto session to crypto operations */
497 rte_crypto_op_attach_sym_session(op, sess);
500 /* Process crypto operation */
501 if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
502 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u FAILED: %s",
503 __LINE__, "Error sending packet for encryption");
504 status = TEST_FAILED;
510 while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
514 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u FAILED: %s",
515 __LINE__, "Failed to process sym crypto op");
516 status = TEST_FAILED;
520 #ifdef RTE_APP_TEST_DEBUG
521 rte_hexdump(stdout, "m_src:",
522 rte_pktmbuf_mtod(sym_op->m_src, uint8_t *), buf_len);
523 if (t->feature_mask & AES_TEST_FEATURE_OOP)
524 rte_hexdump(stdout, "m_dst:",
525 rte_pktmbuf_mtod(sym_op->m_dst, uint8_t *),
530 if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
531 if (t->op_mask & AES_TEST_OP_AUTH_VERIFY)
532 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
533 "FAILED: Digest verification failed "
534 "(0x%X)", __LINE__, op->status);
536 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
537 "FAILED: Digest verification failed "
538 "(0x%X)", __LINE__, op->status);
539 status = TEST_FAILED;
543 if (t->op_mask & AES_TEST_OP_CIPHER) {
545 const uint8_t *compare_ref;
546 uint32_t compare_len;
548 crypto_res = rte_pktmbuf_mtod_offset(iobuf, uint8_t *,
551 if (t->op_mask & AES_TEST_OP_ENCRYPT) {
552 compare_ref = tdata->ciphertext.data;
553 compare_len = tdata->ciphertext.len;
555 compare_ref = tdata->plaintext.data;
556 compare_len = tdata->plaintext.len;
559 if (memcmp(crypto_res, compare_ref, compare_len)) {
560 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
561 "FAILED: %s", __LINE__,
562 "Crypto data not as expected");
563 status = TEST_FAILED;
568 if (t->op_mask & AES_TEST_OP_AUTH_GEN) {
571 if (t->op_mask & AES_TEST_OP_CIPHER)
572 auth_res = rte_pktmbuf_mtod_offset(iobuf,
574 tdata->iv.len + tdata->ciphertext.len);
576 auth_res = rte_pktmbuf_mtod_offset(iobuf,
577 uint8_t *, tdata->ciphertext.len);
579 if (memcmp(auth_res, tdata->digest.data, digest_len)) {
580 snprintf(test_msg, AES_TEST_MSG_LEN, "line %u "
581 "FAILED: %s", __LINE__, "Generated "
582 "digest data not as expected");
583 status = TEST_FAILED;
588 snprintf(test_msg, AES_TEST_MSG_LEN, "PASS");
591 if (!(t->feature_mask & AES_TEST_FEATURE_SESSIONLESS)) {
593 rte_cryptodev_sym_session_free(dev_id, sess);
595 rte_free(cipher_xform);
597 rte_free(auth_xform);
601 rte_crypto_op_free(op);
604 rte_pktmbuf_free(obuf);
607 rte_pktmbuf_free(ibuf);
613 test_AES_all_tests(struct rte_mempool *mbuf_pool,
614 struct rte_mempool *op_mpool,
616 enum rte_cryptodev_type cryptodev_type)
618 int status, overall_status = TEST_SUCCESS;
619 uint32_t i, test_index = 0;
620 char test_msg[AES_TEST_MSG_LEN + 1];
621 uint32_t n_test_cases = sizeof(aes_test_cases) /
622 sizeof(aes_test_cases[0]);
623 uint32_t target_pmd_mask = 0;
625 switch (cryptodev_type) {
626 case RTE_CRYPTODEV_AESNI_MB_PMD:
627 target_pmd_mask = AES_TEST_TARGET_PMD_MB;
629 case RTE_CRYPTODEV_QAT_SYM_PMD:
630 target_pmd_mask = AES_TEST_TARGET_PMD_QAT;
633 TEST_ASSERT(-1, "Unrecognized cryptodev type");
637 for (i = 0; i < n_test_cases; i++) {
638 const struct aes_test_case *tc = &aes_test_cases[i];
640 if (!(tc->pmd_mask & target_pmd_mask))
643 status = test_AES_one_case(tc, mbuf_pool, op_mpool,
644 dev_id, cryptodev_type, test_msg);
646 printf(" %u) TestCase %s %s\n", test_index ++,
647 tc->test_descr, test_msg);
649 if (status != TEST_SUCCESS) {
650 if (overall_status == TEST_SUCCESS)
651 overall_status = status;
653 if (tc->feature_mask & AES_TEST_FEATURE_STOPPER)
658 return overall_status;