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 D6C36A053D for ; Wed, 5 Aug 2020 14:59:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2D1B1BFFE; Wed, 5 Aug 2020 14:59:04 +0200 (CEST) Received: from huawei.com (szxga02-in.huawei.com [45.249.212.188]) by dpdk.org (Postfix) with ESMTP id A73D02C28; Wed, 5 Aug 2020 14:58:59 +0200 (CEST) Received: from DGGEMM401-HUB.china.huawei.com (unknown [172.30.72.53]) by Forcepoint Email with ESMTP id 77A3191CA68ECAA6A16C; Wed, 5 Aug 2020 20:58:56 +0800 (CST) Received: from DGGEMM533-MBX.china.huawei.com ([169.254.5.24]) by DGGEMM401-HUB.china.huawei.com ([10.3.20.209]) with mapi id 14.03.0487.000; Wed, 5 Aug 2020 20:58:46 +0800 From: wangyunjian To: "Burakov, Anatoly" , "dev@dpdk.org" , "david.marchand@redhat.com" CC: "Lilijun (Jerry)" , xudingke , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] eal/linux: do not create user mem map repeatedly when it exists Thread-Index: AQHWYQBeKLf/JXFWikCJC/y3HWnXzakWM5gAgAHZYzCAAppcgIAFfUTggAD2OYCACG3DUA== Date: Wed, 5 Aug 2020 12:58:46 +0000 Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60D110040@DGGEMM533-MBX.china.huawei.com> References: <1595515713-24640-1-git-send-email-wangyunjian@huawei.com> <34EFBCA9F01B0748BEB6B629CE643AE60D0EAAD8@dggemm513-mbx.china.huawei.com> <34EFBCA9F01B0748BEB6B629CE643AE60D0F695F@dggemm513-mbx.china.huawei.com> <21d092c3-83ce-a3f4-2411-193a5f46a111@intel.com> In-Reply-To: <21d092c3-83ce-a3f4-2411-193a5f46a111@intel.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.185.168] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] eal/linux: do not create user mem map repeatedly when it exists X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBCdXJha292LCBBbmF0b2x5IFtt YWlsdG86YW5hdG9seS5idXJha292QGludGVsLmNvbV0NCj4gU2VudDogRnJpZGF5LCBKdWx5IDMx LCAyMDIwIDc6NTUgUE0NCj4gVG86IHdhbmd5dW5qaWFuIDx3YW5neXVuamlhbkBodWF3ZWkuY29t PjsgZGV2QGRwZGsub3JnOw0KPiBkYXZpZC5tYXJjaGFuZEByZWRoYXQuY29tDQo+IENjOiBMaWxp anVuIChKZXJyeSkgPGplcnJ5LmxpbGlqdW5AaHVhd2VpLmNvbT47IHh1ZGluZ2tlDQo+IDx4dWRp bmdrZUBodWF3ZWkuY29tPjsgc3RhYmxlQGRwZGsub3JnDQo+IFN1YmplY3Q6IFJlOiBbZHBkay1k ZXZdIFtQQVRDSCB2Ml0gZWFsL2xpbnV4OiBkbyBub3QgY3JlYXRlIHVzZXIgbWVtIG1hcA0KPiBy ZXBlYXRlZGx5IHdoZW4gaXQgZXhpc3RzDQo+IA0KPiBPbiAzMC1KdWwtMjAgMjoxNiBQTSwgd2Fu Z3l1bmppYW4gd3JvdGU6DQo+ID4+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+ID4+IEZy b206IEJ1cmFrb3YsIEFuYXRvbHkgW21haWx0bzphbmF0b2x5LmJ1cmFrb3ZAaW50ZWwuY29tXQ0K PiA+PiBTZW50OiBNb25kYXksIEp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