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 083ECA04C6; Thu, 14 Nov 2019 14:58:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 206052C27; Thu, 14 Nov 2019 14:58:28 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 8AA34374; Thu, 14 Nov 2019 14:58:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2019 05:58:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,304,1569308400"; d="scan'208";a="404980525" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.151]) by fmsmga005.fm.intel.com with ESMTP; 14 Nov 2019 05:58:23 -0800 From: Anatoly Burakov To: dev@dpdk.org Cc: Olivier Matz , Andrew Rybchenko , david.marchand@redhat.com, stable@dpdk.org Date: Thu, 14 Nov 2019 13:58:21 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> References: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> In-Reply-To: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> References: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [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" Currently, mempool will check if IOVA is bad for a segment, and reject the IOVA if hugepages are also enabled. This check is wrong because now that we have external memory segments, they are allowed to have their IOVA's to be invalid. 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 check is not triggering a failure when --no-huge option is enabled), so there is not much sense to check for this in the first place. Fixes: 950e8fb4e194 ("mem: allow registering external memory areas") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov --- Notes: An alternative implementation would be to add a socket ID check to see if the memory being allocated from belongs to an external segment. lib/librte_mempool/rte_mempool.c | 5 ----- 1 file changed, 5 deletions(-) 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, iova = get_iova(addr + off); - if (iova == RTE_BAD_IOVA && rte_eal_has_hugepages()) { - ret = -EINVAL; - goto fail; - } - /* populate with the largest group of contiguous pages */ for (phys_len = RTE_MIN( (size_t)(RTE_PTR_ALIGN_CEIL(addr + off + 1, pg_sz) - -- 2.17.1