Lines Matching refs:cache
159 if (rcu_access_pointer(local_storage->cache[smap->cache_idx]) == in bpf_selem_unlink_storage_nolock()
161 RCU_INIT_POINTER(local_storage->cache[smap->cache_idx], NULL); in bpf_selem_unlink_storage_nolock()
255 sdata = rcu_dereference_check(local_storage->cache[smap->cache_idx], in bpf_local_storage_lookup()
280 rcu_assign_pointer(local_storage->cache[smap->cache_idx], in bpf_local_storage_lookup()
504 u16 bpf_local_storage_cache_idx_get(struct bpf_local_storage_cache *cache) in bpf_local_storage_cache_idx_get() argument
509 spin_lock(&cache->idx_lock); in bpf_local_storage_cache_idx_get()
512 if (cache->idx_usage_counts[i] < min_usage) { in bpf_local_storage_cache_idx_get()
513 min_usage = cache->idx_usage_counts[i]; in bpf_local_storage_cache_idx_get()
521 cache->idx_usage_counts[res]++; in bpf_local_storage_cache_idx_get()
523 spin_unlock(&cache->idx_lock); in bpf_local_storage_cache_idx_get()
528 void bpf_local_storage_cache_idx_free(struct bpf_local_storage_cache *cache, in bpf_local_storage_cache_idx_free() argument
531 spin_lock(&cache->idx_lock); in bpf_local_storage_cache_idx_free()
532 cache->idx_usage_counts[idx]--; in bpf_local_storage_cache_idx_free()
533 spin_unlock(&cache->idx_lock); in bpf_local_storage_cache_idx_free()