From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 9274C1B1B4 for ; Wed, 24 Jan 2018 16:36:48 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 30A2B223AC; Wed, 24 Jan 2018 10:36:48 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:36:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=sV0bfODV++oZUJvL+ hgfHU+MDUf2DXuMYxATgbcHMJA=; b=nnBH08XP9BlA6hIiN5VglE/uxag4XnoqX UBlt5it+f3S/wAJUW3nPGgMv5FQJLOxM283vKOHqhnZFSH4+xow66Rk9nLKM7Pyz 6NAzGUBPlrmucMlUpYPKGcExYOG+th5NUcdkzDR/wML1tKLPUrPrOvTKJViTnIlc TqFvWAlQg/vuzrkiunsApWFTFLIp97ZKJIQYEMqH2B6XvHp74iFbA8hxWTUGVeHz uDWEfCH1B9Q1EhPf9zaCGm0LMKAI/YUrC7VEupZn+8TeLOG6antXq2dmMZdxqliT dTk+YHtGPM5gRQ9emdXRGOUWYsAfnv+t+EHNMu+GolSBsib48rgag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=sV0bfODV++oZUJvL+hgfHU+MDUf2DXuMYxATgbcHMJA=; b=axOQQiQx YYwVKi0lK/wfxRGLK0v4nLR6nyaRZck2LjPERdTW6OiuNps0N3892zwSq192MgQM 8A7rAe8S+nGx6h3yWbo3JyuFE64BZ9xcpymDmqvllrnhszrQWkBO3KOw7vK8sd12 RctOtthTBuqGthiOxAvwiyO9Wxpct55FHQShMksOgiv0sQ+8MA253raIBwqwI5m/ r+E89DAiSp51Z6QDG2ScM+IyPTVXNs4AMfiU2qB+GKSnE1y7ZP6Sy3RJNJIsanZ/ Y3WW1FTIUB8X4zsugJnHZ4Ar0DUW/YQ1+AoF13wXYLuoHQd2UVGMKcls2jStyKfb 30T4nnztDeXyog== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 6870A7E448; Wed, 24 Jan 2018 10:36:46 -0500 (EST) From: Yuanhan Liu To: Pavan Nikhilesh Cc: Santosh Shukla , dpdk stable Date: Wed, 24 Jan 2018 23:31:30 +0800 Message-Id: <1516808026-25523-22-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'mempool: fix first memory area notification' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 15:36:48 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 067290d2e49e1cbed648856128a6d915306de1e4 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Sun, 24 Dec 2017 18:17:55 +0530 Subject: [PATCH] mempool: fix first memory area notification [ upstream commit be2d94e5ebe9210d10389ad0646529300363833b ] Mempool creation needs to be completed first before notifying mempool to register the mempool area. Fixes: 12b8cc1a7e86 ("mempool: notify memory area to pool") Signed-off-by: Pavan Nikhilesh Acked-by: Santosh Shukla --- lib/librte_mempool/rte_mempool.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index d50dba4..6d17022 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -367,11 +367,6 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr, struct rte_mempool_memhdr *memhdr; int ret; - /* Notify memory area to mempool */ - ret = rte_mempool_ops_register_memory_area(mp, vaddr, iova, len); - if (ret != -ENOTSUP && ret < 0) - return ret; - /* create the internal ring if not already done */ if ((mp->flags & MEMPOOL_F_POOL_CREATED) == 0) { ret = rte_mempool_ops_alloc(mp); @@ -380,6 +375,11 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr, mp->flags |= MEMPOOL_F_POOL_CREATED; } + /* Notify memory area to mempool */ + ret = rte_mempool_ops_register_memory_area(mp, vaddr, iova, len); + if (ret != -ENOTSUP && ret < 0) + return ret; + /* mempool is already populated */ if (mp->populated_size >= mp->size) return -ENOSPC; -- 2.7.4