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

Function ut_teardown_ipsec

dpdk/app/test/test_ipsec.c:441–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441static void
442ut_teardown_ipsec(void)
443{
444 struct ipsec_testsuite_params *ts_params = &testsuite_params;
445 struct ipsec_unitest_params *ut_params = &unittest_params;
446 int i;
447
448 for (i = 0; i < BURST_SIZE; i++) {
449 /* free crypto operation structure */
450 if (ut_params->cop[i]) {
451 rte_crypto_op_free(ut_params->cop[i]);
452 ut_params->cop[i] = NULL;
453 }
454
455 /*
456 * free mbuf - both obuf and ibuf are usually the same,
457 * so check if they point at the same address is necessary,
458 * to avoid freeing the mbuf twice.
459 */
460 if (ut_params->obuf[i]) {
461 rte_pktmbuf_free(ut_params->obuf[i]);
462 if (ut_params->ibuf[i] == ut_params->obuf[i])
463 ut_params->ibuf[i] = NULL;
464 ut_params->obuf[i] = NULL;
465 }
466 if (ut_params->ibuf[i]) {
467 rte_pktmbuf_free(ut_params->ibuf[i]);
468 ut_params->ibuf[i] = NULL;
469 }
470
471 if (ut_params->testbuf[i]) {
472 rte_pktmbuf_free(ut_params->testbuf[i]);
473 ut_params->testbuf[i] = NULL;
474 }
475 }
476
477 if (ts_params->mbuf_pool != NULL)
478 RTE_LOG(DEBUG, USER1, "CRYPTO_MBUFPOOL count %u\n",
479 rte_mempool_avail_count(ts_params->mbuf_pool));
480
481 /* Stop the device */
482 rte_cryptodev_stop(ts_params->valid_dev);
483}
484
485#define IPSEC_MAX_PAD_SIZE UINT8_MAX
486

Callers

nothing calls this directly

Calls 4

rte_crypto_op_freeFunction · 0.85
rte_pktmbuf_freeFunction · 0.85
rte_mempool_avail_countFunction · 0.85
rte_cryptodev_stopFunction · 0.85

Tested by

no test coverage detected