Re: [PATCH] random: initialize the random state for non-eal lcores

2023-09-06 Thread Stephen Hemminger
On Wed, 6 Sep 2023 08:53:02 -0700 Stephen Hemminger wrote: > diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c > b/drivers/common/mlx5/linux/mlx5_common_os.c > index 2ebb8ac8b6e5..7260c1a19fd3 100644 > --- a/drivers/common/mlx5/linux/mlx5_common_os.c > +++ b/drivers/common/mlx5/linux/mlx5

RE: [PATCH] random: initialize the random state for non-eal lcores

2023-09-06 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, 6 September 2023 17.53 > > The per-lcore PRNG was not initializing the rand_state of all > the lcores. Any usage of rte_random by a non-EAL lcore would > use rand_states[RTE_MAX_LCORE] which was never initialized. >

[PATCH] random: initialize the random state for non-eal lcores

2023-09-06 Thread Stephen Hemminger
The per-lcore PRNG was not initializing the rand_state of all the lcores. Any usage of rte_random by a non-EAL lcore would use rand_states[RTE_MAX_LCORE] which was never initialized. Fix by using RTE_DIM() which will get all lcores. Fixes: 3f002f069612 ("eal: replace libc-based random generation