[PATCH 1/3] random: defer seeding to EAL init
Burakov, Anatoly
anatoly.burakov at intel.com
Mon Dec 16 10:38:34 CET 2024
On 12/5/2024 6:57 PM, David Marchand wrote:
> The RNG is documented as being seeded as part of EAL init.
>
> /**
> * Seed the pseudo-random generator.
> *
> * The generator is automatically seeded by the EAL init with a timer
> * value. It may need to be re-seeded by the user with a real random
> * value.
> *
> ...
>
> Move the initialisation (seeding) helper out of a constructor and
> call it explicitly from rte_eal_init() as it was done before commit
> 3f002f069612 ("eal: replace libc-based random generation with LFSR").
>
> This also moves the unconditional lcore variable allocation out of a
> constructor.
>
> While at it, mark local symbol rand_state as static.
>
> Fixes: 29c39cd3d54d ("random: keep PRNG state in lcore variable")
> Cc: stable at dpdk.org
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
--
Thanks,
Anatoly
More information about the stable
mailing list