From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id F359FA00E6 for ; Tue, 14 May 2019 11:39:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B546A5B40; Tue, 14 May 2019 11:39:28 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CD3615B26 for ; Tue, 14 May 2019 11:39:26 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2019 02:39:25 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.96]) by fmsmga005.fm.intel.com with SMTP; 14 May 2019 02:39:23 -0700 Received: by (sSMTP sendmail emulation); Tue, 14 May 2019 10:39:22 +0100 Date: Tue, 14 May 2019 10:39:22 +0100 From: Bruce Richardson To: Mattias =?iso-8859-1?Q?R=F6nnblom?= Cc: dev@dpdk.org, nhorman@tuxdriver.com, stephen@networkplumber.org, david.marchand@redhat.com Message-ID: <20190514093922.GB592@bricha3-MOBL.ger.corp.intel.com> References: <20190508181014.7dde7580@xps13> <20190514092046.30808-1-mattias.ronnblom@ericsson.com> <20190514092046.30808-4-mattias.ronnblom@ericsson.com> <2a7eddda-db97-40e3-7f75-43b48807f963@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2a7eddda-db97-40e3-7f75-43b48807f963@ericsson.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH 3/6] eal: improve entropy for initial PRNG seed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190514093922.70lUl78XJLIvoXHdGfkL43xPcP-FcK_kFeLts1UyLAo@z> 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. /Bruce