From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.hxt-semitech.com (unknown [223.203.96.7]) by dpdk.org (Postfix) with ESMTP id D38D11B3BF for ; Fri, 13 Oct 2017 02:24:57 +0200 (CEST) X-ASG-Debug-ID: 1507854291-093b7e611d9d9f0001-TfluYd Received: from HXTBJIDCEMVIW01.hxtcorp.net (localhost [10.128.0.14]) by barracuda.hxt-semitech.com with ESMTP id e47k8HFMWuRZdmpL (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Oct 2017 08:24:51 +0800 (CST) X-Barracuda-Envelope-From: jie2.liu@hxt-semitech.com Received: from HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) by HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) with Microsoft SMTP Server (TLS) id 15.0.847.32; Fri, 13 Oct 2017 08:24:51 +0800 Received: from HXTBJIDCEMVIW01.hxtcorp.net ([fe80::f451:a443:c0b5:87d1]) by HXTBJIDCEMVIW01.hxtcorp.net ([fe80::f451:a443:c0b5:87d1%12]) with mapi id 15.00.0847.030; Fri, 13 Oct 2017 08:24:45 +0800 From: "Liu, Jie2" To: "Ananyev, Konstantin" , Olivier MATZ , "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" CC: "He, Jia" , "Zhao, Bing" , Jia He Thread-Topic: [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue X-ASG-Orig-Subj: RE: [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue Thread-Index: AQHTQ3xkiZVBKxAPD0WzYJMzwwBPXaLg6paQ Date: Fri, 13 Oct 2017 00:24:44 +0000 Message-ID: <3dc359ce73394a5293c77109f8b1d717@HXTBJIDCEMVIW01.hxtcorp.net> References: <20171010095636.4507-1-hejianet@gmail.com> <20171012155350.j34ddtivxzd27pag@platinum> <2601191342CEEE43887BDE71AB9772585FAA859F@IRSMSX103.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772585FAA859F@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.65.21.18] Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Barracuda-Connect: localhost[10.128.0.14] X-Barracuda-Start-Time: 1507854291 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.5000 1.0000 0.0000 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.43847 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Mailman-Approved-At: Mon, 16 Oct 2017 12:34:59 +0200 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, 13 Oct 2017 00:24:58 -0000 SGkgZ3V5cywNCldlIGZvdW5kIHRoaXMgaXNzdWUgd2hlbiB3ZSBydW4gbWJ1Zl9hdXRvdGVzdC4g SXQgZmFpbGVkIG9uIGEgYWFyY2g2NCBwbGF0Zm9ybS4gSSBhbSBub3Qgc3VyZSBpZiBpdCBjYW4g YmUgcmVwcm9kdWNlZCBvbiBvdGhlciBwbGF0Zm9ybXMuDQpSZWdhcmRzLA0KSmllIExpdQ0KDQot LS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogQW5hbnlldiwgS29uc3RhbnRpbiB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ucy50YWlsDQo+ID4gbG9hZCByLT5wcm9kLmhlYWQN Cj4gPg0KPiA+IHN0b3JlIHItPnByb2QudGFpbA0KPiA+DQo+ID4gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZCByLT5jb25zLmhlYWQNCj4gPiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkIHItPnByb2Qu dGFpbA0KPiA+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IC4uLg0KPiA+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHN0b3JlIHItPmNvbnMue2hlYWQsdGFpbH0NCj4gPiAgICAgICAgICAgICAgICAgICAgICAgICBs b2FkIHItPmNvbnMuaGVhZA0KPiA+DQo+ID4gVEhFTixyLT5jb25zLmhlYWQgd2lsbCBiZSBiaWdn ZXIgdGhhbiBwcm9kX3RhaWwsIHRoZW4gbWFrZSAqZW50cmllcw0KPiA+IHZlcnkgYmlnDQo+ID4N Cj4gPiBBZnRlciB0aGlzIHBhdGNoLCB0aGUgb2xkIGNvbnMuaGVhZCB3aWxsIGJlIHJlY2FjdWxh dGVkIGFmdGVyDQo+ID4gZmFpbHVyZSBvZiBydGVfYXRvbWljMzJfY21wc2V0DQo+ID4NCj4gPiBU aGVyZSBpcyBubyBzdWNoIGlzc3VlIGluIFg4NiBjcHUsIGJlY2F1c2UgWDg2IGlzIHN0cm9uZyBt ZW1vcnkNCj4gPiBvcmRlciBtb2RlbA0KPiA+DQo+ID4gU2lnbmVkLW9mZi1ieTogSmlhIEhlIDxo ZWppYW5ldEBnbWFpbC5jb20+DQo+ID4gU2lnbmVkLW9mZi1ieTogamlhLmhlQGh4dC1zZW1pdGVj aC5jb20NCj4gPiBTaWduZWQtb2ZmLWJ5OiBqaWUyLmxpdUBoeHQtc2VtaXRlY2guY29tDQo+ID4g U2lnbmVkLW9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