From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0749A1B20C for ; Thu, 19 Oct 2017 16:15:04 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2017 07:15:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,402,1503385200"; d="scan'208";a="165025285" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga006.fm.intel.com with ESMTP; 19 Oct 2017 07:15:01 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by IRSMSX101.ger.corp.intel.com ([169.254.1.22]) with mapi id 14.03.0319.002; Thu, 19 Oct 2017 15:15:01 +0100 From: "Ananyev, Konstantin" To: "Zhao, Bing" , Jia He , "Jerin Jacob" CC: Olivier MATZ , "dev@dpdk.org" , "jia.he@hxt-semitech.com" , "jie2.liu@hxt-semitech.com" , "bing.zhao@hxt-semitech.com" Thread-Topic: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue Thread-Index: AQHTQ3J26efi+G3l00mtTlAiWDrZp6Lgbx+A///2yACAAIBxgIAAA82AgAoNaNCAAAjPAIAAJTQw Date: Thu, 19 Oct 2017 14:15:00 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAAB404@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> In-Reply-To: <8806e2bd-c57b-03ff-a315-0a311690f1d9@163.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmY0M2YxODctMmQ5NC00YmM4LWE4ZjMtM2ZkODFjZjNiNGYyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkhiSHo5blJubGRWaTZqSk5OY1NuK05BM3VyXC9uVlZwWm0xM1NDemsybVJ3PSJ9 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: Thu, 19 Oct 2017 14:15:05 -0000 PiANCj4gSGksDQo+IA0KPiBPbiAyMDE3LzEwLzE5IDE4OjAyLCBBbmFueWV2LCBLb25zdGFudGlu IHdyb3RlOg0KPiA+DQo+ID4gSGkgSmlhLA0KPiA+DQo+ID4+DQo+ID4+IEhpDQo+ID4+DQo+ID4+ DQo+ID4+IE9uIDEwLzEzLzIwMTcgOTowMiBBTSwgSmlhIEhlIFdyb3RlOg0KPiA+Pj4gSGkgSmVy aW4NCj4gPj4+DQo+ID4+Pg0KPiA+Pj4gT24gMTAvMTMvMjAxNyAxOjIzIEFNLCBKZXJpbiBKYWNv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