From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF6E0A0588; Thu, 16 Apr 2020 04:19:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3AB571D715; Thu, 16 Apr 2020 04:19:55 +0200 (CEST) Received: from huawei.com (szxga01-in.huawei.com [45.249.212.187]) by dpdk.org (Postfix) with ESMTP id A4EE12B84; Thu, 16 Apr 2020 04:19:53 +0200 (CEST) Received: from DGGEMM404-HUB.china.huawei.com (unknown [172.30.72.53]) by Forcepoint Email with ESMTP id 55C8EC2FCDF4A4FE4FF3; Thu, 16 Apr 2020 10:19:51 +0800 (CST) Received: from DGGEMM421-HUB.china.huawei.com (10.1.198.38) by DGGEMM404-HUB.china.huawei.com (10.3.20.212) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 16 Apr 2020 10:19:08 +0800 Received: from DGGEMM533-MBX.china.huawei.com ([169.254.5.250]) by dggemm421-hub.china.huawei.com ([10.1.198.38]) with mapi id 14.03.0487.000; Thu, 16 Apr 2020 10:18:59 +0800 From: wangyunjian To: Ferruh Yigit , "dev@dpdk.org" CC: "keith.wiles@intel.com" , "Lilijun (Jerry)" , xudingke , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 3/5] net/tap: fix check for mbuf's nb_segs failure Thread-Index: AQHWD/OytAJHEegf0Eqb/7VxkI6lxqh5yqQAgAE9iAA= Date: Thu, 16 Apr 2020 02:18:58 +0000 Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60CF6BFB6@DGGEMM533-MBX.china.huawei.com> References: <1586604228-21208-1-git-send-email-wangyunjian@huawei.com> <350bd865-eb60-9931-8320-6b375490558f@intel.com> In-Reply-To: <350bd865-eb60-9931-8320-6b375490558f@intel.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.251.152] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v4 3/5] net/tap: fix check for mbuf's nb_segs failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBGZXJydWggWWlnaXQgW21haWx0 bzpmZXJydWgueWlnaXRAaW50ZWwuY29tXQ0KPiBTZW50OiBXZWRuZXNkYXksIEFwcmlsIDE1LCAy MDIwIDExOjEzIFBNDQo+IFRvOiB3YW5neXVuamlhbiA8d2FuZ3l1bmppYW5AaHVhd2VpLmNvbT47 IGRldkBkcGRrLm9yZw0KPiBDYzoga2VpdGgud2lsZXNAaW50ZWwuY29tOyBMaWxpanVuIChKZXJy eSkgPGplcnJ5LmxpbGlqdW5AaHVhd2VpLmNvbT47IHh1ZGluZ2tlDQo+IDx4dWRpbmdrZUBodWF3 ZWkuY29tPjsgc3RhYmxlQGRwZGsub3JnDQo+IFN1YmplY3Q6IFJlOiBbZHBkay1kZXZdIFtQQVRD SCB2NCAzLzVdIG5ldC90YXA6IGZpeCBjaGVjayBmb3IgbWJ1ZidzIG5iX3NlZ3MNCj4gZmFpbHVy ZQ0KPiANCj4gT24gNC8xMS8yMDIwIDEyOjIzIFBNLCB3YW5neXVuamlhbiB3cm90ZToNCj4gPiBG cm9tOiBZdW5qaWFuIFdhbmcgPHdhbmd5dW5qaWFuQGh1YXdlaS5jb20+DQo+ID4NCj4gPiBOb3cg dGhlIHJ4cS0+cG9vbCBpcyBtYnVmIGNvbmNhdGVuYXRpb24sIGJ1dCBpdHMgbmJfc2VncyBpcyAx LiBXaGVuDQo+ID4gY29uZHVjdGluZyBzb21lIHNhbml0eSBja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