| 194 | } |
| 195 | |
| 196 | int |
| 197 | rte_comp_op_bulk_alloc(struct rte_mempool *mempool, |
| 198 | struct rte_comp_op **ops, uint16_t nb_ops) |
| 199 | { |
| 200 | int retval; |
| 201 | uint16_t i; |
| 202 | |
| 203 | retval = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops); |
| 204 | if (unlikely(retval != nb_ops)) |
| 205 | return 0; |
| 206 | |
| 207 | for (i = 0; i < nb_ops; i++) |
| 208 | rte_comp_op_reset(ops[i]); |
| 209 | |
| 210 | return nb_ops; |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * free operation structure |