DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] mempool: notify mempool area after mempool alloc
@ 2017-12-15 16:00 Pavan Nikhilesh
  2017-12-15 16:00 ` [dpdk-dev] [PATCH 2/2] mempool/octeontx: clean up memory area registration Pavan Nikhilesh
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Pavan Nikhilesh @ 2017-12-15 16:00 UTC (permalink / raw)
  To: santosh.shukla, olivier.matz; +Cc: dev, Pavan Nikhilesh

Mempool creation needs to be completed first before notifying mempool to
register the mempool area.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-01-12 17:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-15 16:00 [dpdk-dev] [PATCH 1/2] mempool: notify mempool area after mempool alloc Pavan Nikhilesh
2017-12-15 16:00 ` [dpdk-dev] [PATCH 2/2] mempool/octeontx: clean up memory area registration Pavan Nikhilesh
2017-12-18  5:00   ` santosh
2017-12-18 21:54     ` Pavan Nikhilesh
2017-12-18  4:56 ` [dpdk-dev] [PATCH 1/2] mempool: notify mempool area after mempool alloc santosh
2017-12-19 18:09 ` [dpdk-dev] [PATCH v2 " Pavan Nikhilesh
2017-12-19 18:09   ` [dpdk-dev] [PATCH v2 2/2] mempool/octeontx: clean up memory area registration Pavan Nikhilesh
2017-12-22 15:11 ` [dpdk-dev] [PATCH 1/2] mempool: notify mempool area after mempool alloc Olivier MATZ
2017-12-24  7:07   ` Pavan Nikhilesh
2017-12-24 12:47 ` [dpdk-dev] [PATCH v3 1/2] mempool: fix first memory area notification Pavan Nikhilesh
2017-12-24 12:47   ` [dpdk-dev] [PATCH v3 2/2] mempool/octeontx: fix memory area registration Pavan Nikhilesh
2018-01-12 17:36   ` [dpdk-dev] [PATCH v3 1/2] mempool: fix first memory area notification Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).