From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 0ADE5F72 for ; Wed, 2 Nov 2016 11:21:14 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 02 Nov 2016 03:21:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,583,1473145200"; d="scan'208";a="26465735" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga006.fm.intel.com with ESMTP; 02 Nov 2016 03:21:13 -0700 From: Yuanhan Liu To: Wei Dai Date: Wed, 2 Nov 2016 18:21:22 +0800 Message-Id: <1478082097-16957-26-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1478082097-16957-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1478082097-16957-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: Olivier Matz , dpdk stable Subject: [dpdk-stable] patch 'mempool: fix search of maximum contiguous pages' has been queued to stable release 16.07.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 10:21:15 -0000 Hi, FYI, your patch has been queued to stable release 16.07.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/06/16. So please shout if anyone has objections. Thanks. --yliu --- >>From e943ffdef5a216ec46f99d7114b536f7678fbe0c Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Tue, 25 Oct 2016 17:01:11 +0200 Subject: [PATCH] mempool: fix search of maximum contiguous pages [ upstream commit 1e975578bc30a84547b62bd682b03f8f08bf3a38 ] paddr[i] + pg_sz always points to the start physical address of the 2nd page after pddr[i], so only up to 2 pages can be combinded to be used. With this revision, more than 2 pages can be used. Fixes: 84121f197187 ("mempool: store memory chunks in a list") Signed-off-by: Wei Dai Signed-off-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 350d77a..411a332 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -429,7 +429,7 @@ rte_mempool_populate_phys_tab(struct rte_mempool *mp, char *vaddr, /* populate with the largest group of contiguous pages */ for (n = 1; (i + n) < pg_num && - paddr[i] + pg_sz == paddr[i+n]; n++) + paddr[i + n - 1] + pg_sz == paddr[i + n]; n++) ; ret = rte_mempool_populate_phys(mp, vaddr + i * pg_sz, -- 1.9.0