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 031EA42C3C; Tue, 6 Jun 2023 09:18:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 946BA40A84; Tue, 6 Jun 2023 09:18:24 +0200 (CEST) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id B99DF40697 for ; Tue, 6 Jun 2023 09:18:23 +0200 (CEST) Received: from frapeml100005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Qb1wj6vB3z688jJ; Tue, 6 Jun 2023 15:16:05 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100005.china.huawei.com (7.182.85.132) 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 09:18:22 +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 09:18:22 +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 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: AQHZju3A3Kr3jcbS9UWgtqLBsiLUUq98HK8AgADuh4CAAGRwQA== Date: Tue, 6 Jun 2023 07:18:22 +0000 Message-ID: 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 PiANCj4gRGVmaW5lIHNwZWNpZmljIGZ1bmN0aW9uIGltcGxlbWVudGF0aW9uIGZvciBpNDBlIGRy aXZlci4NCj4gQ3VycmVudGx5LCBtYnVmcyByZWN5Y2xlIG1vZGUgY2FuIHN1cHBvcnQgMTI4Yml0 DQo+IHZlY3RvciBwYXRoIGFuZCBhdngyIHBhdGguIEFuZCBjYW4gYmUgZW5hYmxlZCBib3RoIGlu DQo+IGZhc3QgZnJlZSBhbmQgbm8gZmFzdCBmcmVlIG1vZGUuDQo+IA0KPiBTdWdnZXN0ZWQtYnk6 IEhvbm5hcHBhIE5hZ2FyYWhhbGxpIDxtYWlsdG86aG9ubmFwcGEubmFnYXJhaGFsbGlAYXJtLmNv bT4NCj4gU2lnbmVkLW9mZi1ieTogRmVpZmVpIFdhbmcgPG1haWx0bzpmZWlmZWkud2FuZzJAYXJt LmNvbT4NCj4gUmV2aWV3ZWQtYnk6IFJ1aWZlbmcgV2FuZyA8bWFpbHRvOnJ1aWZlbmcud2FuZ0Bh cm0uY29tPg0KPiBSZXZpZXdlZC1ieTogSG9ubmFwcGEgTmFnYXJhaGFsbGkgPG1haWx0bzpob25u YXBwYS5uYWdhcmFoYWxsaUBhcm0uY29tPg0KPiAtLS0NCj4gIGRyaXZlcnMvbmV0L2k0MGUvaTQw ZV9ldGhkZXYuYyB8IDEgKw0KPiAgZHJpdmVycy9uZXQvaTQwZS9pNDBlX2V0aGRldi5oIHwgMiAr DQo+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