Home
last modified time | relevance | path

Searched refs:htab (Results 1 – 1 of 1) sorted by relevance

/kernel/bpf/
Dhashtab.c116 struct bpf_htab *htab; member
130 static inline bool htab_is_prealloc(const struct bpf_htab *htab) in htab_is_prealloc() argument
132 return !(htab->map.map_flags & BPF_F_NO_PREALLOC); in htab_is_prealloc()
135 static inline bool htab_use_raw_lock(const struct bpf_htab *htab) in htab_use_raw_lock() argument
137 return (!IS_ENABLED(CONFIG_PREEMPT_RT) || htab_is_prealloc(htab)); in htab_use_raw_lock()
140 static void htab_init_buckets(struct bpf_htab *htab) in htab_init_buckets() argument
144 for (i = 0; i < htab->n_buckets; i++) { in htab_init_buckets()
145 INIT_HLIST_NULLS_HEAD(&htab->buckets[i].head, i); in htab_init_buckets()
146 if (htab_use_raw_lock(htab)) { in htab_init_buckets()
147 raw_spin_lock_init(&htab->buckets[i].raw_lock); in htab_init_buckets()
[all …]