* Test if the mempool is empty. * * When cache is enabled, this function has to browse the length of all * lcores, so it should not be used in a data path, but only for debug * purposes. User-owned mempool caches are not accounted for. * * @param mp * A pointer to the mempool structure. * @return * - 1: The mempool is empty. * - 0: The mempool is not empty. */
| 1805 | * - 0: The mempool is not empty. |
| 1806 | */ |
| 1807 | static inline int |
| 1808 | rte_mempool_empty(const struct rte_mempool *mp) |
| 1809 | { |
| 1810 | return rte_mempool_avail_count(mp) == 0; |
| 1811 | } |
| 1812 | |
| 1813 | /** |
| 1814 | * Return the IO address of elt, which is an element of the pool mp. |