| 13996 | } |
| 13997 | |
| 13998 | static int create_gmac_session(uint8_t dev_id, |
| 13999 | const struct gmac_test_data *tdata, |
| 14000 | enum rte_crypto_auth_operation auth_op) |
| 14001 | { |
| 14002 | uint8_t auth_key[tdata->key.len]; |
| 14003 | |
| 14004 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 14005 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 14006 | |
| 14007 | memcpy(auth_key, tdata->key.data, tdata->key.len); |
| 14008 | |
| 14009 | ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; |
| 14010 | ut_params->auth_xform.next = NULL; |
| 14011 | |
| 14012 | ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_AES_GMAC; |
| 14013 | ut_params->auth_xform.auth.op = auth_op; |
| 14014 | ut_params->auth_xform.auth.digest_length = tdata->gmac_tag.len; |
| 14015 | ut_params->auth_xform.auth.key.length = tdata->key.len; |
| 14016 | ut_params->auth_xform.auth.key.data = auth_key; |
| 14017 | ut_params->auth_xform.auth.iv.offset = IV_OFFSET; |
| 14018 | ut_params->auth_xform.auth.iv.length = tdata->iv.len; |
| 14019 | |
| 14020 | |
| 14021 | ut_params->sess = rte_cryptodev_sym_session_create(dev_id, |
| 14022 | &ut_params->auth_xform, ts_params->session_mpool); |
| 14023 | if (ut_params->sess == NULL && rte_errno == ENOTSUP) |
| 14024 | return TEST_SKIPPED; |
| 14025 | TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); |
| 14026 | |
| 14027 | return 0; |
| 14028 | } |
| 14029 | |
| 14030 | static int |
| 14031 | test_AES_GMAC_authentication(const struct gmac_test_data *tdata) |
no test coverage detected