From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8263C04A6B for ; Thu, 9 May 2019 01:10:21 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4C3E0214AF for ; Thu, 9 May 2019 01:10:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="rDD2P2dH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C3E0214AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=networkplumber.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC24034F0; Thu, 9 May 2019 03:10:19 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 8EA682C2B for ; Thu, 9 May 2019 03:10:18 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id w22so279442pgi.6 for ; Wed, 08 May 2019 18:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IpUiESqG/pmINZmtHGUVCgmlzN42wcygvuPx1cJrFbw=; b=rDD2P2dH+jN306ceuzcBuwjD7GLZGGYXCqSUBGzDyZCISqi3aTMVBRvaXFaiwnVqcs 8hlwo2FaFps7OTLpm+o/dioHKxoLRlu84Ck8q2If+YNXI34bBffuKqkj1ND3PLZnzxV/ /LlptqNSil2Ta8e8gAlGVRKdh2JGKPbDEXDtQPvlEJrxHQbWRSFY7DZmXuaj8wLImGyS P8u5uAjfLfHEI4qtG+gMAa/mnyrHwJSULzE6nCpVG3b5PLej7lRNuXKBkVgkAdQUd4jL BAwL5lFg4dTP9LXSTLhWxE8ZVjJB8eN07MfVakKLXY+esEOgG9dwEN+itxrkgeg59ILp 2vOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IpUiESqG/pmINZmtHGUVCgmlzN42wcygvuPx1cJrFbw=; b=m4c3Me436++agsOAYcXi99UyxcNHqt9KN2UzMCYvQyq0DHUq5ZfUydtL0hR8Ge6hKg haQq76KYRlxeRgTb6j4DNCY9UaEv/Iakc1HmFso3P0xTHGMIZy8ux3dm8XRBanPuy5tG b8nO4jf6MuK1zxt1+k+SfKd2tr6Md4XvGAHRWRP+fdS+JoiV4SFLp1RNKPHtizo7vTy7 bR6BBMax7n7Y71svqb0rVmiS3lH9Ci6ADYeZ/ZS94qF9ftPs7QuDAw7MFVuirwtA8/p5 Rdz4Nbq4qtuqdVhBOX2ls7H1AOWxuP6UuO1pS8pqwvM6UvmVt5aa5YCajUNkVnzRWafb +9zQ== X-Gm-Message-State: APjAAAXUUtxptyF34hXvlmN4X0m/GQe+55eXMPKoG2k+R0C9VccBvG/L y6TBQ/QrMwkdW/Gs+RAleLWMZQ== X-Google-Smtp-Source: APXvYqz4OcOiPYYwjykWDnoionD8KfdcwkF41Fxgsv0zfkdOe3lMXkeR3og+bs8app0rRHUyhYfxeA== X-Received: by 2002:a62:4595:: with SMTP id n21mr1013984pfi.79.1557364217329; Wed, 08 May 2019 18:10:17 -0700 (PDT) Received: from xps13 ([167.220.63.181]) by smtp.gmail.com with ESMTPSA id 10sm486579pgm.0.2019.05.08.18.10.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2019 18:10:17 -0700 (PDT) Date: Wed, 8 May 2019 18:10:14 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: dev@dpdk.org, nhorman@tuxdriver.com, "Richardson, Bruce" Message-ID: <20190508181014.7dde7580@xps13> In-Reply-To: <576fb266-0163-9c4c-261c-2ce3261d7258@ericsson.com> References: <20190424123320.19610-1-mattias.ronnblom@ericsson.com> <20190424123320.19610-2-mattias.ronnblom@ericsson.com> <20190508131239.07e06092@xps13> <576fb266-0163-9c4c-261c-2ce3261d7258@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [RFC v3 1/2] eal: replace libc-based random number generation with LFSR 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" On Wed, 8 May 2019 22:30:00 +0200 Mattias R=C3=B6nnblom wrote: > On 2019-05-08 22:12, Stephen Hemminger wrote: > > On Wed, 24 Apr 2019 14:33:19 +0200 > > Mattias R=C3=B6nnblom wrote: > > =20 > >> diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal= /eal.c > >> index 161399619..d6bf0e89e 100644 > >> --- a/lib/librte_eal/linux/eal/eal.c > >> +++ b/lib/librte_eal/linux/eal/eal.c > >> @@ -1083,8 +1083,6 @@ rte_eal_init(int argc, char **argv) > >> #endif > >> } > >> =20 > >> - rte_srand(rte_rdtsc()); =20 > >=20 > > The current model of seeding with TSC will have problems at scale. > > If a whole rack of machines reboots at the same time because of power c= ycle, > > it would not be surprising if several had the same TSC value. > >=20 > > A better solution would be to use the get_random() system call to get > > seed, the kernel can get entropy from more sources. > > =20 >=20 > Sounds reasonable. >=20 > What version of FreeBSD is DPDK supposed to support? getrandom(2) (and=20 > its cousin getentropy(3)) seem not be available until FreeBSD 12. Linux has had it since 3.17 but you often need a syscall wrapper. Or just read /dev/urandom.