History log of /dpdk/app/test/test_rand_perf.c (Results 1 – 4 of 4)
Revision Date Author Comments
# e0a8442c 16-Aug-2023 Bruce Richardson <bruce.richardson@intel.com>

test: tag tests type

Rather than having the test types called out in the meson.build file, we
can use macros to identify the test type in the C file itself and then
dynamically build up the tests li

test: tag tests type

Rather than having the test types called out in the meson.build file, we
can use macros to identify the test type in the C file itself and then
dynamically build up the tests lists at config time.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>

show more ...


# 0cd10724 26-May-2022 Stephen Hemminger <stephen@networkplumber.org>

eal: provide pseudo-random floating point number

The PIE code and other applications can benefit from having a
fast way to get a random floating point value. This new function
is equivalent to drand

eal: provide pseudo-random floating point number

The PIE code and other applications can benefit from having a
fast way to get a random floating point value. This new function
is equivalent to drand() in the standard library.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ray Kinsella <mdr@ashroe.eu>

show more ...


# 5f4ed3f0 28-Jun-2019 Mattias Rönnblom <mattias.ronnblom@ericsson.com>

eal: introduce random generator with upper bound

Add a function rte_rand_max() which generates an uniformly distributed
pseudo-random number less than a user-specified upper bound.

The commonly use

eal: introduce random generator with upper bound

Add a function rte_rand_max() which generates an uniformly distributed
pseudo-random number less than a user-specified upper bound.

The commonly used pattern rte_rand() % SOME_VALUE creates biased
results (as in some values in the range are more frequently occurring
than others) if SOME_VALUE is not a power of 2.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# 3f002f06 28-Jun-2019 Mattias Rönnblom <mattias.ronnblom@ericsson.com>

eal: replace libc-based random generation with LFSR

This commit replaces rte_rand()'s use of lrand48() with a DPDK-native
combined Linear Feedback Shift Register (LFSR) (also known as
Tausworthe) ps

eal: replace libc-based random generation with LFSR

This commit replaces rte_rand()'s use of lrand48() with a DPDK-native
combined Linear Feedback Shift Register (LFSR) (also known as
Tausworthe) pseudo-random number generator.

This generator is faster and produces better-quality random numbers
than the linear congruential generator (LCG) of lib's lrand48(). The
implementation, as opposed to lrand48(), is multi-thread safe in
regards to concurrent rte_rand() calls from different lcore threads.
A LCG is still used, but only to seed the five per-lcore LFSR
sequences.

In addition, this patch also addresses the issue of the legacy
implementation only producing 62 bits of pseudo randomness, while the
API requires all 64 bits to be random.

This pseudo-random number generator is not cryptographically secure -
just like lrand48().

Bugzilla ID: 114
Bugzilla ID: 276

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...