[PATCH] examples/multi_process: fix cleanup on exit

Stephen Hemminger stephen at networkplumber.org
Wed Jul 9 17:01:04 CEST 2025


On Tue, 8 Jul 2025 10:09:54 +0300
Maayan Kashani <mkashani at nvidia.com> wrote:

> +static void
> +exit_cleanup(void)
> +{
> +	unsigned int i;
> +
> +	RTE_LOG(INFO, APP, "Close ports.\n");
> +	for (i = 0; i < num_ports; i++) {
> +		if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> +			if (rte_eth_dev_stop(ports[i]))
> +				rte_exit(EXIT_FAILURE, "Error stopping ports\n");
> +			if (rte_eth_dev_close(ports[i]))
> +				rte_exit(EXIT_FAILURE, "Error closing ports\n");
> +		}
> +	}

Could the ethdev cleanup be integrated into eal_cleanup() so applications
don't have to care?


More information about the dev mailing list