Lines Matching refs:bkt
238 u32 bkt; in cipso_v4_cache_check() local
247 bkt = hash & (CIPSO_V4_CACHE_BUCKETS - 1); in cipso_v4_cache_check()
248 spin_lock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check()
249 list_for_each_entry(entry, &cipso_v4_cache[bkt].list, list) { in cipso_v4_cache_check()
259 spin_unlock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check()
274 spin_unlock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check()
279 spin_unlock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check()
301 u32 bkt; in cipso_v4_cache_add() local
324 bkt = entry->hash & (CIPSO_V4_CACHE_BUCKETS - 1); in cipso_v4_cache_add()
325 spin_lock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_add()
326 if (cipso_v4_cache[bkt].size < cipso_v4_cache_bucketsize) { in cipso_v4_cache_add()
327 list_add(&entry->list, &cipso_v4_cache[bkt].list); in cipso_v4_cache_add()
328 cipso_v4_cache[bkt].size += 1; in cipso_v4_cache_add()
330 old_entry = list_entry(cipso_v4_cache[bkt].list.prev, in cipso_v4_cache_add()
333 list_add(&entry->list, &cipso_v4_cache[bkt].list); in cipso_v4_cache_add()
336 spin_unlock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_add()