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 0A4874596C; Thu, 12 Sep 2024 11:10:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB91D40E5A; Thu, 12 Sep 2024 11:10:14 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 0A7E8406BA for ; Thu, 12 Sep 2024 11:10:13 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id D44E8210E6; Thu, 12 Sep 2024 11:10:12 +0200 (CEST) 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 1/6] eal: add static per-lcore memory allocation facility Date: Thu, 12 Sep 2024 11:10:09 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F6D3@smartserver.smartshare.dk> In-Reply-To: <20240911170430.701685-2-mattias.ronnblom@ericsson.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2 1/6] eal: add static per-lcore memory allocation facility Thread-Index: AdsEbf3EtKpwRxFnSuewCVut2HsuoAAfCdZg References: <20240910070344.699183-2-mattias.ronnblom@ericsson.com> <20240911170430.701685-1-mattias.ronnblom@ericsson.com> <20240911170430.701685-2-mattias.ronnblom@ericsson.com> From: =?UTF-8?B?TW9ydGVuIEJyw7hydXA=?= To: =?UTF-8?B?TWF0dGlhcyBSw7ZubmJsb20=?= , , "Jerin Jacob" , "Chengwen Feng" Cc: =?UTF-8?B?TWF0dGlhcyBSw7ZubmJsb20=?= , "Stephen Hemminger" , "Konstantin Ananyev" , "David Marchand" , "Anatoly Burakov" 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 PiArI2RlZmluZSBMQ09SRV9CVUZGRVJfU0laRSAoUlRFX01BWF9MQ09SRV9WQVIgKiBSVEVfTUFY X0xDT1JFKQ0KDQpDb25zaWRlcmluZyBodWdlcGFnZXMuLi4NCg0KTGNvcmUgdmFyaWFibGVzIG1h eSBiZSBhbGxvY2F0ZWQgYmVmb3JlIERQREsncyBtZW1vcnkgYWxsb2NhdG9yIChydGVfbWFsbG9j KCkpIGlzIHJlYWR5LCBzbyBydGVfbWFsbG9jKCkgY2Fubm90IGJlIHVzZWQgZm9yIGxjb3JlIHZh cmlhYmxlcy4NCg0KQW5kIGxjb3JlIHZhcmlhYmxlcyBhcmUgbm90IHVzYWJsZSAoc2hhcmVkKSBm b3IgRFBESyBtdWx0aS1wcm9jZXNzLCBzbyB0aGUgbGNvcmVfYnVmZmVyIGNvdWxkIGJlIGFsbG9j YXRlZCB0aHJvdWdoIHRoZSBPL1MgQVBJcyBhcyBhbm9ueW1vdXMgaHVnZXBhZ2VzLCBpbnN0ZWFk IG9mIHVzaW5nIHJ0ZV9tYWxsb2MoKS4NCg0KVGhlIGFsdGVybmF0aXZlLCB1c2luZyBydGVfbWFs bG9jKCksIHdvdWxkIGRpc2FsbG93IGFsbG9jYXRpbmcgbGNvcmUgdmFyaWFibGVzIGJlZm9yZSBE UERLJ3MgbWVtb3J5IGFsbG9jYXRvciBoYXMgYmVlbiBpbml0aWFsaXplZCwgd2hpY2ggSSB0aGlu ayBpcyB0b28gbGF0ZS4NCg0KQW55d2F5LCBodWdlcGFnZXMgaXMgbm90IGEgIm11c3QgaGF2ZSIg aGVyZSwgaXQgaXMgYSAibmljZSB0byBoYXZlIi4gSXQgY2FuIGJlIGFkZGVkIHRvIHRoZSBsY29y ZSB2YXJ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