| 6686 | } |
| 6687 | |
| 6688 | static int |
| 6689 | test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata, |
| 6690 | uint8_t op_mode, uint8_t verify) |
| 6691 | { |
| 6692 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 6693 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 6694 | |
| 6695 | int retval; |
| 6696 | |
| 6697 | const uint8_t *plaintext = NULL; |
| 6698 | const uint8_t *ciphertext = NULL; |
| 6699 | const uint8_t *digest = NULL; |
| 6700 | unsigned int plaintext_pad_len; |
| 6701 | unsigned int plaintext_len; |
| 6702 | unsigned int ciphertext_pad_len; |
| 6703 | unsigned int ciphertext_len; |
| 6704 | uint8_t buffer[10000]; |
| 6705 | uint8_t digest_buffer[10000]; |
| 6706 | |
| 6707 | struct rte_cryptodev_info dev_info; |
| 6708 | |
| 6709 | /* Check if device supports ZUC EEA3 */ |
| 6710 | if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3, |
| 6711 | tdata->key.len, tdata->cipher_iv.len) < 0) |
| 6712 | return TEST_SKIPPED; |
| 6713 | |
| 6714 | /* Check if device supports ZUC EIA3 */ |
| 6715 | if (check_auth_capability(ts_params, RTE_CRYPTO_AUTH_ZUC_EIA3, |
| 6716 | tdata->key.len, tdata->auth_iv.len, |
| 6717 | tdata->digest.len) < 0) |
| 6718 | return TEST_SKIPPED; |
| 6719 | |
| 6720 | if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) |
| 6721 | return TEST_SKIPPED; |
| 6722 | |
| 6723 | rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); |
| 6724 | |
| 6725 | uint64_t feat_flags = dev_info.feature_flags; |
| 6726 | |
| 6727 | if (op_mode == IN_PLACE) { |
| 6728 | if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { |
| 6729 | printf("Device doesn't support in-place scatter-gather " |
| 6730 | "in both input and output mbufs.\n"); |
| 6731 | return TEST_SKIPPED; |
| 6732 | } |
| 6733 | |
| 6734 | if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && |
| 6735 | (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { |
| 6736 | printf("Device doesn't support RAW data-path APIs.\n"); |
| 6737 | return TEST_SKIPPED; |
| 6738 | } |
| 6739 | } else { |
| 6740 | if (global_api_test_type == CRYPTODEV_RAW_API_TEST) |
| 6741 | return TEST_SKIPPED; |
| 6742 | if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { |
| 6743 | printf("Device doesn't support out-of-place scatter-gather " |
| 6744 | "in both input and output mbufs.\n"); |
| 6745 | return TEST_SKIPPED; |
no test coverage detected