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.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS 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 7BD2DC04A6B for ; Wed, 8 May 2019 20:12:45 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id EC19020989 for ; Wed, 8 May 2019 20:12:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="IPPwUAdz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC19020989 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 4CD2E374C; Wed, 8 May 2019 22:12:44 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id F1D832C2B for ; Wed, 8 May 2019 22:12:42 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id d9so10432222pls.8 for ; Wed, 08 May 2019 13:12:42 -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=xpuprywUGDmrdpIMCgLQeqilPoPssOmQp5mFI5lxItI=; b=IPPwUAdzpS+G2yrTuFtx4/EfuCIHR4AmVmIsWGW0qE2rEI4f1EGvbP7F1a3GqTqFJU +QaGVQ4lOc2EvS538WouD5JJ8/5cXhPPEusMQRxf3UmUIfbmxYI2WQkb2I38HI1+gKf4 hFWNhjO06k71p7/IOEHiijIAAk4si6YuMNYnLLb1ndooc0AOdCqD3YT1RRt0cypJkBdV z+RZQYC1otHSPB1zKFFqU4Jfm/Yl6wwNjx4j4GeXkTSNPxQo2BiAZ/NtiCBBCdPWUHUI VpRIdVQs9pdq/LaHFZLELpD/2Hq+2tSMrahEpmSInOueajO/V3nD3UZxREPpXbOEll6w 8t8Q== 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=xpuprywUGDmrdpIMCgLQeqilPoPssOmQp5mFI5lxItI=; b=F1Y2qypRawKeBn2EMuI1anSpp2wmK3g+wPxtzXV69ruVJ0QDRA/sl+lOWFgxOi6uj1 Y6eIG4pwVfDZZW7Uy9XzxX/X4fkcN7nEj26DzslOLFA2m5Eq79DZhmpD6C42hcCXdByb m8jO245WVX4QudZzBvLR5tQDnCcFPCVInl1fAiby6pZG2JeplM9o3vSfkOHboiTTVb/8 snyjI6tbulh4CpzQ8ouYgqfrVEab65Qp871K1tpvCPSXpGnXyjy8C5z0a5s8uvyCOGwu Lym6+1Y1jiW4bOMn5qlrof5MCW/8/zm65sRSXaAHzNKwYzHgtDpFgUHU9lLIOMt/qrPi O9qQ== X-Gm-Message-State: APjAAAU1TaI6k5gZrYVczNzgKY4X0NNn0vtgnj8GC7Xfv1d28CvYbnsy zD4/CAwcO4JLm+NYeV0worFk8rmc7hY= X-Google-Smtp-Source: APXvYqxCziSYV9kHbyVLl3ozZ+JpPOLD3CBtK3sBYs3tZMCAGUZVqeYUH3ULgwTcDkpH3MS0PvxFug== X-Received: by 2002:a17:902:8203:: with SMTP id x3mr29580914pln.11.1557346362212; Wed, 08 May 2019 13:12:42 -0700 (PDT) Received: from xps13 ([167.220.63.181]) by smtp.gmail.com with ESMTPSA id s85sm115544pfa.23.2019.05.08.13.12.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2019 13:12:42 -0700 (PDT) Date: Wed, 8 May 2019 13:12:39 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , Message-ID: <20190508131239.07e06092@xps13> In-Reply-To: <20190424123320.19610-2-mattias.ronnblom@ericsson.com> References: <20190424123320.19610-1-mattias.ronnblom@ericsson.com> <20190424123320.19610-2-mattias.ronnblom@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, 24 Apr 2019 14:33:19 +0200 Mattias R=C3=B6nnblom wrote: > diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/ea= l.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()); 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 cycle, it would not be surprising if several had the same TSC value. A better solution would be to use the get_random() system call to get seed, the kernel can get entropy from more sources.