On Fri, 8 Sep 2023 22:48:54 +0200
Mattias Rönnblom <hof...@lysator.liu.se> wrote:

> On 2023-09-07 17:24, Stephen Hemminger wrote:
> > Add missing locking so that if two non-EAL threads call rte_rand()
> > they will not corrupt the per-thread state.
> > 
> > Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") 
> >  
> 
> The API documentation clearly states that no MT safety guarantees are 
> given for unregistered non-EAL threads. So this patch doesn't fix anything.
> 
> rte_rand() is MT safe for *registered* non-EAL threads.

Reading the documentation, it only guarantees safety if registered.
We should add an otherwise clause rather than leaving case as undefined.

Reply via email to