summaryrefslogtreecommitdiffstats
path: root/lib/librte_mempool/rte_mempool.c
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo.salveti@linaro.org>2016-07-26 14:11:48 -0300
committerRicardo Salveti <ricardo.salveti@linaro.org>2016-07-26 14:12:04 -0300
commit6380daca5bd4e1740ad8afd0224f7bcbe5626ec7 (patch)
tree483ec63053763494272e9ef1018261eb77fd97b8 /lib/librte_mempool/rte_mempool.c
parent7b53c036e6bf56623b8273018ff1c8cc62847857 (diff)
Imported Upstream version 16.07-rc5
Change-Id: I3f93dd2982ddb9c0209bc44466d05a2320175938 Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Diffstat (limited to 'lib/librte_mempool/rte_mempool.c')
-rw-r--r--lib/librte_mempool/rte_mempool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 8806633b..2e28e2e8 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -1283,12 +1283,13 @@ void rte_mempool_walk(void (*func)(struct rte_mempool *, void *),
{
struct rte_tailq_entry *te = NULL;
struct rte_mempool_list *mempool_list;
+ void *tmp_te;
mempool_list = RTE_TAILQ_CAST(rte_mempool_tailq.head, rte_mempool_list);
rte_rwlock_read_lock(RTE_EAL_MEMPOOL_RWLOCK);
- TAILQ_FOREACH(te, mempool_list, next) {
+ TAILQ_FOREACH_SAFE(te, mempool_list, next, tmp_te) {
(*func)((struct rte_mempool *) te->data, arg);
}