[PATCH] random: clarify PRNG MT safety guarantees

Stephen Hemminger stephen at networkplumber.org
Fri Oct 6 17:58:24 CEST 2023


On Fri, 6 Oct 2023 14:18:25 +0200
Mattias Rönnblom <hofors at lysator.liu.se> wrote:

> On 2023-10-06 11:13, David Marchand wrote:
> > On Wed, Oct 4, 2023 at 1:00 PM Mattias Rönnblom
> > <mattias.ronnblom at ericsson.com> wrote:  
> >>
> >> Clarify MT safety guarantees for unregistered non-EAL threads calling
> >> PRNG functions in rte_random.h.
> >>
> >> Clarify that rte_srand() is not MT safe in regards to calls to
> >> rte_rand_max() and rte_drand().
> >>
> >> Suggested-by: Stephen Hemminger <stephen at networkplumber.org>
> >> Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>  
> > 
> > Should it be backported along 3a4e21301c7a ("random: initialize state
> > for unregistered non-EAL threads") ?
> > 
> >   
> 
> I don't think that's worth the trouble, but if someone has a different 
> opinion, I also don't mind if it is.

Agree. The initialization patch should be backported, but not this one.


More information about the dev mailing list