Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-19 Thread Neil Horman
On Fri, May 17, 2019 at 11:10:25PM +0200, Mattias Rönnblom wrote: > On 2019-05-17 21:27, Neil Horman wrote: > > > > > > diff --git a/lib/librte_eal/common/rte_random.c > > > > > b/lib/librte_eal/common/rte_random.c > > > > > new file mode 100644 > > > > > index 0..4d3cf5226 > > > > > ---

Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-17 Thread Mattias Rönnblom
On 2019-05-17 21:27, Neil Horman wrote: diff --git a/lib/librte_eal/common/rte_random.c b/lib/librte_eal/common/rte_random.c new file mode 100644 index 0..4d3cf5226 --- /dev/null +++ b/lib/librte_eal/common/rte_random.c @@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Cop

Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-17 Thread Bruce Richardson
On Fri, May 17, 2019 at 03:27:25PM -0400, Neil Horman wrote: > On Tue, May 14, 2019 at 04:53:08PM +0200, Mattias Rönnblom wrote: > > On 2019-05-14 16:16, Neil Horman wrote: > > > On Tue, May 14, 2019 at 11:20:41AM +0200, Mattias Rönnblom wrote: > > > > This commit replaces rte_rand()'s use of lrand

Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-17 Thread Neil Horman
On Tue, May 14, 2019 at 04:53:08PM +0200, Mattias Rönnblom wrote: > On 2019-05-14 16:16, Neil Horman wrote: > > On Tue, May 14, 2019 at 11:20:41AM +0200, Mattias Rönnblom wrote: > > > This commit replaces rte_rand()'s use of lrand48() with a DPDK-native > > > combined Linear Feedback Shift Register

Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-14 Thread Stephen Hemminger
On Tue, 14 May 2019 11:20:41 +0200 Mattias Rönnblom wrote: > +RTE_INIT(rte_rand_init) > +{ > + rte_srand(rte_get_timer_cycles()); > +} Please make initialization OS specific and use get_random() on Linux.

Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-14 Thread Mattias Rönnblom
On 2019-05-14 16:16, Neil Horman wrote: On Tue, May 14, 2019 at 11:20:41AM +0200, Mattias Rönnblom wrote: 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 generato

Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-14 Thread Neil Horman
On Tue, May 14, 2019 at 11:20:41AM +0200, Mattias Rönnblom wrote: > 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-q

Re: [dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-14 Thread Mattias Rönnblom
On 2019-05-14 11:20, Mattias Rönnblom wrote: Bugzilla ID: 114 Bugzilla ID: 276 I don't know which, if any, of these bugs you want to address in any stable releases. If fixing bug 276 "rte_rand() bit 31 and 63 are always zero" is enough, then one could either split this patch set in two (w

[dpdk-dev] [PATCH 1/6] eal: replace libc-based random number generation with LFSR

2019-05-14 Thread Mattias Rönnblom
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