[PATCH] Updated skeleton example code to better emit error

Marat Khalili marat.khalili at huawei.com
Wed May 13 18:30:42 CEST 2026


> --- a/examples/skeleton/basicfwd.c
> +++ b/examples/skeleton/basicfwd.c
> @@ -188,11 +188,9 @@ main(int argc, char *argv[])
>  	/* Check that there is an even number of ports to send/receive on. */
>  	nb_ports = rte_eth_dev_count_avail();
>  	if (nb_ports < 2 || (nb_ports & 1))
> -		rte_exit(EXIT_FAILURE, "Error: number of ports must be even\n");
> +		rte_exit(EXIT_FAILURE, "Error: number of ports must be even, found %u ports\n", nb_ports);

Maybe "positive even"?


More information about the dev mailing list