summaryrefslogtreecommitdiff
path: root/examples/server_node_efd
diff options
context:
space:
mode:
authorChengchang Tang <[email protected]>2021-04-15 10:26:03 +0800
committerThomas Monjalon <[email protected]>2021-04-21 20:21:25 +0200
commit10aa375704c148d9e90b5e984066d719f7465357 (patch)
tree72b4012b26203a0251d749f9f77b52f36be1a7ca /examples/server_node_efd
parent027c931be8ab98db070edf48501f5c6226c92008 (diff)
examples: add eal cleanup to examples
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: [email protected] Signed-off-by: Chengchang Tang <[email protected]>
Diffstat (limited to 'examples/server_node_efd')
-rw-r--r--examples/server_node_efd/node/node.c3
-rw-r--r--examples/server_node_efd/server/main.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/examples/server_node_efd/node/node.c b/examples/server_node_efd/node/node.c
index 67a55808bf..e68606e0ca 100644
--- a/examples/server_node_efd/node/node.c
+++ b/examples/server_node_efd/node/node.c
@@ -383,4 +383,7 @@ main(int argc, char *argv[])
need_flush = 1;
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
}
diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c
index 4728960eaf..39b7b6370f 100644
--- a/examples/server_node_efd/server/main.c
+++ b/examples/server_node_efd/server/main.c
@@ -334,5 +334,9 @@ main(int argc, char *argv[])
rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MAIN);
do_packet_forwarding();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}