[dpdk-dev] [PATCH 3/5] mempool: add walk iterator
Olivier MATZ
olivier.matz at 6wind.com
Fri May 16 14:36:44 CEST 2014
Hi Stephen,
> +void rte_mempool_walk(void (*func)(const struct rte_mempool *, void *),
> + void *arg)
> +{
> + struct rte_mempool *mp = NULL;
> + struct rte_mempool_list *mempool_list;
> +
> + if ((mempool_list =
> + RTE_TAILQ_LOOKUP_BY_IDX(RTE_TAILQ_MEMPOOL, rte_mempool_list)) == NULL) {
> + rte_errno = E_RTE_NO_TAILQ;
> + return;
> + }
At the first read, I thought it was better to return -E_RTE_NO_TAILQ
instead of returning void and setting rte_errno. But it seems it's the
usage, for instance in rte_ring_list_dump().
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
More information about the dev
mailing list