check cookies before and after objects */
| 1188 | |
| 1189 | /* check cookies before and after objects */ |
| 1190 | static void |
| 1191 | mempool_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, ...) */ |
| 1211 | void |