Searched refs:cands (Results 1 – 7 of 7) sorted by relevance
/openbmc/linux/kernel/bpf/ |
H A D | btf.c | 8138 } cands[]; member 8141 static void bpf_free_cands(struct bpf_cand_cache *cands) in bpf_free_cands() argument 8143 if (!cands->cnt) in bpf_free_cands() 8146 kfree(cands); in bpf_free_cands() 8149 static void bpf_free_cands_from_cache(struct bpf_cand_cache *cands) in bpf_free_cands_from_cache() argument 8151 kfree(cands->name); in bpf_free_cands_from_cache() 8152 kfree(cands); in bpf_free_cands_from_cache() 8176 bpf_log(log, "%d", cc->cands[j].id); in __print_cand_cache() 8195 static u32 hash_cands(struct bpf_cand_cache *cands) in hash_cands() argument 8197 return jhash(cands->name, cands->name_len, 0); in hash_cands() [all …]
|
/openbmc/linux/tools/lib/bpf/ |
H A D | relo_core.h | 16 struct bpf_core_cand *cands; member 85 struct bpf_core_cand_list *cands,
|
H A D | relo_core.c | 1284 struct bpf_core_cand_list *cands, in bpf_core_calc_relo_insn() argument 1337 for (i = 0, j = 0; i < cands->len; i++) { in bpf_core_calc_relo_insn() 1338 err = bpf_core_spec_match(local_spec, cands->cands[i].btf, in bpf_core_calc_relo_insn() 1339 cands->cands[i].id, cand_spec); in bpf_core_calc_relo_insn() 1384 cands->cands[j++] = cands->cands[i]; in bpf_core_calc_relo_insn() 1396 cands->len = j; in bpf_core_calc_relo_insn()
|
H A D | libbpf_internal.h | 578 struct bpf_core_cand_list *cands); 579 void bpf_core_free_cands(struct bpf_core_cand_list *cands);
|
H A D | libbpf.c | 5446 void bpf_core_free_cands(struct bpf_core_cand_list *cands) in bpf_core_free_cands() argument 5448 if (!cands) in bpf_core_free_cands() 5451 free(cands->cands); in bpf_core_free_cands() 5452 free(cands); in bpf_core_free_cands() 5460 struct bpf_core_cand_list *cands) in bpf_core_add_cands() argument 5492 new_cands = libbpf_reallocarray(cands->cands, cands->len + 1, in bpf_core_add_cands() 5493 sizeof(*cands->cands)); in bpf_core_add_cands() 5497 cand = &new_cands[cands->len]; in bpf_core_add_cands() 5501 cands->cands = new_cands; in bpf_core_add_cands() 5502 cands->len++; in bpf_core_add_cands() [all …]
|
/openbmc/linux/tools/bpf/bpftool/ |
H A D | gen.c | 2002 struct bpf_core_cand_list *cands = NULL; in btfgen_find_cands() local 2024 cands = calloc(1, sizeof(*cands)); in btfgen_find_cands() 2025 if (!cands) in btfgen_find_cands() 2028 err = bpf_core_add_cands(&local_cand, local_essent_len, targ_btf, "vmlinux", 1, cands); in btfgen_find_cands() 2032 return cands; in btfgen_find_cands() 2035 bpf_core_free_cands(cands); in btfgen_find_cands() 2084 struct bpf_core_cand_list *cands = NULL; in btfgen_record_obj() local 2088 !hashmap__find(cand_cache, relo->type_id, &cands)) { in btfgen_record_obj() 2089 cands = btfgen_find_cands(btf, info->src_btf, relo->type_id); in btfgen_record_obj() 2090 if (!cands) { in btfgen_record_obj() [all …]
|
/openbmc/linux/net/batman-adv/ |
H A D | distributed-arp-table.c | 560 struct batadv_dat_candidate *cands, in batadv_choose_next_candidate() argument 574 cands[select].type = BATADV_DAT_CANDIDATE_NOT_FOUND; in batadv_choose_next_candidate() 588 if (!batadv_is_orig_node_eligible(cands, select, in batadv_choose_next_candidate() 604 cands[select].type = BATADV_DAT_CANDIDATE_ORIG; in batadv_choose_next_candidate() 605 cands[select].orig_node = max_orig_node; in batadv_choose_next_candidate()
|