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

Function perf_cryptodev_destroy

dpdk/app/test-eventdev/test_perf_common.c:1819–1856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1817}
1818
1819void
1820perf_cryptodev_destroy(struct evt_test *test, struct evt_options *opt)
1821{
1822 uint8_t cdev_id, cdev_count = rte_cryptodev_count();
1823 struct test_perf *t = evt_test_priv(test);
1824 uint16_t port;
1825
1826 if (opt->prod_type != EVT_PROD_TYPE_EVENT_CRYPTO_ADPTR)
1827 return;
1828
1829 for (port = t->nb_workers; port < perf_nb_event_ports(opt); port++) {
1830 void *sess;
1831 struct prod_data *p = &t->prod[port];
1832 uint32_t flow_id;
1833 uint8_t cdev_id;
1834
1835 for (flow_id = 0; flow_id < t->nb_flows; flow_id++) {
1836 sess = p->ca.crypto_sess[flow_id];
1837 cdev_id = p->ca.cdev_id;
1838 rte_cryptodev_sym_session_free(cdev_id, sess);
1839 }
1840
1841 rte_event_crypto_adapter_queue_pair_del(
1842 TEST_PERF_CA_ID, p->ca.cdev_id, p->ca.cdev_qp_id);
1843 }
1844
1845 rte_event_crypto_adapter_free(TEST_PERF_CA_ID);
1846
1847 for (cdev_id = 0; cdev_id < cdev_count; cdev_id++) {
1848 rte_cryptodev_stop(cdev_id);
1849 rte_cryptodev_close(cdev_id);
1850 }
1851
1852 rte_mempool_free(t->ca_op_pool);
1853 rte_mempool_free(t->ca_sess_pool);
1854 rte_mempool_free(t->ca_asym_sess_pool);
1855 rte_mempool_free(t->ca_vector_pool);
1856}
1857
1858int
1859perf_mempool_setup(struct evt_test *test, struct evt_options *opt)

Callers

nothing calls this directly

Calls 9

rte_cryptodev_countFunction · 0.85
evt_test_privFunction · 0.85
perf_nb_event_portsFunction · 0.85
rte_cryptodev_stopFunction · 0.85
rte_cryptodev_closeFunction · 0.85
rte_mempool_freeFunction · 0.85

Tested by

no test coverage detected