On Mon, 14 Aug 2023 21:38:22 -0400
ok...@kernel.org wrote:

> +     static int initialized = 0;
>       int ret = 0;
>  
> +     if (initialized)
> +             return 0;
> +
>       /* get pointer to global configuration */
>       mcfg = rte_eal_get_configuration()->mem_config;
>  
> @@ -415,6 +419,8 @@ rte_eal_memzone_init(void)
>  
>       rte_rwlock_write_unlock(&mcfg->mlock);
>  
> +     initialized = 1;
> +
>       return ret;
>  }

Use a bool for this.

Reply via email to