Lines Matching refs:cipso_v4_cache
82 static struct cipso_v4_map_cache_bkt *cipso_v4_cache = NULL;
250 cipso_v4_cache = kcalloc(CIPSO_V4_CACHE_BUCKETS,
253 if (cipso_v4_cache == NULL)
257 spin_lock_init(&cipso_v4_cache[iter].lock);
258 cipso_v4_cache[iter].size = 0;
259 INIT_LIST_HEAD(&cipso_v4_cache[iter].list);
279 spin_lock_bh(&cipso_v4_cache[iter].lock);
282 &cipso_v4_cache[iter].list, list) {
286 cipso_v4_cache[iter].size = 0;
287 spin_unlock_bh(&cipso_v4_cache[iter].lock);
327 spin_lock_bh(&cipso_v4_cache[bkt].lock);
328 list_for_each_entry(entry, &cipso_v4_cache[bkt].list, list) {
338 spin_unlock_bh(&cipso_v4_cache[bkt].lock);
353 spin_unlock_bh(&cipso_v4_cache[bkt].lock);
358 spin_unlock_bh(&cipso_v4_cache[bkt].lock);
406 spin_lock_bh(&cipso_v4_cache[bkt].lock);
407 if (cipso_v4_cache[bkt].size < cipso_v4_cache_bucketsize) {
408 list_add(&entry->list, &cipso_v4_cache[bkt].list);
409 cipso_v4_cache[bkt].size += 1;
411 old_entry = list_entry(cipso_v4_cache[bkt].list.prev,
414 list_add(&entry->list, &cipso_v4_cache[bkt].list);
417 spin_unlock_bh(&cipso_v4_cache[bkt].lock);