Re: [PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-10-04 Thread David Marchand
On Mon, Oct 2, 2023 at 2:28 PM Mattias Rönnblom wrote: > > On 2023-09-07 17:24, Stephen Hemminger wrote: > > 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 > > "/../ by an unregistered non-EAL thread /../" > > > use ra

Re: [PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-10-02 Thread Mattias Rönnblom
On 2023-09-07 17:24, Stephen Hemminger wrote: 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 "/../ by an unregistered non-EAL thread /../" use rand_states[RTE_MAX_LCORE] which was never initialized. Fix by using RTE_

RE: [PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-10-02 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Thursday, 7 September 2023 17.25 > > 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 v2 1/2] random: initialize the random state for non-EAL threads

2023-09-07 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