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 193DCA00BE; Tue, 28 Apr 2020 15:53:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E979C1D5F2; Tue, 28 Apr 2020 15:53:18 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by dpdk.org (Postfix) with ESMTP id 2B9C21D5D0 for ; Tue, 28 Apr 2020 15:53:18 +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: Tue, 28 Apr 2020 15:53:15 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C60F96@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC] ring: count and empty optimizations Thread-Index: AdYdZF2v8ZXdws+LSbakUFX2kkScfw== From: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Olivier Matz" Cc: Subject: [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" T2xpdmllciAobWFpbnRhaW5lciBvZiB0aGUgUmluZyksDQoNCkkgd291bGQgbGlrZSB0byBzdWdn ZXN0IGEgY291cGxlIG9mIG1pbm9yIG9wdGltaXphdGlvbnMgdG8gdGhlIHJpbmcgbGlicmFyeS4N Cg0KDQoxLiBUZXN0aW5nIGlmIHRoZSByaW5nIGlzIGVtcHR5IGlzIGFzIHNpbXBsZSBhcyBjb21w YXJpbmcgdGhlIHByb2R1Y2VyIGFuZCBjb25zdW1lciBwb2ludGVyczoNCg0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