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 9BAEEA04FD; Tue, 27 Dec 2022 11:31:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38F33410FC; Tue, 27 Dec 2022 11:31:57 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 55EEF40E2D for ; Tue, 27 Dec 2022 11:31:56 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [PATCH v4] 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: Tue, 27 Dec 2022 11:31:52 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D875FC@smartserver.smartshare.dk> In-Reply-To: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v4] mempool cache: add zero-copy get and put functions Thread-Index: AdkZ1P53sH/xbE3oT1aqOTPa+GM2gAABS7cg References: <98CBD80474FA8B44BF855DF32C47DC35D87488@smartserver.smartshare.dk> <20221224115514.33476-1-mb@smartsharesystems.com> From: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Andrew Rybchenko" , , , , , , 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 PiBGcm9tOiBBbmRyZXcgUnliY2hlbmtvIFttYWlsdG86YW5kcmV3LnJ5YmNoZW5rb0Bva3RldGxh YnMucnVdDQo+IFNlbnQ6IFR1ZXNkYXksIDI3IERlY2VtYmVyIDIwMjIgMTAuMjQNCj4gDQo+IE9u IDEyLzI0LzIyIDE0OjU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