[PATCH v4 8/8] eal: initialize worker threads once
Stephen Hemminger
stephen at networkplumber.org
Tue Aug 15 19:46:35 CEST 2023
On Tue, 15 Aug 2023 10:50:23 -0400
okaya at kernel.org wrote:
> From: Sinan Kaya <okaya at kernel.org>
>
> Initialize worker threads once and keep a flag
> for other init calls.
>
> Signed-off-by: Sinan Kaya <okaya at kernel.org>
> ---
> lib/eal/linux/eal.c | 60 ++++++++++++++++++++++++---------------------
> 1 file changed, 32 insertions(+), 28 deletions(-)
>
> diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
> index 584c78e640..1305e1df54 100644
> --- a/lib/eal/linux/eal.c
> +++ b/lib/eal/linux/eal.c
> @@ -80,6 +80,7 @@ int rte_cycles_vmware_tsc_map;
>
>
> static uint32_t run_once;
> +static bool worker_initialized;
>
I see a pattern here. Many places are using static to
only initialize once. Could you name these variables the
same; suggest using run_once everywhere.
More information about the dev
mailing list