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

Function mlx5_ipool_malloc_cache

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

Source from the content-addressed store, hash-verified

429}
430
431static void *
432mlx5_ipool_malloc_cache(struct mlx5_indexed_pool *pool, uint32_t *idx)
433{
434 void *entry;
435 int cidx;
436
437 cidx = rte_lcore_index(rte_lcore_id());
438 if (unlikely(cidx == -1)) {
439 cidx = RTE_MAX_LCORE;
440 rte_spinlock_lock(&pool->lcore_lock);
441 }
442 entry = _mlx5_ipool_malloc_cache(pool, cidx, idx);
443 if (unlikely(cidx == RTE_MAX_LCORE))
444 rte_spinlock_unlock(&pool->lcore_lock);
445 return entry;
446}
447
448static void
449_mlx5_ipool_free_cache(struct mlx5_indexed_pool *pool, int cidx, uint32_t idx)

Callers 1

mlx5_ipool_mallocFunction · 0.85

Calls 5

rte_lcore_indexFunction · 0.85
rte_lcore_idFunction · 0.85
_mlx5_ipool_malloc_cacheFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected