[dpdk-dev] [PATCH 3/6] eal: improve entropy for initial PRNG seed

Mattias Rönnblom mattias.ronnblom at ericsson.com
Tue May 14 13:58:29 CEST 2019


On 2019-05-14 11:39, Bruce Richardson wrote:
> On Tue, May 14, 2019 at 11:36:49AM +0200, Mattias Rönnblom wrote:
>> On 2019-05-14 11:20, Mattias Rönnblom wrote:
>>> Replace the use of rte_get_timer_cycles() with getentropy() for
>>> seeding the pseudo-random number generator. getentropy() provides a
>>> more truly random value.
>>>
>>
>> getentropy() doens't exist in libc versions earler than 2.25, and it also
>> (like Stephen mentioned) requires the getrandom() syscall not available
>> until Linux 3.17.
>>
>> If this is deemed too much of a limitation, I'll change to
>> /dev/urandom-based seeding.
> 
> Since we are shifting over to meson builds more and more, I'd suggest just
> using function detection there with a very basic fallback (e.g. your
> time-based one) for cases where the function is not supported.
> 

OK, fixed. Thanks.

Would it be OK to always use the rdtsc fallback w/ make-based builds?


More information about the dev mailing list