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 22DA5A04C0; Tue, 19 Nov 2019 02:45:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34F3DCF3; Tue, 19 Nov 2019 02:45:17 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id A5293B62; Tue, 19 Nov 2019 02:45:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2019 17:45:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,322,1569308400"; d="scan'208";a="196329491" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 18 Nov 2019 17:45:13 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 Nov 2019 17:45:13 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 Nov 2019 17:45:12 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.60]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.149]) with mapi id 14.03.0439.000; Tue, 19 Nov 2019 09:45:11 +0800 From: "Li, WenjieX A" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: Olivier Matz , Andrew Rybchenko , "david.marchand@redhat.com" , "stable@dpdk.org" , "Chen, BoX C" Thread-Topic: [dpdk-stable] [PATCH 2/2] mempool: remove check for bad IOVA when populating Thread-Index: AQHVmvOkWg7uyTvgm0mt6Ydv4w0tjKeRv/LA Date: Tue, 19 Nov 2019 01:45:10 +0000 Message-ID: <8688172CD5C0B74590FAE19D9579F94B537E95DE@SHSMSX103.ccr.corp.intel.com> References: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 2/2] mempool: remove check for bad IOVA when populating 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" Tested-by: Chen, BoX C > -----Original Message----- > From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Anatoly Burako= v > Sent: Thursday, November 14, 2019 9:58 PM > To: dev@dpdk.org > Cc: Olivier Matz ; Andrew Rybchenko > ; david.marchand@redhat.com; stable@dpdk.org > Subject: [dpdk-stable] [PATCH 2/2] mempool: remove check for bad IOVA whe= n > populating >=20 > Currently, mempool will check if IOVA is bad for a segment, and reject th= e IOVA > if hugepages are also enabled. This check is wrong because now that we ha= ve > external memory segments, they are allowed to have their IOVA's to be inv= alid. > This check also doesn't make much sense in the first place, because the > following code can handle bad IOVA's perfectly well (and in fact, this ch= eck is > not triggering a failure when --no-huge option is enabled), so there is n= ot much > sense to check for this in the first place. >=20 > Fixes: 950e8fb4e194 ("mem: allow registering external memory areas") > Cc: stable@dpdk.org >=20 > Signed-off-by: Anatoly Burakov > --- >=20 > Notes: > An alternative implementation would be to add a socket ID check to se= e > if the memory being allocated from belongs to an external segment. >=20 > lib/librte_mempool/rte_mempool.c | 5 ----- > 1 file changed, 5 deletions(-) >=20 > diff --git a/lib/librte_mempool/rte_mempool.c > b/lib/librte_mempool/rte_mempool.c > index 8da2e471c7..78d8eb941e 100644 > --- a/lib/librte_mempool/rte_mempool.c > +++ b/lib/librte_mempool/rte_mempool.c > @@ -390,11 +390,6 @@ rte_mempool_populate_virt(struct rte_mempool *mp, > char *addr, >=20 > iova =3D get_iova(addr + off); >=20 > - if (iova =3D=3D RTE_BAD_IOVA && rte_eal_has_hugepages()) { > - ret =3D -EINVAL; > - goto fail; > - } > - > /* populate with the largest group of contiguous pages */ > for (phys_len =3D RTE_MIN( > (size_t)(RTE_PTR_ALIGN_CEIL(addr + off + 1, pg_sz) - > -- > 2.17.1