Searched refs:cipso_v4_cache (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/net/ipv4/
H A Dcipso_ipv4.c87 static struct cipso_v4_map_cache_bkt *cipso_v4_cache; variable in typeref:struct:cipso_v4_map_cache_bkt
255 cipso_v4_cache = kcalloc(CIPSO_V4_CACHE_BUCKETS, cipso_v4_cache_init()
258 if (!cipso_v4_cache) cipso_v4_cache_init()
262 spin_lock_init(&cipso_v4_cache[iter].lock); cipso_v4_cache_init()
263 cipso_v4_cache[iter].size = 0; cipso_v4_cache_init()
264 INIT_LIST_HEAD(&cipso_v4_cache[iter].list); cipso_v4_cache_init()
284 spin_lock_bh(&cipso_v4_cache[iter].lock); cipso_v4_cache_invalidate()
287 &cipso_v4_cache[iter].list, list) { cipso_v4_cache_invalidate()
291 cipso_v4_cache[iter].size = 0; cipso_v4_cache_invalidate()
292 spin_unlock_bh(&cipso_v4_cache[iter].lock); cipso_v4_cache_invalidate()
332 spin_lock_bh(&cipso_v4_cache[bkt].lock); cipso_v4_cache_check()
333 list_for_each_entry(entry, &cipso_v4_cache[bkt].list, list) { cipso_v4_cache_check()
343 spin_unlock_bh(&cipso_v4_cache[bkt].lock); cipso_v4_cache_check()
358 spin_unlock_bh(&cipso_v4_cache[bkt].lock); cipso_v4_cache_check()
363 spin_unlock_bh(&cipso_v4_cache[bkt].lock); cipso_v4_cache_check()
409 spin_lock_bh(&cipso_v4_cache[bkt].lock); cipso_v4_cache_add()
410 if (cipso_v4_cache[bkt].size < cipso_v4_cache_bucketsize) { cipso_v4_cache_add()
411 list_add(&entry->list, &cipso_v4_cache[bkt].list); cipso_v4_cache_add()
412 cipso_v4_cache[bkt].size += 1; cipso_v4_cache_add()
414 old_entry = list_entry(cipso_v4_cache[bkt].list.prev, cipso_v4_cache_add()
417 list_add(&entry->list, &cipso_v4_cache[bkt].list); cipso_v4_cache_add()
420 spin_unlock_bh(&cipso_v4_cache[bkt].lock); cipso_v4_cache_add()

Completed in 36 milliseconds