From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 138712C38 for ; Tue, 22 Jan 2019 22:31:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2019 13:31:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,508,1539673200"; d="scan'208";a="120474323" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 22 Jan 2019 13:31:29 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 22 Jan 2019 13:31:29 -0800 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.99]) by fmsmsx120.amr.corp.intel.com ([169.254.15.173]) with mapi id 14.03.0415.000; Tue, 22 Jan 2019 13:31:28 -0800 From: "Eads, Gage" To: Ola Liljedahl , "dev@dpdk.org" CC: "olivier.matz@6wind.com" , "stephen@networkplumber.org" , nd , "Richardson, Bruce" , "arybchenko@solarflare.com" , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH v3 2/5] ring: add a non-blocking implementation Thread-Index: AQHUr0H3NsJBTf2hT0+nXGXAmKraP6W7ZOeAgABKckA= Date: Tue, 22 Jan 2019 21:31:27 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E541CA46E@FMSMSX108.amr.corp.intel.com> References: <20190115235227.14013-1-gage.eads@intel.com> <20190118152326.22686-1-gage.eads@intel.com> <20190118152326.22686-3-gage.eads@intel.com> <1548168583.31150.32.camel@arm.com> In-Reply-To: <1548168583.31150.32.camel@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWRlYmQzYzEtYzdmNS00ZDk1LWJhZmQtZDE4M2Y2YmJjYTk1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVDRucGQ2NDAyaXZXa1wvNVo4RHBTdTR1d3EyOTlKcWlQeXJjOGhzbk0zVW5Yd09xdUlka3lcL28zXC9uVmI2a29JNCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 2/5] ring: add a non-blocking implementation 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: Tue, 22 Jan 2019 21:31:32 -0000 SGkgT2xhLA0KDQo8c25pcD4NCg0KPiA+IEBAIC0zMzEsNiArNDMzLDMxOSBAQCB2b2lkIHJ0ZV9y aW5nX2R1bXAoRklMRSAqZiwgY29uc3Qgc3RydWN0DQo+ID4gcnRlX3JpbmcgKnIpOw0KPiA+IMKg I2VuZGlmDQo+ID4gwqAjaW5jbHVkZSAicnRlX3JpbmdfZ2VuZXJpY182NC5oIg0KPiA+DQo+ID4g Ky8qIEBpbnRlcm5hbCAxMjgtYml0IHN0cnVjdHVyZSB1c2VkIGJ5IHRoZSBub24tYmxvY2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