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 3A52A426CE; Fri, 6 Oct 2023 11:13:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0692402A8; Fri, 6 Oct 2023 11:13:31 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3850A4014F for ; Fri, 6 Oct 2023 11:13:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696583609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VJFnrIzXy75LAGyMKgbzOVvFS7sd8aVIoENwj+AIHx0=; b=EuAz80bvbm2jE3DXboihD2DStgxAb3vpNB7o1bo3xRpI3pyw2uZooaUsNSzUbGcUaLVuZO bpy+HuDjbtwo2TPhTL6BU8eHg7M+42NrvuRg7yZFkX5ModbpuzjvSxAxhnYq3uTttFElmm ZO3Zeg3TrymhOwsWlQwRtSEdVPJ9lLk= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-248-JVWLdGFUPyqsxaBu1ETd1g-1; Fri, 06 Oct 2023 05:13:22 -0400 X-MC-Unique: JVWLdGFUPyqsxaBu1ETd1g-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2c2c4358880so16831781fa.1 for ; Fri, 06 Oct 2023 02:13:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696583601; x=1697188401; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VJFnrIzXy75LAGyMKgbzOVvFS7sd8aVIoENwj+AIHx0=; b=fuFv/hgsVq8FtYlfFFQdUiDr4yHSkBnS4QCzpsJSI7nzDt8H/+mwVtB5AQlNdusK+N sFF6tAlSsd8PmuguCLnjmJ3iD5uzy1pTBegT5VnwGSblMaN2c5PMtlGIm3Fq9wbX3XgO d8nJejY2scjAPOVthBK3+EH2CNyMRs6dIU57mEdLldOAJPwBJYQe7ey0MsR1u2GcMeXM eJYVetVgTsAK4Wksd9LXvlXegqyP0mlgEVYUs4yig2CPoffeHBbqcleiJJ/P95zEEQkC uJd9gZFoj4YGb3+WqqyaS1gSCmj1X/WdRY8MRZGl5GiMIW/Xu70hk8/DfBrAuxFPkgnM KX7A== X-Gm-Message-State: AOJu0YwMULULEkyQNbQw+g/Q/WQSxJvA0Z97mzRyz1tFu0VWSzPewEFe MDGhVodDo16KXGvL7Ge//vuE1jzz1Diosmizo2xlpifKv//rjEWjTRjvu+WQqoMlcfS6SwrdlSB ZuONKV+Fs0kmaku+RtGE= X-Received: by 2002:a2e:9888:0:b0:2bc:d8cb:5a13 with SMTP id b8-20020a2e9888000000b002bcd8cb5a13mr7209211ljj.42.1696583601457; Fri, 06 Oct 2023 02:13:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3u3yo+InV54fwYivOXNamjxDuNoIBHONk4CkMCRO47skodk+WsIumxkx78jecziN65ZnUl3zrPYphAfrR0G8= X-Received: by 2002:a2e:9888:0:b0:2bc:d8cb:5a13 with SMTP id b8-20020a2e9888000000b002bcd8cb5a13mr7209195ljj.42.1696583601143; Fri, 06 Oct 2023 02:13:21 -0700 (PDT) MIME-Version: 1.0 References: <20231004105449.367667-1-mattias.ronnblom@ericsson.com> In-Reply-To: <20231004105449.367667-1-mattias.ronnblom@ericsson.com> From: David Marchand Date: Fri, 6 Oct 2023 11:13:09 +0200 Message-ID: Subject: Re: [PATCH] random: clarify PRNG MT safety guarantees To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: dev@dpdk.org, hofors@lysator.liu.se, Stephen Hemminger , =?UTF-8?Q?Morten_Br=C3=B8rup?= X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Oct 4, 2023 at 1:00=E2=80=AFPM Mattias R=C3=B6nnblom wrote: > > Clarify MT safety guarantees for unregistered non-EAL threads calling > PRNG functions in rte_random.h. > > Clarify that rte_srand() is not MT safe in regards to calls to > rte_rand_max() and rte_drand(). > > Suggested-by: Stephen Hemminger > Signed-off-by: Mattias R=C3=B6nnblom Should it be backported along 3a4e21301c7a ("random: initialize state for unregistered non-EAL threads") ? --=20 David Marchand