| 5729 | } |
| 5730 | |
| 5731 | static int |
| 5732 | test_kasumi_auth_cipher_sgl(const struct kasumi_test_data *tdata, |
| 5733 | uint8_t op_mode, uint8_t verify) |
| 5734 | { |
| 5735 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 5736 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 5737 | |
| 5738 | int retval; |
| 5739 | |
| 5740 | const uint8_t *plaintext = NULL; |
| 5741 | const uint8_t *ciphertext = NULL; |
| 5742 | const uint8_t *digest = NULL; |
| 5743 | unsigned int plaintext_pad_len; |
| 5744 | unsigned int plaintext_len; |
| 5745 | unsigned int ciphertext_pad_len; |
| 5746 | unsigned int ciphertext_len; |
| 5747 | uint8_t buffer[10000]; |
| 5748 | uint8_t digest_buffer[10000]; |
| 5749 | |
| 5750 | struct rte_cryptodev_info dev_info; |
| 5751 | |
| 5752 | /* Verify the capabilities */ |
| 5753 | struct rte_cryptodev_sym_capability_idx cap_idx; |
| 5754 | cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; |
| 5755 | cap_idx.algo.auth = RTE_CRYPTO_AUTH_KASUMI_F9; |
| 5756 | if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], |
| 5757 | &cap_idx) == NULL) |
| 5758 | return TEST_SKIPPED; |
| 5759 | cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; |
| 5760 | cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; |
| 5761 | if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], |
| 5762 | &cap_idx) == NULL) |
| 5763 | return TEST_SKIPPED; |
| 5764 | |
| 5765 | if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) |
| 5766 | return TEST_SKIPPED; |
| 5767 | |
| 5768 | rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); |
| 5769 | |
| 5770 | uint64_t feat_flags = dev_info.feature_flags; |
| 5771 | |
| 5772 | if (op_mode == IN_PLACE) { |
| 5773 | if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { |
| 5774 | printf("Device doesn't support in-place scatter-gather " |
| 5775 | "in both input and output mbufs.\n"); |
| 5776 | return TEST_SKIPPED; |
| 5777 | } |
| 5778 | if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && |
| 5779 | (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { |
| 5780 | printf("Device doesn't support RAW data-path APIs.\n"); |
| 5781 | return TEST_SKIPPED; |
| 5782 | } |
| 5783 | } else { |
| 5784 | if (global_api_test_type == CRYPTODEV_RAW_API_TEST) |
| 5785 | return TEST_SKIPPED; |
| 5786 | if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { |
| 5787 | printf("Device doesn't support out-of-place scatter-gather " |
| 5788 | "in both input and output mbufs.\n"); |
no test coverage detected