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 03C12A0093; Sat, 21 May 2022 11:49:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1FA940156; Sat, 21 May 2022 11:49:50 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id F3C2640040; Sat, 21 May 2022 11:49:48 +0200 (CEST) Content-class: urn:content-classes:message Subject: RE: [PATCH 04/12] net/ena: fix build with GCC 12 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Sat, 21 May 2022 11:49:47 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87093@smartserver.smartshare.dk> In-Reply-To: <20220520132807.57005bc1@hermes.local> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH 04/12] net/ena: fix build with GCC 12 Thread-Index: AdhsiCJCsYmpvI6QT0+B+mTGRAGX+wAbvY6g References: <20220518101657.1230416-1-david.marchand@redhat.com> <20220518101657.1230416-5-david.marchand@redhat.com> <20220520132807.57005bc1@hermes.local> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Stephen Hemminger" , "David Marchand" Cc: , , , , "Marcin Wojtas" , "Michal Krawczyk" , "Shai Brandes" , "Evgeny Schemeilin" , "Igor Chauskin" 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 > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, 20 May 2022 22.28 >=20 > On Wed, 18 May 2022 12:16:49 +0200 > David Marchand wrote: >=20 > > + for (i =3D 0; i < RTE_DIM(default_key); ++i) > > default_key[i] =3D rte_rand() & 0xff; >=20 > We should have rte_random_bytes() functionality if this gets > used often. Since the other pseudorandom functions are called rand, such a function = should be named rte_rand_bytes(). >=20 > Also, worth considering dropping DPDK random number generator > in userspace for security reasons and just using more secure kernel > code. Absolutely not! We need a fast pseudorandom number generator in DPDK. If anything, we could consider renaming the functions and header file to = reflect that they are pseudorandom number generators, and not = (cryptographically) random generators. That would cause an API/ABI = breakage, so it's probably not going to happen. ;-)