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 46ED5A00C2; Wed, 30 Nov 2022 11:21:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA94340151; Wed, 30 Nov 2022 11:21:10 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 9650B4014F for ; Wed, 30 Nov 2022 11:21:09 +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: Wed, 30 Nov 2022 11:21:08 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8752C@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 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+eXilK2MG5G/y0iZVkPSkfr2Tq5Wc3cwgADeeUA= References: <98CBD80474FA8B44BF855DF32C47DC35D87488@smartserver.smartshare.dk> <20221116180419.98937-1-mb@smartsharesystems.com> From: =?UTF-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Kamalakshitha Aligeri" , , , "Honnappa Nagarahalli" , , Cc: "nd" 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 PiBGcm9tOiBLYW1hbGFrc2hpdGhhIEFsaWdlcmkgW21haWx0bzpLYW1hbGFrc2hpdGhhLkFsaWdl cmlAYXJtLmNvbV0NCj4gU2VudDogVHVlc2RheSwgMjkgTm92ZW1iZXIgMjAyMiAyMS41NA0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