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

Function rte_mempool_cache_flush

dpdk/lib/mempool/rte_mempool.h:1342–1353  ·  view source on GitHub ↗

* Flush a user-owned mempool cache to the specified mempool. * * @param cache * A pointer to the mempool cache. * @param mp * A pointer to the mempool. */

Source from the content-addressed store, hash-verified

1340 * A pointer to the mempool.
1341 */
1342static __rte_always_inline void
1343rte_mempool_cache_flush(struct rte_mempool_cache *cache,
1344 struct rte_mempool *mp)
1345{
1346 if (cache == NULL)
1347 cache = rte_mempool_default_cache(mp, rte_lcore_id());
1348 if (cache == NULL || cache->len == 0)
1349 return;
1350 rte_mempool_trace_cache_flush(cache, mp);
1351 rte_mempool_ops_enqueue_bulk(mp, cache->objs, cache->len);
1352 cache->len = 0;
1353}
1354
1355/**
1356 * @internal Put several objects back in the mempool; used internally.

Callers 3

ena_queue_startFunction · 0.85
per_lcore_mempool_testFunction · 0.85
test_mempool_basicFunction · 0.85

Calls 3

rte_lcore_idFunction · 0.85

Tested by 2

per_lcore_mempool_testFunction · 0.68
test_mempool_basicFunction · 0.68