| 8124 | } |
| 8125 | |
| 8126 | static int |
| 8127 | test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, |
| 8128 | uint8_t op_mode, uint8_t verify) |
| 8129 | { |
| 8130 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 8131 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 8132 | |
| 8133 | int retval; |
| 8134 | |
| 8135 | const uint8_t *plaintext = NULL; |
| 8136 | const uint8_t *ciphertext = NULL; |
| 8137 | const uint8_t *digest = NULL; |
| 8138 | unsigned int plaintext_pad_len; |
| 8139 | unsigned int plaintext_len; |
| 8140 | unsigned int ciphertext_pad_len; |
| 8141 | unsigned int ciphertext_len; |
| 8142 | uint8_t buffer[10000]; |
| 8143 | uint8_t digest_buffer[10000]; |
| 8144 | |
| 8145 | struct rte_cryptodev_info dev_info; |
| 8146 | struct rte_crypto_op *op; |
| 8147 | |
| 8148 | /* Check if device supports particular algorithms */ |
| 8149 | if (test_mixed_check_if_unsupported(tdata)) |
| 8150 | return TEST_SKIPPED; |
| 8151 | if (global_api_test_type == CRYPTODEV_RAW_API_TEST) |
| 8152 | return TEST_SKIPPED; |
| 8153 | |
| 8154 | rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); |
| 8155 | |
| 8156 | uint64_t feat_flags = dev_info.feature_flags; |
| 8157 | |
| 8158 | if (op_mode == IN_PLACE) { |
| 8159 | if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { |
| 8160 | printf("Device doesn't support in-place scatter-gather " |
| 8161 | "in both input and output mbufs.\n"); |
| 8162 | return TEST_SKIPPED; |
| 8163 | } |
| 8164 | } else { |
| 8165 | if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { |
| 8166 | printf("Device doesn't support out-of-place scatter-gather " |
| 8167 | "in both input and output mbufs.\n"); |
| 8168 | return TEST_SKIPPED; |
| 8169 | } |
| 8170 | if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { |
| 8171 | printf("Device doesn't support digest encrypted.\n"); |
| 8172 | return TEST_SKIPPED; |
| 8173 | } |
| 8174 | } |
| 8175 | |
| 8176 | if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) |
| 8177 | return TEST_SKIPPED; |
| 8178 | |
| 8179 | /* Create the session */ |
| 8180 | if (verify) |
| 8181 | retval = create_wireless_algo_cipher_auth_session( |
| 8182 | ts_params->valid_devs[0], |
| 8183 | RTE_CRYPTO_CIPHER_OP_DECRYPT, |
no test coverage detected