From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: santosh.shukla@caviumnetworks.com, olivier.matz@6wind.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 1/2] mempool: notify mempool area after mempool alloc
Date: Fri, 15 Dec 2017 21:30:30 +0530 [thread overview]
Message-ID: <20171215160031.11354-1-pbhagavatula@caviumnetworks.com> (raw)
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
next reply other threads:[~2017-12-15 16:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 16:00 Pavan Nikhilesh [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171215160031.11354-1-pbhagavatula@caviumnetworks.com \
--to=pbhagavatula@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=santosh.shukla@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).