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 E20BCA00E6 for ; Sat, 20 Apr 2019 23:08:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F17721B57E; Sat, 20 Apr 2019 23:08:08 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BEDF51B411 for ; Sat, 20 Apr 2019 23:08:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2019 14:08:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,375,1549958400"; d="scan'208";a="339280108" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 20 Apr 2019 14:08:06 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 20 Apr 2019 14:08:06 -0700 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.26]) by fmsmsx156.amr.corp.intel.com ([169.254.13.7]) with mapi id 14.03.0415.000; Sat, 20 Apr 2019 14:08:06 -0700 From: "Wiles, Keith" To: =?utf-8?B?TWF0dGlhcyBSw7ZubmJsb20=?= CC: "dev@dpdk.org" , "stephen@networkplumber.org" Thread-Topic: [dpdk-dev] [RFC v2 2/2] eal: introduce random generator function with upper bound Thread-Index: AQHU9vYHy+QcSN+TO0KJF76GEiwoIaZGAbEA Date: Sat, 20 Apr 2019 21:08:05 +0000 Message-ID: References: <20190408123029.6701-1-mattias.ronnblom@ericsson.com> <20190419212138.17422-1-mattias.ronnblom@ericsson.com> <20190419212138.17422-3-mattias.ronnblom@ericsson.com> In-Reply-To: <20190419212138.17422-3-mattias.ronnblom@ericsson.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.251.87.186] Content-Type: text/plain; charset="UTF-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC v2 2/2] eal: introduce random generator function with upper bound 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: <20190420210805.osDagDBIqgKPX3C1B0uGBK9LjOC6zydHHuf0ppkFJt8@z> DQoNCj4gT24gQXByIDE5LCAyMDE5LCBhdCA1OjIxIFBNLCBNYXR0aWFzIFLDtm5uYmxvbSA8bWF0 dGlhcy5yb25uYmxvbUBlcmljc3Nvbi5jb20+IHdyb3RlOg0KPiANCj4gQWRkIGEgZnVuY3Rpb24g cnRlX3JhbmRfbWF4KCkgd2hpY2ggZ2VuZXJhdGVzIGFuIHVuaWZvcm1seSBkaXN0cmlidXRlZA0K PiBwc2V1ZG8tcmFuZG9tIG51bWJlciBsZXNzIHRoYW4gYSB1c2VyLXNwZWNpZmllZCB1cHBlciBi b3VuZC4NCj4gDQo+IFRoZSBjb21tb25seSB1c2VkIHBhdHRlcm4gcnRlX3JhbmQoKSAlIFNPTUVf VkFMVUUsIGluIGFkZGl0aW9uIHRvDQo+IGJlaW5nIHNsb3csIGFsc28gY3JlYXRlcyBiaWFzZWQg cmVzdWx0cyBpZiBTT01FX1ZBTFVFIGlzIG5vdCBhIHBvd2VyDQo+IG9mIDIuIFRoaXMgYmlhcyBp cyB2ZXJ5IHNtYWxsIGZvciBzbWFsbCBTT01FX1ZBTFVFLCBidXQgaW5jcmVhc2VzDQo+IGxpbmVh cmx5IHdpdGggbGFyZ2VyIFNPTUVfV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