From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 73C761B19E for ; Fri, 20 Oct 2017 09:03:38 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 20 Oct 2017 00:03:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,405,1503385200"; d="scan'208";a="911825146" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by FMSMGA003.fm.intel.com with ESMTP; 20 Oct 2017 00:03:35 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by IRSMSX152.ger.corp.intel.com ([169.254.6.87]) with mapi id 14.03.0319.002; Fri, 20 Oct 2017 08:03:35 +0100 From: "Ananyev, Konstantin" To: Jia He , "Zhao, Bing" , "Jerin Jacob" CC: Olivier MATZ , "dev@dpdk.org" , "jia.he@hxt-semitech.com" , "jie2.liu@hxt-semitech.com" , "bing.zhao@hxt-semitech.com" , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue Thread-Index: AQHTQ3J26efi+G3l00mtTlAiWDrZp6Lgbx+A///2yACAAIBxgIAAA82AgAoNaNCAAAjPAIAAJTQwgABv9KCAAGCHAIAAZR/w Date: Fri, 20 Oct 2017 07:03:34 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAAB886@IRSMSX103.ger.corp.intel.com> References: <20171010095636.4507-1-hejianet@gmail.com> <20171012155350.j34ddtivxzd27pag@platinum> <2601191342CEEE43887BDE71AB9772585FAA859F@IRSMSX103.ger.corp.intel.com> <20171012172311.GA8524@jerin> <2601191342CEEE43887BDE71AB9772585FAAB171@IRSMSX103.ger.corp.intel.com> <8806e2bd-c57b-03ff-a315-0a311690f1d9@163.com> <2601191342CEEE43887BDE71AB9772585FAAB404@IRSMSX103.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772585FAAB570@IRSMSX103.ger.corp.intel.com> <3e580cd7-2854-d855-be9c-7c4ce06e3ed5@gmail.com> In-Reply-To: <3e580cd7-2854-d855-be9c-7c4ce06e3ed5@gmail.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTM3M2RjMTktYWVhYy00Yjk5LTk4MGYtYWJlZTBhNTQ4OWNjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlppbFpPU01DY2lcL0RuemJsUWxrVzVwUEtmU1JQZG5DUjRjSXhybGFyZWY0PSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue 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, 20 Oct 2017 07:03:40 -0000 DQoNCg0KPiA+Pg0KPiA+Pj4gSGksDQo+ID4+Pg0KPiA+Pj4gT24gMjAxNy8xMC8xOSAxODowMiwg QW5hbnlldiwgS29uc3RhbnRpbiB3cm90ZToNCj4gPj4+PiBIaSBKaWEsDQo+ID4+Pj4NCj4gPj4+ Pj4gSGkNCj4g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