[dpdk-dev] [PATCH v3] eal: refactor rte_eal_init into sub-functions

Stephen Hemminger stephen at networkplumber.org
Fri Jan 19 23:16:48 CET 2024


On Fri, 19 Jan 2024 08:58:17 -0800
Rahul Gupta <rahulgupt at linux.microsoft.com> wrote:

> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 9e4e99e53b..345f3c1c04 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -4531,6 +4531,8 @@ main(int argc, char** argv)
>  	portid_t port_id;
>  	uint16_t count;
>  	int ret;
> +	int lcore_id = 0;
> +	int main_lcore_id = 0;

These do not need to be initialized, there is assignment
before first usage.

There already exists rte_get_main_lcore() please use that


More information about the dev mailing list