Lines Matching refs:ut
240 check_cryptodev_capability(const struct ipsec_unitest_params *ut, in check_cryptodev_capability() argument
248 cap_idx.algo.auth = ut->auth_xform.auth.algo; in check_cryptodev_capability()
253 ut->auth_xform.auth.key.length, in check_cryptodev_capability()
254 ut->auth_xform.auth.digest_length, 0); in check_cryptodev_capability()
257 cap_idx.algo.cipher = ut->cipher_xform.cipher.algo; in check_cryptodev_capability()
263 ut->cipher_xform.cipher.key.length, in check_cryptodev_capability()
264 ut->cipher_xform.cipher.iv.length); in check_cryptodev_capability()
629 create_dummy_sec_session(struct ipsec_unitest_params *ut, in create_dummy_sec_session() argument
634 ut->ss[j].security.ses = rte_security_session_create(&dummy_sec_ctx, in create_dummy_sec_session()
638 if (ut->ss[j].security.ses == NULL) in create_dummy_sec_session()
641 ut->ss[j].security.ctx = &dummy_sec_ctx; in create_dummy_sec_session()
642 ut->ss[j].security.ol_flags = 0; in create_dummy_sec_session()
647 create_crypto_session(struct ipsec_unitest_params *ut, in create_crypto_session() argument
659 ut->crypto_xforms, qp->mp_session_private); in create_crypto_session()
661 ut->ss[j].crypto.ses = s; in create_crypto_session()
672 create_session(struct ipsec_unitest_params *ut, in create_session() argument
675 if (ut->ss[j].type == RTE_SECURITY_ACTION_TYPE_NONE) in create_session()
676 return create_crypto_session(ut, qp, crypto_dev, j); in create_session()
678 return create_dummy_sec_session(ut, qp, j); in create_session()
726 struct ipsec_unitest_params *ut = &unittest_params; in create_sa() local
730 memset(&ut->ss[j], 0, sizeof(ut->ss[j])); in create_sa()
737 sz = rte_ipsec_sa_size(&ut->sa_prm); in create_sa()
740 ut->ss[j].sa = rte_zmalloc(NULL, sz, RTE_CACHE_LINE_SIZE); in create_sa()
741 TEST_ASSERT_NOT_NULL(ut->ss[j].sa, in create_sa()
744 ut->ss[j].type = action_type; in create_sa()
745 rc = create_session(ut, &ts->qp_conf, ts->valid_dev, j); in create_sa()
749 rc = rte_ipsec_sa_init(ut->ss[j].sa, &ut->sa_prm, sz); in create_sa()
752 rc = rte_ipsec_session_prepare(&ut->ss[j]); in create_sa()
1172 destroy_dummy_sec_session(struct ipsec_unitest_params *ut, in destroy_dummy_sec_session() argument
1176 ut->ss[j].security.ses); in destroy_dummy_sec_session()
1177 ut->ss[j].security.ctx = NULL; in destroy_dummy_sec_session()
1181 destroy_crypto_session(struct ipsec_unitest_params *ut, in destroy_crypto_session() argument
1184 rte_cryptodev_sym_session_clear(crypto_dev, ut->ss[j].crypto.ses); in destroy_crypto_session()
1185 rte_cryptodev_sym_session_free(ut->ss[j].crypto.ses); in destroy_crypto_session()
1186 memset(&ut->ss[j], 0, sizeof(ut->ss[j])); in destroy_crypto_session()
1190 destroy_session(struct ipsec_unitest_params *ut, in destroy_session() argument
1193 if (ut->ss[j].type == RTE_SECURITY_ACTION_TYPE_NONE) in destroy_session()
1194 return destroy_crypto_session(ut, crypto_dev, j); in destroy_session()
1196 return destroy_dummy_sec_session(ut, j); in destroy_session()
1202 struct ipsec_unitest_params *ut = &unittest_params; in destroy_sa() local
1205 rte_ipsec_sa_fini(ut->ss[j].sa); in destroy_sa()
1206 rte_free(ut->ss[j].sa); in destroy_sa()
1208 destroy_session(ut, ts->valid_dev, j); in destroy_sa()