From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from demumfd002.nsn-inter.net (demumfd002.nsn-inter.net [93.183.12.31]) by dpdk.org (Postfix) with ESMTP id 634835960 for ; Wed, 5 Aug 2015 05:09:45 +0200 (CEST) Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd002.nsn-inter.net (8.15.1/8.15.1) with ESMTPS id t7539i8D011698 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Aug 2015 03:09:44 GMT Received: from SGSIHTC004.nsn-intra.net ([10.159.225.21]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id t7538GBH002350 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 5 Aug 2015 05:09:43 +0200 Received: from SGSIMBX007.nsn-intra.net ([169.254.7.242]) by SGSIHTC004.nsn-intra.net ([10.159.225.21]) with mapi id 14.03.0248.002; Wed, 5 Aug 2015 11:08:44 +0800 From: "Yan, Liming (Nokia - CN/Hangzhou)" To: ext Olivier MATZ , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Could DPDK ring provide peek interface or any comments for this function? Thread-Index: AQHQzrUe/v/cWSYhok+/1Jhbnee3AJ38ubHw Date: Wed, 5 Aug 2015 03:08:44 +0000 Message-ID: References: <55C0B6AC.2080001@6wind.com> In-Reply-To: <55C0B6AC.2080001@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.159.225.112] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 4542 X-purgate-ID: 151667::1438744184-0000676C-03F1515F/0/0 Subject: Re: [dpdk-dev] Could DPDK ring provide peek interface or any comments for this function? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2015 03:09:45 -0000 DQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IGV4dCBPbGl2aWVyIE1BVFog W21haWx0bzpvbGl2aWVyLm1hdHpANndpbmQuY29tXQ0KPiBTZW50OiBUdWVzZGF5LCBBdWd1c3Qg MDQsIDIwMTUgODo1NyBQTQ0KPiBUbzogWWFuLCBMaW1pbmcgKE5va2lhIC0gQ04vSGFuZ3pob3Up OyBkZXZAZHBkay5vcmcNCj4gU3ViamVjdDogUmU6IFtkcGRrLWRldl0gQ291bGQgRFBESyByaW5n IHByb3ZpZGUgcGVlayBpbnRlcmZhY2Ugb3IgYW55DQo+IGNvbW1lbnRzIGZvciB0aGlzIGZ1bmN0 aW9uPw0KPiANCj4gSGksDQo+IA0KPiANCj4gT24gMDgvMDQvMjAxNSAwNDoyMCBBTSwgWWFuLCBM aW1pbmcgKE5va2lhIC0gQ04vSGFuZ3pob3UpIHdyb3RlOg0KPiA+IEhpLA0KPiA+ICAgICBBcyB3 ZSBzZWUsIERQREsgcmluZyBoYXMgbWFpbmx5IHRoZSBlbnF1ZXVlL2RlcXVldWUgQVBJcyBmb3IN Cj4gU0lOR0xFL01VTFRJIHByb2R1Y2VyL2NvbnN1bWVyLiAgSSBoYXZlIGEgcmVxdWlyZW1lbnQg aW4gd29yayB0byB0YWtlIGENCj4gcGVlayBvbiB0aGUgdG9wIG9iamVjdCBpbiB0aGUgcmluZy4g SSBkb24ndCB3YW50IHRvIGNvbnN1bWUgaXQsIGp1c3QNCj4gY2hlY2sgdGhlIHJlZmVyZW5jZSBv ZiB0aGUgb2JqZWN0LiAgSG93IGNvdWxkIHRoaXMgYmUgc3VwcG9ydGVkPyAgIE9yDQo+IGFueSBh bHRlcm5hdGl2ZSBzb2x1dGlvbiBmb3IgbXk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