Lines Matching defs:atype

32 		      enum cgroup_bpf_attach_type atype,
46 array = rcu_dereference(cgrp->effective[atype]);
283 unsigned int atype;
287 for (atype = 0; atype < ARRAY_SIZE(cgrp->bpf.progs); atype++) {
288 struct hlist_head *progs = &cgrp->bpf.progs[atype];
305 static_branch_dec(&cgroup_bpf_enabled_key[atype]);
308 cgrp->bpf.effective[atype],
373 enum cgroup_bpf_attach_type atype)
381 u32 flags = p->bpf.flags[atype];
386 cnt = prog_list_length(&p->bpf.progs[atype]);
402 enum cgroup_bpf_attach_type atype,
413 if (cnt == 0 || (p->bpf.flags[atype] & BPF_F_ALLOW_MULTI))
414 cnt += prog_list_length(&p->bpf.progs[atype]);
426 if (cnt > 0 && !(p->bpf.flags[atype] & BPF_F_ALLOW_MULTI))
429 hlist_for_each_entry(pl, &p->bpf.progs[atype], node) {
446 enum cgroup_bpf_attach_type atype,
449 old_array = rcu_replace_pointer(cgrp->bpf.effective[atype], old_array,
505 enum cgroup_bpf_attach_type atype)
517 err = compute_effective_progs(desc, atype, &desc->bpf.inactive);
534 activate_effective_progs(desc, atype, desc->bpf.inactive);
617 enum cgroup_bpf_attach_type atype;
633 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id);
634 if (atype < 0)
637 progs = &cgrp->bpf.progs[atype];
639 if (!hierarchy_allows_attach(cgrp, atype))
642 if (!hlist_empty(progs) && cgrp->bpf.flags[atype] != saved_flags)
685 cgrp->bpf.flags[atype] = saved_flags;
688 err = bpf_trampoline_link_cgroup_shim(new_prog, atype);
693 err = update_effective_progs(cgrp, atype);
702 static_branch_inc(&cgroup_bpf_enabled_key[atype]);
742 enum cgroup_bpf_attach_type atype,
761 if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI))
764 head = &cg->bpf.progs[atype];
776 desc->bpf.effective[atype],
797 enum cgroup_bpf_attach_type atype;
803 atype = bpf_cgroup_atype_find(link->type, new_prog->aux->attach_btf_id);
804 if (atype < 0)
807 progs = &cgrp->bpf.progs[atype];
822 replace_effective_prog(cgrp, atype, link);
891 * @atype: Type of detach operation
895 enum cgroup_bpf_attach_type atype)
913 if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI))
916 head = &cg->bpf.progs[atype];
930 desc->bpf.effective[atype],
953 enum cgroup_bpf_attach_type atype;
965 atype = bpf_cgroup_atype_find(type, attach_btf_id);
966 if (atype < 0)
969 progs = &cgrp->bpf.progs[atype];
970 flags = cgrp->bpf.flags[atype];
985 if (update_effective_progs(cgrp, atype)) {
989 purge_effective_progs(cgrp, old_prog, link, atype);
998 cgrp->bpf.flags[atype] = 0;
1004 static_branch_dec(&cgroup_bpf_enabled_key[atype]);
1028 enum cgroup_bpf_attach_type atype;
1053 for (atype = from_atype; atype <= to_atype; atype++) {
1055 effective = rcu_dereference_protected(cgrp->bpf.effective[atype],
1059 total_cnt += prog_list_length(&cgrp->bpf.progs[atype]);
1078 for (atype = from_atype; atype <= to_atype && total_cnt; atype++) {
1080 effective = rcu_dereference_protected(cgrp->bpf.effective[atype],
1090 progs = &cgrp->bpf.progs[atype];
1103 flags = cgrp->bpf.flags[atype];
1338 * @atype: The type of program to be executed
1359 enum cgroup_bpf_attach_type atype)
1378 if (atype == CGROUP_INET_EGRESS) {
1382 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, skb,
1408 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype,
1425 * @atype: The type of program to be executed
1436 enum cgroup_bpf_attach_type atype)
1440 return bpf_prog_run_array_cg(&cgrp->bpf, atype, sk, bpf_prog_run, 0,
1453 * @atype: The type of program to be executed
1466 enum cgroup_bpf_attach_type atype,
1495 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, &ctx, bpf_prog_run,
1511 * @atype: The type of program to be executed
1523 enum cgroup_bpf_attach_type atype)
1527 return bpf_prog_run_array_cg(&cgrp->bpf, atype, sock_ops, bpf_prog_run,
1533 short access, enum cgroup_bpf_attach_type atype)
1545 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, &ctx, bpf_prog_run, 0,
1685 * @atype: type of program to be executed
1696 enum cgroup_bpf_attach_type atype)
1736 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, &ctx, bpf_prog_run, 0,