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 BE809A00E6 for ; Tue, 14 May 2019 13:58:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5EBFD6CC1; Tue, 14 May 2019 13:58:33 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by dpdk.org (Postfix) with ESMTP id 80DD56833 for ; Tue, 14 May 2019 13:58:32 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 210D64000D for ; Tue, 14 May 2019 13:58:32 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 0D8C740003; Tue, 14 May 2019 13:58:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.1 X-Spam-Score: -0.9 Received: from [192.168.1.59] (host-90-232-127-248.mobileonline.telia.com [90.232.127.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id BFA6540002; Tue, 14 May 2019 13:58:30 +0200 (CEST) To: Bruce Richardson Cc: dev@dpdk.org, nhorman@tuxdriver.com, stephen@networkplumber.org, david.marchand@redhat.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> <20190514093922.GB592@bricha3-MOBL.ger.corp.intel.com> From: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= Message-ID: <1c8f396f-906f-c4d4-fd6f-3ba1b5bf51f2@ericsson.com> Date: Tue, 14 May 2019 13:58:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190514093922.GB592@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP 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: <20190514115829.YHpOgvfNg07g7GFykDucKdcbtQOPS6dmpqlV5vQGAgs@z> 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?