| 294 | } |
| 295 | |
| 296 | static int |
| 297 | mempool_ops_alloc_once(struct rte_mempool *mp) |
| 298 | { |
| 299 | int ret; |
| 300 | |
| 301 | /* create the internal ring if not already done */ |
| 302 | if ((mp->flags & RTE_MEMPOOL_F_POOL_CREATED) == 0) { |
| 303 | ret = rte_mempool_ops_alloc(mp); |
| 304 | if (ret != 0) |
| 305 | return ret; |
| 306 | mp->flags |= RTE_MEMPOOL_F_POOL_CREATED; |
| 307 | } |
| 308 | return 0; |
| 309 | } |
| 310 | |
| 311 | /* Add objects in the pool, using a physically contiguous memory |
| 312 | * zone. Return the number of objects added, or a negative value |
no test coverage detected