From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 438D3A034C; Thu, 22 Dec 2022 18:56:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28EA8427EB; Thu, 22 Dec 2022 18:56:02 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id AEBCA410F9 for ; Thu, 22 Dec 2022 18:56:00 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 Subject: RE: [PATCH v2] mempool cache: add zero-copy get and put functions X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 22 Dec 2022 18:55:59 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D875DF@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2] mempool cache: add zero-copy get and put functions Thread-Index: AQHY+eXshGdkTOQ6MEqhZVx6ONxTsK56QgvAgAAW+lA= References: <98CBD80474FA8B44BF855DF32C47DC35D87488@smartserver.smartshare.dk> <20221116180419.98937-1-mb@smartsharesystems.com> From: =?UTF-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Konstantin Ananyev" , , , , , , Cc: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org PiBGcm9tOiBLb25zdGFudGluIEFuYW55ZXYgW21haWx0bzprb25zdGFudGluLmFuYW55ZXZAaHVh d2VpLmNvbV0NCj4gU2VudDogVGh1cnNkYXksIDIyIERlY2VtYmVyIDIwMjIgMTYuNTcNCj4gDQo+ ID4gWmVyby1jb3B5IGFj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