From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14AA7A00C5; Thu, 30 Apr 2020 11:19:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD6EB1DA2F; Thu, 30 Apr 2020 11:19:21 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by dpdk.org (Postfix) with ESMTP id 6FCAA1DA2C for ; Thu, 30 Apr 2020 11:19:20 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Date: Thu, 30 Apr 2020 11:19:18 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C60F98@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC] ring: count and empty optimizations Thread-Index: AQHWHit+xWqi/EWuOEaPe4IgVQQmAaiQ2hpQgAB6q+A= References: <98CBD80474FA8B44BF855DF32C47DC35C60F96@smartserver.smartshare.dk> <20200429133837.GY6327@platinum> From: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Honnappa Nagarahalli" , "Olivier Matz" Cc: , "Ananyev, Konstantin" , "nd" Subject: Re: [dpdk-dev] [RFC] ring: count and empty optimizations 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" PiBGcm9tOiBIb25uYXBwYSBOYWdhcmFoYWxsaSBbbWFpbHRvOkhvbm5hcHBhLk5hZ2FyYWhhbGxp QGFybS5jb21dDQo+IFNlbnQ6IFRodXJzZGF5LCBBcHJpbCAzMCwgMjAyMCAzOjEyIEFNDQo+I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