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 DC667A0547 for ; Mon, 19 Apr 2021 13:48:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A72B4129C; Mon, 19 Apr 2021 13:48:02 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id F0CC74123B; Mon, 19 Apr 2021 13:47:59 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 1E1E7B09; Mon, 19 Apr 2021 07:47:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 19 Apr 2021 07:47:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= mQi56b/so1ztWSGTqCUtYqDT+3Wa4TSXNgA/mkar758=; b=HOdNu7IlJwRPmlZg 1k8cNCGu9utXqaYqdKchx1MYOcT8IOd5C+6K3qnVZ8Dcl+vxykdMnZ0j0s7CVnTU ykDn6leRz7Ryfqwdu3u2CO9b3McMRTCihwLrsprLWB6YjWNUcrFJe6XuS8PcdCm7 dvTQH4d73PfnuzByPRM/I7Kat1tnhuY1FdmCP4nt7AP9uAabx9QJbUq6u7H6z0D9 8KvUCFG7od86Sl9d8lXusZchO3T5cOj+izTVUiPwjVgsv+1D9BxPGSz1ycZUPhao Hv3srTcFb9mhXztmvbbAECUc7QbiDk0HeRp0o4/5tXVsxahqYYavtnVmVH+CMo54 Xcxz7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=mQi56b/so1ztWSGTqCUtYqDT+3Wa4TSXNgA/mkar7 58=; b=jtLZSeIm4P4pTV7IOJLeFFNx/T30wm4Lw1yGiuIQFPMpS3KBwcKjKzgzJ guOQ/Cfti/Ppe0ZhnvzIxob3v2b+uo7NdjOMFdrrVGyTKO5g9PEPODtKSlzdeGW+ rXIcbSCvhk+9/HDFZ8dqGdoLEiXRr0OI1N6LcjAKevz1q4HUUPALddwRuM9ce+zA rWfrLAyRgNEixg0MISF5SWCT16k867nQ2bM1jUJhzeg+rvX+0Ub8l7+9D23dvtQU AgFupq8l/31VmKNhC2k0TKkrmo4BHFEtrJcTQMrr4oOnunkIeJj+Uz54X0MxcKlD 406tVG4xe6iIAh8MhY57xMXs1LaQA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtgedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C421108005C; Mon, 19 Apr 2021 07:47:56 -0400 (EDT) From: Thomas Monjalon To: wangyunjian Cc: dev@dpdk.org, stable@dpdk.org, david.marchand@redhat.com, anatoly.burakov@intel.com, ktraynor@redhat.com, dingxiaoxiong@huawei.com, Yunjian Wang Date: Mon, 19 Apr 2021 13:47:54 +0200 Message-ID: <3999835.CjcHxTCJUi@thomas> In-Reply-To: <1618047477-22368-1-git-send-email-wangyunjian@huawei.com> References: <1602840525-8848-1-git-send-email-wangyunjian@huawei.com> <1618047477-22368-1-git-send-email-wangyunjian@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v5] eal: fix create user mem map repeatedly when it exists X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" 10/04/2021 11:37, wangyunjian: > From: Yunjian Wang > > Currently, new user mem maps are checked if they are adjacent to > an existing mem map and if so, the mem map entries are merged. > > It doesn't check for duplicate mem maps, so if the API is called As Kevin suggested, it should be in the past tense: "didn't". > with the same mem map multiple times, they will occupy multiple > mem map entries. This will reduce the amount of entries available > for unique mem maps. > > So check for duplicate mem maps and merge them into one mem map > entry if any found. > > Fixes: 0cbce3a167f1 ("vfio: skip DMA map failure if already mapped") > Cc: stable@dpdk.org > > Suggested-by: Kevin Traynor > Signed-off-by: Yunjian Wang > Acked-by: Anatoly Burakov Applied, thanks.