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

Function rte_mempool_dump_cache

dpdk/lib/mempool/rte_mempool.c:1035–1056  ·  view source on GitHub ↗

dump the cache status */

Source from the content-addressed store, hash-verified

1033
1034/* dump the cache status */
1035static unsigned
1036rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp)
1037{
1038 unsigned lcore_id;
1039 unsigned count = 0;
1040 unsigned cache_count;
1041
1042 fprintf(f, " internal cache infos:\n");
1043 fprintf(f, " cache_size=%"PRIu32"\n", mp->cache_size);
1044
1045 if (mp->cache_size == 0)
1046 return count;
1047
1048 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1049 cache_count = mp->local_cache[lcore_id].len;
1050 fprintf(f, " cache_count[%u]=%"PRIu32"\n",
1051 lcore_id, cache_count);
1052 count += cache_count;
1053 }
1054 fprintf(f, " total_cache_count=%u\n", count);
1055 return count;
1056}
1057
1058#ifndef __INTEL_COMPILER
1059#pragma GCC diagnostic ignored "-Wcast-qual"

Callers 1

rte_mempool_dumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected