From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D54B2239 for ; Thu, 7 Mar 2019 12:17:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2019 03:17:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,451,1544515200"; d="scan'208";a="150124576" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga004.fm.intel.com with ESMTP; 07 Mar 2019 03:17:50 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.210]) by irsmsx110.ger.corp.intel.com ([169.254.15.102]) with mapi id 14.03.0415.000; Thu, 7 Mar 2019 11:17:49 +0000 From: "Ananyev, Konstantin" To: "Gavin Hu (Arm Technology China)" , Ilya Maximets , "dev@dpdk.org" CC: nd , "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Nipun.gupta@nxp.com" , Honnappa Nagarahalli , "olivier.matz@6wind.com" , "Richardson, Bruce" , "chaozhu@linux.vnet.ibm.com" Thread-Topic: [PATCH v2] ring: enforce reading the tails before ring operations Thread-Index: AQHU1NLSWD0O5+qFmk6VtHpVGShS4qYAA0EQ Date: Thu, 7 Mar 2019 11:17:49 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725801365527AC@irsmsx105.ger.corp.intel.com> References: <1551841661-42892-1-git-send-email-gavin.hu@arm.com> <1551941137-33250-1-git-send-email-gavin.hu@arm.com> <3cdf6747-21f3-d77e-0935-d73b5cc617f6@samsung.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTNkZDFjODUtMjU5NC00NzFmLWJkMzgtYThkODdlOTg1NjQzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaERmcDFhdm12NmxDbTJEcXN1N29jR294aWE4VU9uaWRUdU1HaXNiUVdSK3JnXC95XC9sU3hROWlkUU5ERFFhRTlyIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] ring: enforce reading the tails before ring operations 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: Thu, 07 Mar 2019 11:17:54 -0000 SGkgR2F2aW4sDQoNCj4gPiA+Pj4gSW4gd2VhayBtZW1vcnkgbW9kZWxzLCBsaWtlIGFybTY0LCBy ZWFkaW5nIHRoZSB7cHJvZCxjb25zfS50YWlsIG1heSBnZXQNCj4gPiA+Pj4gcmVvcmRlcmVkIGFm dGVyIHJlYWRpbmcgb3Igd3JpdGluZyB0aGUgcmluZyBzbG90cywgd2hpY2ggY29ycnVwdHMgdGhl IHJpbmcNCj4gPiA+Pj4gYW5kIHN0YWxlIGRhdGEgaXMgb2JzZXJ2ZWQuDQo+ID4gPj4+DQo+ID4g Pj4+IFRoaXMgaXNzdWUgd2FzIHJlcG9ydGVkIGJ5IE5YUCBvbiA4LUE3MiBEUEFBMiBib2F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