Lines Matching refs:cache
139 if (rcu_access_pointer(local_storage->cache[smap->cache_idx]) == in bpf_selem_unlink_storage_nolock()
141 RCU_INIT_POINTER(local_storage->cache[smap->cache_idx], NULL); in bpf_selem_unlink_storage_nolock()
222 sdata = rcu_dereference(local_storage->cache[smap->cache_idx]); in bpf_local_storage_lookup()
243 rcu_assign_pointer(local_storage->cache[smap->cache_idx], in bpf_local_storage_lookup()
447 u16 bpf_local_storage_cache_idx_get(struct bpf_local_storage_cache *cache) in bpf_local_storage_cache_idx_get() argument
452 spin_lock(&cache->idx_lock); in bpf_local_storage_cache_idx_get()
455 if (cache->idx_usage_counts[i] < min_usage) { in bpf_local_storage_cache_idx_get()
456 min_usage = cache->idx_usage_counts[i]; in bpf_local_storage_cache_idx_get()
464 cache->idx_usage_counts[res]++; in bpf_local_storage_cache_idx_get()
466 spin_unlock(&cache->idx_lock); in bpf_local_storage_cache_idx_get()
471 void bpf_local_storage_cache_idx_free(struct bpf_local_storage_cache *cache, in bpf_local_storage_cache_idx_free() argument
474 spin_lock(&cache->idx_lock); in bpf_local_storage_cache_idx_free()
475 cache->idx_usage_counts[idx]--; in bpf_local_storage_cache_idx_free()
476 spin_unlock(&cache->idx_lock); in bpf_local_storage_cache_idx_free()