MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_cryptodev_asym_session_free

Function rte_cryptodev_asym_session_free

dpdk/lib/cryptodev/rte_cryptodev.c:2260–2289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2258}
2259
2260int
2261rte_cryptodev_asym_session_free(uint8_t dev_id, void *sess)
2262{
2263 struct rte_mempool *sess_mp;
2264 struct rte_cryptodev *dev;
2265
2266 if (!rte_cryptodev_is_valid_dev(dev_id)) {
2267 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
2268 return -EINVAL;
2269 }
2270
2271 dev = rte_cryptodev_pmd_get_dev(dev_id);
2272
2273 if (dev == NULL || sess == NULL)
2274 return -EINVAL;
2275
2276 if (*dev->dev_ops->asym_session_clear == NULL)
2277 return -ENOTSUP;
2278
2279 dev->dev_ops->asym_session_clear(dev, sess);
2280
2281 rte_free(((struct rte_cryptodev_asym_session *)sess)->event_mdata);
2282
2283 /* Return session to mempool */
2284 sess_mp = rte_mempool_from_obj(sess);
2285 rte_mempool_put(sess_mp, sess);
2286
2287 rte_cryptodev_trace_asym_session_free(dev_id, sess);
2288 return 0;
2289}
2290
2291unsigned int
2292rte_cryptodev_asym_get_header_session_size(void)

Callers 15

cperf_latency_test_freeFunction · 0.85
cperf_verify_test_freeFunction · 0.85
test_rsa_sign_verifyFunction · 0.85
test_rsa_enc_decFunction · 0.85
test_rsa_sign_verify_crtFunction · 0.85
test_rsa_enc_dec_crtFunction · 0.85
ut_teardown_asymFunction · 0.85
test_dh_gen_shared_secFunction · 0.85
test_dh_gen_priv_keyFunction · 0.85
test_dh_gen_pub_keyFunction · 0.85
test_dh_gen_kpFunction · 0.85

Calls 5

rte_freeFunction · 0.85
rte_mempool_from_objFunction · 0.85
rte_mempool_putFunction · 0.85

Tested by 15

cperf_latency_test_freeFunction · 0.68
cperf_verify_test_freeFunction · 0.68
test_rsa_sign_verifyFunction · 0.68
test_rsa_enc_decFunction · 0.68
test_rsa_sign_verify_crtFunction · 0.68
test_rsa_enc_dec_crtFunction · 0.68
ut_teardown_asymFunction · 0.68
test_dh_gen_shared_secFunction · 0.68
test_dh_gen_priv_keyFunction · 0.68
test_dh_gen_pub_keyFunction · 0.68
test_dh_gen_kpFunction · 0.68