* Get several objects from the mempool. * * If cache is enabled, objects will be retrieved first from cache, * subsequently from the common pool. Note that it can return -ENOENT when * the local cache and common pool are empty, even if cache from other * lcores are full. * * @param mp * A pointer to the mempool structure. * @param obj_table * A pointer to a table of void * pointers (
| 1633 | * - -ENOENT: Not enough entries in the mempool; no object is retrieved. |
| 1634 | */ |
| 1635 | static __rte_always_inline int |
| 1636 | rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table, |
| 1637 | unsigned int n, struct rte_mempool_cache *cache) |
| 1638 | { |
| 1639 | int ret; |
| 1640 | ret = rte_mempool_do_generic_get(mp, obj_table, n, cache); |
| 1641 | if (ret == 0) |
| 1642 | RTE_MEMPOOL_CHECK_COOKIES(mp, obj_table, n, 1); |
| 1643 | rte_mempool_trace_generic_get(mp, obj_table, n, cache); |
| 1644 | return ret; |
| 1645 | } |
| 1646 | |
| 1647 | /** |
| 1648 | * Get several objects from the mempool. |