From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from netronome.com (host-79-78-33-110.static.as9105.net [79.78.33.110]) by dpdk.org (Postfix) with ESMTP id D888E10A3 for ; Wed, 31 Oct 2018 18:29:31 +0100 (CET) Received: from netronome.com (localhost [127.0.0.1]) by netronome.com (8.15.2/8.15.2/Debian-10) with ESMTP id w9VHTV8Z011949 for ; Wed, 31 Oct 2018 17:29:31 GMT Received: (from root@localhost) by netronome.com (8.15.2/8.15.2/Submit) id w9VHTVtn011948 for dev@dpdk.org; Wed, 31 Oct 2018 17:29:31 GMT From: Alejandro Lucero To: dev@dpdk.org Date: Wed, 31 Oct 2018 17:29:25 +0000 Message-Id: <20181031172931.11894-2-alejandro.lucero@netronome.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031172931.11894-1-alejandro.lucero@netronome.com> References: <20181031172931.11894-1-alejandro.lucero@netronome.com> Subject: [dpdk-dev] [PATCH 1/7] mem: fix call to DMA mask check 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: , X-List-Received-Date: Wed, 31 Oct 2018 17:29:32 -0000 The param needs to be the maskbits and not the mask. Fixes: 223b7f1d5ef6 ("mem: add function for checking memseg IOVA") Signed-off-by: Alejandro Lucero --- lib/librte_eal/common/malloc_heap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c index 1973b6e6e..0adab62ae 100644 --- a/lib/librte_eal/common/malloc_heap.c +++ b/lib/librte_eal/common/malloc_heap.c @@ -323,8 +323,7 @@ alloc_pages_on_heap(struct malloc_heap *heap, uint64_t pg_sz, size_t elt_size, } if (mcfg->dma_maskbits) { - mask = ~((1ULL << mcfg->dma_maskbits) - 1); - if (rte_eal_check_dma_mask(mask)) { + if (rte_eal_check_dma_mask(mcfg->dma_maskbits)) { RTE_LOG(ERR, EAL, "%s(): couldn't allocate memory due to DMA mask\n", __func__); -- 2.17.1