From patchwork Thu Sep 7 15:24:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 118 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B7B6842537; Thu, 7 Sep 2023 17:25:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 809A1402B9; Thu, 7 Sep 2023 17:25:10 +0200 (CEST) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id CE81C402B9 for ; Thu, 7 Sep 2023 17:25:08 +0200 (CEST) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-56a3e6bce68so798226a12.1 for ; Thu, 07 Sep 2023 08:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1694100307; x=1694705107; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jnyrBw4j6s3VsCmQwlIj47nu9hsGA9hzZc+y1l/1Ni0=; b=0LAghMo9wklm4mrU/QaL7kWPhWozMzoe/m2Hq1kyAr4yID6DpUUnr/3Esk81HNjgT9 v7eP1EEDFDVeivr9HfDu34D95CG0jY1vQLWOFwRwcnzPHo9e+HjKOE1LzNaS3w+ujwWP byDLuZ+SBuTj0aHXtcnCVACJRGWcC+yDC1QNJEBzg3n2tAEP7L11o7RE6g5nzvKfE0JV MXz4x1zg8N8N1ykMknNupzSvRe71jPa6HHn74wky7EiEbUtOS1RvPwBYX4pjNaw/++Wg CE/Y24+ATtjR1O5Hl5yauGhWoe5KWsYheGXgY7zWiUsMNu2eOKCsyq0Zr1y+URYYcIo5 Lqsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694100307; x=1694705107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jnyrBw4j6s3VsCmQwlIj47nu9hsGA9hzZc+y1l/1Ni0=; b=TNZPUzK0Qz5DmpHP6WWzQGOndKncvv5z+ITVeQYXEs75/EVCzshWVfiWdXALm1PpG7 TO5K0mHKM0OFvHyEFvtZptDwFlcOs/pTkseckFB8sDB1/nQHAuyZs6GLa0k+gCCulE52 xmJX3XnTGt93ingfYKYQu+2mZ1fbjAL6RtIA1bhf1K1WHFuRSdT3sgdPeX2OaM9lLdDO iHfmTx22Hg/hDFIEAzMhOnY5k7eYxTNxAMIdFvA138B6DcFKJ31Z14zPhhlvOWTEeuXm FUquAu6F7d0zqQeOjDNDjqPL26ffllraN2EWY249bQgfWPD+FjbCLzq8ONUze07ZJi2L 95+g== X-Gm-Message-State: AOJu0YzNyYLlEe0S34rPiaCju5cmm4RibXrIWEum2ztAeD34KjUJEuDC 0cRDbr0v+FiMjv1yYRcGvj8yZPlqOfNLRA63zVk= X-Google-Smtp-Source: AGHT+IH7NmCL9wV8GPmpbQI9YwdTAJC1PdvCJ9OB4hL7H05Crzg+NqlPxbxxrebkjaKS2ElvMzzyVw== X-Received: by 2002:a17:90a:4409:b0:26b:1269:d801 with SMTP id s9-20020a17090a440900b0026b1269d801mr15033937pjg.14.1694100307468; Thu, 07 Sep 2023 08:25:07 -0700 (PDT) Received: from hermes.local (204-195-112-131.wavecable.com. [204.195.112.131]) by smtp.gmail.com with ESMTPSA id e2-20020a170902b78200b001aaf2e8b1eesm12864400pls.248.2023.09.07.08.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 08:25:06 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 0/2] fixes to rte_random for non-EAL threads Date: Thu, 7 Sep 2023 08:24:54 -0700 Message-Id: <20230907152456.20570-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230906155302.82749-1-stephen@networkplumber.org> References: <20230906155302.82749-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org While examining the code for rte_random, noticed a couple of existing bugs around use of rte_rand() by non-EAL threads Stephen Hemminger (2): random: initialize the random state for non-EAL threads random: make rte_rand() thread safe for non-EAL threads lib/eal/common/rte_random.c | 56 ++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 19 deletions(-)