Skip to contentSkip to conversation

add eal clean up to the example

PATCH Superseded Min Hu (Connor) 2 participants 50 messages Apr 14, 2021 – Apr 21, 2021

lore
Share & tools
lore
#1 lore raw

PATCH 1/45 examples/bddev_app: add eal cleanup to bbdev app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/bbdev_app/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/bbdev_app/main.c +3 -0
index 20cfd32..5251db0 100644
@@ -1195,5 +1195,8 @@ main(int argc, char **argv)
 		ret |= rte_eal_wait_lcore(lcore_id);
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return ret;
 }
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/45 examples/bond: add eal cleanup to bond example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/bond/main.c | 4 ++++
 1 file changed, 4 insertions(+)
examples/bond/main.c +4 -0
index 81a6fa9..f48400e 100644
@@ -876,5 +876,9 @@ main(int argc, char *argv[])
 	prompt(NULL);
 
 	rte_delay_ms(100);
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#0 lore raw

cover add eal clean up to the example

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This set of patches add eal clean up to the examples.

Chengchang Tang (45):
examples/bddev_app: add eal cleanup to bbdev app examples/bond: add eal cleanup to bond example examples/cmdline: add eal cleanup to cmdline app examples/distributor: add eal cleanup to distributor app examples/ethtool: add eal cleanup to ethtool examples/fips_validation: add eal cleanup to FIPS example examples/flow_classify: add eal cleanup to flow classify app examples/flow_filtering: add eal cleanup to flow filter app examples/helloworld: add eal cleanup to helloworld example examples/ioat: add eal cleanup to ioat examples examples/ip_fragmentation: add eal cleanup examples/ip_reassembly: add eal cleanup to ip reassembly app examples/ipsec-secgw: add eal cleanup to IPsec sample examples/ipv4_multicast: add eal cleanup to multicast sample examples/kni: add eal cleanup to kni example examples/l2fwd: add eal cleanup to L2 fwd example examples/l2fwd-cat: add eal cleanup to L2 fwd CAT example examples/l2fwd-crypto: add eal cleanup to L2 fwd crypto app examples/l2fwd-event: add eal cleanup to L2 fwd event app examples/l2fwd-jobstats: add eal cleanup examples/l2fwd-keepalive: add eal cleanup to example examples/l3fwd: add eal cleanup to L3 fwd app examples/l3fwd-keepalive: add eal cleanup examples/l3fwd-graph: add eal cleanup to graph based L3 FWD examples/link_status_interrupt: add eal cleanup examples/multi_process: add eal cleanup examples/ntb: add eal cleanup to NTB FWD sample examples/packet_ordering: add eal cleanup examples/performance-thread: add eal cleanup examples/pipeline: add eal cleanup to pipeline example examples/ptpclient: add eal cleanup to ptpclient example examples/qos_meter: add eal cleanup to QOS meter example examples/qos_sched: add eal cleanup examples/rxtx_callbacks: add eal cleanup examples/server_node_efd: add eal cleanup examples/service_cores: add eal cleanup examples/skeleton: add eal cleanup
examples/timer: add eal cleanup to timer example examples/vdpa: add eal cleanup to vDPA example examples/vhost: add eal cleanup to vhost example examples/vhost_blk: add eal cleanup examples/vhost_crypto: add eal cleanup examples/vmdq: add eal cleanup
examples/vmdq_dcb: add eal cleanup examples/vm_power_manager: add eal cleanup

 examples/bbdev_app/main.c                                  | 3 +++
 examples/bond/main.c                                       | 4 ++++
 examples/cmdline/main.c                                    | 3 +++
 examples/distributor/main.c                                | 3 +++
 examples/ethtool/ethtool-app/main.c                        | 3 +++
 examples/fips_validation/main.c                            | 3 +++
 examples/flow_classify/flow_classify.c                     | 3 +++
 examples/flow_filtering/main.c                             | 7 ++++++-
 examples/helloworld/main.c                                 | 4 ++++
 examples/ioat/ioatfwd.c                                    | 3 +++
 examples/ip_fragmentation/main.c                           | 3 +++
 examples/ip_reassembly/main.c                              | 3 +++
 examples/ipsec-secgw/ipsec-secgw.c                         | 3 +++
 examples/ipv4_multicast/main.c                             | 3 +++
 examples/kni/main.c                                        | 3 +++
 examples/l2fwd-cat/l2fwd-cat.c                             | 3 +++
 examples/l2fwd-crypto/main.c                               | 3 +++
 examples/l2fwd-event/main.c                                | 3 +++
 examples/l2fwd-jobstats/main.c                             | 3 +++
 examples/l2fwd-keepalive/main.c                            | 4 ++++
 examples/l2fwd/main.c                                      | 3 +++
 examples/l3fwd-acl/main.c                                  | 3 +++
 examples/l3fwd-graph/main.c                                | 3 +++
 examples/l3fwd/main.c                                      | 4 ++++
 examples/link_status_interrupt/main.c                      | 3 +++
 examples/multi_process/client_server_mp/mp_client/client.c | 3 +++
 examples/multi_process/client_server_mp/mp_server/main.c   | 4 ++++
 examples/multi_process/simple_mp/main.c                    | 4 ++++
 examples/multi_process/symmetric_mp/main.c                 | 3 +++
 examples/ntb/ntb_fwd.c                                     | 3 +++
 examples/packet_ordering/main.c                            | 4 ++++
 examples/performance-thread/l3fwd-thread/main.c            | 3 +++
 examples/performance-thread/pthread_shim/main.c            | 4 ++++
 examples/pipeline/main.c                                   | 3 +++
 examples/ptpclient/ptpclient.c                             | 3 +++
 examples/qos_meter/main.c                                  | 3 +++
 examples/qos_sched/main.c                                  | 3 +++
 examples/rxtx_callbacks/main.c                             | 4 ++++
 examples/server_node_efd/node/node.c                       | 3 +++
 examples/server_node_efd/server/main.c                     | 4 ++++
 examples/service_cores/main.c                              | 3 +++
 examples/skeleton/basicfwd.c                               | 3 +++
 examples/timer/main.c                                      | 3 +++
 examples/vdpa/main.c                                       | 3 +++
 examples/vhost/main.c                                      | 4 +++-
 examples/vhost_blk/vhost_blk.c                             | 3 +++
 examples/vhost_crypto/main.c                               | 3 +++
 examples/vm_power_manager/guest_cli/main.c                 | 3 +++
 examples/vm_power_manager/main.c                           | 3 +++
 examples/vmdq/main.c                                       | 3 +++
 examples/vmdq_dcb/main.c                                   | 3 +++
 51 files changed, 166 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
#15 lore raw

PATCH 15/45 examples/kni: add eal cleanup to kni example

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/kni/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/kni/main.c +3 -0
index fe93b86..beabb3c 100644
@@ -1140,5 +1140,8 @@ main(int argc, char** argv)
 			kni_port_params_array[i] = NULL;
 		}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#12 lore raw

PATCH 12/45 examples/ip_reassembly: add eal cleanup to ip reassembly app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/ip_reassembly/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ip_reassembly/main.c +3 -0
index 954a115..ce8882a 100644
@@ -1201,5 +1201,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#16 lore raw

PATCH 16/45 examples/l2fwd: add eal cleanup to L2 fwd example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/l2fwd/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/l2fwd/main.c +3 -0
index 3377b08..ffb67bb 100644
@@ -903,6 +903,9 @@ main(int argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return ret;
Signature · 1 line
2.7.4
#14 lore raw

PATCH 14/45 examples/ipv4_multicast: add eal cleanup to multicast sample

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/ipv4_multicast/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ipv4_multicast/main.c +3 -0
index e18726a..fd6207a 100644
@@ -805,5 +805,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#8 lore raw

PATCH 8/45 examples/flow_filtering: add eal cleanup to flow filter app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/flow_filtering/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
examples/flow_filtering/main.c +6 -1
index 93523d6..932f49f 100644
@@ -259,5 +259,10 @@ main(int argc, char **argv)
 		rte_exit(EXIT_FAILURE, "error in creating flow");
 	}
 
-	return main_loop();
+	ret = main_loop();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
+	return ret;
 }
Signature · 1 line
2.7.4
#9 lore raw

PATCH 9/45 examples/helloworld: add eal cleanup to helloworld example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/helloworld/main.c | 4 ++++
 1 file changed, 4 insertions(+)
examples/helloworld/main.c +4 -0
index 8a4cee6..ac72145 100644
@@ -43,5 +43,9 @@ 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
#10 lore raw

PATCH 10/45 examples/ioat: add eal cleanup to ioat examples

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
---
 examples/ioat/ioatfwd.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ioat/ioatfwd.c +3 -0
index 6502e45..845301a 100644
@@ -1011,6 +1011,9 @@ main(int argc, char **argv)
 			rte_ring_free(cfg.ports[i].rx_to_tx_ring);
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	printf("Bye...\n");
 	return 0;
 }
Signature · 1 line
2.7.4
#6 lore raw

PATCH 6/45 examples/fips_validation: add eal cleanup to FIPS example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
---
 examples/fips_validation/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/fips_validation/main.c +3 -0
index b73691d..c175fe6 100644
@@ -501,6 +501,9 @@ main(int argc, char *argv[])
 	fips_test_clear();
 	cryptodev_fips_validate_app_uninit();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return ret;
 
 }
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/45 examples/distributor: add eal cleanup to distributor app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/distributor/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/distributor/main.c +3 -0
index caa7c46..1b10296 100644
@@ -932,5 +932,8 @@ main(int argc, char *argv[])
 	rte_free(pd);
 	rte_free(pr);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#13 lore raw

PATCH 13/45 examples/ipsec-secgw: add eal cleanup to IPsec sample

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/ipsec-secgw/ipsec-secgw.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ipsec-secgw/ipsec-secgw.c +3 -0
index 20d69ba..1efcb5e 100644
@@ -3037,6 +3037,9 @@ main(int32_t argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return 0;
Signature · 1 line
2.7.4
#11 lore raw

PATCH 11/45 examples/ip_fragmentation: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/ip_fragmentation/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ip_fragmentation/main.c +3 -0
index 5a96841..77a6a18 100644
@@ -1075,5 +1075,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#5 lore raw

PATCH 5/45 examples/ethtool: add eal cleanup to ethtool

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/ethtool/ethtool-app/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ethtool/ethtool-app/main.c +3 -0
index c6023a1..21ed85c 100644
@@ -299,5 +299,8 @@ int main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/45 examples/cmdline: add eal cleanup to cmdline app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/cmdline/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/cmdline/main.c +3 -0
index bb79542..94002f0 100644
@@ -36,5 +36,8 @@ int main(int argc, char **argv)
 	cmdline_interact(cl);
 	cmdline_stdin_exit(cl);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#7 lore raw

PATCH 7/45 examples/flow_classify: add eal cleanup to flow classify app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/flow_classify/flow_classify.c | 3 +++
 1 file changed, 3 insertions(+)
examples/flow_classify/flow_classify.c +3 -0
index 335d7d2..5c3e111 100644
@@ -853,5 +853,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main(cls_app);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#29 lore raw

PATCH 29/45 examples/performance-thread: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/performance-thread/l3fwd-thread/main.c | 3 +++
 examples/performance-thread/pthread_shim/main.c | 4 ++++
 2 files changed, 7 insertions(+)
examples/performance-thread/l3fwd-thread/main.c +3 -0
index b16c19b..2f593ab 100644
@@ -3781,5 +3781,8 @@ main(int argc, char **argv)
 		}
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/performance-thread/pthread_shim/main.c +4 -0
index 23e3b5e..241267f 100644
@@ -258,5 +258,9 @@ int main(int argc, char **argv)
 	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_wait_lcore(lcore_id);
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#28 lore raw

PATCH 28/45 examples/packet_ordering: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/packet_ordering/main.c | 4 ++++
 1 file changed, 4 insertions(+)
examples/packet_ordering/main.c +4 -0
index bcbda05..d2fe9f6 100644
@@ -783,5 +783,9 @@ main(int argc, char **argv)
 	}
 
 	print_stats();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#25 lore raw

PATCH 25/45 examples/link_status_interrupt: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/link_status_interrupt/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/link_status_interrupt/main.c +3 -0
index f1653b4..6cffd5a 100644
@@ -731,5 +731,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#19 lore raw

PATCH 19/45 examples/l2fwd-event: add eal cleanup to L2 fwd event app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
---
 examples/l2fwd-event/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/l2fwd-event/main.c +3 -0
index 444ee4e..0acfee4 100644
@@ -716,6 +716,9 @@ main(int argc, char **argv)
 			printf(" Done\n");
 		}
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return 0;
Signature · 1 line
2.7.4
#27 lore raw

PATCH 27/45 examples/ntb: add eal cleanup to NTB FWD sample

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes c5eebf85badc ("examples/ntb: add example for NTB")
---
 examples/ntb/ntb_fwd.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ntb/ntb_fwd.c +3 -0
index 54b7f08..e9a3887 100644
@@ -1498,5 +1498,8 @@ main(int argc, char **argv)
 		start_pkt_fwd();
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#21 lore raw

PATCH 21/45 examples/l2fwd-keepalive: add eal cleanup to example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/l2fwd-keepalive/main.c | 4 ++++
 1 file changed, 4 insertions(+)
examples/l2fwd-keepalive/main.c +4 -0
index e4c2b27..be66162 100644
@@ -817,5 +817,9 @@ main(int argc, char **argv)
 
 	if (ka_shm != NULL)
 		rte_keepalive_shm_cleanup(ka_shm);
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#23 lore raw

PATCH 23/45 examples/l3fwd-keepalive: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/l3fwd-acl/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/l3fwd-acl/main.c +3 -0
index 4a17274..a1f457b 100644
@@ -2258,5 +2258,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#20 lore raw

PATCH 20/45 examples/l2fwd-jobstats: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/l2fwd-jobstats/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/l2fwd-jobstats/main.c +3 -0
index 1151769..58a7226 100644
@@ -1022,5 +1022,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#24 lore raw

PATCH 24/45 examples/l3fwd-graph: add eal cleanup to graph based L3 FWD

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
---
 examples/l3fwd-graph/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/l3fwd-graph/main.c +3 -0
index 127c5e8..75c2e0e 100644
@@ -1123,6 +1123,9 @@ main(int argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return ret;
Signature · 1 line
2.7.4
#17 lore raw

PATCH 17/45 examples/l2fwd-cat: add eal cleanup to L2 fwd CAT example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/l2fwd-cat/l2fwd-cat.c | 3 +++
 1 file changed, 3 insertions(+)
examples/l2fwd-cat/l2fwd-cat.c +3 -0
index 2e632c5..02288a3 100644
@@ -201,5 +201,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#18 lore raw

PATCH 18/45 examples/l2fwd-crypto: add eal cleanup to L2 fwd crypto app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/l2fwd-crypto/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/l2fwd-crypto/main.c +3 -0
index a96cb94..ba60c1a 100644
@@ -2805,5 +2805,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#26 lore raw

PATCH 26/45 examples/multi_process: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/multi_process/client_server_mp/mp_client/client.c | 3 +++
 examples/multi_process/client_server_mp/mp_server/main.c   | 4 ++++
 examples/multi_process/simple_mp/main.c                    | 4 ++++
 examples/multi_process/symmetric_mp/main.c                 | 3 +++
 4 files changed, 14 insertions(+)
examples/multi_process/client_server_mp/mp_client/client.c +3 -0
index 361d90b..6d4c246 100644
@@ -268,4 +268,7 @@ main(int argc, char *argv[])
 
 		need_flush = 1;
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
examples/multi_process/client_server_mp/mp_server/main.c +4 -0
index b18e12d..9bcee46 100644
@@ -304,5 +304,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;
 }
examples/multi_process/simple_mp/main.c +4 -0
index 109b8bb..a05404f 100644
@@ -121,5 +121,9 @@ main(int argc, char **argv)
 	cmdline_stdin_exit(cl);
 
 	rte_eal_mp_wait_lcore();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/multi_process/symmetric_mp/main.c +3 -0
index ae7f5e0..79e5c61 100644
@@ -472,5 +472,8 @@ main(int argc, char **argv)
 
 	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MAIN);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#22 lore raw

PATCH 22/45 examples/l3fwd: add eal cleanup to L3 fwd app

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/l3fwd/main.c | 4 ++++
 1 file changed, 4 insertions(+)
examples/l3fwd/main.c +4 -0
index bb49e5f..ee156d1 100644
@@ -1315,6 +1315,10 @@ main(int argc, char **argv)
 			printf(" Done\n");
 		}
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	printf("Bye...\n");
 
 	return ret;
Signature · 1 line
2.7.4
#37 lore raw

PATCH 37/45 examples/skeleton: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/skeleton/basicfwd.c | 3 +++
 1 file changed, 3 insertions(+)
examples/skeleton/basicfwd.c +3 -0
index 4b2b6ab..a31b288 100644
@@ -205,5 +205,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#41 lore raw

PATCH 41/45 examples/vhost_blk: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
---
 examples/vhost_blk/vhost_blk.c | 3 +++
 1 file changed, 3 insertions(+)
examples/vhost_blk/vhost_blk.c +3 -0
index 5c64071..5209da3 100644
@@ -906,5 +906,8 @@ int main(int argc, char *argv[])
 	while (1)
 		sleep(1);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#42 lore raw

PATCH 42/45 examples/vhost_crypto: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")
---
 examples/vhost_crypto/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/vhost_crypto/main.c +3 -0
index 7ed38fe..dea7dcb 100644
@@ -469,6 +469,9 @@ free_resource(void)
 	}
 
 	memset(&options, 0, sizeof(options));
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
 
 int
Signature · 1 line
2.7.4
#40 lore raw

PATCH 40/45 examples/vhost: add eal cleanup to vhost example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/vhost/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
examples/vhost/main.c +3 -1
index 2ca7d98..ff48ba2 100644
@@ -1781,6 +1781,8 @@ main(int argc, char *argv[])
 	RTE_LCORE_FOREACH_WORKER(lcore_id)
 		rte_eal_wait_lcore(lcore_id);
 
-	return 0;
+	/* clean up the EAL */
+	rte_eal_cleanup();
 
+	return 0;
 }
Signature · 1 line
2.7.4
#35 lore raw

PATCH 35/45 examples/server_node_efd: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/server_node_efd/node/node.c   | 3 +++
 examples/server_node_efd/server/main.c | 4 ++++
 2 files changed, 7 insertions(+)
examples/server_node_efd/node/node.c +3 -0
index 67a5580..e68606e 100644
@@ -383,4 +383,7 @@ main(int argc, char *argv[])
 
 		need_flush = 1;
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
examples/server_node_efd/server/main.c +4 -0
index 4728960..39b7b63 100644
@@ -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;
 }
Signature · 1 line
2.7.4
#34 lore raw

PATCH 34/45 examples/rxtx_callbacks: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/rxtx_callbacks/main.c | 4 ++++
 1 file changed, 4 insertions(+)
examples/rxtx_callbacks/main.c +4 -0
index 35c6c39..b57b2fc 100644
@@ -338,5 +338,9 @@ main(int argc, char *argv[])
 
 	/* call lcore_main on main core only */
 	lcore_main();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#30 lore raw

PATCH 30/45 examples/pipeline: add eal cleanup to pipeline example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes b77f66002812 ("examples/pipeline: add new example application")
---
 examples/pipeline/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/pipeline/main.c +3 -0
index fb57ef3..8ea19f9 100644
@@ -190,4 +190,7 @@ main(int argc, char **argv)
 
 		conn_poll_for_msg(conn);
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
Signature · 1 line
2.7.4
#39 lore raw

PATCH 39/45 examples/vdpa: add eal cleanup to vDPA example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA")
---
 examples/vdpa/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/vdpa/main.c +3 -0
index 97e967b..097a267 100644
@@ -576,5 +576,8 @@ main(int argc, char *argv[])
 		vdpa_sample_quit();
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#32 lore raw

PATCH 32/45 examples/qos_meter: add eal cleanup to QOS meter example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/qos_meter/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/qos_meter/main.c +3 -0
index f2d9c28..6e724f3 100644
@@ -460,5 +460,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#36 lore raw

PATCH 36/45 examples/service_cores: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/service_cores/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/service_cores/main.c +3 -0
index c7c7928..c5753cc 100644
@@ -220,5 +220,8 @@ main(int argc, char **argv)
 			i = 0;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#38 lore raw

PATCH 38/45 examples/timer: add eal cleanup to timer example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/timer/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/timer/main.c +3 -0
index 5a57e48..d67301e 100644
@@ -117,5 +117,8 @@ main(int argc, char **argv)
 	/* call it on main lcore too */
 	(void) lcore_mainloop(NULL);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#31 lore raw

PATCH 31/45 examples/ptpclient: add eal cleanup to ptpclient example

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/ptpclient/ptpclient.c | 3 +++
 1 file changed, 3 insertions(+)
examples/ptpclient/ptpclient.c +3 -0
index 33b297e..af44052 100644
@@ -788,5 +788,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#44 lore raw

PATCH 44/45 examples/vmdq_dcb: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/vmdq_dcb/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/vmdq_dcb/main.c +3 -0
index 1a74364..ba99280 100644
@@ -707,5 +707,8 @@ main(int argc, char *argv[])
 	/* call on main too */
 	(void) lcore_main((void*)i);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#43 lore raw

PATCH 43/45 examples/vmdq: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/vmdq/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/vmdq/main.c +3 -0
index 3cb890f..a19f7db 100644
@@ -659,5 +659,8 @@ main(int argc, char *argv[])
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#45 lore raw

PATCH 45/45 examples/vm_power_manager: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/vm_power_manager/guest_cli/main.c | 3 +++
 examples/vm_power_manager/main.c           | 3 +++
 2 files changed, 6 insertions(+)
examples/vm_power_manager/guest_cli/main.c +3 -0
index 4e17f7f..b8fa65e 100644
@@ -200,5 +200,8 @@ main(int argc, char **argv)
 	}
 	run_cli(NULL);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/vm_power_manager/main.c +3 -0
index 799d7b9..7d5bf68 100644
@@ -468,5 +468,8 @@ main(int argc, char **argv)
 
 	free(ci->cd);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#33 lore raw

PATCH 33/45 examples/qos_sched: add eal cleanup

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This patch add rte_eal_cleanup to this example to encourage new users of DPDK to use it.

Fixes aec9c13c5257 ("eal: add function to release internal resources")
---
 examples/qos_sched/main.c | 3 +++
 1 file changed, 3 insertions(+)
examples/qos_sched/main.c +3 -0
index a6071b9..dc6a17a 100644
@@ -218,5 +218,8 @@ main(int argc, char **argv)
 		}
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#46 lore raw
In reply to Min Hu (Connor)

14/04/2021 04:10, Min Hu (Connor):

Quoted 4 lines

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

This set of patches add eal clean up to the examples.

Thank you

Quoted 1 line

Chengchang Tang (45):

It can be a single patch for all examples.

#48 lore raw

PATCH v2 1/1 examples: add eal cleanup to examples

In reply to Min Hu (Connor)

From: Chengchang Tang <[email protected]>

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")
---
 examples/bbdev_app/main.c                                  | 3 +++
 examples/bond/main.c                                       | 4 ++++
 examples/cmdline/main.c                                    | 3 +++
 examples/distributor/main.c                                | 3 +++
 examples/ethtool/ethtool-app/main.c                        | 3 +++
 examples/fips_validation/main.c                            | 3 +++
 examples/flow_classify/flow_classify.c                     | 3 +++
 examples/flow_filtering/main.c                             | 7 ++++++-
 examples/helloworld/main.c                                 | 4 ++++
 examples/ioat/ioatfwd.c                                    | 3 +++
 examples/ip_fragmentation/main.c                           | 3 +++
 examples/ip_reassembly/main.c                              | 3 +++
 examples/ipsec-secgw/ipsec-secgw.c                         | 3 +++
 examples/ipv4_multicast/main.c                             | 3 +++
 examples/kni/main.c                                        | 3 +++
 examples/l2fwd-cat/l2fwd-cat.c                             | 3 +++
 examples/l2fwd-crypto/main.c                               | 3 +++
 examples/l2fwd-event/main.c                                | 3 +++
 examples/l2fwd-jobstats/main.c                             | 3 +++
 examples/l2fwd-keepalive/main.c                            | 4 ++++
 examples/l2fwd/main.c                                      | 3 +++
 examples/l3fwd-acl/main.c                                  | 3 +++
 examples/l3fwd-graph/main.c                                | 3 +++
 examples/l3fwd/main.c                                      | 4 ++++
 examples/link_status_interrupt/main.c                      | 3 +++
 examples/multi_process/client_server_mp/mp_client/client.c | 3 +++
 examples/multi_process/client_server_mp/mp_server/main.c   | 4 ++++
 examples/multi_process/simple_mp/main.c                    | 4 ++++
 examples/multi_process/symmetric_mp/main.c                 | 3 +++
 examples/ntb/ntb_fwd.c                                     | 3 +++
 examples/packet_ordering/main.c                            | 4 ++++
 examples/performance-thread/l3fwd-thread/main.c            | 3 +++
 examples/performance-thread/pthread_shim/main.c            | 4 ++++
 examples/pipeline/main.c                                   | 3 +++
 examples/ptpclient/ptpclient.c                             | 3 +++
 examples/qos_meter/main.c                                  | 3 +++
 examples/qos_sched/main.c                                  | 3 +++
 examples/rxtx_callbacks/main.c                             | 4 ++++
 examples/server_node_efd/node/node.c                       | 3 +++
 examples/server_node_efd/server/main.c                     | 4 ++++
 examples/service_cores/main.c                              | 3 +++
 examples/skeleton/basicfwd.c                               | 3 +++
 examples/timer/main.c                                      | 3 +++
 examples/vdpa/main.c                                       | 3 +++
 examples/vhost/main.c                                      | 4 +++-
 examples/vhost_blk/vhost_blk.c                             | 3 +++
 examples/vhost_crypto/main.c                               | 3 +++
 examples/vm_power_manager/guest_cli/main.c                 | 3 +++
 examples/vm_power_manager/main.c                           | 3 +++
 examples/vmdq/main.c                                       | 3 +++
 examples/vmdq_dcb/main.c                                   | 3 +++
 51 files changed, 166 insertions(+), 2 deletions(-)
examples/bbdev_app/main.c +3 -0
index 20cfd32..5251db0 100644
@@ -1195,5 +1195,8 @@ main(int argc, char **argv)
 		ret |= rte_eal_wait_lcore(lcore_id);
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return ret;
 }
examples/bond/main.c +4 -0
index 81a6fa9..f48400e 100644
@@ -876,5 +876,9 @@ main(int argc, char *argv[])
 	prompt(NULL);
 
 	rte_delay_ms(100);
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/cmdline/main.c +3 -0
index bb79542..94002f0 100644
@@ -36,5 +36,8 @@ int main(int argc, char **argv)
 	cmdline_interact(cl);
 	cmdline_stdin_exit(cl);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/distributor/main.c +3 -0
index caa7c46..1b10296 100644
@@ -932,5 +932,8 @@ main(int argc, char *argv[])
 	rte_free(pd);
 	rte_free(pr);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/ethtool/ethtool-app/main.c +3 -0
index c6023a1..21ed85c 100644
@@ -299,5 +299,8 @@ int main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/fips_validation/main.c +3 -0
index b73691d..c175fe6 100644
@@ -501,6 +501,9 @@ main(int argc, char *argv[])
 	fips_test_clear();
 	cryptodev_fips_validate_app_uninit();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return ret;
 
 }
examples/flow_classify/flow_classify.c +3 -0
index 335d7d2..5c3e111 100644
@@ -853,5 +853,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main(cls_app);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/flow_filtering/main.c +6 -1
index 93523d6..932f49f 100644
@@ -259,5 +259,10 @@ main(int argc, char **argv)
 		rte_exit(EXIT_FAILURE, "error in creating flow");
 	}
 
-	return main_loop();
+	ret = main_loop();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
+	return ret;
 }
examples/helloworld/main.c +4 -0
index 8a4cee6..ac72145 100644
@@ -43,5 +43,9 @@ main(int argc, char **argv)
 	lcore_hello(NULL);
 
 	rte_eal_mp_wait_lcore();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/ioat/ioatfwd.c +3 -0
index 6502e45..845301a 100644
@@ -1011,6 +1011,9 @@ main(int argc, char **argv)
 			rte_ring_free(cfg.ports[i].rx_to_tx_ring);
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	printf("Bye...\n");
 	return 0;
 }
examples/ip_fragmentation/main.c +3 -0
index 5a96841..77a6a18 100644
@@ -1075,5 +1075,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/ip_reassembly/main.c +3 -0
index 954a115..ce8882a 100644
@@ -1201,5 +1201,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/ipsec-secgw/ipsec-secgw.c +3 -0
index 20d69ba..1efcb5e 100644
@@ -3037,6 +3037,9 @@ main(int32_t argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return 0;
examples/ipv4_multicast/main.c +3 -0
index e18726a..fd6207a 100644
@@ -805,5 +805,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/kni/main.c +3 -0
index fe93b86..beabb3c 100644
@@ -1140,5 +1140,8 @@ main(int argc, char** argv)
 			kni_port_params_array[i] = NULL;
 		}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/l2fwd-cat/l2fwd-cat.c +3 -0
index 2e632c5..02288a3 100644
@@ -201,5 +201,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/l2fwd-crypto/main.c +3 -0
index a96cb94..ba60c1a 100644
@@ -2805,5 +2805,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/l2fwd-event/main.c +3 -0
index 444ee4e..0acfee4 100644
@@ -716,6 +716,9 @@ main(int argc, char **argv)
 			printf(" Done\n");
 		}
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return 0;
examples/l2fwd-jobstats/main.c +3 -0
index 1151769..58a7226 100644
@@ -1022,5 +1022,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/l2fwd-keepalive/main.c +4 -0
index e4c2b27..be66162 100644
@@ -817,5 +817,9 @@ main(int argc, char **argv)
 
 	if (ka_shm != NULL)
 		rte_keepalive_shm_cleanup(ka_shm);
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/l2fwd/main.c +3 -0
index 3377b08..ffb67bb 100644
@@ -903,6 +903,9 @@ main(int argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return ret;
examples/l3fwd-acl/main.c +3 -0
index 4a17274..a1f457b 100644
@@ -2258,5 +2258,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/l3fwd-graph/main.c +3 -0
index 127c5e8..75c2e0e 100644
@@ -1123,6 +1123,9 @@ main(int argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return ret;
examples/l3fwd/main.c +4 -0
index bb49e5f..ee156d1 100644
@@ -1315,6 +1315,10 @@ main(int argc, char **argv)
 			printf(" Done\n");
 		}
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	printf("Bye...\n");
 
 	return ret;
examples/link_status_interrupt/main.c +3 -0
index f1653b4..6cffd5a 100644
@@ -731,5 +731,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/multi_process/client_server_mp/mp_client/client.c +3 -0
index 361d90b..6d4c246 100644
@@ -268,4 +268,7 @@ main(int argc, char *argv[])
 
 		need_flush = 1;
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
examples/multi_process/client_server_mp/mp_server/main.c +4 -0
index b18e12d..9bcee46 100644
@@ -304,5 +304,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;
 }
examples/multi_process/simple_mp/main.c +4 -0
index 109b8bb..a05404f 100644
@@ -121,5 +121,9 @@ main(int argc, char **argv)
 	cmdline_stdin_exit(cl);
 
 	rte_eal_mp_wait_lcore();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/multi_process/symmetric_mp/main.c +3 -0
index ae7f5e0..79e5c61 100644
@@ -472,5 +472,8 @@ main(int argc, char **argv)
 
 	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MAIN);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/ntb/ntb_fwd.c +3 -0
index 54b7f08..e9a3887 100644
@@ -1498,5 +1498,8 @@ main(int argc, char **argv)
 		start_pkt_fwd();
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/packet_ordering/main.c +4 -0
index bcbda05..d2fe9f6 100644
@@ -783,5 +783,9 @@ main(int argc, char **argv)
 	}
 
 	print_stats();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/performance-thread/l3fwd-thread/main.c +3 -0
index b16c19b..2f593ab 100644
@@ -3781,5 +3781,8 @@ main(int argc, char **argv)
 		}
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/performance-thread/pthread_shim/main.c +4 -0
index 23e3b5e..241267f 100644
@@ -258,5 +258,9 @@ int main(int argc, char **argv)
 	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_wait_lcore(lcore_id);
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/pipeline/main.c +3 -0
index fb57ef3..8ea19f9 100644
@@ -190,4 +190,7 @@ main(int argc, char **argv)
 
 		conn_poll_for_msg(conn);
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
examples/ptpclient/ptpclient.c +3 -0
index 33b297e..af44052 100644
@@ -788,5 +788,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/qos_meter/main.c +3 -0
index f2d9c28..6e724f3 100644
@@ -460,5 +460,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/qos_sched/main.c +3 -0
index a6071b9..dc6a17a 100644
@@ -218,5 +218,8 @@ main(int argc, char **argv)
 		}
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/rxtx_callbacks/main.c +4 -0
index 35c6c39..b57b2fc 100644
@@ -338,5 +338,9 @@ main(int argc, char *argv[])
 
 	/* call lcore_main on main core only */
 	lcore_main();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/server_node_efd/node/node.c +3 -0
index 67a5580..e68606e 100644
@@ -383,4 +383,7 @@ main(int argc, char *argv[])
 
 		need_flush = 1;
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
examples/server_node_efd/server/main.c +4 -0
index 4728960..39b7b63 100644
@@ -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;
 }
examples/service_cores/main.c +3 -0
index c7c7928..c5753cc 100644
@@ -220,5 +220,8 @@ main(int argc, char **argv)
 			i = 0;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/skeleton/basicfwd.c +3 -0
index 4b2b6ab..a31b288 100644
@@ -205,5 +205,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/timer/main.c +3 -0
index 5a57e48..d67301e 100644
@@ -117,5 +117,8 @@ main(int argc, char **argv)
 	/* call it on main lcore too */
 	(void) lcore_mainloop(NULL);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/vdpa/main.c +3 -0
index 97e967b..097a267 100644
@@ -576,5 +576,8 @@ main(int argc, char *argv[])
 		vdpa_sample_quit();
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/vhost/main.c +3 -1
index 2ca7d98..ff48ba2 100644
@@ -1781,6 +1781,8 @@ main(int argc, char *argv[])
 	RTE_LCORE_FOREACH_WORKER(lcore_id)
 		rte_eal_wait_lcore(lcore_id);
 
-	return 0;
+	/* clean up the EAL */
+	rte_eal_cleanup();
 
+	return 0;
 }
examples/vhost_blk/vhost_blk.c +3 -0
index 5c64071..5209da3 100644
@@ -906,5 +906,8 @@ int main(int argc, char *argv[])
 	while (1)
 		sleep(1);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/vhost_crypto/main.c +3 -0
index 7ed38fe..dea7dcb 100644
@@ -469,6 +469,9 @@ free_resource(void)
 	}
 
 	memset(&options, 0, sizeof(options));
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
 
 int
examples/vm_power_manager/guest_cli/main.c +3 -0
index 4e17f7f..b8fa65e 100644
@@ -200,5 +200,8 @@ main(int argc, char **argv)
 	}
 	run_cli(NULL);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/vm_power_manager/main.c +3 -0
index 799d7b9..7d5bf68 100644
@@ -468,5 +468,8 @@ main(int argc, char **argv)
 
 	free(ci->cd);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/vmdq/main.c +3 -0
index 3cb890f..a19f7db 100644
@@ -659,5 +659,8 @@ main(int argc, char *argv[])
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
examples/vmdq_dcb/main.c +3 -0
index 1a74364..ba99280 100644
@@ -707,5 +707,8 @@ main(int argc, char *argv[])
 	/* call on main too */
 	(void) lcore_main((void*)i);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
Signature · 1 line
2.7.4
#47 lore raw
In reply to Thomas Monjalon
Quoted 4 lines · Thomas Monjalon

14/04/2021 04:10, Min Hu (Connor):

Quoted 3 lines

According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.

Quoted 8 lines
Quoted 1 line

This set of patches add eal clean up to the examples.

Thank you

Quoted 1 line

Chengchang Tang (45):

It can be a single patch for all examples.

Well, merge to a single patch in v2, please check it, thanks.

Quoted 3 lines

.

#49 lore raw

Re: [dpdk-dev] [PATCH v2] examples: add eal cleanup to examples

In reply to Min Hu (Connor)

15/04/2021 04:26, Min Hu (Connor):

Quoted 20 lines

From: Chengchang Tang <[email protected]>

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")
Quoted 1 line

Applied, thanks