MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_ipool_get_cache

Function mlx5_ipool_get_cache

dpdk/drivers/net/mlx5/mlx5_utils.c:388–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388static void *
389mlx5_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
406static void *

Callers 2

mlx5_ipool_getFunction · 0.85

Calls 5

rte_lcore_indexFunction · 0.85
rte_lcore_idFunction · 0.85
_mlx5_ipool_get_cacheFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected