examples/helloworld: add eal clean up to the example
PATCH 1/1 examples/helloworld: add eal clean up to the example
From: Chengchang Tang <[email protected]>
According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.
So, we should add the use of clean up to the hello world example to encourage new users of DPDK to use it.
--- examples/helloworld/main.c | 3 +++ 1 file changed, 3 insertions(+)
examples/helloworld/main.c +3 -0
@@ -43,5 +43,8 @@ main(int argc, char **argv)lcore_hello (NULL );rte_eal_mp_wait_lcore (); + +/* clean up the EAL */ +rte_eal_cleanup ();return 0 ; }
Signature · 1 line
2.7.4
Quoted 10 lines · Min Hu (Connor)
From: Chengchang Tang <[email protected]>
According to the programming guide, the
rte_eal_initshould be used pairs withrte_eal_cleanup.So, we should add the use of clean up to the hello world example to encourage new users of DPDK to use it.
Fixes af75078fece3 ("first public release")
rte_eal_cleanup() was introduced with aec9c13c5257 ("eal: add function to release internal resources") from v18.02.
Other examples probably need fixes too.
$ git grep -l rte_eal_init examples/ |xargs grep -L rte_eal_cleanup |wc
52 52 1623Signature · 1 line
David Marchand
Quoted 10 lines · David Marchand
Quoted 9 lines · Min Hu (Connor)
From: Chengchang Tang <[email protected]>
According to the programming guide, the
rte_eal_initshould be used pairs withrte_eal_cleanup.So, we should add the use of clean up to the hello world example to encourage new users of DPDK to use it.
Quoted 9 lines
Quoted 1 line
Fixes af75078fece3 ("first public release")
rte_eal_cleanup()was introduced withaec9c13c5257("eal: add function to release internal resources") from v18.02.Other examples probably need fixes too.
$ git grep -l rte_eal_init examples/ |xargs grep -L rte_eal_cleanup |wc 52 52 1623
Thanks David,
I will fix other examples in next patches.
Quoted 1 line
Quoted 18 lines · Min Hu (Connor)
Quoted 15 lines · David Marchand
Quoted 10 lines · Min Hu (Connor)
From: Chengchang Tang <[email protected]>
According to the programming guide, the
rte_eal_initshould be used pairs withrte_eal_cleanup.So, we should add the use of clean up to the hello world example to encourage new users of DPDK to use it.
Fixes af75078fece3 ("first public release")
rte_eal_cleanup()was introduced withaec9c13c5257("eal: add function to release internal resources") from v18.02.
Quoted 7 lines
Quoted 4 lines
Other examples probably need fixes too.
$ git grep -l rte_eal_init examples/ |xargs grep -L rte_eal_cleanup |wc 52 52 1623Thanks David,
I will fix other examples in next patches.Quoted 1 line
Hi, David and all,
I have sent one set of patches to fix it, the headline is "[PATCH 00/45] add eal clean up to the example" Please review it, thanks.
Quoted 1 line
.