dump the cache status */
| 1033 | |
| 1034 | /* dump the cache status */ |
| 1035 | static unsigned |
| 1036 | rte_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" |