| 386 | } |
| 387 | |
| 388 | static void * |
| 389 | mlx5_ipool_get_cache(struct mlx5_indexed_pool *pool, uint32_t idx) |
| 390 | { |
| 391 | void *entry; |
| 392 | int cidx; |
| 393 | |
| 394 | cidx = rte_lcore_index(rte_lcore_id()); |
| 395 | if (unlikely(cidx == -1)) { |
| 396 | cidx = RTE_MAX_LCORE; |
| 397 | rte_spinlock_lock(&pool->lcore_lock); |
| 398 | } |
| 399 | entry = _mlx5_ipool_get_cache(pool, cidx, idx); |
| 400 | if (unlikely(cidx == RTE_MAX_LCORE)) |
| 401 | rte_spinlock_unlock(&pool->lcore_lock); |
| 402 | return entry; |
| 403 | } |
| 404 | |
| 405 | |
| 406 | static void * |
no test coverage detected