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

Function pmd_test_exit

dpdk/app/test-pmd/testpmd.c:3779–3842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3777}
3778
3779void
3780pmd_test_exit(void)
3781{
3782 portid_t pt_id;
3783 unsigned int i;
3784 int ret;
3785
3786 if (test_done == 0)
3787 stop_packet_forwarding();
3788
3789#ifndef RTE_EXEC_ENV_WINDOWS
3790 for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
3791 if (mempools[i]) {
3792 if (mp_alloc_type == MP_ALLOC_ANON)
3793 rte_mempool_mem_iter(mempools[i], dma_unmap_cb,
3794 NULL);
3795 }
3796 }
3797#endif
3798 if (ports != NULL) {
3799 no_link_check = 1;
3800 RTE_ETH_FOREACH_DEV(pt_id) {
3801 printf("\nStopping port %d...\n", pt_id);
3802 fflush(stdout);
3803 stop_port(pt_id);
3804 }
3805 RTE_ETH_FOREACH_DEV(pt_id) {
3806 printf("\nShutting down port %d...\n", pt_id);
3807 fflush(stdout);
3808 close_port(pt_id);
3809 }
3810 }
3811
3812 if (hot_plug) {
3813 ret = rte_dev_event_monitor_stop();
3814 if (ret) {
3815 RTE_LOG(ERR, EAL,
3816 "fail to stop device event monitor.");
3817 return;
3818 }
3819
3820 ret = rte_dev_event_callback_unregister(NULL,
3821 dev_event_callback, NULL);
3822 if (ret < 0) {
3823 RTE_LOG(ERR, EAL,
3824 "fail to unregister device event callback.\n");
3825 return;
3826 }
3827
3828 ret = rte_dev_hotplug_handle_disable();
3829 if (ret) {
3830 RTE_LOG(ERR, EAL,
3831 "fail to disable hotplug handling.\n");
3832 return;
3833 }
3834 }
3835 for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
3836 if (mempools[i])

Callers 1

mainFunction · 0.85

Calls 10

stop_packet_forwardingFunction · 0.85
rte_mempool_mem_iterFunction · 0.85
stop_portFunction · 0.85
close_portFunction · 0.85
mempool_free_mpFunction · 0.85
printfFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected