| 13297 | #define MB_SESSION_NUMBER 3 |
| 13298 | |
| 13299 | static int |
| 13300 | test_multi_session_random_usage(void) |
| 13301 | { |
| 13302 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 13303 | struct rte_cryptodev_info dev_info; |
| 13304 | int index = 0, ret = TEST_SUCCESS; |
| 13305 | uint32_t nb_sess, i, j; |
| 13306 | void **sessions; |
| 13307 | struct multi_session_params ut_paramz[] = { |
| 13308 | |
| 13309 | { |
| 13310 | .cipher_key = ms_aes_cbc_key0, |
| 13311 | .hmac_key = ms_hmac_key0, |
| 13312 | .cipher = ms_aes_cbc_cipher0, |
| 13313 | .digest = ms_hmac_digest0, |
| 13314 | .iv = ms_aes_cbc_iv0 |
| 13315 | }, |
| 13316 | { |
| 13317 | .cipher_key = ms_aes_cbc_key1, |
| 13318 | .hmac_key = ms_hmac_key1, |
| 13319 | .cipher = ms_aes_cbc_cipher1, |
| 13320 | .digest = ms_hmac_digest1, |
| 13321 | .iv = ms_aes_cbc_iv1 |
| 13322 | }, |
| 13323 | { |
| 13324 | .cipher_key = ms_aes_cbc_key2, |
| 13325 | .hmac_key = ms_hmac_key2, |
| 13326 | .cipher = ms_aes_cbc_cipher2, |
| 13327 | .digest = ms_hmac_digest2, |
| 13328 | .iv = ms_aes_cbc_iv2 |
| 13329 | }, |
| 13330 | |
| 13331 | }; |
| 13332 | |
| 13333 | /* Verify the capabilities */ |
| 13334 | struct rte_cryptodev_sym_capability_idx cap_idx; |
| 13335 | cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; |
| 13336 | cap_idx.algo.auth = RTE_CRYPTO_AUTH_SHA512_HMAC; |
| 13337 | if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], |
| 13338 | &cap_idx) == NULL) |
| 13339 | return TEST_SKIPPED; |
| 13340 | cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; |
| 13341 | cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_AES_CBC; |
| 13342 | if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], |
| 13343 | &cap_idx) == NULL) |
| 13344 | return TEST_SKIPPED; |
| 13345 | |
| 13346 | rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); |
| 13347 | |
| 13348 | sessions = rte_malloc(NULL, (sizeof(void *) |
| 13349 | * MAX_NB_SESSIONS) + 1, 0); |
| 13350 | |
| 13351 | for (i = 0; i < MB_SESSION_NUMBER; i++) { |
| 13352 | |
| 13353 | rte_memcpy(&ut_paramz[i].ut_params, &unittest_params, |
| 13354 | sizeof(struct crypto_unittest_params)); |
| 13355 | |
| 13356 | test_AES_CBC_HMAC_SHA512_decrypt_create_session_params( |
nothing calls this directly
no test coverage detected