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 7A6B0A0527; Sat, 25 Jul 2020 11:59:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 254131C029; Sat, 25 Jul 2020 11:59:30 +0200 (CEST) Received: from huawei.com (szxga03-in.huawei.com [45.249.212.189]) by dpdk.org (Postfix) with ESMTP id 03A361C025; Sat, 25 Jul 2020 11:59:27 +0200 (CEST) Received: from DGGEMM401-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 92B0B9A0DC3D20E1E199; Sat, 25 Jul 2020 17:59:24 +0800 (CST) Received: from DGGEMM513-MBX.china.huawei.com ([169.254.1.141]) by DGGEMM401-HUB.china.huawei.com ([10.3.20.209]) with mapi id 14.03.0487.000; Sat, 25 Jul 2020 17:59:12 +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/y3HWnXzakWM5gAgAHZYzA= Date: Sat, 25 Jul 2020 09:59:12 +0000 Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60D0EAAD8@dggemm513-mbx.china.huawei.com> References: <1595515713-24640-1-git-send-email-wangyunjian@huawei.com> In-Reply-To: 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-dev] [PATCH v2] eal/linux: do not create user mem map repeatedly when it exists X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions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