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

Function mempool_audit_cache

dpdk/lib/mempool/rte_mempool.c:1190–1208  ·  view source on GitHub ↗

check cookies before and after objects */

Source from the content-addressed store, hash-verified

1188
1189/* check cookies before and after objects */
1190static void
1191mempool_audit_cache(const struct rte_mempool *mp)
1192{
1193 /* check cache size consistency */
1194 unsigned lcore_id;
1195
1196 if (mp->cache_size == 0)
1197 return;
1198
1199 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1200 const struct rte_mempool_cache *cache;
1201 cache = &mp->local_cache[lcore_id];
1202 if (cache->len > RTE_DIM(cache->objs)) {
1203 RTE_LOG(CRIT, MEMPOOL, "badness on cache[%u]\n",
1204 lcore_id);
1205 rte_panic("MEMPOOL: invalid cache len\n");
1206 }
1207 }
1208}
1209
1210/* check the consistency of mempool (size, cookies, ...) */
1211void

Callers 1

rte_mempool_auditFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected