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 BA41FA0093; Sat, 24 Dec 2022 13:17:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60337410FB; Sat, 24 Dec 2022 13:17:35 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 99A2E410E6 for ; Sat, 24 Dec 2022 13:17:33 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [PATCH v2] mempool cache: add zero-copy get and put functions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Date: Sat, 24 Dec 2022 13:17:32 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D875E8@smartserver.smartshare.dk> In-Reply-To: <1cc060f3507d4d42ac8bcfa615fb2fa5@huawei.com> X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2] mempool cache: add zero-copy get and put functions Thread-Index: AQHY+eXshGdkTOQ6MEqhZVx6ONxTsK56QgvAgAAW+lCAAYwvoIABRU7Q References: <98CBD80474FA8B44BF855DF32C47DC35D87488@smartserver.smartshare.dk> <20221116180419.98937-1-mb@smartsharesystems.com> <98CBD80474FA8B44BF855DF32C47DC35D875DF@smartserver.smartshare.dk> <1cc060f3507d4d42ac8bcfa615fb2fa5@huawei.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 PiBGcm9tOiBLb25zdGFudGluIEFuYW55ZXYgW21haWx0bzprb25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