Re: [dpdk-dev] [PATCH v4 2/2] eal: emulate glibc getentropy for initial random seed

2020-06-29 Thread Mattias Rönnblom
On 2020-06-29 19:57, Dan Gora wrote: > On Mon, Jun 29, 2020 at 6:30 AM Mattias Rönnblom > wrote: >> On 2020-04-23 01:42, Dan Gora wrote: >>> The getentropy() function was introduced into glibc v2.25 and so is >>> not available on all supported platforms. Previously, if DPDK was >>> compiled (usin

Re: [dpdk-dev] [PATCH v4 2/2] eal: emulate glibc getentropy for initial random seed

2020-06-29 Thread Dan Gora
On Mon, Jun 29, 2020 at 6:30 AM Mattias Rönnblom wrote: > > On 2020-04-23 01:42, Dan Gora wrote: > > The getentropy() function was introduced into glibc v2.25 and so is > > not available on all supported platforms. Previously, if DPDK was > > compiled (using meson) on a system which has getentrop

Re: [dpdk-dev] [PATCH v4 2/2] eal: emulate glibc getentropy for initial random seed

2020-06-29 Thread Mattias Rönnblom
On 2020-04-23 01:42, Dan Gora wrote: > The getentropy() function was introduced into glibc v2.25 and so is > not available on all supported platforms. Previously, if DPDK was > compiled (using meson) on a system which has getentropy(), it would > introduce a dependency on glibc v2.25 which would p

Re: [dpdk-dev] [PATCH v4 2/2] eal: emulate glibc getentropy for initial random seed

2020-04-23 Thread Dan Gora
On Wed, Apr 22, 2020 at 11:39 PM Stephen Hemminger wrote: > > On Wed, 22 Apr 2020 20:42:54 -0300 > Dan Gora wrote: > > > + fd = open("/dev/urandom", O_RDONLY); > > + if (fd < 0) { > > + errno = ENODEV; > > + return -1; > > + } > > + > > + end = start + leng

Re: [dpdk-dev] [PATCH v4 2/2] eal: emulate glibc getentropy for initial random seed

2020-04-22 Thread Stephen Hemminger
On Wed, 22 Apr 2020 20:42:54 -0300 Dan Gora wrote: > + fd = open("/dev/urandom", O_RDONLY); > + if (fd < 0) { > + errno = ENODEV; > + return -1; > + } > + > + end = start + length; > + while (start < end) { > + bytes = read(fd, start, end -