* @internal wrapper for mempool_ops enqueue callback. * * @param mp * Pointer to the memory pool. * @param obj_table * Pointer to a table of void * pointers (objects). * @param n * Number of objects to put. * @return * - 0: Success; n objects supplied. * - <0: Error; code of enqueue function. */
| 827 | * - <0: Error; code of enqueue function. |
| 828 | */ |
| 829 | static inline int |
| 830 | rte_mempool_ops_enqueue_bulk(struct rte_mempool *mp, void * const *obj_table, |
| 831 | unsigned n) |
| 832 | { |
| 833 | struct rte_mempool_ops *ops; |
| 834 | int ret; |
| 835 | |
| 836 | RTE_MEMPOOL_STAT_ADD(mp, put_common_pool_bulk, 1); |
| 837 | RTE_MEMPOOL_STAT_ADD(mp, put_common_pool_objs, n); |
| 838 | rte_mempool_trace_ops_enqueue_bulk(mp, obj_table, n); |
| 839 | ops = rte_mempool_get_ops(mp->ops_index); |
| 840 | ret = ops->enqueue(mp, obj_table, n); |
| 841 | #ifdef RTE_LIBRTE_MEMPOOL_DEBUG |
| 842 | if (unlikely(ret < 0)) |
| 843 | RTE_LOG(CRIT, MEMPOOL, "cannot enqueue %u objects to mempool %s\n", |
| 844 | n, mp->name); |
| 845 | #endif |
| 846 | return ret; |
| 847 | } |
| 848 | |
| 849 | /** |
| 850 | * @internal wrapper for mempool_ops get_count callback. |
no test coverage detected