From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31CFCA0093 for ; Tue, 19 May 2020 15:00:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A66A1D625; Tue, 19 May 2020 15:00:37 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id C03111D621 for ; Tue, 19 May 2020 15:00:35 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id l11so15879205wru.0 for ; Tue, 19 May 2020 06:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FOISwl+XXuUBStSurHPRsZwZbDNJS1haXs7rSCuJBHs=; b=LAc6fvPw3zcVgkTxLoHv0m1GHU61h+fEEstrysi1vrnhbEmqCQ91vok2/svsVxhDy8 jglPyOgVwrOOG0+w4G7GvLcg0uckZPVT3veRYsZFWAULYXmn3EPowiv6lZBL0vm0Fvpn SSYQzJ0AcU/zFD6U1hHvDHnQ+IOYR9WDhMzoENhQg+FU028xi9LEyTcLGmZ0m0MOS80r oq2q2kNtA18Gc23lIWCRoY/P91ef0rYUldDpfmVgsLfcjbyRu5GHN+oLdKbeVJbXfSPv YfSJdV7JD+ZGJ7Y8J5wsWDmFbv03ziOhCbVi6bGiec/nlcLwpUIwLVGeZlu+tz83YhXF 5d9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FOISwl+XXuUBStSurHPRsZwZbDNJS1haXs7rSCuJBHs=; b=H9OwWNtE1LdlIJr4H8B3SYcMB3pRQtUknLL972lTv8Hz2X719uHSWSv8tYbW2huYWq nRhU3IzuXTjoV+EtZT3JUtoYxmTdBzIV+Dc/1UEHHji48IMbttDMjcd2zKAiGGF20XWH eEPSVLycAQW8HmC3ok/qjn+K6gzH1v1GaLNRon96FZZUPwzsFOheLblqrGfal+IiaU8i evkQG4//lBFSTQWxYitFr/ajRR+YyKYqDQLl5QYQNwVXpmzK9FSSFsabkX7k2ECTnOtS kNp15kqEtkhukA77wQxh2Pr2+NMw+7pPnK2c0Ukj8TrIbO6FgYopwQ1MLHHTUt0fdU2c yvWw== X-Gm-Message-State: AOAM532z6k7/3umNHx73bTiRLCmn2ciipTbVwUJsMxfcieHpgF+P7MFB J3VQluK8IQnuJFrWNX6CXHU= X-Google-Smtp-Source: ABdhPJzYM9s758EQhyHQf6rqNXnujDgr9loJXFstcyeCSdh1TbHy67olp7xzq0kYXcsCSkXhNV7YbQ== X-Received: by 2002:adf:9447:: with SMTP id 65mr25945526wrq.331.1589893235526; Tue, 19 May 2020 06:00:35 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id d1sm21447465wrc.26.2020.05.19.06.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:00:35 -0700 (PDT) From: luca.boccassi@gmail.com To: Tonghao Zhang Cc: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , dpdk stable Date: Tue, 19 May 2020 13:54:22 +0100 Message-Id: <20200519125804.104349-72-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519125804.104349-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal: fix PRNG init with HPET enabled' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 952892aa67011669872daf1f07c864444220f7ae Mon Sep 17 00:00:00 2001 From: Tonghao Zhang Date: Thu, 16 Apr 2020 01:41:06 +0800 Subject: [PATCH] eal: fix PRNG init with HPET enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 9b41c276fd35fe3c0ed3fb0d9cf98a83a58b31b2 ] When rte_rand_init is invoked, and the kernel running dpdk does not support *getentropy, at the same time, the cpu does not support rdseed, then rte_rand_init invoked rte_get_timer_cycles. If HPET was enabled in the DPDK build (CONFIG_RTE_LIBEAL_USE_HPET=y) and the system, rte_get_timer_cycles will invoke rte_get_hpet_cycles while *eal_hpet is not available. To fix that, use rte_get_tsc_cycles instead of rte_get_timer_cycles. Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") Signed-off-by: Tonghao Zhang Acked-by: Mattias Rönnblom --- lib/librte_eal/common/rte_random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/rte_random.c b/lib/librte_eal/common/rte_random.c index 57ec8fb2b3..b7a089ac4f 100644 --- a/lib/librte_eal/common/rte_random.c +++ b/lib/librte_eal/common/rte_random.c @@ -198,7 +198,7 @@ __rte_random_initial_seed(void) return (uint64_t)rdseed_low | ((uint64_t)rdseed_high << 32); #endif /* second fallback: seed using rdtsc */ - return rte_get_timer_cycles(); + return rte_get_tsc_cycles(); } RTE_INIT(rte_rand_init) -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 13:56:21.732295905 +0100 +++ 0072-eal-fix-PRNG-init-with-HPET-enabled.patch 2020-05-19 13:56:18.299503260 +0100 @@ -1,4 +1,4 @@ -From 9b41c276fd35fe3c0ed3fb0d9cf98a83a58b31b2 Mon Sep 17 00:00:00 2001 +From 952892aa67011669872daf1f07c864444220f7ae Mon Sep 17 00:00:00 2001 From: Tonghao Zhang Date: Thu, 16 Apr 2020 01:41:06 +0800 Subject: [PATCH] eal: fix PRNG init with HPET enabled @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 9b41c276fd35fe3c0ed3fb0d9cf98a83a58b31b2 ] + When rte_rand_init is invoked, and the kernel running dpdk does not support *getentropy, at the same time, the cpu does not support rdseed, then rte_rand_init invoked rte_get_timer_cycles. @@ -17,7 +19,6 @@ To fix that, use rte_get_tsc_cycles instead of rte_get_timer_cycles. Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") -Cc: stable@dpdk.org Signed-off-by: Tonghao Zhang Acked-by: Mattias Rönnblom