[PATCH v1 3/7] eal_memzone: bail out on initialized
Stephen Hemminger
stephen at networkplumber.org
Tue Aug 15 04:22:53 CEST 2023
On Mon, 14 Aug 2023 21:38:22 -0400
okaya at 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.
More information about the dev
mailing list