From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 5611D1B2DE for ; Thu, 19 Oct 2017 22:02:43 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 19 Oct 2017 13:02:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,403,1503385200"; d="scan'208";a="165174024" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga006.fm.intel.com with ESMTP; 19 Oct 2017 13:02:40 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by IRSMSX102.ger.corp.intel.com ([169.254.2.180]) with mapi id 14.03.0319.002; Thu, 19 Oct 2017 21:02:39 +0100 From: "Ananyev, Konstantin" To: "Ananyev, Konstantin" , "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" , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue Thread-Index: AQHTQ3J26efi+G3l00mtTlAiWDrZp6Lgbx+A///2yACAAIBxgIAAA82AgAoNaNCAAAjPAIAAJTQwgABv9KA= Date: Thu, 19 Oct 2017 20:02:38 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAAB570@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> In-Reply-To: <2601191342CEEE43887BDE71AB9772585FAAB404@IRSMSX103.ger.corp.intel.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.181] 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 20:02:45 -0000 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogZGV2IFttYWlsdG86ZGV2 LWJvdW5jZXNAZHBkay5vcmddIE9uIEJlaGFsZiBPZiBBbmFueWV2LCBLb25zdGFudGluDQo+IFNl bnQ6IFRodXJzZGF5LCBPY3RvYmVyIDE5LCAyMDE3IDM6MTUgUE0NCj4gVG86IFpoYW8sIEJpbmcg PGlsb3ZldGh1bGx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