Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
random: initialize state for unregistered non-EAL threads
[ upstream commit 3a4e21301c7a8bf709ff9e74d05628f87450a11e ] The per-lcore PRNG was not initializing the rand_state of all the lcores. Any usage of rte_random by an unregistered non-EAL thread would use rand_states[RTE_MAX_LCORE] which was never initialized. Fix by using RTE_DIM() which will get all lcores. Fixes: 3f002f0 ("eal: replace libc-based random generation with LFSR") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
- Loading branch information