According to the programming guide, the rte_eal_init should be used pairs
with rte_eal_cleanup.
This patch add rte_eal_cleanup to examples to encourage new users of
DPDK to use it.
Fixes:
aec9c13c5257 ("eal: add function to release internal resources")
Fixes:
3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
Fixes:
c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Fixes:
4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Fixes:
08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes:
c5eebf85badc ("examples/ntb: add example for NTB")
Fixes:
b77f66002812 ("examples/pipeline: add new example application")
Fixes:
edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA")
Fixes:
c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Fixes:
f5188211c721 ("examples/vhost_crypto: add sample application")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
ret |= rte_eal_wait_lcore(lcore_id);
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return ret;
}
prompt(NULL);
rte_delay_ms(100);
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
cmdline_interact(cl);
cmdline_stdin_exit(cl);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
rte_free(pd);
rte_free(pr);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
fips_test_clear();
cryptodev_fips_validate_app_uninit();
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return ret;
}
/* Call lcore_main on the main core only. */
lcore_main(cls_app);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
rte_exit(EXIT_FAILURE, "error in creating flow");
}
- return main_loop();
+ ret = main_loop();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
+ return ret;
}
lcore_hello(NULL);
rte_eal_mp_wait_lcore();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
rte_ring_free(cfg.ports[i].rx_to_tx_ring);
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
printf("Bye...\n");
return 0;
}
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
rte_eth_dev_close(portid);
printf(" Done\n");
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
printf("Bye...\n");
return 0;
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
kni_port_params_array[i] = NULL;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
/* Call lcore_main on the main core only. */
lcore_main();
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
printf(" Done\n");
}
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
printf("Bye...\n");
return 0;
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
if (ka_shm != NULL)
rte_keepalive_shm_cleanup(ka_shm);
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
rte_eth_dev_close(portid);
printf(" Done\n");
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
printf("Bye...\n");
return ret;
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
rte_eth_dev_close(portid);
printf(" Done\n");
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
printf("Bye...\n");
return ret;
printf(" Done\n");
}
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
printf("Bye...\n");
return ret;
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
need_flush = 1;
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
}
rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MAIN);
do_packet_forwarding();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
cmdline_stdin_exit(cl);
rte_eal_mp_wait_lcore();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MAIN);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
start_pkt_fwd();
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
}
print_stats();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
}
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
RTE_LCORE_FOREACH_WORKER(lcore_id) {
rte_eal_wait_lcore(lcore_id);
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
conn_poll_for_msg(conn);
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
}
/* Call lcore_main on the main core only. */
lcore_main();
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
}
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
/* call lcore_main on main core only */
lcore_main();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
need_flush = 1;
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
}
rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MAIN);
do_packet_forwarding();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
i = 0;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
/* Call lcore_main on the main core only. */
lcore_main();
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
/* call it on main lcore too */
(void) lcore_mainloop(NULL);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
vdpa_sample_quit();
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
RTE_LCORE_FOREACH_WORKER(lcore_id)
rte_eal_wait_lcore(lcore_id);
- return 0;
+ /* clean up the EAL */
+ rte_eal_cleanup();
+ return 0;
}
while (1)
sleep(1);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
}
memset(&options, 0, sizeof(options));
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
}
int
}
run_cli(NULL);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
free(ci->cd);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}
/* call on main too */
(void) lcore_main((void*)i);
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}