call mem_cb() for each mempool memory chunk */
| 197 | |
| 198 | /* call mem_cb() for each mempool memory chunk */ |
| 199 | uint32_t |
| 200 | rte_mempool_mem_iter(struct rte_mempool *mp, |
| 201 | rte_mempool_mem_cb_t *mem_cb, void *mem_cb_arg) |
| 202 | { |
| 203 | struct rte_mempool_memhdr *hdr; |
| 204 | unsigned n = 0; |
| 205 | |
| 206 | STAILQ_FOREACH(hdr, &mp->mem_list, next) { |
| 207 | mem_cb(mp, mem_cb_arg, hdr, n); |
| 208 | n++; |
| 209 | } |
| 210 | |
| 211 | return n; |
| 212 | } |
| 213 | |
| 214 | /* get the header, trailer and total size of a mempool element. */ |
| 215 | uint32_t |
no outgoing calls