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 B520BA0547; Mon, 21 Jun 2021 15:28:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E89F41158; Mon, 21 Jun 2021 15:28:30 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 7A0C240040 for ; Mon, 21 Jun 2021 15:28:28 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Date: Mon, 21 Jun 2021 15:28:26 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C6187B@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [dpdk-dev] [PATCH] parray: introduce internal API for dynamic arrays Thread-Index: AQHXYQxT3nKj3OToOE+g04oypCLg2asTbdkAgAAOoICAAATCgIAAFeZggAAOq/CABIvGAIAAHL6ggAAPB4CAATs50IAEplTQgAApWQCAAAaAEIAAD6vw References: <20210614105839.3379790-1-thomas@monjalon.net> <98CBD80474FA8B44BF855DF32C47DC35C6184E@smartserver.smartshare.dk> <2004320.XGyPsaEoyj@thomas> <0bb118ba-2658-a7d7-ad8f-bf27f62849f7@intel.com> <98CBD80474FA8B44BF855DF32C47DC35C6187A@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 From: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Ananyev, Konstantin" , "Yigit, Ferruh" , "Thomas Monjalon" , "Richardson, Bruce" Cc: , , , , , Subject: Re: [dpdk-dev] [PATCH] parray: introduce internal API for dynamic arrays X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscrib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