From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08D36426A3 for ; Mon, 2 Oct 2023 14:22:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F37A6402DA; Mon, 2 Oct 2023 14:22:30 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id E2B414003C; Mon, 2 Oct 2023 14:22:28 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 45AE7180C3; Mon, 2 Oct 2023 14:22:28 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 238B4180C2; Mon, 2 Oct 2023 14:22:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED, AWL, NICE_REPLY_A autolearn=disabled version=3.4.6 X-Spam-Score: -2.7 Received: from [192.168.1.59] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 2219517C69; Mon, 2 Oct 2023 14:22:26 +0200 (CEST) Message-ID: <8a5d69fc-0016-b52f-e7ac-69e221cf5e26@lysator.liu.se> Date: Mon, 2 Oct 2023 14:22:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads To: David Marchand , Anatoly Burakov , =?UTF-8?Q?Mattias_R=c3=b6nnblom?= , Stephen Hemminger Cc: dev@dpdk.org, Bruce Richardson , stable@dpdk.org, =?UTF-8?Q?Morten_Br=c3=b8rup?= References: <366f5750e01894c56d5d486c75d312e85c404277.1693224396.git.anatoly.burakov@intel.com> Content-Language: en-US From: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 On 2023-10-02 10:25, David Marchand wrote: > Hello guys, > > On Mon, Aug 28, 2023 at 2:07 PM Anatoly Burakov > wrote: >> >> Currently, the rte_rand() state is initialized with seed, and each >> rand state is initialized up until RTE_MAX_LCORE'th rand state. However, >> rand state also has one extra rand state reserved for non-EAL threads, >> which is not initialized. Fix it by initializing this extra state. >> >> Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR") >> Cc: mattias.ronnblom@ericsson.com >> Cc: stable@dpdk.org >> >> Signed-off-by: Anatoly Burakov > > We have two series for fixing related issues. > > Stephen alternative patch 1 handles Anatoly fix here. > https://patchwork.dpdk.org/project/dpdk/list/?series=29449&state=%2A&archive=both > > I see Anatoly was acked by Mattias and Morten, though Stephen > (RTE_DIM) fix is more elegant. Stephen hadn't posted his fix when I acked this, I believe. RTE_DIM() makes the thing more readable. I'm fine with either "RTE_MAX_LCORE + 1" or "RTE_DIM()", but I would prefer the latter. > How do you guys want me to proceed? > > > Thanks.