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 BC56542C3E; Tue, 6 Jun 2023 10:27:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95CEA40ED6; Tue, 6 Jun 2023 10:27:06 +0200 (CEST) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id 8C18940A84 for ; Tue, 6 Jun 2023 10:27:05 +0200 (CEST) Received: from frapeml500007.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Qb3VJ35bgz6J73K; Tue, 6 Jun 2023 16:26:48 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 6 Jun 2023 10:27:03 +0200 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.023; Tue, 6 Jun 2023 10:27:03 +0200 From: Konstantin Ananyev To: Feifei Wang , =?utf-8?B?0JrQvtC90YHRgtCw0L3RgtC40L0g0JDQvdCw0L3RjNC10LI=?= , Yuying Zhang , Beilei Xing CC: "dev@dpdk.org" , nd , Honnappa Nagarahalli , Ruifeng Wang , nd , nd Subject: RE: [PATCH v6 2/4] net/i40e: implement mbufs recycle mode Thread-Topic: [PATCH v6 2/4] net/i40e: implement mbufs recycle mode Thread-Index: AQHZju3A3Kr3jcbS9UWgtqLBsiLUUq98HK8AgADuh4CAAGRwQP//6ksAgAAooyA= Date: Tue, 6 Jun 2023 08:27:02 +0000 Message-ID: <83b9487385e04212847f7deea32efd82@huawei.com> References: <20211224164613.32569-1-feifei.wang2@arm.com> <20230525094541.331338-1-feifei.wang2@arm.com> <20230525094541.331338-3-feifei.wang2@arm.com> <1580121685969644@mail.yandex.ru> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.81.189.224] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected 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 DQoNCj4gPiA+IERlZmluZSBzcGVjaWZpYyBmdW5jdGlvbiBpbXBsZW1lbnRhdGlvbiBmb3IgaTQw ZSBkcml2ZXIuDQo+ID4gPiBDdXJyZW50bHksIG1idWZzIHJlY3ljbGUgbW9kZSBjYW4gc3VwcG9y dCAxMjhiaXQgdmVjdG9yIHBhdGggYW5kIGF2eDINCj4gPiA+IHBhdGguIEFuZCBjYW4gYmUgZW5h YmxlZCBib3RoIGluIGZhc3QgZnJlZSBhbmQgbm8gZmFzdCBmcmVlIG1vZGUuDQo+ID4gPg0KPiA+ ID4gU3VnZ2VzdGVkLWJ5OiBIb25uYXBwYSBOYWdhcmFoYWxsaQ0KPiA+ID4gPG1haWx0bzpob25u YXBwYS5uYWdhcmFoYWxsaUBhcm0uY29tPg0KPiA+ID4gU2lnbmVkLW9mZi1ieTogRmVpZmVpIFdh bmcgPG1haWx0bzpmZWlmZWkud2FuZzJAYXJtLmNvbT4NCj4gPiA+IFJldmlld2VkLWJ5OiBSdWlm ZW5nIFdhbmcgPG1haWx0bzpydWlmZW5nLndhbmdAYXJtLmNvbT4NCj4gPiA+IFJldmlld2VkLWJ5 OiBIb25uYXBwYSBOYWdhcmFoYWxsaQ0KPiA+ID4gPG1haWx0bzpob25uYXBwYS5uYWdhcmFoYWxs aUBhcm0uY29tPg0KPiA+ID4gLS0tDQo+ID4gPiAgZHJpdm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