From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sesbmg22.ericsson.net (sesbmg22.ericsson.net [193.180.251.48]) by dpdk.org (Postfix) with ESMTP id 8F5981B9F4 for ; Fri, 19 Apr 2019 23:21:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/relaxed; q=dns/txt; i=@ericsson.com; t=1555708902; x=1558300902; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=T8Rc9NRHJ80xv0BtLMX0StkS+zuRc0Qg0rwvjqJy/xg=; b=StqANBYOU+z89vxEyjbpEyqncowxrx+4AGBHk4i4yCdFvhiYefz7QA2TS3WIuYWd KXAF7v68LrarFBN7TzgC81Pg1Q2/b3oD/XnMZR1E9bv49NuPCrAtO0l8TIvRelx3 Da07glpXNL+yxySm1Pf2qcKVSRCPxARas2qMd5AqFsU=; X-AuditID: c1b4fb30-c49ff70000004449-e8-5cba3be65f56 Received: from ESESSMB505.ericsson.se (Unknown_Domain [153.88.183.123]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id 71.63.17481.6EB3ABC5; Fri, 19 Apr 2019 23:21:42 +0200 (CEST) Received: from ESESBMR503.ericsson.se (153.88.183.135) by ESESSMB505.ericsson.se (153.88.183.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 19 Apr 2019 23:21:41 +0200 Received: from ESESSMB503.ericsson.se (153.88.183.164) by ESESBMR503.ericsson.se (153.88.183.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 19 Apr 2019 23:21:41 +0200 Received: from selio1a020.lmera.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.191) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Fri, 19 Apr 2019 23:21:41 +0200 Received: from breslau.lmera.ericsson.se (breslau.lmera.ericsson.se [150.132.109.241]) by selio1a020.lmera.ericsson.se (8.15.1+Sun/8.15.1) with ESMTP id x3JLLf27022797; Fri, 19 Apr 2019 23:21:41 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Date: Fri, 19 Apr 2019 23:21:36 +0200 Message-ID: <20190419212138.17422-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190408123029.6701-1-mattias.ronnblom@ericsson.com> References: <20190408123029.6701-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsUyM2J7te4z610xBm+XM1q8+7SdyWLxHTkH Jo9fC5ayevScnMcUwBTFZZOSmpNZllqkb5fAlfH1yQK2gm0cFQePn2FsYDzJ1sXIwSEhYCKx +21FFyMXh5DAUUaJBcuOsUI43xgl5h5dzdTFyAnhHJkQCWFfZJS4dcEDougyo8SBD7tZQBJs Ap4Sk991g9kiAkISSz9eZgexmQXSJTae7gQbJCxgLXFq3ho2EJtFQFVi7rW7zCA2r4CTxN3d e8HqJQTkJVZvOAAW5wSKN56+yAyx2FGif/kbFoh6QYmTM5+wQMzXlGjd/htql7xE89bZUPVa EveXfGGewCg8C0nLLCQts5C0LGBkXsUoWpxanJSbbmSkl1qUmVxcnJ+nl5dasokRGN4Ht/w2 2MH48rnjIUYBDkYlHt4etV0xQqyJZcWVuYcYJTiYlUR4HVO2xAjxpiRWVqUW5ccXleakFh9i lOZgURLn/SMkGCMkkJ5YkpqdmlqQWgSTZeLglGpgzN2b8U/Oquqgx5tG0UZbixy/WJcaIa4r 0tovU6V2HJ0uzb1hm1blzTXCZS4hnWwHvBSt0/i/hB2urjZJ8/VxmJ8n0KtXp6S0brnp3MkB E0++mBMfydm/LMB3hf+UQ5NjDJhqC3cHFy65I26z/f4+2y16ev2T+VSju/7NmLMvedrFVMYZ Sg1KLMUZiYZazEXFiQAjsg1XawIAAA== Subject: [dpdk-dev] [RFC v2 0/2] Pseudo-number generation improvements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2019 21:21:42 -0000 Make rte_rand() multi-thread safe, go faster and produce better-quality pseudo-random numbers. v2: * Removed 32-bit version of rte_rand() and rte_rand_max(). * Switched from a four-sequence LFSR (producing a 32-bit number) to a five-sequence LFSR (producing a 64-bit number). * Added a note on generator not being cryptographically secure. Mattias Rönnblom (2): eal: replace libc-based random number generation with LFSR eal: introduce random generator function with upper bound lib/librte_eal/common/include/rte_random.h | 45 +++--- lib/librte_eal/common/meson.build | 1 + lib/librte_eal/common/rte_random.c | 157 +++++++++++++++++++++ lib/librte_eal/freebsd/eal/Makefile | 1 + lib/librte_eal/freebsd/eal/eal.c | 2 - lib/librte_eal/linux/eal/Makefile | 1 + lib/librte_eal/linux/eal/eal.c | 2 - lib/librte_eal/rte_eal_version.map | 3 + 8 files changed, 190 insertions(+), 22 deletions(-) create mode 100644 lib/librte_eal/common/rte_random.c -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BDFABA00E6 for ; Fri, 19 Apr 2019 23:21:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8E4E01BBB4; Fri, 19 Apr 2019 23:21:44 +0200 (CEST) Received: from sesbmg22.ericsson.net (sesbmg22.ericsson.net [193.180.251.48]) by dpdk.org (Postfix) with ESMTP id 8F5981B9F4 for ; Fri, 19 Apr 2019 23:21:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/relaxed; q=dns/txt; i=@ericsson.com; t=1555708902; x=1558300902; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=T8Rc9NRHJ80xv0BtLMX0StkS+zuRc0Qg0rwvjqJy/xg=; b=StqANBYOU+z89vxEyjbpEyqncowxrx+4AGBHk4i4yCdFvhiYefz7QA2TS3WIuYWd KXAF7v68LrarFBN7TzgC81Pg1Q2/b3oD/XnMZR1E9bv49NuPCrAtO0l8TIvRelx3 Da07glpXNL+yxySm1Pf2qcKVSRCPxARas2qMd5AqFsU=; X-AuditID: c1b4fb30-c49ff70000004449-e8-5cba3be65f56 Received: from ESESSMB505.ericsson.se (Unknown_Domain [153.88.183.123]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id 71.63.17481.6EB3ABC5; Fri, 19 Apr 2019 23:21:42 +0200 (CEST) Received: from ESESBMR503.ericsson.se (153.88.183.135) by ESESSMB505.ericsson.se (153.88.183.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 19 Apr 2019 23:21:41 +0200 Received: from ESESSMB503.ericsson.se (153.88.183.164) by ESESBMR503.ericsson.se (153.88.183.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 19 Apr 2019 23:21:41 +0200 Received: from selio1a020.lmera.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.191) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Fri, 19 Apr 2019 23:21:41 +0200 Received: from breslau.lmera.ericsson.se (breslau.lmera.ericsson.se [150.132.109.241]) by selio1a020.lmera.ericsson.se (8.15.1+Sun/8.15.1) with ESMTP id x3JLLf27022797; Fri, 19 Apr 2019 23:21:41 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Date: Fri, 19 Apr 2019 23:21:36 +0200 Message-ID: <20190419212138.17422-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190408123029.6701-1-mattias.ronnblom@ericsson.com> References: <20190408123029.6701-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsUyM2J7te4z610xBm+XM1q8+7SdyWLxHTkH Jo9fC5ayevScnMcUwBTFZZOSmpNZllqkb5fAlfH1yQK2gm0cFQePn2FsYDzJ1sXIwSEhYCKx +21FFyMXh5DAUUaJBcuOsUI43xgl5h5dzdTFyAnhHJkQCWFfZJS4dcEDougyo8SBD7tZQBJs Ap4Sk991g9kiAkISSz9eZgexmQXSJTae7gQbJCxgLXFq3ho2EJtFQFVi7rW7zCA2r4CTxN3d e8HqJQTkJVZvOAAW5wSKN56+yAyx2FGif/kbFoh6QYmTM5+wQMzXlGjd/htql7xE89bZUPVa EveXfGGewCg8C0nLLCQts5C0LGBkXsUoWpxanJSbbmSkl1qUmVxcnJ+nl5dasokRGN4Ht/w2 2MH48rnjIUYBDkYlHt4etV0xQqyJZcWVuYcYJTiYlUR4HVO2xAjxpiRWVqUW5ccXleakFh9i lOZgURLn/SMkGCMkkJ5YkpqdmlqQWgSTZeLglGpgzN2b8U/Oquqgx5tG0UZbixy/WJcaIa4r 0tovU6V2HJ0uzb1hm1blzTXCZS4hnWwHvBSt0/i/hB2urjZJ8/VxmJ8n0KtXp6S0brnp3MkB E0++mBMfydm/LMB3hf+UQ5NjDJhqC3cHFy65I26z/f4+2y16ev2T+VSju/7NmLMvedrFVMYZ Sg1KLMUZiYZazEXFiQAjsg1XawIAAA== Subject: [dpdk-dev] [RFC v2 0/2] Pseudo-number generation improvements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190419212136.cBwSOBbAeEQAyhoI1vm6HhowlH4SDS75COSLHM0hisU@z> Make rte_rand() multi-thread safe, go faster and produce better-quality pseudo-random numbers. v2: * Removed 32-bit version of rte_rand() and rte_rand_max(). * Switched from a four-sequence LFSR (producing a 32-bit number) to a five-sequence LFSR (producing a 64-bit number). * Added a note on generator not being cryptographically secure. Mattias Rönnblom (2): eal: replace libc-based random number generation with LFSR eal: introduce random generator function with upper bound lib/librte_eal/common/include/rte_random.h | 45 +++--- lib/librte_eal/common/meson.build | 1 + lib/librte_eal/common/rte_random.c | 157 +++++++++++++++++++++ lib/librte_eal/freebsd/eal/Makefile | 1 + lib/librte_eal/freebsd/eal/eal.c | 2 - lib/librte_eal/linux/eal/Makefile | 1 + lib/librte_eal/linux/eal/eal.c | 2 - lib/librte_eal/rte_eal_version.map | 3 + 8 files changed, 190 insertions(+), 22 deletions(-) create mode 100644 lib/librte_eal/common/rte_random.c -- 2.17.1