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 DE2EB46030; Mon, 20 Jan 2025 00:45:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B061F402A4; Mon, 20 Jan 2025 00:45:01 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id E5A9F4029B; Mon, 20 Jan 2025 00:44:59 +0100 (CET) Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Ybqnt0YS3z6K5ny; Mon, 20 Jan 2025 07:44:50 +0800 (CST) Received: from frapeml100008.china.huawei.com (unknown [7.182.85.131]) by mail.maildlp.com (Postfix) with ESMTPS id B27BB140525; Mon, 20 Jan 2025 07:44:58 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100008.china.huawei.com (7.182.85.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 20 Jan 2025 00:44:58 +0100 Received: from frapeml500007.china.huawei.com ([7.182.85.172]) by frapeml500007.china.huawei.com ([7.182.85.172]) with mapi id 15.01.2507.039; Mon, 20 Jan 2025 00:44:58 +0100 From: Konstantin Ananyev To: Ariel Otilibili , "dev@dpdk.org" CC: "stable@dpdk.org" , Thomas Monjalon , David Marchand , "Andrew Rybchenko" , =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= Subject: RE: [PATCH 2/2] mempool: turn functions into single-exit ones Thread-Topic: [PATCH 2/2] mempool: turn functions into single-exit ones Thread-Index: AQHbapo5RxE9oPjDwUCw+MQzxLuqX7MewSCA Date: Sun, 19 Jan 2025 23:44:58 +0000 Message-ID: <7524c0626a384d458ca64414ca1ff0e4@huawei.com> References: <20250119174643.2162110-1-ariel.otilibili@6wind.com> <20250119174643.2162110-3-ariel.otilibili@6wind.com> In-Reply-To: <20250119174643.2162110-3-ariel.otilibili@6wind.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.126.168.174] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 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 DQoNCj4gU29tZSBmdW5jdGlvbnMgZGlkIG5vdCBzZXQgcnRlX2Vycm5vOyBmb3IgYXZvaWRpbmcg dGhhdCwgdGhleSBhcmUgdHVybmVkDQo+IGludG8gc2luZ2xlLWV4aXQgb25lcy4NCj4gDQo+IEJ1 Z3ppbGxhIElEOiAxNTU5DQo+IFNpZ25lZC1vZmYtYnk6IEFyaWVsIE90aWxpYmlsaSA8YXJpZWwu b3RpbGliaWxpQDZ3aW5kLmNvbT4NCg0KQnV0IHJlYWRpbmcgdGhyb3VnaCBwdWJsaWMgQVBJIGNv bW1lbnRzIG5vbmUgb2YgdGhlc2UgZnVuY3Rpb25zIGFyZSANCmV4cGVjdGVkIHRvIHNldCBydGVf ZXJybm8gdmFsdWUuDQpJZiBydGVfbWVtcG9vbF9jcmVhdGVfZW1wdHkoKSBmb3JnZXRzIHRvIHNl dCBydGVfZXJybm8sIHdoeSBpdCBpcyBub3QNCmVub3VnaCBqdXN0IHRvIGFkZCBtaXNzaW5nIG9u ZSBpbiBydGVfbWVtcG9vbF9jcmVhdGVfZW1wdHkoKT8NCiANCg0KPiAtLS0NCj4gIGxpYi9tZW1w b29sL3J0ZV9tZW1wb29sX29wcy5jIHwgMzggKysrKysrKysrKysrKysrKysrKysrKysrKystLS0t LS0tLS0NCj4gIDEgZmlsZSBjaGFuZ2VkLCAyOCBpbnNlcnRpb25zKCsp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