| 6484 | } |
| 6485 | |
| 6486 | static int |
| 6487 | test_zuc_auth_cipher(const struct wireless_test_data *tdata, |
| 6488 | uint8_t op_mode, uint8_t verify) |
| 6489 | { |
| 6490 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 6491 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 6492 | |
| 6493 | int retval; |
| 6494 | |
| 6495 | uint8_t *plaintext = NULL, *ciphertext = NULL; |
| 6496 | unsigned int plaintext_pad_len; |
| 6497 | unsigned int plaintext_len; |
| 6498 | unsigned int ciphertext_pad_len; |
| 6499 | unsigned int ciphertext_len; |
| 6500 | |
| 6501 | struct rte_cryptodev_info dev_info; |
| 6502 | |
| 6503 | /* Check if device supports ZUC EEA3 */ |
| 6504 | if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3, |
| 6505 | tdata->key.len, tdata->cipher_iv.len) < 0) |
| 6506 | return TEST_SKIPPED; |
| 6507 | |
| 6508 | /* Check if device supports ZUC EIA3 */ |
| 6509 | if (check_auth_capability(ts_params, RTE_CRYPTO_AUTH_ZUC_EIA3, |
| 6510 | tdata->key.len, tdata->auth_iv.len, |
| 6511 | tdata->digest.len) < 0) |
| 6512 | return TEST_SKIPPED; |
| 6513 | |
| 6514 | if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) |
| 6515 | return TEST_SKIPPED; |
| 6516 | |
| 6517 | rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); |
| 6518 | |
| 6519 | uint64_t feat_flags = dev_info.feature_flags; |
| 6520 | |
| 6521 | if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { |
| 6522 | printf("Device doesn't support digest encrypted.\n"); |
| 6523 | return TEST_SKIPPED; |
| 6524 | } |
| 6525 | if (op_mode == IN_PLACE) { |
| 6526 | if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { |
| 6527 | printf("Device doesn't support in-place scatter-gather " |
| 6528 | "in both input and output mbufs.\n"); |
| 6529 | return TEST_SKIPPED; |
| 6530 | } |
| 6531 | |
| 6532 | if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && |
| 6533 | (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { |
| 6534 | printf("Device doesn't support RAW data-path APIs.\n"); |
| 6535 | return TEST_SKIPPED; |
| 6536 | } |
| 6537 | } else { |
| 6538 | if (global_api_test_type == CRYPTODEV_RAW_API_TEST) |
| 6539 | return TEST_SKIPPED; |
| 6540 | if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { |
| 6541 | printf("Device doesn't support out-of-place scatter-gather " |
| 6542 | "in both input and output mbufs.\n"); |
| 6543 | return TEST_SKIPPED; |
no test coverage detected